    :root { 
      --accent-button: #01C2EC; 
      --accent-text: #0A89F9; 
      --bg-white: #FFFFFF; 
      --bg-gray: #F8F9FA; 
      --success-green: #28A745;
      --ui-hover-ms: 180ms;
      --ui-hover-ease: ease;
    }
    
    body { 
      font-family: 'Nunito Sans', sans-serif; 
      background: var(--bg-white); 
      margin: 0; 
      display: flex; 
      justify-content: center; 
      padding: 40px 20px; 
    }
    
    .container { width: 100%; max-width: 550px; display: none; }
    #adminContainer,
    #doctorContainer { max-width: 900px; }
    #doctorContainer .doctor-page-title {
      margin-bottom: 12px;
      text-align: left;
    }
    #doctorContainer .doctor-tab-bar {
      margin-bottom: 14px;
    }
    #doctorContainer #doctorListView,
    #doctorContainer #doctorCalendarView {
      min-height: 340px;
    }
    #doctorContainer #doctorCalendarView {
      display: none;
    }
    .doctor-calendar-note {
      display: none;
      margin: 0 0 12px;
      padding: 10px 12px;
      border: 1px solid #dbeafe;
      border-radius: 8px;
      background: #f3f8ff;
      color: #3d5a80;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.01em;
    }
    #loginSection { width: 100%; max-width: 400px; margin-top: 80px; text-align: center; }
    .orbis-portal-version {
      margin: 18px 0 0;
      font-size: 11px;
      color: #9e9e9e;
      letter-spacing: 0.04em;
      user-select: none;
    }
    .orbis-portal-badge {
      margin: 18px auto 0;
      width: 56px;
      height: auto;
      display: block;
      opacity: 0.9;
      user-select: none;
      pointer-events: none;
    }
    h1 { font-family: 'Rubik', sans-serif; font-size: 24px; color: #1A1A1A; margin-bottom: 30px; text-align: center; }
    
    /* Форми та поля */
    .form-group { margin-bottom: 18px; position: relative; text-align: left; }
    label { 
      display: block; 
      font-weight: 600; 
      margin-bottom: 6px; 
      font-size: 13px; 
      color: var(--accent-text); 
      text-transform: uppercase; 
      letter-spacing: 0.5px; 
    }
    
    input, select, textarea { 
      width: 100%; 
      height: 48px; 
      padding: 0 12px; 
      border: 1px solid #EAEAEA; 
      border-radius: 8px; 
      font-size: 16px; 
      font-family: 'Nunito Sans'; 
      box-sizing: border-box; 
      outline: none; 
      background: white;
    }
    
    textarea { height: auto; padding: 12px; min-height: 80px; resize: none; }
    input:focus, select:focus, textarea:focus { border-color: var(--accent-text); }
    
    button { 
      width: 100%; 
      height: 48px; 
      background: var(--accent-button); 
      color: white; 
      border: none; 
      border-radius: 8px; 
      font-family: 'Rubik'; 
      font-size: 16px; 
      cursor: pointer; 
      font-weight: 500; 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      gap: 8px;
      transition: background-color var(--ui-hover-ms) var(--ui-hover-ease),
                  color var(--ui-hover-ms) var(--ui-hover-ease),
                  border-color var(--ui-hover-ms) var(--ui-hover-ease),
                  opacity var(--ui-hover-ms) var(--ui-hover-ease),
                  box-shadow var(--ui-hover-ms) var(--ui-hover-ease),
                  transform var(--ui-hover-ms) var(--ui-hover-ease); 
    }
    
    button:hover:not(:disabled) { opacity: 0.92; }
    button:active:not(:disabled) { transform: scale(0.97); }
    button:disabled { background: #CCC !important; cursor: not-allowed; }
    .lucide { width: 16px; height: 16px; stroke-width: 2.2; flex-shrink: 0; }
    
    /* Модальні вікна */
    .modal, .details-modal { 
      display:none; 
      position:fixed; 
      z-index:100; 
      left:0; top:0; 
      width:100%; height:100%; 
      background:rgba(0,0,0,0.5); 
      align-items:center; 
      justify-content:center; 
      animation: modalOverlayIn 0.22s ease-out;
    }
    /* Модалка завантаження файлів має бути поверх detailsModal */
    #examFilesUploadModal {
      z-index: 200;
    }

    .modal-content, .details-content { 
      background: white; 
      padding: 0; 
      border-radius: 15px; 
      width: 95%; 
      max-width: 500px; 
      max-height: 90vh; 
      overflow: hidden; 
      position: relative;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 40px rgba(0,0,0,0.2);
      animation: modalContentIn 0.24s ease-out;
      transform-origin: center;
    }
    #detailsModal .details-content {
      max-width: 760px;
    }
    @keyframes modalOverlayIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes modalContentIn {
      from { opacity: 0; transform: translateY(12px) scale(0.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
.details-content.details-expand-in {
  animation: detailsExpandIn 0.24s ease-out;
}
@keyframes detailsExpandIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

    .modal-header, .details-header {
      padding: 25px 30px; 
      background: var(--bg-gray);
      border-bottom: 1px solid #EEE;
      text-align: left;
    }

    .modal-body, .details-body {
      padding: 25px 30px;
      overflow-y: auto;
    }

    /* Хрестик закриття */
    .close-modal {
      position: absolute; 
      right: 15px; 
      top: 15px;
      width: 32px;
      height: 32px;
      background: #EEE; 
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px; 
      color: #666; 
      cursor: pointer;
      border: none; 
      padding: 0;
      line-height: 0;
      z-index: 1020;
      transition: 0.2s;
    }
    .close-modal .lucide {
      width: 18px;
      height: 18px;
      stroke-width: 2.4;
    }
    .close-modal:hover { background: #DDD; color: #000; transform: scale(1.1); }

    /* Пошук */
    #resultsList { 
      margin-top: 5px; 
      background: white; 
      border-radius: 8px; 
      max-height: 200px; 
      overflow-y: auto; 
      display: none; 
      border: 1px solid #DDD; 
      position: absolute; 
      width: 100%; 
      z-index: 1000; 
      box-shadow: 0 8px 20px rgba(0,0,0,0.15); 
    }
    
    .patient-item { padding: 12px; border-bottom: 1px solid #EEE; cursor: pointer; font-size: 14px; }
    .patient-item:hover { background: #E7F9FD; }
    
    /* CITO та Чекбокси */
    .cito-container {
      display: flex;
      align-items: center;
      gap: 10px;
      height: 48px;
      margin-top: 22px; 
      border: 1px solid #EAEAEA;
      border-radius: 8px;
      padding: 0 15px;
      cursor: pointer;
      user-select: none;
      background: white;
      box-sizing: border-box;
    }
    
    .cito-container input { width: 22px; height: 22px; margin: 0; cursor: pointer; }
    .cito-label { font-weight: 700; color: #FF4D4D; font-size: 14px; text-transform: uppercase; }

    /* Дашборд та Картки */
    .patient-card { background: white; border: 1px solid #EEE; padding: 18px; border-radius: 12px; cursor: pointer; transition: 0.2s; margin-bottom: 15px; text-align: left; }
    .patient-card:hover { border-color: var(--accent-text); box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
    .patient-card:active { transform: scale(0.985); }
    .patient-card.inline-open:active { transform: none; }
    .status-badge { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
    .priority-cito { color: #FF4D4D; font-weight: 800; animation: blink 1.5s infinite; font-size: 12px; margin-left: 8px;}
    
    @keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

    .history-item { border-left: 4px solid var(--accent-text); padding: 15px; background: #F9F9F9; margin-bottom: 12px; border-radius: 0 8px 8px 0; text-align: left; }
    .staff-create-panel {
      max-height: 0;
      overflow: hidden;
      opacity: 0;
      transform: translateY(-6px);
      transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease, margin 0.2s ease;
      margin: 0;
      pointer-events: none;
    }
    .staff-create-panel.open {
      max-height: 380px;
      opacity: 1;
      transform: translateY(0);
      margin: 12px 0 8px;
      pointer-events: auto;
    }
    .staff-create-card {
      border: 1px solid #e7eef5;
      border-radius: 10px;
      padding: 12px;
      background: #fbfdff;
    }
    .staff-create-grid { display: grid; gap: 10px; }
    .staff-create-row-2 { display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
    #usersMgmtModal .modal-header { padding: 18px 22px; }
    #usersMgmtModal .modal-body { padding: 16px 22px; }
    #usersMgmtModal button {
      transition: background-color var(--ui-hover-ms) var(--ui-hover-ease),
                  color var(--ui-hover-ms) var(--ui-hover-ease),
                  border-color var(--ui-hover-ms) var(--ui-hover-ease),
                  opacity var(--ui-hover-ms) var(--ui-hover-ease),
                  box-shadow var(--ui-hover-ms) var(--ui-hover-ease),
                  transform var(--ui-hover-ms) var(--ui-hover-ease),
                  filter var(--ui-hover-ms) var(--ui-hover-ease);
      will-change: filter, transform;
    }
    #usersMgmtModal button:hover:not(:disabled) {
      opacity: 1;
      filter: brightness(0.96);
    }
    #usersMgmtModal .logout-btn:hover:not(:disabled) {
      filter: none;
      background: #e4e4e4;
      color: #555;
    }
    #examTypesMgmtModal .modal-header { padding: 18px 22px; }
    #examTypesMgmtModal .modal-body { padding: 16px 22px; }
    #examTypesMgmtModal .logout-btn:hover:not(:disabled) {
      filter: none;
      background: #e4e4e4;
      color: #555;
    }
    #examTypesTableBody tr.dragging {
      opacity: 0.6;
      background: #f4f9ff;
    }
    .exam-types-drag-handle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 24px;
      border: none;
      border-radius: 0;
      color: #b0bec5;
      background: transparent;
      cursor: grab;
      user-select: none;
      font-size: 18px;
      line-height: 1;
      font-weight: 700;
      vertical-align: middle;
      opacity: 0.95;
    }
    .exam-types-drag-handle:active {
      cursor: grabbing;
    }
    #examTypesTableBody tr.dragging {
      background: #eef6ff !important;
    }
    #examTypesTableBody tr.drag-over-target {
      box-shadow: inset 0 0 0 2px #0A89F9;
      background: #f0f7ff !important;
    }
    #examTypesTableBody td {
      vertical-align: middle;
    }
    .exam-types-check {
      width: 22px;
      height: 22px;
      margin: 0;
      vertical-align: middle;
    }

    /* Розширення обстеження */
    .exam-details-expand {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease-out, padding 0.3s ease;
      background: #fcfcfc;
      border-radius: 8px;
    }
    .exam-details-expand.open {
      max-height: 800px;
      padding: 15px;
      border: 1px solid #eee;
      margin-top: 10px;
      overflow: visible;
    }

    .assign-section {
      background: #f8f9fa;
      padding: 12px;
      border-radius: 8px;
      margin-top: 15px;
      border: 1px solid #e2e8f0;
      display: flex;
      align-items: center;
    }

    /* Кнопки-посилання */
    .action-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 15px;
      background: #F0F7FF;
      color: var(--accent-text);
      border-radius: 8px;
      text-decoration: none;
      font-size: 12px;
      font-weight: 700;
      border: 1px solid #D0E5FF;
      transition: 0.2s;
    }
    .action-link:hover { background: #E1EFFF; border-color: var(--accent-text); }
    .action-link.blue { background: var(--accent-button); color: white; border: none; }

    /* Кнопка підтвердження готовності */
    .confirm-ready-btn {
      margin-top: 15px;
      background: var(--success-green);
      color: white;
      border: none;
      border-radius: 8px;
      height: 48px;
      font-weight: 700;
      font-size: 14px;
      cursor: pointer;
      width: 100%;
      transition: 0.2s;
    }
    .confirm-ready-btn:hover { background: #218838; }

    .delete-btn {
      background: #FFEBEB;
      color: #FF4D4D;
      border: 1px solid #FFD1D1;
      padding: 6px 12px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      margin-top: 15px;
    }
    .delete-btn:hover { background: #FF4D4D; color: white; }

    /* Вкладки */
    .tab-container { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid #EEE; padding-bottom: 10px; overflow-x: auto; }
    .tab-btn {
      background: #F0F2F5;
      color: #666;
      border: none;
      padding: 10px 18px;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
    }
    .tab-btn.active { background: var(--accent-text); color: white; }

    .doctor-pdf-file-row {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .doctor-pdf-file-row label {
      margin: 0;
      flex-shrink: 0;
      line-height: 1.2;
    }
    .doctor-pdf-file-row input[type="file"] {
      flex: 1;
      min-width: 140px;
      padding: 6px 0;
      font-size: 13px;
    }
    .upload-dropzone {
      border: 2px dashed #c9d7ea;
      border-radius: 12px;
      background: #f8fbff;
      padding: 18px 14px;
      text-align: center;
      transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
      outline: none;
    }
    .upload-dropzone.dragover {
      border-color: #0A89F9;
      background: #eef6ff;
      box-shadow: 0 0 0 3px rgba(10,137,249,0.12);
    }
    .upload-dropzone-icon { color: #0A89F9; margin-bottom: 8px; }
    .upload-dropzone-icon .lucide { width: 22px; height: 22px; }
    .upload-dropzone-title { font-size: 14px; font-weight: 700; color: #1f2937; }
    .upload-dropzone-sub { font-size: 12px; color: #6b7280; margin-top: 2px; margin-bottom: 8px; }
    .upload-dropzone-btn {
      width: auto !important;
      margin: 0 auto;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0 12px;
      height: 34px;
      font-size: 12px;
    }
    .upload-file-list { margin-top: 10px; display: grid; gap: 6px; }
    .upload-file-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      align-items: center;
      font-size: 12px;
      color: #374151;
      background: #f3f4f6;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      padding: 7px 9px;
    }
    .upload-file-remove {
      border: none;
      background: #ffecec;
      color: #b3261e;
      border-radius: 6px;
      height: 24px;
      min-width: 26px;
      cursor: pointer;
      font-weight: 700;
    }
    .upload-progress-wrap { margin-top: 8px; }
    .upload-progress-track {
      width: 100%;
      height: 8px;
      background: #e5e7eb;
      border-radius: 999px;
      overflow: hidden;
    }
    .upload-progress-bar {
      height: 100%;
      background: linear-gradient(90deg, #0A89F9, #20b2ff);
      width: 0%;
      transition: width .2s ease;
    }

    /* Спінер анімація */
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .loader { 
      border: 2px solid #f3f3f3; 
      border-top: 2px solid currentColor; 
      border-radius: 50%; 
      width: 14px; 
      height: 14px; 
      animation: spin 0.8s linear infinite; 
      margin-right: 8px; 
      display: inline-block; 
    }
    .dashboard-skeleton { display: grid; gap: 15px; }
    .skeleton-card {
      background: #fff;
      border: 1px solid #eee;
      border-radius: 12px;
      padding: 18px;
    }
    .skeleton-line {
      height: 12px;
      border-radius: 6px;
      background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%);
      background-size: 400% 100%;
      animation: skeletonShimmer 1.2s ease-in-out infinite;
    }
    .skeleton-line + .skeleton-line { margin-top: 10px; }
    .skeleton-line.w-70 { width: 70%; }
    .skeleton-line.w-45 { width: 45%; }
    .skeleton-line.w-35 { width: 35%; }
    @keyframes skeletonShimmer {
      0% { background-position: 100% 0; }
      100% { background-position: 0 0; }
    }

    .nav-bar { margin-bottom: 15px; border-bottom: 1px solid #F0F0F0; padding-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
    .nav-actions { display: flex; align-items: center; gap: 8px; }
    .logout-btn { width: auto; height: 32px; padding: 0 15px; background: #f0f0f0; color: #666; font-size: 11px; margin: 0; }
    .logout-btn:hover:not(:disabled) { background: #e4e4e4; color: #555; }
    .det-reset-pass-btn {
      width: auto;
      height: 24px;
      padding: 0 8px;
      font-size: 10px;
      margin-left: 10px;
      background: #f0f0f0;
      color: #666;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      border: none;
      border-radius: 6px;
      cursor: pointer;
    }
    .success-card { background: #E7F9FD; padding: 20px; border-radius: 12px; border: 1px solid var(--accent-button); text-align: center; display: none; }

.exam-timeline {
  margin: 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: none;
  height: auto;
  box-sizing: border-box;
  cursor: text;
}
.timeline-item {
  font-size: 12px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  color: #555;
  cursor: text;
  gap: 8px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-label { font-weight: 600; color: #333; }
.timeline-value { text-align: right; }
.exam-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 0;
  align-items: stretch;
}
.exam-left-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.exam-comments-card {
  flex: 1 1 auto;
  font-size: 13px;
  color: #555;
  background: #fff9e6;
  padding: 10px;
  border-radius: 8px;
  margin: 0;
  min-height: 0;
  cursor: text;
}
.exam-referral-card { cursor: text; }
.exam-toggle-hitbox { cursor: pointer; }
.timeline-item-placeholder {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.timeline-ph-line {
  display: inline-block;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
}
.timeline-ph-line.left {
  width: 42%;
}
.timeline-ph-line.right {
  width: 30%;
}
.resource-split {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  min-height: 34px;
}
.resource-wrap {
  position: relative;
}
.resource-split.open .resource-caret-icon {
  transform: rotate(180deg);
}
.resource-main-btn {
  border-radius: 8px !important;
  margin: 0 !important;
  min-height: 34px;
  height: 34px;
  padding: 0 10px !important;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.resource-caret-seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  border-left: 1px solid rgba(255,255,255,0.25);
  padding-left: 6px;
}
.resource-caret-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.1;
  transition: transform 0.18s ease;
}
.exam-files-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  padding: 10px;
  background: #f9fbff;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 40;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}
.exam-files-popover.open {
  opacity: 1;
  transform: translateY(0);
}
.exam-files-popover.loading {
  min-height: 88px;
}
.doctor-action-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: stretch;
}
.doctor-action-row .logout-btn {
  flex: 1;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.doctor-single-action .logout-btn {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.doctor-inline-assign-row {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
}
.doctor-inline-assign-row .doctor-assign-label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.doctor-inline-actions-slot {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 320px;
  max-width: 58%;
}
.doctor-inline-actions-slot .doctor-action-row,
.doctor-inline-actions-slot .doctor-single-action {
  margin: 0 !important;
  width: 100%;
  justify-content: flex-end;
}
.doctor-inline-actions-slot .doctor-action-row {
  align-items: center;
}
.doctor-inline-actions-slot .doctor-action-row .logout-btn {
  flex: 0 0 auto !important;
  min-width: 148px;
}
.doctor-inline-actions-slot .doctor-single-action .logout-btn {
  width: auto !important;
  min-width: 240px;
}
.calendar-event-popover {
  position: fixed;
  z-index: 210;
  width: min(320px, calc(100vw - 20px));
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  padding: 10px;
  background: #f9fbff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.calendar-event-popover.open {
  opacity: 1;
  transform: translateY(0);
}
.calendar-event-popover.loading {
  min-height: 88px;
}
.doctor-assign-row {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  width: 100%;
}
.doctor-assign-row.no-action {
  grid-template-columns: minmax(0, 1fr) auto;
}
.doctor-assign-label {
  font-size: 12px;
  color: #334155;
  cursor: text;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doctor-assign-name {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.doctor-assign-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
}
.doctor-assign-badge .lucide {
  width: 12px;
  height: 12px;
}
.doctor-assign-badge-icon {
  position: relative;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  padding: 0;
  cursor: pointer;
}
.doctor-assign-badge-icon .lucide {
  width: 14px;
  height: 14px;
}
.doctor-assign-badge-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: none;
  min-width: 110px;
  max-width: 180px;
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  line-height: 1.2;
  z-index: 30;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}
.doctor-assign-badge-icon.tooltip-open .doctor-assign-badge-tooltip {
  display: block;
}
.doctor-assign-row > .resource-wrap {
  justify-self: end;
}
.doctor-assign-popover {
  top: auto;
  bottom: calc(100% + 8px);
  transform: translateY(4px);
  max-height: 220px;
  overflow-y: auto;
}
.doctor-assign-popover.open {
  transform: translateY(0);
}
.doctor-assign-search {
  width: 100%;
  height: 30px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  outline: none;
  margin-bottom: 8px;
}
.doctor-assign-search:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.25);
}
.doctor-assign-item {
  width: 100%;
  height: 30px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1e3a5f;
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  cursor: pointer;
}
.doctor-assign-item + .doctor-assign-item {
  margin-top: 6px;
}
.doctor-assign-item:hover:not(:disabled) {
  background: #eaf3ff;
}
.doctor-assign-popover.assign-busy .doctor-assign-item {
  pointer-events: none;
  opacity: 0.72;
}
.doctor-name-skeleton {
  display: inline-block;
  width: 140px;
  max-width: 55%;
  height: 10px;
  border-radius: 999px;
  vertical-align: middle;
  background: linear-gradient(90deg, #eef2f7 20%, #e2e8f0 40%, #eef2f7 60%);
  background-size: 240% 100%;
  animation: skeletonShimmer 1.1s ease-in-out infinite;
}
.exam-bottom-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.exam-bottom-actions .ready-desc-btn {
  height: 34px;
  font-size: 12px;
  font-weight: 700;
  margin: 0;
}
.exam-bottom-actions .delete-btn,
.exam-bottom-actions .logout-btn {
  height: 34px;
  width: auto;
  margin: 0;
  padding: 0 12px;
  font-size: 12px;
}
.exam-file-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eef2f7;
}
.exam-file-row:last-child { border-bottom: none; }
.exam-file-name {
  font-size: 12px;
  color: #425466;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exam-resource-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  align-items: start;
}
.exam-resource-row > * {
  align-self: start;
}
.exam-resource-row .action-link {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  box-sizing: border-box;
  max-width: 100%;
}
.exam-resource-row .resource-wrap,
.exam-resource-row .resource-split,
.exam-resource-row .resource-main-btn {
  width: 100%;
}
.mobile-only { display: none; }
.exam-files-skeleton {
  display: grid;
  gap: 8px;
}
.exam-files-skeleton-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}
.exam-files-skeleton-chip {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7 20%, #e2e8f0 40%, #eef2f7 60%);
  background-size: 240% 100%;
  animation: skeletonShimmer 1.1s ease-in-out infinite;
}

    /* Кнопки швидких фільтрів */
.filter-chip {
  cursor: pointer;
  color: #666;
  background: #F0F0F0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s;
  white-space: nowrap;
}
.filter-chip:hover { background: #EAEAEA; }
.patient-item:active { transform: scale(0.99); }
.filter-chip.active {
  color: var(--accent-text);
  background: #E7F9FD;
  border-color: #B2EBF2;
}

/* Контейнер для вибору періоду (прихований за замовчуванням) */
#customRangeContainer {
  display: none;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 8px;
}
#customRangeContainer input { height: 32px; font-size: 12px; width: auto; }

/* Calendar */
.calendar-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.calendar-toolbar .btn-small {
  width: auto;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  background: #455a64;
}
#calendarRoot {
  border: 0;
  border-radius: 0;
  padding: 8px;
  background: #fff;
  --fc-now-indicator-color: #e57373;
  max-width: 840px;
  margin: 0 auto;
  overflow-x: visible;
  position: relative;
}
#calendarRoot.has-fixed-view-height .fc-view-harness,
#calendarRoot.has-fixed-view-height .fc-view-harness-active {
  height: var(--orbis-cal-view-h, auto) !important;
  min-height: var(--orbis-cal-view-h, auto) !important;
}
#calendarRoot.has-fixed-view-height {
  height: var(--orbis-cal-root-h, auto) !important;
  min-height: var(--orbis-cal-root-h, auto) !important;
}
#calendarRoot.has-fixed-view-height .fc,
#calendarRoot.has-fixed-view-height .fc-view-harness,
#calendarRoot.has-fixed-view-height .fc-view-harness-active {
  height: 100% !important;
  min-height: 100% !important;
}
#calendarRoot.has-fixed-view-height .fc-timeGridDay-view .fc-scroller-harness,
#calendarRoot.has-fixed-view-height .fc-timeGridDay-view .fc-scroller-harness-liquid,
#calendarRoot.has-fixed-view-height .fc-timeGridWeek-view .fc-scroller-harness,
#calendarRoot.has-fixed-view-height .fc-timeGridWeek-view .fc-scroller-harness-liquid {
  height: 100% !important;
  min-height: 100% !important;
}
/* Місяць: смуга справа під кнопки «ⓘ» (поза межами останньої колонки) */
#calendarRoot:has(.fc-dayGridMonth-view) {
  padding: 8px 44px 8px 6px;
}
/* Інакше FullCalendar обрізає абсолютні елементи, що виходять за межі td */
#calendarRoot .fc-dayGridMonth-view .fc-view-harness,
#calendarRoot .fc-dayGridMonth-view .fc-view-harness-active,
#calendarRoot .fc-dayGridMonth-view .fc-scroller-harness,
#calendarRoot .fc-dayGridMonth-view .fc-scroller-harness-liquid,
#calendarRoot .fc-dayGridMonth-view .fc-scroller,
#calendarRoot .fc-dayGridMonth-view .fc-scrollgrid,
#calendarRoot .fc-dayGridMonth-view .fc-scrollgrid-section-body,
#calendarRoot .fc-dayGridMonth-view td.fc-daygrid-day,
#calendarRoot .fc-dayGridMonth-view th {
  overflow: visible !important;
}
/* Шапка FullCalendar: як вкладки адмінки; заголовок — стиль Пн/Вт, розмір як у tab-btn */
#calendarRoot .fc-header-toolbar {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk:first-child {
  flex: 0 0 auto;
}
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk:nth-child(2),
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk.fc-toolbar-chunk-center {
  flex: 0 1 auto;
  justify-content: stretch;
  align-items: center !important;
  display: grid !important;
  grid-template-columns: 36px minmax(140px, auto) 36px;
  gap: 6px;
}
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) > *,
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk.fc-toolbar-chunk-center > * {
  flex-shrink: 0;
}
/* Окремі fc-button-group на кожну кнопку (center: «prev title next» через пробіли) */
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) .fc-button-group,
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk.fc-toolbar-chunk-center .fc-button-group {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  vertical-align: middle;
}
#calendarRoot .fc-header-toolbar .fc-toolbar-chunk:last-child {
  flex: 0 0 auto;
  justify-content: flex-end;
}
#calendarRoot .fc-header-toolbar .fc-toolbar-title {
  font-family: 'Rubik', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #607d8b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap;
  flex: 0 1 auto !important;
  min-width: 0;
  width: auto !important;
  max-width: min(46vw, 340px) !important;
  text-overflow: ellipsis;
  overflow: hidden;
  display: flex !important;
  justify-content: center !important;
  text-align: center !important;
  align-items: center !important;
  align-self: center !important;
  line-height: 1.25 !important;
  min-height: 32px;
  transition: opacity 180ms ease;
}
#calendarRoot .fc-header-toolbar .fc-button {
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  background: #F0F2F5 !important;
  color: #666 !important;
  border: none !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  font-family: 'Rubik', sans-serif !important;
  opacity: 1 !important;
  box-shadow: none !important;
  text-transform: none;
  transition: background-color var(--ui-hover-ms) var(--ui-hover-ease),
              color var(--ui-hover-ms) var(--ui-hover-ease),
              border-color var(--ui-hover-ms) var(--ui-hover-ease),
              opacity var(--ui-hover-ms) var(--ui-hover-ease),
              box-shadow var(--ui-hover-ms) var(--ui-hover-ease),
              transform var(--ui-hover-ms) var(--ui-hover-ease) !important;
}
#calendarRoot .fc-header-toolbar .fc-button:hover {
  background: #E8EAED !important;
  color: #666 !important;
}
#calendarRoot .fc-header-toolbar .fc-button.fc-button-active {
  background: var(--accent-text) !important;
  color: #fff !important;
}
#calendarRoot .fc-header-toolbar .fc-orbisCalPrev-button,
#calendarRoot .fc-header-toolbar .fc-orbisCalNext-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  min-height: 34px;
  box-sizing: border-box;
  border-radius: 999px !important;
  font-size: 0 !important;
  line-height: 0 !important;
  float: none !important;
}
#calendarRoot .fc-header-toolbar .fc-orbisCalClose-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px !important;
  font-size: 0 !important;
  line-height: 0 !important;
  margin-right: 6px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.94) !important;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms !important;
}
#calendarRoot .fc-header-toolbar .fc-orbisCalClose-button.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: scale(1) !important;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 0s !important;
}
#calendarRoot .fc-header-toolbar .fc-orbisCalPrev-button:hover,
#calendarRoot .fc-header-toolbar .fc-orbisCalNext-button:hover,
#calendarRoot .fc-header-toolbar .fc-orbisCalClose-button:hover {
  transform: scale(1.08) !important;
}
#calendarRoot .fc-header-toolbar .fc-orbisCalPrev-button .lucide,
#calendarRoot .fc-header-toolbar .fc-orbisCalNext-button .lucide,
#calendarRoot .fc-header-toolbar .fc-orbisCalClose-button .lucide {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  pointer-events: none;
}
#calendarRoot .fc-header-toolbar .fc-orbisCalToday-button:disabled {
  opacity: 1 !important;
  background: var(--accent-text) !important;
  color: #fff !important;
  cursor: default !important;
}
/* Місяць: проміжки між клітинками (шапка + тіло — однаковий spacing для вирівнювання колонок) */
#calendarRoot .fc-dayGridMonth-view .fc-scrollgrid-section-header .fc-scrollgrid-sync-table,
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-body .fc-scrollgrid-sync-table {
  border-collapse: separate !important;
  border-spacing: 5px 6px !important;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-body tbody > tr {
  box-shadow: none;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day .fc-daygrid-day-frame {
  transform: scale(1);
  transform-origin: center center;
  transition: transform 140ms ease, box-shadow 140ms ease;
  will-change: transform;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day:not(.fc-daygrid-day-disabled):hover .fc-daygrid-day-frame {
  transform: scale(1.04);
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day:not(.fc-daygrid-day-disabled):has(.orbis-cal-week-open-btn:hover) .fc-daygrid-day-frame {
  transform: none;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day:not(.fc-daygrid-day-disabled):active .fc-daygrid-day-frame {
  transform: scale(1);
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day:not(.fc-daygrid-day-disabled) {
  cursor: pointer;
}
/* Кнопка «тиждень» — у смузі справа від сітки (остання колонка = неділя в LTR) */
#calendarRoot .fc-dayGridMonth-view .orbis-cal-week-open-btn {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 22px !important;
  height: 22px !important;
  padding: 0;
  margin: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #7a8a96;
  font-size: 0;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  opacity: 1;
  transition: opacity 180ms ease,
              color var(--ui-hover-ms) var(--ui-hover-ease),
              transform var(--ui-hover-ms) var(--ui-hover-ease);
}
#calendarRoot.week-buttons-pending .fc-dayGridMonth-view .orbis-cal-week-open-btn {
  opacity: 0 !important;
  pointer-events: none;
}
#calendarRoot .fc-dayGridMonth-view .orbis-cal-week-open-btn:hover {
  color: #607d8b;
  transform: translateY(-50%) scale(1.08);
}
#calendarRoot .fc-dayGridMonth-view .orbis-cal-week-open-btn .lucide {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
#calendarRoot .fc-dayGridMonth-view .orbis-cal-week-open-btn::after {
  content: "Тиждень";
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(33, 33, 33, 0.92);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}
#calendarRoot .fc-dayGridMonth-view .orbis-cal-week-open-btn:hover::after {
  opacity: 1;
}
/* День / тиждень: без сітки; зовнішня рамка — більший радіус і товщина, ніж у малих клітинок місяця (12px / 1px) */
#calendarRoot .fc-timeGridWeek-view .fc-scrollgrid,
#calendarRoot .fc-timeGridDay-view .fc-scrollgrid {
  border: 3px solid #0A89F9 !important;
  border-radius: 44px;
  overflow: hidden;
  background: #0A89F9;
}
#calendarRoot .fc-timeGridWeek-view .fc-scrollgrid table,
#calendarRoot .fc-timeGridDay-view .fc-scrollgrid table {
  border-collapse: separate;
  border-spacing: 0;
}
#calendarRoot .fc-timeGridWeek-view .fc-scrollgrid td,
#calendarRoot .fc-timeGridWeek-view .fc-scrollgrid th,
#calendarRoot .fc-timeGridDay-view .fc-scrollgrid td,
#calendarRoot .fc-timeGridDay-view .fc-scrollgrid th {
  border-left: none !important;
  border-right: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-scrollgrid-section-header > td,
