/* ==========================================================================
   Volt — Electricity Shop UI
   Palette: ink (charcoal) + amber (caution yellow) on warm paper.
   ========================================================================== */

:root {
    --ink-900: #15181d;
    --ink-800: #1d2128;
    --ink-700: #2a2f38;
    --ink-600: #3b414c;
    --ink-400: #7a818d;
    --ink-300: #a3a9b3;
    --paper: #f5f3ee;
    --paper-2: #ece9e2;
    --line: #e2ded5;
    --card: #ffffff;
    --amber: #f2a900;
    --amber-600: #d99700;
    --amber-50: #fff6dc;
    --green: #2e7d4f;
    --green-50: #e7f4ec;
    --red: #c2410c;
    --red-50: #fdeee6;
    --blue: #2563a8;
    --blue-50: #e7f0fa;
    --radius: 10px;
    --sidebar-w: 248px;

    --bs-body-font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    --bs-body-bg: var(--paper);
    --bs-body-color: var(--ink-800);
    --bs-border-color: var(--line);
    --bs-primary: var(--ink-800);
    --bs-primary-rgb: 29, 33, 40;
    --bs-link-color: #1f5f99;
    --bs-link-color-rgb: 31, 95, 153;
    --bs-link-hover-color: #154672;
    --bs-border-radius: 8px;
    --bs-border-radius-lg: var(--radius);
}

html { font-size: 15px; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }

.num, .table td.num, .table th.num {
    font-variant-numeric: tabular-nums;
    text-align: left;
    direction: ltr;
    white-space: nowrap;
}
.ltr { direction: ltr; unicode-bidi: embed; }
.muted { color: var(--ink-400) !important; }
.fw-600 { font-weight: 600; }
.small-caps { font-size: .74rem; letter-spacing: .02em; color: var(--ink-400); font-weight: 600; }

/* ---------- Shell ---------- */

