/* ============================================================
   Dokanbohi - stylesheet (mobile-first, super responsive)
   ============================================================ */

:root {
    --primary: #0e7c5b;
    --primary-dark: #0a5f45;
    --primary-light: #d1fae5;
    --accent: #f59e0b;
    --danger: #dc2626;
    --success: #16a34a;
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: .15s ease;
    --focus-ring: 0 0 0 3px rgba(14,124,91,.25);
    --font-bangla: "Hind Siliguri","Noto Sans Bengali",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   Base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-bangla);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-color: var(--primary);
}

/* Hidden utility - wins over any display rule */
.hidden { display: none !important; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   Auth pages
   ============================================================ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: var(--spacing-lg);
}
.auth-card {
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
}
.auth-card h1 { color: var(--primary); text-align: center; font-size: 1.6rem; margin: 0 0 4px; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 0 18px; font-size: .9rem; }
.auth-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 14px; text-align: center; }
.auth-link { text-align: center; margin-top: 14px; font-size: .9rem; }

/* ============================================================
   Layout - Top bar
   ============================================================ */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; height: 56px;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center;
    gap: 10px; padding: 0 12px;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.topbar .brand { font-size: 1.15rem; font-weight: 700; }
.hamburger {
    background: transparent; border: none; color: #fff;
    font-size: 1.6rem; cursor: pointer; line-height: 1;
    padding: 2px 6px;
}
.hamburger:focus-visible { border-radius: 6px; background: rgba(255,255,255,.15); }

