/* =====================================================================
   GearVault CSS — single bundle
   Combined from gv-modern.css + gv-bridge.css + gv-ui.css in that order
   so cascade behavior is identical to the previous 3-file setup.
   ===================================================================== */

/* ─── ORIGIN: gv-modern.css ─────────────────────────────────────────── */
/* GearVault — modern design system (shared) */
:root{
  --bg:#0b0e14;
  --surface:#11151e;
  --surface-2:#171c28;
  --surface-3:#1e2533;
  --border:#1f2738;
  --border-2:#2a3447;
  --text:#eef1f6;
  --text-2:#94a3b8;
  --text-3:#5b6781;
  --text-4:#3e4a62;

  --accent:#f5a623;
  --accent-soft:#f5a62318;
  --accent-ring:#f5a62333;

  --teal:#2dd4a0;
  --teal-soft:#2dd4a014;
  --red:#ef4f4f;
  --red-soft:#ef4f4f14;
  --blue:#5b8def;
  --blue-soft:#5b8def14;
  --purple:#9d7cf4;
  --purple-soft:#9d7cf414;
  --green:#6abf69;

  --radius-sm:6px;
  --radius:10px;
  --radius-lg:14px;
  --radius-xl:18px;

  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow:0 4px 16px rgba(0,0,0,.35);
  --shadow-lg:0 12px 40px rgba(0,0,0,.5);

  --t-fast:120ms;
  --t-med:220ms;
  --t-slow:380ms;
  --ease:cubic-bezier(.2,.7,.2,1);
  --ease-out:cubic-bezier(.16,1,.3,1);

  font-family:"DM Sans",system-ui,sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;
  font-feature-settings:"ss01","cv11";-webkit-font-smoothing:antialiased;
  /* NOTE: removed `overflow:hidden` from the source mockup so non-shell
     pages (login, reset, admin/branding) still scroll. The .shell layout
     below already clips overflow on inventory/calendar pages that need it. */
}
.eyebrow{font-size:10.5px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--text-3)}
.tnum{font-variant-numeric:tabular-nums}
button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}
input,select,textarea{font-family:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--radius-sm)}

/* SHELL */
.shell{display:flex;height:100vh;overflow:hidden}

/* SIDEBAR */
.sidebar{
  width:240px;flex-shrink:0;
  background:linear-gradient(180deg,var(--surface) 0%,#0e1320 100%);
  border-right:1px solid var(--border);
  display:flex;flex-direction:column;
  animation:slide-in-left .5s var(--ease-out) both;
}
@keyframes slide-in-left{from{transform:translateX(-12px);opacity:0}to{transform:translateX(0);opacity:1}}
.brand{padding:20px 18px 18px;display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--border)}
.brand-mark{
  width:34px;height:34px;border-radius:9px;
  background:linear-gradient(135deg,#f5a623 0%,#ff6b35 100%);
  display:grid;place-items:center;color:#1a0f00;
  box-shadow:0 4px 14px -2px var(--accent-ring),inset 0 1px 0 rgba(255,255,255,.2);
  position:relative;overflow:hidden;
}
.brand-mark::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 30% 20%,rgba(255,255,255,.3),transparent 60%)}
.brand-mark svg{position:relative;z-index:1}
.brand-name{font-size:15px;font-weight:600;letter-spacing:-.01em}
.brand-sub{font-size:10px;color:var(--text-3);letter-spacing:.16em;text-transform:uppercase;font-weight:500;margin-top:1px}

.nav{padding:14px 10px;flex:1;overflow-y:auto}
.nav-section{padding:14px 10px 6px;font-size:10.5px;color:var(--text-4);letter-spacing:.14em;text-transform:uppercase;font-weight:600}
.nav-section:first-child{padding-top:4px}
.nav-item{
  position:relative;display:flex;align-items:center;gap:11px;
  padding:9px 12px;border-radius:8px;color:var(--text-2);
  font-size:14px;font-weight:500;cursor:pointer;
  transition:color var(--t-fast) var(--ease),background var(--t-fast) var(--ease);
}
.nav-item svg{width:18px;height:18px;flex-shrink:0;stroke:currentColor;stroke-width:1.8;transition:transform var(--t-med) var(--ease)}
.nav-item:hover{color:var(--text);background:var(--surface-2)}
.nav-item:hover svg{transform:translateX(1px)}
.nav-item.active{color:var(--accent);background:var(--accent-soft)}
.nav-item.active::before{
  content:"";position:absolute;left:0;top:6px;bottom:6px;width:3px;
  background:var(--accent);border-radius:0 3px 3px 0;box-shadow:0 0 12px var(--accent-ring);
  animation:pill-grow .3s var(--ease-out);
}
@keyframes pill-grow{from{transform:scaleY(.4);opacity:0}to{transform:scaleY(1);opacity:1}}
.nav-badge{margin-left:auto;background:var(--accent);color:#1a0f00;font-size:11px;font-weight:600;padding:1px 7px;border-radius:999px;min-width:22px;text-align:center;font-variant-numeric:tabular-nums}

.sidebar-foot{padding:14px;border-top:1px solid var(--border)}
.user-row{display:flex;align-items:center;gap:10px}
.avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#9d7cf4,#5b8def);display:grid;place-items:center;font-size:12px;font-weight:600;color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.2)}
.user-name{font-size:13.5px;font-weight:500;line-height:1.2}
.user-role{font-size:11px;color:var(--text-3);margin-top:1px}
.foot-buttons{display:flex;gap:6px;margin-top:12px}
.foot-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:7px 10px;border-radius:7px;border:1px solid var(--border);color:var(--text-2);font-size:12.5px;font-weight:500;transition:all var(--t-fast) var(--ease)}
.foot-btn:hover{background:var(--surface-2);color:var(--text);border-color:var(--border-2)}
.foot-btn svg{width:13px;height:13px;stroke:currentColor;stroke-width:1.8}
.api-status{display:flex;align-items:center;gap:7px;margin-top:12px;font-size:11px;color:var(--text-3);letter-spacing:.04em}
.api-dot{width:7px;height:7px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 0 var(--teal);animation:pulse-dot 2.4s infinite}
@keyframes pulse-dot{
  0%{box-shadow:0 0 0 0 rgba(45,212,160,.6)}
  70%{box-shadow:0 0 0 6px rgba(45,212,160,0)}
  100%{box-shadow:0 0 0 0 rgba(45,212,160,0)}
}

