/* ── RESET ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{height:100%;height:100dvh}

/* ── THEME TOKENS ── */
[data-theme="dark"]{
  --bg:#0c0f14;--bg2:#13181f;--bg3:#1a2030;--bg4:#222a3a;
  --border:#2a3347;--border2:#364059;
  --text:#e8edf5;--text2:#7a8ba8;--text3:#445570;
  --accent:#c4e04f;--accent2:#39b224;
  --accent-bg:rgba(196,224,79,.08);--accent-br:rgba(196,224,79,.22);
  --blue:#4a9eff;--blue-bg:rgba(74,158,255,.08);--blue-br:rgba(74,158,255,.2);
  --amber:#f5a623;--amber-bg:rgba(245,166,35,.08);--amber-br:rgba(245,166,35,.2);
  --red:#f05252;--red-bg:rgba(240,82,82,.08);--red-br:rgba(240,82,82,.2);
  --orange:#fb923c;--orange-bg:rgba(251,146,60,.08);--orange-br:rgba(251,146,60,.2);
  --green:#34d399;--green-bg:rgba(52,211,153,.08);--green-br:rgba(52,211,153,.2);
  --purple:#a78bfa;--purple-bg:rgba(167,139,250,.08);--purple-br:rgba(167,139,250,.2);
  --shadow:0 4px 24px rgba(0,0,0,.5);--shadow-sm:0 2px 8px rgba(0,0,0,.3);
  --nav-bg:#0e1319;--sidebar-border:#1e2a3a;--input-bg:#111722;
  --overlay:rgba(0,0,0,.6);--scrollbar:#2a3347;
  --t:.18s ease;
}
[data-theme="light"]{
  --bg:#f0f2f5;--bg2:#ffffff;--bg3:#f6f7fa;--bg4:#eceef3;
  --border:#d4d8e4;--border2:#bfc5d3;
  --text:#0e1520;--text2:#5a6a84;--text3:#9aaabb;
  --accent:#5a9e10;--accent2:#39b224;
  --accent-bg:rgba(90,158,16,.07);--accent-br:rgba(90,158,16,.22);
  --blue:#1869ea;--blue-bg:rgba(24,105,234,.07);--blue-br:rgba(24,105,234,.2);
  --amber:#d97706;--amber-bg:rgba(217,119,6,.07);--amber-br:rgba(217,119,6,.2);
  --red:#dc2626;--red-bg:rgba(220,38,38,.07);--red-br:rgba(220,38,38,.2);
  --orange:#ea580c;--orange-bg:rgba(234,88,12,.07);--orange-br:rgba(234,88,12,.2);
  --green:#16a34a;--green-bg:rgba(22,163,74,.07);--green-br:rgba(22,163,74,.2);
  --purple:#7c3aed;--purple-bg:rgba(124,58,237,.07);--purple-br:rgba(124,58,237,.2);
  --shadow:0 4px 24px rgba(0,0,0,.1);--shadow-sm:0 2px 8px rgba(0,0,0,.06);
  --nav-bg:#ffffff;--sidebar-border:#e0e4ee;--input-bg:#f6f7fa;
  --overlay:rgba(0,0,0,.4);--scrollbar:#d0d5e0;
  --t:.18s ease;
}

body{font-family:'Space Grotesk',sans-serif;background:var(--bg);color:var(--text);height:100vh;height:100dvh;overflow:hidden;display:flex;transition:background .25s,color .25s}

/* ══ SIDEBAR ══ */
.sidebar{width:220px;min-width:220px;height:100vh;height:100dvh;background:var(--nav-bg);border-right:1px solid var(--sidebar-border);display:flex;flex-direction:column;transition:width .25s ease,min-width .25s ease,transform .3s ease;position:relative;z-index:100;overflow:hidden}
.sidebar.collapsed{width:60px;min-width:60px}
.sidebar-logo{display:flex;align-items:center;gap:.65rem;padding:1.1rem 1rem 1rem;border-bottom:1px solid var(--sidebar-border);min-height:56px;overflow:hidden;flex-shrink:0}
.logo-mark{width:28px;height:28px;min-width:28px;background:var(--accent);border-radius:6px;display:flex;align-items:center;justify-content:center;font-family:'Roboto Mono',monospace;font-size:.7rem;font-weight:600;color:#0c0f14;letter-spacing:-.03em}
.logo-text{font-family:'Roboto Mono',monospace;font-size:.82rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--text);white-space:nowrap;opacity:1;transition:opacity .2s}
.sidebar.collapsed .logo-text{opacity:0;pointer-events:none}
.sidebar-nav{flex:1;padding:.5rem 0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--scrollbar) transparent}
.nav-item{display:flex;align-items:center;gap:.75rem;padding:.62rem 1rem;margin:.1rem .4rem;border-radius:8px;cursor:pointer;transition:background .15s,color .15s;white-space:nowrap;overflow:hidden;position:relative;user-select:none;-webkit-tap-highlight-color:transparent}
.nav-item:hover{background:var(--bg3)}
.nav-item.active{background:var(--accent-bg);color:var(--accent)}
.nav-item.active .nav-icon{color:var(--accent)}
.nav-item.dragging{opacity:.4}
.nav-icon{width:20px;min-width:20px;height:20px;display:flex;align-items:center;justify-content:center;color:var(--text2);transition:color .15s;flex-shrink:0}
.nav-label{font-size:.83rem;font-weight:500;opacity:1;transition:opacity .2s}
.sidebar.collapsed .nav-label{opacity:0;pointer-events:none}
.drag-handle{margin-left:auto;color:var(--text3);cursor:grab;padding:.15rem;opacity:0;transition:opacity .15s;flex-shrink:0}
.nav-item:hover .drag-handle{opacity:1}
.sidebar.collapsed .drag-handle{display:none}
.sidebar-footer{border-top:1px solid var(--sidebar-border);padding:.5rem .4rem;display:flex;flex-direction:column;gap:.2rem;flex-shrink:0}
.sidebar-action{display:flex;align-items:center;gap:.75rem;padding:.55rem .6rem;border-radius:8px;cursor:pointer;transition:background .15s;white-space:nowrap;overflow:hidden;border:none;background:none;color:var(--text2);width:100%;font-family:'Space Grotesk',sans-serif;font-size:.83rem;font-weight:500;-webkit-tap-highlight-color:transparent}
.sidebar-action:hover{background:var(--bg3);color:var(--text)}
.sidebar-action .nav-label{opacity:1;transition:opacity .2s}
.sidebar.collapsed .sidebar-action .nav-label{opacity:0;pointer-events:none}
.collapse-btn{position:absolute;right:-12px;top:50%;transform:translateY(-50%);width:24px;height:24px;background:var(--nav-bg);border:1px solid var(--sidebar-border);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--text2);transition:background .15s,color .15s;z-index:10}
.collapse-btn:hover{background:var(--bg3);color:var(--text)}
.collapse-btn svg{transition:transform .25s}
.sidebar.collapsed .collapse-btn svg{transform:rotate(180deg)}