.shell { display: flex; min-height: 100vh; }
.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
    --bs-offcanvas-width: 282px;
    --bs-offcanvas-bg: var(--ink-900);
    --bs-offcanvas-color: #c9ced6;
    overflow-y: auto; /* phones: the slide-in menu is taller than the screen */
}
@media (min-width: 992px) {
    .sidebar-wrap { width: var(--sidebar-w); flex-shrink: 0; background: var(--ink-900); }
    .sidebar-wrap .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
/* Side menu scrollbar: amber on a visible track so users can see there are more links below. */
.sidebar::-webkit-scrollbar { width: 10px; }
.sidebar::-webkit-scrollbar-track { background: var(--ink-700); }
.sidebar::-webkit-scrollbar-thumb {
    background: var(--amber); border-radius: 5px;
    border: 2px solid var(--ink-700); /* small gap between thumb and track edge */
    min-height: 40px;
}
.sidebar::-webkit-scrollbar-thumb:hover { background: #ffbd1f; }
.sidebar::-webkit-scrollbar-thumb:active { background: var(--amber-600); }
/* Firefox (no ::-webkit-scrollbar). Kept out of Chrome: setting scrollbar-color there disables the styles above. */
@supports not selector(::-webkit-scrollbar) {
    .sidebar { scrollbar-color: var(--amber) var(--ink-700); scrollbar-width: auto; }
}

.brand {
    display: flex; align-items: center; gap: .7rem;
    padding: 1.15rem 1.2rem 1rem; color: #fff; text-decoration: none;
}
.brand:hover { color: #fff; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
    background: var(--amber); display: grid; place-items: center;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.brand-sub { font-size: .72rem; color: var(--ink-300); }

.side-nav { padding: .25rem 0 1.5rem; }
.side-nav .nav-head {
    font-size: .7rem; font-weight: 600; color: #6c7380;
    padding: 1.1rem 1.4rem .35rem; letter-spacing: .03em;
}
.side-nav a {
    display: flex; align-items: center; gap: .7rem;
    color: #c2c8d1; text-decoration: none;
    padding: .48rem .9rem; margin: 1px .7rem; border-radius: 7px;
    font-size: .92rem; position: relative;
    transition: background .12s, color .12s;
}
.side-nav a i { font-size: 1.02rem; opacity: .75; width: 1.1rem; text-align: center; }
.side-nav a:hover { background: var(--ink-800); color: #fff; }
.side-nav a.active { background: var(--ink-700); color: #fff; }
.side-nav a.active::before {
    content: ""; position: absolute; right: -0.7rem; top: 8px; bottom: 8px;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--amber);
}
.side-nav a.active i { opacity: 1; color: var(--amber); }
.side-nav .nav-cta {
    background: var(--amber); color: var(--ink-900); font-weight: 600; margin: .4rem .7rem .2rem;
}
.side-nav .nav-cta i { opacity: 1; }
.side-nav .nav-cta:hover { background: #ffbd1f; color: var(--ink-900); }
.side-nav .badge-dot {
    margin-inline-start: auto; background: var(--red); color: #fff;
    font-size: .68rem; border-radius: 20px; padding: .05rem .45rem; font-weight: 600;
}

.topbar {
    height: 58px; background: var(--card); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem;
    position: sticky; top: 0; z-index: 1020;
}
.topbar .menu-btn { border: 0; background: transparent; font-size: 1.4rem; padding: .2rem .4rem; color: var(--ink-800); }
.topbar .shop { font-weight: 600; }
.topbar .today { color: var(--ink-400); font-size: .85rem; }
.user-chip {
    display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line);
    border-radius: 30px; padding: .2rem .3rem .2rem .8rem; background: var(--paper);
    color: var(--ink-800); text-decoration: none; font-size: .88rem;
}
.user-chip .avatar {
    width: 30px; height: 30px; border-radius: 50%; background: var(--ink-800); color: var(--amber);
    display: grid; place-items: center; font-weight: 700; font-size: .85rem;
}

.content { padding: 1.4rem 1.5rem 3rem; max-width: 1500px; width: 100%; }
@media (max-width: 575.98px) { .content { padding: 1rem .8rem 5rem; } .topbar { padding: 0 .75rem; } }

/* ---------- Page header ---------- */

.page-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: .75rem; margin-bottom: 1.15rem;
}
.page-head .eyebrow { font-size: .76rem; color: var(--ink-400); font-weight: 600; margin-bottom: .1rem; }
.page-head h1 { font-size: 1.45rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Cards ---------- */

.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.card-header {
    background: transparent; border-bottom: 1px solid var(--line);
    padding: .8rem 1.1rem; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.card-body { padding: 1.1rem; }
.card-title-sm { font-weight: 600; font-size: .95rem; margin-bottom: .8rem; }

.stat {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.1rem; height: 100%; position: relative; overflow: hidden;
}
.stat .label { font-size: .8rem; color: var(--ink-400); font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.stat .value { font-size: 1.55rem; font-weight: 700; margin-top: .3rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .value small { font-size: .78rem; color: var(--ink-400); font-weight: 500; margin-inline-start: .25rem; }
.stat .sub { font-size: .78rem; color: var(--ink-400); margin-top: .15rem; }
.stat.accent { background: var(--ink-800); border-color: var(--ink-800); color: #fff; }
.stat.accent .label, .stat.accent .sub { color: var(--ink-300); }
.stat.accent .value { color: var(--amber); }
.stat .tick { position: absolute; left: 1rem; top: 1rem; font-size: 1.15rem; opacity: .35; }

/* ---------- Tables ---------- */

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .6rem .75rem; border-bottom-color: var(--line); }
.table thead th {
    font-size: .76rem; font-weight: 600; color: var(--ink-400); background: #faf9f6;
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table tbody tr:hover > * { background: #fbfaf7; }
.table tfoot td { font-weight: 700; background: #faf9f6; border-top: 2px solid var(--line); }
.table .row-cancelled > * { color: var(--ink-300); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.table-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.table-card .table-responsive { margin: 0; }
.td-actions { white-space: nowrap; text-align: left; }
.td-actions .btn { padding: .15rem .45rem; }

.empty {
    text-align: center; color: var(--ink-400); padding: 2.5rem 1rem;
}
.empty i { font-size: 2rem; display: block; margin-bottom: .4rem; opacity: .5; }

/* ---------- Pills ---------- */

.pill {
    display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600;
    padding: .14rem .55rem; border-radius: 20px; white-space: nowrap; line-height: 1.5;
}
.pill-cash { background: var(--green-50); color: var(--green); }
.pill-credit { background: var(--amber-50); color: #9a6a00; }
.pill-cancel { background: var(--paper-2); color: var(--ink-400); }
.pill-red { background: var(--red-50); color: var(--red); }
.pill-blue { background: var(--blue-50); color: var(--blue); }
.pill-ink { background: var(--ink-800); color: #fff; }

.amount-pos { color: var(--red); font-weight: 600; }
.amount-neg { color: var(--green); font-weight: 600; }

/* ---------- Forms & buttons ---------- */

.form-label { font-size: .82rem; font-weight: 600; color: var(--ink-600); margin-bottom: .3rem; }
.form-control, .form-select {
    border-color: #d8d3c8; border-radius: 8px; padding: .48rem .7rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--amber); box-shadow: 0 0 0 .2rem rgba(242, 169, 0, .18);
}
.form-control[readonly] { background: var(--paper); }
.form-check-input:checked { background-color: var(--ink-800); border-color: var(--ink-800); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(242, 169, 0, .2); border-color: var(--amber); }
.form-text { color: var(--ink-400); }
.field-validation-error, .text-danger { color: var(--red) !important; font-size: .8rem; }
.validation-summary-valid { display: none !important; }
.validation-summary-errors ul { margin: 0; padding-inline-start: 1.1rem; }

.btn { border-radius: 8px; font-weight: 500; padding: .45rem .95rem; }
.btn-primary { --bs-btn-bg: var(--ink-800); --bs-btn-border-color: var(--ink-800); --bs-btn-hover-bg: var(--ink-900); --bs-btn-hover-border-color: var(--ink-900); --bs-btn-active-bg: #000; --bs-btn-disabled-bg: var(--ink-600); }
.btn-amber { background: var(--amber); border-color: var(--amber); color: var(--ink-900); font-weight: 600; }
.btn-amber:hover, .btn-amber:focus { background: #ffbb1a; border-color: #ffbb1a; color: var(--ink-900); }
.btn-light { background: var(--card); border-color: var(--line); color: var(--ink-800); }
.btn-light:hover { background: var(--paper); border-color: #d6d1c6; }
.btn-outline-primary { --bs-btn-color: var(--ink-800); --bs-btn-border-color: #cfc9bd; --bs-btn-hover-bg: var(--ink-800); --bs-btn-hover-border-color: var(--ink-800); }
.btn-ghost { background: transparent; border: 0; color: var(--ink-600); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink-900); }
.btn-check:checked + .btn-outline-success { background: var(--green); border-color: var(--green); }
.btn-check:checked + .btn-outline-warning { background: var(--amber); border-color: var(--amber); color: var(--ink-900); }

.filter-bar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: 1rem; }
.filter-bar .form-label { font-size: .75rem; margin-bottom: .2rem; }
.filter-bar .form-control, .filter-bar .form-select { padding: .38rem .6rem; font-size: .9rem; }

.seg { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a { padding: .32rem .85rem; border-radius: 7px; color: var(--ink-600); text-decoration: none; font-size: .88rem; font-weight: 500; }
.seg a.on { background: var(--card); color: var(--ink-900); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- Alerts ---------- */

.flash {
    display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: var(--radius);
    margin-bottom: 1rem; border: 1px solid; font-size: .92rem;
}
.flash i { font-size: 1.15rem; }
.flash .btn { margin-inline-start: auto; padding: .25rem .7rem; font-size: .85rem; }
.flash-ok { background: var(--green-50); border-color: #c4e3d0; color: #1f5a38; }
.flash-err { background: var(--red-50); border-color: #f6cdb7; color: #8a2c07; }
.flash-info { background: var(--amber-50); border-color: #f1dc9f; color: #6b4b00; }

/* ---------- Document editor (sales / purchases ...) ---------- */

.scan-box { position: relative; }
.scan-box .form-control { padding-inline-start: 2.6rem; height: 46px; font-size: 1rem; }
.scan-box > i { position: absolute; right: .95rem; top: 50%; transform: translateY(-50%); color: var(--ink-400); font-size: 1.1rem; z-index: 4; }
.scan-hint { font-size: .75rem; color: var(--ink-400); margin-top: .3rem; }
.scan-hint kbd { background: var(--paper-2); color: var(--ink-600); border: 1px solid var(--line); font-size: .7rem; padding: .05rem .35rem; }

.search-menu {
    display: none; position: absolute; top: calc(100% + 4px); right: 0; left: 0; z-index: 1040;
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 12px 28px rgba(21, 24, 29, .14); max-height: 340px; overflow-y: auto; padding: 4px;
}
.sm-item {
    display: flex; align-items: center; gap: .75rem; width: 100%; text-align: right;
    border: 0; background: transparent; border-radius: 7px; padding: .5rem .7rem;
}
.sm-item.on, .sm-item:hover { background: var(--amber-50); }
.sm-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sm-name { font-weight: 600; color: var(--ink-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-meta { font-size: .76rem; color: var(--ink-400); }
.sm-meta .sm-out { color: var(--red); font-weight: 600; }
.sm-price { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-800); direction: ltr; }
.sm-empty { padding: .8rem; color: var(--ink-400); text-align: center; font-size: .9rem; }

@keyframes rowFlash { from { background: var(--amber-50); } to { background: transparent; } }
.lines-table tr.flash-row > td { animation: rowFlash .9s ease-out; }

.lines-table td { vertical-align: middle; }
@media (min-width: 768px) { .lines-table td.c-prod { min-width: 170px; } }
.qty-step { display: flex; align-items: stretch; max-width: 150px; margin: 0 auto; }
.qty-step .q { border-radius: 0; max-width: 72px !important; min-width: 52px; }
.qty-step .st {
    border: 1px solid #d8d3c8; background: var(--paper); width: 30px; flex-shrink: 0;
    font-weight: 700; color: var(--ink-700); line-height: 1; padding: 0;
}
.qty-step .st:hover { background: var(--amber-50); }
.qty-step .st:first-child { border-radius: 0 8px 8px 0; border-left: 0; }
.qty-step .st:last-child { border-radius: 8px 0 0 8px; border-right: 0; }
.lines-table tr.below > td { background: #fff7e0 !important; }
.margin-tag { font-size: .7rem; margin-top: 2px; }
.lines-table .sp { max-width: 110px; text-align: center; margin: 0 auto; }
.disc-group { max-width: 175px; }
.disc-group select { max-width: 64px; padding-inline: .4rem; }
.lines-table .q, .lines-table .p { max-width: 120px; text-align: center; font-variant-numeric: tabular-nums; }
.lines-table .prod-name { font-weight: 600; line-height: 1.3; }
.lines-table .prod-code { font-size: .75rem; color: var(--ink-400); }
.lines-table tr.over > td { background: var(--red-50) !important; }
.lines-table .stock-tag { font-size: .78rem; color: var(--ink-400); white-space: nowrap; }
.lines-table tr.over .stock-tag { color: var(--red); font-weight: 600; }
.line-no { color: var(--ink-300); font-size: .8rem; width: 2rem; }

.totals { font-variant-numeric: tabular-nums; }
.totals .row-t { display: flex; justify-content: space-between; align-items: center; padding: .42rem 0; border-bottom: 1px dashed var(--line); }
.totals .row-t:last-child { border-bottom: 0; }
.totals .row-t span:first-child { color: var(--ink-600); }
.totals .grand {
    background: var(--ink-800); color: #fff; border-radius: 9px; padding: .8rem 1rem; margin: .6rem 0;
    display: flex; justify-content: space-between; align-items: baseline;
}
.totals .grand .v { font-size: 1.65rem; font-weight: 700; color: var(--amber); }
.party-info { font-size: .82rem; margin-top: .35rem; min-height: 1.1rem; }

.doc-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem 1.4rem; }
.doc-meta .k { font-size: .75rem; color: var(--ink-400); font-weight: 600; }
.doc-meta .v { font-weight: 600; }

.mobile-bar { display: none; }

/* Product pictures (shown in the online store too) */
.product-thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; color: var(--ink-400); flex-shrink: 0; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb.lg { width: 112px; height: 112px; border-radius: 14px; font-size: 2rem; border: 1px dashed var(--line); }

.side-nav .nav-count { margin-inline-start: auto; background: var(--amber); color: var(--ink-900); border-radius: 10px; padding: 0 .5rem; font-size: .75rem; font-weight: 700; line-height: 1.35rem; }

/* Online order status pills */
.pill-new { background: var(--amber-50); color: #8a5a00; }
.pill-ok { background: var(--green-50); color: var(--green); }

/* Bulk entry grids (opening stock): totals + save stay visible while scrolling. */
.bulk-table .form-control-sm { max-width: 120px; margin-inline-start: auto; }
.bulk-bar {
    position: sticky; bottom: 0; z-index: 1020; display: flex; align-items: center; gap: 1.5rem;
    background: var(--ink-900); color: #fff; padding: .65rem 1rem; border-radius: var(--radius);
    box-shadow: 0 -4px 14px rgba(0,0,0,.15);
}
.bulk-bar .t { font-size: .72rem; color: var(--ink-300); }
.bulk-bar .v { font-size: 1.2rem; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }
.bulk-bar .btn { margin-inline-start: auto; }

@media (max-width: 767.98px) {
    .lines-table thead { display: none; }
    .lines-table, .lines-table tbody { display: block; }
    .lines-table tr {
        display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem;
        border: 1px solid var(--line); border-radius: 9px; padding: .7rem .8rem; margin: 0 .6rem .6rem; position: relative; background: var(--card);
    }
    .lines-table td { display: block; border: 0 !important; padding: 0 !important; background: transparent !important; }
    .lines-table td.c-prod { grid-column: 1 / -1; padding-inline-end: 2.2rem !important; }
    .lines-table td.c-no { display: none; }
    .lines-table td[data-label]:not(.c-prod)::before { content: attr(data-label); display: block; font-size: .7rem; color: var(--ink-400); font-weight: 600; }
    .lines-table .q, .lines-table .p { max-width: none; }
    .lines-table td.c-rm { position: absolute; top: .45rem; left: .45rem; }
    .lines-table tr.over { background: var(--red-50); }

    .mobile-bar {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030;
        background: var(--ink-900); color: #fff; padding: .6rem .9rem; align-items: center; gap: .75rem;
        box-shadow: 0 -4px 14px rgba(0,0,0,.15);
    }
    .mobile-bar .t { font-size: .72rem; color: var(--ink-300); }
    .mobile-bar .v { font-size: 1.25rem; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }
    .mobile-bar .btn { margin-inline-start: auto; }
}

/* ---------- Dashboard ---------- */

.greet { font-size: 1.45rem; font-weight: 700; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.quick {
    display: flex; align-items: center; gap: .6rem; background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: .75rem .9rem; color: var(--ink-800); text-decoration: none; font-weight: 600; font-size: .9rem;
    transition: border-color .12s, transform .12s;
}
.quick:hover { border-color: var(--amber); color: var(--ink-900); transform: translateY(-1px); }
.quick i { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--paper-2); font-size: 1.05rem; }
.quick.primary i { background: var(--amber); color: var(--ink-900); }

.list-row { display: flex; align-items: center; gap: .75rem; padding: .62rem 1.1rem; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta { font-size: .76rem; color: var(--ink-400); }
.meter { height: 5px; background: var(--paper-2); border-radius: 3px; overflow: hidden; margin-top: .3rem; }
.meter > span { display: block; height: 100%; background: var(--red); border-radius: 3px; }

/* ---------- Reports ---------- */

.report-tile {
    display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.1rem; color: var(--ink-800); text-decoration: none; height: 100%;
    transition: border-color .12s;
}
.report-tile:hover { border-color: var(--ink-400); color: var(--ink-900); }
.report-tile .ic { font-size: 1.25rem; color: var(--amber-600); }
.report-tile h6 { font-weight: 700; margin: .45rem 0 .2rem; }
.report-tile p { font-size: .8rem; color: var(--ink-400); margin: 0; }

.pl-table td { padding: .55rem .9rem; }
.pl-table .sec td { background: #faf9f6; font-weight: 700; font-size: .85rem; color: var(--ink-600); }
.pl-table .total td { font-weight: 700; border-top: 2px solid var(--ink-800); }
.pl-table .indent { padding-inline-start: 2rem; color: var(--ink-600); }

/* ---------- Permissions editor ---------- */

.perm-group { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); height: 100%; }
.perm-group .head { display: flex; justify-content: space-between; align-items: center; padding: .65rem .9rem; border-bottom: 1px solid var(--line); font-weight: 700; }
.perm-group .body { padding: .6rem .9rem; }
.perm-group .form-check { padding-top: .2rem; padding-bottom: .2rem; }

/* ---------- Auth ---------- */

.auth {
    min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-art {
    background: var(--ink-900); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden;
}
.auth-art .wire { position: absolute; inset: 0; opacity: .5; }
.auth-art h2 { font-size: 2rem; font-weight: 700; line-height: 1.35; position: relative; }
.auth-art h2 span { color: var(--amber); }
.auth-art p { color: var(--ink-300); position: relative; max-width: 30rem; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-form .box { width: 100%; max-width: 370px; }
@media (max-width: 991.98px) {
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
}

/* ---------- Print ---------- */

.print-body { background: #e9e6df; }
.print-toolbar { display: flex; gap: .5rem; justify-content: center; padding: 1rem; flex-wrap: wrap; }
.paper {
    background: #fff; margin: 0 auto 2rem; width: 210mm; max-width: 100%; min-height: 140mm;
    padding: 14mm 14mm 10mm; box-shadow: 0 2px 18px rgba(0,0,0,.08); font-size: 13px; color: #111;
}
.paper .inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 3px solid #111; padding-bottom: .8rem; margin-bottom: 1rem; }
.paper .inv-head .shop-name { font-size: 1.45rem; font-weight: 700; }
.paper .inv-title { text-align: left; }
.paper .inv-title .t { font-size: 1.2rem; font-weight: 700; letter-spacing: .02em; }
.paper .inv-title .n { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.paper table { width: 100%; border-collapse: collapse; }
.paper th { background: #111; color: #fff; font-weight: 600; padding: 6px 8px; font-size: 12px; }
.paper td { padding: 6px 8px; border-bottom: 1px solid #ddd; }
.paper .sum { width: 270px; margin-inline-start: auto; margin-top: .8rem; }
.paper .sum td { border: 0; padding: 4px 8px; }
.paper .sum .big td { border-top: 2px solid #111; font-size: 1.1rem; font-weight: 700; }
.paper .foot { margin-top: 1.5rem; border-top: 1px dashed #999; padding-top: .6rem; text-align: center; font-size: 12px; color: #444; }
.paper .stamp { display: inline-block; border: 2px solid #b91c1c; color: #b91c1c; font-weight: 700; padding: .2rem .8rem; transform: rotate(-6deg); font-size: 1.1rem; }

.paper.roll { width: 80mm; min-height: 0; padding: 4mm 3mm; font-size: 11.5px; }
.paper.roll .inv-head { flex-direction: column; align-items: center; text-align: center; border-bottom-width: 1px; border-bottom-style: dashed; }
.paper.roll .inv-title { text-align: center; }
.paper.roll .inv-head .shop-name { font-size: 1.1rem; }
.paper.roll th { background: transparent; color: #111; border-bottom: 1px solid #111; padding: 3px 2px; font-size: 11px; }
.paper.roll td { padding: 3px 2px; border-bottom: 1px dotted #ccc; }
.paper.roll .sum { width: 100%; }
.paper.roll .hide-roll { display: none !important; }

@media print {
    @page { margin: 6mm; }
    body, .print-body { background: #fff !important; }
    .no-print, .sidebar-wrap, .topbar, .print-toolbar { display: none !important; }
    .paper { box-shadow: none; margin: 0 auto; padding: 0; width: auto; }
    .paper.roll { width: 76mm; }
    .content { padding: 0 !important; }
    .card { border: 0; }
}
