@font-face {
    font-family: "InterVariable";
    src: url("./fonts/InterVariable.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "InterVariable";
    src: url("./fonts/InterVariable-Italic.woff2") format("woff2");
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --forest-950: #081a4b;
    --forest-900: #102a72;
    --forest-800: #1d4ed8;
    --forest-700: #2563eb;
    --forest-100: #dbeafe;
    --cream: #f5f7ff;
    --paper: #ffffff;
    --white: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --amber: #d9952e;
    --amber-light: #f8ead1;
    --red: #c45143;
    --red-light: #f8e3df;
    --blue: #1d4ed8;
    --blue-light: #dbeafe;
    --green: #059669;
    --green-light: #d1fae5;
    --shadow: 0 12px 34px rgba(15, 23, 42, .08);
    --sidebar: 246px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 9px;
    --font: "InterVariable", Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    --serif: "InterVariable", Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; font-family: var(--font); color: var(--ink); background: #f4f7fc;
    -webkit-font-smoothing: antialiased; font-optical-sizing: auto;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
input, select, textarea { width: 100%; color: var(--ink); }
textarea { resize: vertical; }
code { font-family: "Cascadia Code", Consolas, monospace; font-size: .88em; }

.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); padding: 28px 18px 20px;
    display: flex; flex-direction: column; color: rgba(255,255,255,.83);
    background:
        radial-gradient(circle at 10% 85%, rgba(96,165,250,.16), transparent 28%),
        linear-gradient(170deg, #153b9c, #081a4b 72%);
}
.sidebar::after { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: rgba(255,255,255,.08); }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: white; }
.brand-mark {
    width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px;
    background: linear-gradient(145deg, #4f7cff, #1d4ed8); color: #fff; font-weight: 900; font-size: 14px;
    letter-spacing: -.4px; box-shadow: inset 0 1px rgba(255,255,255,.32), 0 7px 18px rgba(0,0,0,.15);
}
.brand-mark.large { width: 54px; height: 54px; border-radius: 15px; font-size: 17px; }
.brand-logo {
    width: 42px; height: 42px; flex: 0 0 auto; display: block; object-fit: cover; border: 2px solid rgba(255,255,255,.82);
    border-radius: 50%; background: white; box-shadow: 0 7px 19px rgba(8,26,75,.22);
}
.brand-logo.large { width: 58px; height: 58px; border-width: 3px; }
.brand-words { display: flex; flex-direction: column; line-height: 1.02; }
.brand-words strong { font-family: var(--serif); font-size: 19px; font-weight: 800; letter-spacing: -.45px; }
.brand-words small { margin-top: 4px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #93c5fd; }
.store-chip {
    margin: 30px 6px 26px; padding: 13px 12px; display: flex; align-items: flex-start; gap: 9px;
    background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09); border-radius: 12px;
}
.status-pulse { width: 7px; height: 7px; margin-top: 4px; flex: 0 0 auto; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 4px rgba(96,165,250,.15); }
.store-chip span:last-child { display: flex; min-width: 0; flex-direction: column; }
.store-chip small { color: rgba(255,255,255,.45); font-size: 8px; letter-spacing: 1.4px; }
.store-chip strong { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 650; }
.desktop-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { padding: 0 13px 8px; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; color: rgba(255,255,255,.32); }
.nav-label-lower { padding-top: 22px; }
.nav-link {
    position: relative; min-height: 43px; display: flex; align-items: center; gap: 13px; padding: 0 13px;
    border-radius: 10px; color: rgba(255,255,255,.64); font-size: 13px; font-weight: 560; transition: .18s ease;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: white; }
.nav-link.active { background: rgba(255,255,255,.1); color: white; box-shadow: inset 0 0 0 1px rgba(255,255,255,.035); }
.nav-link.active::before { content: ""; position: absolute; left: -18px; width: 3px; height: 20px; border-radius: 0 5px 5px 0; background: #60a5fa; }
.nav-icon { width: 21px; color: rgba(255,255,255,.55); text-align: center; font-size: 18px; line-height: 1; }
.nav-link.active .nav-icon { color: #bfdbfe; }
.sidebar-foot { margin-top: auto; }
.support-note { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: rgba(255,255,255,.035); }
.support-note > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #bfdbfe; background: rgba(96,165,250,.16); font-weight: 800; }
.support-note div { display: flex; flex-direction: column; }
.support-note strong { font-size: 10px; }
.support-note small { margin-top: 2px; font-size: 8px; color: rgba(255,255,255,.42); }
.sidebar-logout-form { margin-top: 9px; }
.sidebar-logout {
    width: 100%; min-height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 10px;
    border: 1px solid rgba(255,255,255,.09); border-radius: 10px; color: rgba(255,255,255,.72);
    background: rgba(255,255,255,.045); cursor: pointer; font-size: 12px; font-weight: 700; text-align: left; transition: .15s;
}
.sidebar-logout:hover { color: white; border-color: rgba(255,255,255,.17); background: rgba(255,255,255,.09); }
.sidebar-logout span { font-size: 17px; line-height: 1; transform: rotate(180deg); }
.version { display: block; padding: 13px 4px 0; text-align: center; color: rgba(255,255,255,.22); font-size: 8px; letter-spacing: 1.2px; }

.main-shell { min-height: 100vh; margin-left: var(--sidebar); display: flex; flex-direction: column; }
.topbar {
    height: 78px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--line); background: rgba(255,255,255,.84); backdrop-filter: blur(16px);
    position: sticky; top: 0; z-index: 20;
}
.topbar h1 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 750; letter-spacing: -.55px; }
.mobile-page-kicker { display: none; }
.top-actions { display: flex; align-items: center; gap: 22px; }
.admin-profile { padding-left: 20px; border-left: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--forest-100); color: var(--forest-800); font-weight: 800; font-size: 12px; }
.admin-copy { display: flex; flex-direction: column; }
.admin-copy strong { font-size: 11px; }
.admin-copy small { margin-top: 1px; font-size: 9px; color: var(--muted); }
.top-logout-form { margin: 0; }
.top-logout {
    min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #dbe3ef;
    border-radius: 9px; color: #475569; background: white; cursor: pointer; font-size: 12px; font-weight: 700;
    transition: color .15s, border-color .15s, background .15s;
}
.top-logout:hover { color: #b42318; border-color: #fecaca; background: #fff7f7; }
.top-logout-icon { font-size: 17px; line-height: 1; transform: rotate(180deg); }
.page-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 28px 34px 55px; flex: 1; }
.app-credit {
    width: 100%;
    min-height: 48px;
    padding: 12px 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-top: 1px solid #e3e9f2;
    color: #7b8799;
    background: rgba(255,255,255,.72);
    font-size: 11px;
}
.app-credit a { color: var(--forest-700); font-weight: 800; }
.app-credit a:hover { color: #1d4ed8; }
.app-credit strong { font-weight: 750; }

.eyebrow { display: inline-block; color: var(--forest-700); font-size: 9px; font-weight: 800; letter-spacing: 1.6px; }
.eyebrow.light { color: rgba(255,255,255,.58); }
.btn {
    min-height: 40px; padding: 0 17px; border: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; font-size: 11px; font-weight: 750; letter-spacing: .05px; transition: transform .16s, box-shadow .16s, background .16s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { color: white; background: var(--forest-800); box-shadow: 0 7px 18px rgba(29,78,216,.2); }
.btn-primary:hover { background: var(--forest-700); box-shadow: 0 9px 24px rgba(29,78,216,.26); }
.btn-secondary { color: var(--ink); background: white; border: 1px solid var(--line); }
.btn-secondary:hover { border-color: #c7ccc8; }
.btn-cream { color: var(--forest-900); background: #fbf3df; }
.btn-danger { color: var(--red); background: var(--red-light); }
.btn-small { min-height: 34px; padding: 0 13px; font-size: 10px; }
.btn-large { min-height: 48px; padding-inline: 21px; font-size: 12px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 4px 22px rgba(31,55,45,.035); }
.panel-head { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #eeece6; }
.panel-head h3 { margin: 5px 0 0; font-family: var(--serif); font-size: 18px; letter-spacing: -.2px; }
.text-link { color: var(--forest-700); font-size: 10px; font-weight: 750; }
.text-link span { margin-left: 4px; }

.welcome-band {
    position: relative; min-height: 177px; padding: 31px 34px; overflow: hidden; border-radius: 22px;
    display: flex; align-items: center; color: white;
    background:
        radial-gradient(circle at 70% 0%, rgba(255,255,255,.08), transparent 33%),
        linear-gradient(110deg, #2563eb, #102a72);
    box-shadow: 0 16px 36px rgba(29,78,216,.18);
}
.welcome-copy { position: relative; z-index: 2; }
.welcome-time-row {
    display: flex; align-items: center; gap: 9px; color: white;
}
.live-date,
.live-zone {
    font-size: 10px; font-weight: 750; letter-spacing: .75px; text-transform: uppercase;
}
.live-date { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.72); }
.live-clock-dot {
    width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147,197,253,.14); animation: clock-pulse 1.8s ease-in-out infinite;
}
.live-time {
    min-width: 103px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
    color: white; background: rgba(255,255,255,.09); font-size: 13px; font-style: normal; font-weight: 800;
    font-variant-numeric: tabular-nums; letter-spacing: .25px; text-align: center;
}
.live-zone { color: #bfdbfe; font-size: 9px; }
@keyframes clock-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.82); }
}
.welcome-copy h2 { margin: 7px 0 6px; font-family: var(--serif); font-size: 31px; font-weight: 750; line-height: 1.12; letter-spacing: -.75px; }
.welcome-copy p { margin: 0; color: rgba(255,255,255,.62); font-size: 12px; }
.welcome-action { position: absolute; right: 34px; bottom: 28px; z-index: 3; }
.welcome-art { position: absolute; width: 340px; inset: 0 13% 0 auto; opacity: .95; }
.welcome-ring { position: absolute; width: 235px; height: 235px; left: 32px; top: -27px; border: 36px solid rgba(255,255,255,.035); border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.025); }
.welcome-logo-wrap {
    position: absolute; z-index: 3; width: 112px; height: 112px; left: 94px; top: 31px; padding: 6px;
    display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.96);
    box-shadow: 0 15px 35px rgba(8,26,75,.28), 0 0 0 7px rgba(255,255,255,.08);
}
.welcome-logo { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.grain { position: absolute; width: 14px; height: 38px; border: 2px solid rgba(191,219,254,.28); border-radius: 80% 20% 70% 30%; transform: rotate(35deg); }
.grain::before, .grain::after { content: ""; position: absolute; width: 9px; height: 21px; border: inherit; border-radius: inherit; }
.grain::before { left: -12px; top: 6px; transform: rotate(-28deg); }
.grain::after { left: 10px; top: 14px; transform: rotate(34deg); }
.grain-one { left: 70px; top: 52px; transform: rotate(38deg) scale(1.2); }
.grain-two { left: 150px; top: 25px; transform: rotate(-18deg) scale(.8); }
.grain-three { left: 200px; top: 95px; transform: rotate(70deg); }

.metric-grid { margin: 18px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { position: relative; min-height: 134px; padding: 17px 19px 15px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 16px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-weight: 850; font-size: 12px; }
.metric-icon.amber { color: #a96b0c; background: var(--amber-light); }
.metric-icon.green { color: var(--green); background: var(--green-light); }
.metric-icon.blue { color: var(--blue); background: var(--blue-light); }
.metric-icon.red { color: var(--red); background: var(--red-light); }
.metric-trend { color: #9aa19c; font-size: 7px; font-weight: 800; letter-spacing: 1.2px; }
.metric-card > strong { display: block; margin: 12px 0 3px; font-family: var(--serif); font-size: 22px; }
.metric-card > span { color: var(--muted); font-size: 10px; }
.metric-line { position: absolute; inset: auto 0 0; height: 3px; }
.amber-line { background: var(--amber); }.green-line { background: var(--green); }.blue-line { background: var(--blue); }.red-line { background: var(--red); }
.attention-card { background: #fffbfa; border-color: #f0d8d4; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(285px, .75fr); gap: 18px; }
.recent-panel { min-width: 0; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.data-table th { padding: 11px 14px; color: #8c948f; background: #fbfbf8; text-align: left; font-size: 8px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px; border-top: 1px solid #efeee9; vertical-align: middle; color: #555f59; }
.data-table td strong { color: var(--ink); font-weight: 700; }
.data-table td small { display: block; margin-top: 3px; color: #929a95; font-size: 8px; }
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fcfcf9; }
.data-table .number { text-align: right; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 7px; font-size: 8px; font-weight: 800; letter-spacing: .4px; white-space: nowrap; }
.badge.gst { color: var(--green); background: var(--green-light); }
.badge.non-gst { color: #89651e; background: #f6ecd5; }
.badge.neutral { color: #68716c; background: #f0f1ee; }
.row-arrow { width: 27px; height: 27px; display: grid; place-items: center; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; color: var(--forest-700); background: white; font-size: 13px; }
.stock-watch-list { padding: 5px 16px 10px; }
.stock-watch-row { padding: 11px 4px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; border-bottom: 1px solid #efeee9; }
.stock-watch-row:last-child { border-bottom: 0; }
.item-monogram { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--forest-700); background: var(--forest-100); font-family: var(--serif); font-size: 14px; font-weight: 800; text-transform: uppercase; }
.stock-watch-row > span:nth-child(2), .item-cell > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.stock-watch-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.stock-watch-row small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.stock-count { min-width: 52px; padding: 7px; border-radius: 8px; text-align: center; font-size: 11px; font-weight: 800; }
.stock-count small { display: block; margin-top: 1px; }
.stock-count.danger { color: var(--red); background: var(--red-light); }
.stock-count.warning { color: #916710; background: var(--amber-light); }
.all-good { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.all-good > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--green-light); color: var(--green); font-weight: 900; }
.all-good strong { margin-top: 10px; font-family: var(--serif); }
.all-good small { width: 200px; margin-top: 5px; color: var(--muted); line-height: 1.5; }
.quick-strip { margin-top: 18px; padding: 21px 23px; display: flex; align-items: center; gap: 30px; background: #eaf0fb; border-radius: 18px; }
.quick-strip h3 { margin: 4px 0 0; font-family: var(--serif); font-size: 17px; }
.quick-actions { margin-left: auto; display: flex; gap: 10px; }
.quick-actions a, .quick-actions button { min-width: 155px; padding: 10px 13px; border: 1px solid #e0ded6; border-radius: 11px; display: grid; grid-template-columns: 30px 1fr; column-gap: 9px; text-align: left; background: rgba(255,255,255,.7); cursor: pointer; }
.quick-actions > * > span { grid-row: span 2; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: white; color: var(--forest-700); }
.quick-actions strong { font-size: 9px; }
.quick-actions small { margin-top: 2px; color: var(--muted); font-size: 7px; }

.page-intro { min-height: 108px; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.page-intro h2 { margin: 7px 0 7px; font-family: var(--serif); font-size: 27px; letter-spacing: -.5px; }
.page-intro p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.page-intro .btn { margin-top: 10px; }
.summary-ribbon { margin-bottom: 16px; padding: 0 5px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--forest-900); border-radius: 15px; color: white; overflow: hidden; }
.summary-ribbon > div { padding: 15px 22px; border-right: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.summary-ribbon > div:last-child { border-right: 0; }
.summary-ribbon span { color: rgba(255,255,255,.55); font-size: 9px; }
.summary-ribbon strong { font-family: var(--serif); font-size: 16px; }
.toolbar { padding: 14px 18px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.search-box { width: min(440px, 100%); height: 39px; padding: 0 12px; display: flex; align-items: center; gap: 8px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.search-box span { color: #909891; font-size: 19px; transform: rotate(-15deg); }
.search-box input { height: 100%; padding: 0; border: 0; outline: 0; background: transparent; font-size: 10px; }
.search-box:focus-within { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.result-count { margin-left: auto; color: #8a928d; font-size: 9px; white-space: nowrap; }
.result-count strong { color: var(--ink); }
.toolbar-select { width: auto; min-width: 150px; height: 39px; padding: 0 30px 0 11px; border: 1px solid #e3e3dd; border-radius: 9px; background: white; font-size: 9px; }
.item-cell { min-width: 190px; display: flex; align-items: center; gap: 10px; }
.item-cell strong { font-size: 10px; }
.tax-chip { display: inline-flex; padding: 4px 7px; border-radius: 6px; color: var(--green); background: var(--green-light); font-size: 8px; font-weight: 800; }
.stock-pill { display: inline-flex; padding: 6px 8px; border-radius: 7px; color: var(--forest-700); background: #eff6ff; font-weight: 750; white-space: nowrap; }
.stock-pill.low { color: var(--red); background: var(--red-light); }
.icon-button { padding: 5px 8px; border: 0; border-radius: 7px; color: var(--forest-700); background: transparent; cursor: pointer; font-size: 9px; font-weight: 750; }
.icon-button:hover { background: var(--forest-100); }
.focused-row { animation: focus-row 2.2s ease; }
@keyframes focus-row { 0%, 35% { background: #eaf2ff; } 100% { background: white; } }
.no-search-results { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.no-search-results > span { font-size: 28px; }
.no-search-results strong { margin-top: 6px; color: var(--ink); font-family: var(--serif); font-size: 16px; }
.no-search-results small { margin-top: 5px; }
.empty-state { min-height: 220px; padding: 25px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--forest-100); color: var(--forest-700); font-size: 19px; }
.empty-state strong { margin-top: 12px; font-family: var(--serif); font-size: 17px; }
.empty-state p { max-width: 320px; margin: 5px 0 13px; color: var(--muted); font-size: 10px; }

.vendor-grid { padding: 17px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.vendor-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #ffffff; }
.vendor-card-top { display: flex; align-items: center; gap: 8px; }
.vendor-card-top .icon-button { margin-left: auto; }
.vendor-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--forest-700); font-family: var(--serif); font-weight: 800; }
.vendor-card h3 { margin: 13px 0 3px; font-family: var(--serif); font-size: 16px; }
.vendor-card > p { margin: 0; color: var(--muted); font-size: 9px; }
.vendor-details { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vendor-details span { display: flex; min-width: 0; flex-direction: column; }
.vendor-details small, .vendor-stats small { color: #9aa19c; font-size: 7px; letter-spacing: .6px; }
.vendor-details strong { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; font-size: 9px; white-space: nowrap; }
.vendor-address { min-height: 43px; margin-top: 13px; padding: 10px; border-radius: 8px; color: #727a75; background: #f5f5f1; font-size: 8px; line-height: 1.45; }
.vendor-stats { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vendor-stats span { display: flex; flex-direction: column; }
.vendor-stats strong { font-family: var(--serif); font-size: 13px; }
.vendor-stats small { margin-top: 3px; }
.status-label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; font-weight: 750; white-space: nowrap; }
.status-label i { width: 6px; height: 6px; border-radius: 50%; background: #9da39f; }
.status-label.success { color: var(--green); }.status-label.success i { background: #54a88e; box-shadow: 0 0 0 3px rgba(84,168,142,.1); }
.status-label.warning { color: #9a6d1c; }.status-label.warning i { background: var(--amber); box-shadow: 0 0 0 3px rgba(217,149,46,.1); }
.status-label.error { color: var(--red); }.status-label.error i { background: var(--red); }

.app-dialog { width: min(660px, calc(100vw - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 0; border-radius: 20px; background: transparent; box-shadow: 0 25px 70px rgba(15,37,29,.25); }
.app-dialog::backdrop { background: rgba(13,31,25,.62); backdrop-filter: blur(4px); }
.dialog-card { background: var(--paper); border-radius: 20px; overflow: hidden; }
.dialog-head { padding: 21px 24px; display: flex; align-items: flex-start; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 5px 0 0; font-family: var(--serif); font-size: 21px; }
.dialog-head > button { width: 32px; height: 32px; border: 0; border-radius: 9px; color: var(--muted); background: #f0f1ee; cursor: pointer; font-size: 20px; }
.dialog-body { max-height: calc(100vh - 185px); padding: 22px 24px; overflow-y: auto; }
.dialog-foot { padding: 15px 24px; display: flex; justify-content: flex-end; gap: 9px; background: white; border-top: 1px solid var(--line); }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-two { grid-column: span 2; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; color: #5f6862; font-size: 9px; font-weight: 700; }
.field input, .field select, .field textarea, .invoice-note-card textarea {
    min-height: 41px; padding: 0 11px; border: 1px solid #dedfd9; border-radius: 9px; outline: 0; background: white; font-size: 10px; font-weight: 450; transition: .15s;
}
.field textarea, .invoice-note-card textarea { padding: 10px 11px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .invoice-note-card textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.money-input, .input-with-action { position: relative; display: flex; align-items: center; }
.money-input b { position: absolute; left: 11px; color: #8b928e; font-weight: 500; }
.money-input input { padding-left: 25px; }
.input-with-action input { padding-right: 58px; }
.input-with-action button { position: absolute; right: 7px; padding: 5px 7px; border: 0; border-radius: 6px; color: var(--forest-700); background: #eff6ff; font-size: 8px; cursor: pointer; }
.tax-box { margin-top: 18px; padding: 14px; display: grid; grid-template-columns: 1fr 1.8fr; gap: 18px; align-items: end; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; }
.tax-box p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.tax-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }

.invoice-intro { min-height: 100px; }
.intro-actions { display: flex; gap: 8px; }
.invoice-meta-card { padding: 19px 20px; display: grid; grid-template-columns: 255px 1fr; align-items: end; gap: 25px; }
.invoice-type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.invoice-type-switch label { cursor: pointer; }
.invoice-type-switch input { position: absolute; opacity: 0; pointer-events: none; }
.invoice-type-switch label > span { min-height: 61px; padding: 12px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 11px; background: white; transition: .15s; }
.invoice-type-switch b { font-size: 10px; }
.invoice-type-switch small { margin-top: 5px; color: var(--muted); font-size: 7px; }
.invoice-type-switch input:checked + span { color: var(--forest-800); border-color: var(--forest-700); background: var(--forest-100); box-shadow: inset 0 0 0 1px var(--forest-700); }
.invoice-meta-grid { grid-template-columns: 1.6fr 1fr 1fr; }
.invoice-lines-panel { margin-top: 16px; overflow: hidden; }
.line-panel-head { padding-block: 17px; }
.invoice-line-head, .invoice-line { display: grid; grid-template-columns: minmax(190px, 2.1fr) minmax(150px, 1.35fr) 70px 86px 76px 88px 105px 28px; gap: 9px; align-items: center; }
.invoice-line-head { padding: 9px 16px; color: #64748b; background: #f8fafc; font-size: 7px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
#invoice-lines { padding: 0 16px; }
.invoice-line { position: relative; padding: 13px 0; border-bottom: 1px solid var(--line); }
.invoice-line input, .invoice-line select { height: 37px; padding: 0 8px; border: 1px solid #dedfd9; border-radius: 8px; outline: 0; background: white; font-size: 9px; }
.invoice-line input:focus, .invoice-line select:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.line-item-select { display: flex; min-width: 0; flex-direction: column; }
.line-item-select small { margin-top: 4px; color: #8a928d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.batch-fields { display: grid; grid-template-columns: 1fr 1.25fr; gap: 5px; }
.batch-fields label { min-width: 0; }
.line-tax, .line-total { display: flex; flex-direction: column; }
.line-tax strong, .line-total strong { font-size: 9px; white-space: nowrap; }
.line-tax small, .line-total small { margin-top: 3px; color: var(--muted); font-size: 7px; white-space: nowrap; }
.remove-line { width: 27px; height: 27px; border: 0; border-radius: 8px; color: var(--red); background: var(--red-light); cursor: pointer; font-size: 17px; }
.mobile-field-label { display: none; }
.add-line-wide { width: calc(100% - 32px); min-height: 39px; margin: 13px 16px 16px; border: 1px dashed #93c5fd; border-radius: 10px; color: var(--forest-700); background: #f8fbff; cursor: pointer; font-size: 9px; font-weight: 750; }
.add-line-wide span { margin-right: 5px; }
.invoice-bottom-grid { margin-top: 16px; display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.invoice-note-card { padding: 21px; }
.invoice-note-card h3 { margin: 5px 0 13px; font-family: var(--serif); font-size: 17px; }
.invoice-note-card textarea { min-height: 95px; }
.entry-tip { margin-top: 14px; padding: 12px; display: flex; gap: 10px; border-radius: 10px; color: #475569; background: #eff6ff; font-size: 8px; line-height: 1.55; }
.entry-tip > span { width: 21px; height: 21px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--forest-700); font-weight: 800; }
.entry-tip p { margin: 0; }
.entry-tip strong { color: var(--forest-800); }
.total-card { overflow: hidden; }
.total-head { padding: 18px 20px 12px; display: flex; justify-content: space-between; }
.live-dot { padding: 4px 7px; border-radius: 6px; color: var(--green); background: var(--green-light); font-size: 7px; font-weight: 850; letter-spacing: .7px; }
.total-card dl { margin: 0; padding: 0 20px 14px; }
.total-card dl > div { min-height: 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px dashed #e7e7e1; }
.total-card dt { color: var(--muted); font-size: 9px; }
.total-card dd { margin: 0; font-size: 10px; font-weight: 700; }
.inline-money { position: relative; display: flex; align-items: center; }
.inline-money b { position: absolute; left: 7px; color: var(--muted); font-size: 9px; }
.inline-money input { width: 80px; height: 27px; padding: 0 6px 0 20px; border: 1px solid var(--line); border-radius: 7px; text-align: right; font-size: 9px; }
.grand-total { padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; color: white; background: var(--forest-900); }
.grand-total span { color: rgba(255,255,255,.6); font-size: 9px; }
.grand-total strong { font-family: var(--serif); font-size: 24px; }
.total-card > .btn { width: calc(100% - 40px); margin: 16px 20px 6px; }
.save-hint { display: block; padding-bottom: 15px; color: var(--muted); text-align: center; font-size: 7px; }

.invoice-paper { max-width: 1100px; margin: 0 auto; border: 1px solid #dcdcd5; border-radius: 5px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.invoice-paper-head { padding: 34px 39px 27px; display: flex; justify-content: space-between; gap: 30px; border-bottom: 3px solid var(--forest-900); }
.invoice-shop { display: flex; align-items: flex-start; gap: 14px; }
.invoice-shop h2 { margin: 4px 0 5px; font-family: var(--serif); font-size: 23px; }
.invoice-shop p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.invoice-number { display: flex; align-items: flex-end; flex-direction: column; }
.invoice-number .badge { margin-bottom: 14px; }
.invoice-number > small { color: #979e99; font-size: 7px; letter-spacing: 1px; }
.invoice-number > strong { margin: 3px 0; font-family: var(--serif); font-size: 20px; }
.invoice-number > span:last-child { color: var(--muted); font-size: 9px; }
.invoice-parties { padding: 24px 39px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; background: #f8fafc; }
.invoice-parties > div { display: flex; flex-direction: column; align-items: flex-start; }
.invoice-parties small { color: #929994; font-size: 7px; letter-spacing: 1px; }
.invoice-parties h3 { margin: 7px 0 3px; font-family: var(--serif); font-size: 16px; }
.invoice-parties p { margin: 0 0 6px; max-width: 370px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.invoice-parties strong { margin: 6px 0 14px; font-size: 10px; }
.invoice-parties span { font-size: 8px; }
.status-small { margin-top: 8px; }
.invoice-paper-table { overflow-x: auto; }
.invoice-paper-table table { width: 100%; border-collapse: collapse; font-size: 8px; }
.invoice-paper-table th { padding: 11px 10px; color: #8a918c; background: white; border-bottom: 1px solid var(--line); font-size: 7px; letter-spacing: .6px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.invoice-paper-table th:first-child, .invoice-paper-table td:first-child { padding-left: 39px; }
.invoice-paper-table th:last-child, .invoice-paper-table td:last-child { padding-right: 39px; }
.invoice-paper-table td { padding: 14px 10px; border-bottom: 1px solid #efeee9; color: #59625d; vertical-align: top; }
.invoice-paper-table td strong { color: var(--ink); }
.invoice-paper-table td small { display: block; margin-top: 3px; color: #959c97; font-size: 7px; }
.invoice-paper-table .number { text-align: right; }
.invoice-paper-bottom { padding: 24px 39px 30px; display: grid; grid-template-columns: 1fr 280px; gap: 45px; }
.invoice-note small { color: #929994; font-size: 7px; letter-spacing: 1px; }
.invoice-note p { max-width: 400px; margin: 7px 0 18px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.invoice-note span { color: #9aa09c; font-size: 7px; }
.invoice-totals { margin: 0; }
.invoice-totals > div { min-height: 29px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9e8e2; }
.invoice-totals dt { color: var(--muted); font-size: 8px; }
.invoice-totals dd { margin: 0; font-size: 9px; font-weight: 700; }
.invoice-totals .paper-grand { min-height: 48px; margin-top: 7px; padding: 0 12px; color: white; border: 0; background: var(--forest-900); }
.invoice-totals .paper-grand dt { color: rgba(255,255,255,.6); }
.invoice-totals .paper-grand dd { font-family: var(--serif); font-size: 16px; }
.invoice-paper-foot { padding: 10px 39px; color: #64748b; background: #f1f5f9; text-align: center; font-size: 7px; letter-spacing: .3px; }

.stock-summary { grid-template-columns: repeat(3, 1fr); }
.settings-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; align-items: start; }
.settings-card { padding: 22px; }
.settings-card .panel-head { margin: -22px -22px 20px; }
.settings-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--forest-700); font-size: 10px; font-weight: 900; }
.settings-icon.lock { color: #9b6a16; background: var(--amber-light); }
.settings-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.password-rule { margin-top: 16px; padding: 10px; display: flex; gap: 8px; align-items: center; border-radius: 9px; color: var(--muted); background: #f1f5f9; font-size: 8px; line-height: 1.4; }
.password-rule span { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: white; background: #87928b; font-size: 8px; }
.session-card, .data-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.session-card h3, .data-card h3 { margin: 5px 0; font-family: var(--serif); font-size: 16px; }
.session-card p, .data-card p { max-width: 480px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.data-card { grid-column: 1 / -1; }
.data-safe { padding: 8px 10px; border-radius: 8px; color: var(--green); background: var(--green-light); font-size: 8px; font-weight: 750; white-space: nowrap; }

.toast { position: fixed; z-index: 100; top: 89px; right: 25px; width: min(380px, calc(100vw - 30px)); min-height: 53px; padding: 11px 12px; display: grid; grid-template-columns: 28px 1fr 24px; gap: 9px; align-items: center; border: 1px solid; border-radius: 13px; background: white; box-shadow: 0 15px 40px rgba(15,23,42,.17); font-size: 10px; animation: toast-in .3s ease; }
.toast-success { border-color: #c6dfd6; }.toast-error { border-color: #efc9c3; }
.toast-mark { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; font-weight: 900; }
.toast-success .toast-mark { color: var(--green); background: var(--green-light); }.toast-error .toast-mark { color: var(--red); background: var(--red-light); }
.toast button { border: 0; background: transparent; color: #969d98; cursor: pointer; font-size: 17px; }
.toast.is-hiding { opacity: 0; transform: translateY(-8px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-9px); } }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(410px, 1.05fr) minmax(420px, .95fr); }
.login-story {
    position: relative; padding: 42px 55px; overflow: hidden; display: flex; flex-direction: column; color: white;
    background:
        linear-gradient(160deg, rgba(37,99,235,.97), rgba(8,26,75,.99)),
        #102a72;
}
.login-story::before { content: ""; position: absolute; width: 430px; height: 430px; right: -110px; bottom: -110px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 55px rgba(255,255,255,.025), 0 0 0 110px rgba(255,255,255,.018); }
.login-glow { position: absolute; border-radius: 50%; filter: blur(2px); }
.login-glow-one { width: 330px; height: 330px; right: -90px; top: -80px; background: radial-gradient(circle, rgba(191,219,254,.18), transparent 66%); }
.login-glow-two { width: 260px; height: 260px; left: -110px; bottom: 9%; background: radial-gradient(circle, rgba(96,165,250,.13), transparent 68%); }
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.login-brand div { display: flex; flex-direction: column; }
.login-brand strong { font-family: var(--serif); font-size: 18px; font-weight: 800; letter-spacing: -.35px; }
.login-brand span:last-child { margin-top: 3px; color: rgba(255,255,255,.46); font-size: 8px; letter-spacing: 1.4px; text-transform: uppercase; }
.login-copy { position: relative; z-index: 2; margin: auto 0; max-width: 570px; }
.login-copy h1 { margin: 14px 0 18px; font-family: var(--serif); font-size: clamp(44px, 5.1vw, 72px); font-weight: 780; line-height: .98; letter-spacing: -3.1px; }
.login-copy h1 em { color: #bfdbfe; font-weight: 780; }
.login-copy p { max-width: 500px; color: rgba(255,255,255,.54); font-size: 13px; line-height: 1.65; }
.login-location { position: relative; z-index: 2; display: flex; align-items: flex-start; gap: 11px; }
.pin-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: #93c5fd; box-shadow: 0 0 0 5px rgba(147,197,253,.14); }
.login-location div { display: flex; flex-direction: column; }
.login-location small { color: rgba(255,255,255,.35); font-size: 7px; letter-spacing: 1.5px; }
.login-location strong { margin-top: 5px; color: rgba(255,255,255,.75); font-size: 9px; }
.login-panel { display: grid; place-items: center; padding: 45px; background: #f4f7fc; }
.login-form-wrap { width: min(380px, 100%); }
.mobile-login-brand { display: none; }
.login-form-wrap h2 { margin: 8px 0 7px; font-family: var(--serif); font-size: 31px; font-weight: 760; letter-spacing: -1px; }
.subcopy { margin: 0 0 25px; color: var(--muted); font-size: 11px; }
.login-form .btn { margin-top: 4px; width: 100%; justify-content: space-between; }
.login-footer { margin-top: 20px; color: #a1a6a3; text-align: center; font-size: 8px; }
.inline-alert { margin-bottom: 14px; padding: 10px 12px; border-radius: 9px; font-size: 9px; }
.inline-alert.error { color: var(--red); background: var(--red-light); }.inline-alert.success { color: var(--green); background: var(--green-light); }
.mobile-nav { display: none; }

@media (max-width: 1180px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .vendor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .invoice-meta-card { grid-template-columns: 1fr; }
    .invoice-line-head, .invoice-line { grid-template-columns: minmax(175px, 2fr) minmax(130px, 1.2fr) 62px 76px 70px 80px 95px 28px; gap: 6px; }
    .quick-strip { align-items: flex-start; flex-direction: column; }
    .quick-actions { width: 100%; margin: 0; }
    .quick-actions > * { flex: 1; }
}

@media (max-width: 920px) {
    :root { --sidebar: 0px; }
    .sidebar { display: none; }
    .main-shell { margin: 0; padding-bottom: 76px; }
    .topbar { height: 67px; padding: 0 20px; }
    .topbar h1 { font-size: 19px; }
    .page-content { padding: 22px 20px 35px; }
    .mobile-page-kicker { display: block; margin-bottom: 3px; color: var(--forest-700); font-size: 7px; font-weight: 800; letter-spacing: 1.2px; }
    .top-new-purchase, .admin-copy { display: none; }
    .admin-profile { padding: 0; border: 0; }
    .top-actions { gap: 10px; }
    .top-logout { width: 35px; min-height: 35px; padding: 0; justify-content: center; }
    .top-logout-label { display: none; }
    .mobile-nav {
        position: fixed; z-index: 80; left: 12px; right: 12px; bottom: max(10px, env(safe-area-inset-bottom));
        height: 63px; padding: 5px 8px; display: grid; grid-template-columns: repeat(5, 1fr);
        border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(8,26,75,.97); box-shadow: 0 15px 35px rgba(15,23,42,.28); backdrop-filter: blur(16px);
    }
    .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: rgba(255,255,255,.47); }
    .mobile-nav a > span { font-size: 18px; line-height: 1; }
    .mobile-nav small { font-size: 7px; }
    .mobile-nav a.active { color: #bfdbfe; }
    .mobile-nav .mobile-add > span { width: 38px; height: 38px; margin-top: -25px; display: grid; place-items: center; border: 4px solid #f4f7fc; border-radius: 50%; color: white; background: var(--forest-700); box-shadow: 0 5px 14px rgba(15,23,42,.24); }
    .mobile-nav .mobile-add small { margin-top: 2px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .data-card { grid-column: auto; }
    .invoice-line-head { display: none; }
    #invoice-lines { padding: 13px; display: grid; gap: 12px; }
    .invoice-line {
        padding: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px;
        border: 1px solid var(--line); border-radius: 13px; background: #ffffff;
    }
    .line-item-select { grid-column: span 3; }
    .batch-fields { grid-column: span 4; }
    .invoice-line > label:nth-of-type(2), .invoice-line > label:nth-of-type(3), .invoice-line > label:nth-of-type(4) { grid-column: span 1; }
    .line-tax, .line-total { padding: 8px; border-radius: 8px; background: #f2f4f1; }
    .line-tax { grid-column: span 2; }.line-total { grid-column: span 2; }
    .remove-line { position: absolute; top: 13px; right: 13px; }
    .mobile-field-label { display: block; margin-bottom: 5px; color: #858d88; font-size: 7px; font-weight: 750; text-transform: uppercase; letter-spacing: .5px; }
    .invoice-bottom-grid { grid-template-columns: 1fr 330px; }
}

@media (max-width: 700px) {
    .topbar { padding: 0 15px; }
    .page-content { padding: 18px 14px 28px; }
    .welcome-band { min-height: 225px; padding: 25px; align-items: flex-start; }
    .welcome-copy h2 { font-size: 27px; }
    .welcome-action { left: 25px; right: auto; }
    .welcome-art { width: 240px; right: -95px; }
    .welcome-logo-wrap { width: 88px; height: 88px; left: 42px; top: 28px; padding: 4px; }
    .welcome-ring { left: 0; opacity: .65; }
    .welcome-time-row { max-width: 245px; flex-wrap: wrap; gap: 7px; }
    .live-date { width: 100%; }
    .live-zone { font-size: 8px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .metric-card { min-height: 125px; padding: 14px; }
    .metric-card > strong { font-size: 19px; }
    .panel { border-radius: 16px; }
    .panel-head { padding: 17px; }
    .page-intro { min-height: 122px; gap: 16px; }
    .page-intro h2 { font-size: 24px; }
    .page-intro p { max-width: 420px; }
    .page-intro > .btn { min-width: 42px; padding-inline: 11px; white-space: nowrap; }
    .summary-ribbon { padding: 0; }
    .summary-ribbon > div { padding: 13px 11px; flex-direction: column; align-items: flex-start; gap: 4px; }
    .summary-ribbon strong { font-size: 13px; }
    .toolbar { padding: 12px; flex-wrap: wrap; }
    .search-box { width: 100%; }
    .result-count { margin-left: 0; }
    .purchase-toolbar .toolbar-select { width: 100%; }
    .quick-strip { padding: 18px; }
    .quick-actions { display: grid; grid-template-columns: 1fr; }
    .quick-actions > * { width: 100%; }
    .vendor-grid { grid-template-columns: 1fr; padding: 12px; }
    .form-grid.two { grid-template-columns: 1fr; }
    .span-two { grid-column: auto; }
    .tax-box { grid-template-columns: 1fr; }
    .invoice-intro { min-height: 135px; }
    .invoice-intro .intro-actions { flex-direction: column-reverse; }
    .invoice-intro .intro-actions .btn { margin: 0; white-space: nowrap; }
    .invoice-meta-card { padding: 14px; gap: 17px; }
    .invoice-meta-grid { grid-template-columns: 1fr; }
    .invoice-line { grid-template-columns: repeat(3, 1fr); }
    .line-item-select { grid-column: span 3; }
    .batch-fields { grid-column: span 3; }
    .line-tax { grid-column: span 1; }.line-total { grid-column: span 2; }
    .invoice-bottom-grid { grid-template-columns: 1fr; }
    .total-card { position: static; }
    .line-panel-head .btn { display: none; }
    .invoice-paper-head { padding: 24px; flex-direction: column; }
    .invoice-number { align-items: flex-start; }
    .invoice-parties { padding: 20px 24px; grid-template-columns: 1fr; gap: 20px; }
    .invoice-paper-table th:first-child, .invoice-paper-table td:first-child { padding-left: 20px; }
    .invoice-paper-table th:last-child, .invoice-paper-table td:last-child { padding-right: 20px; }
    .invoice-paper-bottom { padding: 22px 24px; grid-template-columns: 1fr; gap: 20px; }
    .session-card, .data-card { align-items: flex-start; flex-direction: column; }
    .settings-card { padding: 18px; }
    .settings-card .panel-head { margin: -18px -18px 18px; }
    .app-dialog { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
    .dialog-body { padding: 18px; }
    .dialog-head, .dialog-foot { padding-inline: 18px; }
    .dialog-foot .btn { flex: 1; }

    .data-table:not(.invoice-paper-table table) { display: block; }
    .data-table:not(.invoice-paper-table table) thead { display: none; }
    .data-table:not(.invoice-paper-table table) tbody { padding: 6px 12px 13px; display: grid; gap: 10px; }
    .data-table:not(.invoice-paper-table table) tr { position: relative; padding: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 13px 10px; border: 1px solid var(--line); border-radius: 12px; background: white; }
    .data-table:not(.invoice-paper-table table) td { padding: 0; border: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left !important; }
    .data-table:not(.invoice-paper-table table) td::before { content: attr(data-label); margin-bottom: 5px; color: #9ba19d; font-size: 7px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
    .data-table:not(.invoice-paper-table table) td:last-child { position: absolute; right: 12px; top: 12px; }
    .data-table:not(.invoice-paper-table table) td:last-child::before { display: none; }
    .data-table:not(.invoice-paper-table table) .item-cell { min-width: 0; }
    .item-table td:first-child, .stock-table td:first-child { grid-column: span 2; }
    .item-table td:first-child::before, .stock-table td:first-child::before { display: none; }
    .item-table td:last-child { position: absolute !important; right: 8px !important; top: 8px !important; }
    .purchase-table td:nth-child(2) { grid-column: span 2; }
}

@media (max-width: 680px) {
    .login-page { display: block; min-height: 100dvh; background: #f4f7fc; }
    .login-story { min-height: 230px; padding: 26px 25px 70px; border-radius: 0 0 38px 38px; }
    .login-brand { display: none; }
    .login-copy { margin: 25px 0 0; }
    .login-copy h1 { margin: 9px 0 12px; font-size: 39px; letter-spacing: -1.4px; }
    .login-copy p { display: none; }
    .login-location { display: none; }
    .login-panel { display: block; margin-top: -43px; padding: 0 17px 30px; position: relative; z-index: 3; background: transparent; }
    .login-form-wrap { width: 100%; padding: 24px 20px 18px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
    .mobile-login-brand { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
    .mobile-login-brand .brand-mark,
    .mobile-login-brand .brand-logo { width: 40px; height: 40px; }
    .mobile-login-brand strong { font-family: var(--serif); }
    .login-form-wrap h2 { font-size: 27px; }
}

/* Royal-blue clarity pass: Inter typography, cool neutrals and stronger hierarchy. */
h1, h2, h3,
.metric-card > strong,
.summary-ribbon strong,
.vendor-stats strong,
.grand-total strong,
.invoice-totals .paper-grand dd {
    font-family: var(--font);
    font-weight: 750;
    letter-spacing: -.035em;
}
.data-table .number,
.metric-card > strong,
.summary-ribbon strong,
.stock-count,
.grand-total strong,
.invoice-totals dd {
    font-variant-numeric: tabular-nums;
}
.panel,
.metric-card,
.vendor-card,
.invoice-paper { border-color: var(--line); }
.data-table th,
.invoice-line-head { background: #f8fafc; }
.data-table tbody tr:hover { background: #f8fbff; }
.field input,
.field select,
.field textarea,
.invoice-note-card textarea,
.invoice-line input,
.invoice-line select,
.toolbar-select { border-color: #d8e0eb; }
.quick-actions a,
.quick-actions button { border-color: #dbe3ef; background: rgba(255,255,255,.86); }

/* Readability pass: comfortably sized text across desktop and mobile. */
.store-chip small,
.support-note small,
.version { font-size: 10px; }
.store-chip strong,
.support-note strong,
.nav-label { font-size: 11px; }
.nav-link { font-size: 15px; }
.topbar h1 { font-size: 24px; }
.admin-copy strong { font-size: 13px; }
.admin-copy small { font-size: 11px; }
.eyebrow { font-size: 11px; }
.btn { font-size: 13px; }
.btn-small { font-size: 12px; }
.btn-large { font-size: 14px; }
.welcome-copy p { font-size: 14px; }
.metric-trend { font-size: 10px; }
.metric-card > strong { font-size: 24px; }
.metric-card > span { font-size: 13px; }
.panel-head h3 { font-size: 20px; }
.text-link { font-size: 12px; }
.data-table { font-size: 13px; }
.data-table th { font-size: 11px; }
.data-table td small { font-size: 11px; }
.badge,
.status-label { font-size: 11px; }
.stock-watch-row strong,
.item-cell strong { font-size: 13px; }
.stock-watch-row small,
.stock-count small { font-size: 10px; }
.stock-count { font-size: 13px; }
.quick-strip h3 { font-size: 19px; }
.quick-actions strong { font-size: 12px; }
.quick-actions small { font-size: 10px; }
.page-intro h2 { font-size: 30px; }
.page-intro p { font-size: 14px; }
.summary-ribbon span { font-size: 12px; }
.summary-ribbon strong { font-size: 18px; }
.search-box input,
.toolbar-select { font-size: 13px; }
.result-count { font-size: 12px; }
.tax-chip,
.icon-button { font-size: 11px; }
.vendor-card h3 { font-size: 18px; }
.vendor-card > p { font-size: 12px; }
.vendor-details small,
.vendor-stats small { font-size: 10px; }
.vendor-details strong { font-size: 12px; }
.vendor-address { font-size: 11px; }
.vendor-stats strong { font-size: 15px; }
.dialog-head h2 { font-size: 23px; }
.field { font-size: 12px; }
.field input,
.field select,
.field textarea,
.invoice-note-card textarea { min-height: 44px; font-size: 14px; }
.tax-box p { font-size: 11px; }
.invoice-type-switch b { font-size: 13px; }
.invoice-type-switch small { font-size: 10px; }
.invoice-line-head { font-size: 10px; }
.invoice-line input,
.invoice-line select { height: 41px; font-size: 12px; }
.line-item-select small,
.line-tax small,
.line-total small { font-size: 10px; }
.line-tax strong,
.line-total strong { font-size: 12px; }
.mobile-field-label { font-size: 10px; }
.add-line-wide { font-size: 12px; }
.invoice-note-card h3 { font-size: 19px; }
.entry-tip { font-size: 11px; }
.live-dot { font-size: 10px; }
.total-card dt { font-size: 12px; }
.total-card dd { font-size: 13px; }
.inline-money b,
.inline-money input { font-size: 12px; }
.grand-total span { font-size: 12px; }
.save-hint { font-size: 10px; }
.invoice-shop p,
.invoice-number > span:last-child { font-size: 11px; }
.invoice-number > small,
.invoice-parties small { font-size: 9px; }
.invoice-parties h3 { font-size: 18px; }
.invoice-parties p,
.invoice-parties span { font-size: 11px; }
.invoice-paper-table table { font-size: 11px; }
.invoice-paper-table th { font-size: 9px; }
.invoice-paper-table td small { font-size: 9px; }
.invoice-note small,
.invoice-note span { font-size: 9px; }
.invoice-note p { font-size: 11px; }
.invoice-totals dt { font-size: 11px; }
.invoice-totals dd { font-size: 12px; }
.invoice-paper-foot { font-size: 9px; }
.password-rule { font-size: 11px; }
.session-card p,
.data-card p { font-size: 12px; }
.data-safe { font-size: 11px; }
.toast { font-size: 13px; }
.login-brand span:last-child { font-size: 10px; }
.login-copy p { font-size: 15px; }
.login-location small { font-size: 10px; }
.login-location strong { font-size: 12px; }
.subcopy { font-size: 14px; }
.login-footer { font-size: 10px; }
.inline-alert { font-size: 12px; }

@media (max-width: 920px) {
    .topbar h1 { font-size: 21px; }
    .mobile-page-kicker { font-size: 9px; }
    .mobile-nav small { font-size: 10px; }
}

@media (max-width: 700px) {
    .page-intro h2 { font-size: 26px; }
    .summary-ribbon span { font-size: 11px; }
    .summary-ribbon strong { font-size: 15px; }
    .data-table:not(.invoice-paper-table table) td::before { font-size: 10px; }
    .app-credit { padding: 12px 14px; flex-wrap: wrap; font-size: 10px; text-align: center; }
}

/* Website enquiry workspace */
.enquiry-table { min-width: 900px; }
.enquiry-table th:nth-child(1) { width: 18%; }
.enquiry-table th:nth-child(2) { width: 34%; }
.enquiry-table th:nth-child(5) { width: 24%; }
.enquiry-table td { vertical-align: top; }
.enquiry-table td a { color: var(--forest-700); }
.enquiry-subject { margin-top: 7px; color: var(--muted); font-weight: 750; }
.enquiry-message {
    max-width: 460px;
    margin: 7px 0 5px;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.55;
    white-space: normal;
}
.enquiry-actions { display: grid; gap: 8px; min-width: 180px; }
.enquiry-actions > a { justify-content: center; width: 100%; }
.enquiry-status-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.enquiry-status-form select {
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #d8e0eb;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: 11px;
}

@media (max-width: 760px) {
    .enquiry-toolbar { align-items: stretch; }
    .enquiry-toolbar .result-count { padding-left: 2px; }
    .enquiry-table { min-width: 0; }
    .enquiry-message { max-width: none; }
    .enquiry-actions { width: 100%; min-width: 0; }
}

@media print {
    body { background: white; }
    .sidebar, .topbar, .mobile-nav, .no-print, .toast, .app-credit { display: none !important; }
    .main-shell { margin: 0; }
    .page-content { max-width: none; padding: 0; }
    .invoice-paper { max-width: none; border: 0; box-shadow: none; }
    .invoice-paper-head { padding-top: 20px; }
}
