@charset "UTF-8";
/* VoxyCure dashboard visual system, with phone-first layouts and touch controls. */
@font-face { font-family:Poppins; font-style:normal; font-weight:400; font-display:swap; src:url('fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family:Poppins; font-style:normal; font-weight:500; font-display:swap; src:url('fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family:Poppins; font-style:normal; font-weight:600; font-display:swap; src:url('fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family:Poppins; font-style:normal; font-weight:700; font-display:swap; src:url('fonts/poppins-700.woff2') format('woff2'); }
:root {
  --bg:#f1f1f1; --paper:#fff; --ink:#303030; --muted:#616161; --line:#dedede;
  --primary:#303030; --blue:#005bd3; --blue-soft:#e8f1fb; --danger:#8e1f0b; --radius:8px; --mobile-nav-height:64px;
  font-family:Poppins,"Segoe UI",-apple-system,BlinkMacSystemFont,Arial,sans-serif; color:var(--ink); font-synthesis:none; -webkit-text-size-adjust:100%;
}
* { box-sizing:border-box; }
html { scroll-padding-block:90px 180px; }
body { margin:0; background:var(--bg); font-size:12px; line-height:1.45; }
a { color:inherit; text-decoration:none; }
button,input,select,textarea { font:inherit; }
a,button,input,select,textarea,summary { -webkit-tap-highlight-color:transparent; outline-offset:4px; }
a:focus-visible,button:focus-visible,summary:focus-visible { outline:3px solid #91b8ef; }
button { cursor:pointer; touch-action:manipulation; }
button:disabled { opacity:.4; cursor:default; }
h1,h2,h3,p { margin:0; }
h1 { font-size:19px; line-height:1.35; letter-spacing:-.5px; font-weight:700; }
h2 { font-size:14px; line-height:1.4; letter-spacing:-.2px; }
h3 { font-size:12px; }
.icon { width:21px; height:21px; flex-shrink:0; vertical-align:middle; }
[hidden] { display:none!important; }
.sr-only,.skip-link:not(:focus) { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.skip-link:focus { position:fixed; top:8px; left:8px; z-index:100; padding:12px 18px; background:white; border-radius:8px; }
/* Shell and phone navigation. */
.app-shell,.main-shell { min-width:0; min-height:100svh; }
.main-shell { padding-bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }




.inline-form { display:inline-flex; margin:0; }
.main-content { width:100%; max-width:1448px; min-width:0; margin:auto; padding:12px 12px 20px; min-height:calc(100svh - 180px); }
.main-content:focus { outline:none; }



.app-footer { padding:8px 12px 14px; font-size:10px; color:var(--muted); }
.app-footer>span:last-child { display:none; }
.footer-dot { padding:0 4px; }
.mobile-bottom-nav { position:fixed; inset:auto 0 0; z-index:30; display:flex; justify-content:space-around; gap:4px; min-height:var(--mobile-nav-height); padding:6px 8px calc(6px + env(safe-area-inset-bottom)); background:#ffffffed; backdrop-filter:blur(18px); border-top:1px solid var(--line); box-shadow:0 -2px 10px #00000005; }
.mobile-nav-item { min-width:0; flex:1; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:3px; border:0; background:none; color:#616161; padding:3px 2px; font-size:10px; font-weight:500; line-height:1.3; min-height:50px; }
.mobile-nav-item .icon { width:20px; height:20px; padding:5px 15px; box-sizing:content-box; border-radius:6px; }
.mobile-nav-item.active { color:var(--blue); }.mobile-nav-item.active .icon { background:var(--blue-soft); }
.input-focused .mobile-bottom-nav { display:none; }
.nav-backdrop { position:fixed; inset:0; z-index:40; border:0; background:#0f172a59; }
body.nav-open { overflow:hidden; }
.sidebar { position:fixed; inset:0 auto 0 0; z-index:50; width:min(300px,88vw); height:100dvh; padding:calc(14px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); background:#f7f7f7; border-right:1px solid var(--line); color:var(--ink); display:flex; flex-direction:column; gap:18px; overflow:hidden; transform:translateX(-100%); visibility:hidden; transition:transform .2s ease; }
.sidebar.is-open { transform:translateX(0); visibility:visible; }
.sidebar-header { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:6px; }
.brand { display:inline-flex; align-items:center; gap:10px; color:var(--ink); line-height:1.2; }
.brand-mark { display:grid; place-items:center; width:36px; height:38px; flex-shrink:0; border-radius:7px; background:var(--primary); color:white; }
.brand-mark .icon { width:24px; height:24px; }
.brand-copy { display:flex; flex-direction:column; min-width:0; gap:4px; }
.brand-copy strong { font-size:19px; letter-spacing:-.5px; font-weight:700; }
.brand-copy>span { font-size:10px; font-weight:400; color:var(--muted); }
.sidebar-menu { display:grid; flex:1; min-height:0; gap:8px; align-content:start; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.nav-group { border:1px solid var(--line); border-radius:8px; overflow:hidden; flex-shrink:0; }.nav-group h2 { display:flex; align-items:center; gap:8px; padding:8px 10px; background:white; font-size:11px; font-weight:600; letter-spacing:0; }.nav-group h2 .icon { width:17px; height:17px; }
.nav-group-links { display:grid; gap:2px; padding:4px; border-top:1px solid var(--line); }
.nav-link { display:flex; align-items:center; gap:10px; min-height:44px; padding:10px 8px; border-radius:6px; font-size:12px; color:var(--ink); font-weight:500; }
.nav-link .icon { width:18px; height:18px; }.nav-link:hover { background:#ebebeb; }.nav-link.active { background:var(--blue-soft); color:var(--blue); }
.sidebar-account { display:flex; flex-shrink:0; align-items:center; gap:9px; border:1px solid var(--line); border-radius:8px; padding:10px 8px; background:#fff; }.sidebar-account>div { min-width:0; flex:1; }.sidebar-account strong { display:block; font-size:12px; font-weight:600; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }.sidebar-account small { font-size:10px; color:var(--muted); }.sidebar-account .icon-button { width:36px; min-width:36px; padding:8px; }
/* Shared headings, controls and metrics. */
.page-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; margin-bottom:10px; }
.page-heading>div { min-width:0; }.page-heading h1 { font-size:17px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.heading-actions { display:flex; flex-wrap:nowrap; align-items:center; gap:4px; }.heading-actions:empty { display:none; }.heading-actions form { margin:0; }
.page-heading .heading-actions .btn { flex:0 0 auto; width:44px; min-width:44px; min-height:44px; padding:10px; font-size:0; gap:0; }






.btn { min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:6px; border:1px solid transparent; border-radius:8px; padding:7px 10px; font-size:11px; font-weight:600; line-height:1.35; text-align:center; white-space:normal; transition:background .15s; }
.btn .icon { width:16px; height:16px; }.btn-primary { background:var(--primary); border-color:var(--primary); color:white; }.btn-primary:hover { background:#1a1a1a; }
.btn-secondary { background:#fff; border-color:#dedede; color:#303030; }.btn-secondary:hover { background:#f7f7f7; }
.btn-danger { background:#fff1f0; border-color:#efd0cc; color:var(--danger); }.btn-danger:hover { background:#ffe4e1; border-color:#dfa69d; }.transaction-delete-form { margin:0; }
.delete-confirmation p { font-size:12px; line-height:1.6; color:var(--muted); }.confirmation-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:16px; }
.btn-quiet { color:#303030; background:#f7f7f7; border-color:#dedede; }.btn-small { min-height:44px; font-size:11px; padding:6px 8px; }.btn-full { width:100%; }
.icon-button { width:44px; height:44px; min-width:44px; display:inline-flex; justify-content:center; align-items:center; padding:10px; border:0; background:none; border-radius:8px; color:#616161; }
.icon-button .icon { width:20px; height:20px; }.icon-button:hover { color:var(--primary); background:#f7f7f7; }.subtle { color:var(--muted); }
.text-link { display:inline-flex; align-items:center; gap:6px; color:#005bd3; font-size:11px; min-height:44px; overflow-wrap:anywhere; }.text-link .icon { width:17px; height:17px; }.text-link:hover { text-decoration:underline; }
.section-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.section-title { display:flex; align-items:center; gap:10px; }.section-title h2 { font-size:13px; }.section-title .subtle { display:none; font-size:11px; }
.dashboard-controls { display:flex; justify-content:space-between; align-items:center; gap:6px; width:100%; }
.month-filter { display:flex; align-items:center; min-width:0; gap:3px; padding:2px; border:1px solid #dedede; border-radius:8px; background:#fff; }
.month-filter input { min-width:0; width:150px; border:0; padding:5px 8px; background:transparent; }.month-filter .btn { border:0; }
.stats-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.stat-card { box-shadow:0 1px 0 #0000000d; min-width:0; padding:10px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; min-height:0; }
.stat-label { display:flex; align-items:flex-start; justify-content:space-between; gap:6px; font-size:11px; font-weight:500; color:#616161; margin-bottom:6px; }
.stat-card strong { display:block; font-size:clamp(18px,4.8vw,21px); font-weight:600; line-height:1.3; letter-spacing:-.65px; overflow-wrap:anywhere; }
.stat-card small { display:block; margin-top:4px; font-size:10px; line-height:1.4; color:#616161; }
.stat-card.pending-tp-card { min-height:0; }.pending-tp-card h3 { font-size:12px; font-weight:500; overflow-wrap:anywhere; }.pending-tp-card p { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; margin-top:6px; }.pending-tp-card p>span { font-size:11px; color:var(--muted); overflow-wrap:anywhere; }
.stat-icon { display:grid; place-items:center; flex-shrink:0; width:27px; height:27px; border-radius:8px; color:#005bd3; background:#f7f7f7; }.stat-icon .icon { width:16px; height:16px; }.stat-icon.amber { background:#fff8db; color:#8a6116; }
.stat-featured { background:#f1f6fd; border-color:#b8d1f0; color:var(--ink); position:relative; overflow:hidden; }.stat-featured .stat-label { color:var(--blue); }.stat-featured small { color:var(--muted); }.stat-featured .stat-icon { background:#e2edfb; color:var(--blue); }
.stats-grid.three .stat-featured { order:-1; grid-column:1/-1; }.stats-grid.three:not(:has(.stat-featured)) .stat-card:last-child { grid-column:1/-1; }
.status-dot { display:inline-block; width:5px; height:5px; border-radius:50%; background:var(--blue); vertical-align:middle; margin-right:4px; }
.panel { box-shadow:0 1px 0 #0000000d; min-width:0; background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; margin-bottom:12px; }
.panel-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; }.panel-heading>div { min-width:0; }.panel-heading h2 { font-size:14px; }.panel-heading p { font-size:11px; line-height:1.5; color:var(--muted); margin-top:3px; }
.count-badge { display:inline-block; padding:2px 6px; background:#f7f7f7; color:#616161; border-radius:7px; font-size:11px; margin-left:4px; }
.dashboard-middle { min-width:0; display:grid; grid-template-columns:minmax(0,1fr); }.chart-legend { display:flex; gap:12px; color:var(--muted); font-size:11px; }.chart-legend span { display:flex; align-items:center; gap:5px; }.chart-legend i { width:8px; height:8px; border-radius:3px; }
.legend-purchase { background:#4584d6; }.legend-payment { background:#a1c9b0; }.chart-wrap { padding:8px 4px; }.bar-chart { display:block; width:100%; height:auto; min-height:160px; }.chart-grid { stroke:#ebebeb; stroke-dasharray:3 4; }.axis-label { fill:#616161; font-size:12px; font-family:inherit; }.bar-purchase { fill:#4584d6; }.bar-payment { fill:#a1c9b0; }.chart-empty { fill:#616161; font-size:13px; }
.due-list { padding:0 12px; }.due-row { display:flex; align-items:center; gap:8px; padding:8px 0; min-width:0; border-bottom:1px solid var(--line); }.due-row:last-child { border-bottom:0; }.due-name { flex:1; min-width:0; font-size:12px; font-weight:600; overflow-wrap:anywhere; }.due-name small { display:block; color:var(--muted); font-size:10px; font-weight:400; margin-top:3px; }.due-row strong { font-size:12px; max-width:48%; text-align:right; overflow-wrap:anywhere; }
.panel-bottom-link { display:flex; align-items:center; justify-content:space-between; min-height:44px; padding:8px 12px; border-top:1px solid var(--line); color:#005bd3; font-size:12px; }
.party-avatar { display:inline-grid; place-items:center; flex-shrink:0; width:37px; height:37px; border-radius:11px; background:#f7f7f7; color:#616161; font-size:12px; font-weight:600; }.party-avatar.small { width:32px; height:32px; }.tone-0 { background:#ebf3ff; color:#005bd3; }.tone-1 { background:#fff8db; color:#8a6116; }.tone-2 { background:#ebf3ff; color:#005bd3; }.tone-3 { background:#f3f0ff; color:#5e3cc4; }
.table-party { display:flex; align-items:center; gap:10px; min-width:0; overflow-wrap:anywhere; }.table-party:hover { color:var(--primary); }
.type-badge,.role-badge { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:500; border-radius:6px; padding:3px 7px; }.type-badge .icon { width:15px; height:15px; }.type-badge.purchase { background:#fff8db; color:#8a6116; }.type-badge.payment,.role-badge.admin { background:#eaf7ed; color:#0c5132; }.role-badge.staff { background:#ebf3ff; color:#005bd3; }
.balance-status { display:inline-flex; padding:3px 7px; border-radius:6px; font-size:11px; font-weight:500; line-height:1.5; }
.balance-status.due { background:#fff0e4; color:#8a4516; }.balance-status.paid { background:#eaf7ed; color:#0c5132; }.balance-status.advance { background:#ebf3ff; color:#005bd3; }
.daily-balance { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.day-book-note { margin:0; padding:0 12px 10px; font-size:11px; line-height:1.5; color:var(--muted); }
.amount,.balance { font-weight:600; }.payment-amount,.credit { color:#0c5132; }.balance small { display:block; color:#616161; font-size:11px; margin-top:3px; }
.bottom-tip,.report-note { display:flex; align-items:flex-start; gap:9px; color:var(--muted); font-size:11px; line-height:1.5; margin:12px 0 0; }.bottom-tip .icon,.report-note .icon { width:18px; height:18px; margin-top:2px; }
/* Record tables become flat labelled rows within a single panel on phones. */
.table-scroll { min-width:0; overflow-x:auto; }table { width:100%; border-collapse:collapse; text-align:left; font-size:11px; }
th { background:#f7f7f7; color:#616161; font-weight:600; font-size:11px; text-transform:none; letter-spacing:0; padding:8px 10px; border-block:1px solid var(--line); }td { padding:8px 10px; border-bottom:1px solid var(--line); }.number { text-align:right; font-variant-numeric:tabular-nums; }.cell-subtitle { display:block; font-size:11px; color:#616161; margin-top:3px; font-weight:400; }.entry-note { max-width:300px; overflow-wrap:anywhere; white-space:normal; }
.responsive-table { display:block; padding:0; }.responsive-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }.responsive-table tbody,.responsive-table tfoot { display:grid; gap:0; }
.responsive-table tbody tr,.responsive-table tfoot tr { display:block; border:0; border-radius:0; background:transparent; padding:10px 12px; }
.responsive-table td { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 8px; padding:4px 0; border:0; min-width:0; text-align:right; overflow-wrap:anywhere; white-space:normal; font-size:11px; }
.responsive-table td::before { content:attr(data-label); font-size:11px; font-weight:500; color:#616161; margin-right:auto; text-align:left; }
.responsive-table td:first-child { display:block; text-align:left; font-size:12px; padding-top:0; margin-bottom:4px; }.responsive-table td:first-child::before,.responsive-table td[data-label="Actions"]::before,.responsive-table td[data-label="Entry"]::before { display:none; }.responsive-table td[data-label="Entry"] { display:block; text-align:left; }
.responsive-table td[data-label="Actions"] { justify-content:flex-end; border-top:1px solid var(--line); padding-top:8px; margin-top:6px; }.responsive-table td:empty { display:none; }.responsive-table td:not(:first-child) .table-party { max-width:70%; text-align:left; }.responsive-table tfoot { margin-top:0; }
@media (max-width:767px) { .responsive-table tbody tr+tr,.responsive-table tfoot { border-top:1px solid var(--line); } }
.row-actions { display:flex; align-items:center; gap:6px; width:100%; justify-content:flex-end; }.row-actions .btn { flex:1; }.row-actions form { display:flex; }.danger { color:var(--danger); }.text-button { min-height:44px; padding:8px 0; border:0; background:none; font-size:13px; }
.item-details { margin-top:6px; font-size:12px; color:#616161; }.item-details summary { display:list-item; padding:10px 0; min-height:44px; cursor:pointer; }.item-details ul { list-style:none; padding:0; margin:0; }.item-details li { margin:10px 0; overflow-wrap:anywhere; }.item-details li small { display:block; margin-top:3px; }
.account-status { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#0c5132; }.account-status::before { content:""; width:6px; height:6px; background:#a1c9b0; border-radius:50%; }.account-status.inactive { color:#616161; }.account-status.inactive::before { background:#8a8a8a; }
/* Forms: 16px inputs avoid iOS zoom, and 44px+ controls are easy to tap. */
label { display:block; min-width:0; color:#303030; font-size:11px; font-weight:500; }label>span,th>span { color:#8a6116; }
input,select,textarea { width:100%; min-width:0; max-width:100%; min-height:44px; border:1px solid #dedede; border-radius:8px; padding:9px 10px; background:#fff; color:#303030; font-size:16px; font-weight:400; outline:none; }
input,select,textarea { scroll-margin-block:100px 180px; }
label>input,label>select,label>textarea { display:block; margin-top:4px; }input:focus,select:focus,textarea:focus { border-color:#005bd3; box-shadow:0 0 0 3px #005bd330; }input::placeholder,textarea::placeholder { color:#8a8a8a; opacity:1; font-size:13px; }input[type="date"],input[type="month"] { color-scheme:light; }textarea { resize:vertical; min-height:88px; }
.stack-form { display:flex; flex-direction:column; gap:12px; }.form-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }.form-panel { padding:12px; }.form-panel .panel-heading { padding:0 0 12px; }.form-step { width:24px; height:24px; display:grid; place-items:center; flex-shrink:0; border:1px solid var(--line); border-radius:50%; color:#616161; font-size:10px; }
.form-panel .panel-heading { flex-wrap:nowrap; align-items:flex-start; padding:0 0 12px; }.form-panel .panel-heading>div { flex:1; }
.form-actions { position:sticky; bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 8px); z-index:10; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:12px 0 0; padding:8px 0; border:0; border-top:1px solid var(--line); border-radius:0; background:#ffffffed; backdrop-filter:blur(12px); box-shadow:none; }.input-focused .form-actions { bottom:8px; }.form-actions .btn { min-width:0; }.form-actions>button:only-child { grid-column:1/-1; }form.panel { overflow:visible; }
.field-help { display:block; color:#616161; font-size:11px; line-height:1.5; font-weight:400; }.stack-form>.field-help { margin-top:-6px; }.profile-field-help { margin-top:12px; }
.alert { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid #a1c9b0; border-radius:8px; background:#eaf7ed; color:#0c5132; font-size:12px; margin-bottom:12px; }.alert .icon { width:20px; height:20px; margin-top:1px; }.alert.error { background:#fff1f0; border-color:#efd0cc; color:#8e1f0b; }
.search-form { display:flex; align-items:center; width:100%; min-width:0; gap:5px; padding:3px 5px 3px 10px; border:1px solid #dedede; border-radius:8px; }.search-form input { flex:1; border:0; min-width:0; padding:8px 4px; }.search-form>.icon { width:19px; height:19px; color:#616161; }
.filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:12px; gap:10px; align-items:end; }.filters label:first-child { grid-column:1/-1; }
.pagination { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; border-top:1px solid var(--line); font-size:11px; color:var(--muted); }.pagination>div { display:flex; gap:5px; }.pagination .btn { padding:6px 8px; font-size:11px; }
.empty-state { padding:22px 14px; text-align:center; }.empty-icon { width:40px; height:40px; display:inline-grid; place-items:center; border-radius:10px; margin-bottom:10px; background:#f7f7f7; color:#005bd3; }.empty-state h3 { font-size:14px; margin-bottom:6px; }.empty-state p { max-width:390px; margin:0 auto 12px; font-size:12px; color:var(--muted); }
.supplier-meta { display:flex; flex-wrap:wrap; gap:6px 12px; margin:-6px 0 10px; }.supplier-note { color:var(--muted); font-size:12px; margin-bottom:12px; overflow-wrap:anywhere; }.delete-supplier { margin-top:20px; }
.payment-layout,.settings-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; align-items:start; }.payment-explainer { padding:12px; }.payment-explainer h2 { font-size:16px; }.payment-explainer h2 br { display:none; }.payment-explainer p { color:var(--muted); font-size:12px; line-height:1.6; margin-top:10px; }.explainer-equation { display:grid; gap:8px; color:#616161; font-size:12px; margin:14px 0; }.explainer-equation strong { border-top:1px solid var(--line); padding-top:12px; color:#303030; }.supplier-balance-hint { padding:0; border:0; border-radius:0; background:transparent; color:#303030; font-size:12px; }.amount-input { font-size:22px; font-weight:600; }

.report-equation { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:12px; }.report-equation>div { padding:10px; background:#f7f7f7; border:1px solid #dedede; border-radius:8px; min-width:0; }.report-equation span { display:block; color:#616161; font-size:11px; margin-bottom:5px; }.report-equation strong { font-size:clamp(17px,4.5vw,22px); letter-spacing:-.5px; overflow-wrap:anywhere; }.report-equation b { display:none; }.report-equation .closing { background:#ebf3ff; }
/* Purchase lines stack into individually labelled forms. */
.items-table,.items-table tbody { display:block; width:100%; }.items-table thead { display:none; }
.purchase-item { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 8px; position:relative; margin-bottom:10px; padding:12px 0; border-top:1px solid var(--line); }
.purchase-item td { min-width:0; display:block; padding:0; border:0; }.purchase-item td:nth-child(1),.purchase-item td:nth-child(2),.purchase-item td:nth-child(5) { grid-column:1/-1; }.purchase-item td:nth-child(1) { padding-right:48px; }.purchase-item td:last-child { position:absolute; top:12px; right:0; }
.mobile-field-label { display:block; font-size:11px; font-weight:500; color:#616161; margin-bottom:4px; text-align:left; }.purchase-item input { margin:0; }
.purchase-item .item-amount { display:flex; align-items:center; justify-content:space-between; background:transparent; padding:6px 0; border-radius:0; }.item-amount .mobile-field-label { margin:0; }.item-total { font-size:15px; }
.items-footer { display:flex; flex-direction:column; gap:12px; padding-top:8px; }.items-footer>.btn { width:100%; }.purchase-total { text-align:right; width:100%; }.purchase-total>span { font-size:12px; color:var(--muted); }.purchase-total strong { display:block; font-size:20px; font-weight:600; margin:3px 0; }.purchase-total small { color:var(--muted); font-size:11px; }
.mobile-order-total { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; padding:0 5px 6px; }.mobile-order-total strong { font-size:18px; }
/* Business, accounts and inventory. */
.profile-layout,.user-form-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; align-items:start; }.profile-form,.user-form-layout>div,.user-form-layout>aside { min-width:0; }.profile-address-grid { margin-top:12px; }
.profile-card { padding:16px 12px; text-align:center; }.business-monogram { display:inline-grid; place-items:center; width:48px; height:48px; border:1px solid #dedede; border-radius:8px; background:#f7f7f7; color:#005bd3; font-size:17px; font-weight:600; flex-shrink:0; }.business-monogram.large { width:56px; height:56px; border-radius:14px; font-size:22px; margin-bottom:12px; }
.profile-card h2 { font-size:18px; overflow-wrap:anywhere; }.profile-contact-person { margin-top:9px; font-size:13px; color:var(--muted); }.profile-card-details { border-top:1px solid var(--line); margin-top:12px; padding-top:12px; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }.profile-card-details p { margin-top:8px; }.profile-currency { display:flex; align-items:center; justify-content:space-between; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); font-size:12px; color:#616161; }.profile-currency strong { font-size:18px; }
.profile-save-note { display:flex; justify-content:center; align-items:center; gap:6px; margin-top:12px; font-size:11px; color:var(--muted); }.profile-save-note .icon { width:15px; height:15px; }.profile-guidance { padding:0 10px 12px; padding-top:12px; }.profile-guidance p { margin-top:8px; color:var(--muted); font-size:12px; }
.report-business { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:12px; }.report-business>div { flex:1; min-width:170px; overflow-wrap:anywhere; }.report-business p { font-size:12px; color:var(--muted); margin-top:3px; }.report-business .text-link { margin-left:auto; }
.permission-option { display:flex; align-items:flex-start; gap:10px; min-height:48px; padding:8px 0; font-weight:400; }.permission-option>input { width:22px; height:22px; min-height:22px; margin:1px 0 0; padding:0; flex-shrink:0; accent-color:var(--primary); }.permission-option>span { color:inherit; }.permission-option strong { display:block; font-size:12px; font-weight:500; }.permission-option small { display:block; margin-top:3px; color:var(--muted); font-size:11px; line-height:1.5; }
.access-note { display:flex; align-items:flex-start; gap:9px; padding:6px 0; border:0; border-radius:0; background:transparent; color:#616161; font-size:12px; line-height:1.5; }.access-note .icon { width:18px; height:18px; margin-top:2px; }
.readonly-profile,.record-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.readonly-profile { margin:16px 0; }.readonly-profile dt,.record-summary small { display:block; color:var(--muted); font-size:11px; margin-bottom:4px; }.readonly-profile dd { margin:0; overflow-wrap:anywhere; }.record-summary strong { font-size:13px; font-weight:600; overflow-wrap:anywhere; }.record-note { font-size:12px; color:var(--muted); line-height:1.6; margin-top:12px; overflow-wrap:anywhere; }
.stock-unit { font-size:20px; font-weight:500; }.stock-remaining { display:inline-block; padding:4px 8px; border-radius:8px; color:#303030; background:#eaf7ed; font-weight:600; }.inventory-form { max-width:900px; }
.optional-fields { border-top:1px solid var(--line); padding-top:4px; }.optional-fields>summary { min-height:44px; padding:12px 0; color:var(--blue); font-size:12px; cursor:pointer; }.optional-fields>.stack-form { padding:8px 0 4px; }
.fabric-actions { flex-wrap:nowrap; gap:4px; }.fabric-actions>form,.fabric-actions>.icon-button { flex:0 0 auto; }.fabric-actions form { margin:0; }.fabric-status-button { color:#0c5132; }
.material-row { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:10px 8px; align-items:end; margin-bottom:12px; padding-bottom:12px; border-bottom:1px solid var(--line); }.material-row>label:first-child { grid-column:1/-1; }.material-row>.icon-button { margin-bottom:2px; }.material-chip { display:block; font-size:13px; padding:6px 9px; border-radius:7px; background:#f7f7f7; color:#303030; margin:4px 0; overflow-wrap:anywhere; }
.fabric-piece-section { display:flex; flex-direction:column; gap:8px; padding-top:12px; border-top:1px solid var(--line); }.fabric-piece-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }.fabric-piece-heading h2 { font-size:13px; }.fabric-piece-heading output { font-size:11px; color:var(--muted); }#fabric-pieces { display:grid; gap:8px 14px; }.fabric-piece-row { display:grid; grid-template-columns:minmax(0,1fr) 44px; gap:6px; align-items:end; min-width:0; }.fabric-piece-row label { min-width:0; margin:0; }.fabric-piece-row .icon-button { margin-bottom:1px; }.fabric-piece-section>.btn { align-self:flex-start; }
@media (min-width:640px) { #fabric-pieces { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 14px; } }
/* Login and first administrator setup use the reference's centred card. */
.auth-layout { min-height:100svh; display:grid; place-items:center; padding:16px 12px calc(16px + env(safe-area-inset-bottom)); background:var(--bg); }
.auth-main { width:100%; max-width:440px; min-width:0; }
.auth-form-wrap { width:100%; padding:18px 16px; border:1px solid var(--line); border-radius:12px; background:white; box-shadow:0 1px 2px #0000000a,0 10px 30px #0000000d; }
.auth-brand { margin-bottom:18px; }.auth-brand .brand-copy strong { font-size:22px; }.auth-brand .brand-copy>span { font-size:11px; }
.auth-form-wrap h1 { font-size:19px; line-height:1.35; letter-spacing:-.4px; }.auth-form-wrap>p { font-size:12px; line-height:1.5; color:var(--muted); margin:6px 0 16px; }

.auth-form-wrap .btn { min-height:48px; margin-top:4px; }.auth-form-wrap .auth-footnote { text-align:center; font-size:11px; margin:14px 0 0; }
.first-admin-note { margin-top:14px; padding:12px 0 0; border:0; border-top:1px solid var(--line); border-radius:0; background:transparent; font-size:12px; }.first-admin-note p { color:var(--muted); font-size:12px; margin-top:5px; }.first-admin-note .text-link { font-size:12px; margin-top:4px; }
.error-page { max-width:650px; margin:8vh auto; padding:25px; }.error-page p { margin:20px 0; color:var(--muted); }
dialog { width:min(520px,calc(100% - 24px)); max-height:calc(100dvh - 40px); overflow-y:auto; overscroll-behavior:contain; padding:16px; border:1px solid #dedede; border-radius:12px; color:var(--ink); box-shadow:0 20px 80px #00000040; }dialog::backdrop { background:#0f172a59; backdrop-filter:blur(3px); }.dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:14px; }.dialog-heading h2 { font-size:16px; }dialog .form-actions { position:static; margin:4px 0 0; padding:0; border:0; background:none; box-shadow:none; backdrop-filter:none; }
#dashboard-content { transition:opacity .15s; }#dashboard-content[aria-busy="true"] { opacity:.55; cursor:progress; }#dashboard-content[aria-busy="true"] .dashboard-controls button { pointer-events:none; }
/* Tablet enhancements. */
@media (min-width:640px) {
  .main-content { padding:12px 12px 20px; }.form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.form-grid.three label:first-child { grid-column:1/-1; }
  .stats-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }.stats-grid.three .stat-featured { order:0; grid-column:auto; }.stats-grid.three:not(:has(.stat-featured)) .stat-card:last-child { grid-column:auto; }
  .panel-heading { padding:10px 12px; gap:8px; }.form-panel { padding:12px; }.form-panel .panel-heading { padding:0 0 12px; }.dashboard-controls { width:auto; gap:6px; }
  .search-form { width:auto; max-width:360px; }.section-title .subtle { display:inline; font-size:11px; }
  .filters { display:flex; align-items:flex-end; flex-wrap:wrap; padding:12px; gap:10px; }.filters label { min-width:150px; flex:1; }
  .material-row { grid-template-columns:minmax(0,1.7fr) minmax(160px,1fr) 44px; gap:10px 8px; margin-bottom:12px; padding-bottom:12px; }.material-row>label:first-child { grid-column:auto; }
  .profile-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.profile-guidance { padding-top:12px; padding:0 10px 12px; }
}
@media (min-width:768px) {
  .responsive-table { display:table; padding:0; }.responsive-table thead { position:static; display:table-header-group; width:auto; height:auto; overflow:visible; clip:auto; white-space:normal; }.responsive-table tbody { display:table-row-group; }.responsive-table tfoot { display:table-footer-group; }
  .responsive-table tbody tr,.responsive-table tfoot tr { display:table-row; padding:10px; border:0; border-radius:0; background:white; }
  .responsive-table td,.responsive-table td:first-child,.responsive-table td[data-label="Entry"],.responsive-table td[data-label="Actions"] { display:table-cell; vertical-align:middle; text-align:left; border-bottom:1px solid var(--line); margin:0; padding:7px 10px; font-size:11px; }.responsive-table td:empty { display:table-cell; }.responsive-table td::before { display:none; font-size:11px; }.responsive-table td.number { text-align:right; white-space:nowrap; }.responsive-table td:not(:first-child) .table-party { max-width:300px; }.responsive-table tbody tr:hover,.responsive-table tfoot tr { background:#f7f7f7; }.responsive-table th { white-space:nowrap; font-size:10px; }
  .row-actions { width:auto; gap:6px; }.row-actions .btn { flex:none; }.form-actions { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin:12px 0 0; padding:8px 0; }.mobile-order-total { margin-right:auto; flex:1; padding:0 8px; font-size:12px; }
  .items-table { display:table; }.items-table thead { display:table-header-group; }.items-table tbody { display:table-row-group; }.purchase-item { display:table-row; position:static; gap:10px 8px; margin-bottom:10px; padding:12px 0; }
  .purchase-item td,.purchase-item td:nth-child(1),.purchase-item td:last-child { display:table-cell; position:static; padding:8px 6px; border-bottom:1px solid var(--line); }.items-table th { padding:8px 6px; font-size:10px; }.items-table th:nth-child(1) { width:22%; }.items-table th:nth-child(2) { width:25%; }.items-table th:nth-child(3),.items-table th:nth-child(4) { width:15%; }
  .purchase-item .item-amount { display:table-cell; background:none; padding:8px 10px; border-radius:0; white-space:nowrap; }.mobile-field-label { display:none; font-size:11px; margin-bottom:4px; }.items-table input { padding:10px 8px; }
  .items-footer { flex-direction:row; align-items:flex-start; justify-content:space-between; padding-top:8px; gap:12px; }.items-footer>.btn,.purchase-total { width:auto; }.permission-presets>span { width:auto; }.permission-table th,.permission-table td { padding:10px 8px; }
}
/* Desktop enhancements. */
@media (min-width:1024px) {
  .app-shell { display:flex; }input,select,textarea { font-size:14px; }.sidebar { width:240px; transform:none; visibility:visible; padding:20px 12px 12px; }.drawer-close,.mobile-bottom-nav,.nav-backdrop { display:none; }.main-shell { margin-left:240px; flex:1; padding-bottom:0; }
  .main-content { padding:12px 12px 20px; }.nav-link { min-height:36px; padding-block:8px; }.sidebar .brand-copy strong { font-size:18px; }
  .stats-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:12px; }.stat-card { padding:10px; min-height:0; }.stat-card strong { font-size:clamp(18px,4.8vw,21px); }
  .form-actions,.input-focused .form-actions { position:static; margin:12px 0 0; padding:0; border:0; box-shadow:none; background:none; backdrop-filter:none; }.mobile-order-total { display:none; font-size:12px; }
  .app-footer { padding:8px 12px 14px; display:flex; justify-content:space-between; gap:15px; font-size:10px; }.app-footer>span:last-child { display:flex; align-items:center; gap:5px; }
}
@media (min-width:1200px) {
  .main-content { padding:12px 12px 20px; }.stat-card { padding:10px; min-height:0; }.stat-card strong { font-size:clamp(18px,4.8vw,21px); }
  .dashboard-middle { grid-template-columns:minmax(0,1.65fr) minmax(290px,1fr); gap:16px; }.payment-layout { grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr); gap:16px; }.payment-explainer { padding:12px; }.settings-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .profile-layout,.user-form-layout { grid-template-columns:minmax(0,1fr) 280px; gap:14px; }.profile-summary { display:block; gap:12px; }.profile-guidance { padding-top:12px; padding:0 10px 12px; }.form-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }.form-grid.three label:first-child { grid-column:auto; }.record-summary { grid-template-columns:repeat(4,minmax(0,1fr)); }.report-equation { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none!important; scroll-behavior:auto!important; }
}
@media (max-width:767px) {
  .daily-table tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:12px; }
  .daily-table td:first-child,.daily-table td[data-label="Supplier"],.daily-table td[data-label="Actions"] { grid-column:1/-1; }
  .daily-table td:first-child { display:flex; align-items:center; justify-content:space-between; gap:8px; }.daily-table td:first-child .cell-subtitle { margin:0; font-size:11px; }
  .daily-table td.number { flex-direction:column; align-items:flex-start; gap:4px; text-align:left; }.daily-table td.number::before { font-size:11px; }
  .daily-table .daily-balance { justify-content:flex-start; gap:6px; }.daily-table td[data-label="Actions"] { margin-top:4px; padding-top:8px; }
}
.type-badge.return { background:#fff0e4; color:#8a4516; }.return-amount { color:#8a4516; }.legend-return,.bar-return { background:#d79555; fill:#d79555; }.chart-legend { flex-wrap:wrap; }
.report-equation.with-returns .closing { grid-column:1/-1; }
@media (max-width:767px) { .daily-table td[data-label="Day-end balance"] { grid-column:1/-1; flex-direction:row; align-items:center; justify-content:space-between; padding-top:8px; border-top:1px solid var(--line); margin-top:4px; } }
@media (min-width:1200px) { .report-equation.with-returns { grid-template-columns:repeat(5,minmax(0,1fr)); }.report-equation.with-returns .closing { grid-column:auto; } }
tr[id^="day-"] { scroll-margin-top:80px; }
@media (max-width:767px) { .responsive-table td.inactive-amount { display:none; } }
.catalog-item-details { margin-top:8px; font-size:11px; }.catalog-item-details label { margin-bottom:8px; font-size:11px; }.purchase-catalog-help { margin:8px 0; }.purchase-catalog-help a { display:inline-flex; }
.product-picker-trigger { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:44px; padding:10px 12px; border:1px solid #c9c9c9; border-radius:8px; background:white; color:var(--ink); text-align:left; font-size:16px; overflow-wrap:anywhere; }.product-picker-trigger::after { content:''; width:7px; height:7px; flex-shrink:0; border:solid #616161; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); margin:0 3px 4px 0; }.product-picker-trigger.placeholder { color:var(--muted); }
dialog.product-picker { padding:16px; width:min(480px,calc(100% - 24px)); max-height:calc(100dvh - 24px); border-radius:12px; overflow:hidden; }dialog.product-picker[open] { display:flex; flex-direction:column; gap:12px; }.product-picker .dialog-heading { margin:0; align-items:center; }.product-picker .dialog-heading h2 { font-size:16px; }.product-picker .field-help { margin:0; font-size:11px; }.product-picker input { flex-shrink:0; }.product-picker-results { overflow-y:auto; overscroll-behavior:contain; min-height:0; max-height:40dvh; display:grid; gap:4px; }.product-picker-option { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; min-height:44px; padding:10px; border:1px solid transparent; border-radius:6px; background:#f7f7f7; color:var(--ink); font-size:12px; text-align:left; }.product-picker-option>span { min-width:0; overflow-wrap:anywhere; }.product-picker-option small { flex-shrink:0; font-size:11px; color:var(--muted); }.product-picker-option:hover,.product-picker-option:focus-visible,.product-picker-option[aria-current="true"] { background:var(--blue-soft); border-color:#b8d1f0; }.product-picker>.btn { flex-shrink:0; }
@media (min-width:768px) { .product-picker-trigger { font-size:14px; } }
@media (max-width:767px) {
  .catalog-items-table .purchase-item td { grid-column:auto; }.catalog-items-table .purchase-item .item-product,.catalog-items-table .purchase-item .item-amount { grid-column:1/-1; }.catalog-items-table .purchase-item td:last-child { position:absolute; }
}
@media (min-width:768px) {
  .catalog-items-table th:nth-child(1) { width:44%; }.catalog-items-table th:nth-child(2),.catalog-items-table th:nth-child(3) { width:18%; }.catalog-items-table th:nth-child(4) { width:15%; }.catalog-items-table th:last-child { width:5%; }.catalog-items-table select { font-size:14px; padding:10px 8px; }
}

/* Shared compact controls; phone inputs and touch targets remain full size. */


@media (min-width:1024px) {
  input,select,textarea { min-height:36px; font-size:13px; padding:7px 9px; }
  .btn,.btn-small,.icon-button,.text-link,.text-button { min-height:34px; }
  .icon-button { width:34px; height:34px; min-width:34px; padding:7px; }
  
  .form-actions,.input-focused .form-actions { margin:8px 0 0; padding:0; }
  .product-picker-trigger { min-height:36px; font-size:13px; padding:7px 9px; }
  .nav-link { min-height:32px; padding-block:6px; }
}

.user-account-form { max-width:760px; }.account-settings-form { max-width:440px; }

@media (min-width:1024px) {
  .page-heading h1 { font-size:19px; }
  .page-heading .heading-actions .btn { width:auto; min-width:0; min-height:34px; padding:7px 10px; font-size:11px; gap:6px; white-space:nowrap; }
}
