:root {
  color-scheme: light;
  --ink: #213a35;
  --muted: #6d827b;
  --line: #e2ebe7;
  --surface: #ffffff;
  --canvas: #f5faf8;
  --brand: #23766c;
  --brand-dark: #17594f;
  --blue: #315f83;
  --sage: #eaf4ef;
  --coral: #966149;
  --shadow: 0 20px 55px rgba(41, 75, 62, .07);
  font-family: 'DM Sans', 'Be Vietnam Pro', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.55; }
button, input, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.admin-nav { height: 76px; padding: 0 clamp(20px, 5vw, 76px); background: rgba(255,255,255,.88); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { display: block; }
.brand strong { display: block; font-size: 14px; letter-spacing: -.035em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.back-link { color: var(--muted); text-decoration: none; font-size: 12px; }
.back-link:hover { color: var(--brand-dark); }
.admin-main { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 62px 0 90px; }
.admin-heading { margin: 0 0 34px; }
.eyebrow, .panel-kicker { margin: 0; color: var(--brand); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow-mark { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6ba88e; box-shadow: 0 0 0 4px #e5f1ea; }
h1, h2, p { margin-top: 0; }
h1 { margin: 16px 0 8px; font-family: 'Newsreader', Georgia, serif; font-size: clamp(42px, 6vw, 60px); line-height: .98; font-weight: 400; letter-spacing: -.04em; }
h1 em { color: var(--brand); font-weight: 400; }
.intro { margin: 0; color: var(--muted); font-size: 14px; }
.auth-panel, .dashboard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.auth-panel { display: flex; align-items: center; gap: 28px; max-width: 720px; padding: 32px; }
.lock-illustration { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--sage); color: var(--brand); font-family: Georgia, serif; font-size: 38px; }
.auth-copy { max-width: 455px; }
.auth-copy h2 { margin: 5px 0 7px; font-family: 'Newsreader', Georgia, serif; font-size: 30px; font-weight: 400; }
.auth-copy > p:not(.panel-kicker):not(.feedback) { max-width: 430px; margin-bottom: 20px; color: var(--muted); }
.login-form { display: grid; gap: 8px; max-width: 360px; }
.auth-label { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.auth-input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.auth-input:focus-visible { outline: 3px solid rgba(35,118,108,.24); outline-offset: 2px; }
.login-form .button { justify-self: start; margin-top: 9px; }
.button { min-height: 40px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; transition: color .15s, background .15s, border-color .15s, transform .15s; }
.button:hover:not(:disabled) { border-color: #acc8bd; color: var(--brand-dark); transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, .icon-button:focus-visible, .slot-choice:focus-visible { outline: 3px solid rgba(35,118,108,.24); outline-offset: 2px; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.button-primary { border-color: var(--brand); background: var(--brand); color: #fff; font-weight: 700; }
.button-primary:hover:not(:disabled) { border-color: var(--brand-dark); background: var(--brand-dark); color: white; }
.button-primary span { padding-left: 5px; }
.button-quiet { color: #48625a; background: #fff; }
.feedback { min-height: 20px; margin: 8px 0 0; color: #a44338; font-size: 12px; }
.feedback.is-success { color: var(--brand-dark); }
.dashboard { padding: 24px; }
.dashboard-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 3px 0 20px; border-bottom: 1px solid var(--line); }
.dashboard-bar strong { display: block; margin-top: 4px; font-size: 14px; }
.account-detail { display: block; color: var(--muted); font-size: 11px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 22px 0; }
.summary-card { min-height: 86px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fcfefd; }
.summary-card span { display: block; color: var(--muted); font-size: 11px; }
.summary-card strong { display: block; margin-top: 5px; color: var(--ink); font-size: 24px; line-height: 1; font-weight: 600; }
.summary-pending { border-top: 3px solid #c89349; }
.summary-confirmed { border-top: 3px solid #5e9b7d; }
.summary-completed { border-top: 3px solid #668baa; }
.summary-cancelled { border-top: 3px solid #c08b7c; }
.filters { display: grid; grid-template-columns: 170px 175px minmax(200px, 1fr) auto; gap: 12px; align-items: end; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.filter-field { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 600; }
.filter-field input, .filter-field select { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 17px 0 10px; }
.list-heading h2 { margin: 0; font-family: 'Newsreader', Georgia, serif; font-size: 26px; font-weight: 400; }
.list-heading p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.list-heading .button { white-space: nowrap; }
.dashboard-feedback { min-height: 0; }
.dashboard-feedback:not(:empty) { margin: 6px 0 10px; }
.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; min-width: 880px; border-collapse: collapse; text-align: left; }
th { padding: 12px 13px; background: #f7faf8; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
td { padding: 13px; border-top: 1px solid var(--line); vertical-align: top; font-size: 12px; }
tbody tr:first-child td { border-top: 0; }
.patient-name { display: block; color: var(--ink); font-weight: 700; }
.patient-phone { display: inline-block; margin-top: 3px; color: #4a7063; font-size: 11px; text-decoration: none; }
.consultant-name { display: block; font-weight: 600; }
.consultant-focus { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.date-primary { display: block; white-space: nowrap; font-weight: 600; }
.date-secondary, .placed-time { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.status-badge { display: inline-block; padding: 4px 8px; border: 1px solid transparent; border-radius: 99px; white-space: nowrap; font-size: 10px; font-weight: 700; }
.status-pending { border-color: #f0dfbf; background: #fbf5e8; color: #795b24; }
.status-confirmed { border-color: #cae5d7; background: #eef7f1; color: #286b4d; }
.status-cancelled { border-color: #ead4cf; background: #fbf1ef; color: #875143; }
.status-completed { border-color: #d5e2eb; background: #f0f5f9; color: #45677f; }
.action-cell { display: flex; flex-wrap: wrap; gap: 5px; min-width: 165px; }
.action-button { min-height: 31px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #466259; cursor: pointer; font-size: 10px; white-space: nowrap; }
.action-button:hover { border-color: #a8c5b9; background: #f5faf7; }
.action-confirm { border-color: #cce5d8; color: #246447; }
.action-cancel { color: #91574a; }
.action-button:focus-visible { outline: 3px solid rgba(35,118,108,.24); outline-offset: 2px; }
.table-empty { padding: 28px 16px; color: var(--muted); text-align: center; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; color: var(--muted); font-size: 11px; }
.pagination > div { display: flex; gap: 7px; }
.pagination .button { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.privacy-note { display: flex; gap: 9px; align-items: flex-start; margin: 24px 0 0; padding: 13px 15px; border-radius: 9px; background: #f5faf7; color: var(--muted); font-size: 11px; }
.privacy-note span { color: var(--brand); }
.reschedule-dialog { width: min(540px, calc(100% - 30px)); max-height: min(88vh, 760px); padding: 24px; overflow-y: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px rgba(20,45,37,.2); }
.reschedule-dialog::backdrop { background: rgba(20,45,37,.3); backdrop-filter: blur(2px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.dialog-heading h2 { margin: 3px 0 0; font-family: 'Newsreader', Georgia, serif; font-size: 30px; font-weight: 400; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; }
.dialog-patient { margin: 12px 0 18px; color: var(--muted); font-size: 12px; }
.reschedule-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slot-title { margin: 20px 0 10px; }
.reschedule-slots { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.slot-choice { min-height: 48px; padding: 7px 5px; border: 1px solid #d7e8de; border-radius: 8px; background: #f6fbf8; color: #28664d; cursor: pointer; font-size: 11px; font-weight: 700; }
.slot-choice small { display: block; margin-top: 2px; color: #73887f; font-size: 9px; font-weight: 500; }
.slot-choice[aria-pressed="true"] { border-color: var(--brand); background: #e7f4ed; box-shadow: inset 0 0 0 1px var(--brand); }
.slot-choice:disabled { border-color: #ebeeeb; background: #f5f6f5; color: #9da7a2; cursor: not-allowed; }
.slot-choice:disabled small { color: #a7aeaa; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 10; background: rgba(20,45,37,.3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Team administration and editable weekly booking slots. */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 17px 0 20px; border-bottom: 1px solid var(--line); }
.admin-tab { min-height: 39px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #526b63; cursor: pointer; font-weight: 600; }
.admin-tab:hover { border-color: #acc8bd; color: var(--brand-dark); }
.admin-tab.is-active { border-color: var(--brand); background: var(--brand); color: #fff; }
.admin-tab:focus-visible { outline: 3px solid rgba(35,118,108,.24); outline-offset: 2px; }
.admin-view { padding-top: 8px; }
.management-heading { align-items: center; margin: 2px 0 10px; }
.management-heading h2 { margin-bottom: 2px; }
.management-card { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.management-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.management-card-heading h3 { margin: 3px 0 0; font-family: 'Newsreader', Georgia, serif; font-size: 25px; font-weight: 400; }
.management-help { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.consultant-list { display: grid; gap: 9px; }
.consultant-manage-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fcfefd; }
.consultant-manage-copy { display: grid; gap: 2px; min-width: 0; }
.consultant-manage-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.consultant-manage-title strong { font-size: 15px; }
.team-state { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.team-state.is-on { background: #eaf5ee; color: #286b4d; }
.team-state.is-off { background: #f5eeee; color: #875143; }
.consultant-manage-copy .account-detail { font-size: 12px; overflow-wrap: anywhere; }
.manager-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.manager-form .auth-input { min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 14px; }
.manager-form textarea.auth-input { resize: vertical; min-height: 82px; }
.manager-form-wide { grid-column: 1 / -1; }
.manager-form button { justify-self: start; }
.schedule-person-field { max-width: 420px; margin: 0 0 16px; }
.weekly-schedule { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.schedule-day { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fcfefd; }
.schedule-day-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.schedule-day-heading h4 { margin: 0; font-size: 15px; }
.schedule-day-heading span { color: var(--muted); font-size: 11px; }
.schedule-slots { display: flex; flex-wrap: wrap; gap: 7px; min-height: 34px; }
.schedule-slot { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 5px 9px; border: 1px solid #cae2d4; border-radius: 8px; background: #f0f8f3; color: #286b4d; cursor: pointer; font-size: 13px; font-weight: 700; }
.schedule-slot input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand); }
.schedule-slot.is-disabled { border-color: #e5e9e6; background: #f5f6f5; color: #79867f; }
.schedule-empty { align-self: center; color: var(--muted); font-size: 12px; }
.schedule-add-row { display: flex; align-items: end; gap: 8px; margin-top: 13px; }
.schedule-add-row .filter-field { flex: 0 1 160px; }
.schedule-add-row .auth-input { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.schedule-add-row .button { min-height: 38px; }
.schedule-save-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.provider-status { margin: 0 0 12px; padding: 9px 11px; border: 1px solid #eddcb8; border-radius: 8px; background: #fcf7eb; color: #785d2d; font-size: 13px; }
.smtp-settings-form { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.smtp-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.smtp-credential-status { margin-bottom: 0; }
.smtp-setup-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.email-settings-form { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
.smtp-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.smtp-provider-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fcfefd; }
.smtp-provider-card .management-card-heading { align-items: flex-start; }
.smtp-provider-card .management-card-heading h3 { font-size: 22px; }
.smtp-provider-card .smtp-settings-form { max-width: none; margin-top: 12px; padding-top: 13px; }
.smtp-inline-status { flex: 0 0 auto; margin: 0; padding: 5px 8px; font-size: 11px; }
.smtp-overall-status { margin-top: 16px; }
.smtp-provider-card code { overflow-wrap: anywhere; }

@media (max-width: 780px) {
  .management-card { padding: 16px; }
  .weekly-schedule { grid-template-columns: 1fr; }
  .smtp-provider-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .admin-tabs { gap: 6px; }
  .admin-tab { padding: 8px 11px; font-size: 12px; }
  .management-card { padding: 13px; }
  .consultant-manage-row { align-items: flex-start; flex-direction: column; }
  .manager-form { grid-template-columns: 1fr; }
  .manager-form-wide { grid-column: auto; }
  .schedule-day { padding: 11px; }
  .schedule-add-row { align-items: end; }
}

/* Improve supporting copy and record readability while preserving all display-heading sizes. */
body { font-size: 16px; }
.intro, .auth-copy > p:not(.panel-kicker):not(.feedback), .table-empty, .dialog-patient { font-size: 15px; }
.auth-label, .account-detail, .filter-field, .pagination, .privacy-note { font-size: 13px; }
.filter-field input, .filter-field select { font-size: 14px; }
.dashboard-bar strong { font-size: 15px; }
.summary-card span, .list-heading p { font-size: 13px; }
th { font-size: 11px; }
td { font-size: 14px; }
.patient-phone { font-size: 13px; }
.consultant-focus, .date-secondary, .placed-time, .status-badge, .action-button { font-size: 12px; }
.feedback { font-size: 13px; }
.pagination .button { font-size: 12px; }
.slot-choice { font-size: 13px; }
.slot-choice small { font-size: 11px; }
@media (max-width: 780px) {
  .admin-main { width: min(100% - 32px, 600px); padding-top: 43px; }
  .admin-nav { height: 67px; padding: 0 16px; }
  .dashboard { padding: 17px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; padding: 16px 0; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  #clear-filters { grid-column: 1 / -1; }
  .auth-panel { align-items: flex-start; padding: 23px; gap: 17px; }
  .lock-illustration { flex-basis: 51px; width: 51px; height: 51px; font-size: 28px; }
}
@media (max-width: 480px) {
  .admin-main { width: calc(100% - 24px); padding-top: 34px; }
  .admin-nav { padding: 0 12px; }
  .brand { gap: 6px; }
  .brand img { width: 30px; height: 30px; }
  .brand strong { font-size: 12px; }
  .back-link { font-size: 10px; }
  h1 { font-size: 43px; }
  .auth-panel { display: block; }
  .lock-illustration { margin-bottom: 14px; }
  .dashboard { padding: 13px; }
  .dashboard-bar { align-items: flex-start; }
  .filters { grid-template-columns: 1fr; }
  .search-field, #clear-filters { grid-column: auto; }
  .list-heading h2 { font-size: 23px; }
  .reschedule-fields { grid-template-columns: 1fr; }
  .reschedule-slots { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
