:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #152238;
  background: #f7f8fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --red: #c8102e;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button { font: inherit; }
.page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, #c8102e 0 225px, #f7f8fb 225px); }
.panel { width: min(100%, 440px); border: 1px solid #e9edf3; border-radius: 24px; padding: 38px 32px 30px; background: white; box-shadow: 0 14px 42px #17243a14; text-align: center; }
.brand-mark { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; background: var(--red); color: white; font-size: 21px; font-weight: 800; letter-spacing: -1px; }
.eyebrow { margin: 0; color: #667085; font-size: 13px; }
h1 { margin: 7px 0 0; color: var(--red); font-size: 36px; letter-spacing: -1.5px; }
.intro { margin: 8px 0 30px; color: #49566a; }
.connection { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 13px 15px; border: 1px solid #e7eaf0; border-radius: 12px; background: #fbfcfe; color: #344054; text-align: left; font-size: 14px; line-height: 1.4; }
.status-dot { flex: 0 0 9px; width: 9px; height: 9px; border-radius: 50%; background: #e3a008; }
.connection-error { border-color: #f2c5cc; background: #fff7f8; color: #8f1d2c; }
.connection-error .status-dot { background: var(--red); }
.retry { width: 100%; margin-top: 14px; padding: 13px; border: 0; border-radius: 11px; background: var(--red); color: white; font-weight: 700; cursor: pointer; }
.note { margin: 22px 0 0; color: #758096; font-size: 12px; line-height: 1.5; }
@media (max-width: 480px) { .page { padding: 16px; background: linear-gradient(180deg, #c8102e 0 190px, #f7f8fb 190px); } .panel { padding: 30px 22px 24px; border-radius: 20px; } }

:root{--red:#c8102e;--red-dark:#a90d27;--muted:#788196;--line:#e8ebf1}.app-shell{min-height:100vh;padding-bottom:82px;background:#f6f7fa}.topbar{height:68px;padding:0 max(20px,calc((100vw - 1120px)/2));display:flex;align-items:center;justify-content:space-between;gap:15px;background:#fff;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;color:#172033;text-decoration:none;font-size:20px;font-weight:800;letter-spacing:-.5px}.brand-logo{width:40px;height:40px;flex:none;border:1px solid #0d2038;border-radius:50%;background:#071629;object-fit:cover;box-shadow:0 4px 12px #07162930}.header-status{display:flex;align-items:center;gap:9px}.local-pill,.sync-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#475467;font-size:11px;font-weight:700}.local-pill i{width:8px;height:8px;border-radius:50%;background:#13845b}.local-pill.error{color:#a91f34}.local-pill.error i{background:#c8102e}.sync-pill{color:#9b3848;background:#fff7f8;border-color:#f3d9dd}.main-content{width:min(100% - 36px,1080px);margin:32px auto}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin-bottom:21px}.page-heading h1{margin:0;color:#172033;font-size:clamp(24px,4vw,33px);letter-spacing:-1.2px}.eyebrow{margin:0 0 5px;color:var(--red);font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.subtitle{margin:7px 0 0;color:var(--muted);font-size:13px}.button{border:0;border-radius:10px;padding:11px 15px;font-size:13px;font-weight:700;cursor:pointer}.button.primary{color:white;background:var(--red);box-shadow:0 6px 15px #c8102e26}.button.primary:hover{background:var(--red-dark)}.button.secondary{color:#344054;background:#fff;border:1px solid var(--line)}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:17px}.summary-card,.card,.quick-card,.notice{border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 4px 16px #17203308}.summary-card{padding:18px}.summary-card span{display:block;color:var(--muted);font-size:12px}.summary-card strong{display:block;margin-top:7px;font-size:27px;letter-spacing:-.6px}.summary-card small{display:block;margin-top:4px;color:#8790a1;font-size:10px}.notice{display:flex;gap:12px;align-items:flex-start;padding:16px 18px;margin-bottom:17px;border-left:4px solid var(--red)}.notice-icon{width:30px;height:30px;flex:none;border-radius:10px;display:grid;place-items:center;background:#fff0f2;color:var(--red);font-weight:800}.notice strong{font-size:13px}.notice p,.more-list p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.55}.quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.quick-card{min-height:120px;padding:16px;text-align:left;color:inherit}.quick-card:not(.planned){cursor:pointer}.quick-card:not(.planned):hover{border-color:#edb4bd;background:#fffafb}.quick-card>span{width:34px;height:34px;margin-bottom:11px;border-radius:11px;display:grid;place-items:center;background:#fff0f2;color:var(--red);font-size:18px}.quick-card strong,.quick-card small{display:block}.quick-card strong{font-size:13px}.quick-card small{margin-top:4px;color:var(--muted);font-size:11px}.card{padding:17px;margin-bottom:15px}.form-card h2{margin:0 0 16px;font-size:17px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.field{display:grid;gap:7px;color:#475467;font-size:12px;font-weight:700}.field.full{grid-column:1/-1}.field input{width:100%;height:42px;padding:0 11px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#172033;font:500 13px "DM Sans",sans-serif;outline:none}.field input:focus,.search:focus{border-color:#d96d7d;box-shadow:0 0 0 3px #c8102e12}.field small{font-size:10px;color:var(--muted);font-weight:400}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:17px}.search{width:min(100%,420px);height:42px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:#fbfcfe;font:500 13px "DM Sans",sans-serif;outline:none}.record-list{display:grid;gap:9px;margin-top:14px}.record-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px;border:1px solid #edf0f4;border-radius:12px}.record-row>div:first-child{min-width:0}.record-row strong,.record-row small{display:block;overflow-wrap:anywhere}.record-row strong{font-size:13px}.record-row small{margin-top:4px;color:var(--muted);font-size:10px;line-height:1.4}.record-right{text-align:right;flex:none}.record-right small{color:#167650}.pending-tag{flex:none;padding:5px 8px;border-radius:99px;background:#fff4e1;color:#8b5a00;font-size:9px;font-weight:700}.empty,.loading{padding:25px 8px;text-align:center;color:var(--muted);font-size:12px}.segmented{display:flex;width:max-content;gap:4px;padding:4px;margin-bottom:14px;border-radius:10px;background:#f1f2f5}.segmented button{padding:7px 12px;border:0;border-radius:7px;background:transparent;color:#667085;font-size:11px;font-weight:700;cursor:pointer}.segmented button.selected{background:var(--red);color:white}.more-list{display:grid;gap:11px;max-width:760px}.more-list .card{margin:0}.bottom-nav{position:fixed;z-index:5;bottom:0;left:0;right:0;min-height:72px;padding:7px 9px calc(7px + env(safe-area-inset-bottom));display:flex;justify-content:space-around;background:#fff;border-top:1px solid var(--line)}.nav-item{min-width:64px;padding:5px 8px;border:0;border-radius:11px;display:flex;flex-direction:column;align-items:center;gap:3px;background:transparent;color:#758096;font-size:9px;font-weight:700;cursor:pointer}.nav-item span{font-size:20px;line-height:1.1}.nav-item.active{color:var(--red);background:#fff2f4}.toast{position:fixed;z-index:8;left:50%;bottom:88px;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 30px);padding:12px 16px;border-radius:11px;background:#172033;color:#fff;font-size:12px;box-shadow:0 9px 24px #17203338}.toast.error{background:#9d1930}.error-notice{border-left-color:#b42338}.loading{min-height:60vh;display:grid;place-items:center}@media(min-width:900px){.app-shell{padding-bottom:0}.bottom-nav{position:static;width:min(100% - 36px,510px);min-height:61px;margin:0 auto 20px;border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 15px #17203308}.toast{bottom:25px}}@media(max-width:600px){.topbar{height:60px;padding:0 13px}.brand{font-size:17px}.app-shell .brand-mark{width:33px;height:33px}.sync-pill{display:none}.local-pill{font-size:9px;padding:6px 8px}.main-content{width:calc(100% - 26px);margin:21px auto}.page-heading{align-items:flex-start;flex-direction:column}.summary-grid{gap:8px}.summary-card{padding:13px 10px;border-radius:13px}.summary-card span{font-size:9px}.summary-card strong{font-size:21px}.summary-card small{font-size:8px}.quick-grid{grid-template-columns:1fr}.quick-card{min-height:auto;display:grid;grid-template-columns:36px 1fr;align-items:center;column-gap:10px;padding:12px}.quick-card>span{grid-row:span 2;margin:0}.quick-card small{margin-top:3px}.card{padding:13px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.form-actions{flex-direction:column-reverse}.form-actions .button{width:100%}.record-row{padding:11px 9px;gap:8px}.record-row strong{font-size:12px}}

:root{--red:#c8102e;--red-dark:#a90d27;--muted:#788196;--line:#e8ebf1}.app-shell{min-height:100vh;padding-bottom:82px;background:#f6f7fa}.topbar{height:68px;padding:0 max(20px,calc((100vw - 1120px)/2));display:flex;align-items:center;justify-content:space-between;gap:15px;background:#fff;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;color:#172033;text-decoration:none;font-size:20px;font-weight:800;letter-spacing:-.5px}.app-shell .brand-mark,.loading-page .brand-mark,.error-page .brand-mark{width:38px;height:38px;margin:0;border-radius:12px;background:var(--red);color:#fff;display:grid;place-items:center;font-size:14px;font-weight:800;letter-spacing:-1px;box-shadow:0 5px 12px #c8102e2a}.header-status{display:flex;align-items:center;gap:9px}.local-pill,.sync-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#475467;font-size:11px;font-weight:700}.local-pill i{width:8px;height:8px;border-radius:50%;background:#13845b}.sync-pill{color:#9b3848;background:#fff7f8;border-color:#f3d9dd}.main-content{width:min(100% - 36px,1080px);margin:32px auto}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin-bottom:21px}.page-heading h1{margin:0;color:#172033;font-size:clamp(24px,4vw,33px);letter-spacing:-1.2px}.eyebrow{margin:0 0 5px;color:var(--red);font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.subtitle{margin:7px 0 0;color:var(--muted);font-size:13px}.button{border:0;border-radius:10px;padding:11px 15px;font-size:13px;font-weight:700;cursor:pointer}.button.primary{color:white;background:var(--red);box-shadow:0 6px 15px #c8102e26}.button.primary:hover{background:var(--red-dark)}.button.secondary{color:#344054;background:#fff;border:1px solid var(--line)}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:17px}.summary-card,.card,.quick-card,.notice{border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:0 4px 16px #17203308}.summary-card{padding:18px}.summary-card span{display:block;color:var(--muted);font-size:12px}.summary-card strong{display:block;margin-top:7px;font-size:27px;letter-spacing:-.6px}.summary-card small{display:block;margin-top:4px;color:#8790a1;font-size:10px}.notice{display:flex;gap:12px;align-items:flex-start;padding:16px 18px;margin-bottom:17px;border-left:4px solid var(--red)}.notice-icon{width:30px;height:30px;flex:none;border-radius:10px;display:grid;place-items:center;background:#fff0f2;color:var(--red);font-weight:800}.notice strong{font-size:13px}.notice p,.more-list p{margin:5px 0 0;color:var(--muted);font-size:12px;line-height:1.55}.quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.quick-card{min-height:120px;padding:16px;text-align:left;color:inherit}.quick-card:not(.planned){cursor:pointer}.quick-card:not(.planned):hover{border-color:#edb4bd;background:#fffafb}.quick-card>span{width:34px;height:34px;margin-bottom:11px;border-radius:11px;display:grid;place-items:center;background:#fff0f2;color:var(--red);font-size:18px}.quick-card strong,.quick-card small{display:block}.quick-card strong{font-size:13px}.quick-card small{margin-top:4px;color:var(--muted);font-size:11px}.card{padding:17px;margin-bottom:15px}.form-card h2{margin:0 0 16px;font-size:17px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.field{display:grid;gap:7px;color:#475467;font-size:12px;font-weight:700}.field.full{grid-column:1/-1}.field input{width:100%;height:42px;padding:0 11px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#172033;font:500 13px inherit;outline:none}.field input:focus,.search:focus{border-color:#d96d7d;box-shadow:0 0 0 3px #c8102e12}.field small{font-size:10px;color:var(--muted);font-weight:400}.form-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:17px}.search{width:min(100%,420px);height:42px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:#fbfcfe;font:500 13px inherit;outline:none}.record-list{display:grid;gap:9px;margin-top:14px}.record-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px;border:1px solid #edf0f4;border-radius:12px}.record-row>div:first-child{min-width:0}.record-row strong,.record-row small{display:block;overflow-wrap:anywhere}.record-row strong{font-size:13px}.record-row small{margin-top:4px;color:var(--muted);font-size:10px;line-height:1.4}.record-right{text-align:right;flex:none}.record-right small{color:#167650}.pending-tag{flex:none;padding:5px 8px;border-radius:99px;background:#fff4e1;color:#8b5a00;font-size:9px;font-weight:700}.empty{padding:25px 8px;text-align:center;color:var(--muted);font-size:12px}.segmented{display:flex;width:max-content;gap:4px;padding:4px;margin-bottom:14px;border-radius:10px;background:#f1f2f5}.segmented button{padding:7px 12px;border:0;border-radius:7px;background:transparent;color:#667085;font-size:11px;font-weight:700;cursor:pointer}.segmented button.selected{background:var(--red);color:white}.more-list{display:grid;gap:11px;max-width:760px}.more-list .card{margin:0}.loading-page,.error-page{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;text-align:center;background:#f6f7fa}.error-page .notice{max-width:440px;text-align:left}.error-notice{border-left-color:#b42338}.toast{position:fixed;z-index:6;left:50%;bottom:92px;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 30px);padding:12px 16px;border-radius:11px;background:#172033;color:#fff;font-size:12px;box-shadow:0 9px 24px #17203338}.bottom-nav{position:fixed;z-index:5;bottom:0;left:0;right:0;min-height:72px;padding:7px 9px calc(7px + env(safe-area-inset-bottom));display:flex;justify-content:space-around;background:#fff;border-top:1px solid var(--line)}.nav-item{min-width:64px;padding:5px 8px;border:0;border-radius:11px;display:flex;flex-direction:column;align-items:center;gap:3px;background:transparent;color:#758096;font-size:9px;font-weight:700;cursor:pointer}.nav-item span{font-size:20px;line-height:1.1}.nav-item.active{color:var(--red);background:#fff2f4}.loading-page p{color:var(--muted);font-size:13px}@media(min-width:900px){.app-shell{padding-bottom:0}.bottom-nav{position:static;width:min(100% - 36px,510px);min-height:61px;margin:0 auto 20px;border:1px solid var(--line);border-radius:14px;box-shadow:0 4px 15px #17203308}.toast{bottom:25px}}@media(max-width:600px){.topbar{height:60px;padding:0 13px}.brand{font-size:17px}.app-shell .brand-mark{width:33px;height:33px}.sync-pill{display:none}.local-pill{font-size:9px;padding:6px 8px}.main-content{width:calc(100% - 26px);margin:21px auto}.page-heading{align-items:flex-start;flex-direction:column}.summary-grid{gap:8px}.summary-card{padding:13px 10px;border-radius:13px}.summary-card span{font-size:9px}.summary-card strong{font-size:21px}.summary-card small{font-size:8px}.quick-grid{grid-template-columns:1fr}.quick-card{min-height:auto;display:grid;grid-template-columns:36px 1fr;align-items:center;column-gap:10px;padding:12px}.quick-card>span{grid-row:span 2;margin:0}.quick-card small{margin-top:3px}.card{padding:13px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.form-actions{flex-direction:column-reverse}.form-actions .button{width:100%}.record-row{padding:11px 9px;gap:8px}.record-row strong{font-size:12px}}

/* Sales form and reference-aligned app shell */
.topbar{background:var(--red);border-bottom-color:var(--red-dark)}
.brand{color:#fff}
.app-shell .brand-mark{background:#fff;color:var(--red);box-shadow:none}
.local-pill{background:#fff;color:#145b3c;border-color:#ffffffaa}
.sync-pill{background:#fff1f3;color:#96243a;border-color:#ffd5dc}
.select-control,.field select{width:100%;height:42px;padding:0 11px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#172033;font:500 13px ui-sans-serif,system-ui,sans-serif}
.select-control:focus,.field select:focus{outline:0;border-color:#d96d7d;box-shadow:0 0 0 3px #c8102e12}
.bill-totals{display:grid;gap:8px;margin-top:17px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fbfcfe}
.bill-totals>div{display:flex;justify-content:space-between;gap:12px;color:#667085;font-size:12px}
.bill-totals strong{color:#172033}
.bill-totals .grand-total{padding-top:9px;border-top:1px solid var(--line);font-size:15px;font-weight:800}
.bill-totals .grand-total strong{color:var(--red);font-size:19px}
.inline-error{min-height:20px;margin-top:8px;color:#a91f34;font-size:12px}
.text-button{margin-top:5px;padding:0;border:0;background:none;color:#a91f34;font-size:10px;font-weight:700;cursor:pointer}
@media(max-width:600px){.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.quick-card{min-height:98px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px}.quick-card>span{margin:0}.quick-card small{line-height:1.35}.bill-totals{padding:12px}}

.dashboard-welcome{margin:4px 0 20px}
.dashboard-welcome h1{margin:0;color:#172033;font-size:clamp(25px,4vw,34px);letter-spacing:-1px}
.dashboard-welcome p:not(.eyebrow){margin:7px 0 0;color:var(--muted);font-size:13px}
.dashboard-section{margin:20px 0}
.dashboard-section h2,.section-title h2{margin:0;color:#182338;font-size:16px}
.quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.quick-card{border:1px solid var(--line);font:inherit}
.quick-card.planned{cursor:not-allowed;opacity:.72}
.dashboard-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
.dashboard-columns .card{min-width:0}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px}
.section-title span{color:var(--muted);font-size:10px}
.sales-chart{height:190px;margin-top:18px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;align-items:end}
.chart-column{height:100%;display:grid;grid-template-rows:20px 1fr 18px;align-items:end;gap:5px;text-align:center}
.chart-column small{color:var(--muted);font-size:10px}
.chart-value{color:#62708a;font-size:9px;white-space:nowrap;overflow:hidden}
.chart-track{height:100%;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid #dfe4ec}
.chart-track i{width:min(22px,60%);min-height:2px;border-radius:5px 5px 0 0;background:linear-gradient(180deg,#e33b57,#c8102e)}
.dashboard-counts{margin:4px 0 22px;color:var(--muted);font-size:10px;text-align:center}
@media(max-width:800px){.dashboard-columns{grid-template-columns:1fr}.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.sales-chart{height:160px;gap:5px}.chart-column small{font-size:9px}.dashboard-welcome{margin-top:0}}

.filter-row{display:flex;gap:7px;overflow-x:auto;padding:12px 0 2px}
.filter-chip{flex:none;padding:7px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#687386;font-size:10px;font-weight:700;cursor:pointer}
.filter-chip.selected{border-color:var(--red);background:var(--red);color:#fff}
.stock-tag{display:inline-block;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:700}
.stock-in{background:#e9f7ef;color:#18754d}
.stock-low{background:#fff3db;color:#9c6200}
.stock-out{background:#fff0f1;color:#a52338}

.backup-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0;padding-top:14px;border-top:1px solid var(--line)}
.backup-form .button{align-self:end;min-height:42px}
.backup-form input[type=file]{width:100%;padding:8px;border:1px solid var(--line);border-radius:9px;background:#fff;font:12px ui-sans-serif,system-ui,sans-serif}
@media(max-width:600px){.backup-form{grid-template-columns:1fr}}

.invoice-brand{display:flex;flex-direction:column;gap:4px;padding-bottom:15px;border-bottom:2px solid var(--red)}
.invoice-brand strong{color:var(--red);font-size:24px}.invoice-brand span,.invoice-meta small,.invoice-customer small,.invoice-customer span{color:var(--muted);font-size:11px;line-height:1.5}
.invoice-meta{display:flex;justify-content:space-between;gap:20px;padding:18px 0}.invoice-meta>div,.invoice-customer{display:flex;flex-direction:column;gap:5px}.invoice-customer{padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.invoice-table-wrap{overflow-x:auto;margin:12px -4px}.invoice-table{width:100%;border-collapse:collapse;font-size:11px}.invoice-table th,.invoice-table td{padding:10px 7px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}.invoice-table th:first-child,.invoice-table td:first-child{text-align:left;white-space:normal}.invoice-table td:first-child strong,.invoice-table td:first-child small{display:block}.invoice-table td:first-child small{margin-top:3px;color:var(--muted);font-size:9px}
.invoice-total-list{width:min(100%,340px);margin:12px 0 0 auto;display:grid;gap:7px}.invoice-total-list>div{display:flex;justify-content:space-between;gap:12px;font-size:12px}.invoice-grand-total{padding-top:8px;border-top:1px solid var(--line);color:var(--red);font-size:16px!important}
.printable-invoice[data-invoice-template="modern"] .invoice-brand{padding:18px;border:0;border-left:5px solid #3157a4;background:#f1f5ff}
.printable-invoice[data-invoice-template="modern"] .invoice-brand strong{color:#203d78}
.printable-invoice[data-invoice-template="modern"] .invoice-grand-total{border-color:#3157a4;color:#203d78}
.printable-invoice[data-invoice-template="modern"] .invoice-table thead{background:#edf2fc}
.printable-invoice[data-invoice-template="modern"] .invoice-table th{color:#203d78}
.printable-invoice[data-invoice-template="compact"]{padding:12px}
.printable-invoice[data-invoice-template="compact"] .invoice-brand{padding-bottom:8px}
.printable-invoice[data-invoice-template="compact"] .invoice-brand strong{font-size:20px}
.printable-invoice[data-invoice-template="compact"] .invoice-meta{padding:10px 0}
.printable-invoice[data-invoice-template="compact"] .invoice-customer{padding:8px 0}
.printable-invoice[data-invoice-template="compact"] .invoice-table-wrap{margin:6px -4px}
.printable-invoice[data-invoice-template="compact"] .invoice-table th,.printable-invoice[data-invoice-template="compact"] .invoice-table td{padding:6px 5px}
.printable-invoice[data-invoice-template="compact"] .invoice-total-list{gap:4px;margin-top:8px}
.invoice-screen-actions .field{max-width:480px}
.invoice-screen-actions .small-note{margin:8px 0 0;color:var(--muted);font-size:11px;line-height:1.55}
@page{size:A4;margin:14mm}
@media print{body *{visibility:hidden!important}.printable-invoice,.printable-invoice *{visibility:visible!important}.printable-invoice{position:absolute!important;inset:0!important;width:100%!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}.invoice-screen-actions,.topbar,.bottom-nav{display:none!important}.invoice-table-wrap{overflow:visible}.invoice-table{font-size:10pt}.invoice-total-list{font-size:11pt}}

.report-period{display:grid;grid-template-columns:1fr 1fr;gap:12px}.report-period .inline-error{grid-column:1/-1;margin:0}
@media(max-width:520px){.report-period{grid-template-columns:1fr}}

.scanner-view{position:relative;max-width:520px;min-height:220px;margin:12px auto;overflow:hidden;border-radius:14px;background:#111}.scanner-view video{width:100%;max-height:360px;display:block;object-fit:cover}.scanner-frame{position:absolute;left:12%;right:12%;top:28%;height:42%;border:3px solid #fff;border-radius:18px;box-shadow:0 0 0 100vmax #0005;pointer-events:none}.scanner-message{color:var(--muted);font-size:12px}.scanner-view+.scanner-message{text-align:center}
[hidden]{display:none!important}.auth-card{max-width:620px;margin:4vh auto}.auth-card ol{padding-left:22px;line-height:1.8}.auth-card code{overflow-wrap:anywhere}

.item-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:16px 0}.item-detail-grid>div{display:grid;gap:4px}.item-detail-grid small{color:var(--muted);font-size:10px}.item-detail h3{margin:14px 0 8px;font-size:14px}.item-detail .section-title>div{display:flex;gap:8px}@media(max-width:600px){.item-detail .section-title{align-items:flex-start;flex-direction:column}.item-detail-grid{gap:10px}}

.field textarea{width:100%;min-height:84px;padding:10px 11px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#172033;font:500 13px ui-sans-serif,system-ui,sans-serif;resize:vertical}.field textarea:focus{outline:0;border-color:#d96d7d;box-shadow:0 0 0 3px #c8102e12}.field input[type=file]{width:100%;padding:9px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#475467;font:12px ui-sans-serif,system-ui,sans-serif}.item-record-main{display:flex;align-items:center;gap:10px;min-width:0}.item-thumb{width:42px;height:42px;flex:none;border-radius:10px;object-fit:cover}.item-thumb.placeholder{display:grid;place-items:center;background:#fff0f2;color:var(--red);font-size:17px}.item-detail-image{display:block;width:min(100%,280px);max-height:220px;margin:14px 0;border:1px solid var(--line);border-radius:12px;object-fit:contain;background:#fbfcfe}.item-description{color:#475467;font-size:13px;line-height:1.55;white-space:pre-wrap}.photo-current{align-items:start}.photo-current label{display:flex;align-items:center;gap:8px}.photo-current input[type=checkbox]{width:auto;height:auto}

.main-content{width:min(calc(100% - 36px),1080px);box-sizing:border-box}.notice>div{min-width:0;max-width:100%;overflow-wrap:anywhere}.notice p{overflow-wrap:anywhere}.form-actions{flex-wrap:wrap}@media(min-width:900px){.bottom-nav{width:min(calc(100% - 36px),510px)}}

.app-shell.auth-mode{min-height:100svh;padding-bottom:0;background:linear-gradient(180deg,#fff 0%,#fff 48%,#fff2f4 100%)}.app-shell.auth-mode .topbar{display:none}.app-shell.auth-mode .main-content{display:grid;min-height:100svh;width:min(100% - 32px,420px);margin:0 auto;align-content:center;padding:32px 0}.auth-screen{width:100%;margin:0;padding:34px 28px 27px;border-radius:22px;text-align:center;box-shadow:0 12px 35px #17203312}.auth-brand-mark{display:grid;width:76px;height:76px;margin:0 auto 17px;place-items:center;border-radius:23px;background:linear-gradient(145deg,#ed1742,#bc0928);color:#fff;font-size:30px;font-weight:900;letter-spacing:-2px;box-shadow:0 10px 24px #c8102e30}.auth-screen .eyebrow{margin-bottom:5px;font-size:10px;letter-spacing:.08em}.auth-screen h1{margin-top:7px;color:#172033;font-size:27px;letter-spacing:-.8px}.auth-subtitle{margin:8px 0 24px;color:var(--muted);font-size:13px;line-height:1.55}.google-sign-in{width:100%;min-height:48px;display:flex;align-items:center;justify-content:center;gap:11px;border:1px solid #e1e5eb;border-radius:10px;background:#fff;color:#344054;font-size:13px;box-shadow:0 2px 6px #1720330b}.google-sign-in:hover{border-color:#c8ced8;background:#fbfcfe}.google-sign-in svg{width:19px;height:19px;flex:none}.auth-note{margin:19px 0 0;color:#8992a2;font-size:10px;line-height:1.5}.auth-screen .inline-error{text-align:left}@media(max-width:480px){.app-shell.auth-mode .main-content{width:min(100% - 28px,420px)}.auth-screen{padding:30px 22px 24px;border-radius:19px}}

.dashboard-welcome{min-height:148px;margin:0 0 17px;padding:24px;border-radius:18px;background:linear-gradient(115deg,#c8102e,#ed3451);box-shadow:0 9px 22px #c8102e26}.dashboard-welcome .eyebrow{color:#ffe0e5}.dashboard-welcome h1{color:#fff;font-size:26px;letter-spacing:-.7px}.dashboard-welcome p:not(.eyebrow){max-width:330px;color:#ffe8eb;line-height:1.5}.summary-card{padding:16px;border-radius:14px}.summary-card strong{font-size:clamp(20px,3vw,27px)}.quick-card{min-height:108px;padding:14px;border-radius:14px}.quick-card>span{background:#fff0f2}.dashboard-section{margin-top:22px}.bottom-nav{box-shadow:0 -4px 18px #17203308}.nav-item.active{background:#fff0f2}

.app-shell[data-current-route="dashboard"] .topbar{background:var(--red);border-bottom-color:#b70e29}.app-shell[data-current-route="dashboard"] .brand{color:#fff}.app-shell[data-current-route="dashboard"] .brand-logo{border-color:#fff}.app-shell[data-current-route="dashboard"] .local-pill{border-color:#ffffff40;background:#ffffff1a;color:#fff}.app-shell[data-current-route="dashboard"] .local-pill i{background:#b6f0d0}.app-shell[data-current-route="dashboard"] .local-pill.error{color:#fff}.app-shell[data-current-route="dashboard"] .local-pill.error i{background:#ffd4da}.app-shell[data-current-route="dashboard"] .text-button{color:#fff}

.bottom-nav{left:50%;right:auto;width:min(calc(100% - 24px),510px);transform:translateX(-50%);border:1px solid #e8ebf1;border-bottom:0;border-radius:17px 17px 0 0}.main-content{padding-bottom:22px}.page-heading{align-items:center;margin-bottom:18px}.page-heading>div{min-width:0}.page-heading .button{flex:none}.card{padding:18px;border-radius:16px;box-shadow:0 3px 14px #17203307}.form-card h2,.card>h2{margin-bottom:15px}.field input,.field select,.field textarea,.search{transition:border-color .15s ease,box-shadow .15s ease}.field input[type="date"],.field input[type="number"],.field input[type="email"],.field input[type="password"]{font-variant-numeric:tabular-nums}.button{min-height:42px;transition:background .15s ease,border-color .15s ease,transform .15s ease}.button:active{transform:translateY(1px)}.button:disabled{opacity:.65;cursor:wait}.record-row{min-width:0}.record-row>div:first-child{overflow-wrap:anywhere}.record-right{max-width:45%;overflow-wrap:anywhere}.record-right .text-button{display:inline-block;margin-left:7px}.filter-row{scrollbar-width:thin}.segmented button{min-height:34px}.stock-in{background:#e8f7ef;color:#18754d}.stock-low{background:#fff4df;color:#8b5a00}.stock-out{background:#fff0f2;color:#b42338}.notice{border-radius:14px}.dashboard-welcome{position:relative;overflow:hidden}.dashboard-welcome:after{position:absolute;right:-34px;bottom:-80px;width:210px;height:210px;border:1px solid #ffffff22;border-radius:50%;content:"";box-shadow:0 0 0 28px #ffffff0b,0 0 0 58px #ffffff09;pointer-events:none}.summary-card{position:relative;overflow:hidden}.summary-card:before{position:absolute;top:0;left:0;width:4px;height:100%;background:#df3650;content:""}.summary-card strong{overflow-wrap:anywhere}.quick-card{transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}.quick-card:not(.planned):hover{transform:translateY(-2px);box-shadow:0 8px 18px #1720330b}.quick-card>span{display:grid;place-items:center}.invoice-table-wrap{max-width:100%;overflow-x:auto}.invoice-table{min-width:620px}.item-detail .section-title>div{flex-wrap:wrap}.report-period,.backup-form{align-items:end}.more-list .card>strong{display:block;margin-bottom:5px;color:#172033}.more-list .card>p{color:var(--muted);font-size:12px;line-height:1.55}.more-list .card>.button{margin:8px 7px 0 0}
.auth-form-screen .form-grid{gap:12px}.auth-form-screen .field{text-align:left}.auth-form-screen .field input{height:46px;border-radius:10px;background:#fbfcfe}.auth-submit{width:100%;min-height:46px;margin-top:16px}.auth-divider{display:flex;align-items:center;gap:12px;margin:20px 0;color:#8a93a3;font-size:10px}.auth-divider:before,.auth-divider:after{height:1px;flex:1;background:#e9ecf1;content:""}.auth-switch{margin:20px 0 0;color:#747f92;font-size:11px}.auth-switch button{padding:0;border:0;background:none;color:var(--red);font:inherit;font-weight:800;cursor:pointer}.auth-message-screen .auth-submit{margin-top:8px}.auth-message-screen strong{color:#344054}
@media(max-width:700px){.main-content{width:min(calc(100% - 24px),1080px);margin:22px auto}.topbar{height:60px;padding:0 14px}.local-pill{padding:6px 9px;font-size:10px}.app-shell[data-current-route="dashboard"] .dashboard-welcome{margin-top:0}.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.summary-card{padding:14px}.summary-card strong{font-size:21px}.dashboard-columns{gap:10px}.card{padding:15px}.page-heading{align-items:flex-start}.page-heading .button{padding:10px 11px;font-size:11px}.record-row{gap:10px;padding:11px}.record-right{max-width:42%}.record-right .text-button{margin-left:0}.bottom-nav{min-height:68px;padding:6px 5px calc(7px + env(safe-area-inset-bottom))}.nav-item{min-width:58px}.quick-card{min-height:95px}.dashboard-welcome{min-height:128px;padding:20px}.dashboard-welcome h1{font-size:24px}}
@media(max-width:420px){.main-content{width:calc(100% - 20px);margin:17px auto}.topbar{padding:0 10px}.brand{gap:7px;font-size:17px}.app-shell .brand-mark{width:34px;height:34px}.local-pill{font-size:9px}.summary-grid{gap:8px}.summary-card{padding:12px}.summary-card strong{font-size:19px}.summary-card small{font-size:9px}.form-grid{grid-template-columns:1fr;gap:11px}.field.full{grid-column:auto}.report-period .inline-error{grid-column:auto}.page-heading h1{font-size:25px}.page-heading .subtitle{font-size:11px}.page-heading .button{max-width:130px;white-space:normal;line-height:1.2}.record-right strong{font-size:12px}.record-row strong{font-size:12px}.nav-item{min-width:52px;padding:5px 4px;font-size:8px}.nav-item span{font-size:19px}.auth-screen{padding:27px 19px 22px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.dashboard-welcome+.summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.bill-payment-mode{margin:0 0 14px}
.stock-tag{display:inline-block;margin-top:5px;padding:4px 7px;border-radius:99px;font-size:9px;font-weight:700}
.drawer-toggle{width:38px;height:38px;border:1px solid #ffffff80;border-radius:11px;background:#ffffff20;color:inherit;font-size:19px;cursor:pointer}
.drawer-backdrop{position:fixed;z-index:10;inset:0;border:0;background:#111b2b66;backdrop-filter:blur(3px)}
.app-drawer{position:fixed;z-index:11;inset:0 auto 0 0;width:min(84vw,320px);overflow-y:auto;padding:18px 14px calc(24px + env(safe-area-inset-bottom));border-right:1px solid #ffffffd9;background:linear-gradient(160deg,#fffffffa,#f3f5ffef);box-shadow:16px 0 42px #19253d26;backdrop-filter:blur(22px) saturate(150%);-webkit-backdrop-filter:blur(22px) saturate(150%)}
.drawer-brand{display:flex;align-items:center;gap:11px;padding:6px 6px 18px;border-bottom:1px solid #e8ebf1}
.drawer-brand>div{display:grid;gap:3px}.drawer-brand strong{font-size:16px}.drawer-brand small{color:var(--muted);font-size:10px}
.drawer-links{display:grid;gap:4px;padding-top:12px}
.drawer-links button{display:flex;align-items:center;gap:12px;min-height:43px;padding:9px 11px;border:0;border-radius:11px;background:transparent;color:#344054;text-align:left;font-size:16px;cursor:pointer}
.drawer-links button span{font-size:12px;font-weight:650}
.drawer-links button:hover,.drawer-links button.active{background:#fff0f3;color:var(--red)}
.drawer-links button[data-auth-action="sign-out"]{margin-top:8px;border-top:1px solid #e8ebf1;border-radius:0 0 11px 11px;color:#a91f34}
@media(max-width:700px){.dashboard-welcome+.summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.header-status{gap:5px}.header-status .local-pill{max-width:118px;overflow:hidden;white-space:nowrap}.drawer-toggle{width:34px;height:34px;flex:none}}

.loading-indicator{width:30px;height:30px;margin:20px auto 0;border:3px solid #f4cbd2;border-top-color:var(--red);border-radius:50%;animation:len-den-spin .8s linear infinite}.loading-screen .auth-note{margin-top:13px}.connection-screen .auth-subtitle{margin-bottom:13px}.connection-help{margin:18px 0 7px;padding:14px;border:1px solid #f2d5da;border-radius:12px;background:#fff8f9;text-align:left}.connection-help strong{display:block;color:#344054;font-size:12px}.connection-help p{margin:6px 0 0;color:#667085;font-size:11px;line-height:1.55}.connection-help code{color:#8e1730;font-size:10px;overflow-wrap:anywhere}.connection-screen .inline-error{padding:11px 12px;border:1px solid #f1c6cd;border-radius:10px;background:#fff5f6;line-height:1.5}.connection-screen .button.secondary{width:100%;margin-top:9px}@keyframes len-den-spin{to{transform:rotate(360deg)}}
.auth-brand-logo{display:block;width:120px;height:120px;margin:0 auto 15px;border-radius:50%;background:#071629;object-fit:contain;box-shadow:0 10px 24px #07162925}.brand-tagline{margin:13px 0 0;color:#344054;font-size:12px;font-weight:700;line-height:1.5}.loading-screen .auth-brand-logo{width:132px;height:132px}

.app-shell:not(.auth-mode){position:relative;isolation:isolate;background:linear-gradient(145deg,#f9faff 0%,#f3f5fa 52%,#fbf8fa 100%)}
.app-shell:not(.auth-mode)::before{position:fixed;z-index:-1;inset:0;pointer-events:none;content:"";background:radial-gradient(ellipse at 12% 18%,#e4e9ff9c,transparent 36%),radial-gradient(ellipse at 88% 35%,#ffdfe59c,transparent 35%),radial-gradient(ellipse at 50% 100%,#e3f2ff80,transparent 42%);background-size:140% 140%;animation:glass-atmosphere 24s ease-in-out infinite alternate}
.app-shell:not(.auth-mode) .topbar{background:#ffffffb8;border-bottom-color:#ffffffd9;backdrop-filter:blur(18px) saturate(155%);-webkit-backdrop-filter:blur(18px) saturate(155%)}
.app-shell:not(.auth-mode)[data-current-route="dashboard"] .topbar{background:linear-gradient(110deg,#b90e2de8,#df2b4be0);border-bottom-color:#ffffff3d;box-shadow:0 6px 22px #9b102d26}
.app-shell:not(.auth-mode) .bottom-nav{background:#fffffff0;border-color:#ffffffed;box-shadow:0 -8px 26px #34415d12;backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%)}
.app-shell:not(.auth-mode) .card,.app-shell:not(.auth-mode) .summary-card,.app-shell:not(.auth-mode) .notice{border-color:#ffffffdd;background:#ffffffbd;box-shadow:0 12px 30px #23304b0d,0 2px 6px #ffffffc7 inset;backdrop-filter:blur(15px) saturate(140%);-webkit-backdrop-filter:blur(15px) saturate(140%)}
.app-shell:not(.auth-mode) .quick-card{position:relative;overflow:hidden;border-color:#ffffffed;background:linear-gradient(145deg,#ffffffed,#ffffffa8);box-shadow:0 11px 26px #26314a10,0 1px 0 #ffffff inset;backdrop-filter:blur(16px) saturate(150%);-webkit-backdrop-filter:blur(16px) saturate(150%)}
.app-shell:not(.auth-mode) .quick-card::after{position:absolute;inset:0;pointer-events:none;content:"";opacity:.36;background:linear-gradient(115deg,transparent 22%,#ffffffa8 42%,transparent 62%);transform:translateX(-130%);transition:transform .65s ease}
.app-shell:not(.auth-mode) .quick-card:hover::after{transform:translateX(130%)}
.app-shell:not(.auth-mode) .quick-card>span{background:linear-gradient(145deg,#fff1f4,#e8edff);box-shadow:0 3px 8px #c8102e10;color:#c8102e;animation:accent-tint 12s linear infinite}
.app-shell:not(.auth-mode) .summary-card{overflow:hidden}
.app-shell:not(.auth-mode) .summary-card::before{background:linear-gradient(180deg,#d51d3a,#637be8,#d51d3a);background-size:100% 220%;animation:accent-flow 8s ease-in-out infinite}
.app-shell:not(.auth-mode) .field input,.app-shell:not(.auth-mode) .field select,.app-shell:not(.auth-mode) .field textarea,.app-shell:not(.auth-mode) .search{border-color:#dfe4ee;background:#ffffffcf;box-shadow:0 2px 5px #1f2c4508 inset;backdrop-filter:blur(8px)}
.app-shell:not(.auth-mode) .button,.app-shell:not(.auth-mode) .nav-item,.app-shell:not(.auth-mode) .filter-chip,.app-shell:not(.auth-mode) .segmented button{transition:transform .18s ease,box-shadow .22s ease,background-color .22s ease,border-color .22s ease,color .22s ease}
.app-shell:not(.auth-mode) .button:hover,.app-shell:not(.auth-mode) .nav-item:hover,.app-shell:not(.auth-mode) .filter-chip:hover{transform:translateY(-2px);box-shadow:0 8px 18px #29375018}
.app-shell:not(.auth-mode) .button.primary{background:linear-gradient(115deg,#c8102e,#e33c59 54%,#b81748);background-size:180% 100%;box-shadow:0 7px 17px #c8102e2a,0 1px 0 #ffffff40 inset}
.app-shell:not(.auth-mode) .button.primary:hover{background-position:100% 0}
.app-shell:not(.auth-mode) .button.secondary{border-color:#ffffff;background:#ffffffa8;box-shadow:0 3px 8px #26314a0a,0 1px 0 #fff inset;backdrop-filter:blur(10px)}
.app-shell:not(.auth-mode) button:focus-visible,.app-shell:not(.auth-mode) a:focus-visible{outline:3px solid #6b83f080;outline-offset:3px}
.app-shell:not(.auth-mode) #main>*{animation:screen-enter .36s cubic-bezier(.2,.7,.25,1) both}
.app-shell:not(.auth-mode) #main>*:nth-child(2){animation-delay:.035s}
.app-shell:not(.auth-mode) #main>*:nth-child(3){animation-delay:.07s}
.app-shell:not(.auth-mode) .form-card{border-radius:20px}
.auth-screen{border:1px solid #ffffffdf;background:linear-gradient(145deg,#fffffff0,#ffffffba);box-shadow:0 20px 55px #3a284018,0 1px 0 #ffffff inset;backdrop-filter:blur(20px) saturate(145%);-webkit-backdrop-filter:blur(20px) saturate(145%)}
.auth-form-screen .field input{border-color:#ffffff;background:#ffffffb8;box-shadow:0 2px 6px #26314a08 inset;backdrop-filter:blur(8px)}
.scanner-view{position:relative;overflow:hidden;border:1px solid #ffffff;border-radius:16px;background:#101b2c;box-shadow:0 12px 28px #1720331b}
.scanner-view video{display:block;width:100%;max-height:360px;object-fit:cover}
.scanner-frame{position:absolute;inset:20% 14%;border:2px solid #ffffffc9;border-radius:16px;box-shadow:0 0 0 999px #06101c40;pointer-events:none}
.scanner-message{color:#667085;font-size:12px;line-height:1.55}
.scanner-view+.scanner-message{text-align:center}
@keyframes glass-atmosphere{0%{background-position:0 0,100% 0,50% 100%;filter:hue-rotate(0deg)}100%{background-position:18% 12%,82% 22%,56% 84%;filter:hue-rotate(18deg)}}
@keyframes accent-tint{0%,100%{filter:hue-rotate(0deg)}50%{filter:hue-rotate(30deg)}}
@keyframes accent-flow{0%,100%{background-position:0 0}50%{background-position:0 100%}}
@keyframes screen-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.app-shell:not(.auth-mode)::before,.app-shell:not(.auth-mode) .quick-card>span,.app-shell:not(.auth-mode) .summary-card::before{animation:none}.app-shell:not(.auth-mode) #main>*{animation:none}}