/* ══ MAIN ══ */
.main{flex:1;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.topbar{height:48px;min-height:48px;display:flex;align-items:center;padding:0 1rem;border-bottom:1px solid var(--border);background:var(--bg2);gap:.75rem;flex-shrink:0}
.topbar-title{font-family:'Roboto Mono',monospace;font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--text2);flex:1}
.topbar-title span{color:var(--text)}
.topbar-actions{display:flex;align-items:center;gap:.5rem}
.theme-pill{display:flex;align-items:center;gap:.3rem;background:var(--bg3);border:1px solid var(--border);border-radius:20px;padding:.2rem}
.theme-opt{padding:.28rem .6rem;border-radius:14px;border:none;background:none;color:var(--text2);font-size:.75rem;cursor:pointer;display:flex;align-items:center;transition:all .15s;font-family:'Space Grotesk',sans-serif}
.theme-opt.active{background:var(--bg2);color:var(--text);box-shadow:var(--shadow-sm)}
.theme-opt:hover:not(.active){color:var(--text)}
.page-container{flex:1;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--scrollbar) transparent}
.page{display:none;padding:1.5rem;animation:pageIn .2s ease}
.page.active{display:block}
@keyframes pageIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ══ SHARED COMPONENTS ══ */
.card{background:var(--bg2);border:1px solid var(--border);border-radius:12px;overflow:hidden;margin-bottom:1rem}
.card-header{background:var(--bg3);padding:.7rem 1rem;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:.6rem}
.card-header h2{font-size:.88rem;font-weight:600;flex:1}
.card-body{padding:1rem}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.75rem;margin-bottom:1rem}
.stat-card{background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:1rem}
.stat-label{font-family:'Roboto Mono',monospace;font-size:.62rem;text-transform:uppercase;letter-spacing:.1em;color:var(--text2);margin-bottom:.35rem}
.stat-value{font-size:1.4rem;font-weight:700;line-height:1}
.stat-sub{font-size:.72rem;color:var(--text2);margin-top:.3rem}
.badge{display:inline-flex;align-items:center;gap:.3rem;padding:.18rem .55rem;border-radius:20px;font-family:'Roboto Mono',monospace;font-size:.62rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em}
.badge-green{background:var(--green-bg);color:var(--green);border:1px solid var(--green-br)}
.badge-amber{background:var(--amber-bg);color:var(--amber);border:1px solid var(--amber-br)}
.badge-red{background:var(--red-bg);color:var(--red);border:1px solid var(--red-br)}
.badge-blue{background:var(--blue-bg);color:var(--blue);border:1px solid var(--blue-br)}
.badge-accent{background:var(--accent-bg);color:var(--accent);border:1px solid var(--accent-br)}
.dot{width:8px;height:8px;border-radius:50%;background:currentColor;flex-shrink:0}
.section-label{font-family:'Roboto Mono',monospace;font-size:.62rem;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--text3);margin-bottom:.75rem;display:flex;align-items:center;gap:.75rem}
.section-label::after{content:'';flex:1;height:1px;background:var(--border)}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
.coming-soon{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:320px;gap:1rem;color:var(--text3);text-align:center}
.coming-soon .cs-icon{width:56px;height:56px;border-radius:14px;background:var(--bg3);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text2);margin-bottom:.25rem}
.coming-soon h3{font-size:1rem;font-weight:600;color:var(--text2)}
.coming-soon p{font-size:.82rem;max-width:280px;line-height:1.6}

/* ══ DASHBOARD ══ */
.dash-status-bar{display:flex;align-items:center;gap:1rem;padding:.75rem 1rem;background:var(--bg2);border:1px solid var(--border);border-radius:12px;margin-bottom:1rem}
.dash-status-bar .status-text{font-size:.82rem;color:var(--text2);flex:1}
.dash-status-bar .status-text strong{color:var(--text)}
.quick-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.75rem;margin-bottom:1rem}
.quick-link{background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:1rem .75rem;display:flex;flex-direction:column;align-items:center;gap:.5rem;cursor:pointer;transition:border-color .15s,background .15s;text-align:center;-webkit-tap-highlight-color:transparent}
.quick-link:hover{border-color:var(--border2);background:var(--bg3)}
.ql-icon{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:1.1rem}
.ql-label{font-family:'Roboto Mono',monospace;font-size:.62rem;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--text2);line-height:1.3}
.ql-green{background:var(--green-bg);color:var(--green)}
.ql-blue{background:var(--blue-bg);color:var(--blue)}
.ql-amber{background:var(--amber-bg);color:var(--amber)}
.ql-accent{background:var(--accent-bg);color:var(--accent)}
.maint-row{display:flex;align-items:center;gap:.75rem;padding:.65rem 0;border-bottom:1px solid var(--border)}
.maint-row:last-child{border-bottom:none}
.maint-row .mr-icon{width:32px;height:32px;min-width:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:.85rem}
.maint-row .mr-info{flex:1}
.maint-row .mr-title{font-size:.85rem;font-weight:500}
.maint-row .mr-sub{font-size:.72rem;color:var(--text2);margin-top:.1rem}

/* ══ TIRE PRESSURE PAGE ══ */
.tp-wrap{max-width:820px}

/* Inner tabs */
.tp-tabs{display:flex;gap:.25rem;background:var(--bg2);border:1px solid var(--border);border-radius:10px;padding:.25rem;margin-bottom:1.25rem}
.tp-tab{flex:1;padding:.52rem .75rem;border:none;border-radius:8px;background:none;color:var(--text2);font-family:'Space Grotesk',sans-serif;font-size:.8rem;font-weight:500;cursor:pointer;transition:all var(--t);white-space:nowrap;text-align:center}
.tp-tab:hover{color:var(--text)}
.tp-tab.active{background:var(--bg4);color:var(--text);box-shadow:var(--shadow-sm)}
.tp-tc{display:none}
.tp-tc.active{display:block;animation:pageIn .2s ease}

/* Mode toggle */
.mode-toggle{display:flex;background:var(--bg2);border:1px solid var(--border);border-radius:10px;padding:.25rem;margin-bottom:1.25rem}
.mode-btn{flex:1;padding:.52rem 1rem;border:none;border-radius:8px;background:none;color:var(--text2);font-family:'Space Grotesk',sans-serif;font-size:.8rem;font-weight:500;cursor:pointer;transition:all var(--t);display:flex;align-items:center;justify-content:center;gap:.4rem}
.mode-btn:hover{color:var(--text)}
.mode-btn.active{background:var(--bg4);color:var(--text);box-shadow:var(--shadow-sm)}

/* Presets */
.presets{display:flex;gap:.5rem;margin-bottom:1.25rem;flex-wrap:wrap}
.pbtn{display:flex;align-items:center;gap:.4rem;padding:.48rem 1rem;border:1px solid var(--border);border-radius:8px;background:var(--bg2);color:var(--text2);font-family:'Space Grotesk',sans-serif;font-size:.8rem;font-weight:500;cursor:pointer;transition:all var(--t)}
.pbtn:hover{border-color:var(--border2);color:var(--text)}
.pbtn.active{border-color:var(--accent-br);background:var(--accent-bg);color:var(--accent)}
.pbtn .dot{background:currentColor}

/* Input grid */
.igrid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin-bottom:1.25rem}
.igrid-3{grid-template-columns:1fr 1fr 1fr}
.igrp{background:var(--bg2);border:1px solid var(--border);border-radius:10px;padding:1rem;transition:border-color var(--t)}
.igrp:focus-within{border-color:var(--border2)}
.igrp label{display:block;font-family:'Roboto Mono',monospace;font-size:.62rem;text-transform:uppercase;letter-spacing:.1em;color:var(--text2);margin-bottom:.4rem}
.irow{display:flex;align-items:center;gap:.5rem}
.igrp input{width:100%;background:var(--input-bg);border:1px solid var(--border);border-radius:6px;padding:.55rem .7rem;color:var(--text);font-family:'Roboto Mono',monospace;font-size:1.05rem;font-weight:600;transition:border-color var(--t);-moz-appearance:textfield}
.igrp input::-webkit-inner-spin-button{-webkit-appearance:none}
.igrp input:focus{outline:none;border-color:var(--accent)}
.igrp .u{font-family:'Roboto Mono',monospace;font-size:.72rem;color:var(--text3);flex-shrink:0}
.igrp .pt{font-size:.68rem;color:var(--text3);margin-top:.3rem;font-family:'Roboto Mono',monospace}

/* Calc button */
.calc-btn{width:100%;padding:.78rem;border:none;border-radius:10px;background:var(--accent);color:#0c0f14;font-family:'Space Grotesk',sans-serif;font-size:.92rem;font-weight:600;cursor:pointer;transition:all var(--t);margin-bottom:1.5rem}
.calc-btn:hover{opacity:.9;transform:translateY(-1px);box-shadow:var(--shadow)}
.calc-btn:active{transform:translateY(0)}

/* Confidence bar */
.conf-bar{display:none;margin-bottom:1.25rem;padding:.75rem 1rem;border-radius:10px;font-size:.8rem;line-height:1.5}
.conf-bar.vis{display:flex;align-items:flex-start;gap:.65rem}
.conf-icon{font-size:1rem;flex-shrink:0;margin-top:2px}
.conf-body strong{display:block;margin-bottom:.1rem}
.conf-high{background:var(--green-bg);border:1px solid var(--green-br);color:var(--green)}
.conf-med{background:var(--amber-bg);border:1px solid var(--amber-br);color:var(--amber)}
.conf-low{background:var(--purple-bg);border:1px solid var(--purple-br);color:var(--purple)}

/* Warnings */
.tp-warnings{display:none;flex-direction:column;gap:.5rem;margin-bottom:1.5rem}
.tp-warnings.vis{display:flex}
.warn{border-radius:10px;padding:.85rem 1rem;display:flex;align-items:flex-start;gap:.75rem;font-size:.82rem;line-height:1.5}
.warn .wi{font-size:1.1rem;flex-shrink:0;margin-top:1px}
.warn .wt strong{display:block;margin-bottom:.1rem}
.warn-yellow{background:var(--amber-bg);border:1px solid var(--amber-br);color:var(--amber)}
.warn-orange{background:var(--orange-bg);border:1px solid var(--orange-br);color:var(--orange)}
.warn-red{background:var(--red-bg);border:1px solid var(--red-br);color:var(--red)}

/* Weight xfer */
.tp-xfer{display:none;margin-bottom:1.5rem}
.tp-xfer.vis{display:block}
.xgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:.6rem}
.xc{background:var(--bg2);border:1px solid var(--border);border-radius:10px;padding:.85rem;text-align:center}
.xc .xl{font-family:'Roboto Mono',monospace;font-size:.6rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text2);margin-bottom:.2rem}
.xc .xv{font-family:'Roboto Mono',monospace;font-size:1.2rem;font-weight:700}
.xc .xs{font-size:.68rem;color:var(--text2);margin-top:.15rem}
.xv-green{color:var(--green)}.xv-blue{color:var(--blue)}.xv-amber{color:var(--amber)}.xv-red{color:var(--red)}.xv-text{color:var(--text)}