#calendarRoot .fc-timeGridDay-view .fc-scrollgrid-section-header > td {
  border-bottom: none !important;
  border-top: 0 !important;
  background: #0A89F9 !important;
  padding: 0 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-col-header,
#calendarRoot .fc-timeGridDay-view .fc-col-header {
  background: #0A89F9 !important;
  margin: 0 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-col-header table,
#calendarRoot .fc-timeGridDay-view .fc-col-header table {
  border-spacing: 0 !important;
  margin-top: 0;
}
#calendarRoot .fc-timeGridWeek-view .fc-col-header-cell,
#calendarRoot .fc-timeGridDay-view .fc-col-header-cell {
  background: #0A89F9 !important;
  border-top: none !important;
  box-shadow: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-col-header-cell-frame,
#calendarRoot .fc-timeGridDay-view .fc-col-header-cell-frame {
  border-top: none !important;
  box-shadow: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-col-header tr,
#calendarRoot .fc-timeGridDay-view .fc-col-header tr {
  border-top: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-axis,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-axis,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-axis-frame,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-axis-frame {
  background: #fff !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-scrollgrid-section-header .fc-timegrid-axis,
#calendarRoot .fc-timeGridDay-view .fc-scrollgrid-section-header .fc-timegrid-axis,
#calendarRoot .fc-timeGridWeek-view .fc-scrollgrid-section-header .fc-timegrid-axis-frame,
#calendarRoot .fc-timeGridDay-view .fc-scrollgrid-section-header .fc-timegrid-axis-frame {
  background: #0A89F9 !important;
  border-top: none !important;
  box-shadow: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-col-header-cell-cushion,
#calendarRoot .fc-timeGridDay-view .fc-col-header-cell-cushion {
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 16px 0 20px;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-axis,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-axis {
  border-right: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-slots,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-slots {
  background: #fff !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-col,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-col {
  border-right: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event {
  border-radius: 10px !important;
  overflow: hidden;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.is-entering,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.is-entering {
  animation: calendarEventFadeIn 220ms ease both;
}
@keyframes calendarEventFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event:not(.fc-event-tech-break),
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event:not(.fc-event-tech-break) {
  background: #fff !important;
  border: 2px solid #1976D2 !important;
  --fc-event-bg-color: #fff;
  --fc-event-text-color: #111;
  --fc-event-border-color: transparent;
  color: #111 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.fc-event-status-planned,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.fc-event-status-planned {
  border-color: #1976D2 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.fc-event-status-scanned,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.fc-event-status-scanned {
  border-color: #D46B08 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.fc-event-status-in-progress,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.fc-event-status-in-progress {
  border-color: #7B1FA2 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.fc-event-status-ready,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.fc-event-status-ready {
  border-color: #2E7D32 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.fc-event-status-cancelled,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.fc-event-status-cancelled {
  border-color: #999 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.fc-event-status-declined,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.fc-event-status-declined {
  border-color: #F5222D !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event .fc-event-time,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event .fc-event-time {
  display: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event .fc-event-title,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event .fc-event-title {
  display: block;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  line-height: 1.2;
  color: #111 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event:not(.fc-event-tech-break) .fc-event-main,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event:not(.fc-event-tech-break) .fc-event-main,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event:not(.fc-event-tech-break) .fc-event-main-frame,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event:not(.fc-event-tech-break) .fc-event-main-frame,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event:not(.fc-event-tech-break) .fc-event-title-container,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event:not(.fc-event-tech-break) .fc-event-title-container {
  color: #111 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.is-overflowing .fc-event-title-container,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.is-overflowing .fc-event-title-container {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 16px), transparent 100%);
  position: relative;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event.is-overflowing .fc-event-title-container::after,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event.is-overflowing .fc-event-title-container::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to right, rgba(255,255,255,0), #fff 85%);
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event .fc-event-main-frame,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event .fc-event-main-frame,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event .fc-event-main,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event .fc-event-main {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-event .fc-event-title-container,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-event .fc-event-title-container {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 8px;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-slot,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-slot {
  min-height: 2.1em;
  height: 36px !important;
  border-left: none !important;
  border-right: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-slots td,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-slots td,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body .fc-scrollgrid-sync-table td,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body .fc-scrollgrid-sync-table td {
  height: 36px !important;
}
/* Горизонтальні лінії — через один ряд (усі sync-таблиці слотів) */
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body .fc-scrollgrid-sync-table tbody tr:nth-child(even) > td,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body .fc-scrollgrid-sync-table tbody tr:nth-child(even) > td,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-slots .fc-scrollgrid-sync-table tbody tr:nth-child(even) > td,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-slots .fc-scrollgrid-sync-table tbody tr:nth-child(even) > td {
  border-bottom: none !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body .fc-scrollgrid-sync-table tbody tr:nth-child(odd) > td,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body .fc-scrollgrid-sync-table tbody tr:nth-child(odd) > td,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-slots .fc-scrollgrid-sync-table tbody tr:nth-child(odd) > td,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-slots .fc-scrollgrid-sync-table tbody tr:nth-child(odd) > td {
  border-bottom: 1px solid rgba(96, 125, 139, 0.2) !important;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body {
  position: relative;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body::before,
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body::after,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body::before,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  background: #fff;
  z-index: 3;
  pointer-events: none;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body::before,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body::before {
  left: 0;
}
#calendarRoot .fc-timeGridWeek-view .fc-timegrid-body::after,
#calendarRoot .fc-timeGridDay-view .fc-timegrid-body::after {
  right: 0;
}
#calendarRoot .fc-timeGridWeek-view .orbis-cal-slot-label,
#calendarRoot .fc-timeGridDay-view .orbis-cal-slot-label {
  display: inline-block;
  font-family: 'Rubik', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #455a64;
  line-height: 1.2;
  padding-left: 12px;
}
#calendarRoot .fc-timeGridWeek-view .orbis-cal-slot-label--half,
#calendarRoot .fc-timeGridDay-view .orbis-cal-slot-label--half {
  font-weight: 500;
  opacity: 0.92;
}
#calendarRoot .fc-timeGridWeek-view .orbis-cal-slot-label--hour,
#calendarRoot .fc-timeGridDay-view .orbis-cal-slot-label--hour {
  font-weight: 600;
}
#adminCalendarView {
  max-width: 840px;
  margin: 0 auto;
}
/* Місяць: приховати смужки подій (лише лічильник); тиждень/день без змін */
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day-events,
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-event-harness,
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day-bottom,
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-more-link {
  display: none !important;
}
#calendarRoot .fc-dayGridMonth-view .fc-scrollgrid,
#calendarRoot .fc-dayGridMonth-view .fc-scrollgrid table,
#calendarRoot .fc-dayGridMonth-view .fc-scrollgrid td,
#calendarRoot .fc-dayGridMonth-view .fc-scrollgrid th {
  border: 0 !important;
}
#calendarRoot .fc-dayGridMonth-view .fc-col-header-cell-cushion {
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  color: #607d8b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 0 10px;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day-frame {
  min-height: 70px;
  aspect-ratio: 4 / 3;
  border: 1px solid #0A89F9;
  border-radius: 10px;
  background: #fff;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day-top {
  padding: 4px 6px 0;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day-number {
  font-family: 'Rubik', sans-serif;
  color: #0A89F9;
  font-size: 13px;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day {
  padding: 2px;
  vertical-align: top;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day.fc-day-today {
  background: transparent !important;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
  background: #0A89F9 !important;
  border-color: #0A89F9 !important;
}
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day.fc-day-today .fc-daygrid-day-number,
#calendarRoot .fc-dayGridMonth-view .fc-daygrid-day.fc-day-today .month-day-exam-count {
  color: #fff !important;
}
.month-day-exam-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 12;
  font-family: 'Rubik', sans-serif;
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 700;
  color: #0A89F9;
  line-height: 1;
  text-shadow: none;
}
.month-day-exam-count.is-zero {
  display: none;
}
#calendarRoot.month-badges-hidden .month-day-exam-count {
  opacity: 0 !important;
  transition: none !important;
}
#calendarRoot .fc-dayGridMonth-view .month-day-exam-count {
  font-size: clamp(22px, 2.8vw, 34px);
}
.fc-event-tech-break {
  background: #fff !important;
  border: 2px solid #424242 !important;
  color: #111 !important;
  --fc-event-bg-color: #fff;
  --fc-event-text-color: #111;
  --fc-event-border-color: transparent;
}
.duration-stepper {
  display: flex;
  align-items: center;
  gap: 0;
}
.duration-stepper input[type="number"] {
  width: 72px;
  height: 48px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  position: relative;
  z-index: 1;
}
.duration-stepper input[type="number"]::-webkit-outer-spin-button,
.duration-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.duration-stepper .step-btn {
  width: 40px;
  height: 48px;
  min-width: 40px;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  background: #eceff1;
  color: #37474f;
  border: 1px solid #ddd;
}
.duration-stepper .step-btn:first-child {
  border-radius: 8px 0 0 8px;
}
.duration-stepper .step-btn:last-child {
  border-radius: 0 8px 8px 0;
}
#regModal .modal-content {
  max-width: 760px;
}
.reg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.reg-row-type {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 18px;
}
.reg-row-type .form-group {
  margin-bottom: 0;
}
.reg-row-type .contrast-container {
  margin-top: 0;
  height: 48px;
  box-sizing: border-box;
  align-self: start;
}
.reg-row-type .contrast-cell label {
  visibility: hidden;
}
.reg-row-type .contrast-label {
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}
.reg-row-type .contrast-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #f7f7f7;
  cursor: pointer;
  user-select: none;
}
.reg-row-type .contrast-container.disabled {
  opacity: 0.8;
  cursor: default;
}
.reg-row-type .contrast-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}
.exam-type-ms {
  position: relative;
}
.exam-type-ms-trigger {
  height: 48px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
}
.exam-type-ms-trigger:focus {
  outline: none;
  border-color: var(--accent-text);
  box-shadow: 0 0 0 3px rgba(10, 137, 249, 0.12);
}
.exam-type-ms-value {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  color: #223;
}
.exam-type-ms-placeholder {
  color: #9aa0a6;
}
.exam-type-ms-caret {
  flex: 0 0 auto;
  color: #607d8b;
  font-size: 16px;
  line-height: 1;
}
.exam-type-ms-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  max-height: 280px;
  overflow: auto;
  display: none;
}
.exam-type-ms-dropdown.open {
  display: block;
}
.exam-type-ms-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 8px;
}
.exam-type-ms-search {
  width: 100%;
  height: 36px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  box-sizing: border-box;
}
.exam-type-ms-list {
  max-height: 220px;
  overflow: auto;
}
.exam-type-ms-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  cursor: pointer;
}
.exam-type-ms-item:last-child {
  border-bottom: none;
}
.exam-type-ms-item:hover {
  background: #f5f9ff;
}
.exam-type-ms-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}
.exam-type-ms-item span {
  font-size: 13px;
  color: #223;
  line-height: 1.25;
}
.exam-type-ms-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: #8a96a0;
}
.exam-type-ms-add-own {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 8px;
  background: #fff;
}
.exam-type-ms-add-row {
  display: flex;
  gap: 8px;
}
.exam-type-ms-add-input {
  flex: 1 1 auto;
  height: 36px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  box-sizing: border-box;
}
.exam-type-ms-add-btn {
  width: auto;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  background: var(--accent-text);
}
.reg-row-type .cito-container {
  margin-top: 0;
  height: 48px;
  box-sizing: border-box;
  align-self: start;
}
.reg-row-type .duration-cell {
  margin-bottom: 0;
}
.reg-row-type .cito-cell label {
  visibility: hidden;
}
.reg-row-type .duration-cell label {
  text-transform: uppercase;
}
#regModal .password-label-main {
  display: block;
}
#regModal .password-label-sub {
  display: block;
  color: #888;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  margin-top: 2px;
}
#regModal #submitBtn {
  height: 48px;
  margin-bottom: 0;
}
#regModal .submit-cell {
  padding-top: 44px;
}
#regModal #regEditSaveRow {
  margin-top: 0 !important;
}
#regModal #regEditSaveRow .submit-cell {
  padding-top: 0 !important;
}
.rs-month-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #789;
  text-align: center;
  margin-bottom: 6px;
}
.rs-month-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
#rescheduleMonthGrid {
  position: relative;
  min-height: 248px;
  overflow: hidden;
}
.rs-month-grid-shell {
  min-height: 248px;
}
.rs-month-grid-layer {
  position: absolute;
  inset: 0;
}
.rs-month-loading {
  margin: 0;
  padding: 14px 8px;
  font-size: 12px;
  color: #789;
  text-align: center;
}
.rs-month-cells.rs-skeleton {
  pointer-events: none;
}
.rs-month-cells.rs-skeleton .rs-cell {
  min-height: 32px;
  border-radius: 6px;
  border: 1px solid #eceff1;
  background: linear-gradient(90deg, #f4f7f9 25%, #edf2f5 50%, #f4f7f9 75%);
  background-size: 200% 100%;
  animation: rsShimmer 1.2s linear infinite;
}
@keyframes rsShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.rs-month-cells button.rs-cell {
  width: 100%;
  height: auto;
  min-height: 36px;
  box-sizing: border-box;
}
.rs-cell.rs-empty {
  min-height: 32px;
}
button.rs-cell {
  min-height: 32px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  background: #fafafa;
  font-size: 12px;
  color: #424242;
  cursor: pointer;
  padding: 0;
}
button.rs-cell.rs-has {
  background: #e3f7e5;
  border-color: #9fd3a2;
  font-weight: 600;
}
button.rs-cell.rs-shoulder {
  background: #fff4cc;
  border-color: #f2d67b;
  color: #5f4b1d;
  font-weight: 700;
}
button.rs-cell.rs-none {
  opacity: 0.35;
  cursor: not-allowed;
}
button.rs-cell.rs-old {
  background: #f1f3f4;
  border-color: #e0e0e0;
  color: #8d98a1;
  opacity: 1;
  cursor: not-allowed;
}
button.rs-cell.rs-today {
  border: 2px solid #4cd964 !important;
  font-weight: 800;
}
button.rs-cell.rs-selected {
  border: 2px solid #0A89F9 !important;
  font-weight: 800;
}

.rs-slot-btn {
  width: auto;
  min-width: 64px;
  height: 34px;
  padding: 0 10px;
  margin: 4px 4px 0 0;
  font-size: 12px;
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--ui-hover-ms) var(--ui-hover-ease),
              color var(--ui-hover-ms) var(--ui-hover-ease),
              border-color var(--ui-hover-ms) var(--ui-hover-ease),
              opacity var(--ui-hover-ms) var(--ui-hover-ease),
              transform var(--ui-hover-ms) var(--ui-hover-ease);
}
.rs-slot-btn:hover {
  background: #bbdefb;
}
.rs-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.rs-month-nav button {
  width: auto;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  background: #607d8b;
}
.rs-month-nav button:disabled {
  background: #b0bec5;
  cursor: not-allowed;
  opacity: 0.8;
}
#rescheduleExamModal .modal-content {
  width: min(96vw, 460px);
  transition: width 260ms ease;
}
#rescheduleExamModal .modal-content.with-day-panel {
  width: min(96vw, 860px);
}
#rescheduleDurationGroup {
  width: fit-content;
  margin: 0 auto 14px auto !important;
  text-align: center;
}
#rescheduleDurationGroup .duration-stepper {
  justify-content: center;
}
.rs-layout {
  display: grid;
  grid-template-columns: 1fr 0fr;
  gap: 0;
  transition: grid-template-columns 260ms ease, gap 260ms ease;
}
.rs-layout.with-day-panel {
  grid-template-columns: minmax(320px, 1fr) minmax(300px, 0.95fr);
  gap: 12px;
}
.rs-month-col,
.rs-day-col {
  min-width: 0;
}
.rs-month-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rs-month-info {
  border: 1px solid #d8e7f7;
  background: #f8fbff;
  border-radius: 10px;
  padding: 10px;
}
.rs-month-info-title {
  font-size: 11px;
  color: #607d8b;
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rs-month-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
.rs-month-info-k {
  font-size: 11px;
  color: #78909c;
  margin-bottom: 2px;
}
.rs-month-info-v {
  font-size: 13px;
  color: #37474f;
  font-weight: 700;
}
.rs-ranges-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.rs-range-badge {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #d8e7f7;
  background: #fff;
  color: #455a64;
  font-size: 11px;
  line-height: 1.4;
  padding: 1px 7px;
}
.rs-range-badge.free {
  border-color: #9fd3a2;
  background: #e3f7e5;
  color: #255d2a;
}
.rs-range-badge.busy {
  border-color: #ef9a9a;
  background: #ffebee;
  color: #8a1c1c;
}
.rs-day-col {
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}
.rs-layout.with-day-panel .rs-day-col {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
#rescheduleSlotsSection {
  background: #f8fbff;
  border: 1px solid #d8e7f7;
  border-radius: 10px;
  padding: 10px;
  min-height: 248px;
}
#rescheduleDayCalendar {
  min-height: 360px;
}
#rescheduleDayCalendar .fc-view-harness,
#rescheduleDayCalendar .fc-scroller-harness,
#rescheduleDayCalendar .fc-scroller,
#rescheduleDayCalendar .fc-scrollgrid {
  border-radius: 10px !important;
  overflow: hidden !important;
}
#rescheduleDayCalendar .fc-bg-event {
  opacity: 1 !important;
  border: 0 !important;
}
#rescheduleDayCalendar .fc-timegrid-event.rs-preview-event {
  background: #b0bec5 !important;
  border-color: #78909c !important;
  color: #263238 !important;
  font-weight: 600;
  opacity: 1;
  z-index: 40 !important;
  box-shadow: inset 0 0 0 1px rgba(69, 90, 100, 0.35), 0 1px 2px rgba(0, 0, 0, 0.12);
}
#rescheduleDayCalendar .fc-timegrid-slot-label-cushion {
  color: #455a64;
  font-size: 12px;
  font-weight: 500;
}
#rescheduleDayCalendar .rs-time-label-hour {
  font-weight: 600;
}
#rescheduleDayCalendar .rs-time-label-half {
  font-weight: 500;
  opacity: 0.92;
}
#rescheduleDayCalendar .fc-bg-event.rs-bg-skeleton-green,
#rescheduleDayCalendar .fc-bg-event.rs-bg-skeleton-red {
  background-size: 220% 100% !important;
  animation: rsDaySkeleton 1.2s linear infinite;
}
#rescheduleDayCalendar .fc-bg-event.rs-bg-skeleton-green {
  background-image: linear-gradient(90deg, #d7f9df 20%, #c7f4d3 45%, #d7f9df 70%) !important;
}
#rescheduleDayCalendar .fc-bg-event.rs-bg-skeleton-red {
  background-image: linear-gradient(90deg, #ffd9d9 20%, #ffc7c7 45%, #ffd9d9 70%) !important;
}
@keyframes rsDaySkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
#rescheduleDayEmpty {
  font-size: 12px;
  color: #718096;
  margin-top: 8px;
  text-align: center;
}
.rs-time-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#adminContainer .action-bar .quick-add-btn {
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#adminContainer .action-bar .quick-add-btn .lucide {
  width: 18px;
  height: 18px;
}
body.modal-open {
  overflow: hidden;
  touch-action: none;
}
.modal-content.modal--sm { max-width: 420px; }
.modal-content.modal--md { max-width: 520px; }
.modal-content.modal--lg { max-width: 760px; }
.modal-content.modal--xl { max-width: 860px; }
@media (max-width: 1024px) {
  body {
    padding: 24px 16px;
  }
}
@media (max-width: 768px) {
  :root {
    --mobile-shell-gap: 12px;
  }
  body {
    padding: 14px 10px;
  }
  .container,
  #adminContainer {
    max-width: 100%;
  }
  #adminContainer .nav-bar {
    align-items: flex-start;
    gap: 10px;
  }
  #adminContainer .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(220px, 100%);
    margin-left: auto;
    gap: 8px;
  }
  #adminContainer .nav-actions .logout-btn {
    width: 100% !important;
    justify-content: center;
  }
  #doctorContainer .nav-bar,
  #patientContainer .nav-bar {
    align-items: flex-start;
    gap: 10px;
  }
  #doctorContainer .nav-actions,
  #patientContainer .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(220px, 100%);
    margin-left: auto;
    gap: 8px;
  }
  #doctorContainer .nav-actions .logout-btn,
  #patientContainer .nav-actions .logout-btn {
    width: 100% !important;
    justify-content: center;
  }
  #doctorContainer .nav-actions .nav-logout-btn,
  #patientContainer .nav-actions .nav-logout-btn {
    order: 1;
  }
  #doctorContainer .nav-actions .nav-pass-btn,
  #patientContainer .nav-actions .nav-pass-btn {
    order: 2;
  }
  #detailsModal .det-reset-pass-btn {
    display: flex;
    margin: 8px 0 0 0;
    margin-left: 0;
    width: fit-content;
  }
  #adminCalendarTabBtn,
  #doctorCalendarTabBtn,
  #adminCalendarView {
    display: none !important;
  }
  .modal, .details-modal {
    align-items: flex-end;
  }
  .modal-content, .details-content {
    width: 100%;
    max-width: 100% !important;
    max-height: calc(100dvh - env(safe-area-inset-top) - 4px);
    border-radius: 16px 16px 0 0;
    margin: 0;
  }
  .modal-header, .details-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 16px 16px 14px;
    padding-top: max(16px, env(safe-area-inset-top));
  }
  .modal-body, .details-body {
    padding: 14px 16px max(16px, env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  .close-modal {
    min-width: 44px;
    min-height: 44px;
    right: 10px;
    top: 8px;
  }
  .reg-grid-2,
  .reg-row-type,
  .rs-time-input-row {
    grid-template-columns: 1fr;
  }
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .timeline-value {
    text-align: left;
    color: #475569;
  }
  .exam-resource-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .exam-resource-row > * {
    min-width: 0;
  }
  .exam-resource-row .action-link {
    width: 100%;
    justify-content: flex-start;
  }
  .exam-resource-row .resource-main-btn {
    width: 100%;
    justify-content: space-between;
  }
  .doctor-assign-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }
  .doctor-assign-row.no-action {
    grid-template-columns: 1fr;
  }
  .doctor-assign-label {
    display: block;
    position: relative;
    padding-right: 18px;
    mask-image: linear-gradient(to right, #000 0%, #000 82%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 82%, transparent 100%);
  }
  .doctor-assign-meta-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
  }
  .doctor-assign-meta-row .resource-wrap,
  .doctor-assign-meta-row .resource-split,
  .doctor-assign-meta-row .resource-main-btn {
    width: 100%;
  }
  .doctor-assign-meta-row .resource-main-btn {
    justify-content: center;
  }
  .doctor-assign-meta-row .resource-caret-seg {
    display: none;
  }
  .exam-bottom-actions {
    grid-template-columns: 1fr !important;
  }
  .exam-bottom-actions .ready-desc-btn,
  .exam-bottom-actions .delete-btn,
  .exam-bottom-actions .logout-btn {
    width: 100%;
    justify-self: stretch !important;
  }
  .mobile-only {
    display: inline !important;
  }
  .mobile-hide {
    display: none !important;
  }
  #regModal .submit-cell {
    padding-top: 0;
  }
  #calendarRoot {
    max-width: 100%;
    padding: 6px 2px;
  }
  #calendarRoot:has(.fc-dayGridMonth-view) {
    padding: 6px 2px;
  }
  #calendarRoot .fc-header-toolbar {
    flex-wrap: wrap !important;
    gap: 8px;
    overflow-x: visible;
  }
  #calendarRoot .fc-header-toolbar .fc-toolbar-chunk {
    width: 100%;
    justify-content: center;
  }
  #calendarRoot .fc-header-toolbar .fc-toolbar-chunk:nth-child(2),
  #calendarRoot .fc-header-toolbar .fc-toolbar-chunk.fc-toolbar-chunk-center {
    grid-template-columns: 44px minmax(120px, 1fr) 44px;
  }
  #calendarRoot .fc-header-toolbar .fc-orbisCalPrev-button,
  #calendarRoot .fc-header-toolbar .fc-orbisCalNext-button,
  #calendarRoot .fc-header-toolbar .fc-orbisCalClose-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
  }
  #calendarRoot .fc-dayGridMonth-view .orbis-cal-week-open-btn {
    width: 44px !important;
    height: 44px !important;
    right: -22px !important;
    top: 8px !important;
  }
  #rescheduleExamModal .modal-content,
  #rescheduleExamModal .modal-content.with-day-panel {
    width: 100%;
  }
  .rs-layout.with-day-panel {
    grid-template-columns: 1fr;
    gap: var(--mobile-shell-gap);
  }
  #rescheduleExamModal.is-day-step .rs-month-col {
    display: none;
  }
  #rescheduleExamModal.is-day-step .rs-day-col {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .rs-mobile-back-btn {
    display: inline-flex !important;
    width: auto;
    margin: 0 0 8px 0;
    padding: 0 14px;
    height: 38px;
    background: #eceff1;
    color: #37474f;
    font-size: 12px;
  }
}
@media (max-width: 480px) {
  h1 {
    font-size: 21px;
  }
  #calendarRoot .fc-header-toolbar .fc-button {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
  #calendarRoot .fc-header-toolbar .fc-toolbar-title {
    max-width: min(62vw, 260px) !important;
    font-size: 12px !important;
  }
  .rs-slot-btn {
    min-width: 56px;
    height: 36px;
    font-size: 11px;
  }
}