/* MAIN */
.main{flex:1;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.topbar{
  padding:16px 28px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:14px;
  background:linear-gradient(180deg,var(--surface) 0%,rgba(17,21,30,.6) 100%);
  backdrop-filter:blur(8px);position:relative;z-index:5;
}
.page-title{font-size:20px;font-weight:600;letter-spacing:-.02em;flex:1;display:flex;align-items:center;gap:10px;animation:fade-down .5s var(--ease-out) both}
@keyframes fade-down{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
.page-title-count{font-size:12px;font-weight:500;color:var(--text-3);background:var(--surface-2);padding:3px 9px;border-radius:999px;font-variant-numeric:tabular-nums;border:1px solid var(--border)}
.top-actions{display:flex;align-items:center;gap:8px}

.btn{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:8px;font-size:13.5px;font-weight:500;transition:all var(--t-fast) var(--ease);border:1px solid transparent;position:relative;overflow:hidden}
.btn svg{width:14px;height:14px;stroke:currentColor;stroke-width:2}
.btn:active{transform:translateY(1px) scale(.985)}
.btn-ghost{color:var(--text-2);border-color:var(--border);background:transparent}
.btn-ghost:hover{background:var(--surface-2);color:var(--text);border-color:var(--border-2)}
.btn-primary{background:linear-gradient(180deg,#f5b03c 0%,#f5a623 100%);color:#1a0f00;font-weight:600;box-shadow:0 1px 0 rgba(255,255,255,.15) inset,0 4px 14px -4px var(--accent-ring)}
.btn-primary:hover{filter:brightness(1.08);box-shadow:0 1px 0 rgba(255,255,255,.2) inset,0 6px 20px -4px var(--accent-ring)}
.btn-primary::before{content:"";position:absolute;inset:0;background:linear-gradient(120deg,transparent 30%,rgba(255,255,255,.35) 50%,transparent 70%);transform:translateX(-120%);transition:transform .65s var(--ease-out)}
.btn-primary:hover::before{transform:translateX(120%)}
.btn-danger{background:var(--red-soft);color:var(--red);border:1px solid #ef4f4f33}
.btn-danger:hover{background:var(--red);color:#fff}

.content{flex:1;overflow-y:auto;padding:24px 28px 40px}

/* STATS */
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:22px}
.stats-4{grid-template-columns:repeat(4,1fr)}
.stat-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);
  padding:18px 20px;position:relative;overflow:hidden;
  transition:border-color var(--t-fast) var(--ease);
  animation:stat-rise .55s var(--ease-out) both;
}
.stat-card:nth-child(1){animation-delay:.04s}
.stat-card:nth-child(2){animation-delay:.10s}
.stat-card:nth-child(3){animation-delay:.16s}
.stat-card:nth-child(4){animation-delay:.22s}
@keyframes stat-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.stat-card::after{content:"";position:absolute;inset:0;background:radial-gradient(140% 80% at 100% 0%,var(--glow,transparent),transparent 50%);opacity:.5;pointer-events:none}
.stat-card.teal{--glow:#2dd4a020}
.stat-card.blue{--glow:#5b8def20}
.stat-card.red{--glow:#ef4f4f20}
.stat-card.purple{--glow:#9d7cf420}
.stat-card.accent{--glow:#f5a62320}
.stat-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;position:relative;z-index:1}
.stat-label{font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--text-3)}
.stat-icon{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;background:var(--surface-2);transition:transform var(--t-med) var(--ease)}
.stat-card:hover .stat-icon{transform:rotate(-4deg) scale(1.05)}
.stat-icon svg{width:15px;height:15px;stroke-width:1.8}
.stat-card.teal .stat-icon{color:var(--teal);background:var(--teal-soft)}
.stat-card.blue .stat-icon{color:var(--blue);background:var(--blue-soft)}
.stat-card.red .stat-icon{color:var(--red);background:var(--red-soft)}
.stat-card.purple .stat-icon{color:var(--purple);background:var(--purple-soft)}
.stat-card.accent .stat-icon{color:var(--accent);background:var(--accent-soft)}
.stat-value{font-size:34px;font-weight:600;letter-spacing:-.03em;font-variant-numeric:tabular-nums;position:relative;z-index:1;line-height:1}
.stat-card.teal .stat-value{color:var(--teal)}
.stat-card.blue .stat-value{color:var(--blue)}
.stat-card.red .stat-value{color:var(--red)}
.stat-card.purple .stat-value{color:var(--purple)}
.stat-card.accent .stat-value{color:var(--accent)}
.stat-sub{font-size:12.5px;color:var(--text-3);margin-top:6px;position:relative;z-index:1}
.stat-trend{display:inline-flex;align-items:center;gap:3px;color:var(--teal);margin-left:6px;font-weight:500}
.stat-trend svg{width:11px;height:11px;stroke-width:2.2}

/* SEARCH + FILTERS */
.search-wrap{position:relative;margin-bottom:16px;animation:fade-up .55s var(--ease-out) both;animation-delay:.22s}
@keyframes fade-up{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.search-input{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:11px 14px 11px 42px;font-size:14px;color:var(--text);outline:none;transition:border-color var(--t-fast) var(--ease),box-shadow var(--t-fast) var(--ease),background var(--t-fast) var(--ease)}
.search-input::placeholder{color:var(--text-3)}
.search-input:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-ring);background:var(--surface-2)}
.search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text-3);pointer-events:none;transition:color var(--t-fast) var(--ease)}
.search-wrap:focus-within .search-icon{color:var(--accent)}
.search-kbd{position:absolute;right:14px;top:50%;transform:translateY(-50%);display:flex;gap:3px;color:var(--text-3);font-size:11px}
.kbd{background:var(--surface-2);border:1px solid var(--border);padding:2px 6px;border-radius:4px;font-size:10.5px;box-shadow:0 1px 0 var(--border)}

.filter-row{display:flex;align-items:center;gap:8px;margin-bottom:20px;flex-wrap:wrap;animation:fade-up .55s var(--ease-out) both;animation-delay:.28s}
.chip{display:inline-flex;align-items:center;gap:6px;padding:6px 13px;border-radius:999px;border:1px solid var(--border);color:var(--text-2);font-size:13px;font-weight:500;background:transparent;transition:all var(--t-fast) var(--ease);position:relative}
.chip svg{width:13px;height:13px;stroke-width:1.8}
.chip:hover{border-color:var(--border-2);color:var(--text);background:var(--surface)}
.chip.active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.chip .count{font-size:11px;color:var(--text-4);font-variant-numeric:tabular-nums;background:var(--surface-2);padding:1px 6px;border-radius:999px;transition:all var(--t-fast) var(--ease)}
.chip.active .count{background:var(--accent);color:#1a0f00}
.chip-spacer{flex:1}
.view-toggle{display:inline-flex;border:1px solid var(--border);border-radius:8px;padding:2px;background:var(--surface);gap:1px}
.view-toggle button{padding:5px 10px;border-radius:6px;color:var(--text-3);display:grid;place-items:center;transition:all var(--t-fast) var(--ease)}
.view-toggle button svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.8}
.view-toggle button:hover{color:var(--text)}
.view-toggle button.active{background:var(--surface-3);color:var(--text)}

/* CARD CONTAINER */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}

/* TABLE */
table{width:100%;border-collapse:collapse}
thead th{text-align:left;padding:12px 18px;font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--text-3);background:var(--surface-2);border-bottom:1px solid var(--border);white-space:nowrap}
thead th.sortable{cursor:pointer;transition:color var(--t-fast) var(--ease);user-select:none}
thead th.sortable:hover{color:var(--text)}
thead th .sort-chev{margin-left:4px;opacity:.5}
thead th.active{color:var(--accent)}
thead th.active .sort-chev{opacity:1;color:var(--accent)}
tbody tr{border-bottom:1px solid var(--border);transition:background var(--t-fast) var(--ease);cursor:pointer;animation:row-in .45s var(--ease-out) both}
tbody tr:nth-child(1){animation-delay:.36s}
tbody tr:nth-child(2){animation-delay:.40s}
tbody tr:nth-child(3){animation-delay:.44s}
tbody tr:nth-child(4){animation-delay:.48s}
tbody tr:nth-child(5){animation-delay:.52s}
tbody tr:nth-child(6){animation-delay:.56s}
tbody tr:nth-child(7){animation-delay:.60s}
tbody tr:nth-child(8){animation-delay:.64s}
@keyframes row-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
tbody tr:hover{background:var(--surface-2)}
tbody tr:last-child{border-bottom:none}
tbody td{padding:14px 18px;font-size:14px;vertical-align:middle}

.item-cell{display:flex;align-items:center;gap:12px;min-width:0}
.item-thumb{width:38px;height:38px;border-radius:9px;flex-shrink:0;display:grid;place-items:center;background:var(--surface-2);border:1px solid var(--border);color:var(--text-2);transition:transform var(--t-fast) var(--ease),border-color var(--t-fast) var(--ease)}
.item-thumb svg{width:18px;height:18px;stroke-width:1.7}
tbody tr:hover .item-thumb{transform:scale(1.04);border-color:var(--border-2)}
.item-thumb.camera{color:#5b8def;background:#5b8def0e;border-color:#5b8def33}
.item-thumb.audio{color:#2dd4a0;background:#2dd4a00e;border-color:#2dd4a033}
.item-thumb.lighting{color:#f5a623;background:#f5a62310;border-color:#f5a62333}
.item-thumb.support{color:#9d7cf4;background:#9d7cf40e;border-color:#9d7cf433}
.item-thumb.cable{color:#94a3b8;background:#94a3b80e;border-color:#94a3b833}
/* Real-photo thumbnail variant — drops the icon tinting and shows the image
   itself, sized via background-image cover so non-square uploads still fill
   the tile cleanly. */
.item-thumb.item-thumb-photo{background-size:cover;background-position:center;background-repeat:no-repeat;background-color:var(--surface-2)}
/* Item-info image gallery (detail panel). Renders a horizontal strip of
   thumbnails with primary marked, a delete button, and a "set primary" hover
   action. The Add row underneath shows three input methods (upload, URL, search). */
.gv-img-gallery{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}
.gv-img-tile{position:relative;width:120px;height:120px;border-radius:10px;border:1px solid var(--border);background:var(--surface-2) center/cover no-repeat;overflow:hidden;cursor:zoom-in}
.gv-img-tile.is-primary{outline:2px solid var(--accent);outline-offset:-2px}
.gv-img-tile .gv-img-badge{position:absolute;top:6px;left:6px;background:rgba(0,0,0,.65);color:#fff;font-size:0.65rem;padding:2px 6px;border-radius:4px;text-transform:uppercase;letter-spacing:.04em;pointer-events:none}
.gv-img-tile .gv-img-actions{position:absolute;inset:auto 0 0 0;display:flex;justify-content:space-between;gap:4px;padding:4px;background:linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));opacity:0;transition:opacity .15s}
.gv-img-tile:hover .gv-img-actions, .gv-img-tile:focus-within .gv-img-actions{opacity:1}
.gv-img-tile .gv-img-actions button{flex:1;font-size:0.7rem;padding:3px 4px;border-radius:4px;border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.45);color:#fff;cursor:pointer}
.gv-img-tile .gv-img-actions button:hover{background:rgba(0,0,0,.7)}
.gv-img-tile .gv-img-actions button.danger{background:rgba(180,30,30,.6);border-color:rgba(255,120,120,.5)}
.gv-img-add-bar{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding:10px;border:1px dashed var(--border);border-radius:8px;background:var(--surface-2)}
.gv-img-add-bar button, .gv-img-add-bar label.gv-img-upload{font-size:0.78rem;padding:6px 10px;border-radius:6px;border:1px solid var(--border-2);background:var(--surface);color:var(--text);cursor:pointer}
.gv-img-add-bar button:hover, .gv-img-add-bar label.gv-img-upload:hover{border-color:var(--accent);color:var(--accent)}
.gv-img-add-bar input[type=file]{display:none}
.gv-img-add-cap{font-size:0.72rem;color:var(--text-3);margin-left:auto;align-self:center}
.gv-img-search-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px;margin-top:10px;max-height:50vh;overflow:auto;padding:4px}
.gv-img-search-grid .gv-img-result{position:relative;aspect-ratio:1/1;background:var(--surface-2) center/cover no-repeat;border:1px solid var(--border);border-radius:8px;cursor:pointer;overflow:hidden}
.gv-img-search-grid .gv-img-result:hover{border-color:var(--accent)}
.gv-img-search-grid .gv-img-result.loading::after{content:'';position:absolute;inset:0;background:rgba(0,0,0,.45) center/30px no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 50 50'><circle cx='25' cy='25' r='20' fill='none' stroke='%23fff' stroke-width='4' stroke-dasharray='80' stroke-dashoffset='30'><animateTransform attributeName='transform' type='rotate' dur='1s' from='0 25 25' to='360 25 25' repeatCount='indefinite'/></circle></svg>")}
.gv-img-lightbox{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;background:rgba(0,0,0,.85);display:none;align-items:center;justify-content:center;z-index:2147483647;isolation:isolate;cursor:zoom-out}
.gv-img-lightbox.open{display:flex}
.gv-img-lightbox img{max-width:92vw;max-height:92vh;border-radius:8px;box-shadow:0 8px 40px rgba(0,0,0,.6)}
.item-name{font-weight:500;letter-spacing:-.005em;display:flex;align-items:center;gap:8px}
.tag-pill{font-size:11px;font-weight:500;color:var(--accent);background:var(--accent-soft);border:1px solid var(--accent-ring);padding:1px 7px;border-radius:5px;font-variant-numeric:tabular-nums}
.item-sub{font-size:12px;color:var(--text-3);margin-top:2px}
.cell-muted{color:var(--text-2)}
.cell-mono{font-variant-numeric:tabular-nums;color:var(--text-3);font-size:13px}

.badge{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:500;padding:3px 9px;border-radius:999px;border:1px solid}
.badge-dot{width:6px;height:6px;border-radius:50%;background:currentColor}
.badge.excellent{color:var(--teal);border-color:#2dd4a040;background:var(--teal-soft)}
.badge.good{color:var(--green);border-color:#6abf6940;background:#6abf6914}
.badge.fair{color:var(--accent);border-color:var(--accent-ring);background:var(--accent-soft)}
.badge.poor{color:var(--red);border-color:#ef4f4f40;background:var(--red-soft)}
.badge.neutral{color:var(--text-2);border-color:var(--border-2);background:var(--surface-2)}
.badge.blue{color:var(--blue);border-color:#5b8def40;background:var(--blue-soft)}
.badge.purple{color:var(--purple);border-color:#9d7cf440;background:var(--purple-soft)}

.status{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:500}
.status-dot{width:8px;height:8px;border-radius:50%;position:relative}
.status.available{color:var(--teal)}
.status.available .status-dot{background:var(--teal)}
.status.available .status-dot::after{content:"";position:absolute;inset:-3px;border-radius:50%;border:1.5px solid var(--teal);opacity:.5;animation:ring 2s ease-out infinite}
@keyframes ring{0%{transform:scale(.6);opacity:.7}100%{transform:scale(1.8);opacity:0}}
.status.checked-out{color:var(--accent)}
.status.checked-out .status-dot{background:var(--accent)}
.status.reserved{color:var(--blue)}
.status.reserved .status-dot{background:var(--blue)}
.status.maintenance{color:var(--red)}
.status.maintenance .status-dot{background:var(--red)}

.row-actions{display:flex;gap:4px;justify-content:flex-end;opacity:.6;transition:opacity var(--t-fast) var(--ease)}
tbody tr:hover .row-actions{opacity:1}
.icon-btn{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;color:var(--text-3);transition:all var(--t-fast) var(--ease)}
.icon-btn svg{width:14px;height:14px;stroke-width:1.8}
.icon-btn:hover{background:var(--surface-3);color:var(--text)}

/* TABS */
.tabs{display:flex;gap:2px;border-bottom:1px solid var(--border);margin-bottom:22px}
.tab{padding:11px 16px;font-size:14px;font-weight:500;color:var(--text-3);position:relative;transition:color var(--t-fast) var(--ease)}
.tab:hover{color:var(--text)}
.tab.active{color:var(--accent)}
.tab.active::after{content:"";position:absolute;left:8px;right:8px;bottom:-1px;height:2px;background:var(--accent);border-radius:2px;animation:tab-line .35s var(--ease-out)}
@keyframes tab-line{from{transform:scaleX(0);opacity:0}to{transform:scaleX(1);opacity:1}}
.tab .tab-count{margin-left:6px;font-size:11px;color:var(--text-4);background:var(--surface-2);padding:1px 6px;border-radius:999px;font-variant-numeric:tabular-nums}
.tab.active .tab-count{background:var(--accent-soft);color:var(--accent)}

::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:5px;border:2px solid var(--bg)}
::-webkit-scrollbar-thumb:hover{background:var(--border-2)}

/* TOAST */
.toast{position:fixed;bottom:24px;right:28px;background:var(--surface);border:1px solid var(--border);border-left:3px solid var(--teal);border-radius:var(--radius);padding:12px 16px 12px 14px;box-shadow:var(--shadow-lg);display:flex;align-items:center;gap:10px;font-size:13.5px;z-index:50;animation:toast-in .35s var(--ease-out) both}
.toast svg{width:16px;height:16px;color:var(--teal);stroke-width:2}
@keyframes toast-in{from{transform:translateY(20px) scale(.95);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}

/* PAGE SWITCH ANIMATION */
.page{animation:page-in .35s var(--ease-out) both}
.page.hidden{display:none}
@keyframes page-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

/* FORMS */
.form-grid{display:grid;gap:16px}
/* Restrict to explicitly-tagged form-labels. The bare `.form-group label`
   selector used to bleed into any nested <label> (e.g. the reservation
   picker's row labels), forcing them into uppercase mono styling. Every form
   label in index.html already has class="form-label", so tightening the
   selector loses no styling but stops the bleed. */
.form-group > label.form-label,
.form-group label.form-label{display:block;font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--text-3);margin-bottom:6px}
.form-input,.form-select,.form-textarea{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius);padding:10px 12px;font-size:14px;color:var(--text);outline:none;transition:border-color var(--t-fast) var(--ease),box-shadow var(--t-fast) var(--ease)}
.form-input:focus,.form-select:focus,.form-textarea:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-ring)}
.form-textarea{resize:vertical;min-height:80px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}

/* CALENDAR */
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.cal-head{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:8px}
.cal-dow{text-align:center;font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--text-3);padding:6px 0}
.cal-day{
  aspect-ratio:1;border:1px solid var(--border);border-radius:var(--radius);
  background:var(--surface);padding:8px;
  display:flex;flex-direction:column;gap:4px;
  cursor:pointer;transition:all var(--t-fast) var(--ease);position:relative;overflow:hidden;
}
.cal-day:hover{border-color:var(--border-2);background:var(--surface-2);transform:translateY(-1px)}
.cal-day .d{font-size:13px;font-weight:500;color:var(--text-2);font-variant-numeric:tabular-nums}
.cal-day.muted{opacity:.35}
.cal-day.today{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent-ring)}
.cal-day.today .d{color:var(--accent);font-weight:600}
.cal-day.selected{background:var(--accent-soft);border-color:var(--accent)}
.cal-bar{font-size:10.5px;padding:2px 5px;border-radius:4px;background:var(--blue-soft);color:var(--blue);border-left:2px solid var(--blue);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.cal-bar.accent{background:var(--accent-soft);color:var(--accent);border-left-color:var(--accent)}
.cal-bar.teal{background:var(--teal-soft);color:var(--teal);border-left-color:var(--teal)}
.cal-bar.purple{background:var(--purple-soft);color:var(--purple);border-left-color:var(--purple)}
.cal-more{font-size:10px;color:var(--text-3);font-weight:500}

/* RESERVATION ITEM */
.res-row{display:flex;align-items:center;gap:14px;padding:16px 18px;border-bottom:1px solid var(--border);transition:background var(--t-fast) var(--ease);cursor:pointer;animation:row-in .45s var(--ease-out) both}
.res-row:hover{background:var(--surface-2)}
.res-row:last-child{border-bottom:none}
.res-date{flex-shrink:0;text-align:center;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);min-width:70px}
.res-date .mo{font-size:10.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--text-3)}
.res-date .day{font-size:22px;font-weight:600;line-height:1.1;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.res-main{flex:1;min-width:0}
.res-title{font-size:15px;font-weight:500;letter-spacing:-.01em}
.res-meta{font-size:12.5px;color:var(--text-3);margin-top:3px;display:flex;gap:14px;flex-wrap:wrap}
.res-meta svg{width:13px;height:13px;vertical-align:-2px;margin-right:4px;stroke-width:1.8}
.res-items{display:flex;gap:6px;margin-top:8px;flex-wrap:wrap}
.res-item-chip{font-size:11.5px;color:var(--text-2);background:var(--surface-3);border:1px solid var(--border);padding:2px 8px;border-radius:5px;display:inline-flex;align-items:center;gap:6px}
/* Generic (model-level) reservation chips: dashed border + faint accent tint so they
   read distinctly from specifically-pinned units in the reservation list. */
.res-item-chip.generic{border-style:dashed;color:var(--accent);background:transparent}

/* KIT CARD */
.kits-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.kit-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);
  padding:18px;transition:all var(--t-fast) var(--ease);cursor:pointer;
  animation:stat-rise .55s var(--ease-out) both;position:relative;overflow:hidden;
}
.kit-card:nth-child(1){animation-delay:.04s}
.kit-card:nth-child(2){animation-delay:.10s}
.kit-card:nth-child(3){animation-delay:.16s}
.kit-card:nth-child(4){animation-delay:.22s}
.kit-card:nth-child(5){animation-delay:.28s}
.kit-card:nth-child(6){animation-delay:.34s}
.kit-card:hover{border-color:var(--border-2);transform:translateY(-2px);box-shadow:var(--shadow)}
.kit-card::before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:linear-gradient(90deg,var(--accent),transparent);opacity:0;transition:opacity var(--t-fast) var(--ease)}
.kit-card:hover::before{opacity:1}
.kit-head{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:14px}
.kit-thumb{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;background:var(--purple-soft);color:var(--purple);border:1px solid #9d7cf433}
.kit-thumb svg{width:20px;height:20px;stroke-width:1.7}
.kit-name{font-size:16px;font-weight:600;letter-spacing:-.01em;margin-top:10px}
.kit-sub{font-size:12.5px;color:var(--text-3);margin-top:3px}
.kit-items-list{display:flex;flex-wrap:wrap;gap:5px;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}
.kit-pill{font-size:11.5px;color:var(--text-2);background:var(--surface-2);border:1px solid var(--border);padding:2px 8px;border-radius:5px}
.kit-foot{display:flex;align-items:center;justify-content:space-between;margin-top:14px}
.kit-meta{font-size:12px;color:var(--text-3);display:flex;align-items:center;gap:6px}
.kit-meta svg{width:13px;height:13px;stroke-width:1.8}

/* LIST CARD (maintenance, etc) */
.list-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden}
.list-row{display:flex;align-items:center;gap:14px;padding:16px 18px;border-bottom:1px solid var(--border);transition:background var(--t-fast) var(--ease);cursor:pointer;animation:row-in .45s var(--ease-out) both}
.list-row:hover{background:var(--surface-2)}
.list-row:last-child{border-bottom:none}

/* DIVIDER */
.divider{height:1px;background:var(--border);margin:20px 0}

/* SWATCH */
.swatch{width:32px;height:32px;border-radius:8px;border:1px solid var(--border);cursor:pointer;transition:transform var(--t-fast) var(--ease);position:relative}
.swatch:hover{transform:scale(1.05)}
.swatch.selected{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--accent)}

