:root {
    --bg: #0b0d11;
    --surface: #11151b;
    --surface-2: #171c24;
    --surface-3: #202731;
    --line: #2b3440;
    --text: #f5f7fa;
    --muted: #939ead;
    --gold: #d7b15f;
    --gold-2: #f0d18d;
    --green: #4fc38a;
    --yellow: #f1bd55;
    --red: #ef6c75;
    --radius: 16px;
    --shadow: 0 18px 50px rgba(0,0,0,.28);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, rgba(215,177,95,.08), transparent 30%), var(--bg); color: var(--text); }
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
input, select, textarea {
    width: 100%; background: #0d1117; color: var(--text); border: 1px solid var(--line); border-radius: 10px;
    padding: 12px 13px; outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,177,95,.12); }
textarea { resize: vertical; }
label { display: grid; gap: 7px; color: #dbe0e7; font-weight: 650; font-size: .9rem; }
label small { color: var(--muted); font-weight: 400; line-height: 1.45; }
fieldset { border: 1px solid var(--line); border-radius: 13px; padding: 16px; margin: 0; }
legend { color: var(--gold-2); padding: 0 8px; font-weight: 750; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.35rem, 2.5vw, 2rem); margin-bottom: 3px; }
h2 { font-size: 1.08rem; margin-bottom: 0; }
small.block { display: block; margin-top: 4px; color: var(--muted); }
.muted { color: var(--muted); line-height: 1.55; }
.eyebrow { margin: 0 0 4px; color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.optional { color: var(--muted); font-weight: 400; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; background: rgba(12,15,20,.96); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 50; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; font-size: 1.28rem; font-weight: 850; letter-spacing: -.03em; }
.brand:hover { color: #fff; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #101217; background: linear-gradient(145deg, var(--gold-2), var(--gold)); box-shadow: 0 8px 22px rgba(215,177,95,.18); }
.brand-large { font-size: 1.7rem; margin-bottom: 28px; }
.brand-large .brand-mark { width: 48px; height: 48px; border-radius: 14px; }
.nav-list { display: grid; gap: 5px; margin-top: 34px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: #aab4c1; font-size: .92rem; font-weight: 650; }
.nav-item span { width: 22px; text-align: center; font-size: 1.1rem; }
.nav-item:hover { background: var(--surface-2); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(215,177,95,.2), rgba(215,177,95,.06)); color: var(--gold-2); border: 1px solid rgba(215,177,95,.2); }
.nav-label { color: #5f6b7a; font-size: .68rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; padding: 20px 12px 7px; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.user-chip { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.user-chip strong, .user-chip small { display: block; }
.user-chip small { color: var(--muted); margin-top: 2px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--gold-2); font-weight: 800; }
.version { color: #5e6876; text-align: center; }
.main-wrap { min-width: 0; }
.topbar { height: 88px; padding: max(17px, env(safe-area-inset-top)) 30px 14px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(11,13,17,.78); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 35; }
.topbar h1 { margin: 0; }
.top-subtitle { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.top-user { margin-left: auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .82rem; }
.menu-toggle { display: none; }
.content { padding: 28px 30px 110px; max-width: 1540px; margin: 0 auto; }
.mobile-nav { display: none; }
.mobile-nav.three { grid-template-columns: repeat(3,1fr); }
.mobile-nav.four { grid-template-columns: repeat(4,1fr); }
.mobile-nav.five { grid-template-columns: repeat(5,1fr); }

.panel { background: linear-gradient(160deg, rgba(23,28,36,.96), rgba(15,19,25,.96)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.panel-head p { margin-bottom: 0; }
.page-actions { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 20px; }
.page-actions h2 { font-size: 1.35rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.stat-card .stat-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(215,177,95,.12); color: var(--gold-2); font-size: 1.25rem; }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--muted); }
.stat-card strong { font-size: 1.55rem; margin-top: 2px; }
.warning-card { border-color: rgba(241,189,85,.35); }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.grid-two.unequal { grid-template-columns: .8fr 1.2fr; }
.grid-form-list { display: grid; grid-template-columns: minmax(320px,.72fr) minmax(0,1.28fr); gap: 18px; align-items: start; }
.sticky-panel { position: sticky; top: 108px; }
.quick-grid { display: grid; gap: 10px; }
.quick-grid a { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.015); color: var(--text); }
.quick-grid a:hover { border-color: var(--gold); transform: translateY(-1px); }
.quick-grid span { color: var(--muted); font-size: .83rem; line-height: 1.4; }
.compact-list { display: grid; gap: 8px; }
.compact-list > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.compact-list > div:last-child { border-bottom: 0; }
.compact-list small { display: block; color: var(--muted); margin-top: 3px; }
.inventory-alert-sections { display: grid; gap: 20px; }
.inventory-alert-sections > section + section { border-top: 1px solid var(--line); padding-top: 18px; }
.subsection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.subsection-head h3 { font-size: .92rem; }
.empty-state.compact { padding: 16px 10px; font-size: .8rem; }

.stack-form { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.check-row { display: flex; align-items: center; gap: 9px; font-weight: 550; }
.check-row input { width: 18px; height: 18px; accent-color: var(--gold); }
.btn { border: 1px solid var(--line); background: var(--surface-3); color: var(--text); border-radius: 10px; padding: 10px 14px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-weight: 750; cursor: pointer; transition: transform .16s, border-color .16s, background .16s; }
.btn:hover { transform: translateY(-1px); border-color: #536173; color: #fff; }
.btn.primary { background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: #101217; border-color: transparent; }
.btn.primary:hover { color: #101217; filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 10px; font-size: .78rem; }
.btn.full { width: 100%; }
.danger-btn { color: #ffb3b9; border-color: rgba(239,108,117,.35); background: rgba(239,108,117,.08); }
.icon-btn { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.alert { padding: 13px 15px; border-radius: 11px; margin-bottom: 15px; border: 1px solid var(--line); background: var(--surface-2); line-height: 1.45; }
.alert.success { border-color: rgba(79,195,138,.4); background: rgba(79,195,138,.1); color: #a9efca; }
.alert.danger { border-color: rgba(239,108,117,.4); background: rgba(239,108,117,.1); color: #ffc0c5; }
.alert.warning { border-color: rgba(241,189,85,.4); background: rgba(241,189,85,.1); color: #ffe0a0; }
.info-box { padding: 12px 14px; border-left: 3px solid var(--gold); background: rgba(215,177,95,.07); color: #c9d0d9; border-radius: 0 10px 10px 0; line-height: 1.5; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); padding: 4px 8px; font-size: .7rem; font-weight: 800; color: #cbd3dc; white-space: nowrap; }
.badge.success { color: #9ce5bf; border-color: rgba(79,195,138,.35); background: rgba(79,195,138,.08); }
.badge.warning { color: #ffda8a; border-color: rgba(241,189,85,.35); background: rgba(241,189,85,.08); }
.muted-badge { color: var(--muted); }
.empty-state { padding: 30px 14px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.empty-state.tall { min-height: 280px; display: grid; place-items: center; }

.card-list { display: grid; gap: 10px; }
.item-card { display: flex; justify-content: space-between; gap: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.012); }
.item-card.inactive { opacity: .58; }
.item-card.low-stock-item { border-color: rgba(241,189,85,.38); background: rgba(241,189,85,.035); }
.item-main { min-width: 0; flex: 1; }
.item-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.item-main > small { color: var(--muted); display: block; margin-top: 4px; }
.item-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; color: var(--muted); font-size: .78rem; }
.item-meta b { color: #dfe4eb; }
.item-actions, .inline-actions { display: flex; align-items: center; gap: 7px; }
.item-actions form, .inline-actions form { margin: 0; }
.edit-details { min-width: 220px; }
.edit-details > summary { list-style: none; }
.edit-details > summary::-webkit-details-marker { display: none; }
.compact-form { padding-top: 12px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: #7e8998; text-transform: uppercase; font-size: .67rem; letter-spacing: .1em; }
td { color: #d6dce4; font-size: .84rem; }
tr:last-child td { border-bottom: 0; }

.calc-tabs { display: flex; gap: 8px; padding: 5px; width: fit-content; max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 18px; }
.calc-tabs a { white-space: nowrap; padding: 10px 13px; border-radius: 9px; color: var(--muted); font-weight: 750; font-size: .84rem; }
.calc-tabs a.active { background: var(--surface-3); color: var(--gold-2); }
.calculator-layout { display: grid; grid-template-columns: minmax(300px,.7fr) minmax(0,1.3fr); gap: 18px; align-items: start; }
.calculator-input { position: sticky; top: 108px; }
.result-hero { display: grid; gap: 5px; padding: 18px; border-radius: 13px; background: linear-gradient(135deg, rgba(215,177,95,.18), rgba(215,177,95,.04)); border: 1px solid rgba(215,177,95,.22); margin-bottom: 14px; }
.result-hero small, .result-hero span { color: #b7c0cb; }
.result-hero strong { font-size: clamp(1.7rem, 4vw, 2.7rem); color: var(--gold-2); }
.result-list { display: grid; gap: 9px; }
.result-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.result-row small { display: block; color: var(--muted); margin-top: 4px; max-width: 560px; }
.result-values { text-align: right; display: grid; justify-items: end; gap: 4px; }
.result-values b { color: #fff; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 15px; }
.detail-grid > div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.detail-grid small, .detail-grid strong { display: block; }
.detail-grid small { color: var(--muted); margin-bottom: 4px; }
details > summary { cursor: pointer; color: var(--gold-2); font-weight: 700; padding: 8px 0; }
pre { max-height: 480px; overflow: auto; background: #080a0d; border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: #b8c3cf; font-size: .78rem; line-height: 1.5; }

.login-page, .install-page { display: grid; place-items: center; padding: 24px; min-height: 100vh; }
.login-shell, .install-shell { width: min(100%, 480px); }
.install-shell { width: min(100%, 760px); }
.login-card, .install-card { padding: 30px; background: rgba(17,21,27,.96); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 35px 90px rgba(0,0,0,.45); }
.login-card h1, .install-card h1 { font-size: 1.65rem; }
.login-card .version { display: block; margin-top: 20px; }



.current-stock-box {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(215,177,95,.24);
    border-radius: 12px;
    background: rgba(215,177,95,.07);
}
.current-stock-box small { color: var(--muted); }
.current-stock-box strong { color: var(--gold-2); font-size: 1.35rem; }
.stock-history-list { display: grid; gap: 10px; }
.stock-history-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255,255,255,.012);
}
.stock-history-main { min-width: 0; }
.stock-history-main > small { display: block; color: var(--muted); margin-top: 4px; }
.stock-history-main p { margin: 9px 0 0; color: #d7dde5; font-size: .85rem; line-height: 1.45; }
.stock-history-values { display: grid; justify-items: end; gap: 6px; text-align: right; white-space: nowrap; }
.stock-history-values strong { color: #fff; }
.stock-positive { color: var(--green); font-weight: 800; }
.stock-negative { color: var(--yellow); font-weight: 800; }
.stock-readonly {
    display: grid;
    gap: 8px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255,255,255,.015);
}
.stock-readonly small { color: var(--muted); }
.stock-readonly strong { color: var(--gold-2); }

@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 220px minmax(0,1fr); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .grid-form-list, .calculator-layout { grid-template-columns: 1fr; }
    .sticky-panel, .calculator-input { position: static; }
}
@media (max-width: 760px) {
    .app-shell { display: block; }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 310px); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 30px 0 70px rgba(0,0,0,.5); }
    .sidebar.open { transform: translateX(0); }
    .topbar { height: auto; min-height: 79px; padding-left: 16px; padding-right: 16px; }
    .menu-toggle { display: grid; }
    .top-user { display: none; }
    .content { padding: 18px 14px 100px; }
    .mobile-nav { position: fixed; display: grid; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 40; background: rgba(17,21,27,.94); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 15px; padding: 7px; box-shadow: var(--shadow); }
    .mobile-nav a { display: grid; place-items: center; gap: 2px; color: var(--muted); padding: 5px; border-radius: 10px; }
    .mobile-nav a.active { color: var(--gold-2); background: rgba(215,177,95,.1); }
    .mobile-nav span { font-size: 1.1rem; }
    .mobile-nav small { font-size: .65rem; }
    .grid-two, .grid-two.unequal { grid-template-columns: 1fr; }
    .page-actions { align-items: flex-start; }
    .form-grid.two { grid-template-columns: 1fr; }
    .item-card, .result-row, .stock-history-row { align-items: flex-start; flex-direction: column; }
    .item-actions { width: 100%; }
    .item-actions .btn, .item-actions form { flex: 1; }
    .item-actions form .btn { width: 100%; }
    .result-values, .stock-history-values { text-align: left; justify-items: start; white-space: normal; }
    .detail-grid { grid-template-columns: 1fr; }
    .stats-grid { gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card strong { font-size: 1.3rem; }
    .login-page, .install-page { padding: 12px; align-items: start; padding-top: max(26px, env(safe-area-inset-top)); }
    .login-card, .install-card { padding: 22px 18px; border-radius: 18px; }
}
@media (max-width: 430px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { display: grid; gap: 8px; }
    .page-actions { display: grid; }
    .panel { padding: 16px; }
}

/* V-Raw 1.2.0 production sheet */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.notification-bell { position: relative; width: 39px; height: 39px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); font-weight: 900; }
.notification-bell.has-alerts { color: #ffda8a; border-color: rgba(241,189,85,.45); background: rgba(241,189,85,.1); }
.notification-bell b { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--yellow); color: #17130a; font-size: .65rem; }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: rgba(241,189,85,.16); color: #ffda8a; font-size: .68rem; }
.sheet-page-actions { margin-bottom: 12px; }
.sheet-tabs, .stock-type-tabs { display: flex; gap: 7px; padding: 5px; width: fit-content; max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.sheet-tabs { margin-bottom: 18px; }
.sheet-tabs a, .stock-type-tabs a { white-space: nowrap; padding: 9px 13px; border-radius: 9px; color: var(--muted); font-weight: 750; font-size: .82rem; }
.sheet-tabs a.active, .stock-type-tabs a.active { background: var(--surface-3); color: var(--gold-2); }
.sheet-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.sheet-panel { min-width: 0; }
.stock-sheet-panel { position: sticky; top: 108px; }
.sheet-head { align-items: center; }
.sheet-filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sheet-filters input { width: 190px; }
.sheet-filters select { width: 155px; }
.sheet-table-wrap { border: 1px solid var(--line); border-radius: 13px; }
.data-sheet { min-width: 1040px; }
.raw-sheet { min-width: 860px; }
.data-sheet th { position: sticky; top: 0; z-index: 2; background: #12171e; }
.data-sheet td { background: rgba(255,255,255,.008); }
.data-sheet tr.sheet-row-low > td { background: rgba(241,189,85,.07); border-bottom-color: rgba(241,189,85,.25); }
.data-sheet tr.sheet-row-out > td { background: rgba(239,108,117,.08); border-bottom-color: rgba(239,108,117,.28); }
.data-sheet tr.sheet-row-ok > td { background: rgba(79,195,138,.018); }
.data-sheet td strong + small, .data-sheet td > small { display: block; margin-top: 4px; color: var(--muted); }
.sheet-number { color: #fff; font-size: .98rem; }
.sheet-number.total { color: var(--gold-2); }
.sheet-warning-note { color: #ffda8a !important; }
.sheet-product-list { display: block; max-width: 330px; color: #cbd2db; }
.sheet-detail-row td { padding: 0 12px 10px; background: rgba(7,9,12,.42) !important; }
.sheet-detail-row details { border: 0; }
.sheet-detail-row summary { font-size: .76rem; }
.ingredient-sheet-wrap { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; }
.ingredient-sheet { min-width: 780px; }
.ingredient-sheet th, .ingredient-sheet td { padding: 9px; }
.ingredient-sheet tr.ingredient-low td { background: rgba(241,189,85,.06); }
.dashboard-intro { margin: -4px 0 15px; line-height: 1.55; }
.dashboard-capacity-list { display: grid; gap: 8px; }
.dashboard-capacity-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.012); color: var(--text); }
.dashboard-capacity-row.capacity-low { border-color: rgba(241,189,85,.34); background: rgba(241,189,85,.045); }
.dashboard-capacity-row.capacity-out { border-color: rgba(239,108,117,.34); background: rgba(239,108,117,.055); }
.dashboard-capacity-row small { display: block; color: var(--muted); margin-top: 4px; }
.capacity-values { display: flex; gap: 14px; text-align: right; }
.capacity-values span { display: grid; color: var(--muted); font-size: .72rem; }
.capacity-values b { color: var(--gold-2); font-size: 1rem; }
.archive-sheet td { vertical-align: top; }
.archive-sheet td small { max-width: 240px; }
.alert-list { display: grid; gap: 10px; }
.alert-card { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.012); }
.alert-card.alert-low { border-color: rgba(241,189,85,.36); background: rgba(241,189,85,.045); }
.alert-card.alert-out { border-color: rgba(239,108,117,.42); background: rgba(239,108,117,.06); }
.alert-card-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(241,189,85,.13); color: #ffda8a; font-weight: 900; }
.alert-card p { margin: 6px 0; color: #d7dde5; line-height: 1.45; }
.alert-card small { color: var(--muted); }
.resolved-alerts > div { align-items: flex-start; }
.notification-permission { margin-bottom: 18px; }

@media (max-width: 1180px) {
    .sheet-layout { grid-template-columns: 1fr; }
    .stock-sheet-panel { position: static; }
}
@media (max-width: 760px) {
    .sheet-head { align-items: flex-start; flex-direction: column; }
    .sheet-filters { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .sheet-filters input { width: auto; grid-column: 1 / -1; }
    .sheet-filters select { width: auto; }
    .dashboard-capacity-row { align-items: flex-start; flex-direction: column; }
    .capacity-values { width: 100%; text-align: left; }
    .alert-card { grid-template-columns: 34px minmax(0,1fr); }
    .alert-card > .btn { grid-column: 1 / -1; width: 100%; }
    .top-actions { margin-left: auto; }
}
.sheet-scenario-note { margin: -2px 0 15px; }

/* V-Raw 2.0.0 split archives and administrator area */
.stats-six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.archive-entry-grid { align-items: stretch; }
.archive-entry { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 18px; }
.archive-entry-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: rgba(215,177,95,.12); color: var(--gold-2); font-size: 1.55rem; font-weight: 900; }
.archive-entry h2 { font-size: 1.3rem; margin-bottom: 7px; }
.archive-entry p:last-child { margin-bottom: 0; }
.admin-callout { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-callout p:last-child { margin-bottom: 0; }
.product-preview-list { display: grid; gap: 8px; }
.product-preview-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--text); background: rgba(255,255,255,.012); }
.product-preview-row small { display: block; color: var(--muted); margin-top: 3px; }
.product-mini-counts { display: flex; gap: 9px; }
.product-mini-counts span { display: grid; min-width: 45px; text-align: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: .68rem; }
.product-mini-counts b { color: #fff; font-size: .92rem; }
.danger-badge { color: #ffc0c5; border-color: rgba(239,108,117,.4); background: rgba(239,108,117,.09); }
.archive-page-head { align-items: flex-start; }
.archive-sheet-panel, .archive-history-panel { margin-bottom: 18px; }
.archive-table-wrap { border: 1px solid var(--line); border-radius: 13px; }
.raw-archive-table { min-width: 1040px; }
.product-archive-table { min-width: 1180px; }
.archive-footnote { margin: 14px 0 0; font-size: .78rem; }
.yield-list { display: grid; gap: 7px; min-width: 360px; }
.yield-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.012); }
.yield-row small { display: block; color: var(--muted); margin-top: 3px; }
.yield-count { min-width: 82px; text-align: right; color: var(--gold-2); font-size: 1.05rem; font-weight: 850; }
.yield-count small { display: block; font-size: .65rem; font-weight: 600; }
.category-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 11px; margin-bottom: 18px; }
.category-summary-card { display: grid; gap: 5px; padding: 14px; color: var(--text); border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.category-summary-card.active, .category-summary-card:hover { border-color: rgba(215,177,95,.55); background: rgba(215,177,95,.07); color: #fff; }
.category-summary-card small { color: var(--muted); }
.category-summary-card > div { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; color: var(--gold-2); font-size: .72rem; font-weight: 750; }
.category-pill { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: #c9d2dd; background: rgba(255,255,255,.025); font-size: .7rem; white-space: nowrap; }
.count-cell { font-size: 1.05rem; }
.unlabelled-count { color: #c7b5ff; }
.in-stock-count { color: #9ce5bf; }
.receive-count { color: #8fd4ff; }
.admin-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.admin-action-card { display: flex; gap: 13px; align-items: center; padding: 17px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: linear-gradient(160deg, rgba(23,28,36,.96), rgba(15,19,25,.96)); }
.admin-action-card:hover { border-color: rgba(215,177,95,.45); color: #fff; transform: translateY(-1px); }
.admin-action-card > span { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--surface-3); color: var(--gold-2); font-size: 1.15rem; }
.admin-action-card strong, .admin-action-card small { display: block; }
.admin-action-card small { color: var(--muted); margin-top: 4px; line-height: 1.35; }
.admin-action-card.primary-action { border-color: rgba(215,177,95,.3); background: linear-gradient(145deg, rgba(215,177,95,.14), rgba(17,21,27,.95)); }
.compact-history .stock-history-row { padding: 12px; }
.product-count-readonly { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.product-count-readonly > div { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.015); }
.product-count-readonly small, .product-count-readonly strong { display: block; }
.product-count-readonly small { color: var(--muted); }
.product-count-readonly strong { margin-top: 3px; color: var(--gold-2); font-size: 1.15rem; }
.alert-system-tabs { margin-top: -2px; }
.notification-bell.raw-bell span, .notification-bell.product-bell span { font-size: .72rem; letter-spacing: .02em; }

@media (max-width: 1250px) {
    .stats-six { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .stats-five { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .admin-action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .archive-entry { grid-template-columns: auto minmax(0,1fr); }
    .archive-entry .btn { grid-column: 1 / -1; }
    .admin-callout { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
    .stats-six, .stats-five { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .admin-action-grid { grid-template-columns: 1fr; }
    .archive-entry { grid-template-columns: 1fr; }
    .archive-entry-icon { width: 48px; height: 48px; }
    .product-preview-row { align-items: flex-start; flex-direction: column; }
    .product-mini-counts { width: 100%; }
    .product-mini-counts span { flex: 1; }
    .product-count-readonly { grid-template-columns: 1fr; }
    .sheet-filters input, .sheet-filters select { width: 100%; }
    .sheet-filters { width: 100%; }
    .sheet-filters .btn { width: 100%; }
}

/* V-Raw 2.1.0 raw-centred product yield setup */
.raw-setup-layout { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); align-items: start; }
.raw-definition-panel { min-width: 0; }
.raw-list-panel { position: sticky; top: 92px; }
.form-section { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.012); }
.form-section + .form-section { margin-top: 4px; }
.form-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.form-section-head h3 { margin: 2px 0 0; font-size: 1.08rem; }
.form-section-head p:last-child { margin-bottom: 0; }
.yield-editor-list { display: grid; gap: 12px; }
.yield-editor-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.yield-editor-main { display: grid; gap: 12px; min-width: 0; }
.yield-equation-grid { display: grid; grid-template-columns: minmax(100px,.7fr) minmax(100px,.6fr) auto minmax(120px,.8fr) minmax(110px,.7fr); gap: 10px; align-items: end; }
.yield-equals { align-self: end; padding: 0 2px 13px; color: var(--gold-2); font-size: .76rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.yield-output-unit { min-height: 44px; display: flex; flex-direction: column; justify-content: center; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); }
.yield-output-unit small { color: var(--muted); font-size: .67rem; }
.yield-output-unit strong { margin-top: 2px; color: var(--gold-2); font-size: .9rem; }
.yield-remove { width: 34px; height: 34px; color: #ffb4ba; background: rgba(239,108,117,.08); border-color: rgba(239,108,117,.2); }
.yield-remove:hover { background: rgba(239,108,117,.16); }
.yield-advanced { padding-top: 2px; }
.yield-advanced summary { cursor: pointer; color: var(--muted); font-size: .76rem; font-weight: 700; }
.yield-advanced[open] summary { margin-bottom: 11px; color: var(--gold-2); }

@media (max-width: 1180px) {
    .raw-setup-layout { grid-template-columns: 1fr; }
    .raw-list-panel { position: static; }
}
@media (max-width: 820px) {
    .yield-equation-grid { grid-template-columns: 1fr 1fr; }
    .yield-equals { display: none; }
    .yield-output-unit { min-height: 0; }
}
@media (max-width: 560px) {
    .form-section { padding: 14px; }
    .form-section-head { flex-direction: column; }
    .form-section-head .btn { width: 100%; }
    .yield-editor-row { grid-template-columns: 1fr; }
    .yield-remove { width: 100%; }
    .yield-equation-grid { grid-template-columns: 1fr; }
}
