/* ProMax ERP web (Blazor, 2.32): the look of the mockups Kemal approved on 30 Nov 2026. Navy menu, teal actions,
   Sora headings, Inter text, white cards on a light grey ground; the same screens fold to one column on a phone. */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: Sora; font-weight: 600; font-display: swap; src: url(fonts/sora-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Sora; font-weight: 600; font-display: swap; src: url(fonts/sora-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --navy: #0B1E3B; --navy-2: #163257; --deep: #08162C; --teal: #12A594; --teal-ink: #0C7F72; --teal-soft: #F0FAF8; --teal-line: #BFE6DF;
  --ground: #F3F5F8; --card: #fff; --line: #E1E6EE; --line-soft: #EEF1F5; --field: #D5DCE6; --ink: #13223A; --ink-2: #41526B; --muted: #5B6B82;
  --menu-ink: #C9D4E3; --menu-label: #8FA0B8;
  --open-bg: #E6F0FB; --open-fg: #1B4F8C; --late-bg: #FFF1DC; --late-fg: #8A4B00; --paid-bg: #E2F5EE; --paid-fg: #0E6B4D;
  --draft-bg: #EEEAFB; --draft-fg: #4B3BA8; --red-bg: #FDE8E8; --red-fg: #A61B1B;
  --radius: 12px; --radius-s: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font: 14px/1.45 Inter, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--teal-ink); }
