/* StockTrack Admin — quiet, dense, dark harbour. Buoy is reserved for signals and the primary action. */
body.admin { background: var(--abyss); color: var(--fog); min-height: 100vh; font-size: 14px; }
[hidden] { display: none !important; }
.admin ::placeholder { color: var(--steel); opacity: 1; }
.admin .label { color: var(--steel-light); }

/* ---------- wordmark ---------- */
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -.03em; color: var(--fog); }
.wordmark-tag { margin-left: 2px; padding: 2px 6px; border: 1px solid var(--line-dark); border-radius: 5px; font-size: 9.5px; }
.mark { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.mark i { width: 4px; border-radius: 1px; background: var(--fog); }
.mark i:nth-child(1) { height: 16px; } .mark i:nth-child(2) { height: 10px; } .mark i:nth-child(3) { height: 5px; background: var(--buoy); }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r-s); border: 1px solid var(--line-dark); background: rgba(231, 236, 234, .03); color: var(--fog); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: background .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease); }
.btn:hover { background: rgba(231, 236, 234, .08); border-color: rgba(231, 236, 234, .2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--buoy); border-color: var(--buoy); color: var(--abyss); font-weight: 600; }
.btn.primary:hover { background: #ff5e35; border-color: #ff5e35; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--steel-light); transition: background .2s var(--ease), color .2s var(--ease); }
.icon-btn:hover { background: rgba(231, 236, 234, .08); color: var(--fog); }
.icon-btn.danger:hover { color: var(--buoy); background: var(--buoy-soft); }

.field { display: grid; gap: 6px; }
.field > span { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-light); }
.field input, .field select, .field textarea, .input { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-s); border: 1px solid var(--line-dark); background: var(--deep); color: var(--fog); transition: border-color .2s var(--ease), background .2s var(--ease); }
.field textarea { height: 76px; padding: 10px 12px; resize: vertical; }
.field input:hover, .field select:hover, .input:hover { border-color: rgba(231, 236, 234, .22); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--fog); background: var(--abyss); }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239FB1B4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px !important; }
select option { background: var(--deep); color: var(--fog); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-msg { font-size: 13px; padding: 10px 12px; border-radius: var(--r-s); background: var(--buoy-soft); color: #ff8a69; }
.form-msg.ok { background: var(--ok-soft); color: #5fd6b0; }

/* ---------- gate ---------- */
.gate { position: relative; background: var(--abyss); min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; color: var(--fog); isolation: isolate; }
.gate-bg { position: absolute; inset: -4%; z-index: -2; }
.gate-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; animation: drift 38s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02) translate3d(0,0,0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
.gate-shade { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60% 55% at 50% 55%, rgba(4, 20, 26, .2), rgba(4, 20, 26, .78) 100%),
  linear-gradient(0deg, rgba(4, 20, 26, .85), rgba(4, 20, 26, 0) 32%),
  linear-gradient(180deg, rgba(4, 20, 26, .6), rgba(4, 20, 26, 0) 22%); }
.gate-top { display: flex; justify-content: space-between; align-items: center; padding: 26px clamp(18px, 4vw, 44px); }
.gate-back { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 12px; border-radius: 999px; font-size: 13px; color: var(--fog); background: rgba(231, 236, 234, .08); border: 1px solid rgba(231, 236, 234, .14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color .25s; }
.gate-back:hover { background: rgba(231, 236, 234, .16); }
.gate-center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 16px; }
.gate-title { position: relative; z-index: 0; font-family: var(--f-display); font-weight: 700; font-variation-settings: "opsz" 96; font-size: clamp(72px, 15.5vw, 260px); line-height: .8; letter-spacing: -.06em; text-align: center; white-space: nowrap; margin-bottom: -.2em; text-shadow: 0 20px 80px rgba(4, 20, 26, .5); }
.gate-title .gw { display: inline-block; }
.gate-title .serif { font-weight: 400; letter-spacing: -.035em; color: #fff; }
.gate-card { position: relative; z-index: 1; width: min(380px, 100%); display: grid; gap: 10px; padding: 18px; border-radius: 28px; background: rgba(7, 28, 34, .5); -webkit-backdrop-filter: blur(28px) saturate(1.6); backdrop-filter: blur(28px) saturate(1.6); border: 1px solid rgba(231, 236, 234, .14); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08); }
.gate-card-head { text-align: center; padding: 6px 0 8px; color: var(--steel-light); }
.gf { position: relative; display: block; }
.gf input { width: 100%; height: 58px; padding: 22px 16px 6px; border-radius: 16px; border: 1px solid rgba(231, 236, 234, .12); background: rgba(4, 20, 26, .45); color: var(--fog); outline: 0; transition: border-color .25s, background-color .25s; }
.gf input:focus { border-color: rgba(231, 236, 234, .45); background: rgba(4, 20, 26, .65); }
.gf span { position: absolute; left: 17px; top: 19px; font-size: 14px; color: var(--steel-light); pointer-events: none; transform-origin: left top; transition: transform .35s var(--ease), color .25s; }
.gf input:focus + span, .gf input:not(:placeholder-shown) + span { transform: translateY(-10px) scale(.74); color: var(--steel-light); }
.gate-go { display: flex; align-items: center; justify-content: space-between; height: 56px; margin-top: 4px; padding: 0 8px 0 20px; border-radius: 16px; background-color: var(--fog); color: var(--abyss); font-weight: 600; font-size: 15px; transition: background-color .25s, transform .2s var(--ease); }
.gate-go .go-text { display: inline-flex; align-items: center; gap: 10px; }
.gate-go .go-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--buoy); color: #fff; transition: transform .5s var(--ease); }
.gate-go:hover { background-color: #fff; }
.gate-go:hover .go-ic { transform: translateX(3px); }
.gate-go:active { transform: scale(.98); }
.gate-go.busy { pointer-events: none; transition: none; }
.gate.leaving { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.gate-demo { height: 44px; border-radius: 14px; font-size: 13.5px; color: var(--steel-light); transition: color .2s, background-color .2s; }
.gate-demo:hover { color: var(--fog); background: rgba(231, 236, 234, .07); }
.gate-card .form-msg { margin: 2px 4px; font-size: 13px; color: var(--buoy); }
.gate-foot { display: flex; gap: 22px; align-items: center; padding: 22px clamp(18px, 4vw, 44px); }
.gate-foot .label { display: inline-flex; align-items: center; gap: 8px; color: var(--steel-light); }
.gate-foot b { color: var(--fog); font-weight: 500; }
.gate-clock { margin-left: auto; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; padding: 22px 14px 16px; background: var(--deep); border-right: 1px solid var(--line-dark); overflow-y: auto; z-index: 40; }
.sidebar .wordmark { padding: 0 8px; }
.nav-group { display: grid; gap: 2px; margin-bottom: 18px; }
.nav-group > .label { padding: 0 10px 6px; font-size: 10px; }
.nav-link { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 9px; color: var(--steel-light); font-weight: 500; font-size: 13.5px; transition: background .2s var(--ease), color .2s var(--ease); }
.nav-link:hover { color: var(--fog); background: rgba(231, 236, 234, .05); }
.nav-link.active { color: var(--fog); background: rgba(231, 236, 234, .09); }
.nav-badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; display: grid; place-items: center; border-radius: 9px; font-family: var(--f-mono); font-size: 10.5px; background: rgba(231, 236, 234, .1); color: var(--fog); }
.nav-badge.signal { background: var(--buoy); color: var(--abyss); font-weight: 500; }
.side-store { margin-top: auto; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-dark); color: var(--steel-light); font-size: 13px; }
.side-store:hover { color: var(--fog); border-color: rgba(231, 236, 234, .22); }
.scrim { display: none; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 28px; background: rgba(4, 20, 26, .72); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); border-bottom: 1px solid var(--line-dark); }
.menu-btn { display: none; }
.view-title { font-family: var(--f-display); font-weight: 650; font-size: 19px; letter-spacing: -.03em; margin-right: auto; white-space: nowrap; }
.top-search { display: flex; align-items: center; gap: 8px; width: min(280px, 32vw); height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-dark); background: rgba(231, 236, 234, .03); color: var(--steel-light); transition: border-color .2s var(--ease); }
.top-search:focus-within { border-color: var(--fog); }
.top-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--fog); font-size: 13.5px; }
.bell-wrap { position: relative; }
.bell-count { position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; display: grid; place-items: center; background: var(--buoy); color: var(--abyss); font-family: var(--f-mono); font-size: 9.5px; font-weight: 500; }
.pop { position: absolute; right: 0; top: 44px; width: 300px; padding: 8px; border-radius: var(--r-m); background: rgba(12, 43, 51, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--line-dark); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.pop .label { display: block; padding: 8px 10px; }
.pop-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.pop-row:hover { background: rgba(231, 236, 234, .06); }
.pop-row b { font-weight: 500; font-size: 13px; }
.pop-row small { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; color: var(--buoy); }
.pop-empty { padding: 14px 10px; color: var(--steel-light); font-size: 13px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--line-dark); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fog); color: var(--petrol); font-weight: 600; font-size: 12px; }
.user-name { font-size: 13px; font-weight: 500; }