/* Results */
.tp-results{display:none}
.tp-results.vis{display:block;animation:pageIn .3s ease}
.rgrid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin-bottom:1rem}
.rc{background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:1.15rem;position:relative;overflow:hidden}
.rc::before{content:'';position:absolute;top:0;left:0;right:0;height:3px}
.rc.front::before{background:var(--accent)}
.rc.rear::before{background:var(--blue)}
.rc .al{font-family:'Roboto Mono',monospace;font-size:.63rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text2);margin-bottom:.4rem}
.rc .pv{font-family:'Roboto Mono',monospace;font-size:2.25rem;font-weight:800;line-height:1;margin-bottom:.2rem}
.rc.front .pv{color:var(--accent)}
.rc.rear .pv{color:var(--blue)}
.rc .pu{font-family:'Roboto Mono',monospace;font-size:.8rem;font-weight:400;opacity:.6}
.rc .cp{font-size:.72rem;color:var(--text2);margin-top:.2rem}
.rc .cp span{color:var(--text);font-weight:500}

/* Load table */
.tw{background:var(--bg2);border:1px solid var(--border);border-radius:12px;overflow:hidden;margin-bottom:1.25rem}
.twh{padding:.75rem 1rem;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem}
.twh h3{font-size:.82rem;font-weight:600;display:flex;align-items:center;gap:.5rem}
.twh .sp{font-family:'Roboto Mono',monospace;font-size:.63rem;color:var(--text2)}
.ttog{background:var(--bg3);border:1px solid var(--border);border-radius:6px;padding:.32rem .65rem;color:var(--text2);font-family:'Space Grotesk',sans-serif;font-size:.73rem;cursor:pointer;transition:all var(--t)}
.ttog:hover{color:var(--text);border-color:var(--border2)}
table{width:100%;border-collapse:collapse;font-family:'Roboto Mono',monospace;font-size:.75rem}
thead th{background:var(--bg3);padding:.45rem .7rem;text-align:right;font-weight:600;font-size:.62rem;text-transform:uppercase;letter-spacing:.06em;color:var(--text2);border-bottom:1px solid var(--border)}
thead th:first-child{text-align:left}
tbody td{padding:.45rem .7rem;text-align:right;border-bottom:1px solid var(--border);transition:background .1s}
tbody td:first-child{text-align:left;font-weight:600}
tbody tr:last-child td{border-bottom:none}
tbody tr:hover td{background:var(--bg3)}
tr.hf td{background:var(--accent-bg)}
tr.hf td:first-child{box-shadow:inset 3px 0 0 var(--accent)}
tr.hr td{background:var(--blue-bg)}
tr.hr td:first-child{box-shadow:inset 3px 0 0 var(--blue)}
tr.hm td{color:var(--text3);font-style:italic}
td.nc{font-size:.62rem;color:var(--text2)}
td.nf{color:var(--accent)!important}
td.nr{color:var(--blue)!important}

/* Tire badge variants */
.be{background:var(--blue-bg);color:var(--blue);border:1px solid var(--blue-br);font-family:'Roboto Mono',monospace;font-size:.6rem;font-weight:600;padding:.12rem .45rem;border-radius:5px;display:inline-flex}
.bf{background:var(--amber-bg);color:var(--amber);border:1px solid var(--amber-br);font-family:'Roboto Mono',monospace;font-size:.6rem;font-weight:600;padding:.12rem .45rem;border-radius:5px;display:inline-flex}

/* History */
.hl{display:flex;flex-direction:column;gap:.5rem}
.hi{background:var(--bg2);border:1px solid var(--border);border-radius:10px;padding:.8rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:.75rem;cursor:pointer;transition:all var(--t)}
.hi:hover{border-color:var(--border2)}
.hil{display:flex;flex-direction:column;gap:.1rem}
.hid{font-family:'Roboto Mono',monospace;font-size:.68rem;color:var(--text2)}
.hiw{font-family:'Roboto Mono',monospace;font-size:.78rem;font-weight:600}
.hir{display:flex;align-items:center;gap:.5rem}
.hlbl{font-size:.68rem;padding:.12rem .45rem;border-radius:5px;font-weight:500;font-family:'Roboto Mono',monospace}
.hlbl.tow{background:var(--amber-bg);color:var(--amber);border:1px solid var(--amber-br)}
.hlbl.emp{background:var(--green-bg);color:var(--green);border:1px solid var(--green-br)}
.hlbl.est{background:var(--purple-bg);color:var(--purple);border:1px solid var(--purple-br)}
.hdel{background:none;border:none;color:var(--text3);cursor:pointer;font-size:.9rem;padding:.25rem;border-radius:4px;transition:color var(--t)}
.hdel:hover{color:var(--red)}
.empty-st{text-align:center;padding:2rem 1rem;color:var(--text3);font-size:.82rem}

/* Settings groups */
.sgrp{background:var(--bg2);border:1px solid var(--border);border-radius:10px;padding:1rem;margin-bottom:.75rem}
.sgrp h3{font-size:.85rem;font-weight:600;margin-bottom:.75rem}
.srow{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.65rem}
.srow:last-child{margin-bottom:0}
.srow label{font-size:.78rem;color:var(--text2);flex-shrink:0}
.srow input{width:100px;background:var(--input-bg);border:1px solid var(--border);border-radius:6px;padding:.4rem .6rem;color:var(--text);font-family:'Roboto Mono',monospace;font-size:.85rem;font-weight:600;text-align:right;-moz-appearance:textfield}
.srow input::-webkit-inner-spin-button{-webkit-appearance:none}
.srow input:focus{outline:none;border-color:var(--accent)}
.srow .su{font-family:'Roboto Mono',monospace;font-size:.68rem;color:var(--text3);margin-left:.35rem}
.ssave{background:var(--accent);color:#0c0f14;border:none;border-radius:8px;padding:.5rem 1.25rem;font-family:'Space Grotesk',sans-serif;font-size:.82rem;font-weight:600;cursor:pointer;transition:all var(--t);margin-top:.5rem}
.ssave:hover{opacity:.9}

/* Note block */
.nb{background:var(--bg2);border:1px solid var(--border);border-left:3px solid var(--amber);border-radius:0 10px 10px 0;padding:.9rem 1.1rem;margin-top:1.25rem;font-size:.78rem;color:var(--text2);line-height:1.6}
.nb strong{color:var(--text)}

/* ══ SETTINGS PAGE ══ */
.settings-row{display:flex;align-items:center;gap:1rem;padding:.85rem 1rem;border-bottom:1px solid var(--border)}
.settings-row:last-child{border-bottom:none}
.settings-row .sr-info{flex:1}
.settings-row .sr-title{font-size:.88rem;font-weight:500}
.settings-row .sr-sub{font-size:.75rem;color:var(--text2);margin-top:.1rem}
.reorder-list .nav-item{background:var(--bg3);border:1px solid var(--border);border-radius:8px;margin-bottom:.4rem;padding:.65rem 1rem;cursor:default}
.reorder-list .nav-item .drag-handle{opacity:1}

/* ── Quick Access Toggles ── */
.qa-toggle-row{display:flex;align-items:center;gap:.75rem;padding:.6rem .75rem;border-bottom:1px solid var(--border);font-size:.85rem}
.qa-toggle-row:last-child{border-bottom:none}
.qa-toggle-row .nav-icon{flex-shrink:0;color:var(--text2)}
.qa-toggle-label{flex:1;font-weight:500}
.qa-switch{position:relative;display:inline-block;width:36px;height:20px;flex-shrink:0}
.qa-switch input{opacity:0;width:0;height:0}
.qa-slider{position:absolute;inset:0;background:var(--border2);border-radius:20px;cursor:pointer;transition:background .2s}
.qa-slider::before{content:'';position:absolute;left:2px;top:2px;width:16px;height:16px;background:var(--text);border-radius:50%;transition:transform .2s}
.qa-switch input:checked+.qa-slider{background:var(--accent)}
.qa-switch input:checked+.qa-slider::before{transform:translateX(16px)}

/* ── Amenity Tag Settings ── */
.amenity-tag-row{display:flex;align-items:center;gap:.5rem;padding:.45rem .5rem;border-bottom:1px solid var(--border);font-size:.84rem}
.amenity-tag-row:last-child{border-bottom:none}
.amenity-tag-name{flex:1;font-weight:500}
.amenity-tag-del{color:var(--text3);border:none;padding:2px}
.amenity-tag-del:hover{color:var(--red)}
.amenity-add-row{display:flex;gap:.5rem;margin-top:.75rem;align-items:center}

/* ══ MOBILE ══ */
.mob-overlay{display:none;position:fixed;inset:0;background:var(--overlay);z-index:90}
.hamburger{display:none;width:36px;height:36px;border-radius:8px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);align-items:center;justify-content:center;cursor:pointer;flex-shrink:0}