/* SECTION TITLE */
.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.section-title h3{font-size:15px;font-weight:600;letter-spacing:-.01em}

/* NOTE: this @media block used to collapse the sidebar into a 64px icon-only
   rail with labels hidden. The page now uses a slide-in drawer on phones/tablets
   (see the inline @media block in index.html — .sidebar becomes position:fixed,
   width:16.5rem, translateX(-100%) and slides in when .shell.gv-nav-open).
   Width/label/padding rules here fought the drawer and made it tiny + unusable.
   Only the stat-grid collapses are retained. */
@media (max-width:900px){
  .stats{grid-template-columns:1fr 1fr}
  .stats-4{grid-template-columns:1fr 1fr}
}

/* ─── ORIGIN: gv-bridge.css ─────────────────────────────────────────── */
/* GearVault — bridge stylesheet
   ──────────────────────────────────────────────────────────────────────────
   Maps the existing application's class names + CSS variables onto the
   modern design system defined in gv-modern.css. The goal: pick up the
   modern visual look without changing any markup or JavaScript.

   Load order on every page:
     1. Page's inline <style> block (legacy palette, layout)
     2. gv-modern.css     (modern tokens + base components)
     3. gv-bridge.css     (this file — overrides legacy selectors / aliases)
   ────────────────────────────────────────────────────────────────────────── */