/* ---------- view ---------- */
.view { padding: 28px; display: grid; gap: 20px; outline: none; max-width: 1480px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.view-head h2 { font-family: var(--f-display); font-weight: 700; font-size: clamp(34px, 4.2vw, 56px); line-height: .95; letter-spacing: -.045em; }
.view-head h2 .serif { font-size: 1.05em; color: var(--steel-light); }
.view-head p { margin-top: 8px; font-size: 12.5px; color: var(--steel); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: var(--petrol); border: 1px solid var(--line-dark); border-radius: var(--r-m); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.panel-head h3 { font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.panel-body { padding: 16px 18px 18px; }
.link { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--steel-light); }
.link:hover { color: var(--fog); }

.grid-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px; display: grid; gap: 14px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--steel-light); }
.kpi-num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: clamp(24px, 2.5vw, 36px); font-weight: 500; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.kpi.signal .kpi-num { color: var(--buoy); }
.kpi small { font-size: 12px; color: var(--steel); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.grid-2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-2.fill { align-items: stretch; }
.grid-2.fill > .panel { display: flex; flex-direction: column; }
.grid-2.fill > .panel > .panel-body { flex: 1; display: flex; flex-direction: column; }
.mini-stats, .panel-foot { margin-top: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 16px; border-top: 1px solid var(--line-dark); }
.mini-stats { margin-top: 18px; }
.grid-2.fill .chart-wrap { flex: 1; }
.panel-foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-stats > div, .panel-foot > div { display: grid; gap: 6px; min-width: 0; }
.mini-stats b, .panel-foot b { font-family: var(--f-mono); font-weight: 500; font-size: 15px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-stats small { margin-left: 6px; font-size: 11px; color: var(--steel); font-weight: 400; }
.panel-foot .formula { font-size: 12px; color: var(--steel-light); }

/* chart */
.chart-wrap { position: relative; }
.chart-wrap svg { width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line-dark); stroke-width: 1; }
.chart-axis { font-family: var(--f-mono); font-size: 10px; fill: var(--steel); }
.chart-line { fill: none; stroke: var(--fog); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-area { fill: rgba(231, 236, 234, .06); }
.chart-guide { stroke: var(--steel); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; opacity: 0; }
.chart-dot { fill: var(--abyss); stroke: var(--fog); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; }
.chart-tip { position: absolute; top: 0; left: 0; pointer-events: none; padding: 8px 10px; border-radius: 9px; background: rgba(4, 20, 26, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line-dark); font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity .15s; }
.chart-tip b { display: block; font-family: var(--f-mono); font-weight: 500; font-size: 13px; }
.chart-tip span { color: var(--steel-light); font-size: 11px; }
.chart-total { font-family: var(--f-mono); font-size: 13px; color: var(--steel-light); }
.vbar { fill: var(--fog); opacity: .85; }
.vbar-label { font-family: var(--f-mono); font-size: 10px; fill: var(--steel-light); }

/* stock health */
.health { display: grid; gap: 12px; }
.health-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 5px 12px; align-items: center; padding: 3px 6px; margin: 0 -6px; border-radius: 8px; }
.health-row span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.health-row b { font-family: var(--f-mono); font-weight: 500; font-size: 12.5px; text-align: right; }
.health-row.low b { color: var(--buoy); }
.bar { grid-column: 1 / -1; position: relative; height: 5px; border-radius: 3px; background: rgba(231, 236, 234, .08); }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--fog); transform-origin: left; }
.bar.low i { background: var(--buoy); }
.bar em { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--steel-light); }
.bar.mini { width: 72px; height: 4px; display: inline-block; vertical-align: middle; margin-left: 10px; }

