: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: 0; 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}
.auth-forgot-link{display:block;margin:10px 0 0 auto;padding:4px 0;border:0;background:none;color:var(--red);font-size:11px;font-weight:700;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-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}}

.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}}

@media(max-width:700px){
  .app-shell:not(.auth-mode)::before{position:absolute;background:radial-gradient(ellipse at 12% 18%,#e4e9ff80,transparent 36%),radial-gradient(ellipse at 88% 35%,#ffdfe580,transparent 35%);animation:none;filter:none}
  .app-shell:not(.auth-mode) .topbar,
  .app-shell:not(.auth-mode) .bottom-nav,
  .app-shell:not(.auth-mode) .card,
  .app-shell:not(.auth-mode) .summary-card,
  .app-shell:not(.auth-mode) .notice,
  .app-shell:not(.auth-mode) .quick-card,
  .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,
  .app-shell:not(.auth-mode) .button.secondary{
    -webkit-backdrop-filter:none;
    backdrop-filter:none;
  }
  .app-shell:not(.auth-mode) .card,
  .app-shell:not(.auth-mode) .summary-card,
  .app-shell:not(.auth-mode) .notice,
  .app-shell:not(.auth-mode) .quick-card{
    background:#fff;
    box-shadow:0 3px 12px #23304b0b;
  }
  .app-shell:not(.auth-mode) button:focus:not(:focus-visible),
  .app-shell:not(.auth-mode) a:focus:not(:focus-visible){
    outline:none;
    box-shadow:none;
  }
  .app-shell:not(.auth-mode) button,
  .app-shell:not(.auth-mode) a{
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
  .app-shell:not(.auth-mode) button:focus-visible,
  .app-shell:not(.auth-mode) a:focus-visible{
    outline-color:#c8102e80;
  }
}

.app-shell.auth-mode{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  background:linear-gradient(180deg,#fff 0%,#fff8f9 68%,#ffe4e9 100%);
}
.app-shell.auth-mode::before{
  position:absolute;
 z-index:-1;
 right:-18%;
 bottom:-11%;
 left:-18%;
 height:30%;
 border-radius:50% 50% 0 0;
 background:linear-gradient(155deg,#ff3855,#c8102e 64%,#9f0b26);
 box-shadow:0 -16px 38px #c8102e20;
 content:"";
}
.app-shell.auth-mode::after{
  position:absolute;
 z-index:-1;
 right:-22%;
 bottom:-19%;
 left:-15%;
 height:29%;
 border-radius:50% 50% 0 0;
 background:linear-gradient(160deg,#e82243,#a70c29);
 content:"";
}
.app-shell.auth-mode .main-content{position:relative;z-index:1}
.app-shell.auth-mode .auth-screen{
  border:1px solid #f3d9de;
  border-top:4px solid #c8102e;
  border-radius:24px;
  background:#ffffff;
  box-shadow:0 18px 48px #6d18301a,0 2px 8px #c8102e0d;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.app-shell.auth-mode .auth-brand-logo{
  width:92px;
  height:92px;
  padding:4px;
  border:2px solid #ffe3e8;
  background:#fff;
  box-shadow:0 8px 20px #c8102e1a;
}
.app-shell.auth-mode .auth-screen .eyebrow{color:#c8102e}
.app-shell.auth-mode .auth-screen h1{color:#172033}
.app-shell.auth-mode .auth-form-screen .field input,
.app-shell.auth-mode .auth-form-screen .field select{
  min-height:46px;
  border:1px solid #e7dfe2;
  border-radius:12px;
  background:#fff;
  box-shadow:inset 0 1px 2px #29131a08;
}
.app-shell.auth-mode .auth-form-screen .field input:focus,
.app-shell.auth-mode .auth-form-screen .field select:focus{
  border-color:#c8102e;
  outline:2px solid #c8102e20;
  outline-offset:1px;
  box-shadow:none;
}
.app-shell.auth-mode .auth-submit{
  min-height:48px;
  border-radius:13px;
  background:linear-gradient(110deg,#c8102e,#e62f4d 58%,#b20f31);
  box-shadow:0 7px 16px #c8102e2b;
}
.app-shell.auth-mode .google-sign-in{
  min-height:46px;
  border-radius:12px;
  background:#fff;
  box-shadow:0 2px 7px #1720330b;
}
.app-shell.auth-mode .auth-switch button{color:#c8102e}
.app-shell.auth-mode .auth-note{color:#667085}

.app-shell:not(.auth-mode) .topbar{
  border-bottom:0;
  background:linear-gradient(110deg,#b90e2d,#df2b4b);
  box-shadow:0 4px 14px #9b102d1c;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.app-shell:not(.auth-mode) .brand,
.app-shell:not(.auth-mode) .header-status .text-button{color:#fff}
.app-shell:not(.auth-mode) .brand-logo{border-color:#fff}
.app-shell:not(.auth-mode) .local-pill{
  border-color:#ffffff50;
  background:#ffffff1a;
  color:#fff;
}
.app-shell:not(.auth-mode) .local-pill i{background:#b6f0d0}
.app-shell:not(.auth-mode) .button.primary{
  border-radius:12px;
  background:linear-gradient(110deg,#c8102e,#e62f4d 58%,#b20f31);
  box-shadow:0 5px 13px #c8102e24;
}
.app-shell:not(.auth-mode) .card,
.app-shell:not(.auth-mode) .summary-card,
.app-shell:not(.auth-mode) .notice,
.app-shell:not(.auth-mode) .quick-card{
  border-color:#eee3e6;
  border-radius:17px;
}
.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-radius:11px;
}
.app-shell:not(.auth-mode) .nav-item.active,
.app-shell:not(.auth-mode) .nav-item[aria-expanded="true"]{
  background:#fff0f2;
  color:#b90e2d;
}
.app-shell:not(.auth-mode) button:focus-visible,
.app-shell:not(.auth-mode) a:focus-visible{
  outline-color:#c8102e80;
}
@media(max-width:480px){
  .app-shell.auth-mode .main-content{align-content:center;padding:22px 0}
  .app-shell.auth-mode .auth-screen{padding:27px 20px 22px}
  .app-shell.auth-mode .auth-brand-logo{width:78px;height:78px}
  .app-shell.auth-mode::before{height:25%;bottom:-8%}
  .app-shell.auth-mode::after{height:24%;bottom:-15%}
}
@media(prefers-reduced-motion:reduce){
  .app-shell.auth-mode::before,
  .app-shell.auth-mode::after{animation:none}
}

.dashboard-welcome{
  min-height:116px;
  margin:4px 0 14px;
  padding:18px 20px;
  border-radius:17px;
  background:linear-gradient(112deg,#c8102e,#ec3150);
  box-shadow:0 7px 18px #c8102e22;
}
.dashboard-welcome .eyebrow{color:#ffe0e5;font-size:10px}
.dashboard-welcome h1{color:#fff;font-size:24px}
.dashboard-welcome p:not(.eyebrow){margin-top:5px;color:#ffe8eb;font-size:12px}
.app-shell:not(.auth-mode) .summary-card{
  position:relative;
  min-width:0;
  padding:13px;
  overflow:hidden;
  border:1px solid #f1e5e8;
  border-radius:14px;
  background:#fff;
  box-shadow:0 4px 12px #27334a0b;
}
.app-shell:not(.auth-mode) .summary-card::before{
  width:3px;
  background:linear-gradient(180deg,#ef3c59,#bf0f2d);
}
.summary-card span{font-size:10px}
.summary-card strong{margin-top:5px;font-size:clamp(17px,5vw,22px);white-space:nowrap}
.summary-card small{font-size:9px;line-height:1.35}
.dashboard-section{margin:17px 0}
.dashboard-section>h2,.section-title h2{font-size:15px}
.quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.quick-card{
  min-height:78px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  grid-template-rows:auto auto;
  align-content:center;
  column-gap:10px;
  row-gap:3px;
  padding:11px;
  border:1px solid #f0e2e5;
  border-radius:13px;
  background:#fff;
  box-shadow:0 3px 10px #27334a0a;
}
.quick-card>span{grid-row:1/3;width:32px;height:32px;margin:0;border-radius:10px;background:#fff0f2;color:#c8102e}
.quick-card strong{align-self:end;font-size:11px}
.quick-card small{align-self:start;margin:0;font-size:9px;line-height:1.3}
.dashboard-shortcuts{
  display:flex;
  gap:8px;
  margin-top:10px;
  overflow-x:auto;
  scrollbar-width:none;
}
.dashboard-shortcuts::-webkit-scrollbar{display:none}
.shortcut-button{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:none;
  padding:6px 11px;
  border:1px solid #f0d9de;
  border-radius:999px;
  background:#fff;
  color:#b90e2d;
  font-size:11px;
  font-weight:700;
}
.shortcut-button span{color:#344054}
.dashboard-columns{gap:10px;margin-top:14px}
.dashboard-columns>.card{padding:14px;border:1px solid #eee3e6;border-radius:15px;background:#fff;box-shadow:0 4px 12px #27334a0a}
.dashboard-columns .section-title h2{font-size:14px}
.dashboard-columns .section-title span{font-size:9px}
.sales-chart{height:142px;margin-top:12px;gap:6px}
.chart-value{font-size:8px}
.chart-track i{width:min(20px,60%);background:linear-gradient(180deg,#ed4962,#c8102e)}
.dashboard-columns .record-list{gap:6px;margin-top:10px}
.dashboard-columns .record-row{padding:10px;border-color:#f0e8ea;border-radius:11px}
.dashboard-sync-notice{margin:12px 0;padding:11px 12px;border-left-width:3px;border-radius:12px;background:#fff}
.dashboard-sync-notice .notice-icon{width:26px;height:26px;border-radius:9px}
.dashboard-sync-notice strong{font-size:11px}
.dashboard-sync-notice p{font-size:10px}
.dashboard-counts{font-size:9px}
.page-heading{
  align-items:center;
  margin:5px 0 15px;
  padding-bottom:11px;
  border-bottom:1px solid #f0e1e4;
}
.page-heading .eyebrow{font-size:9px}
.page-heading h1{font-size:24px;letter-spacing:-.5px}
.page-heading .subtitle{font-size:11px;line-height:1.4}
.app-shell:not(.auth-mode) .card{
  border-color:#eee3e6;
  border-radius:15px;
  background:#fff;
  box-shadow:0 4px 13px #27334a0a;
}
.record-list{gap:8px}
.record-row{
  padding:11px;
  border:1px solid #f0e7e9;
  border-radius:12px;
  background:#fff;
}
.record-row strong{font-size:12px}
.record-row small{font-size:9px}
.record-right strong{font-size:12px}
.record-right .text-button{
  display:block;
  width:max-content;
  margin:5px 0 0 auto;
  padding:2px 0;
  text-align:right;
}
.record-right .text-button:disabled{opacity:.5}
.item-thumb{width:48px;height:48px;border:1px solid #f3e7e9;border-radius:11px}
.item-thumb.placeholder{background:#fff1f3;color:#c8102e}
.filter-chip{padding:7px 11px;border-color:#f0e1e4;font-size:10px}
.filter-chip.selected{border-color:#c8102e;background:#c8102e}
.field{font-size:11px}
.field input,.field select,.field textarea,.search{min-height:44px;border-color:#e9dfe2;border-radius:11px}
.form-card{border-top:3px solid #c8102e!important}
.form-card h2{font-size:16px}
.button{min-height:42px}
.bottom-nav{
  min-height:68px;
  border:1px solid #eee3e6;
  border-bottom:0;
  border-radius:17px 17px 0 0;
  background:#fff;
  box-shadow:0 -4px 16px #27334a0c;
}
.drawer-links button.active,.drawer-links button:hover{background:#fff0f2;color:#b90e2d}
@media(min-width:801px){
  .quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:700px){
  .main-content{margin:15px auto 20px}
  .dashboard-welcome{min-height:105px;padding:16px}
  .dashboard-welcome h1{font-size:22px}
  .summary-grid{gap:8px}
  .dashboard-section{margin:15px 0}
  .quick-card{min-height:74px;padding:9px}
  .dashboard-columns{grid-template-columns:1fr}
  .dashboard-columns>.card{margin-bottom:9px}
  .sales-chart{height:126px}
  .page-heading{gap:8px}
  .page-heading h1{font-size:21px}
  .page-heading .button{max-width:45%;white-space:normal}
  .form-grid{gap:11px}
  .form-actions .button{flex:1}
  .bottom-nav{width:calc(100% - 24px)}
}
@media(max-width:380px){
  .dashboard-welcome h1{font-size:20px}
  .summary-card{padding:11px!important}
  .summary-card strong{font-size:17px}
  .quick-card{grid-template-columns:29px minmax(0,1fr);column-gap:7px}
  .quick-card>span{width:28px;height:28px}
}

:root{
  --red:#c8102e;
  --red-dark:#a90d27;
  --muted:#758096;
  --line:#e9e3e5;
  color-scheme:light;
}

.app-shell:not(.auth-mode){
  background:#f7f7f9;
}
.app-shell:not(.auth-mode)::before{
  display:none;
}
.app-shell:not(.auth-mode) .topbar{
  min-height:62px;
  background:linear-gradient(110deg,#b90e2d,#d91c3c);
  box-shadow:0 3px 12px #9b102d20;
}
.app-shell:not(.auth-mode) .brand{
  font-size:18px;
}
.app-shell:not(.auth-mode) .brand-logo{
  width:36px;
  height:36px;
}
.app-shell:not(.auth-mode) .main-content{
  margin-top:20px;
  padding-bottom:30px;
}
.app-shell:not(.auth-mode) .page-heading{
  padding-bottom:13px;
  border-bottom:1px solid #eee3e6;
}
.app-shell:not(.auth-mode) .page-heading h1{
  color:#182337;
}
.app-shell:not(.auth-mode) .card,
.app-shell:not(.auth-mode) .summary-card,
.app-shell:not(.auth-mode) .notice{
  border:1px solid #eee7e9;
  background:#fff;
  box-shadow:0 3px 11px #29324709;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.app-shell:not(.auth-mode) .quick-card{
  border:1px solid #eee3e6;
  background:#fff;
  box-shadow:0 3px 10px #29324709;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.app-shell:not(.auth-mode) .quick-card::after{
  display:none;
}
.app-shell:not(.auth-mode) .quick-card>span{
  background:#fff0f2;
  color:#c8102e;
  box-shadow:none;
}
.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{
  min-height:46px;
  border:1px solid #e6dfe2;
  border-radius:11px;
  background:#fff;
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.app-shell:not(.auth-mode) .field input:focus,
.app-shell:not(.auth-mode) .field select:focus,
.app-shell:not(.auth-mode) .field textarea:focus,
.app-shell:not(.auth-mode) .search:focus{
  border-color:#c8102e;
  outline:3px solid #c8102e18;
  outline-offset:1px;
  box-shadow:none;
}
.app-shell:not(.auth-mode) .button.primary{
  background:linear-gradient(110deg,#b90e2d,#e52c4b);
  box-shadow:0 4px 11px #c8102e25;
}
.app-shell:not(.auth-mode) .button.secondary{
  border:1px solid #e8e1e3;
  background:#fff;
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.app-shell:not(.auth-mode) .record-row{
  border-color:#f0e8ea;
  background:#fff;
}
.app-shell:not(.auth-mode) .bottom-nav{
  min-height:66px;
  background:#fff;
  border-color:#eee3e6;
  box-shadow:0 -3px 12px #2932470d;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.app-shell:not(.auth-mode) .nav-item.active,
.app-shell:not(.auth-mode) .nav-item[aria-expanded="true"]{
  color:#b90e2d;
  background:#fff0f2;
}
.app-shell.auth-mode{
  min-height:100svh;
  background:linear-gradient(155deg,#fff 0%,#fff 61%,#fff3f5 100%);
}
.app-shell.auth-mode .auth-screen{
  border:1px solid #f1dfe3;
  border-top:0;
  border-radius:24px;
  background:#fff;
  box-shadow:0 14px 36px #62162717;
}
.app-shell.auth-mode .auth-brand-logo{
  width:84px;
  height:84px;
  padding:4px;
  border:1px solid #f0e2e5;
  border-radius:20px;
  background:#fff;
  box-shadow:0 5px 14px #c8102e15;
}
.app-shell.auth-mode .auth-submit{
  background:linear-gradient(110deg,#b90e2d,#e52c4b);
}
.app-shell.auth-mode .auth-form-screen .field input,
.app-shell.auth-mode .auth-form-screen .field select{
  min-height:48px;
}

@media(max-width:700px){
  .app-shell:not(.auth-mode) .topbar{
    height:58px;
    min-height:58px;
    padding-left:14px;
    padding-right:14px;
  }
  .app-shell:not(.auth-mode) .brand{
    gap:8px;
    font-size:17px;
  }
  .app-shell:not(.auth-mode) .brand-logo{
    width:34px;
    height:34px;
  }
  .app-shell:not(.auth-mode) .main-content{
    width:calc(100% - 24px);
    margin:15px auto 20px;
    padding-bottom:28px;
  }
  .app-shell:not(.auth-mode) .dashboard-welcome{
    min-height:105px;
    margin-bottom:12px;
    padding:15px;
    border-radius:16px;
    box-shadow:0 5px 13px #c8102e1f;
  }
  .app-shell:not(.auth-mode) .dashboard-welcome h1{
    font-size:22px;
  }
  .app-shell:not(.auth-mode) .summary-grid{
    gap:8px;
    margin-bottom:12px;
  }
  .app-shell:not(.auth-mode) .summary-card{
    padding:12px 10px;
    border-radius:13px;
  }
  .app-shell:not(.auth-mode) .summary-card span{
    font-size:10px;
  }
  .app-shell:not(.auth-mode) .summary-card strong{
    font-size:clamp(15px,4.7vw,20px);
  }
  .app-shell:not(.auth-mode) .quick-grid{
    gap:8px;
  }
  .app-shell:not(.auth-mode) .quick-card{
    min-height:72px;
    padding:9px;
    border-radius:12px;
  }
  .app-shell:not(.auth-mode) .card{
    padding:14px;
    border-radius:14px;
  }
  .app-shell:not(.auth-mode) .record-row{
    padding:10px;
    border-radius:11px;
  }
  .app-shell:not(.auth-mode) .bottom-nav{
    left:0;
    right:0;
    bottom:0;
    width:100%;
    min-height:calc(64px + env(safe-area-inset-bottom));
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));
    transform:none;
    border-right:0;
    border-bottom:0;
    border-left:0;
    border-radius:15px 15px 0 0;
  }
  .app-shell:not(.auth-mode) .nav-item{
    min-width:60px;
    min-height:48px;
    font-size:10px;
  }
  .app-shell:not(.auth-mode) .nav-item span{
    font-size:19px;
  }
  .app-shell:not(.auth-mode) .button,
  .app-shell:not(.auth-mode) .shortcut-button,
  .app-shell:not(.auth-mode) .segmented button,
  .app-shell:not(.auth-mode) .filter-chip{
    min-height:42px;
  }
  .app-shell:not(.auth-mode) .drawer-backdrop{
    touch-action:manipulation;
  }
  .app-shell.auth-mode .main-content{
    width:min(calc(100% - 28px),420px);
  }
  .app-shell.auth-mode .auth-screen{
    padding:27px 20px 23px;
    border-radius:22px;
  }
}

@media(max-width:380px){
  .app-shell:not(.auth-mode) .local-pill{
    gap:0;
    padding:8px;
    font-size:0;
  }
  .app-shell:not(.auth-mode) .local-pill i{
    flex:0 0 8px;
  }
  .app-shell:not(.auth-mode) .summary-card{
    padding:10px 8px;
  }
  .app-shell:not(.auth-mode) .summary-card strong{
    font-size:15px;
  }
}

@media(prefers-reduced-motion:reduce){
  .app-shell:not(.auth-mode) *,
  .app-shell.auth-mode *{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

.app-shell:not(.auth-mode) .app-drawer{
  border-right-color:#f0e2e5;
  background:#fff;
  box-shadow:12px 0 30px #1720331f;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
.app-shell:not(.auth-mode) .drawer-brand{
  border-bottom-color:#f0e5e7;
}
.app-shell:not(.auth-mode) .drawer-links button{
  min-height:46px;
  border-radius:12px;
}
.app-shell:not(.auth-mode) .drawer-links button.active{
  background:#fff0f2;
  color:#b90e2d;
}
.app-shell:not(.auth-mode) .drawer-links button[data-auth-action="sign-out"]{
  color:#a91f34;
}
.app-shell:not(.auth-mode) .page-heading{
  align-items:center;
  padding:0 0 12px;
  border-bottom:1px solid #eee3e6;
}
.app-shell:not(.auth-mode) .page-heading h1{
  font-size:clamp(21px,3vw,27px);
  letter-spacing:-.55px;
}
.app-shell:not(.auth-mode) .page-heading .eyebrow{
  margin-bottom:3px;
  font-size:9px;
}
.app-shell:not(.auth-mode) .page-heading .subtitle{
  margin-top:4px;
  font-size:11px;
}
.app-shell:not(.auth-mode) .section-title{
  align-items:center;
}
.app-shell:not(.auth-mode) .section-title h2,
.app-shell:not(.auth-mode) .card>h2{
  color:#202a3b;
}
.app-shell:not(.auth-mode) .filter-row,
.app-shell:not(.auth-mode) .filter-chips{
  gap:7px;
  padding-bottom:4px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
}
.app-shell:not(.auth-mode) .filter-row::-webkit-scrollbar,
.app-shell:not(.auth-mode) .filter-chips::-webkit-scrollbar{
  display:none;
}
.app-shell:not(.auth-mode) .filter-chip{
  min-height:36px;
  border-color:#eee3e6;
  background:#fff;
  color:#4b5567;
}
.app-shell:not(.auth-mode) .filter-chip.selected{
  border-color:#c8102e;
  background:#c8102e;
  color:#fff;
}
.app-shell:not(.auth-mode) .segmented{
  width:100%;
  display:grid;
  grid-auto-columns:1fr;
  grid-auto-flow:column;
  padding:4px;
  border:1px solid #f0e5e7;
  border-radius:12px;
  background:#fff7f8;
}
.app-shell:not(.auth-mode) .segmented button{
  min-height:38px;
  border-radius:9px;
}
.app-shell:not(.auth-mode) .segmented button.selected{
  background:#c8102e;
  box-shadow:0 3px 8px #c8102e24;
}
.app-shell:not(.auth-mode) .bill-totals,
.app-shell:not(.auth-mode) .grand-total{
  border-color:#f0e4e6;
  border-radius:13px;
  background:#fffafb;
}
.app-shell:not(.auth-mode) .bill-totals .grand-total{
  border-top-color:#eee0e3;
}
.app-shell:not(.auth-mode) .bill-totals .grand-total strong{
  color:#c8102e;
}
.app-shell:not(.auth-mode) .sales-chart{
  min-width:0;
  border-bottom:1px solid #f0e7e9;
}
.app-shell:not(.auth-mode) .chart-track{
  border-radius:8px 8px 2px 2px;
  background:#fff0f2;
}
.app-shell:not(.auth-mode) .chart-track i{
  border-radius:8px 8px 2px 2px;
  background:linear-gradient(180deg,#ef556b,#c8102e);
}
.app-shell:not(.auth-mode) .stock-tag{
  padding:5px 8px;
}
.app-shell:not(.auth-mode) .scanner-view{
  border:1px solid #e8dfe2;
  border-radius:14px;
  box-shadow:none;
}
.app-shell:not(.auth-mode) .item-thumb{
  border-color:#f0e4e6;
  border-radius:10px;
}
.app-shell:not(.auth-mode) .summary-card::before{
  width:3px;
  background:#d92e49;
}
.app-shell:not(.auth-mode) .summary-card strong,
.app-shell:not(.auth-mode) .record-right strong,
.app-shell:not(.auth-mode) .bill-totals strong{
  font-variant-numeric:tabular-nums;
}
.app-shell:not(.auth-mode) .notice{
  border-left:3px solid #c8102e;
}
.app-shell:not(.auth-mode) .notice-icon{
  border-radius:9px;
  background:#fff0f2;
}
.app-shell:not(.auth-mode) .text-button{
  min-height:36px;
  color:#b90e2d;
  font-weight:700;
}
.app-shell:not(.auth-mode) .record-right .text-button{
  min-height:34px;
}
.app-shell:not(.auth-mode) input,
.app-shell:not(.auth-mode) select,
.app-shell:not(.auth-mode) textarea{
  accent-color:#c8102e;
}
.app-shell:not(.auth-mode) input[type="checkbox"]{
  width:18px;
  height:18px;
}
.app-shell:not(.auth-mode) .toast{
  max-width:min(440px,calc(100vw - 28px));
  border:1px solid #ffffff20;
  border-radius:13px;
}

@media(max-width:700px){
  .app-shell:not(.auth-mode) .page-heading{
    align-items:center;
    flex-direction:row;
    gap:10px;
  }
  .app-shell:not(.auth-mode) .page-heading .button{
    max-width:48%;
    min-height:42px;
    padding:9px 11px;
    font-size:11px;
  }
  .app-shell:not(.auth-mode) .section-title{
    gap:7px;
  }
  .app-shell:not(.auth-mode) .section-title h2{
    font-size:14px;
  }
  .app-shell:not(.auth-mode) .form-actions{
    flex-direction:column-reverse;
    gap:8px;
  }
  .app-shell:not(.auth-mode) .form-actions>.button{
    width:100%;
  }
  .app-shell:not(.auth-mode) .report-period,
  .app-shell:not(.auth-mode) .backup-form{
    grid-template-columns:1fr;
  }
  .app-shell:not(.auth-mode) .report-period .inline-error{
    grid-column:auto;
  }
  .app-shell:not(.auth-mode) .record-right{
    max-width:46%;
  }
}

@media(max-width:360px){
  .app-shell:not(.auth-mode) .page-heading h1{
    font-size:19px;
  }
  .app-shell:not(.auth-mode) .page-heading .subtitle{
    font-size:10px;
  }
  .app-shell:not(.auth-mode) .page-heading .button{
    max-width:44%;
    padding:8px;
    font-size:10px;
  }
  .app-shell:not(.auth-mode) .record-right{
    max-width:44%;
  }
}

.app-shell:not(.auth-mode) .topbar{
  background:linear-gradient(112deg,#a80d29 0%,#d51235 54%,#ed3551 100%);
  box-shadow:0 4px 13px #8f10261f,inset 0 1px #ffffff42;
}
.app-shell:not(.auth-mode) .brand-logo{
  border:1px solid #ffffffb3;
  background:#fff;
  box-shadow:0 2px 7px #490a1a36,inset 0 1px #fff;
}
.app-shell:not(.auth-mode) .local-pill{
  border-color:#ffffff64;
  background:linear-gradient(145deg,#ffffff36,#ffffff12);
  box-shadow:inset 0 1px #ffffff36;
}
.app-shell:not(.auth-mode) .dashboard-welcome{
  border:1px solid #ed5368;
  background:
    radial-gradient(ellipse at 87% 15%,#ffadb957,transparent 37%),
    linear-gradient(122deg,#ad0b2b 0%,#d51235 57%,#ee3653 100%);
  box-shadow:0 8px 18px #b90e2d29,inset 0 1px #ffffff57;
}
.app-shell:not(.auth-mode) .dashboard-welcome:after{
  border-color:#ffffff32;
  box-shadow:0 0 0 26px #ffffff10,0 0 0 54px #ffffff08;
}
.app-shell:not(.auth-mode) .card,
.app-shell:not(.auth-mode) .summary-card,
.app-shell:not(.auth-mode) .notice{
  background:linear-gradient(148deg,#fff 0%,#fff 64%,#fffafb 100%);
  border-color:#f0e2e5;
  box-shadow:0 5px 15px #8c20300b,inset 0 1px #fff;
}
.app-shell:not(.auth-mode) .quick-card{
  background:linear-gradient(145deg,#fff 0%,#fff 74%,#fff8fa 100%);
  border-color:#f0dfe3;
  box-shadow:0 5px 13px #8c20300c,inset 0 1px #fff;
}
.app-shell:not(.auth-mode) .quick-card>span{
  border:1px solid #ffe1e6;
  background:linear-gradient(145deg,#fff,#ffecef);
  box-shadow:0 3px 8px #c8102e10,inset 0 1px #fff;
}
.app-shell:not(.auth-mode) .button.primary{
  position:relative;
  overflow:hidden;
  border:1px solid #b50d2a;
  background:linear-gradient(110deg,#b90e2d 0%,#e22848 60%,#c91031 100%);
  box-shadow:0 5px 13px #c8102e2c,inset 0 1px #ffffff52,inset 0 -1px #78091d33;
}
.app-shell:not(.auth-mode) .button.primary::before{
  position:absolute;
  inset:0 0 auto;
  height:48%;
  border-radius:inherit;
  background:linear-gradient(180deg,#ffffff3c,#ffffff00);
  content:"";
  pointer-events:none;
}
.app-shell:not(.auth-mode) .button.secondary{
  background:linear-gradient(150deg,#fff,#fff9fa);
  box-shadow:0 2px 6px #63303a0a,inset 0 1px #fff;
}
.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{
  background:linear-gradient(180deg,#fff 0%,#fff 72%,#fffafb 100%);
  box-shadow:inset 0 1px 2px #49202a0a,0 1px #fff;
}
.app-shell:not(.auth-mode) .bottom-nav{
  background:linear-gradient(180deg,#fff,#fffafb);
  box-shadow:0 -4px 14px #4f25300d,inset 0 1px #fff;
}
.app-shell:not(.auth-mode) .nav-item.active{
  border:1px solid #ffe0e5;
  background:linear-gradient(145deg,#fff7f8,#ffecef);
}
.app-shell:not(.auth-mode) .filter-chip.selected,
.app-shell:not(.auth-mode) .segmented button.selected{
  background:linear-gradient(110deg,#b90e2d,#e52c4b);
  box-shadow:0 3px 9px #c8102e25,inset 0 1px #ffffff40;
}
.app-shell:not(.auth-mode) .bill-totals{
  background:linear-gradient(145deg,#fff,#fff8f9);
  box-shadow:inset 0 1px #fff;
}
.app-shell:not(.auth-mode) .chart-track{
  border:1px solid #ffe1e5;
  background:linear-gradient(180deg,#fff7f8,#ffedf0);
}
.app-shell:not(.auth-mode) .chart-track i{
  background:linear-gradient(180deg,#f26478 0%,#dc2141 100%);
  box-shadow:inset 0 1px #ffffff4d;
}
.app-shell:not(.auth-mode) .app-drawer{
  background:linear-gradient(145deg,#fff,#fffafb);
  box-shadow:12px 0 32px #59182924,inset -1px 0 #fff;
}
.app-shell:not(.auth-mode) .drawer-brand .brand-logo{
  background:#fff;
}
.app-shell.auth-mode{
  background:
    radial-gradient(ellipse at 50% 5%,#fff 0%,#fff 44%,transparent 73%),
    linear-gradient(180deg,#fff 0%,#fff9fa 68%,#ffe8ec 100%);
}
.app-shell.auth-mode::before{
  z-index:0;
  right:-15%;
  bottom:-5%;
  left:-15%;
  height:25%;
  border-radius:52% 48% 0 0 / 16% 18% 0 0;
  background:
    linear-gradient(165deg,transparent 0 14%,#ffffff66 15% 17%,transparent 19%),
    linear-gradient(150deg,#fa536b 0%,#d81437 42%,#9f0b26 100%);
  box-shadow:0 -5px 17px #c8102e25,inset 0 3px 8px #ffffff35;
}
.app-shell.auth-mode::after{
  z-index:0;
  right:-20%;
  bottom:-13%;
  left:-13%;
  height:23%;
  border-radius:55% 48% 0 0 / 18% 15% 0 0;
  background:linear-gradient(155deg,#ed3855 0%,#bd0c2d 63%,#8c0a23 100%);
  box-shadow:0 -3px 14px #75091b25,inset 0 2px 8px #ffffff28;
}
.app-shell.auth-mode .main-content{
  z-index:1;
}
.app-shell.auth-mode .auth-screen{
  border:1px solid #f4dce1;
  background:linear-gradient(145deg,#fff 0%,#fff 68%,#fffafb 100%);
  box-shadow:0 16px 38px #5918291a,inset 0 1px #fff;
}
.app-shell.auth-mode .auth-brand-logo{
  border:1px solid #f2e3e6;
  box-shadow:0 6px 16px #74162817,inset 0 1px #fff;
}
.app-shell.auth-mode .auth-form-screen .field input,
.app-shell.auth-mode .auth-form-screen .field select{
  background:linear-gradient(180deg,#fff,#fffafb);
  box-shadow:inset 0 1px 2px #49202a0b,0 1px #fff;
}
.app-shell.auth-mode .auth-submit{
  position:relative;
  overflow:hidden;
  border:1px solid #a80d29;
  background:linear-gradient(110deg,#aa0d2a 0%,#e01e3f 58%,#b70c2b 100%);
  box-shadow:0 6px 14px #c8102e35,inset 0 1px #ffffff55,inset 0 -1px #74091c40;
}
.app-shell.auth-mode .auth-submit::before{
  position:absolute;
  inset:0 0 auto;
  height:48%;
  border-radius:inherit;
  background:linear-gradient(180deg,#ffffff48,#ffffff00);
  content:"";
  pointer-events:none;
}
.app-shell.auth-mode .google-sign-in{
  border-color:#e8e1e3;
  background:linear-gradient(145deg,#fff,#fffafb);
  box-shadow:0 3px 8px #4a2b300d,inset 0 1px #fff;
}

@media(max-width:700px){
  .app-shell.auth-mode::before{
    height:23%;
  }
  .app-shell.auth-mode::after{
    height:21%;
  }
}

@keyframes len-den-enter{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes len-den-logo-float{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-4px)}
}
@keyframes len-den-wave{
  from{transform:translate3d(-1.5%,0,0) scale(1)}
  to{transform:translate3d(1.5%,-3px,0) scale(1.015)}
}
@keyframes len-den-bar-rise{
  from{transform:scaleY(.08);opacity:.45}
  to{transform:scaleY(1);opacity:1}
}

.app-shell button,
.app-shell a{
  -webkit-tap-highlight-color:transparent;
}
.app-shell button:not(:disabled),
.app-shell a{
  transition:transform .18s ease,box-shadow .2s ease,filter .18s ease,background-color .18s ease,border-color .18s ease;
}
.app-shell button:not(:disabled):active,
.app-shell a:active{
  transform:translateY(1px) scale(.98);
  filter:brightness(.97);
}
.app-shell:not(.auth-mode) #main>*{
  animation:len-den-enter .38s cubic-bezier(.2,.7,.25,1) both;
}
.app-shell:not(.auth-mode) #main>*:nth-child(2){animation-delay:.045s}
.app-shell:not(.auth-mode) #main>*:nth-child(3){animation-delay:.09s}
.app-shell:not(.auth-mode) #main>*:nth-child(4){animation-delay:.135s}
.app-shell:not(.auth-mode) #main>*:nth-child(5){animation-delay:.18s}
.app-shell:not(.auth-mode) .dashboard-welcome{
  position:relative;
  overflow:hidden;
}
.app-shell:not(.auth-mode) .summary-card::before{
  animation:len-den-enter .55s ease both;
}
.app-shell:not(.auth-mode) .quick-card>span{
  transition:transform .2s ease,box-shadow .2s ease;
}
.app-shell:not(.auth-mode) .chart-track i{
  transform-origin:bottom;
  animation:len-den-bar-rise .65s cubic-bezier(.2,.7,.25,1) both;
}
.app-shell:not(.auth-mode) .nav-item.active{
  transition:color .18s ease,background-color .18s ease,transform .18s ease;
}
.app-shell.auth-mode .auth-screen{
  animation:len-den-enter .5s cubic-bezier(.2,.7,.25,1) both;
}
.app-shell.auth-mode .auth-brand-logo{
  animation:len-den-logo-float 3.2s ease-in-out infinite;
}
.app-shell.auth-mode::before{
  animation:len-den-wave 7s ease-in-out infinite alternate;
}
.app-shell.auth-mode::after{
  animation:len-den-wave 9s ease-in-out infinite alternate-reverse;
}
@media(hover:hover){
  .app-shell:not(.auth-mode) .quick-card:not(.planned):hover,
  .app-shell:not(.auth-mode) .shortcut-button:hover,
  .app-shell:not(.auth-mode) .button:hover,
  .app-shell:not(.auth-mode) .nav-item:hover,
  .app-shell:not(.auth-mode) .drawer-links button:hover{
    transform:translateY(-2px);
  }
  .app-shell:not(.auth-mode) .quick-card:not(.planned):hover{
    box-shadow:0 8px 18px #8c20301a,inset 0 1px #fff;
  }
  .app-shell:not(.auth-mode) .quick-card:hover>span{
    transform:scale(1.06);
    box-shadow:0 4px 10px #c8102e18,inset 0 1px #fff;
  }
  .app-shell:not(.auth-mode) .button.primary:hover{
    box-shadow:0 8px 17px #c8102e38,inset 0 1px #ffffff52,inset 0 -1px #78091d33;
  }
}
@media(prefers-reduced-motion:reduce){
  .app-shell:not(.auth-mode) #main>*,
  .app-shell.auth-mode .auth-screen,
  .app-shell.auth-mode .auth-brand-logo,
  .app-shell.auth-mode::before,
  .app-shell.auth-mode::after,
  .app-shell:not(.auth-mode) .chart-track i{
    animation:none!important;
  }
}