/* ── LEGACY CSS-VARIABLE ALIASES ─────────────────────────────────────────
   Many inline styles in the existing HTML reference --text2, --text3,
   --surface2, --accent-dim, etc. Map them to the modern tokens so those
   inline rules render with the new palette automatically. */
:root{
  --text2:        var(--text-2);
  --text3:        var(--text-3);
  --surface2:     var(--surface-2);
  --surface3:     var(--surface-3);
  --border2:      var(--border-2);
  --accent-dim:   var(--accent-soft);
  --accent-glow:  var(--accent-ring);
  --teal-dim:     var(--teal-soft);
  --red-dim:      var(--red-soft);
  --blue-dim:     var(--blue-soft);
  --purple-dim:   var(--purple-soft);
  /* Body fallback used by login/reset pages that don't go through the shell. */
  --amber:        var(--accent);
  --amber-dim:    var(--accent-soft);
}

/* ── LEGACY LOGO SELECTORS → modern .brand-* equivalents ─────────────── */
.logo{
  padding:20px 18px 18px;display:flex;align-items:center;gap:11px;
  border-bottom:1px solid var(--border);
}
.logo-icon{
  width:34px;height:34px;border-radius:9px;
  background:var(--accent);
  display:grid;place-items:center;color:#1a0f00;
  font-size:1rem;font-weight:700;letter-spacing:-.02em;
  box-shadow:0 4px 14px -2px var(--accent-ring);
  position:relative;overflow:hidden;
}
/* Logo highlight removed — flat fill per design refresh. */
.logo-icon::after{display:none}
/* And on the modern .brand-mark used by the redesign HTML. */
.brand-mark{background:var(--accent) !important}
.brand-mark::after{display:none !important}
.logo-text{font-size:15px;font-weight:600;letter-spacing:-.01em}
.logo-sub{font-size:10px;color:var(--text-3);letter-spacing:.16em;text-transform:uppercase;font-weight:500;margin-top:1px}

