/* ============================================================
   MAN-IT · Asset Management — soft minimal light gradient glass
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4f6ff;
  --bg-2: #eef0fb;
  --panel: rgba(255,255,255,.55);
  --panel-2: rgba(255,255,255,.78);
  --line: rgba(30,41,59,.08);
  --line-2: rgba(30,41,59,.15);
  --ink: #1c2033;
  --ink-2: #3e4562;
  --mut: #67708f;
  --mut-2: #99a1bd;
  --g1: #6d7cf6;
  --g2: #9d8cf8;
  --g3: #ee9df7;
  --grad: linear-gradient(135deg, #7c8cf8 0%, #a78bfa 52%, #ee9df7 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,140,248,.18), rgba(238,157,247,.14));
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --sky: #0ea5e9;
  --glow: 0 0 0 1px rgba(167,139,250,.35), 0 18px 50px -12px rgba(124,140,248,.4);
  --shadow: 0 1px 0 rgba(255,255,255,.75) inset, 0 16px 40px -18px rgba(30,41,59,.18);
  --shadow-lg: 0 30px 80px -20px rgba(30,41,59,.28);
  --r: 20px;
  --r-sm: 13px;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 14px;
  background:
    radial-gradient(1100px 760px at 88% -12%, rgba(199,210,254,.6), transparent 60%),
    radial-gradient(950px 700px at -12% 22%, rgba(221,214,254,.55), transparent 55%),
    radial-gradient(900px 700px at 55% 112%, rgba(251,207,232,.5), transparent 55%),
    linear-gradient(180deg, #f6f7ff 0%, #fdf4ff 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(139,92,246,.25); color: #1c2033; }

/* ---------- soft aurora background ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.orb-a { width: 560px; height: 560px; left: -160px; top: -180px; background: radial-gradient(circle at 35% 35%, #c7d2fe, transparent 62%); opacity: .7; animation: drift1 26s ease-in-out infinite alternate; }
.orb-b { width: 520px; height: 520px; right: -140px; top: 12%; background: radial-gradient(circle at 60% 40%, #ddd6fe, transparent 62%); opacity: .7; animation: drift2 32s ease-in-out infinite alternate; }
.orb-c { width: 500px; height: 500px; left: 30%; bottom: -220px; background: radial-gradient(circle at 50% 50%, #bae6fd, transparent 62%); opacity: .6; animation: drift3 38s ease-in-out infinite alternate; }
.orb-d { width: 360px; height: 360px; left: 52%; top: -120px; background: radial-gradient(circle at 50% 50%, #fbcfe8, transparent 60%); opacity: .65; animation: drift1 44s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(70px, 50px) scale(1.12); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1.05); } to { transform: translate(-60px, 40px) scale(.95); } }
@keyframes drift3 { from { transform: translate(0,0) scale(.95); } to { transform: translate(50px, -60px) scale(1.1); } }

.layout { position: relative; z-index: 1; display: flex; min-height: 100vh; }

/* ---------- sidebar (light glass) ---------- */
.sidebar {
  width: 264px; min-width: 264px;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 16px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.68), rgba(255,255,255,.4));
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--line);
  z-index: 30;
}
.sidebar::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.5), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 4px 6px 24px; }
.logo-mark { width: 46px; height: 46px; border-radius: 14px; transition: transform .35s cubic-bezier(.2,.9,.3,1.4); filter: drop-shadow(0 10px 24px rgba(139,92,246,.25)); }
.brand:hover .logo-mark { transform: rotate(-7deg) scale(1.07); }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.4px; color: var(--ink); }
.brand-accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-label { font-size: 10px; font-weight: 700; letter-spacing: 1.8px; color: var(--mut-2); padding: 14px 14px 8px; text-transform: uppercase; }
.nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  padding: 11.5px 14px; border-radius: 13px;
  color: var(--mut); text-decoration: none;
  font-weight: 600; font-size: 13.5px;
  transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .25s ease;
}
.nav-item i { display: inline-flex; color: var(--mut-2); transition: color .2s ease, transform .2s ease; }
.nav-item:hover { background: var(--panel-2); color: var(--ink); transform: translateX(3px); }
.nav-item:hover i { color: var(--g2); transform: scale(1.08); }
.nav-item.active {
  background: linear-gradient(120deg, rgba(124,140,248,.92), rgba(167,139,250,.92) 55%, rgba(238,157,247,.88));
  color: #fff;
  box-shadow: 0 14px 34px -8px rgba(139,92,246,.5);
}
.nav-item.active i { color: #fff; }
.nav-item.active::after {
  content: ''; position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(255,255,255,.25), 0 0 12px rgba(255,255,255,.9);
}
.nav-badge {
  margin-left: auto; font-style: normal;
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 8px;
  background: rgba(99,102,241,.12); color: #5b6cf5;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.nav-badge.warn { background: rgba(245,158,11,.16); color: #b45309; }
.nav-item.active .nav-badge { background: rgba(255,255,255,.25); color: #fff; }

/* ---------- main ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 34px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.tb-left { display: flex; flex-direction: column; gap: 2px; }
.crumb { font-size: 11px; font-weight: 700; color: var(--mut-2); letter-spacing: 1.6px; text-transform: uppercase; }
.page-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -.6px; background: linear-gradient(120deg, #1c2033, #6d7cf6); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tb-right { display: flex; align-items: center; gap: 12px; }
.tb-date { font-size: 12.5px; color: var(--mut); font-weight: 500; margin-right: 6px; }
.content { padding: 28px 34px 70px; animation: rise .45s cubic-bezier(.2,.8,.3,1); max-width: 1500px; width: 100%; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- glass panel ---------- */
.glass {
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  position: relative;
}
.card { padding: 22px; margin-bottom: 20px; transition: border-color .25s ease, box-shadow .25s ease; }
.card:hover { border-color: rgba(139,92,246,.35); box-shadow: var(--shadow), 0 0 0 1px rgba(139,92,246,.12); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; letter-spacing: -.3px; }
.card-title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--grad); margin-right: 10px; vertical-align: 1px; box-shadow: 0 0 12px rgba(139,92,246,.7); }
.card-sub { font-size: 12.5px; color: var(--mut); margin-top: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 13px; border: 1px solid var(--line-2);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .22s ease; text-decoration: none;
  background: var(--panel-2); color: var(--ink);
  position: relative; overflow: hidden;
}
.btn i { display: inline-flex; }
.btn::after {  /* sheen */
  content: ''; position: absolute; top: 0; left: -80%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn:hover::after { left: 130%; }
.btn:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.45); box-shadow: 0 12px 30px -10px rgba(124,140,248,.45); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad); color: #fff; border: none; box-shadow: 0 14px 34px -10px rgba(139,92,246,.55); }
.btn-primary:hover { box-shadow: 0 18px 44px -10px rgba(139,92,246,.7); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.3); color: #dc2626; }
.btn-danger:hover { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.55); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 11px; }
.btn-icon { padding: 9px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn:disabled::after { display: none; }

/* ---------- inputs ---------- */
input, select, textarea {
  width: 100%;
  padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,.7);
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  outline: none; transition: border .18s ease, box-shadow .18s ease, background .18s ease;
}
input::placeholder, textarea::placeholder { color: var(--mut-2); }
input:focus, select:focus, textarea:focus {
  border-color: var(--g1);
  box-shadow: 0 0 0 4px rgba(99,102,241,.16), 0 0 24px -6px rgba(124,140,248,.4);
  background: rgba(255,255,255,.9);
}
select option { background: #fff; color: var(--ink); }
textarea { resize: vertical; min-height: 76px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
/* a form-group carrying [hidden] must really disappear (display:flex would win over the UA rule) */
.form-group[hidden] { display: none !important; }
.form-group label { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .2px; }
.form-group label .req { color: var(--bad); }
.hint { font-size: 11.5px; color: var(--mut); margin-top: 4px; line-height: 1.5; }
input[type="color"] { padding: 4px; height: 44px; background: transparent; }

/* ---------- chips / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .2px;
  background: rgba(99,102,241,.1); color: #5b6cf5;
  border: 1px solid rgba(99,102,241,.2);
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
.st-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .2px;
  border: 1px solid transparent;
}
.st-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
.st-in_use { background: rgba(16,185,129,.12); color: #059669; border-color: rgba(16,185,129,.25); }
.st-spare { background: rgba(14,165,233,.12); color: #0284c7; border-color: rgba(14,165,233,.25); }
.st-repair { background: rgba(245,158,11,.14); color: #b45309; border-color: rgba(245,158,11,.3); }
.st-disposed { background: rgba(100,116,139,.14); color: #64748b; border-color: rgba(100,116,139,.28); }
.st-pending { background: rgba(245,158,11,.14); color: #b45309; border-color: rgba(245,158,11,.3); }
.st-approved { background: rgba(14,165,233,.12); color: #0284c7; border-color: rgba(14,165,233,.25); }
.st-purchased { background: rgba(16,185,129,.12); color: #059669; border-color: rgba(16,185,129,.25); }
.st-cancelled { background: rgba(100,116,139,.14); color: #64748b; border-color: rgba(100,116,139,.28); }
.pr-high { color: #dc2626; }
.pr-medium { color: #d97706; }
.pr-low { color: #0284c7; }

/* ---------- stat cards ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
  position: relative; overflow: hidden;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 12px;
  animation: cardIn .5s cubic-bezier(.2,.8,.3,1) both;
}
.stat:nth-child(2) { animation-delay: .05s; }
.stat:nth-child(3) { animation-delay: .1s; }
.stat:nth-child(4) { animation-delay: .15s; }
.stat:nth-child(5) { animation-delay: .2s; }
.stat:nth-child(6) { animation-delay: .25s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.stat::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.5), transparent);
}
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-ic {
  width: 44px; height: 44px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(99,102,241,.12); color: #5b6cf5;
  border: 1px solid rgba(99,102,241,.22);
  box-shadow: 0 10px 26px -10px rgba(124,140,248,.5);
}
.stat-ic.grad { background: var(--grad); color: #fff; border: none; box-shadow: 0 12px 30px -8px rgba(139,92,246,.6); }
.stat-ic.green { background: rgba(16,185,129,.12); color: #059669; border-color: rgba(16,185,129,.28); box-shadow: 0 10px 26px -10px rgba(16,185,129,.4); }
.stat-ic.amber { background: rgba(245,158,11,.13); color: #d97706; border-color: rgba(245,158,11,.3); box-shadow: 0 10px 26px -10px rgba(245,158,11,.4); }
.stat-ic.sky { background: rgba(14,165,233,.12); color: #0284c7; border-color: rgba(14,165,233,.28); box-shadow: 0 10px 26px -10px rgba(14,165,233,.4); }
.stat-trend { font-size: 11px; font-weight: 700; color: #059669; background: rgba(16,185,129,.12); padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(16,185,129,.22); }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -.8px; line-height: 1; background: linear-gradient(120deg, #1c2033, #7c8cf8 75%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-value small { font-size: 13px; color: var(--mut); font-weight: 600; -webkit-text-fill-color: var(--mut); }
.stat-label { font-size: 12.5px; color: var(--mut); font-weight: 500; }
.stat-deco { position: absolute; right: -30px; bottom: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(139,92,246,.14), transparent 68%); pointer-events: none; }

/* ---------- layout helpers ---------- */
.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.muted { color: var(--mut); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.link { color: #5b6cf5; font-weight: 600; cursor: pointer; text-decoration: none; transition: color .15s; }
.link:hover { color: #4338ca; text-decoration: underline; }
.flex-1 { flex: 1; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
.tbl th {
  text-align: left; padding: 12px 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  color: var(--mut-2); border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td { padding: 13px 14px; border-bottom: 1px solid rgba(30,41,59,.05); vertical-align: middle; }
.tbl tbody tr { transition: background .15s ease; }
.tbl tbody tr:hover { background: rgba(99,102,241,.06); }
.tbl .num { text-align: right; }
.tbl .actions { text-align: right; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl-name { font-weight: 600; color: var(--ink); }
.tbl-sub { font-size: 11.5px; color: var(--mut); margin-top: 2px; }

/* ---------- filter bar ---------- */
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 16px 18px; margin-bottom: 20px; }
.filters .form-group { min-width: 160px; }
.filters .search-wrap { flex: 1; min-width: 220px; position: relative; }
.filters .search-wrap i, .search-wrap > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--mut-2); pointer-events: none; }
.filters .search-wrap input, .search-wrap > input { padding-left: 38px; }

/* ---------- modal ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: transparent;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 46px 18px; overflow-y: auto;
  animation: fadein .22s ease;
}
.modal-mask[hidden] { display: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 640px; border-radius: 22px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: pop .32s cubic-bezier(.2,.9,.3,1.15); overflow: hidden;
}
.modal.lg { max-width: 860px; }
.modal.xl { max-width: 1080px; }
.modal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.3px; }
.modal-x { border: none; background: var(--panel-2); width: 34px; height: 34px; border-radius: 11px; cursor: pointer; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; transition: all .18s; }
.modal-x:hover { background: rgba(239,68,68,.12); color: var(--bad); transform: rotate(90deg); }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; top: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-2);
  color: var(--ink); padding: 13px 18px; border-radius: 14px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-lg); animation: slidein .28s cubic-bezier(.2,.9,.3,1.2);
  max-width: 380px; position: relative; overflow: hidden;
}
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--g2); }
.toast.ok::before { background: var(--ok); }
.toast.err::before { background: var(--bad); }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: 54px 20px; color: var(--mut); }
.empty .empty-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; background: var(--grad-soft); border: 1px solid rgba(139,92,246,.25); color: #5b6cf5; display: flex; align-items: center; justify-content: center; box-shadow: 0 14px 34px -12px rgba(139,92,246,.4); }
.empty .empty-txt { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink-2); }
.empty .empty-sub { font-size: 12.5px; margin-top: 5px; color: var(--mut-2); }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(139,92,246,.18); border-top-color: var(--g2); animation: rot .7s linear infinite; box-shadow: 0 0 24px -6px rgba(139,92,246,.5); }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { display: flex; align-items: center; justify-content: center; padding: 70px; gap: 14px; color: var(--mut); font-weight: 500; }

/* ---------- dashboard extras ---------- */
.chart-box { position: relative; height: 264px; }
.chart-box.tall { height: 320px; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center .dc-num { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -.8px; }
.donut-center .dc-lbl { font-size: 11px; color: var(--mut); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid rgba(30,41,59,.05); }
.alert-item:last-child { border-bottom: none; }
.alert-item .ai-ic { width: 40px; height: 40px; border-radius: 13px; background: rgba(245,158,11,.12); color: #d97706; border: 1px solid rgba(245,158,11,.25); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert-item .ai-ic.bad { background: rgba(239,68,68,.1); color: var(--bad); border-color: rgba(239,68,68,.25); }
.alert-item .ai-main { flex: 1; min-width: 0; }
.alert-item .ai-name { font-weight: 600; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-item .ai-sub { font-size: 11.5px; color: var(--mut); margin-top: 1px; }
.alert-item .ai-date { font-size: 11px; font-weight: 700; color: #b45309; white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.22); }
.alert-item .ai-date.late { color: var(--bad); background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.22); }
.mini-list .mi { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(30,41,59,.05); font-size: 12.5px; }
.mini-list .mi:last-child { border-bottom: none; }
.mini-list .mi b { font-weight: 600; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); padding: 6px 0; }
.legend-row .dot { width: 9px; height: 9px; border-radius: 3.5px; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
.legend-row .lg-num { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-track { height: 6px; border-radius: 999px; background: rgba(30,41,59,.08); overflow: hidden; margin-top: 4px; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--grad); box-shadow: 0 0 12px rgba(139,92,246,.6); transition: width .8s cubic-bezier(.2,.8,.3,1); }

/* ---------- assets ---------- */
.asset-row { display: flex; align-items: center; gap: 14px; }
.asset-av {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 24px -8px rgba(139,92,246,.55);
}
.asset-av.alt { background: linear-gradient(135deg,#0ea5e9,#6366f1); box-shadow: 0 10px 24px -8px rgba(14,165,233,.45); }
.tag-stack { display: flex; flex-wrap: wrap; gap: 5px; max-width: 260px; }

/* ---------- mini cards (dept/category) ---------- */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.mini-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; animation: cardIn .45s cubic-bezier(.2,.8,.3,1) both; }
.mini-card:hover { transform: translateY(-4px); border-color: rgba(139,92,246,.35); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(139,92,246,.15); }
.mini-card .mc-top { display: flex; align-items: center; justify-content: space-between; }
.mini-card .mc-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.2px; color: var(--ink); }
.mini-card .mc-sub { font-size: 12px; color: var(--mut); }
.mini-card .mc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.cat-dot { width: 13px; height: 13px; border-radius: 5px; flex-shrink: 0; box-shadow: 0 0 12px currentColor; }

/* ---------- detail ---------- */
.detail-hero { display: flex; align-items: center; gap: 20px; padding: 26px; margin-bottom: 20px; }
.detail-hero .dh-av { width: 64px; height: 64px; border-radius: 19px; font-size: 24px; }
.detail-hero .dh-name { font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: -.5px; }
.detail-hero .dh-sub { font-size: 12.5px; color: var(--mut); margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.detail-hero .dh-sub span { display: inline-flex; align-items: center; gap: 6px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.detail-cell { padding: 15px 17px; border-radius: 15px; background: rgba(255,255,255,.55); border: 1px solid var(--line); transition: border-color .2s; }
.detail-cell:hover { border-color: rgba(139,92,246,.3); }
.detail-cell .dc-label { font-size: 10.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--mut-2); margin-bottom: 6px; }
.detail-cell .dc-value { font-weight: 600; font-size: 14px; color: var(--ink); word-break: break-word; }
.detail-cell .dc-value.big { font-family: var(--font-display); font-size: 20px; font-weight: 700; background: linear-gradient(120deg,#1c2033,#7c8cf8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- barcode ---------- */
.scan-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px; }
#reader { width: 100%; max-width: 560px; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: 0 0 40px -12px rgba(124,140,248,.5); }
#reader video { border-radius: 18px; }
.manual-scan { display: flex; gap: 10px; width: 100%; max-width: 560px; }

/* ---------- report ---------- */
.report-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 18px; margin-bottom: 20px; }
.report-bar .form-group { min-width: 160px; }
.report-actions { display: flex; gap: 10px; margin-left: auto; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; padding: 5px; background: rgba(255,255,255,.6); border: 1px solid var(--line); border-radius: 14px; width: fit-content; margin-bottom: 18px; }
.tab { padding: 8px 18px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--mut); transition: all .2s ease; border: none; background: transparent; font-family: var(--font-body); display: inline-flex; align-items: center; gap: 7px; }
.tab i { display: inline-flex; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -8px rgba(139,92,246,.55); }

/* ---------- print ---------- */
#printArea { display: none; }
@media print {
  body * { visibility: hidden !important; }
  #printArea, #printArea * { visibility: visible !important; }
  #printArea { display: block !important; position: absolute; inset: 0; padding: 10mm; background: #fff; color: #111; }
  .no-print { display: none !important; }
}
.label-grid { display: flex; flex-wrap: wrap; gap: 2mm; }
.label-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #c9cede; padding: 1.5mm 1mm; page-break-inside: avoid; background: #fff; }
.label-cell .lbl-name { font-size: 7.5px; font-weight: 700; text-align: center; line-height: 1.2; overflow: hidden; max-height: 6mm; color: #111; }
.label-cell .lbl-dept { font-size: 6.5px; color: #6b7280; }
.label-cell svg { max-width: 34mm; height: 11mm; }
.label-cell .lbl-num { font-size: 8.5px; font-weight: 600; letter-spacing: .5px; margin-top: .6mm; color: #111; }
.rp { font-size: 12px; color: #111; }
.rp h2 { font-family: var(--font-display); margin-bottom: 4px; }
.rp .rp-meta { color: #6b7280; font-size: 11.5px; margin-bottom: 12px; }
.rp table { width: 100%; border-collapse: collapse; }
.rp th, .rp td { border: 1px solid #cbd5e1; padding: 5px 8px; text-align: left; font-size: 11px; }
.rp th { background: #f1f5f9; }

/* ---------- category icons & icon picker ---------- */
.cat-ic {
  width: 42px; height: 42px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cc, #6366f1) 14%, transparent);
  color: var(--cc, #6366f1);
  border: 1px solid color-mix(in srgb, var(--cc, #6366f1) 25%, transparent);
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--cc, #6366f1) 55%, transparent);
  overflow: hidden;
}
.cat-ic .cat-img { width: 44px; height: 44px; object-fit: cover; }
.chip-ic { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chip-ic svg { display: block; }
.chip-ic .cat-img { width: 18px; height: 18px; object-fit: cover; border-radius: 5px; }
.chip-ic svg { width: 16px; height: 16px; }
.chip-sm .chip-ic .cat-img { width: 16px; height: 16px; border-radius: 4px; }

/* category picker on the Add Asset form — big thumbnail + icon per chip */
.cat-pick { border-radius: 14px; }
.cat-pick .chip-ic {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,.6);
  overflow: hidden; flex-shrink: 0;
}
.cat-pick .chip-ic svg { width: 25px; height: 25px; }
.cat-pick .chip-ic .cat-img { width: 42px; height: 42px; object-fit: cover; border-radius: 12px; }
.icon-pick {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px; max-height: 196px; overflow-y: auto; padding: 4px;
}
.ip-btn {
  height: 52px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--mut);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s ease;
}
.ip-btn:hover { transform: translateY(-2px); color: var(--cc, var(--g2)); border-color: color-mix(in srgb, var(--cc, #6366f1) 45%, transparent); }
.ip-btn.sel { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -10px rgba(139,92,246,.6); }
.ip-btn svg { display: block; }

/* ---------- sidebar footer / sign out ---------- */
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.side-set {
  width: 100%; display: flex; align-items: center; gap: 13px;
  padding: 11px 14px; border: none; border-radius: 13px; cursor: pointer;
  background: transparent; color: var(--mut); font-weight: 600; font-size: 13.5px;
  font-family: var(--font-body); transition: all .2s ease;
}
.side-set i { display: inline-flex; color: var(--mut-2); transition: transform .2s ease; }
.side-set:hover { background: rgba(239,68,68,.08); color: #dc2626; }
.side-set:hover i { color: #dc2626; transform: translateX(-3px); }

/* ---------- permission picker (users) ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.perm-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.65);
  border: 1.5px solid var(--line);
  transition: all .18s ease;
}
.perm-card:hover { border-color: rgba(139,92,246,.4); transform: translateY(-1px); }
.perm-card.sel { background: var(--grad-soft); border-color: rgba(139,92,246,.55); box-shadow: 0 8px 22px -10px rgba(139,92,246,.45); }
.perm-name { font-weight: 700; font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.perm-name::before { content: ''; width: 15px; height: 15px; border-radius: 5px; border: 2px solid var(--mut-2); background: transparent; flex-shrink: 0; transition: all .15s ease; }
.perm-card.sel .perm-name::before { background: var(--grad); border-color: transparent; box-shadow: 0 0 8px rgba(139,92,246,.6); }
.perm-desc { font-size: 11px; color: var(--mut); line-height: 1.4; }

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.25); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.45); background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid-2, .grid-2-1 { grid-template-columns: 1fr; }
  .sidebar { width: 224px; min-width: 224px; }
  .content { padding: 20px 18px 50px; }
  .topbar { padding: 14px 18px; }
  .tb-date { display: none; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .3s ease; z-index: 60; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .orb { animation: none; }
}

/* ================= NEW FEATURES (v2) ================= */
/* left rail — renewals & upcoming */
.main-row { display: flex; gap: 20px; align-items: flex-start; padding: 28px 34px 70px; max-width: 1560px; width: 100%; margin: 0 auto; }
.main-row .content { flex: 1; min-width: 0; padding: 0; max-width: none; animation: none; }
.rail { width: 292px; flex-shrink: 0; position: sticky; top: 96px; }
.rail-card { padding: 18px; border-radius: 18px; }
.rail-title { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; letter-spacing: -.2px; color: var(--ink); }
.rail-sub { font-size: 11.5px; color: var(--mut); margin-top: 2px; margin-bottom: 8px; }
.rail-list { display: flex; flex-direction: column; }
.rail-item { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid rgba(30,41,59,.05); border-radius: 10px; transition: background .15s; }
.rail-item:hover { background: rgba(99,102,241,.06); }
.rail-ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(245,158,11,.12); color: #d97706; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rail-ic.bad { background: rgba(239,68,68,.1); color: var(--bad); }
.rail-main { flex: 1; min-width: 0; }
.rail-name { font-weight: 600; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-date { font-size: 10px; font-weight: 700; color: #b45309; white-space: nowrap; padding: 3px 8px; border-radius: 999px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.22); }
.rail-date.late { color: var(--bad); background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.22); }
.rail-empty { display: flex; align-items: center; gap: 8px; color: var(--mut); font-size: 12px; padding: 14px 4px; }
.rail-all { display: block; margin-top: 10px; }
@media (max-width: 1180px) { .rail { display: none; } }

/* segmented control (campus / kind) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 14px; padding: 5px; }
.seg-btn { border: none; background: transparent; border-radius: 10px; padding: 9px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; font-family: var(--font-body); transition: all .18s; }
.seg-btn b { font-size: 12.5px; letter-spacing: .4px; color: var(--mut); font-weight: 700; }
.seg-btn span { font-size: 10.5px; color: var(--mut-2); }
.seg-btn.sel { background: var(--grad); box-shadow: 0 10px 26px -8px rgba(139,92,246,.55); }
.seg-btn.sel b, .seg-btn.sel span { color: #fff; }

/* barcode mode */
.bc-mode-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bc-mode { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--mut); background: rgba(255,255,255,.5); transition: all .15s; }
.bc-mode.sel { border-color: rgba(139,92,246,.5); background: rgba(139,92,246,.09); color: var(--g2); }
.bc-mode input { accent-color: var(--g2); }

/* scan fetch/register */
.scan-hit { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.55); }
.scan-hit-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.scan-hit-sub { font-size: 12px; color: var(--mut); margin-top: 2px; }
.scan-miss { text-align: center; padding: 10px 6px; }
.scan-miss-ic { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 18px; background: rgba(245,158,11,.12); color: #d97706; display: flex; align-items: center; justify-content: center; }
.scan-miss p { font-size: 13px; color: var(--mut); line-height: 1.55; }
.scan-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.btn-lg { padding: 12px 20px; font-size: 13.5px; }

/* small chip */
.chip-sm { padding: 3px 9px; font-size: 10.5px; border-radius: 999px; border: 1px solid transparent; }

/* rich text editor */
.rich-toolbar { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; padding: 7px; background: rgba(255,255,255,.6); border: 1px solid var(--line); border-bottom: none; border-radius: 14px 14px 0 0; }
.rich-toolbar button { border: none; background: transparent; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--mut); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; font-family: var(--font-body); transition: all .15s; }
.rich-toolbar button:hover { background: rgba(99,102,241,.1); color: var(--g2); }
.rich-toolbar select { height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 11px; color: var(--ink); padding: 0 6px; }
.rt-sep { width: 1px; height: 20px; background: var(--line); margin: 0 5px; }
.rich-body { min-height: 320px; max-height: 52vh; overflow-y: auto; padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 14px 14px; outline: none; color: #1e2432; font-size: 14px; line-height: 1.65; }
.rich-body:focus { border-color: rgba(139,92,246,.45); box-shadow: 0 0 0 3px rgba(139,92,246,.12); }
.rich-body h1 { font-size: 22px; margin: 10px 0; }
.rich-body h2 { font-size: 17px; margin: 8px 0; }
.rich-body ul, .rich-body ol { padding-left: 22px; margin: 6px 0; }
.rich-body p { margin: 6px 0; }

/* signature drop zone */
.sig-drop { width: 220px; min-height: 110px; border: 2px dashed rgba(139,92,246,.4); border-radius: 14px; background: rgba(139,92,246,.05); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; transition: all .18s; }
.sig-drop:hover, .sig-drop.over { border-color: var(--g2); background: rgba(139,92,246,.12); }
.sig-drop img { max-width: 100%; max-height: 130px; }
.sig-placeholder { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--mut-2); font-size: 12px; padding: 18px; text-align: center; }

/* proposal document */
.proposal-page { background: #fff; color: #1e2432; padding: 44px 52px; max-width: 780px; margin: 0 auto; font-size: 14px; line-height: 1.7; }
.prop-formal { border-top: 6px solid #4f46e5; }
.prop-compact { padding: 28px 34px; font-size: 12.5px; }
.pp-head { border-bottom: 2px solid #e2e4fb; padding-bottom: 16px; margin-bottom: 20px; }
.pp-brand { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 1px; color: #4f46e5; }
.pp-title { font-size: 21px; font-weight: 700; margin-top: 6px; color: #141829; }
.pp-meta { font-size: 12px; color: #6b7280; margin-top: 6px; }
.pp-body p { margin: 8px 0; }
.pp-sig { margin-top: 34px; text-align: right; }
.pp-sig img { max-height: 90px; max-width: 220px; }
.pp-sig-name { font-weight: 700; margin-top: 4px; color: #141829; }
.pp-sig-role { font-size: 12px; color: #6b7280; }

/* e-waste badge */
.ew-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800; color: #fff; background: linear-gradient(120deg, #ef4444, #b91c1c); box-shadow: 0 4px 14px -4px rgba(239,68,68,.55); }

/* settings switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #cbd2e0; border-radius: 999px; transition: .25s; }
.switch .slider:before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 2px 6px rgba(30,41,59,.25); }
.switch input:checked + .slider { background: var(--grad); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.howto { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* print: proposal page only */
@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ================= MOBILE UI (v3) ================= */
.mobile-nav { display: none; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .mobile-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(255,255,255,.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); box-shadow: 0 -10px 34px -14px rgba(30,41,59,.28); padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: center; }
  .mn-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 12px; border: none; background: transparent; color: var(--mut); font-size: 10px; font-weight: 700; letter-spacing: .3px; font-family: var(--font-body); cursor: pointer; border-radius: 12px; transition: all .18s; }
  .mn-item i { display: inline-flex; color: var(--mut-2); }
  .mn-item.active { color: var(--g2); }
  .mn-item.active i { color: var(--g2); }
  .mn-scan { width: 52px; height: 52px; border-radius: 50%; border: none; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 28px -8px rgba(139,92,246,.7); margin-top: -22px; cursor: pointer; transition: transform .18s; }
  .mn-scan:active { transform: scale(.92); }
  .main-row { padding: 14px 14px 110px; }
  .topbar { border-radius: 0; padding: 12px 14px; }
  .tb-date { display: none; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters .search-wrap { width: 100%; }
  .grid-2, .grid-2-1 { grid-template-columns: 1fr; }
  .pd-main { grid-template-columns: 1fr !important; }
  .pd-below { grid-template-columns: 1fr !important; }
  .content { padding: 14px 0 0; }
  .modal { max-width: 96vw; max-height: 88vh; overflow-y: auto; }
  .rail { display: none; }
  .pd-actions { flex-wrap: wrap; }
}

/* ---- mobile more sheet ---- */
.sheet-mask { position: fixed; inset: 0; z-index: 80; background: rgba(15,17,34,.5); backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; }
.sheet-mask[hidden] { display: none; }
.sheet { width: 100%; max-width: 520px; background: rgba(255,255,255,.97); border-radius: 22px 22px 0 0; padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.8,.3,1); max-height: 78vh; overflow-y: auto; }
.sheet-mask.open .sheet { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 15px; margin-bottom: 14px; color: var(--ink); }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sheet-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 8px; border-radius: 14px; background: rgba(99,102,241,.06); border: 1px solid rgba(99,102,241,.12); color: var(--ink-2); font-size: 11.5px; font-weight: 700; text-decoration: none; transition: all .15s; }
.sheet-item i { display: inline-flex; color: var(--g2); }
.sheet-item:active { transform: scale(.95); background: rgba(99,102,241,.14); }
.sheet-item.sheet-logout { grid-column: 1 / -1; flex-direction: row; justify-content: center; align-items: center; gap: 9px; padding: 13px 8px; background: rgba(239,68,68,.07); border-color: rgba(239,68,68,.22); color: var(--bad); font-size: 13px; }
.sheet-item.sheet-logout i { color: var(--bad); }
.sheet-item.sheet-logout:active { background: rgba(239,68,68,.14); }

/* ================= INTERACTIVE SCANNER (v3) ================= */
.scan-overlay { position: fixed; inset: 0; z-index: 90; background: radial-gradient(120% 120% at 50% 20%, #1c1f3a 0%, #0b0d1d 70%); display: flex; flex-direction: column; }
.scan-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; color: #fff; }
.scan-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; letter-spacing: .4px; }
.scan-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.scan-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 10px 20px 40px; }
.scan-frame { position: relative; width: min(78vw, 340px); aspect-ratio: 1; }
.scan-reader { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; }
.scan-reader video { width: 100%; height: 100%; object-fit: cover; }
.vf { position: absolute; width: 34px; height: 34px; border: 4px solid rgba(139,92,246,.95); z-index: 3; }
.vf-tl { top: 8px; left: 8px; border-right: none; border-bottom: none; border-radius: 12px 0 0 0; }
.vf-tr { top: 8px; right: 8px; border-left: none; border-bottom: none; border-radius: 0 12px 0 0; }
.vf-bl { bottom: 8px; left: 8px; border-right: none; border-top: none; border-radius: 0 0 0 12px; }
.vf-br { bottom: 8px; right: 8px; border-left: none; border-top: none; border-radius: 0 0 12px 0; }
.vf-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, #a78bfa, #fff, #a78bfa, transparent); z-index: 3; box-shadow: 0 0 18px 3px rgba(167,139,250,.8); animation: vfScan 2.4s ease-in-out infinite; }
@keyframes vfScan { 0%, 100% { top: 18%; opacity: .55; } 50% { top: 80%; opacity: 1; } }
.scan-beam { position: absolute; inset: 0; border-radius: 22px; box-shadow: inset 0 0 60px 12px rgba(139,92,246,.22); z-index: 2; pointer-events: none; }
.scan-glow { position: absolute; inset: -14px; border-radius: 34px; background: radial-gradient(closest-side, rgba(139,92,246,.28), transparent); filter: blur(6px); z-index: 1; animation: glowPulse 2.4s ease-in-out infinite; }
@keyframes glowPulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.scan-hint { color: rgba(255,255,255,.65); font-size: 13px; text-align: center; line-height: 1.6; max-width: 420px; }
.scan-nocam { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; color: rgba(255,255,255,.6); font-size: 13px; background: rgba(255,255,255,.05); text-align: center; padding: 20px; }
.scan-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 99; }
.scan-flash.on { animation: scanFlash .3s ease-out; }
@keyframes scanFlash { 0% { opacity: .95; } 100% { opacity: 0; } }
.scan-overlay .manual-scan { display: flex; gap: 10px; width: min(86vw, 380px); }
.scan-overlay .manual-scan input { flex: 1; padding: 13px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1); color: #fff; font-size: 14px; outline: none; }
.scan-overlay .manual-scan input::placeholder { color: rgba(255,255,255,.45); }

/* scanner chooser + assign-serial mode */
.scan-choose { width: min(88vw, 380px); display: flex; flex-direction: column; gap: 14px; }
.scan-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 18px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; text-align: left; transition: all .15s; }
.scan-opt:hover { background: rgba(255,255,255,.12); border-color: rgba(139,92,246,.75); transform: translateY(-1px); }
.scan-opt-ic { width: 46px; height: 46px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #6366f1, #a78bfa); color: #fff; }
.scan-opt-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.scan-opt-txt b { font-size: 15px; letter-spacing: .2px; }
.scan-opt-txt small { font-size: 12px; color: rgba(255,255,255,.58); }
.scan-listwrap { width: min(94vw, 560px); }
.scan-sub { color: rgba(255,255,255,.55); font-size: 12.5px; text-align: center; margin-bottom: 10px; }
.scan-list { width: 100%; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.scan-group { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; text-align: left; transition: all .15s; }
.scan-group:hover { background: rgba(255,255,255,.11); border-color: rgba(139,92,246,.65); }
.scan-group-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.scan-group-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-group-txt small { font-size: 11.5px; color: rgba(255,255,255,.55); }
.scan-go { color: #c4b5fd; flex: none; }
.scan-empty { color: rgba(255,255,255,.5); text-align: center; padding: 30px 12px; font-size: 13px; }
.scan-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
#scanStatus { display: flex; justify-content: center; min-height: 18px; }

/* ================= PRODUCT PAGE (v3) ================= */
.pd-crumb { font-size: 12px; color: var(--mut); margin-bottom: 14px; }
.pd-crumb a { color: var(--g2); text-decoration: none; font-weight: 600; }
.pd-card { padding: 24px; }
.pd-main { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 28px; }
.pd-gallery { }
.pd-hero { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; background: #f4f5fb; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.pd-hero img { width: 100%; height: 100%; object-fit: contain; }
.pd-fallback { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff; }
.pd-fb-initial { font-family: var(--font-display); font-size: 72px; font-weight: 800; text-shadow: 0 10px 30px rgba(0,0,0,.25); }
.pd-fb-cat { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; opacity: .85; }
.pd-kind { position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: #fff; }
.pd-kind.green { background: rgba(5,150,105,.92); }
.pd-kind.amber { background: rgba(217,119,6,.92); }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.pd-thumb { width: 66px; height: 52px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; opacity: .7; transition: all .18s; }
.pd-thumb.sel { border-color: var(--g2); opacity: 1; }
.pd-info { display: flex; flex-direction: column; gap: 12px; }
.pd-name { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -.4px; color: var(--ink); line-height: 1.25; }
.pd-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-price { background: linear-gradient(120deg, rgba(255,255,255,.75), rgba(239,246,255,.75)); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.pd-price-val { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 28px; font-weight: 800; background: linear-gradient(120deg,#1c2033,#7c3aed); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pd-price-sub { font-size: 12px; color: var(--mut); margin-top: 4px; }
.pd-stockline { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-low, .pd-ok, .pd-renew { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 999px; }
.pd-low { color: #dc2626; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); }
.pd-ok { color: #059669; background: rgba(5,150,105,.1); border: 1px solid rgba(5,150,105,.25); }
.pd-renew { color: #7c3aed; background: rgba(124,58,237,.08); border: 1px solid rgba(124,58,237,.22); }
.pd-renew.soon { color: #d97706; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.28); }
.pd-renew.late { color: #dc2626; background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.25); }
.pd-actions { display: flex; gap: 10px; margin-top: 6px; }
.pd-below { margin-top: 20px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; }
.spec-row { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; transition: background .15s; }
.spec-row:hover { background: rgba(99,102,241,.05); }
.spec-k { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--mut-2); }
.spec-v { font-size: 13.5px; font-weight: 600; color: var(--ink); word-break: break-word; }
.pd-bc-card { }
.pd-similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pd-sim { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.5); transition: all .18s; }
.pd-sim:hover { transform: translateY(-3px); border-color: rgba(139,92,246,.35); }
.pd-sim-tile { height: 86px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-display); font-size: 30px; font-weight: 800; margin-bottom: 9px; }
.pd-sim-name { font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-sim-sub { font-size: 11px; color: var(--mut); margin-top: 2px; }

/* incharge box in users modal */
.incharge-box { border: 1px dashed rgba(139,92,246,.4); border-radius: 16px; padding: 16px; background: rgba(139,92,246,.04); }
.incharge-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13.5px; color: var(--ink); }

/* ===== AI Assistant panel (proposal editor) ===== */
.ai-panel, .ai-img-panel { border: 1px dashed rgba(139,92,246,.35); border-radius: 16px; padding: 14px; background: rgba(139,92,246,.045); }
.ai-panel > label, .ai-img-panel > label { display: flex; align-items: center; gap: 8px; }
.ai-mode-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.ai-chip {
  border: 1px solid rgba(139,92,246,.3); background: rgba(255,255,255,.65);
  color: var(--ink-2); font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: all .15s ease;
}
.ai-chip:hover { border-color: rgba(139,92,246,.6); transform: translateY(-1px); }
.ai-chip.active { background: var(--grad-2); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -8px rgba(139,92,246,.7); }
.ai-opts { min-height: 34px; }
.ai-opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-gen-row { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.ai-img-search { display: flex; gap: 8px; margin: 6px 0 10px; }
.ai-img-search input { flex: 1; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(139,92,246,.25); background: rgba(255,255,255,.8); font-family: var(--font-body); font-size: 13px; color: var(--ink); outline: none; }
.ai-img-search input:focus { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 3px rgba(139,92,246,.14); }
.ai-img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 240px; overflow-y: auto; }
.ai-img-tile {
  position: relative; border: 1px solid rgba(90,60,110,.14); border-radius: 12px; overflow: hidden;
  background: #fff; padding: 0; cursor: pointer; aspect-ratio: 1; transition: all .15s ease;
}
.ai-img-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-img-tile:hover { border-color: rgba(139,92,246,.65); transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(139,92,246,.55); }
.ai-img-src {
  position: absolute; left: 4px; bottom: 4px; font-size: 9px; font-weight: 800; letter-spacing: .6px;
  text-transform: uppercase; color: #fff; background: rgba(30,27,75,.72); padding: 2px 6px; border-radius: 999px;
}

/* ================= ASSET DETAIL — AI product research (v4) ================= */
.ai-loading { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--mut); font-size: 13px; }
.ai-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(99,102,241,.18); border-top-color: #6366f1; animation: aiSpin .8s linear infinite; flex: none; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-desc { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); margin: 2px 0 14px; }
.ai-brand-chip { background: rgba(99,102,241,.1) !important; color: #4338ca !important; font-weight: 700; }
.ai-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.ai-srcs { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ai-src { font-size: 11px; color: var(--mut); text-decoration: none; border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.6); transition: all .15s; max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-src:hover { border-color: rgba(139,92,246,.5); color: #4338ca; }
.ai-note { font-size: 11.5px; color: var(--mut); display: flex; align-items: center; gap: 7px; margin-top: 10px; min-height: 18px; flex-wrap: wrap; }
.pd-hero.noimg { background: linear-gradient(140deg, #7c8cf8, #a78bfa); min-height: 240px; }
.ai-note #aiCleanBg { margin-left: auto; }
.ai-note #aiCleanBg:disabled { opacity: .65; cursor: default; }
.ai-note b { color: var(--ink-2); }
.pd-thumb-wrap { position: relative; }
.pd-thumb-badge { position: absolute; right: -4px; bottom: -4px; background: linear-gradient(120deg,#10b981,#059669); color: #fff; font-size: 8.5px; font-weight: 800; letter-spacing: .5px; border-radius: 999px; padding: 2px 6px; box-shadow: 0 2px 6px rgba(5,150,105,.4); }
.pd-ai-img-holder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #fff; }
.pd-ai-img-holder img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ================= ASSETS — card grid + filter drawer (v5) ================= */
.ast-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.ast-search { flex: 1; min-width: 220px; position: relative; }
.ast-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--mut); display: flex; }
.ast-search input { width: 100%; padding: 11px 14px 11px 38px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(255,255,255,.7); font-size: 13.5px; color: var(--ink); outline: none; }
.ast-search input:focus { border-color: rgba(139,92,246,.6); box-shadow: 0 0 0 3px rgba(139,92,246,.13); background: #fff; }
.ast-bar-btns { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.ast-bar .btn { display: inline-flex; align-items: center; gap: 7px; }
.ast-bar .btn.has-f { border-color: rgba(139,92,246,.55); color: #4338ca; background: rgba(99,102,241,.08); }
.f-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: linear-gradient(120deg, #6366f1, #a78bfa); color: #fff; font-size: 10.5px; font-weight: 800; }
.ast-meta { display: flex; align-items: baseline; gap: 10px; margin: 2px 2px 14px; }
.ast-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--ink); }
.ast-sub { font-size: 12.5px; color: var(--mut); }
.ast-meta .btn { margin-left: auto; }

.ast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: 16px; }
.ast-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; display: flex; flex-direction: column; }
.ast-card:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -18px rgba(76,29,149,.35); border-color: rgba(139,92,246,.4); }
.ast-card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; }
.ast-card-img { width: 100%; height: 100%; object-fit: contain; padding: 8px; position: relative; z-index: 1; }
.ast-card-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #d6d9ea; }
.ast-card-letter { font-family: var(--font-display); font-size: 56px; font-weight: 800; color: #fff; text-shadow: 0 8px 22px rgba(0,0,0,.22); line-height: 1; }
.ast-card-type { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.92); }
.ast-card-status { position: absolute; top: 8px; right: 8px; z-index: 2; font-size: 10px; padding: 4px 9px; box-shadow: 0 4px 12px rgba(15,23,42,.18); }
.ast-card-kind { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 9.5px; font-weight: 800; letter-spacing: 1px; padding: 4px 9px; border-radius: 999px; background: rgba(245,158,11,.92); color: #fff; text-transform: uppercase; }
.ast-card-actions { position: absolute; right: 8px; bottom: 8px; z-index: 3; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.ast-card:hover .ast-card-actions { opacity: 1; }
.ast-card-actions .btn { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 6px 14px rgba(15,23,42,.22); }
.ast-card-body { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.ast-card-name { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.ast-card-sub { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ast-card-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.ast-card-chips .chip { font-size: 10.5px; padding: 3px 8px; }
.ast-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px dashed var(--line); padding-top: 9px; }
.ast-card-qty { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: #059669; }
.ast-card-qty.low { color: #dc2626; }
.ast-card-price { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.ast-card-go { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: #7c3aed; opacity: .85; }
.ast-card:hover .ast-card-go { opacity: 1; }

/* filter drawer (right side) */
.fd-mask { position: fixed; inset: 0; background: rgba(12,14,30,.45); backdrop-filter: blur(2px); z-index: 105; opacity: 0; transition: opacity .2s; }
.fd-mask.on { opacity: 1; }
.fd-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 94vw); background: #fff; z-index: 106; box-shadow: -24px 0 60px -30px rgba(15,23,42,.5); transform: translateX(104%); transition: transform .22s cubic-bezier(.2,.8,.25,1); display: flex; flex-direction: column; border-radius: 20px 0 0 20px; }
.fd-panel.open { transform: translateX(0); }
.fd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 20px 20px 12px; border-bottom: 1px solid var(--line); }
.fd-title { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: var(--ink); }
.fd-sub { font-size: 12px; color: var(--mut); margin-top: 2px; }
.fd-body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.fd-body .form-group label { font-size: 11px; }
.fd-foot { display: flex; gap: 10px; padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.fd-foot .btn { flex: 1; justify-content: center; }
@media (max-width: 640px) {
  .ast-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .ast-card-name { font-size: 13px; min-height: 33px; }
}

/* price × items footers (assets + consumables cards, details header) */
.ast-card-buy { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; }
.ast-card-xqty { font-size: 11px; font-weight: 700; color: var(--mut); white-space: nowrap; }
.ast-card-buy.low .ast-card-price { color: #dc2626; }
.pd-price-x { font-size: .62em; font-weight: 800; color: var(--mut); letter-spacing: .3px; }

/* ============================================================
   Grouped stock cards (quantity added as N units → one card)
   ============================================================ */
.ast-grid { align-items: start; }                       /* cards keep natural height when a stock card expands */
.ast-card.ast-stockcard { cursor: pointer; }
.ast-card.ast-stockcard:hover { transform: translateY(-2px); border-color: rgba(124,58,237,.55); box-shadow: 0 14px 28px -16px rgba(76,29,149,.4); }
.ast-card.ast-stockcard.open { border-color: rgba(124,58,237,.55); box-shadow: 0 18px 34px -18px rgba(76,29,149,.35); }
.st-pill.st-mixed { background: rgba(124,58,237,.14); color: #7c3aed; border-color: rgba(124,58,237,.3); }
.ast-card-multi {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
  color: #fff; background: rgba(15,23,42,.55);
  padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(2px);
}
.ast-expand { border: 0; background: none; font: inherit; padding: 0; cursor: pointer; }
.ast-expand .ic { transition: transform .18s ease; }
.ast-stockcard.open .ast-expand .ic:last-child { transform: rotate(90deg); }
.ast-units { border-top: 1px solid var(--line); background: #fbfaff; }
.ast-units-head { padding: 9px 13px 2px; font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); }
.ast-unit { display: flex; align-items: center; gap: 8px; padding: 7px 13px; font-size: 12px; flex-wrap: wrap; row-gap: 4px; }
.ast-unit + .ast-unit { border-top: 1px dashed #ece9fb; }
.ast-unit-id { min-width: 34px; font-weight: 800; color: var(--ink-2); }
.ast-unit-bc { display: inline-flex; align-items: center; gap: 4px; min-width: 82px; font-size: 11px; font-weight: 700; color: #7c3aed; font-family: ui-monospace, Consolas, monospace; white-space: nowrap; }
.ast-unit-bc.dim { color: var(--mut-2); font-family: var(--font-body); font-weight: 500; }
.ast-unit-sn { flex: 1; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ast-unit-sn.dim { color: var(--mut-2); }
.ast-unit-st { font-size: 9.5px; padding: 3px 8px; white-space: nowrap; }
.ast-unit-acts { display: flex; gap: 4px; }
.ast-unit-acts .btn { width: 26px; height: 26px; border-radius: 8px; }
@media (max-width: 640px) {
  .ast-unit { flex-wrap: wrap; row-gap: 4px; }
  .ast-unit-id { min-width: 0; }
}

/* ============================================================
   Pinned price slicer (two draggers) in the Filters drawer
   ============================================================ */
.fd-pin { flex-shrink: 0; padding: 14px 20px 4px; background: #fff; border-bottom: 1px solid var(--line); }
.fd-pin-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fd-pin-top label { font-size: 11px; font-weight: 800; letter-spacing: .3px; color: var(--ink-2); text-transform: uppercase; }
.fd-pin-val { font-size: 12.5px; font-weight: 800; color: #7c3aed; white-space: nowrap; }
.prange { position: relative; height: 26px; margin: 6px 6px 0; }
.prange-track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 99px; background: #e6e3f6; }
.prange-fill { position: absolute; top: 11px; height: 4px; border-radius: 99px; background: var(--grad); pointer-events: none; }
.prange input[type='range'] {
  position: absolute; inset: 0; width: 100%; height: 26px; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent;
  pointer-events: none; outline: none;
}
.prange input[type='range']::-webkit-slider-runnable-track { height: 26px; background: transparent; }
.prange input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; margin-top: 4px;
  border-radius: 50%; background: #fff; border: 2.5px solid #7c3aed;
  box-shadow: 0 2px 8px rgba(76,29,149,.35); cursor: grab; pointer-events: auto;
}
.prange input[type='range']::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.08); }
.prange input[type='range']::-moz-range-track { height: 26px; background: transparent; }
.prange input[type='range']::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2.5px solid #7c3aed;
  box-shadow: 0 2px 8px rgba(76,29,149,.35); cursor: grab; pointer-events: auto;
}
.prange-scale { display: flex; justify-content: space-between; margin: 2px 6px 0; font-size: 10.5px; color: var(--mut); }

/* ============================================================
   Chart date-granularity switch (Year | Month | Week | Day)
   ============================================================ */
.gran-row { display: inline-flex; align-items: center; gap: 2px; margin: 0 20px 10px; padding: 3px; background: rgba(99,102,241,.08); border: 1px solid var(--line); border-radius: 999px; }
.gran-row button { border: 0; background: transparent; padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--mut); cursor: pointer; transition: color .15s, background .15s; }
.gran-row button:hover { color: var(--ink); }
.gran-row button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -4px rgba(139,92,246,.6); }

/* ============================================================
   Item Stock page (one grouped stock card → all its units)
   ============================================================ */
.stg-hero { display: grid; grid-template-columns: 250px 1fr; gap: 22px; padding: 20px; margin-bottom: 16px; }
.stg-media { position: relative; aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; min-height: 170px; }
.stg-img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.stg-letter { font-family: var(--font-display); font-size: 72px; font-weight: 800; color: #fff; text-shadow: 0 10px 26px rgba(0,0,0,.22); line-height: 1; }
.stg-type { font-size: 12px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,.92); }
.stg-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stg-info .pd-name { font-size: 22px; }
.stg-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.stg-sub { font-size: 13px; color: var(--mut); }
.stg-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stg-price .ast-card-price { font-size: 19px; }
.stg-statuses { display: flex; flex-wrap: wrap; gap: 7px; }
.stg-note { font-size: 12.5px; font-weight: 700; color: #059669; display: inline-flex; align-items: center; gap: 6px; }
.stg-note.low { color: #dc2626; }
.stg-actions { margin-top: 4px; }
@media (max-width: 720px) {
  .stg-hero { grid-template-columns: 1fr; }
  .stg-media { max-width: 320px; }
}

/* ================= stock type — Fixed stock / Accessories ================= */
.ast-sku.sku-fixed { color: #4f46e5; background: rgba(99,102,241,.12); border-color: rgba(99,102,241,.28); }
.ast-sku.sku-acc { color: #0d9488; background: rgba(20,184,166,.14); border-color: rgba(20,184,166,.3); }
.sku-choose { display: grid; grid-template-columns: 1fr; gap: 10px; }
.sku-opt {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  padding: 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--panel-2); cursor: pointer; transition: all .18s ease;
}
.sku-opt:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.4); box-shadow: var(--shadow-lg); }
.sku-opt.sel { border-color: rgba(139,92,246,.55); background: rgba(139,92,246,.08); }
.sku-opt-ic {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff;
}
.sku-opt-txt { display: flex; flex-direction: column; gap: 2px; }
.sku-opt-txt b { font-family: var(--font-display); font-size: 15px; color: var(--ink); }
.sku-opt-txt small { font-size: 12px; color: var(--mut); }

/* ===== pinned dialog (the Add-Asset page never closes on a backdrop click) ===== */
.modal-mask.static { cursor: default; }
.modal.modal-static { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(139,92,246,.22); }
.modal-foot-note { margin-right: auto; font-size: 11.5px; color: var(--mut); display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .modal-foot-note { display: none; } }

/* ===== barcode / serial list (paste or Excel import) ===== */
.code-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.code-as { display: flex; gap: 6px; flex-wrap: wrap; }
#aCodeList { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.code-stat { font-size: 12px; color: var(--mut); margin-top: 8px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.code-stat.ok { color: #059669; }
.code-stat.over { color: #dc2626; font-weight: 600; }
.code-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 132px; overflow-y: auto; }
.code-chip {
  font-family: ui-monospace, monospace; font-size: 11.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(99,102,241,.1); color: #4f46e5; border: 1px solid rgba(99,102,241,.22);
}
.code-chip.over { background: rgba(239,68,68,.12); color: #dc2626; border-color: rgba(239,68,68,.3); }
.code-chip.more { background: var(--panel-2); color: var(--mut); border-color: var(--line); }
input.it-off, input.it-off:disabled { background: var(--panel-2); opacity: .55; cursor: not-allowed; }

/* ================= ASSIGN PAGE — IT stock on the left, people tree on the right ================= */
/* minmax(0, …) on both columns: a plain 1fr floor is min-content, which lets one
   long barcode inside a card push the whole page wider than the phone */
.asg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
.asg > .card { min-width: 0; }
@media (max-width: 1080px) {
  .asg { grid-template-columns: minmax(0, 1fr); }
  /* stacked: the tree sits below, so the stock list must not eat the whole screen */
  .asg-list { max-height: 46vh; }
}
.asg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.asg-head-main { min-width: 0; }
/* the stock header is title + search + type filter: always stacked, never a
   three-row pile with a dead gap beside it */
.asg-head.stack { flex-direction: column; align-items: stretch; gap: 10px; }
.asg-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.asg-head.stack .asg-tools { width: 100%; }
/* position:relative is what anchors the magnifier — without it the absolutely
   positioned <i> escaped the field and floated over the stock list */
.asg-tools .search-wrap { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.asg-tools .search-wrap input { width: 100%; min-width: 0; }
.asg-tools select { flex: 0 0 auto; width: 150px; max-width: 150px; }
@media (max-width: 560px) {
  .asg-tools { flex-wrap: wrap; }
  .asg-tools .search-wrap { flex: 1 1 100%; }
  .asg-tools select { flex: 1 1 100%; width: 100%; max-width: none; }
}
.asg-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.asg-sub { font-size: 12px; color: var(--mut); line-height: 1.45; }
.asg-list, .asg-tree { max-height: 62vh; overflow-y: auto; padding-right: 6px; scrollbar-gutter: stable; overscroll-behavior: contain; }
/* Chrome/Edge: a real, always-painted scrollbar (the list is long — it needs a cue) */
.asg-list::-webkit-scrollbar, .asg-tree::-webkit-scrollbar { width: 10px; }
.asg-list::-webkit-scrollbar-track, .asg-tree::-webkit-scrollbar-track { background: rgba(15,23,42,.05); border-radius: 999px; }
.asg-list::-webkit-scrollbar-thumb, .asg-tree::-webkit-scrollbar-thumb { background: rgba(99,102,241,.45); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.asg-list::-webkit-scrollbar-thumb:hover, .asg-tree::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,.7); background-clip: padding-box; }
/* Firefox: the standard properties only (setting them in Chrome suppresses ::-webkit-scrollbar) */
@supports not selector(::-webkit-scrollbar) {
  .asg-list, .asg-tree { scrollbar-width: thin; scrollbar-color: rgba(99,102,241,.45) rgba(15,23,42,.05); }
}
.asg-list { display: flex; flex-direction: column; gap: 8px; }
/* A scrolling flex column shrinks its children to nothing once the content is
   taller than max-height — every card collapsed to a hairline. Rows keep their
   natural height and the list scrolls instead. */
.asg-list > * { flex: 0 0 auto; }
.asg-item { border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); overflow: hidden; }
.asg-item.sel { border-color: rgba(139,92,246,.5); box-shadow: 0 0 0 1px rgba(139,92,246,.18); }
.asg-item-top { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; min-width: 0; }
.asg-item-top:active { cursor: grabbing; }
.asg-item-top > .asg-exp { flex: 0 0 auto; width: 26px; height: 26px; padding: 0; }
.asg-item-ic { display: inline-flex; flex: 0 0 auto; color: var(--g2); }
.asg-item-txt { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.asg-item-name { font-weight: 700; font-size: 13.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asg-item-sub { font-size: 11.5px; line-height: 1.35; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asg-item-badge { flex: 0 0 auto; margin-left: auto; font-size: 11px; font-weight: 800; color: #4f46e5; background: rgba(99,102,241,.12); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.asg-units { border-top: 1px dashed var(--line); padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.asg-unit { display: flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; padding: 5px 6px; border-radius: 8px; cursor: pointer; }
.asg-unit:hover { background: rgba(99,102,241,.06); }
/* the global `input { width:100% }` must not apply to a checkbox inside a row —
   it stretched to the full row and pushed the barcode/serial out of sight */
.asg-unit > input[type="checkbox"] {
  flex: 0 0 auto; width: 15px; height: 15px; min-width: 15px; margin: 0; padding: 0;
  border-radius: 4px; accent-color: #6366f1; cursor: pointer;
}
/* a fixed share for the code column so barcode / serial line up from row to row */
.asg-unit-code {
  flex: 0 0 40%; max-width: 40%; min-width: 0; font-family: ui-monospace, monospace; font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asg-unit-sn { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asg-unit-chip { flex: 0 0 auto; }
.asg-node { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 10px; }
.asg-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; cursor: pointer; transition: background .15s ease; min-width: 0; }
.asg-row:hover { background: rgba(99,102,241,.08); }
.asg-caret { width: 16px; display: inline-flex; flex: 0 0 auto; color: var(--mut-2); transition: transform .18s ease; }
.asg-row.open .asg-caret { transform: rotate(90deg); }
.asg-row-ic { display: inline-flex; flex: 0 0 auto; color: var(--g2); }
.asg-row-txt { font-size: 13px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asg-row-count { flex: 0 0 auto; margin-left: auto; font-size: 11px; color: var(--mut-2); font-weight: 700; white-space: nowrap; }
.asg-people { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 0 8px 26px; }
.asg-person {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(99,102,241,.28); background: rgba(99,102,241,.09); color: #4f46e5;
  font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s ease;
}
.asg-person:hover, .asg-person.drop { background: var(--grad); color: #fff; transform: translateY(-1px); }
.asg-person.off { background: transparent; border-style: dashed; color: var(--mut); font-weight: 600; }
.asg-person.off:hover { background: var(--panel-2); color: var(--ink); transform: none; }
.asg-empty { font-size: 12px; color: var(--mut-2); padding: 4px 0 8px 26px; }
.asg-selbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px;
  padding: 10px 12px; border-radius: 14px; font-size: 12.5px; font-weight: 600;
  background: rgba(99,102,241,.09); border: 1px solid rgba(99,102,241,.22);
}

/* ============================================================
   RFID — card registry, reader console, scan result panel
   ============================================================ */
/* a hidden button must stay hidden (inline-flex would win over [hidden]) */
.btn[hidden] { display: none !important; }
.rfid-grid-top { display: grid; grid-template-columns: 1.04fr 1fr; gap: 20px; align-items: start; }
.rfid-console { display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.rfid-console::after {
  content: ''; position: absolute; left: -30%; right: -30%; bottom: -150px; height: 220px;
  background: radial-gradient(closest-side, rgba(124,140,248,.16), transparent);
  pointer-events: none;
}
.rfid-console-head { display: flex; align-items: center; gap: 16px; }
.rfid-wave {
  position: relative; width: 78px; height: 78px; min-width: 78px; border-radius: 24px;
  display: grid; place-items: center; color: #fff; background: var(--grad);
  box-shadow: 0 18px 40px -14px rgba(124,140,248,.75);
}
.rfid-wave .rfid-wave-ring {
  position: absolute; inset: 0; border-radius: 24px; border: 1px solid rgba(255,255,255,.7);
  opacity: 0; animation: rfidPing 2.8s ease-out infinite;
}
.rfid-wave .rfid-wave-ring:nth-child(2) { animation-delay: .9s; }
.rfid-wave .rfid-wave-ring:nth-child(3) { animation-delay: 1.8s; }
@keyframes rfidPing {
  0% { opacity: .5; transform: scale(1); }
  70% { opacity: 0; transform: scale(1.3); }
  100% { opacity: 0; transform: scale(1.3); }
}
.rfid-wave.reading { animation: rfidPulse .9s ease-in-out infinite; }
@keyframes rfidPulse {
  0%, 100% { box-shadow: 0 18px 40px -14px rgba(124,140,248,.75); }
  50% { box-shadow: 0 18px 56px -8px rgba(124,140,248,1); }
}
.rfid-wave.ok { background: linear-gradient(135deg, #34d399, #10b981); }
.rfid-wave.err { background: linear-gradient(135deg, #fb7185, #ef4444); }
.rfid-console-txt { flex: 1; min-width: 0; }
.rfid-status {
  font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  background: rgba(30,41,59,.06); color: var(--mut); border: 1px solid var(--line);
}
.rfid-status.ok { background: rgba(16,185,129,.1); color: #059669; border-color: rgba(16,185,129,.3); }
.rfid-status.busy { background: rgba(124,140,248,.12); color: #6366f1; border-color: rgba(124,140,248,.35); }
.rfid-status.warn { background: rgba(245,158,11,.12); color: #b45309; border-color: rgba(245,158,11,.3); }
.rfid-status.err { background: rgba(239,68,68,.1); color: #dc2626; border-color: rgba(239,68,68,.3); }
.rfid-manual { display: flex; gap: 10px; position: relative; z-index: 1; }
.rfid-manual input { flex: 1; font-family: ui-monospace, Consolas, monospace; letter-spacing: 1.2px; }
.rfid-reader-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--mut); position: relative; z-index: 1; }
.rfid-reader-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mut-2); box-shadow: 0 0 0 3px rgba(153,161,189,.15); flex-shrink: 0; }
.rfid-reader-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.rfid-baud { width: auto; padding: 5px 8px; font-size: 12px; border-radius: 9px; }
.rfid-console > .hint { position: relative; z-index: 1; }

.rfid-result { display: flex; flex-direction: column; }
.rfid-result-body { flex: 1; }
.rfid-idle { text-align: center; padding: 14px 6px 6px; }
.rfid-idle-ic {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center;
  background: var(--grad-soft); color: #7c8cf8; border: 1px solid rgba(124,140,248,.22);
}
.rfid-idle-ic.err { background: rgba(239,68,68,.1); color: #dc2626; border-color: rgba(239,68,68,.25); }
.rfid-idle-t { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; color: var(--ink); }
.rfid-idle-s { font-size: 12.5px; color: var(--mut); margin: 6px auto 14px; max-width: 340px; line-height: 1.55; }

.rfid-hit-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rfid-uid { font-family: ui-monospace, Consolas, monospace; font-weight: 700; letter-spacing: 1.6px; color: var(--ink); font-size: 14px; }
.rfid-uid.sm { font-size: 12px; letter-spacing: 1px; }
.rfid-uid.big { font-size: 22px; letter-spacing: 2.4px; }
.rfid-label { font-size: 11px; color: var(--mut); background: rgba(30,41,59,.05); padding: 3px 9px; border-radius: 999px; }
.rfid-asset {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(124,140,248,.09), rgba(238,157,247,.07));
  border: 1px solid rgba(124,140,248,.16);
}
.rfid-asset-tile {
  width: 46px; height: 46px; min-width: 46px; border-radius: 14px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 19px; color: #fff; background: var(--grad);
}
.rfid-asset-main { min-width: 0; }
.rfid-asset-name { font-weight: 700; font-size: 14.5px; }
.rfid-asset-sub { font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.rfid-asset-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.rfid-state {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  font-size: 12.5px; line-height: 1.5; border: 1px solid var(--line);
  background: rgba(30,41,59,.035); color: var(--ink-2); margin-bottom: 12px;
}
.rfid-state.warn { background: rgba(245,158,11,.09); border-color: rgba(245,158,11,.28); color: #92400e; }
.rfid-state.err { background: rgba(239,68,68,.07); border-color: rgba(239,68,68,.25); color: #b91c1c; }
.rfid-state.ok { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.25); color: #047857; }
.rfid-state svg { flex-shrink: 0; margin-top: 1px; }
.rfid-state > div { flex: 1; }
.rfid-state .btn { flex-shrink: 0; align-self: center; }
.rfid-state .hint { color: inherit; opacity: .8; }

.rfid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0 20px; }
.rfid-stat {
  padding: 16px 18px; border-radius: 18px; background: var(--panel-2);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.rfid-stat-v { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.5px; }
.rfid-stat-l { font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.rfid-stat.ok .rfid-stat-v { color: #059669; }
.rfid-stat.warn .rfid-stat-v { color: #b45309; }
.rfid-stat.sky .rfid-stat-v { color: #0284c7; }

.rfid-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.rfid-search { position: relative; flex: 1; min-width: 220px; }
.rfid-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.rfid-chip {
  border: 1px solid var(--line); background: rgba(255,255,255,.6); color: var(--mut);
  font-size: 11.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px; cursor: pointer;
  display: inline-flex; gap: 6px; align-items: center; font-family: inherit; transition: all .18s;
}
.rfid-chip b { font-weight: 700; color: var(--ink-2); font-size: 11px; }
.rfid-chip:hover { color: var(--ink); border-color: var(--line-2); }
.rfid-chip.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -10px rgba(124,140,248,.7); }
.rfid-chip.active b { color: #fff; }

.rfid-pill { font-size: 10.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .6px; }
.rfid-pill.ok { background: rgba(16,185,129,.12); color: #047857; }
.rfid-pill.warn { background: rgba(245,158,11,.14); color: #b45309; }
.rfid-pill.bad { background: rgba(239,68,68,.12); color: #b91c1c; }
.rfid-pill.mute { background: rgba(30,41,59,.07); color: var(--mut); }
.rfid-tag { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.rfid-tag.warn { background: rgba(245,158,11,.14); color: #b45309; }
.rfid-tag.ok { background: rgba(16,185,129,.12); color: #047857; }
.rfid-actions { display: inline-flex; gap: 4px; justify-content: flex-end; }
.rfid-tbl td { padding-top: 11px; padding-bottom: 11px; }
.rfid-chip-badge { background: rgba(124,140,248,.12); color: #5b62d6; border-color: rgba(124,140,248,.25); }

.rfid-scanlist { display: flex; flex-direction: column; }
.rfid-scanrow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.rfid-scanrow:last-child { border-bottom: none; }
.rfid-scandot { width: 7px; height: 7px; border-radius: 50%; background: var(--mut-2); flex-shrink: 0; }
.rfid-scandot.found { background: var(--ok); }
.rfid-scandot.unlinked { background: var(--warn); }
.rfid-scandot.unknown { background: var(--bad); }
.rfid-scandot.lost, .rfid-scandot.inactive { background: #94a3b8; }
.rfid-scanuid { font-family: ui-monospace, Consolas, monospace; font-weight: 600; font-size: 11px; letter-spacing: .6px; }
.rfid-scanwhat { flex: 1; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.rfid-scanwhen { color: var(--mut-2); font-size: 10.5px; }

/* ---------- RFID dialogs ---------- */
.modal.modal-rfid { max-width: 660px; }
.rfid-scanfield {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px;
  border: 1px dashed rgba(124,140,248,.45);
  background: linear-gradient(135deg, rgba(124,140,248,.08), rgba(238,157,247,.05));
}
.rfid-scanfield-ic {
  width: 42px; height: 42px; min-width: 42px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255,255,255,.85); color: #7c8cf8; border: 1px solid rgba(124,140,248,.2);
}
.rfid-scanfield-main { flex: 1; min-width: 0; }
.rfid-scanfield input { font-family: ui-monospace, Consolas, monospace; letter-spacing: 1.4px; font-weight: 600; }
.rfid-lbl { font-size: 11px; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 6px; }
.rfid-lbl .req { color: var(--bad); }
.hint.ok { color: #059669; font-weight: 600; }
.rfid-form-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.rfid-picker { border: 1px solid var(--line-2); border-radius: 14px; background: rgba(255,255,255,.72); overflow: hidden; }
.rfid-picker > input { border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.rfid-picker-list { max-height: 184px; overflow-y: auto; }
.rfid-pick-row {
  display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 9px 12px;
  border: none; background: transparent; cursor: pointer; font-family: inherit;
  border-bottom: 1px solid rgba(30,41,59,.05);
}
.rfid-pick-row:last-child { border-bottom: none; }
.rfid-pick-row:hover { background: rgba(124,140,248,.08); }
.rfid-pick-row.sel { background: rgba(124,140,248,.14); box-shadow: inset 3px 0 0 #8b5cf6; }
.rfid-pick-tile {
  width: 28px; height: 28px; min-width: 28px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; color: #fff; background: var(--grad);
}
.rfid-pick-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rfid-pick-txt b { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfid-pick-txt small { font-size: 10.5px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfid-pick-empty { padding: 14px; text-align: center; font-size: 12px; color: var(--mut); }
.rfid-warn {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3);
  font-size: 11.5px; color: #92400e; line-height: 1.5;
}
.rfid-warn input { margin-top: 3px; }
.rfid-msg { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 12px; font-size: 12px; }
.rfid-msg[hidden] { display: none; }
.rfid-msg.err { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.25); color: #b91c1c; }
.rfid-link { color: #6d7cf6; text-decoration: none; font-weight: 600; }

/* ---------- RFID block on the asset profile ---------- */
.rfid-asset-card .card-title { display: flex; align-items: center; gap: 8px; }
.rfid-uid-block {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
  border-radius: 16px; margin-bottom: 4px;
  background: linear-gradient(135deg, rgba(124,140,248,.1), rgba(238,157,247,.06));
  border: 1px solid rgba(124,140,248,.18);
}
.rfid-k { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--mut); font-weight: 700; margin-bottom: 4px; }
.rfid-empty { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; border: 1px dashed var(--line-2); }
.rfid-empty-ic {
  width: 46px; height: 46px; min-width: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--grad-soft); color: #7c8cf8;
}
.rfid-empty-txt { flex: 1; font-size: 13px; }
.rfid-cardview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(30,41,59,.035); }

@media (max-width: 1080px) {
  .rfid-grid-top { grid-template-columns: 1fr; }
  .rfid-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .rfid-form-row { grid-template-columns: 1fr; }
  .rfid-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rfid-manual { flex-direction: column; }
  .rfid-scanfield { flex-wrap: wrap; }
  .rfid-scanfield-main { width: 100%; }
  .rfid-console-head { flex-wrap: wrap; }
}

/* ---------- IT / NON-IT register switch (top of the sidebar) ---------- */
.scope-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 6px 6px;
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}
.scope-btn {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .9px;
  padding: 8px 4px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--mut);
  cursor: pointer;
  transition: color .2s ease, background .25s ease, box-shadow .25s ease;
}
.scope-btn:hover { color: var(--ink); }
.scope-btn.on { color: #fff; background: var(--grad); box-shadow: 0 8px 20px -12px rgba(124,140,248,.9); }
.scope-btn[data-scope="nonit"].on { background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%); }
.scope-hint { font-size: 11px; color: var(--mut-2); padding: 0 14px 6px; line-height: 1.45; }
@media (max-width: 860px) {
  .scope-switch { display: none; }
  .mscope { display: flex !important; }
}
.mscope {
  display: none;
  gap: 6px;
  padding: 10px 14px 4px;
}
.mscope .scope-btn {
  flex: 1;
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,.7);
  color: var(--ink-2);
}
.mscope .scope-btn.on { border-color: transparent; }

/* ---------- asset thumbnails & pictures ------------------------------------
   Every asset shows a colour-coded category/type glyph instead of a first
   letter, and an uploaded photo where one exists. Pictures are always files this
   server wrote into its uploads directory — never a hot-linked external URL. */
.ci-badge {
  width: 62px; height: 62px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92);
  color: var(--cc, #6366f1);
  border: 1px solid color-mix(in srgb, var(--cc, #6366f1) 30%, transparent);
  box-shadow: 0 14px 30px -14px rgba(20,24,45,.45), inset 0 0 0 1px rgba(255,255,255,.7);
  flex-shrink: 0;
}
.ci-badge svg { display: block; }
.ast-card-media .ci-badge, .stg-media .ci-badge { width: 64px; height: 64px; border-radius: 18px; }
.pd-fallback .ci-badge { width: 88px; height: 88px; border-radius: 26px; background: rgba(255,255,255,.9); }
.pd-sim-tile .ci-badge, .rfid-asset-tile .ci-badge, .rfid-pick-tile .ci-badge {
  width: 100%; height: 100%; border-radius: inherit; box-shadow: none; border: 0;
  background: rgba(255,255,255,.92);
}

/* photo buttons laid over the detail-page hero */
.pd-photo-acts { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; z-index: 3; }
.btn-overlay {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(17,20,35,.62); color: #fff; border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.6);
}
.btn-overlay:hover { background: rgba(17,20,35,.8); color: #fff; }

/* the picture picker shared by the asset form and the category form */
.ph-pick {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border: 1px dashed var(--line-2); border-radius: 16px;
  background: rgba(255,255,255,.45);
}
.ph-pick-box {
  width: 84px; height: 84px; min-width: 84px; border-radius: 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, color-mix(in srgb, var(--cc, #6366f1) 22%, #fff), #fff);
  border: 1px solid var(--line-2); color: var(--cc, #6366f1);
}
.ph-pick-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-pick-box svg { display: block; }
.ph-pick-main { flex: 1; min-width: 0; }
.ph-pick-main .hint { margin: 8px 0 0; }

/* category cards now carry a picture */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cat-card {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px;
  border: 1px solid var(--line);
}
.cat-thumb {
  width: 62px; height: 62px; min-width: 62px; border-radius: 18px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--cc, #6366f1) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cc, #6366f1) 26%, transparent);
  color: var(--cc, #6366f1);
}
.cat-thumb .cat-img { width: 100%; height: 100%; object-fit: cover; }
.cat-thumb svg { display: block; }
.cat-card-main { flex: 1; min-width: 0; }
.cat-card-main .mc-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.cat-card-sub { font-size: 11.5px; color: var(--mut); margin-top: 3px; }
.cat-card-acts { display: flex; gap: 4px; flex-shrink: 0; }

/* an uploaded picture fills its tile */
.pd-sim-tile { overflow: hidden; }
.pd-sim-img { width: 100%; height: 100%; object-fit: cover; }
.rfid-asset-tile img, .rfid-pick-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rfid-asset-tile, .rfid-pick-tile { overflow: hidden; }
/* ============================================================
   RFID — one card, two options; read = normal / filtered
   ============================================================ */
.rfid-hub { display: flex; justify-content: center; padding: 8px 0 4px; }
.rfid-hub-card {
  width: min(100%, 460px); display: flex; flex-direction: column; gap: 12px;
  padding: 18px; border-radius: 20px;
}
.rfid-hub-opt {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.72);
  font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.rfid-hub-opt:hover { transform: translateY(-2px); border-color: rgba(99,102,241,.45); background: #fff; box-shadow: 0 16px 32px -20px rgba(30,41,59,.5); }
.rfid-hub-opt:active { transform: translateY(0); }
.rfid-hub-ic {
  width: 42px; height: 42px; min-width: 42px; border-radius: 13px;
  display: grid; place-items: center; color: #fff; background: var(--grad);
  box-shadow: 0 10px 22px -12px rgba(99,102,241,.9);
}
.rfid-hub-t { white-space: nowrap; }
.rfid-hub-foot {
  display: flex; align-items: center; gap: 8px; padding-top: 4px;
  font-size: 11.5px; color: var(--mut);
}
.rfid-reader-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mut-2); flex: 0 0 auto; }
.rfid-reader-dot.on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.18); }

.rfid-read, .rfid-results { padding: 18px; }
.rfid-read-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rfid-results-title { min-width: 0; }
.rfid-modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.16); }
.rfid-mode {
  border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  padding: 8px 16px; font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: var(--mut);
  transition: all .15s ease;
}
.rfid-mode:hover { color: var(--ink); }
.rfid-mode.on { background: var(--grad); color: #fff; box-shadow: 0 8px 18px -12px rgba(99,102,241,.9); }

/* the newest read, readable from across the desk */
.rfid-last {
  border-radius: 16px; padding: 14px 16px; margin-bottom: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.6);
}
.rfid-last.ok { border-color: rgba(22,163,74,.35); background: rgba(22,163,74,.07); }
.rfid-last.warn { border-color: rgba(217,119,6,.35); background: rgba(245,158,11,.08); }
.rfid-last.bad { border-color: rgba(220,38,38,.4); background: rgba(239,68,68,.08); }
.rfid-last-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rfid-last-uid { font-family: ui-monospace, monospace; font-size: 22px; font-weight: 800; letter-spacing: .5px; color: var(--ink); word-break: break-all; }
.rfid-last-state { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--mut); }
.rfid-last.bad .rfid-last-state { color: #dc2626; }
.rfid-last.ok .rfid-last-state { color: #15803d; }
.rfid-last-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.rfid-last-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 11px; color: var(--mut); }
.rfid-last-facts i { font-style: normal; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--mut-2); margin-right: 4px; }
.rfid-last-facts span { font-family: ui-monospace, monospace; word-break: break-all; max-width: 100%; }

/* every value the reader sent */
.rfid-log { display: flex; flex-direction: column; gap: 2px; max-height: 52vh; overflow-y: auto; }
.rfid-logrow {
  display: grid; grid-template-columns: 74px minmax(90px, 150px) minmax(0, 1fr) 96px;
  align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 12px;
}
.rfid-logrow:nth-child(odd) { background: rgba(99,102,241,.04); }
.rfid-logtime { font-family: ui-monospace, monospace; color: var(--mut); font-size: 11px; }
.rfid-loguid { font-family: ui-monospace, monospace; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfid-lograw { font-family: ui-monospace, monospace; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfid-logstate { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--mut); text-align: right; }
.rfid-logrow.unknown .rfid-logstate, .rfid-logrow.invalid .rfid-logstate { color: #dc2626; }
.rfid-logrow.found .rfid-logstate { color: #15803d; }
.rfid-empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 34px 14px; color: var(--mut); text-align: center;
}
.rfid-empty svg { color: var(--g2); opacity: .7; }
.rfid-empty b { color: var(--ink); font-size: 13.5px; }
.rfid-empty span { font-size: 12px; }

/* filtered read: column checklist */
.rfid-cols { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(255,255,255,.55); }
.rfid-cols-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 800; color: var(--ink-2); margin-bottom: 10px; }
.rfid-cols-count { font-weight: 700; color: var(--mut); }
.rfid-cols-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 12px; margin-bottom: 14px; }
.rfid-col { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
.rfid-col:hover { background: rgba(99,102,241,.07); }
.rfid-col input[type="checkbox"] { width: 15px; height: 15px; min-width: 15px; margin: 0; padding: 0; accent-color: #6366f1; cursor: pointer; }

.rfid-result-tbl th { white-space: nowrap; }
.rfid-result-tbl td { font-size: 12px; }
@media (max-width: 720px) {
  .rfid-logrow { grid-template-columns: minmax(0, 1fr) 80px; row-gap: 2px; }
  .rfid-logtime { grid-column: 1 / -1; }
  .rfid-lograw { grid-column: 1 / -1; color: var(--mut-2); }
  .rfid-last-uid { font-size: 18px; }
  .rfid-hub-card { padding: 14px; }
  .rfid-hub-opt { padding: 13px 14px; font-size: 14px; }
}
/* reader hookup on the read page — small, one line, always visible */
.rfid-setup {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.55);
}
.rfid-setup-state { font-size: 11.5px; color: var(--mut); min-width: 0; }
.rfid-setup-sp { flex: 1 1 auto; }
.rfid-setup select { width: auto; min-width: 92px; padding: 6px 10px; font-size: 12px; border-radius: 9px; }
.rfid-setup .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .rfid-setup-sp { display: none; }
  .rfid-setup select, .rfid-setup .btn { flex: 1 1 auto; }
}