.doctor-master-page .span-2 {
  grid-column: 1 / -1;
}

.doctor-master-page [hidden] {
  display: none !important;
}

.doctor-master-page .doctor-master-form {
  width: 100%;
  max-width: 1200px;
}

.doctor-identity {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.doctor-identity-photo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #fff;
}

.doctor-identity-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-identity-photo.has-photo {
  background: #eff6ff;
}

.doctor-identity-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.doctor-identity-copy strong {
  color: #0f172a;
  font-size: 15px;
}

.doctor-identity-copy span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.doctor-identity-mobile {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.doctor-identity-badge {
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  white-space: nowrap;
}

.doctor-identity-badge.is-inactive {
  background: #f1f5f9;
  color: #64748b;
}

.doctor-tabs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.doctor-tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  position: relative;
}

.doctor-tab:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.doctor-tab.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #dbeafe;
}

.doctor-tab.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: #2563eb;
  border-radius: 2px;
}

.doctor-tab.is-disabled,
.doctor-tab[aria-disabled="true"] {
  color: #94a3b8;
  cursor: not-allowed;
}

.doctor-tab.is-disabled:hover,
.doctor-tab[aria-disabled="true"]:hover {
  background: transparent;
  color: #94a3b8;
}

.doctor-tab:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.doctor-tabs-hint {
  grid-column: 1 / -1;
  margin: 0;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #b45309;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
}

.doctor-tab-panels {
  grid-column: 1 / -1;
  min-width: 0;
}

.doctor-tab-panel {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.doctor-tab-panel.is-active {
  display: grid;
}

.doctor-tab-panel[data-panel="online"].is-active {
  grid-template-columns: minmax(0, 1fr);
}

.doctor-tab-panel > .online-schedule-panel {
  grid-column: 1 / -1;
  width: 100%;
}

.doctor-tab-panel:focus {
  outline: none;
}

.doctor-tab-panel.doctor-availability-panel.is-active {
  grid-template-columns: minmax(0, 1fr);
}

.master-actions[hidden] {
  display: none;
}

.availability-card {
  display: grid;
  gap: 14px;
  max-width: 900px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.availability-copy h4 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 15px;
}

.availability-copy p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.availability-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.availability-hour-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
}

.availability-hour-chip.is-empty {
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}

.availability-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.availability-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.availability-note {
  margin: 0;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #b45309;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
}

.doctor-master-form input[type="number"] {
  text-align: right;
}

.doctor-master-form input[type="time"] {
  min-height: 42px;
}

.doctor-master-form .master-message {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #991b1b;
  font-weight: 600;
  padding: 10px 12px;
}

.doctor-grid-photo {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #fff;
}

.doctor-grid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-photo-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.doctor-photo-preview {
  width: 112px;
  height: 112px;
  border: 1px solid #bfdbfe;
  border-radius: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #fff;
  box-shadow: inset 0 -18px 36px rgba(15, 23, 42, 0.18);
}

.doctor-photo-preview i {
  font-size: 34px;
}

.doctor-photo-preview span {
  margin-top: -18px;
  font-size: 12px;
  font-weight: 900;
}

.doctor-photo-preview.has-photo {
  background: #eff6ff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.doctor-photo-preview img,
.doctor-camera-panel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-photo-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.doctor-photo-copy strong {
  color: #0f172a;
  font-size: 15px;
}

.doctor-photo-copy > span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.doctor-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doctor-photo-actions .danger {
  color: #b91c1c;
}

.doctor-camera-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 14px;
  background: #eff6ff;
}

.doctor-camera-panel[hidden] {
  display: none;
}

.doctor-camera-panel video {
  width: 220px;
  height: 220px;
  border-radius: 18px;
  background: #0f172a;
}

@media (max-width: 720px) {
  .doctor-photo-panel,
  .doctor-camera-panel {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .doctor-photo-preview,
  .doctor-camera-panel video {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1;
  }

  .doctor-photo-actions > * {
    flex: 1 1 150px;
  }
}

.online-schedule-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.doctor-tab-panel .online-schedule-panel {
  margin-top: 0;
}

.online-schedule-panel[hidden],
.online-schedule-message[hidden],
.online-schedule-hint[hidden] {
  display: none !important;
}

.online-schedule-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.online-schedule-copy h4 {
  margin: 0 0 4px;
  color: #0f172a;
  font-size: 15px;
}

.online-schedule-copy p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.online-schedule-status {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  white-space: nowrap;
}

.online-schedule-message {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #991b1b;
  font-weight: 600;
  padding: 10px 12px;
}

.online-schedule-days {
  display: grid;
  gap: 10px;
}

.online-schedule-days.is-locked .online-day {
  opacity: 0.7;
}

.online-day {
  display: grid;
  grid-template-columns: 170px 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.online-day.is-off {
  background: #f8fafc;
}

.online-day-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
}

.online-day-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.online-schedule-panel .online-day-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.online-day.is-off .online-day-toggle span {
  color: #94a3b8;
}

.online-day-badge {
  justify-self: start;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  white-space: nowrap;
}

.online-day.is-off .online-day-badge {
  background: #e2e8f0;
  color: #475569;
}

.online-day-ranges {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}

.online-range-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.online-day-note {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.online-day.is-off .online-range-wrap {
  opacity: 0.65;
}

.online-range-wrap,
.online-range-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.online-range-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.online-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.online-range input[type="time"] {
  width: 122px;
  min-height: 38px;
}

.online-range-sep {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.online-range-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.online-day .online-remove-range {
  color: #b91c1c;
}

.online-schedule-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.online-schedule-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.online-schedule-hint {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .doctor-tab-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .doctor-tab-panel {
    grid-template-columns: 1fr;
  }

  .doctor-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 10px 8px;
  }

  .doctor-identity {
    flex-wrap: wrap;
  }

  .online-day {
    grid-template-columns: 1fr;
  }

  .online-range input[type="time"] {
    width: 100%;
  }
}
.doctor-working-days { min-width:0; margin:0 0 12px; border:1px solid #dbe6f5; border-radius:12px; padding:16px; background:#f8fbff; }
.doctor-working-days legend { float:none; width:auto; padding:0 6px; font-size:16px; font-weight:700; color:#243e63; }
.doctor-working-days p { color:#64748b; font-size:13px; line-height:1.6; margin:0 0 12px; }
.doctor-weekday-options { display:flex; flex-wrap:wrap; gap:10px; }
.doctor-master-page .doctor-weekday-options label { display:flex; flex-direction:row; align-items:center; gap:8px; padding:10px 12px; background:#fff; border:1px solid #dbe6f5; border-radius:8px; cursor:pointer; }
.doctor-master-page .doctor-weekday-options input { width:17px; height:17px; accent-color:#2563eb; }
.doctor-weekday-options label:has(input:checked) { background:#edf4ff; border-color:#a8c8fb; color:#245dbb; }
