:root { --ink:#232c49; --navy:#202842; --navy-2:#353d64; --teal:#625bd5; --aqua:#b9b1fa; --ice:#eeecfa; --muted:#6b7389; --line:#d5d9e8; --paper:#f0f2f8; }
.dashboard-page,.login-page { color:var(--ink); background:radial-gradient(ellipse at 90% 0,#e9eaff,transparent 45%),#f0f2f8; }
.sidebar { background:linear-gradient(165deg,#171e36,#242b48 70%,#2d3054); }
.sidebar::after { border-color:#9993ff08; }
.brand-symbol,.avatar { background:linear-gradient(145deg,#8d88ff,#5252c5); box-shadow:0 9px 25px #6256b930; }
.nav-group { --nav-tone:#ada9ff; }
.main-nav a.active { box-shadow:inset 3px 0 #a6a2ff; }
.nav-group[open] .nav-icon { background:#ada9ff18; }
.sidebar-label,.sidebar-user span { color:#939cbd; }
.system-orbit { border-color:#aeaaff55; }
.system-orbit span,.live-status i,.secure-badge i { background:#b1abff; box-shadow:0 0 12px #9790ff; }
.eyebrow { color:#7462ab; }
.dashboard-hero { background:linear-gradient(115deg,#252e4e,#444975 65%,#7770a8); }
.hero-content h2 em { color:#c5bfff; }
.hero-art { background-image:linear-gradient(90deg,#444975,transparent 35%),url('../images/pediatric-clinic-hero.png'); }
.overview-card.mint { --tone:#7063c7; --tint:#eeebfc; }
.quick-card { --quick:#6559b9; --quick-soft:#eeebfc; }
.migration-banner { background:linear-gradient(115deg,#eeebfc,#fff); border-color:#dcd6ef; }
.migration-banner::after { border-color:#8272bc09; }
.migration-visual span { color:#9c92b4; border-color:#d4cbe7; }
.migration-visual span:first-child { background:#7666c7; border-color:#7666c7; box-shadow:0 8px 18px #7666c733; }
.phase-badge { background:#e5def8; color:#7760a6; }
.login-form-side { background:radial-gradient(circle at 80% 12%,#e7e1fa,transparent 30%),#f6f5fb; }
.primary-button { background:linear-gradient(110deg,#5156cf,#7770e6); box-shadow:0 16px 32px #6559b92b; }
.welcome-icon { color:#7c66bb; background:#ece7fb; }
.privacy-lock { color:#7667a7; }
.ambient-one { border-color:#8272bc0d; }.ambient-two { background:#8272bc08; }
.visual-shade { background:linear-gradient(160deg,#1b2345b8,#302c5a99); }
.med-icon { width:20px; height:20px; display:inline-block; flex-shrink:0; vertical-align:middle; }
.nav-icon .med-icon { width:19px; height:19px; }.submenu-item i .med-icon { width:17px; height:17px; }
.quick-icon .med-icon,.overview-icon .med-icon,.stat-symbol .med-icon { width:24px; height:24px; }
.profile-tabs a>span { display:inline-flex; }.profile-tabs .med-icon { width:18px; height:18px; }
.profile-group-nav button,.compact-form-tabs button { display:flex; align-items:center; gap:10px; }
.profile-group-nav button { color:#626b83; }.profile-group-nav button .med-icon { color:#8874c3; }
.patient-field label,.patient-profile-app .patient-field label { color:#46516b; font-size:12px; margin-bottom:5px; }
.patients-page .patient-field input,.patients-page .patient-field select,.patients-page .patient-field textarea,
.patients-page .patient-search input,.patients-page .patient-search select,
.patient-profile-app .patient-field input,.patient-profile-app .patient-field select,.patient-profile-app .patient-field textarea {
    background:#edf0f9; border:1px solid #aeb8d0; box-shadow:inset 0 1px 3px #313a6110; color:#26304a; border-radius:7px; padding:9px 11px; min-height:38px;
}
.patients-page .patient-field input:hover,.patients-page .patient-field select:hover,.patients-page .patient-field textarea:hover { border-color:#7d8eaf; background:#e8ecf7; }
.patients-page .patient-field input:focus,.patients-page .patient-field select:focus,.patients-page .patient-field textarea:focus { background:white; border-color:#7669ce; outline:3px solid #7669ce24; }
.patients-page .patient-field :disabled { background:#f3f3f6; border-color:#d9dbe3; color:#788095; cursor:not-allowed; }
.patient-header { margin-bottom:18px; }.patient-header h1 { font-size:32px; margin:4px 0 7px; }
.patient-header p:last-child { margin:0; }.patient-breadcrumb { margin-bottom:18px; }
.patient-form-section,.patient-profile-app .patient-form-section { padding:20px 23px; margin-bottom:14px; min-height:0; border-radius:13px; }
.patient-form-section h2,.patient-profile-app .patient-form-section h2 { font-size:16px; gap:10px; padding-bottom:13px; margin:0 0 17px; }
.patient-form-section h2>span,.patient-profile-app .patient-form-section h2>span { padding:7px; background:#ebe7fa; color:#806abf; border-radius:8px; }
.patient-form-grid,.patient-profile-app .patient-form-grid { gap:14px 18px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.patient-field.full { grid-column:1/-1; }.patient-field textarea { min-height:88px; }
.compact-form-tabs { display:flex; gap:6px; overflow-x:auto; padding:6px; margin-bottom:14px; border-radius:12px; background:#e1e5f0; border:1px solid #d4dbea; }
.compact-form-tabs button { border:0; border-radius:8px; white-space:nowrap; padding:10px 15px; background:transparent; font-family:inherit; font-size:12px; font-weight:650; color:#646e85; cursor:pointer; }
.compact-form-tabs button.selected { background:white; color:#6653ab; box-shadow:0 2px 7px #29385913; }
.patient-compact-create [hidden] { display:none !important; }
.patient-compact-create .patient-form-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.patient-save-bar { padding:12px 17px; }.patient-profile-app .patient-save-bar { padding:12px 17px; }
.patient-directory-grid { font-size:12px; border:1px solid #ccd3e5; }
.patient-directory-grid th { background:#dde3f0; color:#526079; padding:11px 14px; border-right:1px solid #cbd3e4; border-bottom:1px solid #bec9de; position:sticky; top:0; z-index:1; }
.patient-directory-grid td { border-right:1px solid #dbe0ed; border-bottom:1px solid #d0d8e8; padding:10px 14px; color:#45516a; }
.patient-directory-grid tbody tr:nth-child(odd) { background:#fff; }.patient-directory-grid tbody tr:nth-child(even) { background:#eaf0fa; }
.patient-directory-grid tbody tr:hover { background:#dedff7; }.patient-directory-grid tbody tr:focus-within { background:#dddaf4; }
.patient-directory-grid .patient-avatar { height:31px; width:31px; border-radius:8px; font-size:12px; }
.patient-directory-grid .patient-person { gap:10px; min-width:200px; color:#2e3b59; }.patient-directory-grid .patient-person strong { font-size:12px; }
.patient-directory-grid .patient-person small { font-size:10px; color:#66748f; margin-top:3px; }.patient-directory-grid .patient-badge { padding:4px 8px; }
.patient-table-wrap:has(.patient-directory-grid) { max-height:65vh; overflow:auto; }
.patient-list-heading { padding:17px 21px; }.patient-search { padding:18px 21px; }
.profile-identity { padding:23px 0; }.profile-facts { padding:16px 0; }.profile-tabs { margin:18px 0 22px; }
.profile-section-heading { margin-bottom:17px; }.patient-help { color:#68758c; }
@media(max-width:1200px) { .patient-form-grid,.patient-profile-app .patient-form-grid,.patient-compact-create .patient-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:820px) { .submenu { background:#252b46; }.hero-art { background-image:linear-gradient(0deg,transparent,#444975dd),url('../images/pediatric-clinic-hero.png'); }.compact-form-tabs button { padding:10px 12px; }.profile-tabs a>span { display:inline-flex; } }
@media(max-width:520px) { .patient-form-grid,.patient-profile-app .patient-form-grid,.patient-compact-create .patient-form-grid { grid-template-columns:1fr; }.profile-tabs .med-icon { width:16px; height:16px; }.patient-header h1 { font-size:29px; } }
/* Clinical sections share the same compact, high-contrast form controls. */
.clinical-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.clinical-field{min-width:0}.clinical-wide{grid-column:1/-1}
.clinical-field label{display:block;font-weight:650;font-size:13px;margin-bottom:6px;color:#303b59}
.clinical-field input,.clinical-field select,.clinical-field textarea{width:100%;box-sizing:border-box;padding:10px 12px;background:#edf0f9;border:1px solid #aeb8d0;border-radius:8px;color:#202b47;font:inherit;font-size:14px}
.clinical-field :is(input,select,textarea):focus{background:white;outline:3px solid #bcb8fb;outline-offset:1px}
.clinical-form fieldset{border:0;padding:0;margin:18px 0}.clinical-form{margin-bottom:18px}
.clinical-new,.clinical-record{border:1px solid #c5cce0;border-radius:12px;margin:14px 0;background:white;padding:16px}
.clinical-new>summary,.clinical-record>summary{cursor:pointer;color:#35415f;font-weight:700;display:flex;align-items:center;gap:10px}
.clinical-new>summary{color:#5550bd}.clinical-record>summary small{margin-left:auto;white-space:nowrap;color:#65708c;font-weight:400}
.record-toolbar.history-nav{display:block;margin:10px 0}.record-toolbar a{display:inline-flex;padding:6px 12px!important}
.record-errors{color:#9a263d;background:#fff0f3;border:1px solid #e4a0af;padding:12px;border-radius:8px}
.clinical-form fieldset:disabled{opacity:.8}.history-nav .med-icon{flex:none}
@media(max-width:1100px){.clinical-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.clinical-fields{grid-template-columns:1fr}.clinical-record>summary{flex-wrap:wrap}}
.growth-point{cursor:pointer;pointer-events:all}.growth-point:hover,.growth-point:focus{fill:#e04b40;outline:none}.growth-tooltip{position:fixed;z-index:12000;max-width:min(330px,calc(100vw - 32px));padding:12px 16px;border-radius:10px;background:#202b44;color:white;box-shadow:0 6px 24px #0004;pointer-events:none;font-size:14px;line-height:1.5}.growth-tooltip[hidden]{display:none}.growth-expanded{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:16px;border:0;background:#f4f5fc;overflow:auto}.growth-expanded[open]{display:flex;flex-direction:column;gap:12px}.growth-expanded>.button{align-self:flex-end;flex-shrink:0}.growth-expanded>.growth-figure{flex:1;margin:0;align-items:center;min-height:0}.growth-expanded .growth-chart{max-height:calc(100dvh - 120px)}.growth-expanded::backdrop{background:#101629bb}body:has(.growth-expanded[open]){overflow:hidden}@media(max-width:820px){.growth-expanded{padding:8px}.growth-expanded>.growth-figure{align-content:start}.growth-expanded .growth-chart{max-height:none}}
.growth-chart{display:block;width:100%;min-width:640px;margin:0;color:#303b59}.growth-toolbar.history-nav{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.growth-toolbar a{padding:8px 12px!important}.growth-panel{padding:24px;min-width:0}.profile-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
.growth-figure{display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:start;gap:12px;margin:18px 0;padding:16px 12px;border-radius:16px;background:#eef0f5}.growth-figure--boy{background:#c8d5ff}.growth-figure--girl{background:#ffdade}.growth-chart-scroll{min-width:0;overflow-x:auto;-webkit-overflow-scrolling:touch}.growth-legend{list-style:none;margin:24px 0 0;padding:12px 8px;display:grid;gap:12px;background:#ffffffb8;border-radius:8px;color:#202b44;font-size:12px}.growth-legend li{display:flex;align-items:center;gap:8px}.growth-legend svg{width:32px;height:12px;flex-shrink:0}@media(max-width:820px){.growth-figure{grid-template-columns:minmax(0,1fr);padding:12px 6px}.growth-legend{grid-template-columns:repeat(2,minmax(0,1fr));margin:0;gap:10px}.growth-chart-scroll:focus-visible{outline:2px solid #4b45c2;outline-offset:2px}}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;border:1px solid #bfc6dc;border-radius:9px;background:#f8f9ff;color:#384368;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;margin-top:10px}.button-primary{background:linear-gradient(115deg,#5552c7,#7770de);color:white;border-color:transparent}.button:disabled{opacity:.6;cursor:wait}.button:hover{filter:brightness(.97)}
@media(max-width:820px){.profile-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.growth-panel{padding:14px}}
@media(max-width:820px){.main-nav{position:relative}.main-nav .nav-group{position:static}.main-nav .submenu{left:0;right:0;width:auto;min-width:0;max-width:100%;box-sizing:border-box}}
.patients-page{--ink:#232c49;--muted:#6b7389;--teal:#625bd5;--line:#d5d9e8;background:radial-gradient(ellipse at 90% 0,#e9eaff,transparent 45%),#f0f2f8}
.history-layout:has(.vaccination-calendar){grid-template-columns:185px minmax(0,1fr)}
.vaccine-heading{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:15px}.vaccine-heading h3{margin:0;font-size:19px}.vaccine-heading p{font-size:12px;color:#63718b;margin:7px 0}.vaccine-heading a{white-space:nowrap}
.vaccine-scroll{overflow:auto;border:1px solid #8f9ab4;border-radius:10px;max-width:100%}.vaccine-grid{width:100%;min-width:1050px;table-layout:fixed;border-collapse:separate;border-spacing:0;color:#25304b;font-size:12px;text-align:center}
.vaccine-grid th,.vaccine-grid td{border-right:1px solid #8f9ab4;border-bottom:1px solid #8f9ab4;height:39px;padding:0}.vaccine-grid th:first-child{width:230px}.vaccine-grid thead th{background:#303c60;color:white;font-size:11px;letter-spacing:.3px;font-weight:650}.vaccine-grid thead tr:first-child th:not(:first-child){text-transform:uppercase}.vaccine-grid tbody th{text-align:left;padding:0 10px;font-size:12px;font-weight:650;position:sticky;left:0;z-index:1}.vaccine-grid tr:last-child td,.vaccine-grid tr:last-child th{border-bottom:0}.vaccine-grid tr>*:last-child{border-right:0}
.vaccine-tone-rose{--vaccine-bg:#f7c8d0;--vaccine-hover:#f4aeba}.vaccine-tone-violet{--vaccine-bg:#cfcbfa;--vaccine-hover:#b7b0f2}.vaccine-grid tbody th,.vaccine-active{background:var(--vaccine-bg)}.vaccine-inactive{background:#eef0f4}.vaccine-active button{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:39px;border:0;background:transparent;color:#27334e;font:650 12px inherit;cursor:pointer;padding:3px}.vaccine-active button:hover{background:var(--vaccine-hover)}.vaccine-active button:focus-visible{outline:3px solid #5146bc;outline-offset:-3px}.vaccine-active button small{font-size:9px}.vaccine-active button:disabled{cursor:default;opacity:1}
.vaccine-legend{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:11px;color:#65718b}.vaccine-dot{width:13px;height:13px;border-radius:3px;border:1px solid #b6bed0;display:inline-block}.vaccine-dot.rose{background:#f7c8d0}.vaccine-dot.violet{background:#cfcbfa}.vaccine-dot.inactive{background:#eef0f4}
.vaccine-notes{border-top:1px solid #d9deed;padding-top:10px;margin-top:20px}.vaccine-notes h4{font-size:15px;margin:6px 0}.vaccine-notes .clinical-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.vaccine-notes .clinical-wide{grid-column:auto}.vaccine-notes .clinical-wide:last-child:nth-child(odd){grid-column:1/-1}
.vaccine-context-menu{position:fixed;z-index:1000;min-width:195px;max-width:calc(100vw - 24px);padding:6px;background:white;border:1px solid #c5cce0;box-shadow:0 10px 32px #27344e33;border-radius:10px}.vaccine-context-menu[hidden]{display:none}.vaccine-context-menu button{display:flex;align-items:center;gap:9px;width:100%;text-align:left;border:0;background:none;padding:11px 13px;color:#2d3654;border-radius:6px;font:inherit;font-size:13px;cursor:pointer}.vaccine-context-menu button:hover,.vaccine-context-menu button:focus{background:#efedfb}.vaccine-context-menu button:disabled{opacity:.4;cursor:default}
.vaccine-dialog{border:1px solid #ccd2e5;border-radius:18px;padding:24px;width:min(420px,calc(100vw - 40px));box-sizing:border-box;color:#283450;box-shadow:0 20px 80px #141c4144}.vaccine-dialog::backdrop{background:#171e3666;backdrop-filter:blur(3px)}.vaccine-dialog h2{font-size:21px;margin:0 0 12px}.vaccine-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}.vaccine-dialog .clinical-field{display:block;font-weight:600}.vaccine-dialog [data-vaccine-delete-note]{font-size:13px;line-height:1.6}
@media(max-width:820px){.history-layout:has(.vaccination-calendar){grid-template-columns:1fr}.vaccine-notes .clinical-fields{grid-template-columns:1fr}.vaccine-heading{flex-wrap:wrap}}
.vaccine-active button{font-family:inherit;font-weight:650;font-size:12px}.vaccine-dialog [hidden]{display:none!important}
.vaccine-grid thead tr:nth-child(2) th:first-child{width:auto}
.history-layout:has(.vaccination-calendar)>*{min-width:0}
.vaccination-calendar{min-width:0;max-width:100%}
.patient-continuous-form .profile-form-layout{display:block}
.patient-continuous-form .patient-form-section{padding:18px 22px;margin-bottom:14px}
.patient-continuous-form .patient-form-section h2{font-size:17px;margin-bottom:15px;padding-bottom:12px}
.patient-continuous-form .patient-form-grid{gap:14px 18px}
.patient-family-grid{grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1.2fr) minmax(95px,.65fr)!important}
.patient-consent-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.patient-field input.patient-checkbox{width:22px;height:22px;padding:0;margin:8px 10px 8px 0;accent-color:#625bd5;vertical-align:middle;cursor:pointer}
.consent-pdf{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;background:#fff0f1;color:#a22c42;border:1px solid #edc5cd;border-radius:7px;text-decoration:none;font-size:12px;margin:3px}
.consent-pdf .med-icon{width:19px;height:19px}
.patient-age{display:block;margin-top:6px;color:#e1dcff;font-size:13px}
.profile-history-number{display:inline-flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 10px;padding:8px 14px;border:1px solid #ffffff55;border-radius:10px;background:#ffffff18;color:#fff}
.profile-history-number span{font-size:13px;font-weight:600;letter-spacing:0}
.profile-history-number strong{font-size:25px;font-weight:800;line-height:1.1;letter-spacing:.5px;font-variant-numeric:tabular-nums}
.patients-page .patient-field input.patient-checkbox{width:22px;height:22px;min-height:0;padding:0;box-shadow:none}
.patient-continuous-form .patient-save-bar,.patient-profile-app .patient-continuous-form .patient-save-bar{position:sticky;bottom:12px;margin:0;z-index:4;}
.patient-continuous-form{display:flex;flex-direction:column}
.patient-continuous-form .patient-save-bar{order:-1;top:12px;margin-bottom:16px!important}
.patient-continuous-form .profile-form-layout{order:1}
@media(max-width:820px){.patient-continuous-form .patient-save-bar,.patient-profile-app .patient-continuous-form .patient-save-bar{position:fixed;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom));left:18px;right:18px;margin:0!important}.patient-continuous-form{padding-bottom:90px}.patient-continuous-form .patient-save-bar>span{display:none}}
@media(max-width:820px){.patient-family-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.patient-consent-grid{grid-template-columns:1fr!important}.patient-profile-app .patient-continuous-form .patient-save-bar{flex-direction:row;padding:10px;top:10px}.patient-continuous-form .patient-save-bar>div{display:none}.patient-continuous-form .patient-save-bar button{width:100%}.patient-continuous-form .patient-form-section{padding:15px}.patient-continuous-form .patient-form-grid{gap:12px}}
.vaccine-scroll{width:100%;box-sizing:border-box;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:auto;scrollbar-color:#7770de #e1e5f0}
@media(max-width:820px){
    .history-layout:has(.vaccination-calendar){grid-template-columns:minmax(0,1fr)}
    .vaccination-calendar::before{content:attr(data-scroll-hint);display:block;margin-bottom:12px;padding:9px 12px;border-radius:8px;background:#eeecfc;color:#5146a5;font-size:12px;font-weight:600}
    .vaccine-grid th:first-child{width:150px}
    .vaccine-grid tbody th{font-size:11px;padding:0 7px}
}
/* Patient visits: compact ledger and a separate clinical workspace. */
.visit-workspace, .visit-list, .visit-detail, .visit-layout { min-width: 0; }
.visit-workspace h3 svg, .visit-workspace h4 svg, .visit-background summary svg { width: 22px; height: 22px; vertical-align: middle; color: #7463ce; }
.visit-grid { min-width: 800px; width: 100%; border-collapse: collapse; }
.visit-grid th, .visit-grid td { padding: 9px 12px !important; font-size: 13px; border: 1px solid #d6dbea; vertical-align: top; }
.visit-grid thead th { background: #e0e5f2; color: #303b5f; }
.visit-grid tbody tr:nth-child(odd) { background: #fff; }
.visit-grid tbody tr:nth-child(even) { background: #edf0f9; }
.visit-grid tbody tr:hover, .visit-grid tbody tr.is-selected { background: #dfdafc; }
.visit-grid tbody tr { cursor: pointer; }
.visit-grid td:first-child, .visit-grid td:last-child { white-space: nowrap; }
.visit-time { display: block; color: #5c6581; margin-top: 3px; }
.visit-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.visit-history .history-layout { grid-template-columns: 175px minmax(0, 1fr); }
.viewing-visit .history-layout { display: block; }
.viewing-visit .history-layout > .history-nav { display: flex; overflow-x: auto; gap: 6px; margin-bottom: 18px; }
.viewing-visit .history-layout > .history-nav a { flex: 0 0 auto; }
.visit-layout.has-visit { display: grid; grid-template-columns: minmax(220px, 28%) minmax(0, 1fr); gap: 20px; align-items: start; }
.has-visit .visit-list { position: sticky; top: 12px; }
.has-visit .visit-list .patient-table-wrap { max-height: 65vh; overflow: auto; }
.has-visit .visit-grid { min-width: 0; }
.has-visit .visit-grid th, .has-visit .visit-grid td { font-size: 12px; padding: 7px !important; }
.visit-heading { background: linear-gradient(120deg, #252e50, #555390); color: #fff; padding: 18px 22px; border-radius: 16px; }
.visit-heading h3, .visit-heading p { color: #fff; margin: 6px 0; }
#visit-heading { scroll-margin-top: 24px; }
.visit-clinical-data { padding: 18px; background: white; border: 1px solid #d8deec; border-radius: 16px; margin: 14px 0; }
.visit-clinical-data h4 { margin: 0 0 14px; font-size: 18px; }
.visit-clinical-data .clinical-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.visit-clinical-data .clinical-wide { grid-column: span 2; }
.visit-clinical-data textarea { min-height: 100px; resize: vertical; }
.visit-clinical-data .clinical-form > button[type=submit] { position: sticky; bottom: 16px; z-index: 3; box-shadow: 0 6px 20px #252e5033; margin-top: 16px; }
.visit-background { background: #f2f3fc; border: 1px solid #d8deec; border-radius: 12px; margin: 12px 0; padding: 12px 16px; }
.visit-background summary { cursor: pointer; font-weight: 700; }
.visit-background dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.visit-background dt { font-weight: 700; }
.visit-background dd { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
    .visit-history .history-layout { display: block; }
    .visit-history .history-layout > .history-nav { display: flex; overflow-x: auto; margin-bottom: 16px; }
    .visit-history .history-layout > .history-nav a { flex: 0 0 auto; }
    .visit-layout.has-visit { display: block; }
    .has-visit .visit-list { position: static; margin-bottom: 18px; }
    .has-visit .visit-list .patient-table-wrap { max-height: 220px; }
}
@media (max-width: 600px) {
    .visit-clinical-data { padding: 12px; }
    .visit-clinical-data .clinical-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .visit-clinical-data .clinical-wide { grid-column: 1 / -1; }
    .visit-background dl { grid-template-columns: 1fr; }
    .visit-clinical-data .clinical-form > button[type=submit] { bottom: 10px; }
    #visit-heading { scroll-margin-top: 180px; }
}
.profile-hero.profile-hero-compact{padding:18px 24px;border-radius:20px}.profile-hero-compact .profile-identity{padding:16px 0 0;gap:18px}.profile-hero-compact .profile-monogram{width:58px;height:62px;border-radius:17px;font-size:27px}.profile-hero-compact .profile-person{flex:1;min-width:0}.profile-hero-compact .profile-history-number{margin:0 0 7px;padding:4px 9px;gap:9px}.profile-hero-compact .profile-history-number span{font-size:11px}.profile-hero-compact .profile-history-number strong{font-size:19px}.profile-hero-compact .profile-identity h1{font-size:clamp(22px,2.1vw,30px);margin-bottom:7px}.profile-birth-summary{flex:0 0 auto;min-width:155px;border-left:1px solid #ffffff26;padding-left:22px;display:grid;gap:6px}.profile-birth-summary>span{font-size:11px;color:#d2d5eb}.profile-birth-summary>strong{font-size:18px;color:white}.profile-birth-summary .patient-age{margin:0;font-size:13px;color:#e0ddf7}@media(max-width:760px){.profile-hero.profile-hero-compact{padding:16px 18px}.profile-hero-compact .profile-identity{flex-wrap:wrap;gap:12px}.profile-hero-compact .profile-monogram{width:44px;height:48px;font-size:23px}.profile-hero-compact .profile-person{flex-basis:calc(100% - 60px)}.profile-hero-compact .profile-birth-summary{width:100%;border-left:0;border-top:1px solid #ffffff26;padding:12px 0 0;display:flex;flex-wrap:wrap;align-items:baseline;gap:7px 12px}.profile-hero-compact .profile-birth-summary>strong{font-size:16px}.profile-hero-compact .profile-topline{gap:7px}.profile-hero-compact .profile-identity h1{font-size:22px}}
