:root {
    color-scheme: light;
    --background: #eef3f7;
    --paper: #fff;
    --ink: #162b3d;
    --muted: #4e6477;
    --line: #dce6ee;
    --control-line: #adbfce;
    --soft: #edf4fa;
    --stripe: #f8fbfe;
    --accent: #086da6;
    --accent-hover: #055783;
    --accent-soft: #e7f4fc;
    --accent-line: #b9dcef;
    --banner: #0b73ad;
    --positive: #087647;
    --positive-hover: #065e37;
    --positive-soft: #e6f5ec;
    --caution: #714200;
    --caution-soft: #fff3d9;
    --caution-line: #e6b255;
    --nav-width: 224px;
    --nav-background: #082b40;
    --nav-hover: #103a53;
    --nav-selected: #135172;
    --nav-line: #2a5066;
    --nav-text: #e7f3fb;
    --nav-muted: #a9c7d8;
    --nav-accent: #63d7f5;
    --top-height: 56px;
    --panel-shadow: 0 2px 5px #1238520a, 0 8px 22px #12385206;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
body { margin: 0; min-width: 300px; background: var(--background); color: var(--ink); font: 16px/1.55 "Nirmala UI", "Noto Sans Bengali", system-ui, sans-serif; }
a { color: inherit; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; display: flex; flex-direction: column; padding: 23px 15px 16px; background: var(--paper); color: var(--ink); box-shadow: inset -1px 0 var(--line); overflow-y: auto; z-index: 1; }
.brand { display: flex; gap: 11px; align-items: center; margin: 0 7px 20px; color: var(--ink); text-decoration: none; font-size: 25px; font-weight: 750; line-height: 1.2; }
.brand small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.logo { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 12px; font-size: 21px; }
.sidebar nav { display: grid; gap: 12px; margin-bottom: 16px; }
.nav-group { display: grid; gap: 3px; }
.nav-caption { margin: 0 10px 3px; color: var(--muted); font-size: 13px; font-weight: 650; }
.sidebar nav a { display: flex; min-height: 39px; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: 15px; white-space: nowrap; }
.sidebar nav a:hover { background: var(--soft); }
.sidebar nav a[aria-current] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 3px 0 var(--accent); font-weight: 700; }
.nav-icon { display: inline-grid; width: 19px; place-items: center; font-family: system-ui, sans-serif; color: var(--muted); font-size: 18px; }
.sidebar nav a[aria-current] .nav-icon { color: inherit; }
.demo-pane { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding: 14px 4px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.demo-pane i { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--muted); }
.demo-pane button { padding: 3px 5px; color: var(--muted); background: transparent; border: 0; text-decoration: underline; }
main { margin-left: 230px; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 61px; padding: 8px clamp(16px, 3vw, 42px); background: var(--paper); border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 700; }
.today { display: flex; align-items: center; gap: 13px; color: var(--muted); font-weight: 500; }
.language-switch { display: flex; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--background); }
.language-switch a { padding: 3px 8px; border-radius: 5px; text-decoration: none; color: var(--muted); font-size: 14px; }
.language-switch a:hover { background: var(--paper); }
.language-switch a[aria-current] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.brand-name { min-width: 0; overflow-wrap: anywhere; font-size: 21px; }
.shop-logo, .settings-logo, .print-logo { object-fit: contain; background: #fff; }
.top-pos { min-height: 34px !important; padding: 5px 10px !important; }
.content { max-width: 1480px; margin: 0 auto; padding: 30px clamp(16px, 3vw, 42px) 42px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 24px; }
h1 { font-size: clamp(25px, 3vw, 35px); line-height: 1.3; letter-spacing: -.02em; }
.page-head p, .panel-head p { margin-top: 5px; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-dashboard .page-head { min-height: 124px; padding: 20px 24px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); border-radius: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 7px 14px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; line-height: 1.35; text-decoration: none; white-space: nowrap; }
.primary { color: #fff; background: var(--accent); }
.primary:hover { background: var(--accent-hover); }
.secondary { color: var(--ink); background: var(--paper); border-color: var(--control-line); }
.secondary:hover { background: var(--soft); }
.plain { background: transparent; color: var(--accent); }
.plain:hover:enabled { background: var(--accent-soft); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.stat { display: grid; align-content: start; gap: 7px; min-height: 145px; padding: 16px 17px; text-decoration: none; }
.stat:hover { border-color: var(--accent-line); background: var(--stripe); }
.stat > span:nth-child(2) { color: var(--muted); font-size: 14px; }
.stat strong { color: var(--accent); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat strong small { font-size: 15px; color: var(--muted); }
.stat-icon { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font: 22px/1 system-ui, sans-serif; }
.badge.amber { color: #794b15; background: #fbefd9; }
.badge.danger { color: #8a3129; background: #fae9e7; }
.badge.green { color: #235a44; background: #e0f1e8; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(225px, 1fr); gap: 18px; align-items: start; }
.summary-bar { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.summary-bar a { display: grid; gap: 5px; padding: 13px 17px; text-decoration: none; }
.summary-bar a + a { border-left: 1px solid var(--line); }
.summary-bar a:hover { background: var(--soft); }
.summary-bar span, .field-help { color: var(--muted); font-size: 14px; }
.summary-bar strong { font-size: 21px; }
.panel { margin-bottom: 18px; overflow: hidden; }
.panel-head { padding: 17px 19px 15px; }
.panel-head h2, .receipt h2 { font-size: 21px; line-height: 1.35; }
.panel-head p { font-size: 14px; }
.table-wrap { overflow-x: auto; }
.customer-summary th, .customer-summary td { padding-inline: 10px; }
.customer-summary th { white-space: normal; }
.customer-summary td:nth-child(2), .customer-summary td:nth-child(3), .customer-summary td:nth-child(5) { min-width: 8em; overflow-wrap: anywhere; }
.customer-summary td:last-child { white-space: nowrap; }
.customer-summary tfoot { background: var(--soft); font-weight: 700; }
.customer-summary tfoot th, .customer-summary tfoot td { border-top: 1px solid var(--line); border-bottom: 0; }
.customer-profile { margin-top: 16px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
thead th { background: var(--soft); color: var(--muted); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td small, .stock-line small, .receipt-id small { display: block; color: var(--muted); font-size: 13px; }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ref { color: var(--ink); font-weight: 700; }
a.ref { color: var(--accent); }
a.ref { text-underline-offset: 3px; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; white-space: nowrap; font-size: 13px; font-weight: 700; }
.stock-line { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 0 19px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.stock-line strong, .stock-line small { display: block; }
.panel-link { display: inline-block; margin: 13px 19px 17px; font-size: 15px; color: var(--accent); font-weight: 700; text-underline-offset: 4px; }
.quick { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.quick > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; }
.filters, .actions { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.filters { padding: 15px 19px; }
.panel-head + .filters { padding-top: 0; }
.filters .push { margin-left: auto; }
.form-body { padding: 0 19px 19px; }
.form-body > .button { margin-top: 18px; }
.fields { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.fields.three { grid-template-columns: 1.4fr 1fr 1fr; }
.span-all { grid-column: 1 / -1; }
label { display: grid; gap: 5px; color: var(--ink); font-size: 15px; font-weight: 650; }
input:not([type=hidden],[type=checkbox]), select { min-width: 0; width: 100%; min-height: 42px; padding: 7px 9px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--paper); color: var(--ink); font-weight: 500; }
.check { display: flex; align-items: center; gap: 6px; min-height: 42px; }
.check input { accent-color: var(--accent); }
.narrow { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); align-items: start; gap: 15px; }
summary { padding: 15px 19px; font-weight: 700; }
.item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 22px 0 10px; }
h3 { font-size: 17px; }
.sale-row { display: grid; grid-template-columns: minmax(120px, 2fr) 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 9px; }
.remove { min-width: 39px; padding-inline: 6px; }
.totals-fields { margin-top: 16px; align-items: end; }
.form-total { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 13px; margin-top: 12px; background: var(--soft); border-radius: 8px; }
.form-total strong { font-size: 21px; }
.form-total[data-document-total] { display: grid; grid-template-columns: 1fr auto 1fr auto; }
.form-total[data-document-total] span:nth-of-type(2) { justify-self: end; padding-left: 12px; }
.ledger-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 19px; color: var(--ink); background: var(--soft); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.document-actions { margin-bottom: 17px; }
.field-help { margin-top: 12px; }
.document-payment { display: flex; flex-wrap: wrap; gap: 9px 22px; }
.settings-layout { max-width: 1020px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; align-items: start; }
.settings-layout > .panel { margin-bottom: 0; }
.settings-layout > .panel:first-of-type { grid-row: span 2; }
.settings-controls { display: grid; align-items: start; gap: 7px; }
.settings-controls .ref { margin-top: 5px; }
.settings-save { grid-column: 1 / -1; }
.settings-layout + .panel { margin-top: 18px; }
.setup-shell { max-width: 700px; margin: 0 auto; padding: 34px 16px; }
.setup-shell header { margin-bottom: 18px; }
.setup-brand { color: var(--accent); font-weight: 750; margin-bottom: 5px; }
.logo-field, .language-options { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.settings-logo { width: 65px; height: 65px; border: 1px solid var(--line); border-radius: 8px; }
.logo-field label { flex: 1; min-width: 0; }
.logo-field small { color: var(--muted); }
.language-options { margin-top: 5px; }
.print-brand { display: flex; align-items: center; gap: 12px; margin: 16px 19px 0; padding-bottom: 11px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.print-brand strong { font-size: 19px; }
.print-brand div div { font-size: 13px; color: var(--muted); }
.print-logo { width: 55px; height: 46px; }
.receipt .print-brand { margin: 0 0 12px; }
.page-invoice .signature, .page-purchase-detail .signature { display: none; }
.density-compact .content { padding-top: 19px; }
.density-compact th, .density-compact td { padding-block: 6px; }
.density-compact .panel-head { padding-block: 11px; }
.notice, .error { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 10px 14px; margin-bottom: 15px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
.empty, .panel-note { padding: 14px 19px; color: var(--muted); }
.positive { color: var(--accent); font-weight: 700; }
.negative { color: #515151; font-weight: 700; }
.report-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin: 0 19px 18px; background: var(--line); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.aging-strip { grid-template-columns: repeat(5,minmax(0,1fr)); }
.report-strip > div { display: grid; gap: 3px; padding: 10px 13px; background: #fafafa; font-size: 14px; }
.report-strip strong { font-size: 19px; }
.receipt { max-width: 645px; padding: 25px; }
.receipt-top { display: flex; justify-content: space-between; gap: 12px; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.receipt-brand { display: block; margin-bottom: 4px; color: var(--accent); font-weight: 700; }
.receipt-id { text-align: right; }
.receipt dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.receipt dt { color: var(--muted); font-size: 14px; }
.receipt dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.signature { width: max-content; max-width: 100%; margin: 65px 0 0 auto; padding: 7px 8px 0; text-align: center; border-top: 1px solid var(--muted); color: var(--muted); }
.pos-workspace { overflow: visible; border-top: 3px solid var(--accent-line); }
.pos-details { max-width: 100%; }
.pos-customer-info { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: 17%; color: var(--muted); overflow-wrap: anywhere; }
.pos-customer-info strong { color: var(--ink); }
.pos-items-section, .pos-summary, .pos-history, .pos-payment { padding: 15px clamp(12px, 2.5vw, 26px); border-top: 1px solid var(--line); }
.pos-lookup { position: relative; max-width: 850px; margin: 0 auto 12px; }
.pos-lookup .input-group { align-items: stretch; }
.pos-product-dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); }
.pos-product-dialog::backdrop { background: #082b4066; }
.pos-search { position: relative; flex: 1; }
.pos-search input { padding-inline: 32px !important; }
.search-mark { position: absolute; top: 11px; left: 11px; height: 11px; width: 11px; border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-mark::after { content: ""; position: absolute; width: 5px; height: 1.5px; background: var(--muted); transform: rotate(45deg); bottom: -2px; right: -3px; }
kbd { font: 12px/1.2 system-ui, sans-serif; padding: 3px 6px; border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }
.pos-search kbd { position: absolute; top: 7px; right: 8px; color: var(--muted); pointer-events: none; }
.pos-matches { position: absolute; inset: calc(100% + 4px) 0 auto; max-height: min(300px, 45vh); overflow-y: auto; z-index: 2; background: var(--paper); border: 1px solid var(--control-line); border-radius: 6px; box-shadow: 0 6px 18px #22282324; }
.pos-matches button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--paper); color: var(--ink); text-align: left; }
.pos-matches button:hover:enabled, .pos-matches button:focus-visible { background: var(--accent-soft); outline-offset: -2px; }
.pos-matches button small { display: block; color: var(--muted); }
.pos-line-heading { padding-inline: 0; border-bottom: 0; }
.pos-line-heading small { color: var(--muted); font-weight: 500; font-size: 12px; margin-inline-start: 6px; }
.pos-items-table { min-width: 620px; }
.pos-items-table th, .pos-items-table td, .pos-history th, .pos-history td { border: 1px solid var(--line); }
.pos-items-table .empty, .pos-history .empty { text-align: center; }
.qty-control { display: grid; grid-template-columns: 30px minmax(60px, 86px) 30px; border: 1px solid var(--control-line); border-radius: 5px; overflow: hidden; width: max-content; }
.qty-control button { border: 0; color: var(--accent); background: var(--soft); font: 19px/1 system-ui, sans-serif; }
.qty-control input { appearance: textfield; min-height: 32px !important; padding: 4px !important; text-align: center; border: 0 !important; border-radius: 0 !important; }
.qty-control input::-webkit-inner-spin-button { appearance: none; }
.qty-control :focus-visible { outline-offset: -3px; }
.pos-summary, .pos-payment-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(235px, .8fr); gap: 12px clamp(15px, 4vw, 60px); align-items: start; }
.pos-summary-totals { margin: 0; padding: 8px 12px; align-self: start; border: 1px solid var(--line); border-radius: 6px; background: var(--stripe); }
.pos-summary-totals div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; }
.pos-summary-totals dd { margin: 0; font-weight: 700; text-align: right; white-space: nowrap; }
.pos-summary-totals [data-pos-total] { color: var(--accent); font-size: 17px; }
.pos-payment .panel-head, .pos-history .panel-head { padding-inline: 0; }
.pos-feedback { color: var(--muted); margin-top: 10px; }
.pos-save { display: flex; justify-content: flex-end; margin-top: 12px; }
.pos-submit { display: flex; justify-content: space-between; gap: 10px; }
@media (max-width: 1000px) {
    .sidebar { width: 205px; }
    main { margin-left: 205px; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 0; }
    .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .pos-summary, .pos-payment-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .sidebar { position: static; width: auto; padding: 12px; box-shadow: inset 0 -1px var(--line); }
    .brand { margin: 0 2px 10px; font-size: 20px; }
    .logo { width: 35px; height: 35px; }
    .sidebar nav { display: flex; overflow-x: auto; padding-bottom: 4px; }
    .nav-group { display: contents; }
    .nav-caption { display: none; }
    .sidebar nav a { padding: 7px 9px; }
    .demo-pane { margin-top: 7px; padding-top: 6px; }
    main { margin-left: 0; }
    .topbar { min-height: 45px; }
    .content { padding-top: 18px; }
    .page-head { align-items: start; flex-wrap: wrap; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .report-strip, .aging-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .fields.three { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .fields.three label:first-child { grid-column: 1/-1; }
    .pos-customer-info { margin-left: 0; }
    .page-dashboard .page-head { min-height: auto; padding: 15px; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-layout > .panel:first-of-type { grid-row: auto; }
    .today { gap: 6px; }
    .today time { display: none; }
}
@media (max-width: 425px) {
    .sale-row { grid-template-columns: 1fr 1fr auto; }
    .sale-row label:first-child { grid-column: 1/-1; }
    .fields, .fields.three { grid-template-columns: 1fr; }
    .stats { gap: 9px; }
    .stat { padding: 12px; min-height: 84px; }
    .summary-bar { grid-template-columns: 1fr; }
    .summary-bar a + a { border-top: 1px solid var(--line); border-left: 0; }
    .form-total[data-document-total] { grid-template-columns: 1fr auto; }
    .form-total[data-document-total] span:nth-of-type(2) { justify-self: start; padding-left: 0; }
    .top-pos { display: none; }
}
@media print {
    .customer-summary { page: customer-summary; }
    .customer-summary tfoot { display: table-row-group; }
    .customer-summary table { font-size: 8.5pt; }
    .customer-summary th, .customer-summary td { padding: 5px; }
    .customer-summary td:nth-child(2), .customer-summary td:nth-child(3), .customer-summary td:nth-child(5) { min-width: 0; }
    body { min-width: 0; background: #fff; font-size: 12pt; color: #111; }
    .sidebar, .topbar, .page-head, .notice, .no-print { display: none !important; }
    main, .content { margin: 0; padding: 0; }
    .print-area { max-width: none; border: 0; border-radius: 0; overflow: visible; }
    .table-wrap { overflow: visible; }
    th, td { padding: 8px; }
    tr { break-inside: avoid; }
    .report-strip { grid-template-columns: repeat(4,minmax(0,1fr)); }
    a, a.ref { text-decoration: none; color: inherit; }
    .page-invoice .signature, .page-purchase-detail .signature { display: block; margin-right: 19px; }
    .print-brand { margin-top: 0; break-inside: avoid; }
}

body { font-size: 14px; }
textarea { font: inherit; }
.sidebar { width: var(--nav-width); padding: 0; background: var(--nav-background); color: var(--nav-text); box-shadow: none; z-index: 4; }
.brand { min-height: var(--top-height); margin: 0; padding: 8px 16px; gap: 10px; border-bottom: 1px solid var(--nav-line); background: #094568; color: white; }
.brand .logo { width: 30px; height: 30px; border-radius: 6px; font-size: 16px; }
.brand .logo:not(.shop-logo) { background: var(--nav-accent); color: var(--nav-background); }
.brand-name { font-size: 19px; }
.sidebar nav { display: grid; gap: 2px; margin: 0; padding: 11px 8px; overflow: visible; }
.nav-group { display: block; }
.sidebar nav a, .sidebar nav summary { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; color: var(--nav-text); font-size: 14px; font-weight: 550; line-height: 1.35; border-radius: 5px; white-space: normal; }
.sidebar summary { list-style: none; }
.sidebar summary::-webkit-details-marker, .action-menu summary::-webkit-details-marker { display: none; }
.sidebar summary::after { content: '›'; margin-left: auto; font-size: 17px; color: var(--nav-muted); }
.sidebar details[open] > summary::after { transform: rotate(90deg); }
.sidebar nav a:hover, .sidebar nav summary:hover, .sidebar details[open] > summary { background: var(--nav-hover); }
.sidebar nav a[aria-current] { color: #fff; background: var(--nav-selected); box-shadow: inset 3px 0 #ffc15b; }
.sidebar .nav-icon { color: var(--nav-accent); width: 16px; }
.sidebar :focus-visible { outline-color: var(--nav-accent); }
.nav-entries { margin: 3px 0 5px 18px; border-left: 1px solid var(--nav-line); }
.sidebar .nav-entries a { min-height: 31px; padding: 6px 10px; font-size: 13px; }
.demo-pane { padding: 12px 14px 15px; border-color: var(--nav-line); color: var(--nav-muted); }
.demo-pane button { color: inherit; }
.demo-pane i { background: var(--nav-accent); }
main { min-height: 100vh; margin-left: var(--nav-width); }
.topbar { min-height: var(--top-height); padding: 0 20px; border-bottom-color: var(--accent-hover); background: var(--banner); color: white; }
.topbar :focus-visible { outline-color: white; }
.topbar .action-menu > div :focus-visible { outline-color: var(--accent); }
.today { gap: 15px; color: #edf7fd; font-size: 13px; }
.session-label { border-left: 1px solid #ffffff59; padding-left: 14px; }
.language-switch { border: 0; background: transparent; padding: 0; }
.language-switch a { padding: 4px 8px; color: white; }
.language-switch a:hover, .language-switch a[aria-current] { background: var(--accent-soft); color: var(--accent-hover); }
.top-tools { display: flex; align-items: center; gap: 10px; }
.menu-toggle, .quick-add summary { display: grid; place-items: center; height: 34px; width: 36px; padding: 0; border: 1px solid #ffffff66; border-radius: 6px; color: white; background: #075889; }
.menu-toggle:hover { background: #064a72; }
.quick-add summary { background: #066e3d; font-size: 20px; font-weight: 600; }
.quick-add summary:hover { background: var(--positive-hover); }
.nav-collapsed .sidebar { display: none; }
.nav-collapsed main { margin-left: 0; }
.content { max-width: 1740px; padding: 24px clamp(16px, 2.3vw, 36px) 40px; }
.page-head { min-height: 32px; margin-bottom: 16px; justify-content: flex-start; gap: 12px; }
.page-head h1 { font-size: clamp(23px, 2.6vw, 29px); font-weight: 650; }
.page-head p { margin-top: 2px; font-size: 13px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 12px; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page-dashboard .page-head { border-left: 4px solid var(--accent); min-height: 100px; justify-content: space-between; background: linear-gradient(110deg, var(--paper) 36%, var(--accent-soft)); }
.button { min-height: 36px; border-radius: 7px; padding: 5px 13px; font-size: 13px; font-weight: 650; }
.panel, .stat { border-radius: 10px; box-shadow: var(--panel-shadow); }
.panel-head { padding: 13px 16px; }
.panel-head h2, .records-head h2 { font-size: 17px; font-weight: 650; }
.stat { min-height: 125px; }
.stat:nth-child(2) .stat-icon { color: var(--positive); background: var(--positive-soft); }
.stat-icon.amber { color: var(--caution); background: var(--caution-soft); }
table { font-size: 13px; }
th, td { padding: 9px 12px; }
thead th { background: var(--soft); color: var(--ink); }
tbody tr:nth-child(even) { background: var(--stripe); }
tbody tr:hover { background: var(--accent-soft); }
input:not([type=hidden],[type=checkbox]), select, textarea { min-height: 35px; border-radius: 5px; }
textarea { min-width: 0; width: 100%; padding: 7px 9px; border: 1px solid var(--control-line); background: var(--paper); color: var(--ink); resize: vertical; }
input[readonly] { background: var(--soft) !important; }
.entry-panel, .list-panel { border-top: 3px solid var(--accent-line); }
.entry-panel > .panel-head { border-bottom: 1px solid var(--line); }
.form-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 34px; width: min(100%, 1340px); padding: 22px clamp(15px, 3vw, 44px); }
.form-lines.single-column { grid-template-columns: minmax(0, 1fr); width: min(100%, 720px); }
.form-lines > label, .form-line { display: grid; grid-template-columns: minmax(100px, 36%) minmax(0, 1fr); align-items: center; gap: 13px; font-size: 13px; }
.form-lines > label > span, .form-line > label { text-align: right; }
.form-lines input[type=checkbox] { justify-self: start; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.input-group { display: flex; gap: 5px; min-width: 0; }
.input-group select { flex: 1; }
.form-actions { display: flex; justify-content: center; gap: 16px; border-top: 1px solid var(--line); padding: 11px 15px; background: var(--stripe); }
.form-actions > * { width: min(36%, 216px); }
.confirm { background: var(--positive); color: #fff; }
.confirm:hover { background: var(--positive-hover); }
.cancel { background: var(--caution-soft); color: var(--caution); border-color: var(--caution-line); }
.cancel:hover { background: #ffe8b5; }
.report-results { margin-top: 24px; overflow: visible; }
.records-head, .list-toolbar, .list-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; }
.records-head, .list-toolbar { border-bottom: 1px solid var(--line); }
.list-tools, .list-filter, .list-toolbar label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.list-toolbar label select { width: auto; }
.list-toolbar label input { width: min(42vw, 210px); }
.list-filter select { max-width: min(55vw, 280px); }
.list-filter .check { min-height: auto; }
.list-panel { overflow: visible; }
.list-panel .table-wrap { margin: 0 14px; }
.list-panel th, .list-panel td, .report-results th, .report-results td { border: 1px solid var(--line); }
.row-button { background: var(--accent-soft); color: var(--accent-hover); }
.row-button:hover { background: var(--accent-line); }
.report-results thead th { white-space: normal; background: var(--accent-soft); color: var(--accent-hover); }
.report-results tfoot { background: var(--soft); font-weight: 700; }
.report-duration { padding: 10px 14px; color: var(--muted); font-size: 13px; }
.report-duration strong { margin-left: 4px; color: var(--ink); }
.report-profile { display: grid; grid-template-columns: minmax(125px, auto) 1fr; margin: 0; border-top: 1px solid var(--line); font-size: 13px; }
.report-profile > * { margin: 0; padding: 7px 14px; border-bottom: 1px solid var(--line); }
.report-profile dt { background: var(--stripe); }
.report-print-title { display: none; }
.report-results .empty, .list-panel .empty { text-align: center; padding: 16px; color: var(--muted); }
.report-results td a.ref, .list-panel td a.ref { white-space: nowrap; }
.action-menu { position: relative; }
.action-menu > summary { list-style: none; }
.action-menu > div { position: absolute; z-index: 3; min-width: 130px; top: calc(100% + 4px); right: 0; padding: 4px; border: 1px solid var(--control-line); border-radius: 5px; background: var(--paper); color: var(--ink); box-shadow: 0 6px 20px #22282324; }
.quick-add > div { right: auto; left: 0; min-width: 155px; }
.action-menu > div > * { display: block; width: 100%; padding: 6px 9px; border: 0; border-radius: 3px; background: transparent; color: var(--ink); text-align: left; text-decoration: none; white-space: nowrap; }
.action-menu > div > :hover { background: var(--accent-soft); }
.customer-entry { max-width: 1200px; border-top-color: var(--accent); }
.customer-entry > .panel-head { padding: 16px clamp(16px, 3vw, 30px); background: var(--stripe); }
.customer-form-section { padding: 17px clamp(16px, 3vw, 30px); }
.customer-form-section + .customer-form-section { border-top: 1px solid var(--line); }
.customer-form-section > h3 { margin-bottom: 12px; padding-left: 9px; border-left: 3px solid var(--accent-line); color: var(--accent-hover); font-size: 15px; }
.customer-form-section .fields { gap: 12px 24px; }
.customer-form-section label { align-content: start; gap: 4px; font-size: 13px; }
.customer-form-section :is(input, textarea) { padding-inline: 10px; min-height: 39px; }
.customer-form-section .required-indicator { color: #9e3f27; }
.customer-entry .form-actions { justify-content: flex-end; padding: 13px clamp(16px, 3vw, 30px); }
.customer-entry .form-actions > * { width: min(45%, 145px); }
.login-page {
    display: grid;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(16px, 4vw, 44px);
    background: radial-gradient(ellipse at 12% 0%, var(--accent-soft), transparent 65%), var(--background);
}
.login-shell {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    width: min(100%, 890px);
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 22px 70px #0e304b22;
}
.login-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
    padding: clamp(28px, 5vw, 52px);
    overflow: hidden;
    color: white;
    background: linear-gradient(145deg, var(--nav-background) 15%, #0b5278);
}
.login-brand::after {
    position: absolute;
    z-index: -1;
    right: -132px;
    bottom: -170px;
    width: 335px;
    aspect-ratio: 1;
    border: 1px solid #79dcfa42;
    border-radius: 50%;
    box-shadow: 0 0 0 34px #79dcfa18, 0 0 0 70px #79dcfa0d;
    content: "";
}
.login-wordmark { display: flex; align-items: center; gap: 12px; font-size: clamp(25px, 3.2vw, 34px); font-weight: 750; line-height: 1.15; }
.login-wordmark img { width: 48px; height: 48px; flex: 0 0 auto; object-fit: contain; border-radius: 9px; background: #fff; }
.login-brand p { margin-top: 15px; color: #d4e9f6; font-size: 15px; }
.login-card { align-self: center; min-width: 0; padding: clamp(24px, 5vw, 55px); }
.login-card h1 { font-size: clamp(27px, 3.4vw, 36px); }
.login-card header p { margin: 5px 0 23px; color: var(--muted); }
.login-card .notice, .login-card .error { margin: 0 0 16px; }
.login-fields { display: grid; gap: 6px; }
.login-fields label { font-size: 13px; }
.login-fields input:not([type=hidden]) { min-height: 44px; padding-inline: 12px; border-radius: 8px; }
.login-fields label[for=login-password] { margin-top: 9px; }
.login-password { position: relative; }
.login-password:has(button:not([hidden])) input { padding-right: 70px; }
.login-password button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 34px; }
.login-submit { width: 100%; min-height: 44px; margin-top: 13px; }
@media (max-width: 680px) {
    .login-shell { grid-template-columns: minmax(0, 1fr); max-width: 440px; }
    .login-brand { min-height: 0; padding: 23px 24px; }
    .login-brand p { margin-top: 9px; }
}
.invoice-document {
    --invoice-rule: #514476;
    --invoice-blue: #1c387e;
    --invoice-tint: #edf0fa;
    max-width: 910px;
    padding: clamp(16px, 3vw, 32px);
    color: #171923;
    overflow-wrap: anywhere;
}
.invoice-header { margin-bottom: 26px; }
.invoice-header .print-brand {
    position: relative;
    justify-content: center;
    min-height: 80px;
    margin: 0;
    padding: 0 0 0 102px;
    border: 0;
    text-align: center;
}
.invoice-header .print-brand:not(:has(.print-logo)) { padding-left: 0; }
.invoice-header .print-logo { position: absolute; left: 0; width: 80px; height: 80px; }
.invoice-header .print-brand strong { display: block; margin-bottom: 4px; color: var(--invoice-blue); font-size: clamp(18px, 2.5vw, 26px); line-height: 1.2; }
.invoice-header .print-brand div div { color: inherit; }
.invoice-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 15px; border: 1px solid var(--invoice-rule); }
.invoice-parties section { min-width: 0; padding: 11px 14px; }
.invoice-parties section + section { border-left: 1px solid var(--invoice-rule); }
.invoice-parties h3, .invoice-payment h3 { width: fit-content; margin-bottom: 7px; padding-inline: 4px; background: var(--invoice-tint); font-size: 1em; }
.invoice-customer-id { color: var(--muted); font-size: .85em; }
.invoice-fields { margin: 0; }
.invoice-fields > div { display: flex; align-items: baseline; gap: .35em; }
.invoice-fields dt { flex: 0 1 auto; font-weight: 650; }
.invoice-fields dt::after { content: ":"; }
.invoice-fields dd { min-width: 0; margin: 0; }
.invoice-document .invoice-items table { min-width: 670px; font-size: 13px; }
.invoice-document .invoice-items th, .invoice-document .invoice-items td {
    padding: 5px 6px;
    border: 1px solid var(--invoice-rule);
    background: #fff;
    color: inherit;
    vertical-align: top;
}
.invoice-document .invoice-items th { overflow-wrap: normal; white-space: normal; }
.invoice-document .invoice-items thead th, .invoice-document .invoice-items .invoice-grand-total > * { background: var(--invoice-tint); }
.invoice-document .invoice-items .invoice-sequence { width: 2.2em; text-align: center; }
.invoice-document .invoice-items tbody:not(.invoice-totals) td:nth-child(2) { width: 31%; }
.invoice-document .invoice-items td small { font-size: .85em; }
.invoice-document .invoice-items .invoice-sale-note { height: 2.5em; white-space: pre-line; }
.invoice-payment { margin-top: 15px; }
.invoice-document .panel-head { padding-inline: 0; }
.invoice-signatures { display: flex; justify-content: space-around; gap: 14px; margin-top: 55px; }
.invoice-signatures span { width: 36%; padding-top: 4px; border-top: 1px solid var(--invoice-rule); text-align: center; color: var(--invoice-blue); }
@media (max-width: 1000px) { :root { --nav-width: 196px; } }
@media (max-width: 700px) {
    .sidebar { position: static; width: auto; }
    .sidebar nav { max-height: 45vh; overflow-y: auto; }
    main { margin-left: 0; }
    .topbar { padding-inline: 12px; }
    .content { padding-inline: 12px; }
    .form-lines { grid-template-columns: minmax(0, 1fr); }
    .page-head .breadcrumb { display: none; }
    .session-label { display: none; }
}
@media (max-width: 425px) {
    .form-lines > label, .form-line { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .form-lines > label > span, .form-line > label { text-align: left; }
    .form-actions > * { width: 50%; }
}
@media screen and (max-width: 700px) {
    .report-results th, .list-panel th { min-width: 78px; }
    .report-results th:first-child { min-width: 34px; }
}
@media screen and (max-width: 480px) {
    .invoice-parties { grid-template-columns: 1fr; }
    .invoice-parties section + section { border-top: 1px solid var(--invoice-rule); border-left: 0; }
    .invoice-header .print-brand { flex-direction: column; gap: 6px; padding: 0; }
    .invoice-header .print-logo { position: static; width: 62px; height: 62px; }
}
@media print {
    .report-results, .list-panel { page: customer-summary; }
    .report-results .records-head { display: none; }
    .report-print-title { display: block; }
    .report-print-title h2 { margin: 8px 14px 0; font-size: 15pt; }
    .report-results table, .list-panel table { font-size: 8pt; }
    .report-results th, .report-results td, .list-panel th, .list-panel td { padding: 5px; }
    .report-results thead th { color: #111; background: #f2f2f2; }
    .report-results tfoot { display: table-row-group; }
    .list-panel [data-export-skip]:not([data-list-empty]) { display: none; }
    .list-panel tr[data-filter-match]:not([data-filter-match="true"]) { display: none; }
    .list-panel tr[data-filter-match="true"][hidden] { display: table-row !important; }
    main, .nav-collapsed main { margin: 0; min-height: 0; }
    .content { padding: 0; }
    .invoice-document { padding: 0; margin: 0; box-shadow: none; font-size: 9pt; print-color-adjust: exact; }
    .invoice-header, .invoice-parties, .invoice-payment, .invoice-signatures, .invoice-totals { break-inside: avoid; }
    .invoice-header { margin-bottom: 8mm; }
    .invoice-header .print-brand { min-height: 17mm; padding-left: 22mm; }
    .invoice-header .print-logo { width: 17mm; height: 17mm; }
    .invoice-header .print-brand strong { font-size: 15pt; }
    .invoice-header .print-brand div div { font-size: 9pt; }
    .invoice-parties { margin-bottom: 4mm; }
    .invoice-parties section { padding: 2mm 3mm; }
    .invoice-document .invoice-items table { min-width: 0; font-size: 8pt; }
    .invoice-document .invoice-items th, .invoice-document .invoice-items td { padding: 1mm; }
    .invoice-document .invoice-items th { font-size: 7.5pt; }
    .invoice-document .invoice-items tbody:not(.invoice-totals) td:nth-child(2) { width: 28%; }
    .invoice-document thead { display: table-header-group; }
    .invoice-document .invoice-returns td { overflow-wrap: anywhere; }
    .invoice-signatures { margin-top: 17mm; }
    .page-invoice:has(.invoice-document) .content > .error { display: none; }
}
