/* Pro.df - one stylesheet. Colours from the logo: navy, royal blue, sky blue on a
   cool paper white. Signature element: the folder tab (see .folder). */
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex"; src: url("fonts/IBMPlexSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0A2A6B; --navy-2: #0D3480; --royal: #0B4FD8; --royal-h: #0943B8;
  --sky: #7FB6F2; --sky-1: #E7F0FD; --sky-2: #D3E4FB;
  --paper: #F5F8FD; --white: #FFFFFF; --ink: #14213D; --muted: #5B6B8C; --faint: #8B99B5;
  --line: #DCE4F2; --line-2: #EBF0F8;
  --ok: #12805C; --ok-bg: #E3F5EE; --warn: #A36100; --warn-bg: #FFF3DC;
  --bad: #C4314B; --bad-bg: #FCE8EC; --priv: #6B4FB8; --priv-bg: #EFEAFB;
  --r: 10px; --shadow: 0 1px 2px rgba(10, 42, 107, .06), 0 4px 14px rgba(10, 42, 107, .05);
  --side: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Plex", "Segoe UI", system-ui, sans-serif; font-size: 15px; line-height: 1.5;
  color: var(--ink); background: var(--paper); }
a { color: var(--royal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; color: var(--navy); }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 .75em; }
.num, td.num, .money { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh;
  background: linear-gradient(to right, var(--navy) var(--side), transparent var(--side)); }
