/* Namana Facilities app. Brand from the NF logo: navy #2e2b5f / #14133a, sky blue #17ace3. */
:root {
  --bg: #f5f6fb; --surface: #fff; --surface-2: #f1f3f9; --surface-3: #e8ebf4;
  --text: #16163a; --text-2: #3b3d5c; --muted: #6b6f8c; --line: #e3e6f0; --line-2: #d3d7e6;
  --navy: #2e2b5f; --navy-deep: #14133a; --sky: #17ace3; --sky-ink: #0a7fae; --sky-soft: #e3f5fc;
  --primary: #2e2b5f; --primary-ink: #fff; --primary-soft: #ecebf7;
  --good: #15803d; --good-soft: #dcfce7; --warn: #a16207; --warn-soft: #fef3c7; --bad: #b91c1c; --bad-soft: #fee2e2; --info: #0a7fae; --info-soft: #e0f2fe;
  --bar: #17ace3;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 19, 58, .04), 0 4px 16px rgba(20, 19, 58, .06);
  --shadow-lg: 0 24px 64px rgba(20, 19, 58, .22);
  --sidebar: 248px; --topbar: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d1f; --surface: #15152b; --surface-2: #1c1c36; --surface-3: #25254a;
    --text: #ecedf7; --text-2: #c7c9df; --muted: #9194b3; --line: #29294a; --line-2: #34345c;
    --primary: #8f8ae6; --primary-ink: #0d0d1f; --primary-soft: #25244a; --sky-ink: #5fd0f5; --sky-soft: #0e2a38;
    --good: #4ade80; --good-soft: #0f2a1b; --warn: #fbbf24; --warn-soft: #2d2410; --bad: #f87171; --bad-soft: #321616; --info: #5fd0f5; --info-soft: #0c2533;
    --bar: #3cc0ee;
    --shadow: none; --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--sky-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; font-weight: 750; } h2 { font-size: 1.06rem; font-weight: 650; } h3 { font-size: .96rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); } .small { font-size: .84rem; } .strong { font-weight: 650; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.num { font-variant-numeric: tabular-nums; }

/* ── Shell ── */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--navy-deep); color: #d9dbf0; display: flex; flex-direction: column; z-index: 30; }
.sidebar-head { height: var(--topbar); display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; }
.brand, .topbar-brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-weight: 700; font-size: 1.02rem; }
.brand img, .topbar-brand img { border-radius: 8px; background: #fff; }
.brand b, .topbar-brand b { color: var(--sky); font-weight: 700; margin-left: .25rem; }
.brand:hover, .topbar-brand:hover { text-decoration: none; }
.nav { flex: 1; overflow-y: auto; padding: .25rem .7rem 1rem; display: flex; flex-direction: column; gap: 2px; }
.nav .group { margin: 1rem .6rem .35rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #8e90b8; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .5rem .65rem; border-radius: 9px; color: #c9cbe6; font-weight: 500; }
.nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(23, 172, 227, .18); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--sky); }
.nav a .count { margin-left: auto; background: var(--sky); color: #06283a; border-radius: 99px; font-size: .72rem; font-weight: 700; padding: 0 .45rem; }
.sidebar-foot { padding: .8rem 1rem 1rem; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; color: #9ea1c6; }
.sidebar-foot a { color: #cfe9f6; }
.main { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: .75rem; padding: 0 1.4rem; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-brand { display: none; color: var(--text); }
.topbar-title { font-weight: 650; color: var(--text-2); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.view { flex: 1; padding: 1.5rem 1.4rem 4rem; max-width: 1240px; width: 100%; outline: none; }
.menu-btn, .only-mobile { display: none; }
.scrim { display: none; }
body.guest .sidebar, body.guest .menu-btn { display: none; }
body.guest .main { margin-left: 0; }
body.guest .topbar-brand { display: inline-flex; }
body.guest .view { margin: 0 auto; max-width: 880px; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 10, 30, .45); z-index: 25; }
  .main { margin-left: 0; }
  .menu-btn, .only-mobile { display: inline-grid; }
  .only-mobile { color: #fff; }
  .topbar { padding: 0 .9rem; }
  .topbar-brand { display: inline-flex; }
  .topbar-title { display: none; }
  .view { padding: 1rem 1rem 5rem; }
}

/* ── Controls ── */
button, .btn { font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .55rem .95rem; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; min-height: 40px; }
button:hover, .btn:hover { background: var(--surface-2); text-decoration: none; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--sky) 55%, transparent); outline-offset: 1px; }
.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.primary:hover { background: var(--navy-deep); }
@media (prefers-color-scheme: dark) { .primary { background: var(--sky); border-color: var(--sky); color: #04202e; } .primary:hover { background: #3cc0ee; } }
.accent { background: var(--sky); border-color: var(--sky); color: #04202e; } .accent:hover { background: #0f9bd0; }
.good-btn { background: var(--good); border-color: var(--good); color: #fff; }
.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line-2)); }
.ghost { background: transparent; border-color: transparent; }
.small-btn { min-height: 32px; padding: .3rem .65rem; font-size: .85rem; }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 10px; position: relative; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; }
.wa-btn { color: #128c4b; } @media (prefers-color-scheme: dark) { .wa-btn { color: #4ade80; } }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.spacer { flex: 1; }
.stack > * + * { margin-top: .9rem; }

label.field { display: grid; gap: .3rem; font-weight: 600; font-size: .88rem; color: var(--text-2); }
label.field small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; width: 100%; padding: .55rem .7rem; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); min-height: 40px; }
textarea { min-height: 84px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--navy); }
.grid { display: grid; gap: .9rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
.checks { display: flex; flex-wrap: wrap; gap: .45rem; }
.checks label { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border: 1px solid var(--line-2); border-radius: 99px; font-weight: 500; cursor: pointer; }
.checks label:has(input:checked) { border-color: var(--navy); background: var(--primary-soft); }

/* ── Surfaces ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.card + .card, .card + .layout-2, .layout-2 + .card { margin-top: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; }
.card-head h2 { margin: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: .2rem 0 0; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .layout-2 { grid-template-columns: 1fr; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .9rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: block; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: var(--line-2); }
.kpi .label { color: var(--muted); font-size: .8rem; font-weight: 600; }
.kpi .value { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; margin-top: .15rem; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: .8rem; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }

.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 99px; font-size: .76rem; font-weight: 650; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.info { background: var(--info-soft); color: var(--info); } .pill.navy { background: var(--primary-soft); color: var(--primary); }

table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.link { cursor: pointer; } .table tr.link:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; margin: 0 -1.2rem; padding: 0 1.2rem; }
@media (max-width: 720px) {
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .table.responsive td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .2rem 0; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; }
  .table.responsive td.primary-cell { font-weight: 650; } .table.responsive td.primary-cell::before { content: none; }
}
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.chips a { padding: .35rem .75rem; border-radius: 99px; border: 1px solid var(--line-2); color: var(--text-2); font-weight: 600; font-size: .84rem; background: var(--surface); }
.chips a:hover { text-decoration: none; background: var(--surface-2); }
.chips a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chips a .n { color: inherit; opacity: .7; margin-left: .25rem; }
.searchbar { display: flex; gap: .5rem; margin-bottom: .9rem; }
.searchbar input { max-width: 380px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: .8rem; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .86rem; } dl.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.list-item { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--line); color: inherit; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { text-decoration: none; background: var(--surface-2); margin: 0 -.6rem; padding: .7rem .6rem; border-radius: 10px; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 650; }
.list-item .sub { color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.3rem; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline li.internal::before { background: var(--warn); }
.timeline .when { color: var(--muted); font-size: .78rem; }

.steps { display: flex; gap: 0; margin: .5rem 0 1rem; counter-reset: s; }
.steps li { list-style: none; flex: 1; text-align: center; font-size: .76rem; color: var(--muted); position: relative; padding-top: 30px; font-weight: 600; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--muted); display: grid; place-items: center; font-size: .75rem; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--text-2); } .steps li.done::before { background: var(--sky); color: #04202e; content: "✓"; } .steps li.done::after { background: var(--sky); }
.steps li.current { color: var(--text); } .steps li.current::before { background: var(--navy); color: #fff; } .steps li.current::after { background: var(--sky); }
@media (max-width: 560px) { .steps li { font-size: 0; } }

.money-table { width: 100%; border-collapse: collapse; }
.money-table th, .money-table td { padding: .45rem .3rem; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.money-table th:first-child, .money-table td:first-child { text-align: left; }
.money-table th { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.money-table tfoot td { border: 0; padding: .25rem .3rem; }
.money-table tfoot tr.total td { font-weight: 750; font-size: 1.05rem; border-top: 2px solid var(--line-2); padding-top: .5rem; }

/* Quote editor */
.q-lines { display: grid; gap: .5rem; }
.q-line { display: grid; grid-template-columns: minmax(0, 3fr) 90px 100px 110px 36px; gap: .4rem; align-items: center; }
.q-line .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.q-head { font-size: .74rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 640px) { .q-line { grid-template-columns: 1fr 1fr 1fr 36px; } .q-line .desc { grid-column: 1 / -1; } .q-line .amt { display: none; } .q-head { display: none; } }

/* Charts: one series each, single brand hue, value on hover. */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; align-items: end; height: 170px; padding-top: 1.2rem; border-bottom: 1px solid var(--line-2); }
.bars .b { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bars .b .fill { display: block; background: var(--bar); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars .b:hover .fill { filter: brightness(1.12); }
.bars .b .tip { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--h) + 4px); font-size: .72rem; font-weight: 650; color: var(--text-2); white-space: nowrap; opacity: 0; transition: opacity .12s; pointer-events: none; }
.bars .b:hover .tip, .bars .b.last .tip { opacity: 1; }
.bar-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; font-size: .74rem; color: var(--muted); text-align: center; margin-top: .35rem; }
.hbars { display: grid; gap: .55rem; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: .6rem; align-items: center; font-size: .86rem; }
.hbar .track { height: 10px; border-radius: 0 4px 4px 0; background: transparent; }
.hbar .track span { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.hbar .val { font-variant-numeric: tabular-nums; font-weight: 600; }

.stars { display: inline-flex; gap: .2rem; }
.stars button { min-height: 0; padding: .2rem; border: 0; background: none; color: var(--line-2); }
.stars button.on, .stars .on { color: #f5a623; }
.stars .i { width: 26px; height: 26px; fill: currentColor; }

/* Sign-in and public pages */
.auth-wrap { max-width: 440px; margin: 2rem auto; }
.tabs { display: grid; grid-auto-flow: column; gap: 3px; padding: 3px; background: var(--surface-2); border-radius: 12px; margin-bottom: 1rem; }
.tabs button { border: 0; background: transparent; min-height: 36px; color: var(--muted); }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.hero-card { background: linear-gradient(135deg, var(--navy-deep), var(--navy) 60%, #1b5f8c); color: #fff; border-radius: var(--radius); padding: 1.3rem 1.4rem; margin-bottom: 1rem; }
.hero-card h1 { color: #fff; } .hero-card .muted { color: #c8cbef; }
.hero-card .pill { background: rgba(255, 255, 255, .16); color: #fff; }
.callout { border-radius: var(--radius-sm); padding: .8rem 1rem; background: var(--info-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout.good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.devcode { font-family: ui-monospace, monospace; background: var(--warn-soft); padding: .1rem .4rem; border-radius: 6px; }

/* Dialog, toast, dropdown */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.wide { width: min(880px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(10, 10, 30, .5); }
#dialog-body { padding: 1.3rem 1.4rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.dialog-head h2 { margin: 0; font-size: 1.15rem; }
.dialog-foot { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.form-error { color: var(--bad); font-weight: 600; font-size: .88rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy-deep); color: #fff; padding: .7rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: calc(100vw - 32px); font-weight: 500; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.bad { background: var(--bad); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); width: min(380px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 40; padding: .5rem; max-height: 70vh; overflow: auto; }
.dropdown a, .dropdown button.item { display: block; width: 100%; text-align: left; padding: .6rem .7rem; border-radius: 10px; color: var(--text); border: 0; background: none; font-weight: 500; min-height: 0; }
.dropdown a:hover, .dropdown button.item:hover { background: var(--surface-2); text-decoration: none; }
.dropdown .unread { background: var(--sky-soft); }
.rel { position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* Day agenda */
.day { margin-bottom: 1rem; }
.day h3 { font-size: .86rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 .4rem; }
.day.today h3 { color: var(--sky-ink); }
.job { display: grid; grid-template-columns: 84px 1fr auto; gap: .8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .45rem; color: inherit; }
.job.inspection { border-left-color: var(--warn); }
.job.done { border-left-color: var(--good); opacity: .8; }
a.job:hover { text-decoration: none; box-shadow: var(--shadow); }
@media (max-width: 600px) { .job { grid-template-columns: 1fr; gap: .2rem; } }

/* Invoice print */
.invoice-doc { background: #fff; color: #111; border-radius: 12px; padding: 2rem; max-width: 820px; margin: 0 auto; box-shadow: var(--shadow); }
.invoice-doc h1 { color: #14133a; }
.invoice-doc .muted { color: #555; }
.invoice-doc table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.invoice-doc th, .invoice-doc td { border-bottom: 1px solid #ddd; padding: .45rem .4rem; text-align: right; font-variant-numeric: tabular-nums; }
.invoice-doc th:first-child, .invoice-doc td:first-child { text-align: left; }
.invoice-doc .inv-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 3px solid #17ace3; padding-bottom: 1rem; margin-bottom: 1rem; }
.invoice-doc .inv-top img { height: 56px; }
.invoice-doc .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.invoice-doc .totals { margin-left: auto; width: min(320px, 100%); }
.invoice-doc .totals td { border: 0; padding: .2rem .4rem; }
.invoice-doc .totals tr.grand td { border-top: 2px solid #14133a; font-weight: 800; font-size: 1.1rem; }
.invoice-doc .stamp { display: inline-block; border: 2px solid #15803d; color: #15803d; border-radius: 8px; padding: .2rem .7rem; font-weight: 800; letter-spacing: .1em; transform: rotate(-4deg); }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .toast { display: none !important; }
  .main { margin: 0; } .view { padding: 0; max-width: none; }
  .invoice-doc { box-shadow: none; padding: 0; }
}