/* ── SIDEBAR FOOTER + USER BADGE ─────────────────────────────────────── */
.sidebar-footer{padding:14px;border-top:1px solid var(--border)}
.user-badge{display:flex;align-items:center;gap:10px}
.user-info{flex:1;min-width:0}
.user-name{font-size:13.5px;font-weight:500;line-height:1.2}
.user-role{font-size:11px;color:var(--text-3);margin-top:1px;font-family:inherit;text-transform:none;letter-spacing:0}
.role-toggle{display:flex;gap:6px;margin-top:12px}
.role-btn{
  flex:1;padding:7px 10px;border-radius:7px;border:1px solid var(--border);
  color:var(--text-2);font-size:12.5px;font-weight:500;background:transparent;
  transition:all var(--t-fast) var(--ease);
}
.role-btn:hover{background:var(--surface-2);color:var(--text);border-color:var(--border-2)}
.role-btn.active{background:var(--accent);color:#1a0f00;border-color:var(--accent);font-weight:600}
.logout-btn{
  width:100%;display:flex;align-items:center;justify-content:center;gap:6px;
  padding:7px 10px;border-radius:7px;border:1px solid var(--border);
  color:var(--text-2);font-size:12.5px;font-weight:500;background:transparent;
  transition:all var(--t-fast) var(--ease);cursor:pointer;font-family:inherit;
}
.logout-btn:hover{background:var(--surface-2);color:var(--text);border-color:var(--border-2)}
.api-status{display:flex;align-items:center;gap:7px;margin-top:12px;font-size:11px;color:var(--text-3)}
.api-dot{width:7px;height:7px;border-radius:50%;background:var(--teal);box-shadow:0 0 0 0 var(--teal);animation:pulse-dot 2.4s infinite}
.api-dot.offline{background:var(--red);animation:none}

/* ── NAV-ITEM ICON wrapper. Old markup used emoji inside a fixed-width
       span; new markup wraps an <svg><use/></svg>. Both render at 18×18px and
       inherit the nav-item's currentColor for a clean color transition on
       hover / active state. */
.nav-icon{
  width:18px;height:18px;flex-shrink:0;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:1.07rem;line-height:1;
}
.nav-icon svg{
  width:18px;height:18px;stroke:currentColor;stroke-width:1.8;fill:none;
  transition:transform var(--t-med) var(--ease);
}
.nav-item:hover .nav-icon svg{transform:translateX(1px)}

/* ── LEGACY .stats-row → modern .stats grid ──────────────────────────── */
.stats-row{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}
.stats-row.stats-row-3{grid-template-columns:repeat(3,1fr)}
.stats-row.stats-row-4{grid-template-columns:repeat(4,1fr)}
@media (max-width:900px){
  .stats-row,.stats-row.stats-row-3,.stats-row.stats-row-4{grid-template-columns:1fr 1fr}
}

/* Legacy stat-card subclasses (.amber) → re-mapped to .accent for the modern glow. */
.stat-card.amber{--glow:#f5a62320}
.stat-card.amber .stat-icon{color:var(--accent);background:var(--accent-soft)}
.stat-card.amber .stat-value{color:var(--accent)}

/* ── LEGACY .filter-chip → modern .chip ──────────────────────────────── */
.filter-chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 13px;border-radius:999px;
  border:1px solid var(--border);background:transparent;
  color:var(--text-2);font-size:13px;font-weight:500;
  cursor:pointer;font-family:inherit;
  transition:all var(--t-fast) var(--ease);
}
.filter-chip:hover{border-color:var(--border-2);color:var(--text);background:var(--surface)}
.filter-chip.active{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}

/* ── LEGACY .unit-tag-pill → modern .tag-pill ────────────────────────── */
.unit-tag-pill{
  font-size:11px;font-weight:500;color:var(--accent);
  background:var(--accent-soft);border:1px solid var(--accent-ring);
  padding:1px 7px;border-radius:5px;font-variant-numeric:tabular-nums;
}

/* ── LEGACY STATUS TAG → modernized pill ─────────────────────────────── */
.status-tag{
  display:inline-flex;align-items:center;gap:5px;
  font-size:12px;font-weight:500;
  padding:3px 9px;border-radius:999px;border:1px solid;
  font-family:inherit;background:transparent;letter-spacing:0;text-transform:none;line-height:1.4;
}
.status-tag.available{color:var(--teal);border-color:#2dd4a040;background:var(--teal-soft)}
.status-tag.reserved{color:var(--blue);border-color:#5b8def40;background:var(--blue-soft)}
.status-tag.maintenance{color:var(--red);border-color:#ef4f4f40;background:var(--red-soft)}
.status-tag.checked-out{color:var(--accent);border-color:var(--accent-ring);background:var(--accent-soft)}
.status-tag.active{color:var(--teal);border-color:#2dd4a040;background:var(--teal-soft)}
.status-tag.pending{color:var(--accent);border-color:var(--accent-ring);background:var(--accent-soft)}
.status-tag.cancelled{color:var(--red);border-color:#ef4f4f40;background:var(--red-soft)}
.status-tag.archived{color:var(--text-3);border-color:var(--border-2);background:var(--surface-2)}
.status-tag.completed{color:var(--text-2);border-color:var(--border-2);background:var(--surface-2)}

/* ── LEGACY CONDITION BADGE — flat-pill upgrade ──────────────────────── */
.condition-badge{
  font-size:11px;font-weight:500;
  padding:1px 8px;border-radius:999px;
  font-family:var(--font,"Inter",sans-serif);font-variant-numeric:tabular-nums;
  background:transparent;border:1px solid;
}
.condition-badge.excellent{color:var(--teal);border-color:#2dd4a040;background:var(--teal-soft)}
.condition-badge.good{color:var(--green);border-color:#6abf6940;background:#6abf6914}
.condition-badge.fair{color:var(--accent);border-color:var(--accent-ring);background:var(--accent-soft)}
.condition-badge.poor{color:var(--red);border-color:#ef4f4f40;background:var(--red-soft)}

/* ── LEGACY .checkout-card / .pkg-card / .equip-card → modern card ───── */
.checkout-card,
.pkg-card,
.equip-card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);overflow:hidden;margin-bottom:10px;
  transition:all var(--t-fast) var(--ease);
}
.equip-card{cursor:pointer;padding:16px}
.equip-card:hover{border-color:var(--border-2);transform:translateY(-1px);box-shadow:var(--shadow)}
.checkout-header,.pkg-header{
  padding:14px 16px;background:var(--surface-2);
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:1px solid var(--border);gap:12px;
}
.checkout-body{padding:14px 16px}
.pkg-items{padding:12px 16px;display:flex;flex-wrap:wrap;gap:6px}
.pkg-name{font-size:15px;font-weight:600;letter-spacing:-.01em}
.pkg-badge{
  font-size:11px;padding:2px 8px;border-radius:999px;
  background:var(--purple-soft);color:var(--purple);
  border:1px solid #9d7cf440;font-variant-numeric:tabular-nums;font-family:inherit;
}
.pkg-item-chip{
  font-size:11.5px;color:var(--text-2);
  background:var(--surface-2);border:1px solid var(--border);
  padding:2px 8px;border-radius:5px;
}

/* Equipment row's name cell uses the redesign's .item-cell layout. Allow
   the inner .item-name to wrap (long model names) and the thumb to keep its
   square shape. */
.equip-table .item-cell{flex-wrap:nowrap;align-items:center;gap:10px;min-width:0}
.equip-table .item-name{display:flex;flex-wrap:wrap;align-items:center;gap:6px;line-height:1.3;word-break:break-word}
.equip-table .item-thumb{width:32px;height:32px;border-radius:8px}
.equip-table .item-thumb svg{width:16px;height:16px}
.equip-table .item-sub{font-size:11.5px;color:var(--text-3);margin-top:2px}

/* ── LEGACY .equip-table — keep structure, modernize palette ─────────── */
.equip-table{width:100%;border-collapse:collapse;font-size:14px;table-layout:fixed}
.equip-table th{
  text-align:left;padding:12px 14px;
  font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:var(--text-3);background:var(--surface-2);border-bottom:1px solid var(--border);
  white-space:nowrap;
}
.equip-table td{padding:12px 14px;border-bottom:1px solid var(--border);vertical-align:middle}
.equip-table tr{transition:background var(--t-fast) var(--ease)}
.equip-table tr:hover td{background:var(--surface-2)}

/* ── LEGACY FORM INPUTS — pick up modern focus rings ─────────────────── */
.form-input,.form-select,.form-textarea,.search-input{
  background:var(--surface-2);border:1px solid var(--border);
  border-radius:var(--radius);padding:10px 12px;
  font-size:14px;color:var(--text);outline:none;font-family:inherit;
  transition:border-color var(--t-fast) var(--ease),box-shadow var(--t-fast) var(--ease),background var(--t-fast) var(--ease);
}
.form-input:focus,.form-select:focus,.form-textarea:focus,.search-input:focus{
  border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-ring);
}
.form-label{
  display:block;font-size:11px;font-weight:600;letter-spacing:.1em;
  text-transform:uppercase;color:var(--text-3);margin-bottom:6px;font-family:inherit;
}
.form-group{margin-bottom:14px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}

/* ── LEGACY PANEL / OVERLAY (modals, side panels) ────────────────────── */
.panel-overlay{
  position:fixed;inset:0;background:rgba(8,11,18,.7);
  z-index:100;display:flex;align-items:flex-end;justify-content:flex-end;
  backdrop-filter:blur(4px);animation:fade-in .2s var(--ease-out) both;
}
/* The SPA toggles `.hidden` to show/hide panels (showPanel/closePanel in
   index.html). DO NOT add `:not(.show)` here — that would keep every panel
   display:none even after .hidden is removed, breaking every click that
   tries to open a side panel (Edit, View, Reserve, calendar day, etc.). */
.panel-overlay.hidden{display:none}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
.panel{
  background:var(--surface);width:460px;height:100vh;
  border-left:1px solid var(--border);
  display:flex;flex-direction:column;
  animation:slide-in-right .25s var(--ease-out) both;box-shadow:var(--shadow-lg);
}
@keyframes slide-in-right{from{transform:translateX(20px);opacity:0}to{transform:translateX(0);opacity:1}}
.panel-header{
  padding:18px 22px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:12px;
}
.panel-title{font-size:16px;font-weight:600;flex:1;letter-spacing:-.01em}
.close-btn{
  width:30px;height:30px;border-radius:8px;color:var(--text-3);
  display:grid;place-items:center;font-size:16px;background:transparent;
  transition:all var(--t-fast) var(--ease);cursor:pointer;
}
.close-btn:hover{background:var(--surface-2);color:var(--text)}
.panel-body{flex:1;overflow-y:auto;padding:20px 22px}
.panel-footer{
  padding:14px 22px;border-top:1px solid var(--border);
  display:flex;gap:8px;justify-content:flex-end;
}

/* ── LEGACY .toast — keep position but modernize palette ─────────────── */
.toast{
  position:fixed;bottom:24px;right:28px;
  background:var(--surface);border:1px solid var(--border);
  border-left:3px solid var(--teal);border-radius:var(--radius);
  padding:12px 16px 12px 14px;box-shadow:var(--shadow-lg);
  font-size:13.5px;z-index:200;color:var(--text);
  animation:toast-in .35s var(--ease-out) both;
}
.toast.hidden{display:none}
.toast.error{border-left-color:var(--red)}
.toast.success{border-left-color:var(--teal)}

/* ── LEGACY .res-item (calendar+upcoming cards) ──────────────────────── */
.res-item{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:12px 14px;margin-bottom:8px;
  transition:all var(--t-fast) var(--ease);cursor:default;
}
.res-item.is-clickable{cursor:pointer}
.res-item.is-clickable:hover{border-color:var(--border-2);background:var(--surface-2)}
.res-title{font-size:14px;font-weight:500;letter-spacing:-.005em}
.res-meta{font-size:12px;color:var(--text-3);margin-top:3px;display:flex;gap:10px;flex-wrap:wrap}

/* ── LEGACY TAB widget — match modern .tab look ──────────────────────── */
.tab{
  padding:11px 16px;font-size:14px;font-weight:500;
  color:var(--text-3);position:relative;cursor:pointer;
  transition:color var(--t-fast) var(--ease);background:transparent;border:none;font-family:inherit;
}
.tab:hover{color:var(--text)}
.tab.active{color:var(--accent)}
.tab.active::after{
  content:"";position:absolute;left:8px;right:8px;bottom:-1px;
  height:2px;background:var(--accent);border-radius:2px;
}

/* ── LEGACY model-count-badge (×N pill) ──────────────────────────────── */
.model-count-badge{
  font-size:11px;font-weight:500;color:var(--text-2);
  background:var(--surface-2);border:1px solid var(--border);
  padding:1px 7px;border-radius:5px;font-variant-numeric:tabular-nums;
}

/* ── BUNDLE / ARCHIVED PILLS — keep colors, refine borders ───────────── */
.bundle-pill{
  display:inline-block;font-size:11px;padding:1px 8px;border-radius:999px;
  background:var(--accent-soft);color:var(--accent);
  border:1px solid var(--accent-ring);margin-left:6px;vertical-align:middle;
  font-family:inherit;
}
.archived-pill{
  display:inline-block;font-size:11px;padding:1px 8px;border-radius:999px;
  background:var(--surface-2);color:var(--text-3);
  border:1px solid var(--border-2);margin-left:6px;vertical-align:middle;
  font-family:inherit;
}
.pkg-bundle-pill{
  display:inline-block;margin-left:8px;font-size:11px;padding:1px 8px;
  border-radius:999px;background:var(--accent-soft);color:var(--accent);
  border:1px solid var(--accent-ring);vertical-align:middle;font-family:inherit;
}

/* ── LEGACY .empty-state ─────────────────────────────────────────────── */
.empty-state{
  text-align:center;padding:48px 24px;color:var(--text-3);
}
.empty-icon{font-size:32px;margin-bottom:8px;opacity:.6}
.empty-text{font-size:14px}

/* ── LEGACY SIZES + SECTIONS ─────────────────────────────────────────── */
.section-title{
  font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:var(--text-3);margin-bottom:10px;
}
.detail-row{
  display:flex;justify-content:space-between;align-items:flex-start;gap:14px;
  padding:10px 0;border-bottom:1px solid var(--border);
}
.detail-row:last-of-type{border-bottom:none}
.detail-label{
  font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  color:var(--text-3);flex-shrink:0;
}
.detail-value{font-size:14px;color:var(--text);text-align:right}

/* ── BTN-SM (legacy size class) ─────────────────────────────────────── */
.btn-sm{padding:5px 10px;font-size:12.5px}

/* ── HIDDEN UTILITY (legacy) ─────────────────────────────────────────── */
.hidden{display:none !important}

/* ── BODY FALLBACK FOR NON-SHELL PAGES (login, reset, branding) ──────── */
/* Those pages center their content with flexbox or padding; ensure the
   modern dark background applies and scrolling stays available. */
body{min-height:100vh}

/* ── SCROLLING FIX ───────────────────────────────────────────────────────
   The modern CSS clips .main with overflow:hidden and expects .content to be
   a direct flex child of .main so it can scroll. The existing markup wraps
   .content inside non-flex <div id="page-*"> sections, so the height never
   propagates and nothing scrolls. Restore the legacy behavior: let .main
   scroll vertically; horizontal overflow stays clipped so long names + the
   filter row can't push the layout wider than the viewport. */
.shell{height:100vh !important;overflow:hidden !important}
.shell .main{
  flex:1 1 0% !important;
  min-width:0 !important;
  height:100vh !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}
.shell .content{overflow:visible !important;flex:0 0 auto !important}

/* ── ANIMATION TRIM ──────────────────────────────────────────────────────
   The modern stylesheet stages a fade-in for every row/card/section using
   :nth-child animation-delays up to ~0.65s. Gorgeous on first paint, but
   the SPA re-renders these views on every interaction + every 30s auto-
   refresh, so the animations fire constantly — rows sit at opacity:0 for a
   beat and absorb clicks, dropdowns feel sluggish.
   Belt-and-braces: redefine the modern keyframes as no-ops AND disable the
   animation property on the affected elements with !important. The
   .unit-sub-row's gv-row-in keyframe uses a different name and stays intact;
   we re-assert it below at higher specificity so it still drives the
   collapsible-row fade. */
@keyframes row-in        { from{opacity:1;transform:none} to{opacity:1;transform:none} }
@keyframes stat-rise     { from{opacity:1;transform:none} to{opacity:1;transform:none} }
@keyframes fade-up       { from{opacity:1;transform:none} to{opacity:1;transform:none} }
@keyframes fade-down     { from{opacity:1;transform:none} to{opacity:1;transform:none} }
@keyframes page-in       { from{opacity:1;transform:none} to{opacity:1;transform:none} }
@keyframes slide-in-left { from{opacity:1;transform:none} to{opacity:1;transform:none} }

.stat-card,
.search-wrap,
.filter-row,
.page,
.page-title,
.sidebar,
tbody tr,
.res-row,
.list-row,
.kit-card,
.pkg-card {
  animation: none !important;
  animation-delay: 0s !important;
  animation-duration: 0s !important;
  opacity: 1 !important;
}
/* Reassert the collapsible-sub-row fade — uses gv-row-in / gv-row-out which
   we don't disable. Combined tbody + .unit-sub-row beats the modern
   tbody tr:nth-child(n) specificity. */
tbody tr.unit-sub-row{
  animation: gv-row-in .17s ease-out both !important;
}
tbody tr.unit-sub-row.gv-collapsing{
  animation: gv-row-out .14s ease-in forwards !important;
}
/* The pulse-dot + ring keyframes drive infinite indicators (api-dot, status
   available dot). Keep them — they're cheap and visually informative. */

/* ── LOGO GRADIENT — extra-aggressive override ───────────────────────────
   The bridge already replaces the gradient with a flat accent fill, but the
   modern CSS .brand-mark has an inset highlight + a radial ::after. Force
   the flat fill on every legacy + modern logo class so no gradient leaks. */
.logo-icon,
.brand-mark,
.preview-logo-icon{
  background:var(--accent) !important;
  background-image:none !important;
  box-shadow:none !important;
}
.logo-icon::after,
.brand-mark::after,
.preview-logo-icon::after{display:none !important;background:none !important}

/* ─── ORIGIN: gv-ui.css ─────────────────────────────────────────────── */
/* ============================================================================
   GearVault — UI Design System (gv-ui.css)
   ----------------------------------------------------------------------------
   Modern unified stylesheet. Loaded AFTER each page's inline <style> block so
   it overrides the legacy look without requiring a rewrite of the markup.

   Theming: `<html data-theme="...">` selects a preset (default = slate dark,
   "light" = the light preset). User-defined accent is patched via branding.js
   and inherits via the `--accent` custom property.

   Font: Inter, no monospace anywhere. Numeric data uses `tabular-nums` for
   alignment but otherwise renders in the same sans-serif as body text.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ------------------------------------------------------------------ TOKENS */
:root,
[data-theme="slate"] {
  /* Slate dark — neutral, no blue tint. */
  --bg:           #0e1116;
  --surface:      #151a22;
  --surface2:     #1c222d;
  --surface3:     #242b39;
  --surface-2:    #1c222d;   /* legacy alias used by gv-modern.css */
  --surface-3:    #242b39;
  --border:       #232a37;
  --border2:      #2e3645;
  --border-2:     #2e3645;
  --text:         #e9ecf2;
  --text2:        #a4adbe;
  --text3:        #6c7689;
  --text4:        #4a5365;
  --text-2:       #a4adbe;
  --text-3:       #6c7689;
  --text-4:       #4a5365;

  /* Accent — patched by branding.js. */
  --accent:       #f5a623;
  --accent-soft:  rgba(245, 166, 35, .12);
  --accent-ring:  rgba(245, 166, 35, .22);
  --accent-dim:   rgba(245, 166, 35, .18);
  --accent-glow:  rgba(245, 166, 35, .14);
  --accent-fg:    #1a0f00;          /* readable text on accent button */

  /* Status palette. WCAG-AA on every surface. */
  --teal:         #2dd4a0;
  --teal-soft:    rgba(45, 212, 160, .12);
  --teal-dim:     rgba(45, 212, 160, .18);
  --red:          #ef5a5a;
  --red-soft:     rgba(239, 90, 90, .12);
  --red-dim:      rgba(239, 90, 90, .18);
  --blue:         #5b8def;
  --blue-soft:    rgba(91, 141, 239, .12);
  --blue-dim:     rgba(91, 141, 239, .18);
  --green:        #6abf69;
  --green-dim:    rgba(106, 191, 105, .18);
  --purple:       #9d7cf4;
  --purple-soft:  rgba(157, 124, 244, .12);
  --purple-dim:   rgba(157, 124, 244, .18);

  --radius:       8px;
  --radius-sm:    6px;
  --radius-lg:    12px;
  --radius-xl:    16px;

  --shadow-sm:    0 1px 2px rgba(0, 0, 0, .35);
  --shadow:       0 4px 16px rgba(0, 0, 0, .35);
  --shadow-lg:    0 18px 50px rgba(0, 0, 0, .55);

  /* Animation timing tokens. */
  --t-fast:       130ms;
  --t-med:        220ms;
  --t-slow:       380ms;
  --ease:         cubic-bezier(.2, .7, .2, 1);
  --ease-out:     cubic-bezier(.16, 1, .3, 1);

  --font:         'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Mono is intentionally aliased to the body font. Use `.tnum` (or
     font-variant-numeric:tabular-nums) when you need column alignment. */
  --mono:         var(--font);
}

[data-theme="light"] {
  --bg:           #f5f7fa;
  --surface:      #ffffff;
  --surface2:     #f1f3f7;
  --surface3:     #e7ebf2;
  --surface-2:    #f1f3f7;
  --surface-3:    #e7ebf2;
  --border:       #e2e6ee;
  --border2:      #ced3df;
  --border-2:     #ced3df;
  --text:         #1a1f2c;
  --text2:        #4d5566;
  --text3:        #7b8499;
  --text4:        #a0a8b8;
  --text-2:       #4d5566;
  --text-3:       #7b8499;
  --text-4:       #a0a8b8;

  --accent-soft:  rgba(245, 166, 35, .13);
  --accent-ring:  rgba(245, 166, 35, .26);
  --accent-dim:   rgba(245, 166, 35, .18);
  --accent-glow:  rgba(245, 166, 35, .14);

  --teal-soft:    rgba(45, 212, 160, .14);
  --teal-dim:     rgba(45, 212, 160, .18);
  --red-soft:     rgba(239, 90, 90, .14);
  --red-dim:      rgba(239, 90, 90, .18);
  --blue-soft:    rgba(91, 141, 239, .13);
  --blue-dim:     rgba(91, 141, 239, .18);
  --green-dim:    rgba(106, 191, 105, .18);
  --purple-soft:  rgba(157, 124, 244, .14);
  --purple-dim:   rgba(157, 124, 244, .18);

  --shadow-sm:    0 1px 2px rgba(20, 30, 50, .07);
  --shadow:       0 4px 14px rgba(20, 30, 50, .08);
  --shadow-lg:    0 16px 44px rgba(20, 30, 50, .14);
}

/* ------------------------------------------------------------------ RESET */
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { letter-spacing: -0.005em; }

/* Numeric alignment helper. */
.tnum,
.stat-value,
.kit-meta,
.cal-day .d,
.cal-day,
.res-date .day,
.cell-mono,
.detail-value {
  font-variant-numeric: tabular-nums;
}

/* Strip monospace EVERYWHERE — overrides the legacy `font-family:var(--mono)`
   declarations in the page-level inline styles. */
[style*="font-family:var(--mono)"],
.logo-sub, .brand-sub,
.nav-section,
.user-role,
.stat-label, .stat-value,
.equip-cat, .serial,
.condition-badge,
.status-tag,
.nav-badge, .kit-badge, .kit-bundle-pill, .bundle-pill, .bulk-pill, .archived-pill,
.cal-day-label, .cal-day,
.equip-table th,
.detail-value,
.form-label,
.section-title,
.res-meta,
.api-status,
.loading,
.unit-tag-pill,
.model-count-badge,
.rf-range-cell-label, .rf-range-arrow,
.gv-size-toggle button {
  font-family: var(--font) !important;
}

/* Keep numeric columns aligned. */
.stat-value, .nav-badge, .kit-badge,
.condition-badge, .status-tag,
.cal-day, .cal-day-label,
.serial, .detail-value,
.api-status, .model-count-badge,
.unit-tag-pill, .res-meta,
.equip-table .col-serial,
.equip-table .col-tag {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ FOCUS */
:where(button, a, input, select, textarea, summary, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------------ SHELL */
.shell { background: var(--bg); }

.sidebar {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-right: 1px solid var(--border);
  animation: gv-slide-in-left .45s var(--ease-out) both;
}
@keyframes gv-slide-in-left {
  from { transform: translateX(-10px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.logo, .brand {
  border-bottom: 1px solid var(--border);
}
.logo-icon, .brand-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 60%, #ff4e3a) 100%);
  border-radius: 9px;
  color: var(--accent-fg);
  box-shadow: 0 6px 18px -4px var(--accent-ring), inset 0 1px 0 rgba(255, 255, 255, .22);
  position: relative;
  overflow: hidden;
  display: grid; place-items: center;
}
.logo-icon::after,
.brand-mark::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .35), transparent 60%);
  pointer-events: none;
}
.logo-icon svg, .brand-mark svg { position: relative; z-index: 1; width: 18px; height: 18px; }
.logo-text, .brand-name { font-weight: 600; letter-spacing: -0.015em; }
.logo-sub, .brand-sub {
  color: var(--text3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 10.5px;
  font-weight: 500;
}

.nav-section {
  color: var(--text4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 10.5px;
}

.nav-item {
  position: relative;
  margin: 0 10px;
  padding: 9px 12px;
  border-radius: 8px;
  border-left: none !important;
  color: var(--text2);
  font-weight: 500;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.nav-item:hover { color: var(--text); background: var(--surface2); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px var(--accent-ring);
  animation: gv-pill-grow .3s var(--ease-out);
}
@keyframes gv-pill-grow {
  from { transform: scaleY(.4); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

.nav-icon { display: none; }    /* legacy emoji icons hidden */

.nav-badge {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}

.avatar {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border: none !important;
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}

.sidebar-footer { border-top: 1px solid var(--border); }
.user-role { color: var(--text3); }

.role-btn,
.logout-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 7px;
  transition: all var(--t-fast) var(--ease);
}
.role-btn:hover,
.logout-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.role-btn.active {
  background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600;
}

.api-status { color: var(--text3); letter-spacing: 0.02em; }
.api-dot {
  background: var(--teal);
  box-shadow: 0 0 0 0 var(--teal);
  animation: gv-pulse-dot 2.4s infinite;
}
@keyframes gv-pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(45, 212, 160, .55); }
  70%  { box-shadow: 0 0 0 6px rgba(45, 212, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 160, 0); }
}

/* ------------------------------------------------------------------ TOPBAR */
.topbar {
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 75%, transparent) 100%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
}
.page-title {
  font-weight: 600;
  letter-spacing: -0.02em;
  animation: gv-fade-down .45s var(--ease-out) both;
}
@keyframes gv-fade-down {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ BUTTONS */
.btn {
  font-family: var(--font);
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px) scale(.985); }

.btn-primary {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 100%, #fff 12%) 0%,
    var(--accent) 100%);
  color: var(--accent-fg);
  font-weight: 600;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .18) inset,
    0 4px 14px -4px var(--accent-ring);
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .65s var(--ease-out);
}
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid color-mix(in srgb, var(--red) 35%, transparent);
}
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ------------------------------------------------------------------ CONTENT */
.content { padding: 24px 28px 40px; }

/* ------------------------------------------------------------------ STATS */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stats-row.stats-row-3 { grid-template-columns: repeat(3, 1fr); }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-med) var(--ease), border-color var(--t-fast) var(--ease);
  animation: gv-stat-rise .55s var(--ease-out) both;
}
.stat-card:nth-child(1) { animation-delay: .04s; }
.stat-card:nth-child(2) { animation-delay: .10s; }
.stat-card:nth-child(3) { animation-delay: .16s; }
.stat-card:nth-child(4) { animation-delay: .22s; }
@keyframes gv-stat-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(140% 80% at 100% 0%, var(--gv-glow, transparent), transparent 50%);
  opacity: .55; pointer-events: none;
}
.stat-card.teal   { --gv-glow: rgba(45, 212, 160, .14); }
.stat-card.blue   { --gv-glow: rgba(91, 141, 239, .14); }
.stat-card.red    { --gv-glow: rgba(239, 90, 90, .14); }
.stat-card.purple { --gv-glow: rgba(157, 124, 244, .14); }
.stat-card.amber,
.stat-card.accent { --gv-glow: rgba(245, 166, 35, .14); }
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border2);
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.stat-value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  position: relative;
  z-index: 1;
  font-family: var(--font);
}
.stat-sub {
  font-size: 12.5px;
  color: var(--text3);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------ SEARCH */
.search-wrap { margin-bottom: 16px; max-width: none !important; }
.search-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px 11px 38px;
  font-size: 14px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
  background: var(--surface2);
}
.search-icon {
  color: var(--text3);
  transition: color var(--t-fast) var(--ease);
  width: 16px; height: 16px;
  display: inline-grid;
  place-items: center;
  pointer-events: none;
}
.search-icon svg { width: 16px; height: 16px; stroke: currentColor; }
.search-wrap:focus-within .search-icon { color: var(--accent); }

