/* Clinical Blue: shared visual theme, independent of page behaviour. */
:root{--ink:#172b4d;--muted:#60738c;--primary:#2563eb;--primary-soft:#eaf2ff;--line:#e1eaf5;--paper:#f4f7fb;--theme-shadow:0 4px 20px rgba(32,71,122,.045)}
body{background:var(--paper);font-family:"Segoe UI",Arial,sans-serif;color:var(--ink)}
h1{font-size:30px;letter-spacing:-.8px;font-weight:700}h2{font-weight:650}h3{font-weight:650}
a:hover{color:#1d4ed8}
.sidebar{background:#f8fbff;border-right:1px solid #dae6f5;padding:30px 18px}
.brand{color:#172b4d;font-size:22px;gap:9px}.brand-light{font-weight:600}
.brand-icon{background:#2698ee;border-radius:11px;box-shadow:0 4px 12px #2698ee20;color:white}
.workspace{color:#637c9b;letter-spacing:1.35px;font-size:9px;margin:16px 0 34px}
.sidebar nav{gap:7px}.sidebar nav a{display:flex;align-items:center;gap:11px;padding:13px 14px;font-size:13px;font-weight:500;border-radius:9px;color:#425a79}
.sidebar nav a span{display:inline-flex;width:21px;height:21px;flex:none;align-items:center;justify-content:center}
.sidebar nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.sidebar nav a.active{background:#dfecff;color:#1d4ed8;font-weight:650}.sidebar nav a:hover{background:#eaf2ff;color:#1d4ed8}
.sidebar-bottom{color:#536c89;border-color:#dde8f6}.status-dot{background:#2698ee}
.topbar{background:#ffffff;border-bottom:1px solid var(--line);height:70px;color:#536b88}
.avatar{background:#e7f1ff;border:1px solid #d9e7fa;color:#2563eb;font-weight:700}
main{padding-top:30px}.page-heading{margin-bottom:24px}.eyebrow{color:#587aa6;letter-spacing:1.6px}
.panel,.stat{border:1px solid var(--line);border-radius:14px;box-shadow:var(--theme-shadow);background:#fff}
.stat strong{color:#1d4ed8;font-size:34px}.stat:hover{border-color:#bbd4f6}
.button{background:#2563eb;border-color:#2563eb;border-radius:8px;padding:11px 18px;box-shadow:0 3px 8px #2563eb13;font-size:12px}
.button:hover{background:#1d4ed8;border-color:#1d4ed8;color:white}.button.secondary{box-shadow:none;background:#fff;border-color:#dbe6f4;color:#29456b}.button.secondary:hover{background:#eff6ff;border-color:#b5cff3}
button:disabled{cursor:not-allowed;box-shadow:none}.button:disabled{opacity:.55}
input,select,textarea{border:1px solid #d7e4f3;border-radius:8px;background:#fff;padding:11px 13px;color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:2px solid #b5d2ff;border-color:#669cf0}
a:focus-visible,button:focus-visible{outline:3px solid #7aaff6;outline-offset:3px}
label{color:#29456b}th{background:#f5f9ff;color:#567090}td{border-color:#eaf0f8}
tbody tr:hover{background:#f8fbff}.search input{background:white}
.accent-panel,.login-story{background:#eaf3ff}.accent-panel h2,.login-story h1{color:#173b6e}
.badge{background:#e8f1ff;color:#245bb6;border-radius:6px}.badge.Completed{background:#eaf1f8;color:#4b6585}.badge.Cancelled,.badge.NoShow{background:#f1f3f6;color:#667085}
.calendar-filter{padding:20px 24px}.calendar-toolbar{padding:20px 22px}.calendar-toolbar h2{font-size:20px}
.calendar-panel{background:white}.calendar-day{border-color:#e7eef8}.calendar-day.outside{background:#f9fbfe;color:#8395ab}.calendar-day:hover{background:#f0f6ff}.calendar-day.selected{background:#edf5ff;box-shadow:inset 0 0 0 2px #a0c5fa}
.day-label{background:#f6faff;color:#536b88}.today .day-number{background:#2563eb}.calendar-event{background:#e2efff;color:#254f88}
.calendar-event.Cancelled,.calendar-event.NoShow{background:#f0f2f5;color:#667085}.calendar-event.Completed{background:#e9f0f8;color:#516d8e}
.calendar-legend{border-top:1px solid #edf2f9;background:#fcfdff}.legend-dot{background:#4588ec}.legend-dot.cancelled{background:#99a4b5}
.calendar-workspace .agenda-item{border:1px solid #e2eaf5;background:#fff;border-radius:10px;padding:15px 12px;margin-bottom:12px}
.calendar-workspace .agenda-item:hover{border-color:#b1cef4;background:#f8fbff}.calendar-workspace .agenda-item.is-selected{background:#edf5ff;border-color:#75a9f2;box-shadow:inset 0 0 0 1px #75a9f2}
.appointment-number{background:#e7f1ff;padding:2px 6px;border-radius:5px;font-size:11px}.day-agenda>header .eyebrow{font-size:10px}
.timeline-scroll{background:#fbfdff}.timeline-hour:after{border-top-color:#dce7f5;border-bottom-color:#e8f0fa}
.timeline-event{border:1px solid #cce0fa;border-left:4px solid #3694f6;border-radius:7px;background:#e3f0ff;color:#173b6e}
.timeline-event.Completed{background:#eaf1f8;border-color:#adc0d8}.timeline-event.Cancelled,.timeline-event.NoShow{background:#f0f2f6;border-color:#bdc7d4;color:#5f6f84}
.timeline-event[aria-pressed="true"]{background:#dbeafe;box-shadow:inset 0 0 0 2px #2563eb}
.reservation-block.free{background:#f6faff;border-color:#e1edfc;border-left-color:#93bff8}.reservation-block.free:hover{background:#e8f2ff}.reservation-block.chosen{background:#dbeafe;border-color:#2563eb}
.reservation-block.busy,.booking-slot.busy{background:#fff0f0;border-color:#efc9c9;color:#a43838}
.booking-selection{background:#eaf3ff;border:1px solid #d7e8ff;border-radius:9px;color:#214c88}
.record-dialog{border-radius:16px;border-color:#dbe7f7;box-shadow:0 24px 90px #16335e30}.record-dialog::backdrop{background:#17345166}
.notice.success{background:#e9f3ff;color:#21568c;border:1px solid #cce1fb}.notice.error{border:1px solid #efd3c8}
.reminder{border-color:#c6dcf8;border-left-color:#2563eb;border-radius:12px;box-shadow:0 8px 30px #1b46721a}
.login-grid{border-radius:18px;border-color:#dbe7f7;box-shadow:0 15px 55px #264f7e0d}
.flatpickr-calendar{border-color:#dbe7f7;border-radius:12px}.flatpickr-day.selected,.flatpickr-day.selected:hover{background:#2563eb;border-color:#2563eb}
.month-scroll,.timeline-scroll,.agenda-scroll,.reservation-timeline{scrollbar-color:#b8cce5 #f5f9ff;scrollbar-width:thin}
@media(max-width:1150px){.sidebar{padding:26px 14px}.brand{font-size:19px}.sidebar nav a{padding:12px 9px;gap:8px;font-size:12px}}
@media(max-width:780px){.sidebar{padding:15px}.sidebar nav a{padding:9px 8px;font-size:11px;gap:5px}.sidebar nav a span{display:none}.topbar{height:58px}.calendar-toolbar{padding:12px}.calendar-toolbar h2{font-size:17px}.calendar-filter{padding:18px}main{padding-top:24px}.page-heading{gap:14px}h1{font-size:27px}}
.eyebrow.dashboard-date{font-size:16px;line-height:1.5;letter-spacing:.3px;font-weight:600;margin-bottom:10px}
.calendar-toolbar.calendar-date-navigation{justify-content:flex-start;gap:12px;flex-wrap:wrap}.calendar-date-navigation h2{text-align:center;min-width:140px;font-size:17px}.calendar-date-navigation>.button:last-child{margin-left:auto}
.calendar-toolbar.calendar-date-navigation{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px}
.calendar-date-controls{display:flex;align-items:center;gap:12px}
.calendar-month-control{justify-self:center}
.calendar-date-navigation>.button:last-child{justify-self:end;margin-left:0}
@media(max-width:1150px){.calendar-toolbar.calendar-date-navigation{grid-template-columns:1fr auto}.calendar-date-controls{gap:6px}.calendar-month-control{grid-column:1/-1;grid-row:2}.calendar-date-navigation>.button:last-child{grid-column:2;grid-row:1}.calendar-date-navigation h2{min-width:110px}}
/* Weekly planner: one shared scroll surface keeps day headers and times aligned. */
.week-toolbar{flex-wrap:wrap;gap:12px}.week-toolbar .button-group{flex-wrap:wrap}.week-toolbar strong{font-size:13px}
.calendar-jump{display:flex;align-items:center;gap:10px;padding:0 20px 14px;flex-shrink:0}.calendar-jump label{margin:0}.calendar-jump input{width:145px;margin:0;padding:6px 10px}
.week-scroll{overflow:auto;min-height:0;flex:1;overscroll-behavior:contain;scrollbar-gutter:stable}.week-canvas{min-width:820px}
.week-head{display:grid;grid-template-columns:48px repeat(7,minmax(0,1fr));position:sticky;top:0;z-index:4;background:#fff;border-bottom:1px solid var(--line)}
.week-day-heading{border:0;border-left:1px solid var(--line);padding:12px 3px;background:#f5f9ff;color:var(--ink);font-size:11px;cursor:pointer}
.week-day-heading[aria-pressed="true"]{box-shadow:inset 0 -3px var(--primary);font-weight:700}
.week-body{display:grid;grid-template-columns:48px repeat(7,minmax(0,1fr))}
.week-times{position:relative;background:#fff}.week-times span{position:absolute;right:6px;font-size:10px;color:var(--muted)}
.day-timeline.week-column{position:relative;margin:0;min-width:0;height:100%;border-left:1px solid var(--line);background:repeating-linear-gradient(to bottom,transparent 0,transparent 59px,#eaf0f8 59px,#eaf0f8 60px,transparent 60px,transparent 119px,#dce7f5 119px,#dce7f5 120px)}
.week-column .timeline-events{left:3px;right:0}.week-column .timeline-event{padding:2px 3px;font-size:10px;line-height:13px;border-left-width:3px}.week-column .timeline-event small{font-size:9px}
.week-day-heading.is-today,.week-column.is-today{background-color:#fff5d4}.week-day-heading.is-sunday,.week-column.is-sunday{background-color:#f0f2f5}
.agenda-item[hidden],#agenda-empty[hidden]{display:none!important}
@media(max-width:780px){.week-toolbar{padding:12px}.calendar-jump{padding:0 12px 12px}.week-canvas{min-width:780px}}
.patient-create-link{padding:0;color:var(--primary);font-size:inherit;text-decoration:underline}.record-dialog .flatpickr-calendar{z-index:1}
.user-profile{display:flex;flex-direction:column;line-height:1.4}.user-profile>a{font-weight:600}.user-profile small{font-size:11px;color:var(--muted)}.user-actions{display:flex;flex-direction:column;align-items:flex-end;gap:3px}.user-actions .link-button{font-size:11px}.medic-stats{grid-template-columns:repeat(2,1fr)}#user-doctor-field[hidden]{display:none}
.account-settings{position:relative;display:flex;align-items:center}
.settings-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:8px;border:1px solid #d7e4f3;border-radius:9px;background:#fff;color:#29456b;cursor:pointer}
.settings-toggle:hover,.settings-toggle[aria-expanded="true"]{background:#eff6ff;border-color:#b5cff3;color:#2563eb}
.settings-toggle svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.settings-dropdown{position:absolute;right:0;top:calc(100% + 9px);z-index:100;width:180px;padding:6px;background:#fff;border:1px solid #d7e4f3;border-radius:10px;box-shadow:0 8px 28px #16335e20}
.settings-dropdown[hidden]{display:none}.settings-dropdown form{margin:0}
.settings-item{display:block;width:100%;padding:11px 13px;border:0;border-radius:6px;background:transparent;text-align:left;font:inherit;font-size:13px;color:#29456b;cursor:pointer}
.settings-item:hover{background:#eff6ff;color:#2563eb}
.patient-name-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
@media(max-width:780px){.patient-name-fields{grid-template-columns:1fr}}
