/* ASHWIN FASTENERS — futuristic "steel & light" theme: deep-space glass panels, cyan/violet light, floating dust */
:root {
  --brand: #22d3ee; --brand-2: #8b5cf6; --accent: #22d3ee; --hot: #f472b6;
  --bg: #04060d; --bg-2: #070b18; --card: rgba(16, 24, 44, .62); --card-solid: #0c1326; --glass: rgba(255,255,255,.035);
  --line: rgba(125, 211, 252, .14); --line-2: rgba(125, 211, 252, .28);
  --text: #e8eefc; --muted: #8b9bba; --dim: #5f6f8f;
  --ok: #34d399; --warn: #fbbf24; --bad: #fb7185; --info: #60a5fa;
  --r: 16px; --glow: 0 0 0 1px rgba(34,211,238,.25), 0 0 24px -4px rgba(34,211,238,.45);
  --shadow: 0 10px 40px -12px rgba(0,0,0,.7);
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  font-family: "Inter", "SF Pro Display", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif; font-size: 14px; color: var(--text);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(99,102,241,.22), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(34,211,238,.16), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(168,85,247,.07), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
/* faint engineering grid */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(125,211,252,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(125,211,252,.045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 85%); }
#dust { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#root { position: relative; z-index: 1; }
a { color: #7dd3fc; text-decoration: none; } a:hover { color: #a5f3fc; text-shadow: 0 0 12px rgba(34,211,238,.5); }
h1 { font-size: 24px; margin: 0; font-weight: 700; letter-spacing: -.3px;
  background: linear-gradient(90deg, #fff 0%, #c7d7ff 60%, #7dd3fc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 13px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .14em; color: #a5b4fc; font-weight: 600; }
.muted { color: var(--muted); } .r { text-align: right; } .nowrap { white-space: nowrap; } .hidden { display: none !important; }
::selection { background: rgba(34,211,238,.35); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgba(125,211,252,.18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(10,16,34,.92), rgba(6,10,22,.92)); border-right: 1px solid var(--line); backdrop-filter: blur(18px); }
.side .brand { display: flex; gap: 12px; align-items: center; padding: 20px 18px 16px; color: #fff; }
.side .brand img { width: 40px; height: 40px; border-radius: 12px; background: #0b1224; object-fit: contain; padding: 4px; box-shadow: var(--glow); }
.side .brand b { display: block; font-size: 14px; line-height: 1.2; letter-spacing: .02em; } .side .brand small { color: #67e8f9; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.nav { padding: 6px 10px 20px; flex: 1; }
.nav .grp { font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--dim); padding: 16px 12px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: #b4c2dc; font-size: 13.5px; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(125,211,252,.06); color: #fff; text-shadow: none; }
.nav a.act { color: #fff; background: linear-gradient(90deg, rgba(34,211,238,.18), rgba(139,92,246,.10) 70%, transparent); box-shadow: inset 0 0 0 1px rgba(34,211,238,.22); }
.nav a.act::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); box-shadow: 0 0 12px #22d3ee; }
.nav a .ico { width: 20px; text-align: center; filter: saturate(.6); }
.nav a.act .ico { filter: none; }
.side .me { border-top: 1px solid var(--line); padding: 14px 18px; font-size: 12px; color: var(--muted); }
.side .me b { color: #fff; display: block; font-size: 13px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 20;
  background: rgba(5,8,18,.6); backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid var(--line); }
.top .gsearch { flex: 1; max-width: 520px; position: relative; }
.top .gsearch input { width: 100%; padding: 11px 14px 11px 40px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); }
.top .gsearch input:focus { box-shadow: var(--glow); border-color: rgba(34,211,238,.5); outline: none; }
.top .gsearch::before { content: "⌕"; position: absolute; left: 15px; top: 7px; font-size: 19px; color: #67e8f9; }
.gs-res { position: absolute; top: 50px; left: 0; right: 0; background: var(--card-solid); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow), var(--glow); max-height: 440px; overflow: auto; display: none; }
.gs-res.open { display: block; } .gs-res a { display: flex; gap: 10px; padding: 10px 14px; color: var(--text); border-bottom: 1px solid var(--line); } .gs-res a:hover { background: rgba(34,211,238,.08); }
.gs-res .t { font-size: 10.5px; color: #67e8f9; width: 96px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .1em; padding-top: 2px; }
.top .sp { flex: 1; }
.bell { position: relative; } .bell .dot { position: absolute; top: 2px; right: 0; background: var(--hot); color: #fff; border-radius: 9px; font-size: 10px; padding: 0 5px; min-width: 16px; text-align: center; box-shadow: 0 0 10px var(--hot); }
.notif-pop { position: absolute; right: 0; top: 48px; width: 360px; background: var(--card-solid); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow), var(--glow); display: none; z-index: 40; overflow: hidden; }
.notif-pop.open { display: block; } .notif-pop .hd { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif-pop .list { max-height: 400px; overflow: auto; } .notif-pop .n { padding: 11px 16px; border-bottom: 1px solid var(--line); display: block; color: var(--text); } .notif-pop .n.unread { background: rgba(34,211,238,.07); box-shadow: inset 3px 0 0 #22d3ee; }
.notif-pop .n small { display: block; color: var(--muted); }
.content { padding: 24px 28px 100px; max-width: 1440px; width: 100%; animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.menu-btn { display: none; }

/* ---------- components ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; backdrop-filter: blur(16px) saturate(140%); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 40%); }
.card > h3:first-child { display: flex; justify-content: space-between; align-items: center; }
.grid { display: grid; gap: 18px; } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span2 { grid-column: span 2; }
.stat { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); display: block; color: var(--text); backdrop-filter: blur(16px); transition: transform .2s, box-shadow .2s, border-color .2s; }
.stat::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); opacity: .7; }
.stat::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(34,211,238,.18), transparent 70%); }
.stat .l { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.stat .v { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 0 18px rgba(34,211,238,.25); }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat.alert .v { color: var(--bad); text-shadow: 0 0 18px rgba(251,113,133,.35); } .stat.alert::before { background: linear-gradient(90deg, #fb7185, #f472b6); }
.stat.good .v { color: var(--ok); text-shadow: 0 0 18px rgba(52,211,153,.35); } .stat.good::before { background: linear-gradient(90deg, #34d399, #22d3ee); }
a.stat:hover { transform: translateY(-2px); border-color: rgba(34,211,238,.45); box-shadow: var(--shadow), var(--glow); text-shadow: none; }
.btn { position: relative; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; cursor: pointer;
  background: rgba(255,255,255,.04); color: var(--text); white-space: nowrap; font-family: inherit; transition: transform .15s, box-shadow .2s, border-color .2s, background .2s; }
.btn:hover { border-color: rgba(34,211,238,.55); box-shadow: var(--glow); color: #fff; text-shadow: none; } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.primary, .btn.accent { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 24px -6px rgba(99,102,241,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.primary:hover, .btn.accent:hover { box-shadow: 0 8px 30px -4px rgba(34,211,238,.75), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.ghost { background: rgba(255,255,255,.03); }
.btn.danger { background: linear-gradient(135deg, #fb7185, #e11d48); border-color: transparent; color: #fff; }
.btn.ok { background: linear-gradient(135deg, #34d399, #059669); border-color: transparent; color: #04140d; }
.btn.whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); border-color: transparent; color: #fff; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 10px; }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 18px; color: var(--muted); padding: 7px; border-radius: 10px; } .icon-btn:hover { background: rgba(34,211,238,.1); color: #fff; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; letter-spacing: .02em; border: 1px solid transparent; }
.b-green { background: rgba(52,211,153,.12); color: #6ee7b7; border-color: rgba(52,211,153,.3); }
.b-amber { background: rgba(251,191,36,.12); color: #fcd34d; border-color: rgba(251,191,36,.3); }
.b-red { background: rgba(251,113,133,.13); color: #fda4af; border-color: rgba(251,113,133,.35); }
.b-blue { background: rgba(34,211,238,.12); color: #67e8f9; border-color: rgba(34,211,238,.32); }
.b-grey { background: rgba(148,163,184,.12); color: #cbd5e1; border-color: rgba(148,163,184,.25); }

/* tables */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.toolbar .search { flex: 1; min-width: 220px; }
.toolbar label.mini { display: flex; flex-direction: column; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; gap: 3px; }
input, select, textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(4,8,20,.65); color: var(--text); width: 100%; transition: border-color .2s, box-shadow .2s; }
input::placeholder, textarea::placeholder { color: var(--dim); }
select option { background: #0c1326; color: var(--text); }
.toolbar input, .toolbar select { width: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(34,211,238,.6); box-shadow: 0 0 0 3px rgba(34,211,238,.15), 0 0 18px -6px rgba(34,211,238,.6); }
input[type=checkbox] { accent-color: #22d3ee; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) hue-rotate(150deg); }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: #7f93b8; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px; border-bottom: 1px solid rgba(125,211,252,.07); vertical-align: top; }
.tbl tr.link { cursor: pointer; } .tbl tr.link td { transition: background .15s; } .tbl tr.link:hover td { background: rgba(34,211,238,.06); }
.tbl tr.link:hover td:first-child { box-shadow: inset 2px 0 0 #22d3ee; }
.tbl td.loading, .tbl td.empty, p.empty { color: var(--muted); text-align: center; padding: 30px; }
.tbl tr.warn td { background: rgba(251,191,36,.08); }
.tbl tfoot td { font-weight: 700; color: #fff; border-top: 1px solid var(--line-2); }
.pager { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; gap: 10px; flex-wrap: wrap; }
.items td input, .items td select { padding: 7px 9px; } .items .desc { margin-top: 5px; font-size: 12.5px; } .items .hint { color: var(--warn); font-size: 11.5px; }
.items-foot { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 12px; gap: 12px; flex-wrap: wrap; }
.items-foot .tot { min-width: 260px; padding: 12px 14px; border-radius: 14px; background: rgba(34,211,238,.05); border: 1px solid var(--line); }
.items-foot .tot div { display: flex; justify-content: space-between; padding: 3px 0; } .items-foot .tot .grand { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 8px; font-size: 17px; }
.items-foot .tot .grand b { color: #67e8f9; text-shadow: 0 0 14px rgba(34,211,238,.5); }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 18px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; } .fld > span { font-weight: 600; color: #b9c6e0; font-size: 12px; letter-spacing: .02em; } .fld small { color: var(--muted); }
.fld.full, .form-section.full { grid-column: 1 / -1; } .fld.check { flex-direction: row; align-items: center; gap: 8px; } .fld.check input { width: auto; }
.form-section { font-weight: 600; color: #67e8f9; text-transform: uppercase; letter-spacing: .16em; font-size: 11px; border-bottom: 1px solid var(--line); padding: 10px 0 6px; margin-top: 6px; }
.req { color: var(--bad); }
.lookup { position: relative; } .lk-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: var(--card-solid); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow), var(--glow); max-height: 300px; overflow: auto; display: none; min-width: 280px; }
.lk-list.open { display: block; } .lk-item { padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--line); } .lk-item small { display: block; color: var(--muted); font-size: 11.5px; }
.lk-item:hover, .lk-item.act { background: rgba(34,211,238,.1); } .lk-empty { padding: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; } .kv dt { color: var(--muted); font-size: 12.5px; } .kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.totals { margin-left: auto; max-width: 340px; } .totals div { display: flex; justify-content: space-between; padding: 5px 0; }
.totals .grand { border-top: 1px solid var(--line-2); font-size: 19px; font-weight: 700; padding-top: 10px; margin-top: 6px; } .totals .grand b { color: #67e8f9; text-shadow: 0 0 16px rgba(34,211,238,.55); }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { padding: 7px 0 7px 18px; border-left: 1px solid var(--line-2); position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 10px #22d3ee; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; } .tabs a { padding: 10px 16px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; }
.tabs a.act { color: #fff; border-color: #22d3ee; text-shadow: 0 0 14px rgba(34,211,238,.6); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chip { background: rgba(34,211,238,.08); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 12px; color: #bae6fd; }
.notice { background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.35); color: #fde68a; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; backdrop-filter: blur(10px); }
.notice a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); }
.notice.red { background: rgba(251,113,133,.08); border-color: rgba(251,113,133,.4); color: #fecdd3; } .notice.green { background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.4); color: #a7f3d0; } .notice.blue { background: rgba(34,211,238,.07); border-color: rgba(34,211,238,.35); color: #bae6fd; }
.bar { height: 8px; background: rgba(255,255,255,.06); border-radius: 6px; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--grad); box-shadow: 0 0 12px #22d3ee; }
.chart { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding: 10px 4px 0; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; gap: 4px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.chart .bars i { width: 30%; max-width: 20px; border-radius: 6px 6px 2px 2px; min-height: 2px; box-shadow: 0 0 14px -2px currentColor; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(0); } }
.chart small { color: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 10px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.perm-matrix td, .perm-matrix th { text-align: center; } .perm-matrix td:first-child, .perm-matrix th:first-child { text-align: left; } .perm-matrix input { width: 18px; height: 18px; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: rgba(2,4,10,.7); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 100; opacity: 0; transition: opacity .18s; overflow-y: auto; }
.modal-wrap.show { opacity: 1; }
.modal { background: linear-gradient(180deg, #0e1730, #0a1124); border: 1px solid var(--line-2); border-radius: 20px; width: 100%; max-width: 500px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), var(--glow); transform: translateY(10px) scale(.98); transition: transform .2s; }
.modal-wrap.show .modal { transform: none; }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); } .modal-head h3 { margin: 0; }
.modal-body { padding: 18px 20px; } .modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: rgba(255,255,255,.02); border-radius: 0 0 20px 20px; }
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: rgba(12,19,38,.92); border: 1px solid var(--line-2); color: #fff; padding: 12px 18px; border-radius: 14px; max-width: 380px; box-shadow: var(--shadow), var(--glow); transform: translateY(20px); opacity: 0; transition: .25s; backdrop-filter: blur(12px); }
.toast.show { transform: none; opacity: 1; } .toast.t-error { border-color: rgba(251,113,133,.6); box-shadow: var(--shadow), 0 0 24px -6px #fb7185; } .toast.t-ok { border-color: rgba(52,211,153,.55); box-shadow: var(--shadow), 0 0 24px -6px #34d399; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login .art { position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login .art h1 { font-size: 44px; line-height: 1.08; max-width: 520px; letter-spacing: -1px; }
.login .art p { color: var(--muted); max-width: 440px; font-size: 15px; }
.login .art .kicker { font-size: 11px; letter-spacing: .32em; color: #67e8f9; text-transform: uppercase; }
.login .art > * { position: relative; z-index: 1; } .login .art svg.hexbolt { position: absolute; z-index: 0; right: -120px; bottom: -120px; width: 460px; opacity: .45; filter: drop-shadow(0 0 40px rgba(34,211,238,.35)); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login .form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.login .box { width: 100%; max-width: 380px; padding: 34px 30px; border-radius: 24px; background: rgba(12,19,38,.6); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), var(--glow); backdrop-filter: blur(20px); }
.login .box img { width: 56px; height: 56px; border-radius: 16px; object-fit: contain; background: #0b1224; padding: 6px; box-shadow: var(--glow); }
.login .box h2 { font-size: 24px; }
.login .box .fld { margin-bottom: 14px; } .login .box .btn { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }

/* bottom nav (mobile) */
.bnav { display: none; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 90; transform: translateX(-100%); transition: transform .25s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
  .menu-btn { display: inline-flex; }
  .top { padding: 0 10px; gap: 6px; height: 58px; } .top .sp { display: none; } .top .gsearch { max-width: none; } .top .gsearch input { font-size: 15px; }
  .content { padding: 16px 12px 100px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .g4.stats, .g3.stats { grid-template-columns: repeat(2, minmax(0,1fr)); } .span2 { grid-column: auto; }
  .stat .v { font-size: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 120px 1fr; }
  h1 { font-size: 20px; }
  .page-head .actions .btn { padding: 8px 12px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 6px 4px; background: rgba(12,19,38,.55); }
  .tbl td { border: 0; padding: 5px 10px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl td::before { content: attr(data-label); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; text-align: left; flex-shrink: 0; }
  .tbl td:empty { display: none; } .tbl td.loading::before, .tbl td.empty::before { content: none; } .tbl td.loading, .tbl td.empty { justify-content: center; }
  .items td { text-align: left; } .items td .lookup, .items td .desc { flex: 1; }
  .items td[data-label="Product"] { display: block; } .items td[data-label="Product"]::before { display: block; margin-bottom: 4px; } .items td input, .items td select { max-width: 60%; } .items td[data-label="Product"] input { max-width: none; }
  .login { grid-template-columns: 1fr; } .login .art { display: none; }
  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; padding-bottom: env(safe-area-inset-bottom);
    background: rgba(6,10,22,.82); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
  .bnav a { display: flex; flex-direction: column; align-items: center; padding: 8px 2px 9px; font-size: 10.5px; color: var(--muted); gap: 2px; }
  .bnav a .ico { font-size: 19px; } .bnav a.act { color: #67e8f9; text-shadow: 0 0 10px rgba(34,211,238,.6); }
  .bnav a.plus .ico { background: var(--grad); color: #fff; border-radius: 50%; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; margin-top: -22px; box-shadow: 0 0 0 4px rgba(4,6,13,.9), 0 8px 26px -4px rgba(34,211,238,.8); }
  #toasts { left: 12px; right: 12px; bottom: 80px; } .toast { max-width: none; }
  .modal-wrap { padding: 0; align-items: flex-end; } .modal { border-radius: 22px 22px 0 0; max-height: 92vh; display: flex; flex-direction: column; } .modal-body { overflow-y: auto; }
  .notif-pop { position: fixed; left: 8px; right: 8px; top: 62px; width: auto; }
  .hide-m { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  body, body::before { background: #fff !important; } #dust, .side, .top, .bnav, .page-head .actions { display: none !important; }
  .app { display: block; } :root { --text: #111; --muted: #555; } .card, .stat { background: #fff !important; box-shadow: none !important; border-color: #ccc !important; color: #111; }
  h1 { color: #111; background: none; -webkit-text-fill-color: #111; }
}
h3 .btn, h3 a { text-transform: none; letter-spacing: 0; }