/* ------------------------------------------------------------------ FILTER CHIPS */
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
  animation: gv-fade-up .45s var(--ease-out) both;
  animation-delay: .08s;
}
@keyframes gv-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  transition: all var(--t-fast) var(--ease);
}
.filter-chip:hover { border-color: var(--border2); color: var(--text); background: var(--surface); }
.filter-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  background: var(--surface);
  overflow: visible;
}
.view-btn {
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--text3);
  font-size: 13px;
  font-family: var(--font);
  transition: all var(--t-fast) var(--ease);
}
.view-btn:hover { color: var(--text); }
.view-btn.active { background: var(--surface3); color: var(--text); }

/* ------------------------------------------------------------------ EQUIP CARDS */
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.equip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
  animation: gv-stat-rise .45s var(--ease-out) both;
}
.equip-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity var(--t-fast) var(--ease);
}
.equip-card:hover {
  transform: translateY(-2px);
  border-color: var(--border2);
  box-shadow: var(--shadow);
}
.equip-card:hover::before { opacity: 1; }

.equip-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0;     /* hide legacy emoji fallback inside */
  flex-shrink: 0;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.equip-icon svg { width: 20px; height: 20px; }
.equip-card:hover .equip-icon { transform: scale(1.05); border-color: var(--border2); }