.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    z-index: 90; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.overlay.show { opacity: 1; visibility: visible; }

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
    position: fixed; top: 56px; bottom: 0; left: 0;
    width: 250px; max-width: 80vw;
    background: #111827; color: #d1d5db;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 110;
    overflow-y: auto;
    padding: 10px 0;
}
.sidebar.open { transform: translateX(0); }
.sidebar-user {
    padding: 12px 18px; color: #fff; font-weight: 600;
    border-bottom: 1px solid #2d3748; margin-bottom: 8px;
}
.sidebar-avatar-wrap { display: flex; align-items: center; gap: 10px; }
.sidebar-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    object-fit: cover; border: 2px solid #fff; flex-shrink: 0;
    background: #e5e7eb;
}
.sidebar-avatar.placeholder {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--muted); background: #fff;
}
.sidebar-user-meta { line-height: 1.3; }
.sidebar-shop { font-size: .78rem; opacity: .85; font-weight: 400; }
.sidebar a {
    display: block; padding: 12px 18px; color: #d1d5db;
    font-size: 1rem; transition: background .15s;
}
.sidebar a:hover { background: #2d3748; text-decoration: none; }
.sidebar a.active { background: var(--primary); color: #fff; }
.sidebar a.logout { color: #fca5a5; }

/* ============================================================
   Main content
   ============================================================ */
.main {
    padding: 70px 14px 60px;
    max-width: 1100px;
    margin: 0 auto;
}
@media (min-width: 900px) {
    .sidebar { transform: translateX(0); }
    .hamburger, .overlay { display: none; }
    .main { margin-left: 250px; padding: 80px 26px 60px; }
}

/* ============================================================
   Page head
   ============================================================ */
.page-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
}
.page-head h2 {
    font-size: 1.3rem; margin: 0; flex: 1;
    min-width: 0; line-height: 1.2;
}
.page-head .btn { flex-shrink: 0; white-space: nowrap; }
.page-head .btn-group { flex-shrink: 0; }

/* ============================================================
   Alerts
   ============================================================ */
.alert {
    padding: 11px 14px; border-radius: 8px; margin-bottom: 12px; font-size: .92rem;
    display: flex; align-items: center; gap: 8px;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* ============================================================
   Stat cards
   ============================================================ */
.stat-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px;
}
@media (min-width: 480px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
    background: var(--card); border-radius: var(--radius); padding: 16px;
    box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-label { color: var(--muted); font-size: .82rem; }
.stat-value { font-size: 1.35rem; font-weight: 700; margin-top: 4px; }
.stat-value.green { color: var(--success); }
.stat-value.red { color: var(--danger); }
.stat-card .icon { font-size: 1.4rem; }

/* ============================================================
   Card
   ============================================================ */
.card {
    background: var(--card); border-radius: var(--radius); padding: 18px;
    box-shadow: var(--shadow); margin-bottom: 16px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 12px; color: var(--primary-dark); }

/* ============================================================
   Table
   ============================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
    width: 100%; border-collapse: collapse; min-width: 480px; font-size: .92rem;
}
.table th, .table td { padding: 10px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { background: #f9fafb; font-size: .82rem; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.table tr:hover td { background: #f9fafb; }
.desc-cell {
    max-width: 220px; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; color: var(--muted); font-size: .85rem;
}
@media (max-width: 640px) { .desc-cell { display: none; } }

/* ============================================================
   Badges
   ============================================================ */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 16px; border: none; border-radius: 8px;
    background: #e5e7eb; color: #111827; cursor: pointer; font-size: .92rem;
    font-weight: 500; text-decoration: none; transition: var(--transition);
    font-family: inherit;
}
.btn:hover { opacity: .9; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #d97706; }
.btn-block { width: 100%; display: block; text-align: center; }
.btn-sm { padding: 6px 10px; font-size: .8rem; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* Segmented control */
.seg {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    background: #f3f4f6; border: 1px solid var(--border);
    border-radius: 12px; padding: 5px; margin-top: 16px;
}
.seg-btn {
    padding: 11px 8px; border: none; border-radius: 9px; background: transparent;
    font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; transition: var(--transition);
}
.seg-btn.active { background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.12); color: var(--primary); }

/* ============================================================
   Forms
   ============================================================ */
.form label { display: block; font-size: .86rem; color: var(--muted); margin-bottom: 4px; margin-top: 12px; }
.form input, .form select, .form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: .95rem; background: #fff;
    font-family: inherit; transition: var(--transition);
}
.form input:focus, .form select:focus, .form textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: var(--focus-ring);
}
.form input[disabled], .form select[disabled] { background: #f9fafb; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Search input */
.search { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; min-width: 200px; }

/* ============================================================
   Unit picker (product forms)
   ============================================================ */
.unit-picker { display: flex; gap: 8px; align-items: stretch; }
.unit-picker select { flex: 1; min-width: 0; }
.unit-picker input { flex: 1; min-width: 0; cursor: pointer; background: #f9fafb; font-weight: 600; }
.unit-picker .btn { white-space: nowrap; height: auto; align-self: stretch; display: flex; align-items: center; }
@media (max-width: 480px) {
    .unit-picker { flex-direction: column; }
    .unit-picker .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Modal system
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(17,24,39,.55);
    display: none; align-items: center; justify-content: center;
    z-index: 200; padding: 16px; backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff; border-radius: 16px; width: 100%; max-width: 540px;
    max-height: 85vh; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,.28);
    animation: modalPop .18s ease;
}
@keyframes modalPop {
    from { transform: scale(.94); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 1.05rem; color: var(--primary-dark); }
.modal-close {
    border: none; background: transparent; font-size: 1.25rem; cursor: pointer;
    color: var(--muted); width: 34px; height: 34px; border-radius: 8px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #f3f4f6; color: var(--text); }
.modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }

/* Unit system modal */
.unit-line { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.unit-lbl { flex: 0 0 130px; font-weight: 600; font-size: .9rem; color: var(--text); }
.unit-line .sel-wrap { flex: 1; }
@media (max-width: 480px) {
    .unit-line { flex-direction: column; align-items: stretch; gap: 6px; }
    .unit-lbl { flex: none; }
}
.conv-box { display: flex; align-items: center; gap: 8px; flex: 1; }
.conv-text { font-size: .9rem; white-space: nowrap; }
.conv-input {
    width: 90px; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: .95rem; text-align: center;
}
.conv-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.unit-modal-hint { margin-top: 8px; font-size: .8rem; }

/* ============================================================
   POS / Sale page
   ============================================================ */
.pos { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.pos-panel { background: var(--card); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
@media (min-width: 900px) {
    .pos { grid-template-columns: 1.45fr 1fr; gap: 18px; }
    .pos-side { position: sticky; top: 84px; }
    .picker-row { grid-template-columns: 1fr 96px auto; align-items: end; }
    .btn-add { height: 46px; align-self: end; }
}

.pos-head { display: flex; gap: 12px; align-items: flex-start; }
.pos-head h3 { font-size: 1.05rem; color: var(--primary-dark); margin: 0; }
.pos-head p { margin: 0; }
.step-badge {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary); color: #fff; font-weight: 700;
    display: flex; align-items: center; justify-content: center; font-size: .95rem;
    box-shadow: 0 2px 6px rgba(14,124,91,.35);
}
.step-badge.alt { background: var(--accent); box-shadow: 0 2px 6px rgba(245,158,11,.35); }
.cart-head { margin-top: 22px; }

.pos-field { margin-top: 14px; }
.pos-field > label { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.pos-select, .pos-input {
    width: 100%; padding: 11px 13px; border: 1px solid var(--border);
    border-radius: 10px; font-size: .95rem; background: #fff;
    appearance: none; -webkit-appearance: none; transition: var(--transition);
    font-family: inherit;
}
.sel-wrap { position: relative; }
.sel-wrap::after { content: "▾"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pos-select:focus, .pos-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }

.picker-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.picker-qty label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.btn-add { align-self: start; }
.stock-hint { margin-top: 8px; font-size: .82rem; }

.cart-box { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.cart-line:last-child { border-bottom: none; }
.cart-line:hover { background: #f9fafb; }
.line-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.line-title { font-weight: 600; }
.line-meta { font-size: .78rem; color: var(--muted); }
.line-qty { display: flex; align-items: center; gap: 6px; }
.line-qty button {
    width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; cursor: pointer; color: var(--text); font-size: 1rem;
    line-height: 1; display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.line-qty button:hover { border-color: var(--primary); color: var(--primary); }
.line-qty b { min-width: 22px; text-align: center; }
.line-total { min-width: 74px; text-align: right; font-weight: 700; }
.line-x {
    width: 26px; height: 26px; border: none; border-radius: 50%; background: transparent;
    color: var(--muted); font-size: .95rem; cursor: pointer; line-height: 1; transition: var(--transition);
}
.line-x:hover { background: #fee2e2; color: var(--danger); }
.cart-empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: .9rem; }

.totals-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.grand-total { font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); line-height: 1.1; }
.totals-right { text-align: right; font-size: .9rem; }
.total-line { display: flex; gap: 18px; justify-content: space-between; margin-top: 2px; }
.due-amt { color: var(--success); }
.due-amt.due { color: var(--danger); }

.receipt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.receipt-head h3 { margin: 0; font-size: 1.02rem; color: var(--primary-dark); }
.receipt-head .muted { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.receipt-items { max-height: 260px; overflow-y: auto; }
.receipt-item { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .88rem; }
.receipt-item .ri-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-item .ri-qty { color: var(--muted); font-size: .8rem; }
.receipt-item .ri-amt { font-weight: 700; text-align: right; }
.receipt-total { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 2px solid var(--text); font-weight: 800; }
.receipt-total strong { color: var(--primary-dark); font-size: 1.15rem; }

.help-panel { margin-top: 16px; }
.help-box summary { cursor: pointer; font-weight: 600; color: var(--primary-dark); outline: none; }
.help-box ul { padding-left: 18px; margin-top: 8px; line-height: 1.9; color: var(--text); font-size: .9rem; }

/* ============================================================
   Customer Combobox (POS new sale)
   ============================================================ */
.cust-combo { position: relative; display: flex; flex-direction: column; gap: 6px; }
.cust-combo .pos-input { padding-right: 44px; width: 100%; }
.cust-clear {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    width: 24px; height: 24px; border-radius: 6px;
    display: none; align-items: center; justify-content: center;
    background: #f3f4f6; color: var(--muted); cursor: pointer;
    font-size: .85rem; line-height: 1; transition: var(--transition);
}
.cust-clear:hover { background: #e5e7eb; color: var(--text); }
.cust-clear:not([hidden]) { display: flex; }

.cust-listbox {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    max-height: 280px; overflow-y: auto; padding: 6px;
    display: none; flex-direction: column; gap: 2px;
}
.cust-listbox:not([hidden]) { display: flex; }
.cust-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 8px;
    cursor: pointer; transition: var(--transition);
    border: 1px solid transparent;
}
.cust-option:hover { background: #f0fdf4; border-color: rgba(14,124,91,.2); }
.cust-option[aria-selected="true"] { background: #ecfdf5; border-color: var(--primary); }
.cust-opt-name { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-opt-meta { font-size: .72rem; color: var(--muted); white-space: nowrap; background: #f3f4f6; padding: 2px 8px; border-radius: 999px; }
.cust-divider { height: 1px; background: var(--border); margin: 4px 0; }
.cust-add-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 10px 12px; border: none; background: transparent;
    color: var(--primary); font-weight: 600; font-size: .88rem; cursor: pointer;
    border-radius: 8px; transition: var(--transition);
}
.cust-add-btn:hover { background: #f0fdf4; }

.cust-selected {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 13px; border: 1px solid var(--primary);
    border-radius: 10px; background: #f0fdf4;
    animation: custPop .15s ease;
}
@keyframes custPop {
    from { transform: scale(.96); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.cust-sel-name { font-weight: 600; color: var(--primary-dark); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-sel-meta { font-size: .75rem; color: var(--muted); background: #dcfce7; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.cust-sel-remove {
    width: 26px; height: 26px; border-radius: 6px; border: none; background: transparent;
    color: var(--muted); cursor: pointer; font-size: .9rem; line-height: 1; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.cust-sel-remove:hover { background: #fee2e2; color: var(--danger); }
.cust-hint { margin-top: 4px; font-size: .75rem; }

/* ============================================================
   Avatar
   ============================================================ */
.profile-avatar { object-fit: cover; border-radius: 50%; }
.profile-avatar.placeholder { border: 3px dashed #cbd5e1; }

/* ============================================================
   Misc utilities
   ============================================================ */
.muted { color: var(--muted); font-size: .85rem; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.tx-center { text-align: center; }

/* ============================================================
   Print styles
   ============================================================ */
@media print {
    .topbar, .sidebar, .overlay, .hamburger, .btn, .pos-field,
    .cart-box .line-qty, .cart-box .line-x, .seg,
    .btn-add, .cust-combo, .cust-selected, .help-panel { display: none !important; }
    .main { margin: 0; padding: 0; max-width: none; }
    .card { box-shadow: none; border: 1px solid var(--border); break-inside: avoid; }
    .table { min-width: 0; }
    .page-head { margin-bottom: 8px; }
    body { background: #fff; }
    .receipt-total { border-top-color: #000; }
}