@font-face{font-family:'Plus Jakarta Sans';src:url('../fonts/plus-jakarta-sans.ttf') format('truetype');font-weight:200 800;font-display:swap}
:root[data-theme]{--font:'Plus Jakarta Sans',sans-serif;--background:#fff;--surface:#fff;--text:#302b30;--muted:#70666e;--subtle:#f8f7f9;--border:#e9e5e9;--soft-pink:#f9edf3;--theme-surface:#fff;--theme-bg:#fff;color-scheme:light}
html body,html button,html input,html select,html textarea,html svg text{font-family:'Plus Jakarta Sans',sans-serif}
html body{background:var(--theme-bg);color:var(--text)}
.theme-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;padding:8px}
.theme-control select{min-height:44px;border:1px solid var(--border);border-radius:10px;padding:8px;background:var(--surface);color:var(--text)}
.theme-toggle{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid var(--border);border-radius:50%;background:var(--surface);color:var(--text);cursor:pointer;margin-left:auto}
.theme-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle svg{animation:theme-icon-enter 360ms cubic-bezier(.2,.8,.2,1)}
@keyframes theme-icon-enter{from{opacity:0;transform:rotate(-65deg) scale(.45)}to{opacity:1;transform:rotate(0) scale(1)}}
::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}
:root[data-theme=dark]::view-transition-old(root){z-index:1}
:root[data-theme=dark]::view-transition-new(root){z-index:2;animation:theme-fade-in 420ms ease-in-out both}
:root[data-theme=light]::view-transition-new(root){z-index:1}
:root[data-theme=light]::view-transition-old(root){z-index:2;animation:theme-fade-out 420ms ease-in-out both}
@keyframes theme-fade-in{from{opacity:0}to{opacity:1}}
@keyframes theme-fade-out{from{opacity:1}to{opacity:0}}
@media(prefers-reduced-motion:no-preference){body,.card,.institution-card,.sidebar,.institution-sidebar,.topbar,.institution-topbar,.bottom-nav,.institution-bottom-nav,input,select,textarea{transition:background-color 220ms ease,color 220ms ease,border-color 220ms ease}}
@media(prefers-reduced-motion:reduce){.theme-toggle svg,::view-transition-new(root),::view-transition-old(root){animation:none!important}}
.theme-toggle:focus-visible{outline:3px solid var(--focus,#344b68);outline-offset:4px}
.theme-header{display:flex;justify-content:flex-end;padding:8px 16px}
@media print{.theme-toggle,.theme-control{display:none}}
:root[data-theme=dark]{color-scheme:dark;--background:#151419;--surface:#201e25;--text:#f2edf3;--muted:#b8abb8;--secondary:#b8abb8;--subtle:#29252d;--border:#413744;--soft-pink:#3c2834;--primary:#e79dbe;--primary-hover:#f2b6d0;--navy:#b9cce6;--green:#9bd9ba;--green-soft:#243c31;--red:#f7acb4;--red-soft:#432830;--amber:#edc38c;--amber-soft:#403429;--theme-bg:#151419;--theme-surface:#201e25;--input-border:#776473}
:root[data-theme=dark] :is(.card,.institution-card,.dashboard-stat,.institution-sidebar,.sidebar,.institution-topbar,.institution-bottom-nav,.bottom-nav,.dialog,.dashboard-filter,.live-banner,.data-table-wrap,.auth-card){background:var(--surface);color:var(--text);border-color:var(--border)}
:root[data-theme=dark] :is(input,select,textarea){background:var(--subtle);color:var(--text);border-color:var(--input-border)}
:root[data-theme=dark] :is(.data-table.table,.table){--bs-table-bg:var(--surface);--bs-table-color:var(--text);--bs-table-striped-bg:#29242d;--bs-table-striped-color:var(--text);--bs-table-hover-bg:#382b36;--bs-table-hover-color:var(--text);--bs-table-border-color:var(--border)}
:root[data-theme=dark] .data-table.table>thead>tr>th{background:#382b36;color:var(--text)}
:root[data-theme=dark] :is(.data-table tr,.dashboard-chart-data tbody th,.table-pages a){background:var(--surface);color:var(--text)}
:root[data-theme=dark] .dashboard-tooltip{background:#d9e4f4;color:#20252d}
:root[data-theme=dark] .dashboard-analytics{--chart-rose:#eb9cbd;--chart-navy:#a5c4ec;--chart-green:#91d6b4;--chart-gold:#e7bd80}
:root[data-theme=dark] :is(.dashboard-gridline,.dashboard-ring-track){stroke:var(--border)}
:root[data-theme=dark] .dashboard-point{stroke:var(--surface)}
:root[data-theme=dark] .dashboard-bar:hover{background:var(--subtle)}
:root[data-theme] body{background:var(--theme-bg)}
:root[data-theme=dark] :is(.site-header,.p-header,.p-footer,.site-footer,.auth-form-panel,.auth-main,.auth-story,.hero,.feature-card,.feature-section,.section-soft,.im-card,.live-related,.live-detail>div){background:var(--surface);color:var(--text);border-color:var(--border)}
:root[data-theme=dark] :is(.site-header nav a,.p-header nav a,.p-brand small,.auth-main p,.site-footer p){color:var(--muted)}
:root[data-theme=dark] :is(.table-action,.button.secondary,.icon-tile,.chip,.glass-card){background:var(--soft-pink);color:var(--primary)}
:root[data-theme]{--paper:var(--theme-bg);--ink:var(--text);--line:var(--border);--blush:var(--soft-pink)}
:root[data-theme=dark] :is(.menu-sheet,.feature-tile,.access-card,.auth-form,.p-card,.p-skip){background:var(--surface);color:var(--text);border-color:var(--border)}
:root[data-theme=dark]{--focus:#b9cce6;--rose:#d982ac}
:root[data-theme=dark] .im-nutrition-glass{
  background:radial-gradient(ellipse at top right,#3c2834,var(--surface) 70%);
  box-shadow:inset 0 1px 0 var(--border),var(--shadow-md);
}
:root[data-theme=dark] .im-nutrition-week{background:var(--subtle)}
:root[data-theme=dark] .im-nutrition-week .is-logged .im-nutrition-day-dot{color:var(--theme-bg)}
:root[data-theme=dark] :is(.topbar,.sidebar-note,.topbar-tools,.gc-thread-head){background:var(--surface);color:var(--text);border-color:var(--border)}
:root[data-theme=dark] .button:not(.secondary,.outline,.danger,.ghost){color:#20141b}
:root[data-theme=dark] .gc-message.mine{background:var(--soft-pink);color:var(--text)}
:root[data-theme=dark] :is(.badge.neutral,.info-note.neutral){background:var(--subtle);color:var(--text)}