.equip-icon.camera   { color: var(--blue);   background: var(--blue-soft);   border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.equip-icon.audio    { color: var(--teal);   background: var(--teal-soft);   border-color: color-mix(in srgb, var(--teal) 30%, transparent); }
.equip-icon.lighting { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.equip-icon.support  { color: var(--purple); background: var(--purple-soft); border-color: color-mix(in srgb, var(--purple) 30%, transparent); }
.equip-icon.cable    { color: var(--text2);  background: var(--surface2);   border-color: var(--border); }
.equip-icon.misc     { color: var(--text2);  background: var(--surface2);   border-color: var(--border); }

.equip-name { font-weight: 500; line-height: 1.3; letter-spacing: -0.005em; }
.equip-cat  { color: var(--text3); font-size: 12px; }
.equip-meta { border-top: 1px solid var(--border); }
.serial     { color: var(--text3); }

/* ------------------------------------------------------------------ TABLE (DENSE) */
.equip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  table-layout: fixed;
}
.equip-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.equip-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.equip-table tr { animation: gv-row-in .35s var(--ease-out) both; }
.equip-table tbody tr:nth-child(1)  { animation-delay: .02s; }
.equip-table tbody tr:nth-child(2)  { animation-delay: .05s; }
.equip-table tbody tr:nth-child(3)  { animation-delay: .08s; }
.equip-table tbody tr:nth-child(4)  { animation-delay: .11s; }
.equip-table tbody tr:nth-child(5)  { animation-delay: .14s; }
.equip-table tbody tr:nth-child(6)  { animation-delay: .17s; }
.equip-table tbody tr:nth-child(7)  { animation-delay: .20s; }
.equip-table tbody tr:nth-child(8)  { animation-delay: .23s; }
.equip-table tr:hover td { background: var(--surface2); }
.equip-table tr:last-child td { border-bottom: none; }
.equip-table th.sortable { cursor: pointer; user-select: none; transition: color var(--t-fast) var(--ease); }
.equip-table th.sortable:hover { color: var(--text); }
.equip-table th.sortable.active,
.equip-table th.active { color: var(--accent); }

/* ------------------------------------------------------------------ STATUS BADGES (high-contrast, instantly readable) */
.status-tag,
.condition-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid;
  background: var(--surface2);
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.status-tag::before { content: none !important; }      /* drop legacy ● ▶ ◆ ⚠ glyphs */
.status-tag::after {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  order: -1;
  box-shadow: 0 0 6px currentColor;
}
.status-tag.available   { color: var(--teal);   border-color: color-mix(in srgb, var(--teal) 45%, transparent);   background: var(--teal-soft); }
.status-tag.checked-out { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.status-tag.reserved    { color: var(--blue);   border-color: color-mix(in srgb, var(--blue) 45%, transparent);   background: var(--blue-soft); }
.status-tag.maintenance { color: var(--red);    border-color: color-mix(in srgb, var(--red) 45%, transparent);    background: var(--red-soft); }
.status-tag.maintenance::after { animation: gv-status-blink 1.6s ease-in-out infinite; }
@keyframes gv-status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  position: relative;
}
.status-dot.available { background: var(--teal); }
.status-dot.available::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  opacity: .55;
  animation: gv-ring 2s ease-out infinite;
}
@keyframes gv-ring {
  0%   { transform: scale(.5); opacity: .7; }
  100% { transform: scale(1.7); opacity: 0; }
}
.status-dot.checked-out { background: var(--accent); }
.status-dot.reserved    { background: var(--blue); }
.status-dot.maintenance { background: var(--red); }

.condition-badge {
  background: var(--surface2);
}
.condition-badge::before,
.condition-badge::after { content: none !important; }
.condition-badge.excellent { color: var(--teal);   border-color: color-mix(in srgb, var(--teal) 45%, transparent);   background: var(--teal-soft); }
.condition-badge.good      { color: var(--green);  border-color: color-mix(in srgb, var(--green) 45%, transparent);  background: color-mix(in srgb, var(--green) 14%, transparent); }
.condition-badge.fair      { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.condition-badge.poor      { color: var(--red);    border-color: color-mix(in srgb, var(--red) 45%, transparent);    background: var(--red-soft); }

/* Generic pills (kit-bundle-pill, bundle-pill, bulk-pill, etc.) */
.kit-badge, .kit-bundle-pill, .bundle-pill, .bulk-pill, .archived-pill,
.unit-tag-pill, .model-count-badge {
  display: inline-flex; align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid;
  background: var(--surface2);
  letter-spacing: 0;
  vertical-align: middle;
}
.kit-badge,
.kit-bundle-pill,
.bundle-pill {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
}
.bulk-pill {
  color: var(--purple);
  border-color: color-mix(in srgb, var(--purple) 45%, transparent);
  background: var(--purple-soft);
}
.archived-pill {
  color: var(--text2);
  border-color: var(--border2);
  background: var(--surface2);
}
.model-count-badge {
  color: var(--accent-fg);
  background: var(--accent);
  border-color: var(--accent);
}
.unit-tag-pill {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
}

/* ------------------------------------------------------------------ CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ------------------------------------------------------------------ PANELS (slide-in drawers) */
.panel-overlay {
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: gv-overlay-in .25s var(--ease-out);
}
/* Admin pages (admin.html, admin/*) use `.show` to open .panel-overlay rather
   than the SPA's `.hidden` convention. gv-bridge.css's default
   `.panel-overlay { display:flex }` overrides their inline `display:none`,
   leaving the empty modal visible on page load. Scope the hide-by-default rule
   to pages WITHOUT the SPA `.shell` root (i.e. every admin page) so we don't
   regress index.html's flow, which depends on the bridge's `display:flex`. */
body:not(:has(.shell)) .panel-overlay:not(.show) { display: none !important; }
@keyframes gv-overlay-in { from { background: rgba(0, 0, 0, 0); } to { background: rgba(0, 0, 0, .55); } }
.panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: gv-slide-in .32s var(--ease-out) both;
}
@keyframes gv-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.panel-header { border-bottom: 1px solid var(--border); }
.panel-footer { border-top: 1px solid var(--border); }

.close-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 7px;
  font-size: 0;     /* hide the ✕ character */
  position: relative;
}
.close-btn::before,
.close-btn::after {
  content: "";
  position: absolute;
  width: 14px; height: 1.7px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--t-fast) var(--ease);
}
.close-btn::before { transform: rotate(45deg); }
.close-btn::after  { transform: rotate(-45deg); }
.close-btn:hover::before { transform: rotate(135deg); }
.close-btn:hover::after  { transform: rotate(45deg); }
.close-btn:hover { background: var(--surface2); color: var(--text); }