/* lists */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-dark); }
.row:last-child { border-bottom: 0; }
.row-main { min-width: 0; flex: 1; }
.row-main b { display: block; font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { font-family: var(--f-mono); font-size: 11px; color: var(--steel-light); }
.row-end { font-family: var(--f-mono); font-size: 12.5px; text-align: right; white-space: nowrap; }
.thumb { width: 38px; height: 38px; flex: none; border-radius: 9px; background: var(--fog); color: var(--steel); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); }
.thumb.big { width: 132px; height: 132px; border-radius: var(--r-m); }
.empty { padding: 34px 16px; text-align: center; color: var(--steel-light); font-size: 13px; display: grid; justify-items: center; gap: 10px; }
.empty .ic { color: var(--steel); }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: rgba(231, 236, 234, .08); color: var(--steel-light); }
.pill.ok { background: var(--ok-soft); color: #5fd6b0; }
.pill.low { background: var(--buoy-soft); color: #ff8a69; }
.pill .dot { width: 6px; height: 6px; }

/* tables */
.toolbar { display: flex; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line-dark); flex-wrap: wrap; }
.toolbar .input { max-width: 300px; height: 36px; }
.toolbar select.input { max-width: 180px; }
.toolbar .btn { margin-left: auto; height: 36px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; padding: 11px 16px; font-family: var(--f-mono); font-size: 10.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-light); border-bottom: 1px solid var(--line-dark); white-space: nowrap; }
.tbl td { padding: 10px 16px; border-bottom: 1px solid var(--line-dark); font-size: 13.5px; white-space: nowrap; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .2s var(--ease); }
.tbl tbody tr:hover { background: rgba(231, 236, 234, .03); }
.tbl .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.tbl .r { text-align: right; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.detail td { background: var(--deep); padding: 4px 16px 12px 62px; white-space: normal; }
.tbl tr.detail:hover { background: none; }
.cell { display: flex; align-items: center; gap: 12px; }
.cell b { display: block; font-weight: 500; }
.cell small { font-family: var(--f-mono); font-size: 11px; color: var(--steel-light); }
.acts { display: flex; gap: 2px; justify-content: flex-end; }
.tbl select.input { height: 30px; width: 132px; font-size: 12.5px; padding-left: 10px; }
.chev { color: var(--steel); transition: transform .25s var(--ease); }
tr.open .chev { transform: rotate(90deg); }

/* sell */
.sell { display: grid; gap: 16px; }
.sell-product { display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: var(--r-m); background: var(--deep); border: 1px solid var(--line-dark); }
.sell-product h4 { font-family: var(--f-display); font-weight: 600; font-size: 22px; letter-spacing: -.03em; line-height: 1.1; }
.sell-flow { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-family: var(--f-mono); }
.sell-flow div { display: grid; gap: 2px; }
.sell-flow b { font-size: 30px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.sell-flow .after.bad b { color: var(--buoy); }
.sell-flow .ic { color: var(--steel); }
.formula { font-family: var(--f-mono); font-size: 11.5px; color: var(--steel-light); }
.formula code { color: var(--fog); font-family: inherit; }

/* suppliers */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { padding: 18px; display: grid; gap: 12px; }
.card h4 { font-family: var(--f-display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; }
.card-line { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--steel-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line-dark); }

.info { display: grid; gap: 10px; font-size: 13px; color: var(--steel-light); }
.info div { display: flex; gap: 10px; align-items: center; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.settings-row p { font-size: 12.5px; color: var(--steel-light); margin-top: 4px; max-width: 52ch; }
.settings-row h3 { font-family: var(--f-display); font-weight: 600; font-size: 16px; letter-spacing: -.02em; }

/* ---------- overlay: modal + drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(4, 20, 26, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 20px; }
.overlay.side { place-items: stretch end; padding: 0; }
.modal { width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--petrol); border: 1px solid var(--line-dark); border-radius: var(--r-l); padding: 22px; display: grid; gap: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.drawer { width: min(460px, 100vw); height: 100vh; overflow-y: auto; background: rgba(12, 43, 51, .94); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border-left: 1px solid var(--line-dark); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h3 { font-family: var(--f-display); font-weight: 700; font-size: 26px; letter-spacing: -.04em; }
.modal p { font-size: 13.5px; color: var(--steel-light); }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 6px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: rgba(231, 236, 234, .96); color: var(--petrol); font-size: 13.5px; font-weight: 500; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); max-width: 360px; }
.toast.bad .ic { color: var(--buoy); }
.toast .ic { color: #1c9a74; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .grid-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2, .grid-2.even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: 264px; transform: translateX(-100%); transition: transform .45s var(--ease); background: rgba(7, 28, 34, .94); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
  .sidebar.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(4, 20, 26, .5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar.open + .scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 14px; }
  .view { padding: 18px 14px 40px; }
  .user-name { display: none; }
  .gate-title { font-size: 22vw; white-space: normal; margin-bottom: .22em; }
  .gate-foot { gap: 14px; }
  .gate-clock { display: none; }
}
@media (max-width: 560px) {
  .top-search { display: none; }
  .grid-kpi { gap: 10px; } .kpi { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .sell-product { flex-direction: column; align-items: flex-start; }
  .toolbar .btn { margin-left: 0; width: 100%; }
  .toolbar .input, .toolbar select.input { max-width: none; }
}