/* ══ LIST BUILDER ══ */
#page-lists{padding:0;overflow:hidden;height:100%}
#page-lists.active{display:flex;flex-direction:column}
.lists-layout{display:grid;grid-template-columns:280px 1fr;flex:1;min-height:0;overflow:hidden}

/* Left sidebar */
.lists-sidebar{display:flex;flex-direction:column;border-right:1px solid var(--border);background:var(--bg2);overflow:hidden}
.lists-sidebar-header{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;border-bottom:1px solid var(--border);flex-shrink:0}
.sync-bar{display:flex;align-items:center;gap:.5rem;padding:.45rem 1rem;font-family:'Roboto Mono',monospace;font-size:.65rem;color:var(--text3);border-bottom:1px solid var(--border);flex-shrink:0}
.sync-bar.ok .dot{background:var(--green)}
.sync-bar.err .dot{background:var(--red)}
.sync-bar.syncing .dot{background:var(--amber);animation:pulse 1s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}
.list-cards{flex:1;overflow-y:auto;padding:.5rem;scrollbar-width:thin;scrollbar-color:var(--scrollbar) transparent}
.list-card{display:flex;align-items:center;gap:.65rem;padding:.65rem .75rem;border-radius:9px;cursor:pointer;transition:background .15s;border:1px solid transparent;margin-bottom:.25rem;-webkit-tap-highlight-color:transparent}
.list-card:hover{background:var(--bg3)}
.list-card.active{background:var(--bg3);border-color:var(--border)}
.list-card-dot{width:9px;height:9px;min-width:9px;border-radius:50%;flex-shrink:0}
.list-card-info{flex:1;min-width:0}
.list-card-name{font-size:.85rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list-card-meta{font-size:.7rem;color:var(--text3);margin-top:.1rem;font-family:'Roboto Mono',monospace}
.list-card-count{font-family:'Roboto Mono',monospace;font-size:.68rem;color:var(--text3);flex-shrink:0}
.list-card-grip{color:var(--text3);cursor:grab;padding:.1rem;flex-shrink:0;opacity:0;transition:opacity .15s;display:flex;align-items:center}
.list-card:hover .list-card-grip{opacity:1}
.list-card.dragging{opacity:.3}
.list-card.lc-drag-above{box-shadow:inset 0 2px 0 var(--accent)}
.list-card.lc-drag-below{box-shadow:inset 0 -2px 0 var(--accent)}
.list-card-menu-btn{background:none;border:none;color:var(--text3);cursor:pointer;padding:.2rem;flex-shrink:0;opacity:0;transition:opacity .15s;display:flex;align-items:center}
.list-card:hover .list-card-menu-btn{opacity:1}
.lists-empty{text-align:center;padding:2rem 1rem;color:var(--text2);font-size:.82rem}

/* Folders */
.folder-header{display:flex;align-items:center;gap:.5rem;padding:.45rem .75rem;border-radius:9px;cursor:pointer;margin-bottom:.2rem;margin-top:.5rem;transition:background .15s;border-left:3px solid transparent;-webkit-tap-highlight-color:transparent}
.folder-header:hover{background:var(--bg3)}
.folder-header .folder-dot{width:8px;height:8px;min-width:8px;border-radius:50%;flex-shrink:0}
.folder-name{flex:1;font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.folder-count{font-family:'Roboto Mono',monospace;font-size:.65rem;color:var(--text3);flex-shrink:0;background:var(--bg3);padding:.1rem .4rem;border-radius:4px}
.folder-chevron{flex-shrink:0;color:var(--text3);transition:transform .2s}
.folder-header.collapsed .folder-chevron{transform:rotate(-90deg)}
.folder-grip{color:var(--text3);cursor:grab;padding:.1rem;flex-shrink:0;opacity:0;transition:opacity .15s;display:flex;align-items:center}
.folder-header:hover .folder-grip{opacity:1}
.folder-menu-btn{background:none;border:none;color:var(--text3);cursor:pointer;padding:.2rem;flex-shrink:0;opacity:0;transition:opacity .15s;display:flex;align-items:center}
.folder-header:hover .folder-menu-btn{opacity:1}
.folder-header.dragging{opacity:.3}
.folder-header.lc-drag-above{box-shadow:inset 0 2px 0 var(--accent)}
.folder-header.lc-drag-below{box-shadow:inset 0 -2px 0 var(--accent)}
.list-card.in-folder{padding-left:1.75rem}
.modal-toggle{display:flex;gap:0;margin-bottom:1rem;background:var(--bg3);border-radius:8px;padding:3px;border:1px solid var(--border)}
.modal-toggle-btn{flex:1;padding:.45rem .5rem;border:none;border-radius:6px;background:transparent;color:var(--text2);font-family:'Space Grotesk',sans-serif;font-size:.82rem;font-weight:500;cursor:pointer;transition:all .15s}
.modal-toggle-btn.active{background:var(--bg);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,.12)}

/* Context menus */
.ctx-menu{position:fixed;z-index:250;background:var(--bg2);border:1px solid var(--border);border-radius:10px;padding:.35rem;min-width:160px;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.ctx-item{display:flex;align-items:center;gap:.5rem;padding:.5rem .65rem;border-radius:7px;font-size:.82rem;cursor:pointer;transition:background .12s;color:var(--text)}
.ctx-item:hover{background:var(--bg3)}
.ctx-item.ctx-active{color:var(--accent);font-weight:600}
.ctx-item.ctx-danger{color:var(--red)}
.ctx-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.ctx-colors{display:flex;gap:.4rem;padding:.5rem;min-width:auto}
.ctx-color-swatch{width:28px;height:28px;border-radius:50%;cursor:pointer;border:2px solid transparent;transition:transform .12s}
.ctx-color-swatch:hover{transform:scale(1.15)}
.ctx-color-swatch.ctx-active{border-color:var(--text)}

/* Templates toggle */
.mob-tpl-toggle{display:flex}

/* Templates */
.template-section{max-height:0;overflow:hidden;padding:0;border:none;transition:max-height .25s ease;flex-shrink:0}
.template-section.mob-open{max-height:400px;overflow-y:auto;padding:0 .5rem .75rem;border-top:1px solid var(--border)}
.template-item{display:flex;align-items:center;gap:.6rem;padding:.5rem .6rem;border-radius:7px;cursor:pointer;transition:background .15s;font-size:.78rem;color:var(--text2);-webkit-tap-highlight-color:transparent}
.template-item:hover{background:var(--bg3);color:var(--text)}
.template-item svg{flex-shrink:0;color:var(--text3)}

/* Right detail */
.list-detail{display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}
.list-detail-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--text3);text-align:center}
.list-detail-content{flex:1;display:flex;flex-direction:column;overflow:hidden}
.list-detail-header{padding:1rem 1.25rem .75rem;border-bottom:1px solid var(--border);background:var(--bg2);flex-shrink:0}
.list-detail-title-row{display:flex;align-items:center;gap:.65rem;margin-bottom:.65rem}
.list-color-dot{width:12px;height:12px;border-radius:50%;flex-shrink:0;cursor:pointer;transition:transform .15s;position:relative}
.list-color-dot:hover{transform:scale(1.3)}
.color-popup{position:absolute;top:calc(100% + 6px);left:0;display:flex;gap:.4rem;padding:.5rem .6rem;background:var(--bg2);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow);z-index:50;animation:pageIn .12s ease}
.color-popup .cp-swatch{width:22px;height:22px;border-radius:50%;cursor:pointer;border:2px solid transparent;transition:transform .12s,border-color .12s;-webkit-tap-highlight-color:transparent}
.color-popup .cp-swatch:hover{transform:scale(1.15)}
.color-popup .cp-swatch.active{border-color:var(--text);transform:scale(1.15)}
.list-detail-title{font-size:1.05rem;font-weight:600;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.list-progress-bar{height:4px;background:var(--border);border-radius:2px;margin-bottom:.35rem;overflow:hidden}
.list-progress-fill{height:100%;background:var(--accent);border-radius:2px;transition:width .3s ease}
.list-progress-label{font-family:'Roboto Mono',monospace;font-size:.65rem;color:var(--text3)}
.list-items-wrap{flex:1;overflow-y:auto;padding:.75rem 1.25rem;scrollbar-width:thin;scrollbar-color:var(--scrollbar) transparent}

/* List items */
.list-item{display:flex;align-items:center;gap:.75rem;padding:.6rem 0;border-bottom:1px solid var(--border);animation:pageIn .15s ease;position:relative}
.list-item:last-child{border-bottom:none}
.item-grip{color:var(--text3);cursor:grab;padding:.15rem;flex-shrink:0;touch-action:none;opacity:0;transition:opacity .15s;display:flex;align-items:center}
.list-item:hover .item-grip{opacity:1}
.list-item.dragging{opacity:.4;background:var(--bg3);border-radius:6px}
.list-item.drag-over-above{box-shadow:inset 0 2px 0 var(--accent)}
.list-item.drag-over-below{box-shadow:inset 0 -2px 0 var(--accent)}
.item-check{width:20px;height:20px;min-width:20px;border:2px solid var(--border2);border-radius:5px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;flex-shrink:0;-webkit-tap-highlight-color:transparent}
.item-check:hover{border-color:var(--accent)}
.item-check.checked{background:var(--accent);border-color:var(--accent)}
.item-check.checked svg{display:block}
.item-check svg{display:none;color:#0c0f14}
.item-text{flex:1;font-size:.88rem;transition:all .15s;word-break:break-word}
.item-text.checked{text-decoration:line-through;color:var(--text3)}
.item-delete{opacity:0;background:none;border:none;color:var(--text3);cursor:pointer;padding:.2rem;border-radius:4px;transition:all .15s;flex-shrink:0}
.list-item:hover .item-delete{opacity:1}
.item-delete:hover{color:var(--red)}

/* Enhanced item fields */
.item-main{flex:1;min-width:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
.item-top-row{display:flex;align-items:center;gap:.5rem}
.item-qty-badge{font-family:'Roboto Mono',monospace;font-size:.62rem;font-weight:700;background:var(--accent-bg);color:var(--accent);border:1px solid var(--accent-br);border-radius:4px;padding:.08rem .35rem;flex-shrink:0;line-height:1.2}
.item-check.checked ~ .item-main .item-qty-badge{opacity:.4}
.item-note{font-size:.72rem;color:var(--text3);margin-top:.2rem;line-height:1.4;word-break:break-word}
.item-thumb-wrap{flex-shrink:0;width:36px;height:36px;border-radius:6px;overflow:hidden;border:1px solid var(--border);cursor:pointer;-webkit-tap-highlight-color:transparent}
.item-thumb-wrap img{width:100%;height:100%;object-fit:cover;display:block}
.item-check.checked ~ .item-main .item-text{text-decoration:line-through;color:var(--text3)}
.item-check.checked ~ .item-main .item-note{text-decoration:line-through;opacity:.5}
.item-check.checked ~ .item-thumb-wrap{opacity:.4}

/* Item edit modal */
.item-modal{position:fixed;inset:0;background:var(--overlay);z-index:210;display:flex;align-items:flex-end;justify-content:center}
.item-modal-content{background:var(--bg2);border-radius:16px 16px 0 0;padding:1.25rem;width:100%;max-width:520px;max-height:85vh;overflow-y:auto}
.item-modal-grid{display:grid;grid-template-columns:1fr 80px;gap:.65rem;margin-bottom:.75rem;align-items:end}
.item-photo-area{display:flex;flex-direction:column;align-items:center;gap:.5rem;margin-bottom:.75rem}
.item-photo-preview{width:100%;max-width:180px;aspect-ratio:1;border-radius:10px;border:2px dashed var(--border2);display:flex;align-items:center;justify-content:center;overflow:hidden;cursor:pointer;transition:border-color .15s;background:var(--bg3);-webkit-tap-highlight-color:transparent}
.item-photo-preview:hover{border-color:var(--accent)}
.item-photo-preview.has-image{border-style:solid}
.item-photo-preview img{width:100%;height:100%;object-fit:cover}
.item-photo-preview .photo-placeholder{display:flex;flex-direction:column;align-items:center;gap:.35rem;color:var(--text3);font-size:.72rem}
.item-photo-actions{display:flex;gap:.4rem}
.item-photo-btn{padding:.35rem .7rem;border-radius:6px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);font-family:'Space Grotesk',sans-serif;font-size:.72rem;cursor:pointer;transition:all .15s;display:flex;align-items:center;gap:.3rem}
.item-photo-btn:hover{border-color:var(--border2);color:var(--text)}
.item-photo-btn.danger{color:var(--red);border-color:var(--red-br)}
.item-photo-btn.danger:hover{background:var(--red-bg)}

/* Image lightbox */
.doc-viewer{position:fixed;inset:0;z-index:300;display:none;align-items:center;justify-content:center}
.doc-viewer-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.92)}
.doc-viewer-chrome{position:relative;width:96vw;height:94vh;display:flex;flex-direction:column}
.doc-viewer-toolbar{display:flex;justify-content:flex-end;gap:.5rem;padding:.4rem .5rem;position:absolute;top:0;right:0;z-index:10}
.doc-viewer-dl{display:flex;align-items:center;justify-content:center;width:2.2rem;height:2.2rem;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;text-decoration:none;transition:background .15s}
.doc-viewer-dl:hover{background:rgba(255,255,255,.3)}
.doc-viewer-close{display:flex;align-items:center;justify-content:center;width:2.2rem;height:2.2rem;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;border:none;font-size:1.4rem;cursor:pointer;transition:background .15s}
.doc-viewer-close:hover{background:rgba(255,255,255,.3)}
.doc-viewer-body{flex:1;display:flex;align-items:center;justify-content:center;overflow:auto}
.doc-viewer-img{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}
.doc-viewer-pdf{width:100%;height:100%;border:none;border-radius:4px;background:#fff}
.doc-viewer-iframe{width:100%;height:100%;border:none;border-radius:4px;background:#fff}

/* Add item row */
.add-item-row{display:flex;gap:.5rem;padding:.75rem 1.25rem;border-top:1px solid var(--border);background:var(--bg2);flex-shrink:0}
.add-item-input{flex:1;background:var(--input-bg);border:1px solid var(--border);border-radius:8px;padding:.6rem .8rem;color:var(--text);font-family:'Space Grotesk',sans-serif;font-size:.88rem;transition:border-color .15s;min-height:40px}
.add-item-input:focus{outline:none;border-color:var(--accent)}
.add-item-btn{padding:.6rem 1.1rem;background:var(--accent);color:#0c0f14;border:none;border-radius:8px;font-family:'Space Grotesk',sans-serif;font-size:.85rem;font-weight:600;cursor:pointer;transition:opacity .15s;white-space:nowrap;min-height:40px}
.add-item-btn:hover{opacity:.88}

/* Modal */
.pac-container{z-index:300!important}
#campModalNameWrap gmp-place-autocomplete{display:block;width:100%;--gmpx-color-surface:var(--input-bg);--gmpx-color-on-surface:var(--text);--gmpx-color-on-surface-variant:var(--text3);--gmpx-color-outline:var(--border);--gmpx-color-primary:var(--accent);--gmpx-font-family-base:'Space Grotesk',sans-serif;--gmpx-font-size-base:.95rem;--gmpx-border-radius:8px;margin-bottom:1rem}
.camp-map-btn{display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .75rem;margin-top:.5rem;background:var(--accent);color:var(--bg);border:none;border-radius:8px;font-size:.82rem;font-weight:600;cursor:pointer;font-family:inherit}
.camp-map-btn:hover{opacity:.85}
.map-pdf-badge{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;padding:1rem;color:var(--accent);height:100%}
.map-pdf-badge span{font-size:.8rem;font-weight:600}
.camp-docs-list{display:flex;flex-direction:column;gap:.35rem}
.camp-docs-empty{font-size:.8rem;color:var(--text3);padding:.4rem 0}
.camp-doc-item{display:flex;align-items:center;gap:.5rem;padding:.4rem .6rem;background:var(--bg3);border:1px solid var(--border);border-radius:8px}
.camp-doc-view{display:flex;align-items:center;color:var(--accent);background:none;border:none;cursor:pointer;padding:0}
.camp-doc-icon{display:flex;align-items:center;color:var(--text2)}
.camp-doc-name{flex:1;font-size:.8rem;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.camp-doc-remove{background:none;border:none;color:var(--red);font-size:1.1rem;cursor:pointer;padding:0 .2rem;line-height:1;opacity:.7}
.camp-doc-remove:hover{opacity:1}
.modal{position:fixed;inset:0;background:var(--overlay);z-index:200;display:flex;align-items:flex-end;justify-content:center}
.modal-content{background:var(--bg2);border-radius:16px 16px 0 0;padding:1.25rem;width:100%;max-width:480px;max-height:calc(100dvh - 2rem);overflow-y:auto;-webkit-overflow-scrolling:touch}
.modal-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}
.modal-header h3{font-size:1rem;font-weight:600}
.modal-input{width:100%;background:var(--input-bg);border:1px solid var(--border);border-radius:8px;padding:.7rem .9rem;color:var(--text);font-family:'Space Grotesk',sans-serif;font-size:.95rem;margin-bottom:1rem;min-height:44px}
.modal-input:focus{outline:none;border-color:var(--accent)}
.modal-textarea{resize:vertical;min-height:88px;line-height:1.5;font-size:.88rem}
.color-picker{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}
.color-swatch{width:28px;height:28px;border-radius:50%;cursor:pointer;border:2px solid transparent;transition:transform .15s,border-color .15s;-webkit-tap-highlight-color:transparent}
.color-swatch:hover{transform:scale(1.15)}
.color-swatch.selected{border-color:var(--text);transform:scale(1.15)}
.modal-btn{width:100%;padding:.75rem;background:var(--accent);color:#0c0f14;border:none;border-radius:10px;font-family:'Space Grotesk',sans-serif;font-size:.92rem;font-weight:600;cursor:pointer;min-height:44px}
.modal-btn:hover{opacity:.9}

/* icon-btn reuse */
.icon-btn{width:32px;height:32px;border-radius:7px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s;flex-shrink:0;-webkit-tap-highlight-color:transparent}
.icon-btn:hover{border-color:var(--border2);color:var(--text)}

@media(min-width:600px){
  .modal{align-items:center;padding:1rem}
  .modal-content{border-radius:14px}
  .item-modal{align-items:center;padding:1rem}
  .item-modal-content{border-radius:14px}
}

/* ══ MAINTENANCE TRACKER ══ */
.maint-page{display:flex;flex-direction:column;gap:.75rem}

/* Summary bar */
.maint-summary-bar{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:.75rem;align-items:center;background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:.85rem 1rem;margin-bottom:.25rem}
.maint-odometer-bar{display:flex;align-items:center;gap:.75rem;background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:.6rem 1rem;margin-bottom:.75rem}
.maint-odo-label{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--text2);white-space:nowrap}
.maint-odo-wrap{display:flex;align-items:center;gap:.25rem}
.maint-odo-input{width:8rem;padding:.35rem .5rem;background:var(--input-bg);border:1px solid var(--border);border-radius:8px;color:var(--text);font-family:'Roboto Mono',monospace;font-size:1rem;font-weight:700;text-align:right}
.maint-odo-input::placeholder{font-weight:400;font-size:.85rem;color:var(--text3)}
.maint-odo-unit{font-size:.8rem;color:var(--text2);font-weight:600}
.maint-odo-saved{font-size:.7rem;color:var(--green);opacity:0;transition:opacity .3s}
.maint-odo-saved.show{opacity:1}
.maint-sum-item{text-align:center}
.maint-sum-val{font-family:'Roboto Mono',monospace;font-size:1.5rem;font-weight:700;line-height:1}
.maint-sum-label{font-family:'Roboto Mono',monospace;font-size:.6rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text2);margin-top:.2rem}
.maint-log-all-btn{display:flex;align-items:center;gap:.4rem;padding:.5rem .85rem;border-radius:8px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);font-family:'Space Grotesk',sans-serif;font-size:.78rem;font-weight:500;cursor:pointer;transition:all .15s;white-space:nowrap}
.maint-log-all-btn:hover{border-color:var(--border2);color:var(--text)}

/* Service item card */
.maint-item{background:var(--bg2);border:1px solid var(--border);border-radius:12px;overflow:hidden;margin-bottom:.6rem;transition:border-color .15s}
.maint-item:hover{border-color:var(--border2)}
.maint-item-header{display:flex;align-items:center;gap:.75rem;padding:.8rem 1rem;cursor:pointer;-webkit-tap-highlight-color:transparent}
.maint-status-bar{width:4px;min-width:4px;height:36px;border-radius:2px;flex-shrink:0}
.status-ok .maint-status-bar{background:var(--green)}
.status-soon .maint-status-bar{background:var(--amber)}
.status-due .maint-status-bar{background:var(--red)}
.status-na .maint-status-bar{background:var(--border2)}
.maint-item-info{flex:1;min-width:0}
.maint-item-name{font-size:.88rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.maint-item-interval{font-family:'Roboto Mono',monospace;font-size:.65rem;color:var(--text2);margin-top:.15rem}
.maint-item-right{display:flex;flex-direction:column;align-items:flex-end;gap:.25rem;flex-shrink:0}
.maint-due-label{font-family:'Roboto Mono',monospace;font-size:.68rem;font-weight:600}
.status-ok .maint-due-label{color:var(--green)}
.status-soon .maint-due-label{color:var(--amber)}
.status-due .maint-due-label{color:var(--red)}
.status-na .maint-due-label{color:var(--text3)}
.maint-last-service{font-family:'Roboto Mono',monospace;font-size:.62rem;color:var(--text3)}

/* Expanded detail */
.maint-item-detail{display:none;padding:0 1rem .85rem 1rem;border-top:1px solid var(--border);animation:pageIn .15s ease}
.maint-item.expanded .maint-item-detail{display:block}
.maint-item.expanded .maint-chevron{transform:rotate(180deg)}
.maint-chevron{transition:transform .2s;color:var(--text3);flex-shrink:0}
.maint-notes-text{font-size:.78rem;color:var(--text2);line-height:1.6;margin:.65rem 0 .85rem;padding:.65rem .8rem;background:var(--bg3);border-radius:8px;border-left:3px solid var(--border2)}
.maint-detail-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.maint-btn{display:flex;align-items:center;gap:.4rem;padding:.45rem .85rem;border-radius:8px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);font-family:'Space Grotesk',sans-serif;font-size:.78rem;font-weight:500;cursor:pointer;transition:all .15s;-webkit-tap-highlight-color:transparent}
.maint-btn:hover{border-color:var(--border2);color:var(--text)}
.maint-btn-primary{border-color:var(--accent-br);background:var(--accent-bg);color:var(--accent)}
.maint-btn-primary:hover{background:var(--accent);color:#0c0f14}

/* Progress bar under name */
.maint-progress{height:3px;background:var(--border);border-radius:2px;margin-top:.4rem;overflow:hidden}
.maint-progress-fill{height:100%;border-radius:2px;transition:width .4s ease}
.status-ok .maint-progress-fill{background:var(--green)}
.status-soon .maint-progress-fill{background:var(--amber)}
.status-due .maint-progress-fill{background:var(--red)}

/* Log modal labels */
.log-label{display:block;font-family:'Roboto Mono',monospace;font-size:.62rem;text-transform:uppercase;letter-spacing:.08em;color:var(--text2);margin-bottom:.35rem}

/* History list */
.hist-entry{display:flex;align-items:flex-start;gap:.75rem;padding:.65rem 0;border-bottom:1px solid var(--border)}
.hist-entry:last-child{border-bottom:none}
.hist-dot{width:8px;height:8px;min-width:8px;border-radius:50%;background:var(--accent);margin-top:.35rem}
.hist-info{flex:1}
.hist-date{font-family:'Roboto Mono',monospace;font-size:.72rem;font-weight:600}
.hist-meta{font-size:.75rem;color:var(--text2);margin-top:.15rem}
.hist-notes{font-size:.72rem;color:var(--text3);margin-top:.1rem;font-style:italic}
.hist-delete{background:none;border:none;color:var(--text3);cursor:pointer;padding:.2rem;border-radius:4px;transition:color .15s;flex-shrink:0}
.hist-delete:hover{color:var(--red)}

/* Dashboard maintenance due rows — color update */
.maint-row .mr-icon{font-size:.85rem}

/* ══ WINTERIZE CHECKLIST ══ */
.wz-step{background:var(--bg2);border:1px solid var(--border);border-radius:12px;margin-bottom:.75rem;overflow:hidden;transition:border-color .15s}
.wz-step.wz-done{border-color:var(--green-br);opacity:.7}
.wz-step.wz-done .wz-step-header{background:var(--green-bg)}
.wz-step-header{display:flex;align-items:center;gap:.75rem;padding:.8rem 1rem;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .15s}
.wz-step-header:hover{background:var(--bg3)}
.wz-step-num{width:28px;height:28px;min-width:28px;border-radius:50%;background:var(--bg3);border:2px solid var(--border2);display:flex;align-items:center;justify-content:center;font-family:'Roboto Mono',monospace;font-size:.72rem;font-weight:700;color:var(--text2);transition:all .15s;flex-shrink:0}
.wz-done .wz-step-num{background:var(--green);border-color:var(--green);color:#0c0f14}
.wz-step-title{font-size:.88rem;font-weight:600;flex:1}
.wz-done .wz-step-title{text-decoration:line-through;color:var(--text2)}
.wz-step-detail{display:none;padding:0 1rem 1rem 1rem;border-top:1px solid var(--border);animation:pageIn .15s ease}
.wz-step.wz-expanded .wz-step-detail{display:block}
.wz-step.wz-expanded .wz-chevron{transform:rotate(180deg)}
.wz-chevron{transition:transform .2s;color:var(--text3);flex-shrink:0}
.wz-body{font-size:.82rem;color:var(--text2);line-height:1.7;margin-top:.65rem}
.wz-body strong{color:var(--text)}
.wz-warn{background:var(--amber-bg);border:1px solid var(--amber-br);border-radius:8px;padding:.6rem .8rem;font-size:.78rem;color:var(--amber);margin-top:.65rem;display:flex;align-items:flex-start;gap:.5rem}
.wz-warn-icon{flex-shrink:0;margin-top:1px}
.wz-sub{display:flex;flex-direction:column;gap:.4rem;margin-top:.65rem}
.wz-sub-item{display:flex;align-items:center;gap:.6rem;font-size:.82rem;color:var(--text2)}
.wz-sub-check{width:16px;height:16px;min-width:16px;border:2px solid var(--border2);border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s;flex-shrink:0;-webkit-tap-highlight-color:transparent}
.wz-sub-check:hover{border-color:var(--accent)}
.wz-sub-check.checked{background:var(--accent);border-color:var(--accent)}
.wz-sub-check.checked svg{display:block}
.wz-sub-check svg{display:none;color:#0c0f14}
.wz-sub-text.checked{text-decoration:line-through;color:var(--text3)}
.wz-mark-done{margin-top:.85rem;display:flex;align-items:center;gap:.4rem;padding:.5rem .85rem;border-radius:8px;border:1px solid var(--accent-br);background:var(--accent-bg);color:var(--accent);font-family:'Space Grotesk',sans-serif;font-size:.78rem;font-weight:600;cursor:pointer;transition:all .15s;-webkit-tap-highlight-color:transparent}
.wz-mark-done:hover{background:var(--accent);color:#0c0f14}
.wz-done .wz-mark-done{border-color:var(--border);background:var(--bg3);color:var(--text2)}

/* ══ CAMP SITES ══ */
#page-campsites{padding:0;overflow:hidden;height:100%}
#page-campsites.active{display:flex;flex-direction:column}
.camp-layout{display:grid;grid-template-columns:300px 1fr;flex:1;min-height:0;overflow:hidden}
.camp-sidebar{display:flex;flex-direction:column;border-right:1px solid var(--border);background:var(--bg2);overflow:hidden}
.camp-search{width:calc(100% - 1rem);margin:.5rem;background:var(--input-bg);border:1px solid var(--border);border-radius:8px;padding:.5rem .7rem;color:var(--text);font-family:'Space Grotesk',sans-serif;font-size:.82rem;transition:border-color .15s}
.camp-search:focus{outline:none;border-color:var(--accent)}
.camp-amenity-filters{display:flex;flex-wrap:wrap;gap:.3rem;padding:0 .5rem .5rem;max-height:0;overflow:hidden;transition:max-height .2s}
.camp-amenity-filters:has(.active){max-height:200px;overflow-y:auto}
.camp-amenity-filters.expanded{max-height:200px;overflow-y:auto}
@media(hover:hover){.camp-amenity-filters:hover{max-height:200px;overflow-y:auto}}
.camp-amenity-chip{padding:.2rem .5rem;border-radius:12px;border:1px solid var(--border);background:var(--bg3);color:var(--text3);font-family:'Space Grotesk',sans-serif;font-size:.65rem;font-weight:500;cursor:pointer;transition:all .15s;white-space:nowrap;-webkit-tap-highlight-color:transparent}
.camp-amenity-chip:hover{border-color:var(--border2);color:var(--text2)}
.camp-amenity-chip.active{border-color:var(--green-br);background:var(--green-bg);color:var(--green)}
.camp-cards{flex:1;overflow-y:auto;padding:.5rem;scrollbar-width:thin;scrollbar-color:var(--scrollbar) transparent}
.camp-card{display:flex;align-items:center;gap:.65rem;padding:.7rem .75rem;border-radius:9px;cursor:pointer;transition:background .15s;border:1px solid transparent;margin-bottom:.25rem;-webkit-tap-highlight-color:transparent}
.camp-card:hover{background:var(--bg3)}
.camp-card.active{background:var(--bg3);border-color:var(--border)}
.camp-card-info{flex:1;min-width:0}
.camp-card-name{font-size:.85rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.camp-card-addr{font-size:.7rem;color:var(--text3);margin-top:.1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.camp-card-meta{display:flex;align-items:center;gap:.5rem;margin-top:.3rem;flex-wrap:wrap}
.camp-card-stars{display:flex;gap:1px}
.camp-card-sites,.camp-card-visit{font-family:'Roboto Mono',monospace;font-size:.6rem;color:var(--text3)}
.camp-star{color:var(--border2);transition:color .1s;cursor:default;line-height:1}
.camp-star.filled{color:var(--amber)}
.camp-star-editor{display:flex;gap:.15rem;margin-bottom:.75rem}
.camp-star-btn{cursor:pointer;font-size:1.2rem;transition:transform .1s}
.camp-star-btn:hover{transform:scale(1.2)}

/* Camp detail right panel */
.camp-detail{display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}
.camp-detail-content{flex:1;display:flex;flex-direction:column;overflow:hidden}
.camp-detail-header{padding:1rem 1.25rem .75rem;border-bottom:1px solid var(--border);background:var(--bg2);flex-shrink:0}
.camp-detail-top{display:flex;gap:1rem;align-items:flex-start}
.camp-detail-info{flex:1;min-width:0}
.camp-detail-name{font-size:1.05rem;font-weight:600;margin-bottom:.4rem}
.camp-detail-addr{display:block;font-size:.78rem;color:var(--blue);text-decoration:none;margin-bottom:.3rem;word-break:break-word}
.camp-detail-addr:hover{text-decoration:underline}
.camp-detail-phone{display:block;font-size:.75rem;color:var(--text2);text-decoration:none;margin-bottom:.2rem}
.camp-back-btn{display:none}
.camp-detail-link{display:block;font-size:.72rem;color:var(--accent);text-decoration:none;margin-bottom:.3rem;word-break:break-all}
.camp-detail-link:hover{text-decoration:underline}
.camp-detail-stars{margin:.3rem 0;display:flex;gap:2px}
.camp-detail-notes{font-size:.78rem;color:var(--text2);line-height:1.5;margin-top:.4rem;padding:.5rem .7rem;background:var(--bg3);border-radius:8px;border-left:3px solid var(--border2)}
.camp-detail-actions{display:flex;gap:.4rem;flex-shrink:0}

/* Sites list */
.camp-sites-wrap{flex:1;overflow-y:auto;padding:.75rem 1.25rem;scrollbar-width:thin;scrollbar-color:var(--scrollbar) transparent}
.camp-sites-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}
.camp-site-meta{display:flex;gap:.3rem;flex-wrap:wrap;margin-top:.3rem}
.camp-site-meta .badge{font-size:.55rem;padding:.1rem .35rem}
.camp-site-thumb{width:36px;height:36px;border-radius:6px;overflow:hidden;border:1px solid var(--border);flex-shrink:0}
.camp-site-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.camp-site-rating{display:flex;gap:1px}
.camp-site-photo{margin:.65rem 0;border-radius:8px;overflow:hidden;max-width:300px}
.camp-site-photo img{width:100%;display:block;border-radius:8px}
.camp-amenity-list{display:flex;flex-wrap:wrap;gap:.3rem;margin:.5rem 0}
.camp-stay-timeline{margin-top:.75rem;border-top:1px solid var(--border);padding-top:.5rem}
.camp-stay-more{font-size:.72rem;color:var(--text3);padding:.3rem 0;text-align:center}

/* Amenity checkbox grid in site modal */
.camp-amenity-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.4rem;margin-bottom:.75rem}
.camp-amenity-check{display:flex;align-items:center;gap:.4rem;font-size:.75rem;color:var(--text2);cursor:pointer;padding:.25rem .4rem;border-radius:6px;transition:background .15s;-webkit-tap-highlight-color:transparent}
.camp-amenity-check:hover{background:var(--bg3)}
.camp-amenity-check input[type="checkbox"]{accent-color:var(--accent);width:14px;height:14px;cursor:pointer}
.camp-amenity-check span{user-select:none}

/* ══ SCROLLBAR ══ */
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--scrollbar);border-radius:3px}

/* ══ MAINTENANCE ATTACHMENTS ══ */

/* Log modal file section */
.log-file-section{margin-bottom:.75rem}
.log-file-preview{display:flex;flex-wrap:wrap;gap:.5rem;min-height:56px;padding:.5rem;background:var(--bg3);border:1px solid var(--border);border-radius:8px;margin-bottom:.5rem;align-items:center}
.log-file-empty{display:flex;align-items:center;gap:.5rem;color:var(--text3);font-size:.75rem;padding:.25rem .5rem;width:100%;justify-content:center}
.log-file-thumb{width:64px;height:64px;border-radius:6px;overflow:hidden;position:relative;border:1px solid var(--border);flex-shrink:0}
.log-file-thumb img{width:100%;height:100%;object-fit:cover}
.log-file-thumb.log-file-doc{display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--bg2);gap:.15rem}
.log-file-ext{font-family:'Roboto Mono',monospace;font-size:.6rem;font-weight:700;color:var(--accent);text-transform:uppercase}
.log-file-name{font-size:.55rem;color:var(--text3);text-align:center;padding:0 .2rem;word-break:break-all;line-height:1.2}
.log-file-remove{position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:50%;background:rgba(0,0,0,.7);color:#fff;border:none;font-size:.7rem;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1;transition:background .15s}
.log-file-remove:hover{background:var(--red)}
.log-attach-btn{display:flex;align-items:center;gap:.4rem;padding:.5rem .85rem;border-radius:8px;border:1px solid var(--accent-br);background:var(--accent-bg);color:var(--accent);font-family:'Space Grotesk',sans-serif;font-size:.78rem;font-weight:500;cursor:pointer;transition:all .15s;-webkit-tap-highlight-color:transparent}
.log-attach-btn:hover{background:var(--accent);color:#0c0f14}

/* History attachments */
.hist-attachments{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.4rem}
.hist-thumb{width:48px;height:48px;border-radius:5px;overflow:hidden;cursor:pointer;border:1px solid var(--border);transition:border-color .15s;flex-shrink:0}
.hist-thumb:hover{border-color:var(--accent)}
.hist-thumb img{width:100%;height:100%;object-fit:cover}
.hist-file-thumb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.15rem;background:var(--bg3);color:var(--accent)}
.hist-file-ext{font-size:.55rem;font-weight:700;letter-spacing:.04em}
.hist-file-link{display:inline-flex;align-items:center;gap:.3rem;padding:.25rem .5rem;border-radius:5px;border:1px solid var(--border);background:var(--bg3);color:var(--text2);font-size:.68rem;text-decoration:none;transition:all .15s}
.hist-file-link:hover{border-color:var(--accent);color:var(--accent)}

/* Maint item attachment badge */
.maint-attach-badge{display:inline-flex;align-items:center;gap:.2rem;margin-left:.4rem;font-family:'Roboto Mono',monospace;font-size:.58rem;color:var(--text3);vertical-align:middle}
.maint-attach-badge svg{flex-shrink:0}

/* Lightbox */

/* ══ RESPONSIVE ══ */
@media(max-width:768px){
  .sidebar{position:fixed;left:0;top:0;bottom:0;transform:translateX(-100%);z-index:100;width:220px!important;min-width:220px!important}
  .sidebar.mob-open{transform:translateX(0)}
  .mob-overlay.vis{display:block}
  .sidebar .logo-text,.sidebar .nav-label,.sidebar .sidebar-action .nav-label{opacity:1!important}
  .sidebar .drag-handle{opacity:0}
  .collapse-btn{display:none}
  .hamburger{display:flex}
  /* Safe area insets for iPhone notch/Dynamic Island */
  .topbar{padding-left:max(1rem, env(safe-area-inset-left));padding-right:max(1rem, env(safe-area-inset-right))}
  .page{padding-left:max(1rem, env(safe-area-inset-left));padding-right:max(1rem, env(safe-area-inset-right))}
  .lists-sidebar-header{padding-left:max(1rem, env(safe-area-inset-left))}
  .sync-bar{padding-left:max(1rem, env(safe-area-inset-left))}
  .list-cards{padding-left:max(.5rem, env(safe-area-inset-left))}
  .add-item-row{padding-left:max(.85rem, env(safe-area-inset-left));padding-right:max(.85rem, env(safe-area-inset-right))}
  .grid-2{grid-template-columns:1fr}
  .igrid{grid-template-columns:1fr}
  .igrid-3{grid-template-columns:1fr}
  .rgrid{grid-template-columns:1fr}
  /* Hide theme pill on mobile -- use Settings page instead */
  .topbar-actions .theme-pill{display:none}
  /* Show delete and grip on touch devices since hover isn't available */
  .item-delete{opacity:.6}
  .item-grip{opacity:.5}
  .list-card-grip{opacity:.5}
  .list-card-menu-btn{opacity:.7}
  .folder-grip{opacity:.5}
  .folder-menu-btn{opacity:.7}
  /* Lists page mobile layout */
  .lists-layout{grid-template-columns:1fr;grid-template-rows:auto 1fr}
  .lists-sidebar{border-right:none;border-bottom:1px solid var(--border);max-height:none;overflow:visible}
  .list-cards{max-height:120px;overflow-y:auto}
  .list-detail{min-height:0}
  .list-detail-header{padding:.65rem .85rem .5rem}
  .list-items-wrap{padding:.5rem .85rem}
  .add-item-row{padding:.6rem .85rem}
  /* Maint summary bar */
  .maint-summary-bar{grid-template-columns:1fr 1fr 1fr;row-gap:.5rem}
  .maint-log-all-btn{grid-column:1/-1;justify-content:center}
  /* Camp sites mobile */
  .camp-layout{grid-template-columns:1fr;grid-template-rows:1fr;position:relative}
  .camp-sidebar{border-right:none;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .camp-detail{position:absolute;inset:0;z-index:10;background:var(--bg);transform:translateX(100%);transition:transform .25s ease}
  .camp-detail.mob-active{transform:translateX(0)}
  .camp-back-btn{display:flex;align-items:center;gap:.35rem;padding:.5rem max(.85rem, env(safe-area-inset-left));font-size:.78rem;font-weight:600;color:var(--accent);background:none;border:none;border-bottom:1px solid var(--border);cursor:pointer;font-family:'Space Grotesk',sans-serif;-webkit-tap-highlight-color:transparent;width:100%}
  .camp-sites-wrap{padding:.5rem max(.85rem, env(safe-area-inset-right)) .5rem max(.85rem, env(safe-area-inset-left))}
  .camp-detail-header{padding:.65rem max(.85rem, env(safe-area-inset-right)) .5rem max(.85rem, env(safe-area-inset-left))}
  .camp-sidebar .camp-search{margin-left:max(.5rem, env(safe-area-inset-left));margin-right:max(.5rem, env(safe-area-inset-right))}
  .camp-amenity-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
  .camp-detail-top{flex-direction:column;gap:.5rem}
  .camp-detail-actions{align-self:flex-end}
  .maint-detail-actions{flex-wrap:wrap}
}
@media(max-width:480px){
  .page{padding:.85rem}
  .topbar{padding:0 .75rem}
  .stat-grid{grid-template-columns:repeat(3,1fr);gap:.5rem}
  .stat-card{padding:.7rem .6rem}
  .stat-value{font-size:1.15rem}
  .stat-sub{font-size:.62rem}
  .quick-links{grid-template-columns:repeat(3,1fr)}
  .camp-amenity-grid{grid-template-columns:1fr 1fr}
  .rc .pv{font-size:1.8rem}
  .quick-link{padding:.75rem .5rem}
  .ql-icon{width:30px;height:30px;font-size:.9rem}
  .ql-label{font-size:.58rem}
  .dash-status-bar{flex-wrap:wrap;gap:.5rem;padding:.6rem .75rem}
  .dash-status-bar .badge{margin-left:auto}
}