/* ------------------------------------------------------------------ FORMS */
.form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  font-family: var(--font);
}
.form-input,
.form-select,
.form-textarea {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.65) sepia(1) saturate(8) hue-rotate(-20deg);
}
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}

.detail-row { border-bottom: 1px solid var(--border); }
.detail-label { color: var(--text2); font-weight: 500; }
.detail-value { color: var(--text); font-weight: 500; }

/* ------------------------------------------------------------------ CALENDAR (readable at a glance) */
.cal-grid { gap: 6px; }
.cal-header { gap: 6px; }
.cal-day-label {
  color: var(--text3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 0;
}
.cal-day {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
  justify-content: flex-start;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.cal-day .d {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  line-height: 1;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.cal-day:hover {
  background: var(--surface2);
  border-color: var(--border2);
  transform: translateY(-1px);
}
.cal-day.muted,
.cal-day.other-month { opacity: 0.35; cursor: default; }
.cal-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-ring);
}
.cal-day.today .d { color: var(--accent); font-weight: 700; }
.cal-day.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.cal-day.selected .d { color: var(--accent); }
.cal-more {
  font-size: 10.5px;
  color: var(--text3);
  font-weight: 500;
  padding: 0 5px;
  line-height: 1.3;
}

/* The reservation form's inline range picker uses a flat <div class="cal-day">15</div>
   structure (no inner .d wrapper). Keep the day numeral centered in the cell. */
.rf-range-picker .cal-day {
  display: grid;
  place-items: center;
  padding: 4px;
  font-size: 12.5px;
  font-weight: 500;
  flex-direction: row;
  gap: 0;
}
.rf-range-picker .cal-day.range-start,
.rf-range-picker .cal-day.range-end {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  border-color: var(--accent);
}
.rf-range-picker .cal-day.in-range {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.cal-day.range-start,
.cal-day.range-end {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  font-weight: 700;
}
.cal-day.in-range {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.cal-heat {
  position: absolute;
  left: 4px; right: 4px; bottom: 3px;
  height: 2.5px;
  background: var(--blue);
  border-radius: 2px;
  opacity: 0.85;
}

/* Calendar reservation bars — explicit status color coding. */
.cal-bar {
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  border-left: 2px solid var(--blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.cal-bar.accent,
.cal-bar.checked-out {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: var(--accent);
}
.cal-bar.teal,
.cal-bar.available {
  background: var(--teal-soft);
  color: var(--teal);
  border-left-color: var(--teal);
}
.cal-bar.purple {
  background: var(--purple-soft);
  color: var(--purple);
  border-left-color: var(--purple);
}
.cal-bar.red,
.cal-bar.maintenance {
  background: var(--red-soft);
  color: var(--red);
  border-left-color: var(--red);
}

/* Calendar reservation list (right column). */
.res-item {
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  border-left: 3px solid var(--blue);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  animation: gv-row-in .35s var(--ease-out) both;
}
@keyframes gv-row-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.res-item:hover { background: var(--surface3); transform: translateY(-1px); }
.res-item.checked-out { border-left-color: var(--accent); }
.res-item.maintenance { border-left-color: var(--red); }
.res-item.available   { border-left-color: var(--teal); }
.res-title { font-weight: 500; }
.res-meta  { color: var(--text3); font-size: 12px; }

.cal-nav .cal-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text2);
  padding: 5px 10px;
  transition: all var(--t-fast) var(--ease);
}
.cal-nav .cal-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.cal-month {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------ KITS */
.kit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
  animation: gv-stat-rise .45s var(--ease-out) both;
}
.kit-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.kit-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity var(--t-fast) var(--ease);
}
.kit-card:hover::before { opacity: 1; }
.kit-name { font-weight: 600; letter-spacing: -0.01em; }
.kit-item-chip {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ TABS */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text3);
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); }
.tab.active::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px;
  animation: gv-tab-line .32s var(--ease-out);
}
@keyframes gv-tab-line { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* ------------------------------------------------------------------ SECTION TITLE */
.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-transform: none;
}

/* ------------------------------------------------------------------ TOAST */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 12px 16px 12px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  z-index: 200;
  animation: gv-toast-in .35s var(--ease-out) both;
}
@keyframes gv-toast-in {
  from { transform: translateY(20px) scale(.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ------------------------------------------------------------------ EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text3);
}
.empty-icon svg { width: 22px; height: 22px; }
.empty-text { font-size: 14px; }

/* ------------------------------------------------------------------ SCROLLBAR */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ------------------------------------------------------------------ SPINNER / LOADING */
.loading { color: var(--text3); }
.spinner {
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: gv-spin 0.6s linear infinite;
}
@keyframes gv-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ SIZE TOGGLE (gv-size-toggle) */
.gv-size-toggle {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 2px;
  gap: 1px;
}
.gv-size-toggle button {
  background: transparent;
  border: none !important;
  color: var(--text3);
  border-radius: 6px;
  font-family: var(--font);
}
.gv-size-toggle button:hover { background: var(--surface2); color: var(--text); }
.gv-size-toggle button.active {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
}

/* ------------------------------------------------------------------ THEME SWITCHER (admin/branding) */
.gv-theme-swatches { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gv-theme-swatch {
  position: relative;
  width: 84px; height: 64px;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.gv-theme-swatch:hover { transform: translateY(-2px); border-color: var(--border2); }
.gv-theme-swatch.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}
.gv-theme-swatch .bar {
  flex: 1;
}
.gv-theme-swatch[data-theme="slate"] .bar:nth-child(1) { background: #0e1116; }
.gv-theme-swatch[data-theme="slate"] .bar:nth-child(2) { background: #151a22; flex: 0 0 18px; }
.gv-theme-swatch[data-theme="slate"] .bar:nth-child(3) { background: var(--accent); flex: 0 0 4px; }
.gv-theme-swatch[data-theme="light"] .bar:nth-child(1) { background: #ffffff; }
.gv-theme-swatch[data-theme="light"] .bar:nth-child(2) { background: #f1f3f7; flex: 0 0 18px; }
.gv-theme-swatch[data-theme="light"] .bar:nth-child(3) { background: var(--accent); flex: 0 0 4px; }
.gv-theme-swatch .label {
  position: absolute;
  left: 0; right: 0; bottom: -20px;
  font-size: 11px;
  text-align: center;
  color: var(--text3);
  font-weight: 500;
}

/* ------------------------------------------------------------------ BULK PANEL */
#bulk-actions {
  background: var(--surface) !important;
  border: 1px solid var(--accent) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
}

/* ------------------------------------------------------------------ MOBILE TWEAKS (preserve existing rules, just sharpen) */
@media (max-width: 900px) {
  .stat-value { font-size: 26px; }
  .content { padding: 18px 16px 30px; }
}
@media (max-width: 640px) {
  .stat-value { font-size: 22px; }
  .stats-row,
  .stats-row.stats-row-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
}

/* ------------------------------------------------------------------ INLINE SPRITE ICONS
   The inline <svg><use href="#i-XXX"/></svg> markup has no intrinsic size, so
   un-styled SVGs would fall back to the browser default (300×150). These rules
   provide sensible defaults per container so newly-introduced icons (from the
   index_modern.html sprite) render at the right scale without per-call sizing. */
.btn svg                     { width: 14px; height: 14px; flex-shrink: 0; }
.btn-sm svg                  { width: 13px; height: 13px; }
.icon-btn svg                { width: 14px; height: 14px; }
.kit-item-chip svg,
.kit-pill svg,
.bulk-pill svg               { width: 11px; height: 11px; vertical-align: -2px; margin-right: 4px; }
.equip-icon svg              { width: 20px; height: 20px; }
.empty-icon svg              { width: 22px; height: 22px; }
.detail-row svg              { width: 13px; height: 13px; vertical-align: -2px; }
.res-meta svg                { width: 12px; height: 12px; vertical-align: -1px; }
.cal-bar svg                 { width: 10px; height: 10px; vertical-align: -1px; margin-right: 3px; }
.filter-chip svg             { width: 12px; height: 12px; flex-shrink: 0; }
.gv-hamburger svg            { width: 20px; height: 20px; }
.logout-btn svg              { width: 14px; height: 14px; }
.close-btn svg               { width: 14px; height: 14px; pointer-events: none; }
/* The close-btn previously drew an X with ::before/::after — that's now provided
   by the inline <svg><use href="#i-x"/></svg>. Hide the pseudo-element X so
   we don't get a doubled mark on buttons that include the SVG. */
.close-btn:has(svg)::before,
.close-btn:has(svg)::after   { content: none; }
.close-btn:has(svg)          { font-size: inherit; }

/* ------------------------------------------------------------------ PAGE SWITCH ANIMATION
   SPA pages (#page-inventory, #page-kits, etc.) fade up when they're not
   .hidden. The animation only runs on initial paint — toggling .hidden in
   JS doesn't replay it, but the cross-fade still reads as movement because
   the previous page is removed and the new one mounts. */
[id^="page-"]:not(.hidden) {
  animation: gv-page-in .35s var(--ease-out) both;
}
@keyframes gv-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .status-dot.available::after,
  .status-tag.maintenance::after,
  .api-dot {
    animation: none !important;
  }
}

/* ------------------------------------------------------------------ LIGHT THEME — SPECIFIC OVERRIDES */
html[data-theme="light"] .topbar {
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, .8) 100%);
}
html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface2) 100%);
}
html[data-theme="light"] .btn-primary { color: #1a0f00; }
html[data-theme="light"] .equip-table tr:hover td { background: var(--surface2); }
html[data-theme="light"] .panel-overlay { background: rgba(20, 30, 50, .35); }
html[data-theme="light"] .toast { box-shadow: var(--shadow-lg); }

/* Bulk-pill, kit pills in light theme — keep tint readable */
html[data-theme="light"] .stat-card { box-shadow: var(--shadow-sm); }
html[data-theme="light"] .stat-card:hover { box-shadow: var(--shadow); }
html[data-theme="light"] .equip-table { box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ THEME APPLY BEFORE-PAINT HOOK
   When branding.js fetches /api/branding, it sets html[data-theme] to "slate"
   or "light". Until that resolves, we don't want a flash — the bg color is set
   inline by the preload script on every page (see <head>'s gvApplyTheme()). */
