/* Geist-inspired presentation layer. Existing visibility and permission rules remain intact. */
@font-face { font-family:Geist; src:url('/static/fonts/Geist-Variable.woff2') format('woff2'); font-style:normal; font-weight:100 900; font-display:swap; }
@font-face { font-family:'Geist Mono'; src:url('/static/fonts/GeistMono-Variable.woff2') format('woff2'); font-style:normal; font-weight:100 900; font-display:swap; }
:root { --ink:#171717; --muted:#666; --line:#e5e5e5; --line-strong:#d4d4d4; --blue:#171717; --blue-dark:#383838; --pale:#f5f5f5; --mint:#edf9f0; --surface:#fff; --canvas:#fafafa; --shadow-sm:none; --shadow-md:0 8px 24px #00000008; }
html,body { background:var(--canvas); }
body { font-family:Geist,system-ui,sans-serif; font-size:14px; line-height:1.5; -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font-family:inherit; }
button { transition:background-color .15s,border-color .15s; }
button:disabled { cursor:not-allowed; opacity:.5; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:2px solid #0070f3; outline-offset:3px; }
.shell { max-width:1480px; padding:0 32px 40px; }
.topbar { position:relative; display:grid; grid-template-columns:1fr; gap:0; padding:24px 0 0; margin-bottom:32px; border:0; border-bottom:1px solid var(--line); border-radius:0; background:transparent; box-shadow:none; }
.brand { min-width:0; min-height:48px; padding-right:340px; }
.brand-mark { width:36px; height:36px; border-radius:8px; background:#171717; box-shadow:none; font-size:18px; }
.brand h1 { max-width:none; font-size:18px; line-height:1.3; font-weight:600; letter-spacing:-.04em; }
.eyebrow { color:var(--muted); font-size:10px; font-weight:600; letter-spacing:.09em; }
.topbar-actions { display:block; width:100%; min-width:0; margin-top:20px; }
.account-box { position:absolute; top:20px; right:0; min-width:0; max-width:330px; padding:4px 0 4px 12px; border:0; background:transparent; gap:16px; }
.account-box strong { max-width:220px; font-size:13px; font-weight:550; }
.account-box span { font-size:11px; }
.account-box .institution-clock { font-family:'Geist Mono',monospace; font-size:10px; font-weight:400; color:var(--muted); }
.account-logout { background:#fff; border:1px solid var(--line); color:#525252; border-radius:6px; font-size:12px; font-weight:500; padding:7px 12px; }
.nav { justify-content:flex-start; width:100%; gap:22px; padding:0; border:0; border-radius:0; background:transparent; overflow-x:auto; }
.nav button { min-height:46px; padding:12px 2px; flex:none; border:0; border-bottom:2px solid transparent; border-radius:0; color:#666; font-size:13px; font-weight:500; line-height:1.5; white-space:nowrap; }
.nav button:hover { color:#171717; background:transparent; }
.nav button.active { color:#171717; background:transparent; box-shadow:none; border-bottom-color:#171717; }
.view > .admin-head,.calendar-page-head,.referrals-head { margin:0 0 24px; gap:16px; }
.calendar-page-head h2,.admin-head h2,.referrals-head h2 { font-size:26px; line-height:1.25; font-weight:600; letter-spacing:-.045em; }
.calendar-page-head p,.admin-head p,.referrals-head p { font-size:14px; line-height:1.6; margin-top:7px; }
h3 { font-size:16px; font-weight:600; letter-spacing:-.02em; }
.panel,.panel-lite,.side,.chat,.channel-card,.qr-panel,.referral-card,.calendar-stat { background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:none; }
.panel,.side,.channel-card,.qr-panel { padding:24px; }
.primary,.send { min-height:40px; padding:10px 16px; border-radius:6px; background:#171717; box-shadow:0 1px 2px #0000000d; font-size:13px; font-weight:550; }
.primary:hover,.send:hover { background:#383838; }
label,.field > label,.account-edit-grid label { color:#404040; font-size:13px; font-weight:500; }
input:not([type=checkbox]):not([type=radio]),select,textarea { min-height:40px; padding:10px 12px; border-color:#d4d4d4; border-radius:6px; background:#fff; font-size:14px; line-height:1.5; }
input:focus,select:focus,textarea:focus { border-color:#0070f3; box-shadow:0 0 0 3px #0070f318; }
input::placeholder,textarea::placeholder { color:#8f8f8f; }
textarea { min-height:100px; }
.form-grid { gap:22px; }
.field { gap:8px; min-width:0; }
.section-label { margin-top:12px; padding:8px 0 12px; color:#171717; font-size:14px; font-weight:600; text-transform:none; letter-spacing:-.01em; }
.hint,.muted,.channel-state,.user-intro { font-size:12px; color:#666; line-height:1.6; }
.editor-row,.account-edit-form,.user-row { background:#fafafa; border-color:var(--line); border-radius:8px; padding:18px; }
.editor-row-grid { gap:16px; }
.actions { flex-wrap:wrap; gap:12px; padding-top:4px; }
.user-admin-grid { gap:24px; }
.user-row h4 { font-size:14px; font-weight:600; }
.user-row p { font-size:12px; color:#666; overflow-wrap:anywhere; }
.user-actions { flex-wrap:wrap; }
.user-actions button { min-height:34px; font-size:12px; font-weight:500; border-radius:6px; }
.user-edit { padding:7px 12px; color:#171717; background:#fff; border:1px solid #d4d4d4; }
.account-edit-grid { gap:18px; }
.current-user-label { font-size:10px; color:#0064c9; background:#edf6ff; }
.auth-gate { background:#fafafa; }
.auth-card { border-color:var(--line); border-radius:12px; padding:32px; box-shadow:0 4px 24px #00000006; }
.chat-layout { grid-template-columns:260px minmax(0,1fr); gap:24px; }
.chat { min-height:calc(100vh - 200px); }
.chat-head { padding:18px 24px; }
.avatar,.recipient-avatar,.channel-icon { background:#f5f5f5; color:#404040; border:1px solid var(--line); border-radius:8px; }
.side-copy { font-size:13px; color:#666; }
.status { border:1px solid #c9e9d1; border-radius:6px; }
.quick .chip { padding:12px; border-radius:6px; font-size:13px; }
.chip:hover { background:#fafafa; border-color:#a3a3a3; }
.messages { padding:28px; }
.message { font-size:14px; line-height:1.7; max-width:78%; border-radius:10px; }
.message.agent { background:#f5f5f5; }
.message.user { background:#171717; }
.composer { padding:18px 24px; background:#fff; }
.composer textarea { min-height:52px; }
.demo,.badge,.qr-state { font-size:11px; font-weight:550; }
.qr-head p,.qr-copy { font-size:14px; line-height:1.7; }
.qr-layout { grid-template-columns:200px minmax(0,1fr); gap:32px; }
.qr-preview { width:200px; height:200px; border-color:#d4d4d4; border-radius:8px; font-size:12px; }
.qr-preview img { width:168px; height:168px; }
#view-calendar { --calendar-blue:#171717; --calendar-ink:#171717; --calendar-muted:#666; --calendar-line:#e5e5e5; }
.calendar-settings { padding:20px 24px; margin-bottom:20px; gap:24px; background:#fff; border:1px solid var(--line); border-radius:8px; }
.calendar-settings h3 { font-size:16px; }
.calendar-settings p { font-size:13px; margin-top:5px; color:#666; }
.calendar-settings form { grid-template-columns:160px auto; }
.calendar-settings select { width:160px; }
.calendar-stats { gap:16px; margin-bottom:20px; }
.calendar-stat { padding:20px; min-height:96px; }
.stat-icon { width:36px; height:36px; border-radius:8px; font-size:17px; }
.stat-copy strong { font-family:'Geist Mono',monospace; font-size:25px; font-weight:500; letter-spacing:-.04em; }
.stat-copy span { font-size:12px; margin-top:4px; }
.calendar-toolbar { grid-template-columns:1fr; gap:16px; padding:20px; margin-bottom:20px; border-radius:8px; }
.month-navigation { min-width:0; }
.month-navigation h3 { min-width:170px; font-size:18px; letter-spacing:-.03em; }
.icon-button { width:34px; height:34px; border-radius:6px; }
.area-tabs { justify-content:flex-start; gap:6px; }
.area-tab { font-size:12px; font-weight:500; padding:8px 12px; border-radius:6px; white-space:nowrap; }
.calendar-main-grid { grid-template-columns:minmax(0,1fr) 280px; gap:20px; }
.institutional-calendar { padding:18px; }
.calendar-day { min-height:116px; }
.calendar-legend { font-size:12px; }
.upcoming-panel,.management-card { padding:20px; }
.calendar-management-grid { gap:20px; margin-top:20px; }
.calendar-form { gap:16px; }
#view-referrals .referral-settings { border-color:var(--line); border-radius:10px; box-shadow:none; }
.rs-heading { background:#fafafa; border-color:var(--line); padding:24px; }
.rs-heading h3 { font-size:20px; font-weight:600; }
.rs-heading p,.rs-section-head p { color:#666; }
.rs-admin { background:#f0f0f0; color:#525252; }
.referral-settings form { padding:24px 24px 0; }
.referral-settings .recipient-card { border-color:var(--line); border-radius:8px; box-shadow:none; }
.referral-settings .recipient-card.is-enabled { border-color:#a6d8b4; }
.recipient-card .editor-row-grid label { color:#404040; font-weight:500; }
.referral-settings .recipient-card input:not([type=checkbox]),.referral-settings .recipient-card select { font-size:14px; border-color:#d4d4d4; border-radius:6px; }
.referral-settings input[readonly],.referral-settings select:disabled { background:#fafafa; color:#666; border-color:#e5e5e5; }
.referral-settings .recipient-toggle { color:#404040; border-color:var(--line); }
.rs-footer .settings-message,.recipient-enabled-label { color:#666; }
.relay-progress { border-color:#d4e6fa; background:#f5faff; border-radius:6px; }
.referrals-toolbar { border-radius:8px; }
.faq-card,.faq-image-panel,.faq-approval { border-radius:8px; }
.weekday-row,.toolbar-kicker { font-size:10px; font-weight:600; }
.day-number { font-size:12px; font-weight:600; border-radius:6px; }
.calendar-event { font-size:11px; line-height:1.4; border-radius:5px; }
.calendar-day.today { background:#f5faff; }
.calendar-day.outside { background:#fafafa; }
.more-events,.upcoming-date { font-size:11px; }
.upcoming-item { background:#fff; border-radius:6px; }
.upcoming-item p,.management-title p,.form-message { font-size:12px; }
.mini-button,.text-button { font-size:12px; font-weight:500; border-radius:6px; }
.referral-filter { border-color:var(--line); border-radius:6px; font-size:12px; font-weight:500; color:#666; }
.referral-filter.active { color:#171717; border-color:#171717; background:#fafafa; }
.review-referral { background:#171717; border-radius:6px; font-size:13px; font-weight:500; }
.referral-request { color:#171717; }
.referral-meta { color:#666; font-size:12px; border-color:var(--line); }
.referral-empty { border-color:#d4d4d4; border-radius:8px; color:#666; }
.referral-empty strong { color:#171717; }
.nav button.referral-alert { color:#b42318; }
@media(max-width:1100px) {
 .calendar-main-grid,.user-admin-grid { grid-template-columns:1fr; }
 .topbar-actions { display:block; }
 .calendar-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
 .shell { padding:0 16px 28px; }
 .topbar { padding-top:20px; margin-bottom:24px; }
 .brand { padding-right:0; }
 .account-box { position:static; max-width:none; width:100%; margin-bottom:8px; padding:0 0 12px; justify-content:space-between; }
 .topbar-actions { display:flex; flex-direction:column-reverse; align-items:stretch; margin-top:18px; }
 .nav { gap:20px; }
 .nav button { font-size:13px; min-height:44px; }
 .calendar-page-head h2,.admin-head h2,.referrals-head h2 { font-size:23px; }
 .panel,.side,.qr-panel { padding:18px; }
 .chat-layout,.qr-layout,.calendar-settings,.account-edit-grid { grid-template-columns:1fr; }
 .calendar-settings form { grid-template-columns:minmax(0,1fr) auto; }
 .calendar-settings select { width:100%; }
 .calendar-stat { padding:14px; }
 .calendar-stats { gap:10px; }
 .calendar-toolbar { padding:14px; }
 .month-navigation h3 { min-width:0; font-size:16px; }
 .chat { min-height:65vh; }
 .messages { padding:18px; }
 .message { max-width:92%; }
 .user-row { grid-template-columns:1fr; }
 .rs-heading { padding:20px; }
 .referral-settings form { padding:20px 16px 0; }
 input:not([type=checkbox]):not([type=radio]),select,textarea { font-size:16px; }
}
@media(max-width:480px) {
 .calendar-settings form { grid-template-columns:1fr; }
 .calendar-stats { grid-template-columns:1fr 1fr; }
 .calendar-stat { gap:10px; }
 .stat-icon { display:none; }
 .stat-copy strong { font-size:23px; }
 .composer { padding:14px; }
 .composer form { flex-wrap:wrap; }
 .composer .send { margin-left:auto; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none !important; transition:none !important; } }