.side { background: var(--navy); color: #C9D8F5; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 19px;
  padding: 4px 8px 16px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand:hover { text-decoration: none; }
.side .group { font-size: 12px; color: #7F95C6; padding: 14px 10px 4px; }
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: #DCE6FA; font-weight: 500; }
.side a.nav:hover { background: var(--navy-2); text-decoration: none; }
.side a.nav.on { background: var(--royal); color: #fff; }
.side a.nav .badge { margin-left: auto; background: #fff; color: var(--navy); font-size: 12px; font-weight: 700;
  border-radius: 10px; padding: 0 7px; }
.side .me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid #1B3E85; font-size: 13px; }
.side .me b { color: #fff; display: block; }
.side .me form { display: inline; }
.side .me button { background: none; border: 0; color: #9FB6E6; padding: 0; font: inherit; cursor: pointer; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
main { padding: 28px 34px 60px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px; }
.head .sub { color: var(--muted); margin-top: 6px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.split { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
.topbar, .bottomnav { display: none; }

/* ---------- surfaces ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.panel + .panel { margin-top: 18px; }
.grid2 > .panel, .grid3 > .panel, .cards > .panel { margin-top: 0; }
.panel h2 { margin-bottom: 12px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel .phead { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2); }

/* The folder: a card with a tab on its top-left edge, like the folders in the logo. */
.folder { position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: 0 var(--r) var(--r) var(--r); margin-top: 16px; padding: 18px 20px; }
.folder::before { content: ""; position: absolute; left: -1px; top: -15px; width: 42%; max-width: 190px;
  height: 16px; background: var(--white); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 9px 14px 0 0; clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%); }
a.folder { display: block; color: inherit; transition: border-color .15s, transform .15s; }
a.folder:hover { text-decoration: none; border-color: var(--sky); transform: translateY(-1px); }
a.folder:hover::before { border-color: var(--sky); }
.folder.blue { background: var(--royal); border-color: var(--royal); color: #fff; }
.folder.blue::before { background: var(--royal); border-color: var(--royal); }
.folder.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.folder.navy::before { background: var(--navy); border-color: var(--navy); }
.folder.closed { background: #F1F4FA; }
.folder.closed::before { background: #F1F4FA; }

/* start page: the two big doors */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 8px; }
.door { min-height: 230px; display: flex !important; flex-direction: column; padding: 26px 28px 24px !important; }
.door h2 { color: inherit; font-size: 26px; margin: 14px 0 8px; }
.door p { opacity: .86; max-width: 34ch; }
.door .go { margin-top: auto; font-weight: 600; }
.door .ico { width: 40px; height: 40px; stroke-width: 1.5; }
.door.blue p, .door.navy p { color: #E3EDFF; }
.hello { font-size: 15px; color: var(--muted); }
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.attn li:last-child { border-bottom: 0; }
.attn .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  background: var(--white); color: var(--ink); border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 500;
  cursor: pointer; white-space: nowrap; line-height: 1.3; }
.btn:hover { border-color: var(--sky); text-decoration: none; background: #FAFCFF; }
.btn.primary { background: var(--royal); border-color: var(--royal); color: #fff; }
.btn.primary:hover { background: var(--royal-h); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); background: var(--bad-bg); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--royal); padding-left: 6px; padding-right: 6px; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.big { padding: 14px 22px; font-size: 17px; border-radius: 12px; }
.btn[disabled] { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--royal); outline: 3px solid var(--sky-2); outline-offset: 0; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--royal); padding: 0; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.field input, label.field select, label.field textarea { font-size: 15px; color: var(--ink); }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 14px; }
.form .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.check input { margin-top: 3px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input { padding: 6px 9px; font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--royal); }
.tabs a:hover { text-decoration: none; color: var(--navy); }
.tabs a .n { color: var(--faint); font-size: 13px; margin-left: 4px; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 9px 10px;
  border-bottom: 1px solid var(--line); background: #FAFBFE; position: sticky; top: 0; white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:hover td { background: #F8FAFE; }
table.t tr.sel td { background: var(--sky-1); }
table.t td.cb, table.t th.cb { width: 34px; }
table.t tr.total td { font-weight: 700; color: var(--navy); background: #F3F6FC; border-top: 2px solid var(--line); }
table.t .thumb { width: 44px; height: 56px; object-fit: cover; object-position: top; border-radius: 4px;
  border: 1px solid var(--line); background: #EEF2F9; display: block; }
.trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { position: sticky; bottom: 0; background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 14px;
  display: none; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; box-shadow: var(--shadow); }
.bar.show { display: flex; }
.bar .btn { border-color: #2C4F96; background: #133A86; color: #fff; }
.bar .btn:hover { background: #1B4AA3; }
.bar select, .bar input { padding: 5px 8px; font-size: 14px; }

/* ---------- status chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 2px 9px 2px 8px;
  border-radius: 20px; white-space: nowrap; background: var(--line-2); color: var(--muted); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.to_check, .chip.processing { background: var(--sky-1); color: var(--royal); }
.chip.approved, .chip.receipt { background: var(--ok-bg); color: var(--ok); }
.chip.private { background: var(--priv-bg); color: var(--priv); }
.chip.rejected, .chip.missing { background: var(--bad-bg); color: var(--bad); }
.chip.warn, .chip.dup { background: var(--warn-bg); color: var(--warn); }
.chip.income { background: var(--ok-bg); color: var(--ok); }
.chip.processing::before { animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- flash ---------- */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--bad-bg); color: var(--bad); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(142px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 16px; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .v { font-size: 21px; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .s { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.kpi.lead { background: var(--navy); border-color: var(--navy); }
.kpi.lead .l, .kpi.lead .s { color: #A9BDE6; } .kpi.lead .v { color: #fff; font-size: 25px; }
.kpi.bad .v { color: var(--bad); }

/* ---------- chart ---------- */
.chart svg { width: 100%; height: auto; max-height: 300px; display: block; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.cal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cal > div { border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; font-size: 13px; min-height: 64px; }
.cal > div b { display: block; color: var(--navy); }
.cal > div.now { border-color: var(--royal); }

/* ---------- statements list ---------- */
.stlist { list-style: none; margin: 0; padding: 6px; }
.stlist .acc { font-weight: 600; color: var(--navy); padding: 10px 10px 4px; display: flex; justify-content: space-between; }
.stlist a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 7px; color: var(--ink); font-size: 14px; }
.stlist a:hover { background: var(--sky-1); text-decoration: none; }
.stlist a.on { background: var(--royal); color: #fff; }
.stlist a .m { color: var(--bad); font-weight: 600; font-size: 13px; }
.stlist a.on .m { color: #FFD6DE; }

/* ---------- Kassenbon detail ---------- */
.kbview { display: grid; grid-template-columns: minmax(280px, 430px) 1fr; gap: 22px; align-items: start; }
.paper { background: #E9EEF7; border-radius: var(--r); padding: 14px; text-align: center; position: sticky; top: 16px; }
.paper img { max-width: 100%; max-height: 78vh; border-radius: 4px; box-shadow: var(--shadow); background: #fff; }
.alert { border-radius: 10px; padding: 13px 15px; margin-bottom: 14px; }
.alert.warn { background: var(--warn-bg); color: #6B4200; }
.alert.info { background: var(--sky-1); color: var(--navy); }
.alert.bad { background: var(--bad-bg); color: #7A1F30; }
.history { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.history li { padding: 6px 0; border-bottom: 1px solid var(--line-2); color: var(--muted); }
.history b { color: var(--ink); font-weight: 500; }

/* ---------- driver (phone) ---------- */
.capture { display: flex; flex-direction: column; gap: 10px; }
.capture .btn.big { width: 100%; }
.drop { border: 2px dashed var(--sky); border-radius: 14px; padding: 22px; text-align: center; color: var(--muted);
  background: #FAFCFF; }
.drop.over { background: var(--sky-1); border-color: var(--royal); }
.queue { list-style: none; padding: 0; margin: 12px 0 0; }
.queue li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.queue li .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 18px; }
.kbcard { display: flex; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; color: inherit; }
.kbcard:hover { border-color: var(--sky); text-decoration: none; }
.kbcard img { width: 58px; height: 76px; object-fit: cover; object-position: top; border-radius: 5px; border: 1px solid var(--line); background: #EEF2F9; }
.kbcard .v { font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.offline { background: var(--warn-bg); color: #6B4200; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; display: none; }
.offline.show { display: block; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: var(--navy); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; }
.login .art h1 { color: #fff; font-size: 40px; max-width: 13ch; margin-top: 40px; }
.login .art p { color: #B8CAF0; max-width: 40ch; font-size: 17px; }
.login .art .stack { position: absolute; right: -60px; bottom: 60px; width: 340px; opacity: .95; }
.login .art .stack .folder { background: var(--royal); border-color: var(--royal); height: 120px; margin-top: 30px; }
.login .art .stack .folder::before { background: var(--royal); border-color: var(--royal); }
.login .art .stack .folder.b { background: #2E6BE6; border-color: #2E6BE6; margin-left: 40px; }
.login .art .stack .folder.b::before { background: #2E6BE6; border-color: #2E6BE6; }
.login .art .stack .folder.c { background: var(--sky); border-color: var(--sky); margin-left: 80px; }
.login .art .stack .folder.c::before { background: var(--sky); border-color: var(--sky); }
.login form { align-self: center; justify-self: center; width: min(380px, 88vw); display: flex; flex-direction: column; gap: 14px; }
.login form h2 { font-size: 24px; margin-bottom: 4px; }

/* ---------- small screens: the drivers' phone ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .app { display: block; background: none; }
  .side { display: none; }
  .topbar { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 12px 16px;
    position: sticky; top: 0; z-index: 20; }
  .topbar img { width: 30px; height: 30px; border-radius: 7px; }
  .topbar b { font-size: 18px; } .topbar .grow { flex: 1; }
  .topbar a { color: #C9D8F5; font-size: 14px; }
  main { padding: 18px 14px 96px; }
  h1 { font-size: 23px; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--white);
    border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px;
    padding: 9px 0 8px; color: var(--muted); }
  .bottomnav a.on { color: var(--royal); font-weight: 600; }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav .ico { width: 23px; height: 23px; }
  .grid2, .grid3, .split, .kbview { grid-template-columns: 1fr; }
  .paper { position: static; }
  .login { grid-template-columns: 1fr; }
  .login .art { padding: 28px 24px; min-height: 0; }
  .login .art h1 { font-size: 28px; margin-top: 18px; }
  .login .art .stack { display: none; }
  .login form { padding: 30px 0 50px; }
  table.t .hide-m { display: none; }
  .cal { grid-template-columns: repeat(3, 1fr); }
  .door { min-height: 170px; }
}
@media print { .side, .topbar, .bottomnav, .bar, .btn, .filters { display: none !important; } main { padding: 0; } }

/* settings rows */
.frow { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0;
  border-bottom: 1px solid var(--line-2); }
.frow input:not([type=checkbox]), .frow select { padding: 6px 9px; font-size: 14px; width: 100%; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.permgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 20px; }
.permgrid .check { padding: 6px 0; }
.permgrid .check small { display: block; color: var(--faint); }
@media (max-width: 860px) { .hide-m { display: none !important; } .frow { grid-template-columns: 1fr 1fr; } }
.row > input.grow { min-width: 190px; }
/* download menu */
details.dl { position: relative; }
details.dl .pop { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; z-index: 40; box-shadow: var(--shadow); }
details.dl .pop h3 { margin-bottom: 4px; }
@media (max-width: 860px) { details.dl .pop { position: fixed; left: 12px; right: 12px; top: 70px; width: auto; } }
.form input:not([type=checkbox]), .form select, .form textarea { width: 100%; }

/* ---------- picture viewer (zoom, move, turn) ---------- */
.viewer { background: #1B2B4E; border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column;
  height: calc(100vh - 175px); min-height: 460px; position: sticky; top: 24px; }
.vbar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; background: #13213F; color: #DCE6FA; }
.vbtn { background: none; border: 0; color: inherit; width: 36px; height: 34px; border-radius: 7px; display: inline-grid;
  place-items: center; cursor: pointer; font: inherit; font-size: 13px; }
.vbtn:hover { background: #24396A; text-decoration: none; }
.vbtn.txt { width: auto; padding: 0 10px; color: #DCE6FA; white-space: nowrap; }
.vz { min-width: 52px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; color: #fff; }
.vsep { width: 1px; height: 20px; background: #2C4373; margin: 0 6px; }
.vstage { position: relative; flex: 1; overflow: hidden; cursor: grab; touch-action: none; outline: none;
  background: radial-gradient(circle at 50% 40%, #2A3F6E, #1B2B4E 70%); }
.vstage.drag { cursor: grabbing; }
.vstage img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: center center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .35); background: #fff; user-select: none; -webkit-user-drag: none;
  transition: transform .12s ease-out; }
.vstage.drag img, .vstage.pinch img { transition: none; }
.vhint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(10, 20, 45, .78);
  color: #DCE6FA; font-size: 12.5px; padding: 6px 12px; border-radius: 20px; display: flex; gap: 6px; align-items: center;
  pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.vhint .ico { width: 15px; height: 15px; }
.vstage.used .vhint { opacity: 0; }

/* Kassenbon / document page: form on the left, picture on the right */
.kbview { grid-template-columns: minmax(340px, 1fr) minmax(380px, 1.25fr); }
.kbview > .viewer { order: 2; }
.money2 { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.money2 b { color: var(--navy); font-size: 15px; }
@media (max-width: 860px) {
  .kbview { grid-template-columns: 1fr; }
  .kbview > .viewer { order: 0; position: relative; top: 0; height: 64vh; min-height: 360px; }
  .vhint { white-space: normal; text-align: center; width: max-content; max-width: 90%; }
}
#category .frow { grid-template-columns: 1.4fr 1fr 1fr auto auto auto; }
.vatin { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
.frow .vatin input { width: 54px !important; text-align: right; }
.chip.internal { background: var(--priv-bg); color: var(--priv); }
.chip.standing { background: #E6F1FB; color: #1B5FA8; }
.chip.edited { background: #FFF6E0; color: #8A5A00; }
.chip.edited::before { display: none; }
table.t th.num { text-align: right; }
table.t th a.sort { color: inherit; display: inline-flex; gap: 4px; align-items: center; }
table.t th a.sort:hover { color: var(--navy); text-decoration: none; }
table.t th a.sort.on { color: var(--navy); }
.btn.open { padding: 4px 10px; font-size: 13px; }
.thumb.none { width: 44px; height: 0; border: 0; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--royal); background: var(--sky-1);
  border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cmp { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cmphead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.cmp .viewer { position: relative; top: 0; height: calc(100vh - 290px); }
@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } .cmp .viewer { height: 60vh; } }
.accrow { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr .8fr .8fr 34px 78px; gap: 8px; align-items: center;
  padding: 6px 10px; border-bottom: 1px solid var(--line-2); }
.accrow input, .accrow select { padding: 6px 8px; font-size: 14px; width: 100%; }
.accrow.new { background: #FAFBFE; }
table.accs thead th:nth-child(n) { white-space: nowrap; }
table.accs thead { display: none; }
@media (max-width: 860px) { .accrow { grid-template-columns: 1fr 1fr; } }
.accrow.rowhead { font-size: 12.5px; font-weight: 600; color: var(--muted); background: #FAFBFE; }
@media (max-width: 860px) { .accrow.rowhead { display: none; } }
.accrow .btn { justify-content: center; }
.bankt .payee { max-width: 250px; }
.bankt .payee div { max-width: 250px; }
.bankt .chip { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
td.opencell { width: 1%; white-space: nowrap; text-align: right; padding-right: 14px !important; }
.bankt .payee, .bankt .payee div { max-width: 220px; }
.bankt td, .bankt th { padding-left: 8px; padding-right: 8px; }
.bar select { max-width: 220px; }
.ubar { height: 4px; background: var(--line-2); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.ubar i { display: block; height: 4px; width: 0; background: var(--royal); transition: width .2s; }
.queue li .ut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offline .row { gap: 8px; }
/* change menu on bank rows */
details.qmenu { display: inline-block; position: relative; margin-right: 4px; }
details.qmenu .qpop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: var(--white);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 28px rgba(10, 42, 107, .16); padding: 6px;
  width: 300px; text-align: left; white-space: normal; }
details.qmenu .qpop button { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit;
  font-size: 14px; color: var(--ink); padding: 8px 10px; border-radius: 7px; cursor: pointer; }
details.qmenu .qpop button:hover { background: var(--sky-1); }
details.qmenu .qpop small { display: block; color: var(--faint); font-size: 12px; }
tr.flashrow td { background: #FFF8DC !important; transition: background .6s; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--navy); color: #fff;
  padding: 11px 18px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 100; max-width: 90vw; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }
@media (max-width: 860px) { .toast { bottom: 84px; } }
.side .me .ver { display: block; font-size: 11.5px; color: #6F86B8; font-weight: 400; margin: 2px 0 4px; }
.cardrow { display: grid; grid-template-columns: 1.1fr 1fr 1.5fr 1fr 34px 90px; gap: 8px; align-items: center;
  padding: 6px 10px; border-bottom: 1px solid var(--line-2); }
.cardrow input, .cardrow select { padding: 6px 8px; font-size: 14px; width: 100%; }
.cardrow.rowhead { font-size: 12.5px; font-weight: 600; color: var(--muted); background: #FAFBFE; }
.cardrow.new { background: #FAFBFE; }
.cardtag { display: inline-block; font-size: 11.5px; color: #1B5FA8; background: #E6F1FB; border-radius: 4px;
  padding: 0 6px; margin-top: 2px; white-space: nowrap; }
@media (max-width: 860px) { .cardrow { grid-template-columns: 1fr 1fr; } .cardrow.rowhead { display: none; } }
tr.subrow td { padding-top: 5px; padding-bottom: 5px; background: #FBFCFF; }
details.qmenu .qpop a.qlink { display: block; padding: 8px 10px; border-radius: 7px; color: var(--ink); font-size: 14px; }
details.qmenu .qpop a.qlink:hover { background: var(--sky-1); text-decoration: none; }
details.qmenu .qpop a.qlink small { display: block; color: var(--faint); font-size: 12px; }
