/* SN Billing System — main styles */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6fa; color: #1a202c; font-size: 14px; line-height: 1.5;
}
a { color: #2563eb; text-decoration: none; }
h1,h2,h3 { margin: 0 0 .5em; font-weight: 600; }
.text-right { text-align: right; }
.text-danger { color: #dc2626; }
.no-print { }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px; background: #1e293b; color: #cbd5e1; flex-shrink: 0;
    position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto;
    transition: transform .25s; z-index: 100;
}
.main { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    display: flex; align-items: center; gap: 12px; padding: 14px 20px;
    background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 50;
}
.page-title { font-size: 18px; margin: 0; flex: 1; }
.user-badge { font-size: 12px; background: #eef2ff; color: #3730a3; padding: 4px 10px; border-radius: 20px; }
.menu-toggle { background: none; border: none; font-size: 22px; cursor: pointer; display: none; }
.content { padding: 20px; flex: 1; }

/* Sidebar */
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid #334155; }
.brand-logo { width: 36px; height: 36px; border-radius: 8px; background: #3b82f6; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.brand-text strong { display: block; color: #fff; font-size: 15px; }
.brand-text small { color: #94a3b8; font-size: 11px; }
.sidebar nav { padding: 10px 0; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: #cbd5e1; font-size: 14px; transition: background .15s; }
.nav-item:hover { background: #334155; color: #fff; }
.nav-item.active { background: #2563eb; color: #fff; }
.nav-icon { width: 22px; text-align: center; }
.nav-divider { padding: 12px 16px 4px; font-size: 11px; text-transform: uppercase; color: #64748b; letter-spacing: .08em; }
.sidebar-backdrop { display: none; }

/* Cards */
.card { background: #fff; border-radius: 12px; padding: 18px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.section-title { font-size: 16px; margin: 24px 0 12px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 12px; padding: 16px; border-left: 4px solid #2563eb; }
.stat-warn { border-left-color: #f59e0b; }
.stat-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .05em; }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 4px; }
.stat-sub { font-size: 12px; color: #94a3b8; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef2f7; }
.table th { font-size: 12px; text-transform: uppercase; color: #64748b; font-weight: 600; background: #f8fafc; }
.table th.text-right, .table td.text-right { text-align: right; }
.table tr:last-child td { border-bottom: 0; }
.table-compact th, .table-compact td { padding: 6px 8px; }
.table input { padding: 6px; border: 1px solid #cbd5e1; border-radius: 6px; width: 100%; max-width: 120px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; border-radius: 8px; border: 1px solid #cbd5e1;
    background: #fff; color: #1e293b; font-size: 13px; font-weight: 500;
    cursor: pointer; text-decoration: none; transition: all .15s;
}
.btn:hover { background: #f1f5f9; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { background: transparent; color: #64748b; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 8px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; background: #e2e8f0; color: #334155; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-partial { background: #fef3c7; color: #92400e; }
.badge-due { background: #fee2e2; color: #991b1b; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475569; font-weight: 500; }
.form input { padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475569; font-weight: 500; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
    padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px;
    font-size: 14px; background: #fff; color: #1e293b; font-family: inherit;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
    outline: 2px solid #93c5fd; border-color: #2563eb;
}
.form-section-title { font-size: 14px; color: #1e293b; margin: 8px 0 4px; font-weight: 600; grid-column: 1/-1; border-bottom: 1px solid #eef2f7; padding-bottom: 6px; }
.form-actions { display: flex; gap: 10px; margin-top: 10px; grid-column: 1 / -1; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-form { display: flex; gap: 8px; flex: 1; max-width: 380px; }
.search-form input { padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; flex: 1; font-size: 14px; }

/* Flashes */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-info { background: #dbeafe; color: #1e40af; }

/* POS / Search suggestions */
.pos-search-row { position: relative; }
.pos-search-row input { width: 100%; padding: 11px 14px; border: 2px solid #cbd5e1; border-radius: 10px; font-size: 15px; }
.pos-search-row input:focus { border-color: #2563eb; outline: none; }
.suggest-box {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08); max-height: 320px; overflow-y: auto;
    z-index: 20; margin-top: 4px;
}
.suggest-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.suggest-item:hover { background: #eff6ff; }
.suggest-item small { color: #94a3b8; margin-left: 6px; }

.add-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.add-row input { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 13px; flex: 1; min-width: 140px; }

/* Totals box */
.totals-box { background: #f8fafc; border-radius: 10px; padding: 14px 18px; }
.totals-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.totals-row.grand { border-top: 2px solid #cbd5e1; margin-top: 6px; padding-top: 10px; font-size: 17px; font-weight: 700; color: #1e293b; }

/* Invoice print view */
.invoice { max-width: 820px; margin: 0 auto; }
.invoice-header { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 12px; border-bottom: 2px solid #1e293b; margin-bottom: 14px; }
.invoice-header h2 { font-size: 22px; margin: 0; }
.invoice-header p { margin: 2px 0; font-size: 12px; color: #475569; }
.invoice-meta { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 13px; }
.invoice-footer { margin-top: 20px; padding-top: 14px; border-top: 1px dashed #cbd5e1; text-align: center; font-size: 12px; }
.signature { margin-top: 40px; padding-top: 6px; border-top: 1px solid #333; display: inline-block; min-width: 200px; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e3a8a, #3b82f6); padding: 20px; }
.login-card { background: #fff; border-radius: 16px; padding: 32px 28px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo { width: 60px; height: 60px; border-radius: 16px; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin: 0 auto 12px; }
.login-brand h1 { font-size: 20px; margin: 0; }
.login-brand p { color: #64748b; font-size: 13px; margin: 4px 0 0; }
.login-hint { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 18px; }
.login-hint code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }

/* Mobile */
@media (max-width: 860px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; }
    .form-grid { grid-template-columns: 1fr; }
    .content { padding: 14px; }
    .table th, .table td { padding: 8px; font-size: 13px; }
    .toolbar { flex-direction: column; align-items: stretch; }
    .search-form { max-width: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }

    /* Stack tables as cards */
    .table { display: block; }
    .table thead { display: none; }
    .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: 10px 0; border-bottom: 1px solid #eef2f7; }
    .table td { padding: 4px 0; border: none; }
    .table td::before {
        content: attr(data-label);
        display: inline-block;
        font-size: 11px; color: #64748b; text-transform: uppercase;
        margin-right: 8px; min-width: 85px;
    }
    .table td.text-right::before { float: none; }
    .actions { display: flex; gap: 6px; flex-wrap: wrap; }
}
/* Bill To tabs */
.bill-to-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tab-btn {
    padding: 8px 16px; border-radius: 8px; border: 1px solid #cbd5e1;
    background: #fff; font-size: 13px; cursor: pointer;
}
.tab-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Branding */
.brand-logo-img {
    width: 38px; height: 38px; border-radius: 8px; object-fit: cover;
}
.branding-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.branding-box {
    border: 1px dashed #cbd5e1; border-radius: 10px; padding: 14px;
    display: flex; flex-direction: column; gap: 8px; font-size: 13px;
}
.preview-img { max-width: 100%; max-height: 80px; border-radius: 6px; object-fit: contain; }
.preview-img.fav { max-width: 32px; max-height: 32px; }
.inline-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.inline-check input { width: auto; }

/* Filter form */
.filter-form { padding: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; align-items: end; }
.filter-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; }
.filter-grid input, .filter-grid select { padding: 8px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.filter-actions { display: flex; gap: 8px; align-self: end; }

/* Bill header summary */
.bill-header-summary {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 14px; flex-wrap: wrap;
}
.bill-to-summary {
    background: #f1f5f9; padding: 12px 16px; border-radius: 8px; font-size: 14px;
}

/* Invoice logo + signature */
.invoice-logo { max-height: 60px; margin-bottom: 8px; display: block; }
.invoice-signature { max-height: 50px; margin-bottom: 6px; }
.payment-history-print { margin-top: 16px; }
.payment-history-print h4 { margin: 0 0 6px; font-size: 13px; }
/* ==================== POS PAGE (clean redesign) ==================== */
.pos-page { display: flex; flex-direction: column; gap: 20px; max-width: 1200px; margin: 0 auto; }

/* ----- Mode switch (Customer / Store) ----- */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mode-card {
    position: relative;
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px;
    background: #fff; border: 2px solid #e5e9f0; border-radius: 16px;
    text-align: left; cursor: pointer;
    transition: all .18s ease;
    font-family: inherit;
}
.mode-card:hover { border-color: #cbd5e1; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15,23,42,.06); }
.mode-card.is-active {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff, #fff);
    box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}
.mode-icon {
    font-size: 26px;
    width: 52px; height: 52px;
    background: #f1f5f9; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .18s;
}
.mode-card.is-active .mode-icon { background: #2563eb; color: #fff; }
.mode-title { font-size: 15px; font-weight: 700; color: #0f172a; }
.mode-sub   { font-size: 12px; color: #64748b; margin-top: 2px; }
.mode-check {
    margin-left: auto;
    width: 24px; height: 24px; border-radius: 50%;
    background: #e2e8f0; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    transition: background .18s;
}
.mode-card.is-active .mode-check { background: #2563eb; }

/* ----- Section wrappers ----- */
.pos-section {
    background: #fff; border-radius: 16px;
    padding: 22px; box-shadow: 0 1px 3px rgba(15,23,42,.05);
}
.pos-section-head {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 18px;
}
.pos-section-head h2 {
    font-size: 17px; font-weight: 700; color: #0f172a; margin: 0;
}
.section-hint { font-size: 12px; color: #94a3b8; margin-left: auto; }
.step-badge {
    width: 30px; height: 30px; border-radius: 50%;
    background: #2563eb; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* ----- Field grid ----- */
.field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
    font-size: 12px; font-weight: 600; color: #475569;
    text-transform: uppercase; letter-spacing: .03em;
}
.field label .req { color: #ef4444; }
.field label .opt { color: #94a3b8; font-weight: 400; text-transform: none; letter-spacing: 0; }
.field input,
.field select,
.field textarea {
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none; border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.field-full { grid-column: 1 / -1; }

@media (max-width: 720px) {
    .field-grid { grid-template-columns: 1fr; }
}

/* ----- Store info card ----- */
.store-card {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px;
    background: #f8fafc; border: 1px dashed #cbd5e1;
    border-radius: 12px; padding: 16px 18px; margin-top: 14px;
}
.store-card-row { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.store-card-row span { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.store-card-row strong { color: #0f172a; font-size: 14px; }
.store-card-row.store-addr { grid-column: 1 / -1; }

/* ----- Product search bar ----- */
.product-search {
    position: relative; margin-bottom: 18px;
}
.product-search .ps-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    font-size: 16px; pointer-events: none;
}
.product-search input {
    width: 100%; padding: 14px 16px 14px 46px;
    border: 1.5px solid #e2e8f0; border-radius: 12px;
    font-size: 15px; font-family: inherit;
    background: #f8fafc;
    transition: all .15s;
}
.product-search input:focus {
    outline: none; border-color: #2563eb; background: #fff;
    box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}

/* Dropdown */
.ps-suggest {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 18px 40px rgba(15,23,42,.12);
    max-height: 360px; overflow-y: auto;
    z-index: 40;
}
.ps-item {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px 16px; width: 100%;
    background: transparent; border: none;
    border-bottom: 1px solid #f1f5f9;
    text-align: left; cursor: pointer; font-family: inherit;
}
.ps-item:last-child { border-bottom: none; }
.ps-item:hover { background: #eff6ff; }
.ps-item-name { font-size: 14px; font-weight: 600; color: #0f172a; }
.ps-item-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.ps-item-meta b { color: #0f172a; }
.ps-item-price { font-weight: 700; color: #2563eb; font-size: 14px; white-space: nowrap; }
.ps-empty { padding: 18px; text-align: center; color: #94a3b8; font-size: 13px; }

/* ----- Items grid (custom) ----- */
.items-grid { border: 1px solid #eef2f7; border-radius: 14px; overflow: hidden; }
.items-head {
    display: grid;
    grid-template-columns: minmax(200px, 2.4fr) 70px 100px 80px 110px 44px;
    gap: 0;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    font-size: 11px; font-weight: 700;
    color: #64748b; text-transform: uppercase; letter-spacing: .05em;
}
.items-head > div { padding: 12px 10px; }
.items-head .col-qty,
.items-head .col-rate,
.items-head .col-disc { text-align: center; }
.items-head .col-total { text-align: right; }

.items-row {
    display: grid;
    grid-template-columns: minmax(200px, 2.4fr) 70px 100px 80px 110px 44px;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}
.items-row:hover { background: #fafbff; }
.items-row:last-child { border-bottom: none; }
.items-row > div { padding: 10px; }

.cell-item .item-label { display: flex; flex-direction: column; gap: 3px; }
.il-name { font-size: 14px; font-weight: 600; color: #0f172a; }
.il-meta { font-size: 11px; color: #94a3b8; }
.il-meta b { color: #0f172a; }

.cell-qty, .cell-rate, .cell-disc { text-align: center; }
.cell-total {
    text-align: right; font-size: 14px; font-weight: 700; color: #0f172a;
    padding-right: 14px !important;
}
.cell-act { text-align: center; }

.items-row input {
    width: 100%; padding: 7px 8px;
    border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 13px; text-align: center;
    font-family: inherit; background: #fff;
    transition: border .15s;
}
.items-row input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.cell-item input { text-align: left; }

.row-del {
    width: 32px; height: 32px; border-radius: 8px;
    border: 1px solid #fecaca; background: #fff;
    color: #dc2626; font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all .15s;
}
.row-del:hover { background: #fee2e2; }

/* Inline suggest in blank row */
.inline-wrap { position: relative; }
.inline-list {
    min-width: 320px;
    top: calc(100% + 4px);
    z-index: 50;
}

/* Empty state */
.items-empty { text-align: center; padding: 50px 20px; color: #94a3b8; }
.ie-icon { font-size: 48px; margin-bottom: 10px; opacity: .55; }
.ie-title { font-size: 14px; font-weight: 600; color: #64748b; margin-bottom: 4px; }
.ie-sub { font-size: 12px; }

/* Add row */
.add-row-btn {
    width: 100%; padding: 14px;
    background: transparent; border: none;
    border-top: 1px dashed #cbd5e1;
    color: #2563eb; font-size: 13px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit;
    transition: background .15s;
}
.add-row-btn:hover { background: #eff6ff; }
.add-row-btn .plus { font-size: 18px; line-height: 1; }

/* Mobile: simplify item grid */
@media (max-width: 720px) {
    .items-head { display: none; }
    .items-row {
        grid-template-columns: 1fr 1fr;
        row-gap: 8px; padding: 12px;
        border-bottom: 1px solid #eef2f7;
    }
    .items-row > div { padding: 0; }
    .cell-item  { grid-column: 1 / -1; }
    .cell-qty::before  { content: "QTY"; }
    .cell-rate::before { content: "Rate"; }
    .cell-disc::before { content: "Disc %"; }
    .cell-qty::before, .cell-rate::before, .cell-disc::before {
        display: block; font-size: 10px; color: #94a3b8;
        text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px;
    }
    .cell-total { grid-column: 1 / -1; text-align: left; padding-top: 6px !important; }
    .cell-total::before { content: "Price "; color: #94a3b8; font-weight: 400; font-size: 12px; }
    .cell-act { position: absolute; right: 8px; }
    .inline-list { min-width: auto; }
}

/* ----- Summary ----- */
.pos-summary .summary-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
.summary-totals {
    background: #f8fafc; border-radius: 12px; padding: 18px;
    display: flex; flex-direction: column; gap: 12px;
}
.sum-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px; color: #475569;
}
.sum-row strong { color: #0f172a; font-size: 15px; }
.sum-row label { font-size: 13px; color: #475569; }
.round-input {
    width: 110px; padding: 6px 10px; text-align: right;
    border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit;
}
.round-input:focus { outline: none; border-color: #2563eb; }
.sum-row.grand {
    padding-top: 12px; border-top: 2px solid #e2e8f0; margin-top: 4px;
}
.sum-row.grand span { font-size: 14px; font-weight: 700; color: #0f172a; text-transform: uppercase; letter-spacing: .04em; }
.sum-row.grand strong { font-size: 24px; color: #2563eb; }

.summary-fields {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.summary-actions {
    display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap;
}
.btn-lg { padding: 14px 28px; font-size: 15px; font-weight: 600; }

@media (max-width: 860px) {
    .pos-summary .summary-grid { grid-template-columns: 1fr; }
    .summary-fields { grid-template-columns: 1fr; }
    .summary-actions { flex-direction: column; }
    .summary-actions .btn { width: 100%; }
}

@media print {
    .invoice-logo, .invoice-signature { display: block !important; }
}

/* Print */
@media print {
    .sidebar, .topbar, .no-print, .sidebar-backdrop { display: none !important; }
    .main { margin-left: 0; }
    .content { padding: 0; }
    .card { box-shadow: none; padding: 0; }
    .invoice { max-width: none; }
    body { background: #fff; font-size: 12px; }
}
