/* Jewel Field CRM UI 2026 design system (Phase A). Loads last; html:root prefix out-ranks legacy rules. */
/*Tokens*/  :root{--bg:#f7f7f5;--surface:#fff;--surface-2:#f2f2ef;--line:#e6e5e1;--line-strong:#d6d4ce;--ink:#18181b;--ink-2:#3f3f46;--muted:#6b6b70;--accent:#0f766e;--accent-hover:#0d6660;--accent-soft:#e6f4f2;--accent-ink:#0b5550;--on-accent:#fff;--success-soft:#e8f5ec;--success-ink:#166534;--success-solid:#15803d;--warning:#b45309;--warning-soft:#fdf3e3;--warning-ink:#92400e;--danger:#b91c1c;--danger-soft:#fdecec;--danger-ink:#991b1b;--danger-solid:#b91c1c;--info:#1d4ed8;--info-soft:#eaf0fe;--info-ink:#1e40af;--violet-soft:#f1ecfd;--violet-ink:#5b21b6;--neutral-soft:#f0f0ee;--side-bg:#111113;--side-text:#a1a1aa;--side-active-text:#fafafa;--side-active-bg:#1f1f23;--side-line:#26262b;--side-bar:#2dd4bf;--glass:rgba(247,247,245,.8);--scrim:rgba(16,16,20,.45);--r-sm:8px;--r:12px;--r-lg:16px;--r-xl:20px;--r-btn:10px;--sh-1:0 1px 2px rgba(16,16,20,.04),0 1px 1px rgba(16,16,20,.03);--sh-2:0 2px 6px rgba(16,16,20,.05),0 8px 24px rgba(16,16,20,.06);--sh-3:0 12px 40px rgba(16,16,20,.14);--ease:cubic-bezier(.2,.8,.2,1);--t:.15s var(--ease);--white:var(--surface);--blue:var(--accent);--cyan:var(--accent);--navy:var(--side-bg);--muted-strong:var(--ink-2);--shadow:var(--sh-1);--sidebar-hover:var(--side-active-bg);--sidebar-active:var(--side-active-bg);--sidebar-text:var(--side-text);--sidebar-active-text:var(--side-active-text);--sidebar-border:var(--side-line);--accent-active:var(--side-bar);--amber:#d97706;--amber-text:var(--warning-ink);--green:var(--success-ink);--red:var(--danger-ink);--purple:var(--violet-ink)}
html.dark{color-scheme:dark;--bg:#0b0b0d;--surface:#141417;--surface-2:#1b1b1f;--line:#26262b;--line-strong:#34343a;--ink:#f4f4f5;--ink-2:#d4d4d8;--muted:#a1a1aa;--accent:#2dd4bf;--accent-hover:#5eead4;--accent-soft:rgba(45,212,191,.12);--accent-ink:#5eead4;--on-accent:#04201d;--success-soft:rgba(74,222,128,.12);--success-ink:#4ade80;--success-solid:#15803d;--warning:#fbbf24;--warning-soft:rgba(251,191,36,.12);--warning-ink:#fbbf24;--danger:#f87171;--danger-soft:rgba(248,113,113,.12);--danger-ink:#f87171;--danger-solid:#b91c1c;--info:#93c5fd;--info-soft:rgba(147,197,253,.12);--info-ink:#93c5fd;--violet-soft:rgba(196,181,253,.12);--violet-ink:#c4b5fd;--neutral-soft:#26262b;--side-bg:#0e0e10;--side-active-bg:#1b1b1f;--side-line:#1f1f23;--glass:rgba(11,11,13,.8);--scrim:rgba(0,0,0,.62);--hl:inset 0 1px 0 rgba(255,255,255,.05);--sh-1:var(--hl);--sh-2:var(--hl),0 2px 8px rgba(0,0,0,.3);--sh-3:var(--hl),0 12px 40px rgba(0,0,0,.5);--amber:#fbbf24}
/*Base*/  html body{background:var(--bg);color:var(--ink);font-size:16px;-webkit-font-smoothing:antialiased}
@media(min-width:961px){html body{font-size:15px}
}
html body h1,html body h2,html body h3{font-weight:650;letter-spacing:-.015em;text-wrap:balance}
h1{font-size:24px}
:root .card h2,.section-title h2{font-size:17px}
.modal h2{font-size:20px}
html:root :is(.sub,small){color:var(--muted)}
html:root :is(.num,.metric .num,.deal-value,.count,.table td,.time){font-variant-numeric:tabular-nums}
:where(button,a[href],input,select,textarea,summary,[tabindex],[role=button]):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
html:root :is(.field input:focus-visible,.field select:focus-visible,.field textarea:focus-visible){outline:0}
/*Buttons*/  html:root :is(.primary,.secondary,.danger){display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 16px;border:1px solid transparent;border-radius:var(--r-btn);font-size:15px;font-weight:600;line-height:1.2;opacity:1;transition:background-color var(--t),border-color var(--t),box-shadow var(--t),color var(--t),transform .12s var(--ease)}
@media(min-width:961px){html:root :is(.primary,.secondary,.danger){min-height:40px}
}
html:root .primary{background:var(--accent);color:var(--on-accent)}
:root .primary:hover{background:var(--accent-hover);box-shadow:var(--sh-2);opacity:1}
html:root .secondary{background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:var(--sh-1)}
:root .secondary:hover{background:var(--surface-2);border-color:var(--line-strong);opacity:1}
html:root :is(.danger,button.danger){background:transparent;color:var(--danger-ink);border-color:var(--line);box-shadow:var(--sh-1)}
:root :is(.danger:hover,button.danger:hover){background:var(--danger-soft);border-color:var(--danger);opacity:1}
:root :is(.modal button.danger,.modal .danger){background:var(--danger-solid);color:#fff;border-color:transparent}
.modal button.danger:hover{background:var(--danger-solid);filter:brightness(1.1)}
:root .primary:active,:root .secondary:active,:root .danger:active,:root .next:active,html:root .filter:active,.global-fab:active{transform:scale(.98)}
html:root .text-button{min-height:44px;padding:0 10px;border-radius:var(--r-sm);color:var(--accent-ink);font-weight:600;font-size:14px;transition:background-color var(--t)}
html:root .text-button:hover{background:var(--accent-soft)}
.small{min-height:36px;padding:0 12px;font-size:13px}
@media(max-width:760px){.small{min-height:44px}
}
:root :is(.primary:disabled,.secondary:disabled,.danger:disabled){opacity:.5;cursor:not-allowed;transform:none}
/*Inputs*/  html:root :is(.field label,fieldset.field>legend){font-size:13px;font-weight:600;color:var(--ink-2)}
html:root :is(.field input,.field select,.field textarea,.wf-label-input,.global-search-wrap input){min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r-btn);background:var(--surface);color:var(--ink);font-size:16px;transition:border-color var(--t),box-shadow var(--t),background-color var(--t)}
@media(min-width:961px){html:root :is(.field input,.field select,.field textarea,.wf-label-input){font-size:15px}
}
html:root .field textarea{min-height:88px}
html:root .field input::placeholder,html:root .field textarea::placeholder,.global-search-wrap input::placeholder{color:var(--muted);opacity:1}
html:root .field input:hover,html:root .field select:hover,html:root .field textarea:hover,.global-search-wrap input:hover{border-color:var(--line-strong)}
html:root .field input:focus,html:root .field select:focus,html:root .field textarea:focus,:root .wf-label-input:focus,.global-search-wrap input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);outline:0}
html:root :is(.field input[aria-invalid=true],.field select[aria-invalid=true],.field textarea[aria-invalid=true]){border-color:var(--danger);background:var(--surface)}
.field-error{color:var(--danger-ink);font-size:13px}
html:root :is(.field input[type=checkbox],.field input[type=radio]){accent-color:var(--accent)}
:root .global-search-wrap input{min-height:40px;border-radius:var(--r-btn);background:var(--surface-2);width:240px;font-size:14px}
.global-search-wrap input:focus{background:var(--surface)}
html:root :is(.choice-chip,.tap-chip){background:var(--surface);border-color:var(--line);color:var(--ink);transition:background-color .15s,border-color .15s}
:root .choice-chip:has(input:checked),html:root .choice-chip[aria-pressed=true],html:root .choice-chip.active,html:root .tap-chip.active,.tap-chip[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-ink)}
/*Cards,metrics*/  :root .card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1);padding:20px;transition:box-shadow var(--t),transform var(--t),border-color var(--t)}
.card[onclick],.card[role=button],:root .card-button{cursor:pointer}
.card[onclick]:hover,.card[role=button]:hover,.metric[onclick]:hover{box-shadow:var(--sh-2);transform:translateY(-1px);border-color:var(--line-strong)}
@media(max-width:520px){:root .card{padding:16px}
:root .appointment>.tag{display:none}
:root .metric .num{font-size:24px}
}
:root .metric .num{font-size:28px;font-weight:650;letter-spacing:-.02em;margin-top:6px;line-height:1.15}
.section-title h2{font-size:17px}
html:root .progress,.win-bar-wrap{background:var(--surface-2);height:8px;border-radius:999px}
:root .progress>span,.win-bar-fill{background:var(--accent);border-radius:999px}
html:root .success{background:var(--success-soft);border-color:transparent;color:var(--success-ink);border-radius:var(--r)}
html:root :is(.report-breakdown>div,.week-col,.queue-row,.wf-config-row){background:var(--surface-2);border-color:var(--line);border-radius:var(--r)}
:root .previsit-brief{background:var(--info-soft);border-color:transparent;color:var(--info-ink);border-radius:var(--r);font-size:13px}
html:root .facility-dupe-warn,.location-permission-hint{background:var(--warning-soft);border-color:transparent;color:var(--warning-ink);border-radius:var(--r)}
:root :is(.visit-list,.checkin-flow #visit-success-fields,.checkin-flow #visit-unsuccessful-fields){border-color:var(--accent)}
:root .vstep-active .vstep-num{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
:root .vstep-done .vstep-num{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--accent)}
:root .vstep-num{background:var(--surface-2);border-color:var(--line)}
:root .vstep-active::before,:root .vstep-done::before{background:var(--accent)}
/*Tags,temp,sync chips*/  :root :is(.tag,.badge,.sync-chip){display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600;line-height:1.4;background:var(--neutral-soft);color:var(--ink-2)}
.tag.green,.sync-ok{background:var(--success-soft);color:var(--success-ink)}
.tag.amber,html:root .tag.warm,.sync-pending{background:var(--warning-soft);color:var(--warning-ink)}
.tag.red,.tag.hot,.follow-up-missing,.follow-up-overdue,.sync-failed{background:var(--danger-soft);color:var(--danger-ink)}
.tag.purple,.follow-up-upcoming{background:var(--violet-soft);color:var(--violet-ink)}
.tag.blue,.tag.cold{background:var(--info-soft);color:var(--info-ink)}
html:root .temp{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600}
html:root .temp::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
html:root .temp.hot{color:var(--danger-ink)}
html:root .temp.warm{color:var(--warning-ink)}
html:root .temp.cold{color:var(--info-ink)}
html:root .count{background:var(--surface);color:var(--ink-2);border-radius:999px;padding:2px 8px;font-size:12px;font-weight:600;box-shadow:var(--sh-1)}
html:root .offline{background:var(--warning-soft);border-color:transparent;color:var(--warning-ink);border-radius:var(--r)}
html:root .sync-status{background:var(--info-soft);border-color:transparent;color:var(--info-ink);border-radius:var(--r)}
/*Segmented controls,tabs*/  .controls,:root .contact-type-filters,:root .view-toggle{display:inline-flex;flex-wrap:wrap;gap:2px;padding:3px;background:var(--surface-2);border-radius:var(--r);margin:16px 0;max-width:100%;overflow:visible}
:root .view-toggle{margin:0}
:root .contact-type-filters{margin:4px 0 14px}
html:root .filter,.view-toggle button,.view-toggle button.primary,.view-toggle button.secondary{min-height:36px;padding:0 14px;border:0;border-radius:calc(var(--r) - 3px);background:transparent;color:var(--ink-2);font-size:14px;font-weight:600;box-shadow:none;transition:background-color var(--t),color var(--t),box-shadow var(--t)}
html:root .filter:hover,.view-toggle button:hover{color:var(--ink);background:var(--line)}
html:root .filter.active,.view-toggle button.primary,.view-toggle button.primary:hover{background:var(--surface);color:var(--ink);box-shadow:var(--sh-1),0 0 0 1px var(--line)}
@media(max-width:760px){html:root .filter,.view-toggle button{min-height:44px}
}
html:root .tabs,.settings-tabs{display:flex;flex-wrap:nowrap;gap:4px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
:root .tabs::-webkit-scrollbar,.settings-tabs::-webkit-scrollbar{display:none}
html:root :is(.tab,.settings-tab){position:relative;min-height:44px;flex:none;padding:0 14px;border:0;border-bottom:0;margin:0;background:none;color:var(--muted);font-size:14px;font-weight:600;white-space:nowrap;transition:color var(--t)}
.tab:hover,:root .settings-tab:hover:not(.active){color:var(--ink)}
.tab::after,:root .settings-tab::after{content:"";position:absolute;inset-inline:10px;bottom:-1px;height:2px;border-radius:2px;background:var(--accent);transform:scaleX(0);transition:transform .2s var(--ease)}
html:root :is(.tab.active,.settings-tab.active){color:var(--accent-ink);border:0}
:root .tab.active::after,:root .settings-tab.active::after{transform:scaleX(1)}
/*Sidebar*/  html:root .side{background:var(--side-bg);border-inline-end:1px solid var(--side-line);padding:16px 12px;gap:20px}
@media(min-width:1181px){html:root .app-shell{grid-template-columns:248px 1fr}
}
.brand{color:var(--side-active-text);font-size:16px;font-weight:500;padding:4px 6px}
.brand-mark{width:32px;height:32px;border-radius:var(--r-sm);background:var(--accent);color:var(--on-accent)}
html:root .side nav{gap:2px}
html:root :is(.nav-item,.rtl .nav-item){border:0}
html:root .side .nav-item{min-height:40px;padding:0 10px;border-radius:var(--r-sm);font-size:14px;font-weight:500;color:var(--side-text)}
:root .side .nav-item:hover{background:var(--side-active-bg);color:var(--side-active-text)}
:root .side .nav-item.active{background:var(--side-active-bg);color:var(--side-active-text)}
.side .nav-item.active::before{content:"";position:absolute;inset-block:9px;inset-inline-start:-12px;width:3px;border-radius:3px;background:var(--side-bar)}
:root .side .nav-item-secondary{font-size:13px;opacity:.85}
:root .user-card{border-top:1px solid var(--side-line);padding:14px 4px 2px}
.user-card-copy b{color:var(--side-active-text);font-size:14px;font-weight:600}
.avatar{background:var(--accent-soft);color:var(--accent-ink);font-weight:650;border:1px solid var(--accent)}
:root .side .avatar{background:var(--accent);color:var(--on-accent);border:0}
/*Header*/  html:root header{background:var(--glass);-webkit-backdrop-filter:saturate(180%) blur(12px);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--line)}
header h1{font-size:24px;letter-spacing:-.02em}
@media(max-width:520px){header h1{font-size:20px}
}
:root :is(.language,.bell){width:40px;height:40px;min-width:44px;min-height:44px;border-radius:var(--r-btn);background:var(--surface);border:1px solid var(--line);box-shadow:var(--sh-1);color:var(--ink);transition:background-color .15s,border-color .15s,transform .12s}
@media(min-width:961px){:root :is(.language,.bell){min-width:40px;min-height:40px}
}
.language:hover,.bell:hover{background:var(--surface-2);border-color:var(--line-strong)}
.language:active,.bell:active,.shift-pill:active{transform:scale(.98)}
#notif-dot{color:var(--warning-ink)}
:root .shift-pill{background:var(--accent);color:var(--on-accent);border-radius:var(--r-btn);padding:0 16px;font-weight:600;min-height:44px;transition:background-color .15s,transform .12s;opacity:1}
@media(min-width:961px){:root .shift-pill{min-height:40px}
}
.shift-pill:hover{background:var(--accent-hover);opacity:1}
.shift-pill.active-shift{background:var(--success-solid);color:#fff}
/*Mobile nav*/  @media(max-width:960px){html:root .mobile-nav{background:var(--glass);-webkit-backdrop-filter:saturate(180%) blur(12px);backdrop-filter:saturate(180%) blur(12px);border-top:1px solid var(--line);box-shadow:none;min-height:64px;padding:4px max(6px,env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom))}
html:root .mobile-nav .nav-item{position:relative;min-height:54px;gap:3px;border:0;border-radius:var(--r);background:transparent;color:var(--muted);font-size:12px;font-weight:500;margin:0;padding:6px 1px}
:root .mobile-nav .nav-item.active{background:transparent;color:var(--accent-ink);border:0;margin:0;font-weight:650}
html:root .mobile-nav .nav-icon{width:44px;height:26px;border-radius:999px;transition:background-color .2s var(--ease)}
.mobile-nav .nav-item.active .nav-icon{background:var(--accent-soft)}
:root .mobile-nav .nav-icon svg{width:20px;height:20px}
}
/*Tables,lists,rows*/  html:root .table th{background:var(--surface-2);color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
html:root .rtl .table th{text-transform:none;letter-spacing:0}
html:root .table td{padding:12px;height:48px;border-bottom:1px solid var(--line);color:var(--ink)}
html:root .table tbody tr{transition:background-color .12s}
:root .table tbody tr:hover{background:var(--surface-2)}
@media(max-width:760px){:root :is(.table th:first-child,.table td:first-child){position:sticky;inset-inline-start:0;z-index:1;background:var(--surface)}
:root .table th:first-child{background:var(--surface-2)}
.table tbody tr:hover td:first-child{background:var(--surface-2)}
}
html:root .appointment{padding:12px 0;border-bottom:1px solid var(--line);gap:12px;align-items:center}
:root .time{color:var(--accent-ink);font-size:14px;font-weight:600}
html:root .appointment-button{border-radius:var(--r);transition:background-color .15s}
:root :is(.appointment-button:hover,.dark .appointment-button:hover){background:var(--surface-2)}
html:root .action-done-btn{background:var(--success-soft);color:var(--success-ink);border:0;border-radius:var(--r-btn);margin-block:8px;margin-inline:8px 0;align-self:center}
:root .action-done-btn:hover{background:var(--success-soft);color:var(--success-ink);filter:brightness(.95)}
html:root .contact-row{border-top:1px solid var(--line);border-radius:0;transition:background-color var(--t)}
html:root .contact-row:hover{background:var(--surface-2)}
html:root button.contact-row{width:100%;border:0;border-top:1px solid var(--line);text-align:start;font:inherit;color:inherit;cursor:pointer;background:transparent;display:grid;gap:3px;padding:12px 8px;min-height:60px}
:root button.contact-row:hover{background:var(--surface-2)}
:root .follow-up-row{border-top-color:var(--line)}
html:root .notif-count{background:var(--danger-solid);color:#fff}
:root .contact-row:has(>.secondary){display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.contact-row:has(>.secondary)>div{flex:1 1 220px;min-width:0}
html:root .appointment-row{border-bottom:1px solid var(--line)}
:root :is(.appointment-row .appointment,.appointment-row .action-done-btn){border-bottom:0}
:is(.card h2+.primary,.card h2+.secondary){margin-top:10px}
/*Kanban*/  html:root .stage{background:var(--surface-2);border-radius:var(--r-xl);padding:8px;min-height:360px}
.stage-header{padding:6px 8px 4px;font-size:14px;font-weight:650;color:var(--ink)}
html:root .stage.dragover{background:var(--accent-soft);border:2px dashed var(--accent)}
html:root .deal{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-1);padding:14px;margin:8px 0;transition:transform var(--t),box-shadow var(--t),border-color var(--t)}
html:root .deal:hover{transform:translateY(-1px);box-shadow:var(--sh-2);border-color:var(--line-strong)}
html:root .deal .deal-value{font-size:17px;font-weight:650;margin:10px 0}
html:root .next{background:var(--accent-soft);color:var(--accent-ink);border-radius:var(--r-sm);font-weight:600;transition:background-color .15s,transform .12s}
.deal-hot::after{background:var(--danger-solid)}
button.deal-title:hover{color:var(--accent-ink)}
@media(max-width:960px){html:root .stage{min-height:0;padding:8px}
html:root .deal{padding:14px;margin:8px 0}
}
/*FAB,popovers*/  :root .global-fab{width:56px;height:56px;background:var(--accent);color:var(--on-accent);box-shadow:var(--sh-3);transition:background-color .15s,transform .12s var(--ease),box-shadow .15s}
.global-fab:hover{background:var(--accent-hover)}
.fab-sheet{bottom:68px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-3);padding:6px;min-width:200px}
.fab-sheet:not([hidden]){animation:pop-in .16s var(--ease)}
:root .fab-action{min-height:44px;padding:0 14px;border-radius:var(--r);font-size:14px;transition:background-color .12s}
.fab-action:hover{background:var(--surface-2)}
@keyframes pop-in{from{opacity:0;transform:translateY(6px) scale(.98)}
to{opacity:1;transform:none}
}
html:root :is(.notification-panel,.search-results){background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-3)}
html:root .notif-header{border-bottom-color:var(--line);font-weight:600}
html:root :is(.notif-item,button.notif-item){border-bottom-color:var(--line)}
html:root .notif-item b{color:var(--ink)}
html:root .notif-overdue{background:var(--danger-soft)}
html:root .notif-overdue b{color:var(--danger-ink)}
.notif-item[onclick]:hover,:root button.notif-item:hover,.notif-mark-read:hover,html:root .search-result-item:hover{background:var(--surface-2)}
@media(max-width:520px){html:root .notification-panel{right:auto;inset-inline-end:-10px}
}
/*Modal*/  .modal-back{background:var(--scrim);animation:fade-in .15s ease-out}
html:root .win-overlay{background:var(--scrim)}
html:root :is(.modal,.win-card){background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xl);box-shadow:var(--sh-3)}
:root .modal{width:min(560px,100%);padding:24px;animation:modal-pop var(--t)}
html:root .modal-close{top:12px;right:auto;left:auto;inset-inline-end:12px;background:var(--surface-2);border:0;border-radius:var(--r);color:var(--ink-2);transition:background-color .15s}
:root .modal-close:hover{background:var(--line)}
html:root .checkin-flow .modal-actions{background:var(--surface)}
@keyframes modal-pop{from{opacity:0;transform:scale(.98)}
to{opacity:1;transform:none}
}
@keyframes sheet-up{from{transform:translateY(24px);opacity:.6}
to{transform:none;opacity:1}
}
@keyframes fade-in{from{opacity:0}
to{opacity:1}
}
@media(max-width:760px){.modal-back{align-items:end;place-items:end center;padding:0}
:root .modal{width:100%;max-width:100%;max-height:92dvh;border-radius:var(--r-xl) var(--r-xl) 0 0;border-bottom:0;padding:12px 20px calc(20px + env(safe-area-inset-bottom));animation:sheet-up .22s var(--ease)}
.modal::before{content:"";display:block;width:40px;height:4px;margin:0 auto 14px;border-radius:4px;background:var(--line-strong)}
html:root .modal-close{top:14px}
}
/*Toasts*/  :root #toast-root{top:auto;bottom:24px;right:auto;left:auto;inset-inline-end:24px;max-width:380px;width:calc(100% - 32px)}
@media(max-width:760px){:root #toast-root{inset-inline:16px;margin-inline:auto;bottom:calc(88px + env(safe-area-inset-bottom));max-width:480px}
}
:root .toast{--tc:var(--info);display:flex;align-items:flex-start;gap:10px;padding:12px 14px 15px;border-radius:var(--r);border:1px solid var(--line);background:var(--surface);color:var(--ink);box-shadow:var(--sh-3);font-size:14px;font-weight:500;animation:toast-up .2s var(--ease)}
.toast.info,:root .toast.success,.toast.error,.toast.warning{background:var(--surface);border-color:var(--line);color:var(--ink)}
.toast.success .toast.error .toast.warning html:root .toast button{min-height:36px;padding-inline:12px;color:var(--ink);border-radius:var(--r-sm)}
@keyframes toast-up{from{opacity:0;transform:translateY(8px)}
to{opacity:1;transform:none}
}
/*Auth gate*/  html:root .auth-gate{background:radial-gradient(60% 50% at 80% 0,var(--accent-soft) 0,transparent 70%),var(--bg)}
:root .auth-gate-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xl);box-shadow:var(--sh-3)}
.auth-gate-mark{background:var(--accent);color:var(--on-accent);border-radius:var(--r)}
.auth-gate-card p,.auth-gate-card small{color:var(--muted)}
/*Skeleton and empty states (for later phases)*/  .skeleton,.skeleton-card{background:var(--surface-2);border-radius:var(--r);animation:sk-pulse 1.4s ease-in-out infinite;min-height:14px}
.skeleton-line{height:12px;border-radius:6px;margin:8px 0}
@keyframes sk-pulse{0%,100%{opacity:1}
50%{opacity:.45}
}
:root .empty-state{display:grid;justify-items:center;gap:6px;padding:28px 16px;border:1px dashed var(--line-strong);border-radius:var(--r-lg);background:transparent;color:var(--muted);font-size:14px;text-align:center}
.empty-state svg{width:48px;height:48px;color:var(--line-strong)}.empty-state b{color:var(--ink);font-size:16px;font-weight:650;margin:0}
:root .empty-state :is(.primary,.secondary){margin-top:10px}
:root .toast.success{--tc:var(--success-solid)}.toast.error{--tc:var(--danger-solid)}.toast.warning{--tc:var(--warning)}
.toast::before{content:"";flex:none;width:20px;height:20px;border-radius:50%;background:var(--tc);margin-top:1px}
.toast-progress{height:3px;background:var(--tc);opacity:.5}
@media(prefers-reduced-motion:reduce){.skeleton,.skeleton-card{animation:none}}

html:root .menu-toggle{background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:var(--sh-1);border-radius:var(--r-btn);min-width:44px;min-height:44px}
:root .user-card small{color:var(--side-text)}
:root .setup-dot.done{background:var(--success-solid);color:#fff}