a:hover { color: var(--deep); }
h1, h2, h3 { font-family: Sora, Inter, sans-serif; font-weight: 600; color: var(--navy); margin: 0; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.lab { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ the frame: menu, top bar, page */
.shell { display: flex; min-height: 100vh; }
.menu { width: 232px; flex: 0 0 232px; background: var(--navy); color: var(--menu-ink); display: flex; flex-direction: column; gap: 2px;
  padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; color: #fff; text-decoration: none; font: 600 18px Sora, sans-serif; }
.brand:hover { color: #fff; }
.brand .erp { color: var(--teal); margin-left: 4px; }
.menu .section { padding: 14px 12px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--menu-label); }
.menu a.item { display: flex; align-items: center; gap: 10px; color: var(--menu-ink); text-decoration: none; padding: 9px 12px; border-radius: var(--radius-s); }
.menu a.item:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu a.item.active { background: var(--navy-2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--teal); }
.menu a.item .count { margin-left: auto; font-size: 11px; color: var(--menu-label); }
.menu .foot { margin-top: auto; padding: 12px; font-size: 11px; color: var(--menu-label); }
.menu svg { flex: 0 0 auto; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; }
.top .burger { display: none; }
.picker { display: flex; align-items: center; gap: 8px; border: 1px solid var(--field); background: #fff; border-radius: var(--radius-s); padding: 0 6px 0 10px;
  min-height: 38px; }
.picker select { border: 0; background: none; font: inherit; color: var(--ink); padding: 8px 2px; max-width: 260px; }
.picker select:focus { outline: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 600; border: 0; cursor: pointer; font: 600 14px Inter, sans-serif; }
.usermenu { position: relative; }
.usermenu .pop { position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(11,30,59,.16);
  min-width: 240px; padding: 8px; z-index: 40; }
.usermenu .pop .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.usermenu .pop button, .usermenu .pop a { display: block; width: 100%; text-align: left; border: 0; background: none; font: inherit; color: var(--ink); padding: 9px 10px;
  border-radius: var(--radius-s); cursor: pointer; text-decoration: none; }
.usermenu .pop button:hover, .usermenu .pop a:hover { background: var(--ground); }
.page { padding: 22px 24px 32px; display: flex; flex-direction: column; gap: 16px; max-width: 1480px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ------------------------------------------------------------------ controls */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--field); background: #fff; color: var(--ink); border-radius: var(--radius-s);
  padding: 8px 13px; min-height: 38px; font: 500 14px Inter, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #b9c4d3; color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.btn .key { color: var(--muted); font-size: 12px; font-weight: 500; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #0f9384; color: #fff; }
.btn.primary .key { color: rgba(255,255,255,.8); }
.btn.soft { background: var(--teal-soft); border-color: var(--teal-line); color: var(--teal-ink); }
.btn.soft .key { color: var(--teal-ink); opacity: .8; }
.btn.danger { color: var(--red-fg); }
.btn.icon { padding: 8px 10px; }
.chip { border: 1px solid var(--field); background: #fff; border-radius: 999px; padding: 7px 14px; font: 500 13px Inter, sans-serif; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
input.text, select.text, textarea.text { border: 1px solid var(--field); border-radius: var(--radius-s); padding: 8px 11px; font: inherit; color: var(--ink); background: #fff;
  min-height: 38px; width: 100%; }
input.text:focus, select.text:focus, textarea.text:focus, .search input:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--field); border-radius: var(--radius-s); padding: 0 10px; background: #fff; color: var(--muted); min-height: 38px; }
.search input { border: 0; font: inherit; color: var(--ink); flex: 1; min-width: 0; padding: 8px 0; background: none; }
.search select { border: 0; font: inherit; color: var(--muted); background: none; max-width: 150px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.open { background: var(--open-bg); color: var(--open-fg); }
.pill.overdue { background: var(--late-bg); color: var(--late-fg); }
.pill.paid, .pill.invoiced, .pill.received, .pill.approved { background: var(--paid-bg); color: var(--paid-fg); }
.pill.draft { background: var(--draft-bg); color: var(--draft-fg); }
.pill.cancelled { background: var(--line-soft); color: var(--muted); }

/* ------------------------------------------------------------------ cards, strip, tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 16px; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; min-width: 0; }
.tile .label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.tile .value { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .sub { font-size: 12px; color: var(--muted); }
.tile .sub.late { color: var(--late-fg); font-weight: 600; }
.tile.selected { background: var(--teal-soft); border-color: var(--teal-line); }
.tile.selected .label, .tile.selected .sub { color: var(--teal-ink); }
.tile.link { cursor: pointer; text-decoration: none; color: inherit; }
.tile.link:hover { border-color: #b9c4d3; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #FAFBFC; border-radius: var(--radius) var(--radius) 0 0; }
.scroll-x { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 10px 8px; white-space: nowrap; }
table.grid td { padding: 11px 8px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
table.grid th:first-child, table.grid td:first-child { padding-left: 16px; }
table.grid th:last-child, table.grid td:last-child { padding-right: 16px; }
table.grid tbody tr { cursor: default; }
table.grid tbody tr:hover td { background: #F7F9FB; }
table.grid tbody tr.sel td { background: var(--teal-soft); }
table.grid tbody tr.cur td { box-shadow: inset 0 1px 0 var(--teal-line), inset 0 -1px 0 var(--teal-line); }
table.grid tbody tr.cur td:first-child { box-shadow: inset 3px 0 0 var(--teal), inset 0 1px 0 var(--teal-line), inset 0 -1px 0 var(--teal-line); }
table.grid .strong { font-weight: 600; }
table.grid a.no { font-weight: 600; text-decoration: none; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.more { padding: 10px 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line-soft); }
.keys { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------------ messages */
.msg { padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.msg.info { background: var(--open-bg); border-color: #C9DDF4; color: var(--open-fg); }
.msg.success { background: var(--paid-bg); border-color: #BFE6D5; color: var(--paid-fg); }
.msg.warning { background: var(--late-bg); border-color: #F4D9AE; color: var(--late-fg); }
.msg.error { background: var(--red-bg); border-color: #F3C2C2; color: var(--red-fg); }
.msg .close { margin-left: auto; border: 0; background: none; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; }

/* ------------------------------------------------------------------ dialogs */
.overlay { position: fixed; inset: 0; background: rgba(8,22,44,.45); z-index: 100; display: grid; place-items: center; padding: 16px; }
.dialog { background: #fff; border-radius: 14px; box-shadow: 0 24px 64px rgba(8,22,44,.3); width: min(560px, 100%); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; overflow: hidden; }
.dialog.wide { width: min(920px, 100%); }
.dialog header { padding: 16px 18px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-soft); }
.dialog header h2 { flex: 1; }
.dialog .body { padding: 16px 18px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.dialog footer { padding: 12px 18px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line-soft); }
.choice { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--radius);
  padding: 12px 14px; font: inherit; color: var(--ink); cursor: pointer; }
.choice:hover, .choice:focus { border-color: var(--teal); outline: none; background: var(--teal-soft); }
.choice .n { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.choice b { display: block; }
.choice:disabled { opacity: .5; cursor: default; }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.methods button { border: 1px solid var(--field); background: #fff; border-radius: var(--radius-s); padding: 10px; font: 500 14px Inter, sans-serif; cursor: pointer; display: flex; justify-content: space-between; gap: 6px; }
.methods button.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); font-weight: 600; }
.methods button .key { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------------ the document editor */
.doc { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.doc .left { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.doc .right { flex: 1 1 270px; max-width: 330px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 74px; }
.head-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px; }
.head-fields .wide { grid-column: span 2; }
.party { display: flex; align-items: center; gap: 8px; border: 1px solid var(--field); border-radius: var(--radius-s); min-height: 38px; padding: 0 4px 0 11px; background: #fff; }
.party input { border: 0; font: inherit; color: var(--ink); flex: 1; min-width: 60px; padding: 8px 0; background: none; }
.party input:focus { outline: none; }
.party:focus-within { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.party .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.party .sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partyinfo { font-size: 12px; color: var(--late-fg); font-weight: 600; }
.tabs { display: flex; gap: 2px; padding: 4px 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { border: 0; background: none; padding: 10px 12px; font: 500 14px Inter, sans-serif; color: var(--muted); cursor: pointer; }
.tabs button.on { color: var(--navy); font-weight: 600; box-shadow: inset 0 -2px 0 var(--teal); }
table.lines { width: 100%; border-collapse: collapse; }
table.lines th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 8px 6px; white-space: nowrap; }
table.lines th.num { text-align: right; }
table.lines td { padding: 3px 4px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
table.lines td.ro { padding: 8px 6px; }
table.lines tr.cur td { background: #F7FCFB; }
table.lines tr.below td { background: #FDF0F0; }
table.lines input { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 7px 5px; font: inherit; color: var(--ink); min-width: 0; }
table.lines input.num { text-align: right; }
table.lines input:hover { border-color: var(--line); }
table.lines input:focus { outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 2px rgba(18,165,148,.18); }
table.lines input:read-only { color: var(--ink-2); }
table.lines .lineno { color: var(--muted); width: 32px; text-align: right; padding-right: 8px; }
table.lines .del { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
table.lines .del:hover { color: var(--red-fg); background: var(--red-bg); }
.article-info { padding: 8px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-soft); }
.totals { display: flex; flex-direction: column; gap: 7px; padding: 16px; }
.totals .row { display: flex; justify-content: space-between; gap: 10px; }
.totals .row span:first-child { color: var(--ink-2); }
.totals .sum { border-top: 1px solid var(--line); padding-top: 9px; font-size: 18px; font-weight: 700; }
.totals .sum span:first-child { color: var(--ink); }
.totals .sep { border-top: 1px solid var(--line-soft); padding-top: 7px; }
.vatbases { font-size: 12px; color: var(--muted); }
.ro-field { display: flex; align-items: center; border: 1px solid var(--line); background: var(--ground); border-radius: var(--radius-s); padding: 8px 11px; min-height: 38px; color: var(--ink-2); }
table.lines th.num, table.lines td.num { text-align: right; }
.phone-desc { display: none; }
@media (max-width: 700px) { .phone-desc { display: block; } table.lines .opt { display: none; } table.lines th:nth-child(2) { width: auto !important; } .btn .key { display: none; } .list-bar, .tile.selected { display: none; } }
.statebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mobile-only { display: none; }

/* ------------------------------------------------------------------ sign-in page */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--navy); }
.login-page .card { width: min(420px, 100%); padding: 28px 28px 20px; border: 0; box-shadow: 0 24px 64px rgba(0,0,0,.3); border-radius: 16px; }
.login-page .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 600 20px Sora, sans-serif; color: var(--navy); }
.login-page .logo .erp { color: var(--teal); }
.login-page .step { display: flex; flex-direction: column; gap: 8px; }
.login-page h1 { font-size: 22px; margin-bottom: 6px; }
.login-page label { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-top: 4px; }
.login-page input[type=text], .login-page input[type=password] { border: 1px solid var(--field); border-radius: var(--radius-s); padding: 11px 12px; font: inherit; font-size: 15px; }
.login-page input:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.login-page input.code { font-size: 24px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.login-page button[type=submit] { margin-top: 10px; background: var(--teal); color: #fff; border: 0; border-radius: var(--radius-s); padding: 12px; font: 600 15px Inter, sans-serif; cursor: pointer; }
.login-page button[type=submit]:disabled { opacity: .6; }
.login-page button.link { background: none; border: 0; color: var(--teal-ink); font: inherit; cursor: pointer; padding: 8px; }
.login-page .error { background: var(--red-bg); color: var(--red-fg); border-radius: var(--radius-s); padding: 9px 11px; margin: 4px 0 0; font-size: 13px; }
.login-page .hint { color: var(--muted); margin: 0; font-size: 13px; }
.login-page .company { font-weight: 600; margin: 0; }
.login-page .check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.login-page .qr { display: grid; place-items: center; padding: 8px; }
.login-page .qr svg { width: 200px; height: 200px; }
.login-page details { font-size: 13px; color: var(--muted); }
.login-page code.secret { font-size: 15px; letter-spacing: .08em; color: var(--ink); }
.login-page footer { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; font-size: 12px; color: var(--muted); }
.login-page footer select { border: 1px solid var(--field); border-radius: 6px; padding: 4px 6px; font: inherit; }
.login-page .spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin 1s linear infinite; margin: 20px auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ the connection to the server */
#components-reconnect-modal { display: none; }
#components-reconnect-modal.components-reconnect-show, #components-reconnect-modal.components-reconnect-failed, #components-reconnect-modal.components-reconnect-rejected {
  display: flex; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 200; background: var(--navy); color: #fff; border-radius: 10px;
  padding: 10px 16px; gap: 10px; align-items: center; box-shadow: 0 12px 32px rgba(8,22,44,.35); }
#components-reconnect-modal a { color: #fff; font-weight: 600; }
#components-reconnect-modal .when-failed, #components-reconnect-modal .when-rejected { display: none; }
#components-reconnect-modal.components-reconnect-failed .when-failed { display: inline; }
#components-reconnect-modal.components-reconnect-failed .when-show { display: none; }
#components-reconnect-modal.components-reconnect-rejected .when-rejected { display: inline; }
#components-reconnect-modal.components-reconnect-rejected .when-show { display: none; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--red-bg); color: var(--red-fg); padding: 10px 16px; z-index: 300; }
#blazor-error-ui .reload { font-weight: 600; margin-left: 8px; }

/* ------------------------------------------------------------------ phones and small tablets */
.tabbar { display: none; }
@media (max-width: 900px) {
  .menu { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .shell.menu-open .menu { transform: none; }
  .shell.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(8,22,44,.4); z-index: 50; }
  .top .burger { display: inline-flex; }
  .top { padding: 8px 12px; }
  .page { padding: 14px 12px 96px; gap: 12px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .head-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc .right { position: static; max-width: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; height: 64px; background: #fff;
    border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; }
  .tabbar a.active { color: var(--teal-ink); font-weight: 600; }
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
  h1 { font-size: 22px; }
  .picker select { max-width: 150px; }
}
@media (max-width: 560px) {
  .head-fields { grid-template-columns: minmax(0, 1fr); }
  .head-fields .wide { grid-column: auto; }
  .tile .value { font-size: 18px; }
  .dialog { border-radius: 14px 14px 0 0; align-self: end; max-height: 92vh; }
  .overlay { padding: 0; place-items: end stretch; }
}

/* the list as cards on a phone */
.cards { display: none; }
@media (max-width: 700px) {
  .cards { display: flex; flex-direction: column; gap: 8px; }
  .table-wide { display: none; }
  .cards .doccard { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
    text-decoration: none; color: var(--ink); }
  .cards .doccard.sel { border-color: var(--teal); background: var(--teal-soft); }
  .cards .doccard .row1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
  .cards .doccard .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cards .doccard .row2 { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); }
}
@media print {
  .menu, .top, .tabbar, .actions, .bar { display: none !important; }
}
