/* Ecorento partner portal and damage register: the "Ecorento Matcha" look (run matcha-theme). One font, Manrope, self-hosted
   (assets/fonts, SIL OFL); big buttons; light and dark through prefers-color-scheme. Tokens as drawn in the mock-up.
   The fonts never swap in late (rework-foundation-b, tech-findings 1): views/layout.php preloads them and the server keeps them
   a year, so they're there when the page is drawn; if they aren't yet (a first visit on a slow line), that page keeps the
   size-matched fallback below and the next one has Manrope. A swap would move the text. */
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: optional;
  src: url(fonts/manrope-cyrillic-wght-normal.26287892.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-style: normal; font-weight: 200 800; font-display: optional;
  src: url(fonts/manrope-latin-ext-wght-normal.c184517a.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: Manrope; font-style: normal; font-weight: 200 800; font-display: optional;
  src: url(fonts/manrope-latin-wght-normal.14be4114.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* The fallback, for a page drawn before Manrope arrived: Arial at Manrope's width and height at each weight the pages use
   (measured in Chrome against Lithuanian headings, labels and amounts), so it looks close. Manrope's ascent is 1.066 and
   its descent 0.30 of its size. */
@font-face { font-family: 'Manrope Fallback'; font-weight: 200 400; src: local('Arial'), local('ArialMT'); size-adjust: 102.2%; ascent-override: 104.3%; descent-override: 29.4%; line-gap-override: 0%; }
@font-face { font-family: 'Manrope Fallback'; font-weight: 500; src: local('Arial'), local('ArialMT'); size-adjust: 104.3%; ascent-override: 102.2%; descent-override: 28.8%; line-gap-override: 0%; }
@font-face { font-family: 'Manrope Fallback'; font-weight: 600; src: local('Arial Bold'), local('Arial-BoldMT'); size-adjust: 99.7%; ascent-override: 106.9%; descent-override: 30.1%; line-gap-override: 0%; }
@font-face { font-family: 'Manrope Fallback'; font-weight: 700; src: local('Arial Bold'), local('Arial-BoldMT'); size-adjust: 101.7%; ascent-override: 104.8%; descent-override: 29.5%; line-gap-override: 0%; }
@font-face { font-family: 'Manrope Fallback'; font-weight: 800; src: local('Arial Bold'), local('Arial-BoldMT'); size-adjust: 103.5%; ascent-override: 103.0%; descent-override: 29.0%; line-gap-override: 0%; }

:root {
  --page: #f0f0e0; --surface: #ffffff; --sunk: #f7f7ee; --ink: #3e481d; --ink2: #5a6b2a; --line: #dce3ce; --field: #7f8b5b;
  --tint: #3e481d12; --btn: #3e481d; --btnink: #ffffff;
  --leaf: #4d9900; --ok: #356a00; --okbg: #4d99001f; --honey: #7a5c00; --honeybg: #f2c00033;
  --sky: #2e4a6e; --skybg: #3a5e8c1f; --red: #b42318; --redbg: #b423181a; --redink: #ffffff;
  --shadow: 0 1px 2px #3e481d0d, 0 4px 12px #3e481d14;
  --staging: #b42318; --shade: rgba(62, 72, 29, .2);
  /* The names the rest of this file was written with, now the Matcha tokens */
  --bg: var(--page); --muted: var(--ink2); --accent: var(--btn); --accent-ink: var(--btnink);
  --warn: var(--honey); --warn-bg: var(--honeybg); --danger: var(--red); --danger-bg: var(--redbg); --danger-ink: var(--redink); --ok-bg: var(--okbg);
  --switch-off: var(--field);
  --radius: 12px;
  /* One type scale (zalos-desktop-14): every font-size in this file is one of these six (the page title is --fs-6) */
  --fs-1: .75rem; --fs-2: .8125rem; --fs-3: .875rem; --fs-4: 1rem; --fs-5: 1.25rem; --fs-6: 1.75rem;
  --font: Manrope, 'Manrope Fallback', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #12140e; --surface: #1a1c14; --sunk: #16180f; --ink: #d3dcbf; --ink2: #a3b07a; --line: #2e3322; --field: #6b7650;
    /* The filled button is a leaf-tinted olive with light text, not the brightest block on the page (zalos-phone-130); the
       accent (lines, outlined parts, links) keeps the light sage. */
    --tint: #c0cba91a; --btn: #47621a; --btnink: #f0f4e4; --accent: #c0cba9; --accent-ink: #12140e;
    --leaf: #6dbf2a; --ok: #80d43a; --okbg: #6dbf2a26; --honey: #ffe08b; --honeybg: #f6d06626;
    --sky: #8dbce0; --skybg: #7ba8d426; --red: #ff8a80; --redbg: #ff5c5c26; --redink: #12140e;
    --shadow: 0 4px 16px #00000059;
    --shade: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); min-height: 100%; font-family: var(--font); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); }
a { color: var(--ink); text-decoration: none; }
:where(a):hover { color: var(--ink2); }
h1 { font-size: var(--fs-6); line-height: 1.2; font-weight: 800; margin: .4rem 0 1rem; letter-spacing: -.02em; }
@media (min-width: 900px) { h1 { font-size: var(--fs-6); } }
h2 { font-size: var(--fs-5); line-height: 1.25; font-weight: 800; margin: 1.8rem 0 .6rem; letter-spacing: -.02em; }
p { margin: 0 0 .8rem; }
ul.plain { padding-left: 1.2rem; margin: 0 0 1rem; }
ul.plain li { margin-bottom: .4rem; }
.muted { color: var(--muted); }
.opt { color: var(--muted); font-size: var(--fs-2); font-weight: 400; }
/* Check pages: what Claude read. "Skaitomi failai…" above the fields, "iš „file“" after a label. */
.reading { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin: 0; color: var(--muted); }
.from { color: var(--muted); font-size: var(--fs-2); font-weight: 400; overflow-wrap: anywhere; }
button, input, select, textarea, optgroup, option, summary, legend { font-family: var(--font); }
.mono { font-variant-numeric: tabular-nums; }
/* Amounts, plates and IBANs: figures of one width, and an amount never breaks over two lines */
.num, .c-amount, .c-sum, .c-total, .c-left, .pay-log-sum, .pay-owed, .plate, .iban { font-variant-numeric: tabular-nums; }
.num, .c-amount, .c-sum, .c-total, .c-left, .pay-log-sum, .pay-owed { white-space: nowrap; }
.break { word-break: break-all; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Testinė aplinka */
.staging-badge { background: var(--staging); color: #fff; text-align: center; font-size: var(--fs-2); font-weight: 700; padding: .3rem 1rem; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* One line at every width, so it never changes height (where the drivers come from: on a wide screen only). */
@media (max-width: 1099px) { .staging-more { display: none; } }
@media (max-width: 480px) { .staging-badge { padding: .3rem .5rem; letter-spacing: .02em; } }
.staging-box { border: 2px dashed var(--staging); background: var(--danger-bg); color: var(--ink); border-radius: var(--radius); padding: .8rem 1rem; margin: 1rem 0; }
.staging-box p:last-child { margin-bottom: 0; }
.staging-box .mono { font-size: var(--fs-5); font-weight: 700; letter-spacing: .15em; }

/* Viršutinė juosta */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(.6rem + env(safe-area-inset-top, 0px)) 1rem .6rem;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { white-space: nowrap; font-weight: 800; font-size: var(--fs-5); letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand-mark { color: var(--leaf); }
.brand-sub { font-size: var(--fs-3); font-weight: 600; letter-spacing: 0; color: var(--ink2); margin-left: .15rem; padding-left: .55rem; border-left: 1px solid var(--line); }
@media (max-width: 480px) { .topbar .brand-sub { display: none; } .topbar .brand-zalos .brand-sub { display: inline; } } /* zalos's header has room: no menu */
.nav { display: flex; align-items: center; gap: .15rem; font-size: var(--fs-3); min-width: 0; overflow-x: auto; white-space: nowrap; margin-left: auto; }
.nav a { color: var(--ink2); font-weight: 500; text-decoration: none; padding: .5rem .75rem; border-radius: var(--radius); }
.nav a:hover { background: var(--tint); color: var(--ink); }
.nav a.on { background: var(--tint); color: var(--ink); font-weight: 700; }
@media (max-width: 640px) { .nav a { display: inline-flex; align-items: center; min-height: 44px; } }
.logout { margin: 0; font-size: var(--fs-3); flex-shrink: 0; }
/* The admins' menu on a phone: Automobiliai and Valdymas under "Daugiau" (run ux-search-tables, P21). */
.nav-more { display: none; position: relative; }
.nav-more summary { list-style: none; cursor: pointer; color: var(--ink2); font-weight: 500; padding: .5rem .75rem; border-radius: var(--radius); min-height: 44px; display: inline-flex; align-items: center; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: '▾'; margin-left: .25rem; font-size: var(--fs-1); }
.nav-more summary.on { background: var(--tint); color: var(--ink); font-weight: 700; }
.nav-more-list { position: absolute; right: 0; top: 100%; z-index: 40; display: flex; flex-direction: column; min-width: 10rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .2rem .4rem; }
.who { color: var(--muted); max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
/* Narrow screens: the admins' long menu gets a row of its own under the logo. On a phone, where
   even that row is too narrow, it scrolls sideways and fades out at the edge with more items
   (portal.js scrolls the current page's item into view and marks the edges). "Atsijungti" stays
   on the logo's line. */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; row-gap: .2rem; }
  .nav-long { order: 3; flex-basis: 100%; margin-left: 0; padding-right: 2rem; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent); }
  .nav-long::-webkit-scrollbar { display: none; }
  /* With portal.js: only the edge with more items behind it fades. */
  .nav-long.nav-js { padding-right: 0; -webkit-mask-image: none; mask-image: none; }
  .nav-long.nav-js.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent); }
  .nav-long.nav-js.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 3rem), transparent); }
  .nav-long.nav-js.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); }
}
/* The admins' menu on a phone: Automobiliai and Valdymas fold into "Daugiau", so the row fits and needs no sideways scroll or
   fade (the open list would be clipped by either). */
@media (max-width: 760px) {
  .nav-long:has(.nav-more) { overflow: visible; flex-wrap: wrap; padding-right: 0; gap: 0 .1rem; -webkit-mask-image: none !important; mask-image: none !important; }
  .nav-long .nav-sec { display: none; }
  .nav-long .nav-more { display: block; }
}
/* Search box in the top bar (Ecorento's team). On a computer it sits next to the logo; where the
   menu doesn't fit on the same line, the menu gets a row of its own under it, and on a phone the
   box takes the room between the logo and "Atsijungti". */
.qs { position: relative; flex: 1 1 220px; max-width: 340px; min-width: 0; margin: 0; }
.with-search .nav { flex-shrink: 0; }
@media (max-width: 1080px) {
  .topbar.with-search { flex-wrap: wrap; row-gap: .35rem; }
  .with-search .nav-long { order: 3; flex: 1 1 100%; margin-left: 0; }
  .with-search .nav-long ~ .logout { margin-left: auto; }
}
@media (max-width: 560px) {
  .topbar.with-search { flex-wrap: wrap; row-gap: .35rem; }
  .with-search .qs { flex-basis: 110px; max-width: none; }
  .with-search .nav { order: 3; flex: 1 1 100%; margin-left: 0; }
  .with-search .nav ~ .logout { margin-left: auto; }
}
@media (max-width: 480px) { .topbar { gap: .6rem; } }
.qs-key { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); padding: 0 .4rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); font: 700 var(--fs-1)/1.45 var(--font); pointer-events: none; }
.qs:focus-within .qs-key, .qs input:not(:placeholder-shown) ~ .qs-key { display: none; }
/* The list that drops down while typing: under the box on a computer, the screen's full width on a phone. */
.qs-panel {
  position: absolute; top: calc(100% + .4rem); left: 0; z-index: 30;
  width: max(100%, 32rem); max-width: calc(100vw - 2rem); max-height: min(72vh, 36rem); overflow-y: auto; overscroll-behavior: contain;
  padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (min-width: 641px) { .qs-panel.qs-panel-end { left: auto; right: 0; } }
@media (max-width: 640px) {
  .qs { position: static; }
  .qs-key { display: none; }
  .qs-panel { top: 100%; left: 0; right: 0; width: auto; max-width: none; max-height: 70vh; border-width: 0 0 1px; border-radius: 0 0 var(--radius) var(--radius); }
}
.qs-head { padding: .55rem .6rem .2rem; color: var(--muted); font-size: var(--fs-1); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.qs-item { display: block; padding: .45rem .6rem; border-radius: 8px; color: var(--ink); text-decoration: none; }
.qs-item[aria-selected="true"] { background: var(--tint); box-shadow: inset 3px 0 0 var(--ink); }
.qs-item.off { opacity: .6; }
.qs-line { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.qs-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.qs-line .badge, .qs-line .pill { flex: none; }
.qs-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--fs-3); }
.qs-all { margin-top: .3rem; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: .6rem; color: var(--ink); font-size: var(--fs-3); font-weight: 600; }
.qs-empty { margin: 0; padding: .7rem .6rem; color: var(--muted); font-size: var(--fs-3); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* A link to part of a page (#pakviesti, #drive …) must not stop under the sticky top bar, and the
   settings menu sticks just below it. portal.js sets both from the bar's real height (one or two
   rows, depending on the screen and the menu); these are for when it can't. */
:root { --scroll-top: 5rem; --sticky-top: 4.8rem; }
@media (max-width: 1080px) { :root:has(.with-search .nav-long) { --scroll-top: 8rem; --sticky-top: 7.4rem; } }
@media (max-width: 760px) { :root:has(.nav-long) { --scroll-top: 10.5rem; } }
html { scroll-padding-top: var(--scroll-top); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.page { max-width: 760px; margin: 0 auto; padding: 1rem 1rem 2rem; }
.page.narrow { max-width: 460px; }
/* The admins' main pages use more of a computer's screen, so more fits without scrolling.
   Phones look the same. */
.page.wide { max-width: 1200px; }
.lead { color: var(--muted); max-width: 80ch; }
.page.wide .lead { max-width: none; }
.login { padding-top: 6vh; }
.center { text-align: center; padding-top: 8vh; }
.center-link { text-align: center; margin-top: 1.2rem; }
/* The page that waits while the database is busy (views/busy.php): a quiet turning ring, still when motion is reduced. */
.busy-spin { width: 2.6rem; height: 2.6rem; margin: 0 auto 1.2rem; border-radius: 50%; border: .25rem solid color-mix(in srgb, var(--accent) 22%, transparent); border-top-color: var(--accent); animation: busy-turn 1.1s linear infinite; }
@keyframes busy-turn { to { transform: rotate(360deg); } }
.busy-wait [data-db-status]:empty { display: none; }
.actions-center { margin-top: 1.4rem; }

/* Mygtukai: primary (the one dark button), secondary, quiet (.linkbtn), danger */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; padding: 0 1.1rem; border-radius: var(--radius);
  border: 1px solid var(--field); background: var(--surface); color: var(--ink);
  font: 600 var(--fs-4) var(--font); text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--tint); color: var(--ink); }
.btn-primary { background: var(--btn); border-color: var(--btn); color: var(--btnink); font-weight: 700; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--btn); color: var(--btnink); filter: brightness(1.12); }
.btn-danger { color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--redbg); color: var(--red); }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: var(--redink); font-weight: 700; }
.btn-danger-solid:hover { background: var(--red); color: var(--redink); filter: brightness(1.08); }
.btn-block { width: 100%; }
.btn.busy { opacity: .6; pointer-events: none; }
.btn[disabled] { background: var(--tint); border-color: transparent; color: var(--ink2); box-shadow: none; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: .35rem 0; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.actions-end { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }   /* a page's one destructive action, at its foot */
.actions form { margin: 0; }
.login-more { margin-top: 1.2rem; }
/* Face ID (passkeys): before the email form on a browser that has used it, after it elsewhere. */
.login .pk-login { gap: .6rem; margin: 0 0 1.6rem; }
.login form + .pk-login { margin: .8rem 0 0; }
.pk-offer p { margin: .2rem 0 .8rem; }
.back { display: inline-block; color: var(--ink2); text-decoration: none; margin-bottom: .3rem; font-size: var(--fs-3); padding: .3rem 0; }
.back::before { content: "‹ "; }
/* baseline, not center: the heading's top margin would lift the button above the heading's text */
.head-row { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.head-row h1, .head-row h2 { margin-bottom: .4rem; }
.head-row p { margin: 0; }
h2.first { margin-top: .8rem; }

/* Formos */
.stack { display: flex; flex-direction: column; gap: 1rem; }
label { display: block; font-weight: 600; font-size: var(--fs-3); }
label > input, label > select, label > textarea { display: block; margin-top: .3rem; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: .6rem .75rem;
  border: 1px solid var(--field); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: 500 var(--fs-4) var(--font);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 1px var(--ink), 0 0 0 4px var(--tint); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border: 2px solid var(--red); padding: calc(.6rem - 1px) calc(.75rem - 1px); }
.code-input { font: 700 var(--fs-6) var(--font); font-variant-numeric: tabular-nums; letter-spacing: .4em; text-align: center; padding-left: .4em; }
.check { display: flex; flex-direction: row; align-items: center; gap: .6rem; font-weight: 400; }
.check > input { margin-top: 0; }
.check input { width: 22px; min-height: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.check.boxed { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.check.boxed:has(input:checked) { border-color: var(--ink); background: var(--okbg); }
.choices { display: flex; flex-direction: column; gap: .5rem; }
.hint { font-size: var(--fs-3); color: var(--ink2); margin: 0; }
@media (max-width: 640px) { [data-sheet-hint] { display: none; } } /* the multi-car sheet's paste-from-Excel hint: no Excel on a phone */
.stack > .hint { margin-top: -.6rem; }
.field-err { color: var(--red); font-size: var(--fs-3); margin: -.6rem 0 0; font-weight: 600; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.panel { padding: 1rem; }
legend { font-weight: 600; font-size: var(--fs-3); margin-bottom: .5rem; padding: 0; }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.inline-label { display: flex; flex-direction: column; gap: .3rem; }
.inline-label select { width: auto; min-width: 12rem; margin: 0; }
.search { display: flex; gap: .5rem; margin: .4rem 0 1rem; }
.page.wide .search { max-width: 640px; }
.page.wide .search:has(select + select) { max-width: 860px; }
.search input { flex: 1; min-width: 0; }
.search select { flex: 0 1 15rem; width: auto; min-width: 0; margin: 0; }
/* On a phone: the search field on its own row, the lists below it, side by side when their longest options fit (a list
   squeezed to 40 % cut the company's name). Without scripts the button sits beside the field. */
@media (max-width: 560px) {
  .search:has(select) { flex-wrap: wrap; }
  .search:has(select) input { flex: 1 1 100%; }
  .search:has(select) select { flex: 1 1 auto; }
}
@media (max-width: 560px) and (scripting: none) {
  .search:has(select) input { flex-basis: calc(100% - 7.5rem); }
  .search:has(select) button { order: 1; }
  .search:has(select) select { order: 2; }
}

/* Sąrašai */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list > li { border-bottom: 1px solid var(--line); }
.row { display: flex; flex-direction: column; gap: .3rem; padding: .8rem .2rem; color: var(--ink); text-decoration: none; }
.row.static { flex-direction: row; justify-content: space-between; align-items: center; gap: .8rem; }
a.row:hover { background: var(--tint); }
.row.off { opacity: .6; }
.row-main { display: flex; align-items: center; gap: .6rem; min-width: 0; flex-wrap: wrap; }
.row-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.row-meta { display: flex; gap: .3rem .9rem; flex-wrap: wrap; align-items: center; font-size: var(--fs-3); color: var(--ink2); }
@media (min-width: 720px) {
  .row { flex-direction: row; justify-content: space-between; align-items: center; }
}
.list.compact .row { padding: .5rem .2rem; }
.activity .row { align-items: baseline; }
.activity time { color: var(--muted); font-size: var(--fs-3); white-space: nowrap; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.badge { font-size: var(--fs-1); font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: var(--tint); color: var(--ink2); white-space: nowrap; }

/* Būsenos */
.pill { display: inline-block; font-size: var(--fs-2); font-weight: 700; padding: .1rem .65rem; border-radius: 999px; background: var(--tint); color: var(--ink2); white-space: nowrap; }
.pill-ok { background: var(--okbg); color: var(--ok); }
.pill-wait { background: var(--honeybg); color: var(--honey); }
.pill-off { background: var(--redbg); color: var(--red); }
.pill-info { background: var(--skybg); color: var(--sky); }
.pill-late { background: var(--red); color: var(--redink); } /* a damage marked Pradelsta (run zalos-overdue): solid, apart from Atšaukta's pale red */
.pill-test { background: transparent; box-shadow: inset 0 0 0 1px var(--field); color: var(--ink2); }
.pill-paid { background: var(--ok); color: var(--surface); }
.pill-mark { background: transparent; box-shadow: inset 0 0 0 1px currentColor; color: var(--honey); }

/* Pradžios kortelės */
.cards { display: grid; grid-template-columns: 1fr; gap: .7rem; margin: 1rem 0 1.4rem; }
@media (min-width: 560px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem; min-height: 76px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.card:hover { border-color: var(--field); color: var(--ink); }
.card strong { font-size: var(--fs-4); font-weight: 800; }
.card span { color: var(--muted); font-size: var(--fs-3); }
.card-primary { background: var(--btn); border-color: var(--btn); color: var(--btnink); }
.card-primary:hover { color: var(--btnink); }
.card-primary span { color: var(--btnink); opacity: .85; }

/* Detalės */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 1rem 0 1.2rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; gap: .1rem; } .facts dd { margin-bottom: .5rem; } }
.prose { max-width: 65ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; margin: 1.2rem 0; }
.panel h2:first-child { margin-top: 0; }
.subject { font-size: var(--fs-5); }

.flash { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; background: var(--okbg); color: var(--ok); font-weight: 600; }
.flash-err { background: var(--redbg); color: var(--red); }
.flash-warn { background: var(--honeybg); color: var(--honey); }
/* Nustatymai opened where the admin was (portal.js keepPlace): the message stays under the top bar for a moment */
.flash-pinned { position: sticky; top: var(--sticky-top, 5rem); z-index: 6; box-shadow: var(--shadow); transition: opacity .35s; }
.flash-pinned.flash-going { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .flash-pinned { transition: none; } }
.note { padding: .7rem .9rem; border-left: 3px solid var(--leaf); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-size: var(--fs-3); }
.callout { padding: .8rem 1rem; border-radius: var(--radius); background: var(--honeybg); color: var(--ink); margin: 0 0 1rem; }
.callout-danger { background: var(--redbg); }
.warn-text { color: var(--honey); font-weight: 700; }

/* Kvietimas paruoštas */
.success { background: var(--okbg); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 18px; padding: 1.1rem; margin-bottom: 1.2rem; }
.success-head { display: flex; align-items: center; gap: .7rem; }
.success-head h1 { margin: 0; font-size: var(--fs-5); }
.success-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: var(--surface); font-size: var(--fs-5); font-weight: 700; flex: none; }
.success p { margin: .7rem 0 0; }
.qr { width: min(280px, 80vw); margin: .5rem 0 1rem; padding: 10px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.qr svg { display: block; width: 100%; height: auto; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; font-size: var(--fs-3); }
.copy-row .btn { flex: none; }

/* Laiškų peržiūra */
.mail-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: #f0f0e0; margin-top: .5rem; }
.mail-text { white-space: pre-wrap; word-break: break-word; font: 500 var(--fs-3)/1.5 var(--font); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; }
summary { cursor: pointer; color: var(--ink); font-weight: 600; }

/* Pagalba kiekviename puslapyje */
.help-foot { max-width: 760px; margin: 0 auto; padding: 1.2rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-3); text-align: center; }
.help-foot p { margin: 0 0 .3rem; }
/* LT EN RU: chips big enough to tap; the current language is the filled one (as the partner's header switch). */
.help-foot .lang-pick { display: inline-flex; gap: 2px; margin: .5rem 0 0; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.lang-pick a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .5rem; border-radius: 999px; color: var(--ink2); font-size: var(--fs-2); font-weight: 700; letter-spacing: .04em; }
.lang-pick a:hover { color: var(--ink); background: var(--tint); }
.lang-pick a[aria-current] { background: var(--btn); color: var(--btnink); }
.phone { font-weight: 700; white-space: nowrap; }
.phone.big { font-size: var(--fs-5); }

.center-link .btn { margin-top: .5rem; }
.actions + .hint { margin-top: .7rem; }

/* Apžvalga (the team's start page): a to-do list, then partners | latest events (.split) */
.all-ok { display: flex; align-items: center; gap: .4rem .7rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.todo-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .6rem; }
.todo { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.2rem; flex-wrap: wrap;
  padding: .75rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.todo-warn { border-left-color: var(--warn); }
.todo-danger { border-left-color: var(--danger); background: var(--danger-bg); }
.todo-body { flex: 1 1 340px; min-width: 0; }
.todo-title { margin: 0; font-weight: 600; }
.todo-body .hint { margin-top: .15rem; }
.todo-items { margin: .35rem 0 0; font-size: var(--fs-3); overflow-wrap: anywhere; }
.todo-items li { margin-bottom: .15rem; }
.todo > .btn { flex: none; }
.uptake { margin: 0 0 1rem; }
.uptake p { margin: 0 0 .45rem; }
.uptake progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--line); color: var(--accent); -webkit-appearance: none; appearance: none; }
.uptake progress::-webkit-progress-bar { background: var(--line); }
.uptake progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.uptake progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
h3.sub { margin: 1rem 0 .4rem; font-size: var(--fs-3); font-weight: 600; color: var(--muted); }
.page-links { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin: 1.6rem 0 0; font-size: var(--fs-3); }

/* Two columns on a computer: Komanda (people | invite form), a company (details | people) */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 2.5rem; margin-bottom: 1rem; } /* one column on phones that never grows wider than the screen */
.split > section > :first-child, .split > section > .head-row:first-child > h2 { margin-top: 0; }
.split > .panel { margin: 0; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); align-items: start; }
  .split > .panel ~ section:not(.panel), .split > section:not(.panel):has(~ .panel) { padding-top: 1rem; } /* level with the panel's heading */
  .split.split-2-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}

/* Nustatymai: search and section menu on the left (above the settings on a phone), settings on
   the right, each as its name and explanation next to the field. */
.stack > .panel { margin: 0; }
.with-unit { display: flex; align-items: center; gap: .5rem; margin-top: .3rem; font-weight: 400; }
.with-unit input { width: 7rem; margin: 0; }
.settings { display: grid; gap: 1rem 2rem; align-items: start; }
@media (min-width: 1000px) {
  .settings { grid-template-columns: 240px minmax(0, 1fr); }
  .settings-side { position: sticky; top: var(--sticky-top); }
}
/* Every search field: a magnifier inside it (the header's, a list's, Nustatymai's). */
.settings-find input, .qs input, .search input[type="search"] {
  -webkit-appearance: none; appearance: none; min-height: 44px; padding-left: 2.4rem;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6b2a' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E") no-repeat .8rem center / 1.05rem;
}
@media (prefers-color-scheme: dark) {
  .settings-find input, .qs input, .search input[type="search"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3b07a' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E"); }
}
/* A list's search has no "Ieškoti" button (rework-foundation-b; all four reviews): Enter sends the field and a list picked
   from sends itself (select[data-autosubmit]). Without scripts the button is there, since nothing would send a select. */
@media (scripting: enabled) { .search button[type="submit"] { display: none; } }
.toc { list-style: none; margin: .7rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.settings-find[hidden] + nav .toc { margin-top: 0; }
.toc a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 40px; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: var(--fs-3); }
.toc a:hover, .toc a[aria-current] { border-color: var(--accent); }
.toc a[aria-current] { color: var(--accent); font-weight: 600; }
.toc-count { color: var(--muted); font-size: var(--fs-2); font-weight: 400; font-variant-numeric: tabular-nums; }
.toc a.changed .toc-count::before, .toc a.has-error .toc-count::before { content: "● "; color: var(--warn); }
.toc a.has-error .toc-count::before { color: var(--danger); }
@media (min-width: 1000px) {
  .toc { flex-direction: column; flex-wrap: nowrap; gap: .15rem; }
  .toc a { border: 0; border-radius: 8px; background: none; padding: .5rem .75rem; }
  .toc a:hover { background: var(--surface); }
  .toc a[aria-current] { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
}
.settings-form { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.settings-form > .empty { margin: 0; }
.settings-section { margin: 0; padding: .2rem 1.2rem .3rem; }
.settings-section h2 { margin: .8rem 0 .2rem; }
/* Opened from the menu, an error or another page: the section (or setting) lights up briefly */
@keyframes lit { from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); } }
@keyframes lit-row { from { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); box-shadow: 0 0 0 .7rem color-mix(in srgb, var(--accent) 14%, var(--surface)); } }
.settings-section:target { animation: lit 2.5s ease-out; }
.google-panel { padding: .3rem 0 1rem; }
.google-state { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .3rem 0 .4rem; overflow-wrap: anywhere; }
.google-err { color: var(--danger); font-weight: 600; margin: .3rem 0; overflow-wrap: anywhere; }
.google-check { list-style: none; padding-left: 0; margin: .6rem 0 .2rem; font-size: var(--fs-3); }
.google-check li { padding: .1rem 0; overflow-wrap: anywhere; }
.google-check li.ok span { color: var(--ok); font-weight: 700; }
.google-check li.bad { color: var(--danger); }
.google-panel .actions { margin-top: .8rem; }
.setting { display: grid; gap: .5rem 2rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.settings-section h2 + .setting { border-top: 0; }
.setting:target { animation: lit-row 2.5s ease-out; }
.setting-about label { font-weight: 600; }
.setting-about .hint { margin-top: .2rem; }
.setting-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.setting-field .with-unit { margin-top: 0; }
.setting-field textarea { min-height: 72px; }
.setting-field .field-err { margin: 0; }
.setting.has-error .setting-about label { color: var(--danger); }
.setting.changed .changed-mark::after { content: attr(data-changed); margin-left: .5rem; padding: .05rem .45rem; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: var(--fs-1); font-weight: 600; vertical-align: .1em; }
@media (min-width: 700px) {
  .setting { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); align-items: start; }
}
/* On/off switch (a checkbox) with its state next to it. The words come from the markup (data-on, data-off), translated:
   text written in CSS is never translated (tools/tests/test_i18n_css.py). */
.switch { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 600; cursor: pointer; }
.switch > input {
  -webkit-appearance: none; appearance: none; display: inline-block; flex: none; margin: 0; padding: 0;
  width: 48px; height: 28px; min-height: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: radial-gradient(circle closest-side, #fff 88%, rgba(255, 255, 255, 0) 100%) no-repeat 3px center / 22px 22px, var(--switch-off);
  transition: background-position .15s ease, background-color .15s ease;
}
.switch > input:checked { background-color: var(--accent); background-position: 23px center; }
.switch-state::after { content: attr(data-off); color: var(--muted); }
.switch > input:checked + .switch-state::after { content: attr(data-on); color: var(--ink); }
/* The save button: at the end of the form; once something is changed (portal.js), it stays at the
   bottom of the screen with a line saying so. */
.savebar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; padding: .7rem 0 calc(.7rem + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.settings-form.dirty .savebar { position: sticky; bottom: 0; z-index: 5; border-top: 1px solid var(--line); box-shadow: 0 -10px 18px -12px rgba(0, 0, 0, .25); }
.savebar-status { margin: 0 auto 0 0; font-size: var(--fs-3); font-weight: 600; color: var(--warn); }
.savebar-status:empty { display: none; }
html:has(.settings-form.dirty) { scroll-padding-bottom: 5.5rem; }
::highlight(find), ::highlight(qs) { background: #ffe58a; color: #18211d; }
/* The top bar's box: a little smaller and rounder than the settings' one, grey on the white bar */
.qs input { min-height: 40px; padding: .35rem 2.2rem .35rem 2.3rem; border-radius: 999px; background-color: var(--bg); }
.qs input:focus { background-color: var(--surface); }

/* Paieška: every result. On a computer the groups (companies, people …) sit side by side. */
.search-results { display: grid; gap: 0 2.5rem; align-items: start; }
@media (min-width: 900px) { .search-results { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); } }
.search-results h2 { margin-top: 1rem; }
.h-count { margin-left: .15rem; color: var(--muted); font-size: var(--fs-2); font-weight: 400; }  /* on the scale, not .9em of each heading (zalos-desktop-14) */
.row.result { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .15rem; }
.result-sub { color: var(--muted); font-size: var(--fs-3); overflow-wrap: anywhere; }

/* Automobiliai: plates in one shape everywhere, the list's filters, "Gal …?" */
.plate { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .04em; white-space: nowrap; }
h1.plate { font-size: var(--fs-6); }
.plate-input { font-variant-numeric: tabular-nums; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.plate-input::placeholder { text-transform: none; letter-spacing: normal; }
.inline-label .plate-input { width: 12rem; margin: 0; }
/* A plate box's list while typing (portal.js plateTypeahead): under the box, over what follows, big enough to tap. */
.plate-host { position: relative; }
.plate-ahead {
  position: absolute; left: 0; right: 0; z-index: 30; min-width: 10rem; margin: .25rem 0 0; padding: .25rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .35);
}
.plate-option {
  display: flex; align-items: center; min-height: 2.75rem; padding: .35rem .7rem; border-radius: 8px; cursor: pointer;
  color: var(--ink); font-variant-numeric: tabular-nums; font-size: var(--fs-4); font-weight: 700; letter-spacing: .06em; -webkit-tap-highlight-color: transparent;
}
.plate-option[aria-selected="true"], .plate-option:active { background: var(--bg); box-shadow: inset 3px 0 0 var(--accent); }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .8rem; }
.filters a, .hist-dates > summary { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: var(--fs-3); font-weight: 600; background: var(--surface); }
.filters a:hover, .hist-dates > summary:hover { border-color: var(--field); }
.filters a[aria-current], .hist-dates > summary[aria-current] { border-color: var(--btn); background: var(--btn); color: var(--btnink); font-weight: 700; }
/* What the current chip holds (its count, its euro sum) is in the chip's own ink: the page's grey on dark olive was about 1.4:1 for
   the count (zalos-desktop-27, portal-team-73, portal-partner-35) and 1.7:1 for the sum (run chip-sum-contrast). */
.filters a[aria-current] :is(.h-count, .chip-sum), .hist-dates > summary[aria-current] .h-count { color: inherit; opacity: 1; background: transparent; }
.suggest { padding: .8rem 1rem; border-radius: var(--radius); background: var(--warn-bg); margin: 0 0 1rem; }
.suggest p { margin: 0 0 .3rem; }
.suggest .row { padding: .55rem .4rem; }
.suggest a.row:hover { background: var(--surface); }
ul.choices { list-style: none; padding: 0; margin: .6rem 0 0; max-width: 32rem; }
.choices form { margin: 0; }
.choices .btn { justify-content: flex-start; text-align: left; }

/* Įkelti, Patikrinkite, Darbai and a job's page */
.btn-big { min-height: 56px; font-size: var(--fs-4); }
.btn-quiet { min-height: 40px; padding: 0 .8rem; border-color: transparent; color: var(--muted); font-weight: 500; }
.btn-quiet:hover { border-color: var(--line); color: var(--ink); }
.pick { display: flex; flex-direction: column; gap: .6rem; }
.pick label.btn { position: relative; flex-direction: column; }
.pick-camera { border: 2px solid var(--accent); color: var(--accent); }
@media (scripting: enabled) { .pick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; } }
.pick label.btn:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.picked { list-style: none; margin: 0; padding: .5rem .7rem; border-radius: var(--radius); background: var(--ok-bg); font-size: var(--fs-3); overflow-wrap: anywhere; }
.picked li + li { margin-top: .15rem; }
.pick .field-err { margin: 0; }
/* On a computer there is no camera to open: only "Pasirinkti failus", as a place to drop files */
@media (hover: hover) and (pointer: fine) {
  .pick-camera:not([data-cam-on]) { display: none; } /* the register's in-page camera shows it (data-cam-on, portal.js) */
  .upload-form .pick-files { min-height: 112px; border: 2px dashed var(--accent); color: var(--accent); } /* files can be dropped on it too */
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; align-items: end; }
.two > label { min-width: 0; }
/* Two fields side by side stay level: "iš „file“" gets one line of its own there, cut to fit. */
.two .from { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.amount-input { max-width: 12rem; font-variant-numeric: tabular-nums; }
.choices-row { flex-direction: row; flex-wrap: wrap; }
.choices-row .check.boxed { flex: 1 1 8rem; }
.check-form .split { align-items: start; }
/* Patikrinkite: one car or several (work/_sheet: a row per car, a card on phones, one line on computers) */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.mode-switch .btn { border: 0; border-radius: 0; min-height: 44px; padding: 0 .5rem; color: var(--muted); font-weight: 600; background: transparent; }
.mode-switch .btn + .btn { border-left: 1px solid var(--line); }
.mode-switch .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.sheet-found { display: flex; flex-direction: column; gap: .6rem; margin: 0; }
.sheet-found[hidden] { display: none; }
.sheet-found p { margin: 0; font-weight: 600; }
.check-sheet { gap: 2rem; }
h2.sheet-h { margin: .4rem 0 -.4rem; }
.sheet-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; scroll-margin-top: var(--scroll-top, 5rem); }
.sheet-row {
  display: grid; grid-template-columns: 1.4rem minmax(0, 1fr) minmax(0, 1.5fr); gap: .5rem .6rem; align-items: end;
  padding: .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  scroll-margin-top: var(--scroll-top, 5rem);
}
.sheet-row label { min-width: 0; font-weight: 500; }
.sheet-label { font-size: var(--fs-3); color: var(--muted); }
.sheet-num { grid-column: 1; grid-row: 1 / span 3; align-self: start; padding-top: 1.75rem; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet-plate { grid-column: 2; }
.sheet-date { grid-column: 3; }
.sheet-works { grid-column: 2 / -1; }
.sheet-amount { grid-column: 2; }
.sheet-amount .amount-input { max-width: none; }
.sheet-remove { grid-column: 3; justify-self: end; }
.sheet-row .field-err { grid-column: 2 / -1; margin: 0; }
.sheet-sum { margin: 0; display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
@media (min-width: 760px) {
  .sheet-rows { gap: .35rem; }
  .sheet-row { grid-template-columns: 1.4rem 9.5rem 10.5rem minmax(0, 1fr) 8.5rem auto; padding: 0; border: 0; background: none; }
  .sheet-num { grid-row: auto; align-self: center; padding-top: 0; }
  .sheet-row:not(:first-child) .sheet-num { align-self: center; }
  .sheet-row:first-child .sheet-num { align-self: end; padding-bottom: .8rem; }
  .sheet-works { grid-column: 4; }
  .sheet-amount { grid-column: 5; }
  .sheet-remove { grid-column: 6; }
  .sheet-row:not(:first-child) .sheet-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sheet-row:not(:first-child) label > input { margin-top: 0; }
  .sheet-sum { justify-content: flex-end; }
}
.warnings p { margin: 0 0 .4rem; }
.warnings p:last-child, .warnings ul:last-child { margin-bottom: 0; }
.warnings ul.choices { margin: .2rem 0 .6rem; }
.file-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.file-item { display: flex; align-items: center; gap: .7rem; padding: .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.file-thumb { flex: none; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); text-decoration: none; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-type { font: 700 var(--fs-2) var(--font); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.file-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-links { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: var(--fs-3); }
.file-body select { min-height: 40px; padding-top: .3rem; padding-bottom: .3rem; }
/* A file with a kind to pick (Patikrinkite, a job's fix): the name and Pašalinti on top, the kind under them as wide as
   the row, so "Sąmata ar ataskaita" reads whole on a 390 px phone. */
.file-item-kind { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "thumb name remove" "thumb kind kind"; column-gap: .7rem; row-gap: .3rem; }
.file-item-kind .file-thumb { grid-area: thumb; align-self: center; }
.file-item-kind .file-body { display: contents; }
.file-item-kind .file-name { grid-area: name; align-self: center; }
.file-item-kind select { grid-area: kind; width: 100%; min-width: 0; }
.file-item-kind > .btn { grid-area: remove; align-self: center; }
.job-works { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%; }
.pre { white-space: pre-line; }
.done { border-color: var(--accent); background: var(--ok-bg); }
.callout-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; }
.callout-row form { margin: 0; }
h2 + .job-rows, h2 + .empty, .head-row + .job-rows { margin-top: .4rem; }
/* A job's documents under its row: each opens the file itself. */
.job-files { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .2rem .6rem; }
.job-files .file-thumb { width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--line); }
.job-files .file-thumb:hover { border-color: var(--muted); }
.job-files .file-type { font-size: var(--fs-1); }
.file-more { font-weight: 600; font-size: var(--fs-3); color: var(--ink); }
/* Valdymas: its pages as tabs under the menu item. */
.tabs { display: flex; gap: 1.4rem; margin: 0 0 1.1rem; border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
@media (max-width: 480px) { .tabs { gap: .9rem; } }
/* Tabs that don't fit scroll sideways; portal.js fades the edge with more tabs behind it. */
.tabs.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 3rem), transparent); }
.tabs.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 3rem), transparent); }
.tabs.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to right, transparent, #000 3rem, #000 calc(100% - 3rem), transparent); }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink2); font-weight: 600; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--ink); font-weight: 700; }
/* zalos's menu on a phone: a bar at the bottom of the screen instead of the tabs (run zalos-screens; Deivydas's
   specification). A computer keeps the tabs; a phone held sideways keeps the bar (run rework-zalos-a). */
.bottombar { display: none; }
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .bottombar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface, #fff); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bottombar a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; padding: 4px 2px; color: var(--ink2); font-weight: 600; text-decoration: none; font-size: var(--fs-1); line-height: 1.15; text-align: center; -webkit-tap-highlight-color: transparent; }
  .bottombar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottombar a.on { color: var(--ink); font-weight: 800; }
  .bottombar a.on svg { box-sizing: content-box; padding: 3px 18px; border-radius: 999px; background: var(--tint); }
  .tabs-site { display: none; }
  .bottombar + .help-foot { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
  body:has(.bottombar) .settings-form.dirty .savebar, body:has(.bottombar) .pay-bar { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
}

/* An Excel file as a table (views/work/xlsx.php): scrolls sideways inside its box, row numbers stay on the left.
   Short cells never wrap (a date or a part number would break at its hyphens); long text (class wrap, XLSX_WRAP_AT)
   wraps at spaces. overflow-wrap: anywhere let a phone squeeze every column to one letter. */
.xlsx-scroll { overflow: auto; max-height: 75vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.xlsx-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* More columns behind an edge (portal.js sets more-right / more-left on .xlsx-box): a shadow at the right edge, and
   one beside the row numbers once columns went under them. */
.xlsx-box { position: relative; margin: 0 0 1rem; }
.xlsx-box::after { content: ''; position: absolute; top: 1px; right: 1px; bottom: 1px; width: 1.4rem; z-index: 3; pointer-events: none;
  border-radius: 0 var(--radius) var(--radius) 0; background: linear-gradient(to left, var(--shade), transparent); opacity: 0; transition: opacity .15s; }
.xlsx-box.more-right::after { opacity: 1; }
.xlsx-box.more-left .xlsx tbody th, .xlsx-box.more-left .xlsx thead td { box-shadow: 6px 0 8px -6px var(--shade); }
.xlsx { border-collapse: separate; border-spacing: 0; font-size: var(--fs-3); line-height: 1.35; }
.xlsx th, .xlsx td { padding: .3rem .55rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.xlsx td { min-width: 4.5rem; white-space: nowrap; }
.xlsx td.wrap { min-width: 12rem; max-width: 22rem; white-space: pre-line; overflow-wrap: break-word; }
.xlsx td.num { text-align: right; font-variant-numeric: tabular-nums; }
.xlsx thead th, .xlsx thead td { position: sticky; top: 0; z-index: 1; background: var(--bg); color: var(--muted); font-weight: 500; text-align: center; }
.xlsx tbody th { position: sticky; left: 0; background: var(--bg); color: var(--muted); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.xlsx thead td { left: 0; z-index: 2; }
/* A partner's start page: one main button. */
.home-main { margin: 1.1rem 0 1.4rem; }

/* An invoice's check page: the invoice beside its fields on a computer, above them on a phone
   (a PDF there is only its file row: phones show one page of a PDF in a frame). */
.preview { display: block; width: 100%; margin: 0 0 .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.preview img { display: block; width: 100%; max-height: 45vh; object-fit: contain; }
.preview-pdf { display: none; height: 75vh; }
.preview-ask { display: none; margin: 0 0 .8rem; }
@media (min-width: 960px) {
  .preview img { max-height: 75vh; }
  .preview-pdf { display: block; }
  .preview-ask { display: block; }
}
ul.job-choices { max-width: none; margin: 0 0 .4rem; }
.job-choice { align-items: flex-start; }
.job-choice-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.job-choice-text .job-works { font-size: var(--fs-3); }
.job-filter { margin-bottom: .5rem; }
.err-text { color: var(--danger); }
.btn-small { min-height: 36px; padding: 0 .75rem; font-size: var(--fs-3); }
.todo-form { margin: 0; flex: none; }

/* Invoices: Ecorento's buttons, a returned invoice's reason, Apmokėjimui's rows to tick. */
.head-row + .callout { margin-top: .5rem; }
.invoice-actions { margin: 0 0 .8rem; }
.return-form { margin: 0 0 1.2rem; }
/* Atšaukti įkėlimą / sąskaitą: a quiet link under the form that asks once (Taip, atšaukti) before anything goes. */
.cancel-ask { margin-top: 1.4rem; text-align: center; }
.cancel-ask summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .8rem; color: var(--muted); list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.cancel-ask summary::-webkit-details-marker { display: none; }
.cancel-ask[open] summary { color: var(--ink); }
.cancel-ask-body { max-width: 26rem; margin: .3rem auto 0; padding: .8rem; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cancel-ask-body p { margin: 0 0 .6rem; }
.return-form form { margin-top: .7rem; max-width: 40rem; }
.callout-title { font-size: var(--fs-4); margin: 0 0 .3rem; }
.callout .prose { margin: 0 0 .4rem; }
.callout form, .callout .btn { margin-top: .5rem; }
.row-notes { display: contents; }
.row-note { flex-basis: 100%; font-size: var(--fs-3); color: var(--danger); overflow-wrap: anywhere; }
.row-note.muted { color: var(--muted); }
.row-note.row-warn { color: var(--warn); font-weight: 600; }
.pay-total { font-size: var(--fs-4); margin: 0 0 .6rem; }
.pay-pick { cursor: pointer; }
.pay-pick input[type="checkbox"] { width: 1.3rem; height: 1.3rem; margin: 0; flex: none; }
.pay-pick.blocked { cursor: default; }
.pay-pick.blocked .row-main > :not(.row-note):not(input) { opacity: .7; }
.pay-pick .row-meta { flex: none; }
.facts dd .inline-form { margin-top: .4rem; }
.pay-bar { position: sticky; bottom: 0; padding: .7rem 0; background: var(--bg); border-top: 1px solid var(--line); margin-top: .6rem; }

/* Pagalba's picture guides: each step's text, then its phone picture; side by side on a computer */
ol.guide { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 1.4rem; }
ol.guide > li { counter-increment: step; min-width: 0; }
ol.guide > li > p { display: flex; gap: .6rem; margin-bottom: .6rem; }
ol.guide > li > p::before { content: counter(step); flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: var(--fs-3); display: grid; place-items: center; }
ol.guide img { display: block; width: 100%; max-width: 300px; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
@media (min-width: 700px) {
  ol.guide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-items: start; }
}

/* The privacy page */
.legal ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.legal li { margin-bottom: .5rem; }

/* Admins' printable guide for partners: a white sheet on screen, one A4 page on paper */
.print-guide { background: #fff; color: #18211d; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-top: .6rem; }
.print-guide .brand-mark { color: #3e481d; }
.print-guide .brand-sub { color: #5b6661; }
.pg-head { border-bottom: 2px solid #3e481d; padding-bottom: .6rem; margin-bottom: 1rem; }
.pg-head .brand { margin: 0 0 .2rem; font-size: var(--fs-5); }
.pg-head h1 { margin: 0; font-size: var(--fs-6); }
.pg-start { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1rem; }
.pg-qr { flex: none; width: 150px; }
.pg-qr svg { display: block; width: 100%; height: auto; }
.pg-label { margin: 0 0 .2rem; color: #5b6661; }
.pg-address { font-size: var(--fs-5); font-weight: 700; margin: 0 0 .4rem; overflow-wrap: anywhere; }
.pg-start p:last-child { margin: 0; }
.pg-steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: .8rem; }
.pg-steps > li { counter-increment: step; border: 1px solid #dce3ce; border-radius: 10px; padding: .8rem 1rem; display: grid; gap: .5rem 1rem; grid-template-columns: minmax(0, 1fr); }
.pg-steps h2 { margin: 0; font-size: var(--fs-5); display: flex; gap: .5rem; align-items: center; }
.pg-steps h2::before { content: counter(step); flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #3e481d; color: #fff; display: grid; place-items: center; font-size: var(--fs-3); }
.pg-steps p { margin: 0; }
.pg-steps img { display: block; width: 100%; max-width: 260px; height: auto; border: 1px solid #dce3ce; border-radius: 8px; }
.pg-help { margin-top: 1rem; padding-top: .8rem; border-top: 2px solid #3e481d; font-size: var(--fs-5); text-align: center; }
.pg-help p { margin: 0; }
@media (max-width: 520px) {
  .pg-start { flex-direction: column; align-items: flex-start; gap: .8rem; }
  .pg-address { font-size: var(--fs-5); }
}
@media (min-width: 600px) {
  .pg-steps > li:has(img) { grid-template-columns: minmax(0, 1fr) 200px; }
  .pg-steps > li > h2, .pg-steps > li > p { grid-column: 1; }
  .pg-steps > li > img { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
/* Žalų registras (views/damages/): the 4 figures (2 by 2 on a phone), a damage's stages, sums that never break, and
   Mokėjimai's row per driver with its field. */
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* A damage's page (run ux-damage-page, review Z8, Z2, ZD1, Z12, ZD14, ZD15). The stages as a progress line: a dot per
   stage (✓ done, its number otherwise), joined by a line, the current one marked; not boxes that look like buttons. */
.stages { display: flex; list-style: none; margin: .5rem 0 1.2rem; padding: 0; max-width: 46rem; }
.stages li { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--muted); font-size: var(--fs-3); text-align: center; }
.stages li + li::before { content: ""; position: absolute; top: .8rem; right: calc(50% + 1rem); left: calc(-50% + 1rem); height: 2px; background: var(--line); }
.stages li.done + li::before { background: var(--accent); }
.stage-dot { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line); background: var(--bg); font-size: var(--fs-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.stage-name { overflow-wrap: break-word; }
@media (max-width: 480px) { .stages li { font-size: var(--fs-1); } } /* four names side by side, whole words */
.stages li.done { color: var(--ink); background: none; } /* not .done's box */
.stages li.done .stage-dot { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.stages li[aria-current] { color: var(--ink); font-weight: 700; }
.stages li[aria-current] .stage-dot { background: var(--okbg); color: var(--ok); box-shadow: inset 0 0 0 2px var(--ok); }
/* Dabar: the current step's form and the sums, first on a phone; the right column on a computer, staying in view. */
.damage-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2.5rem; }
.damage-now { margin: 0 0 1.2rem; }
.damage-now > h2 { margin-top: 0; }
.damage-now .now-sums { margin-bottom: 0; padding-top: .8rem; border-top: 1px solid var(--line); }
.damage-now > form + .field-err, .damage-now > .hint { margin-top: .3rem; }
.damage-now .now-sums:first-child, .damage-now > h2 + .now-sums, .damage-now > .flash + .now-sums { padding-top: 0; border-top: 0; }
@media (min-width: 1100px) {
  .damage-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); grid-template-areas: "main now"; align-items: start; }
  .damage-main { grid-area: main; min-width: 0; }
  .damage-main > .facts:first-child, .damage-main > .callout:first-child { margin-top: 0; }
  .damage-now { grid-area: now; position: sticky; top: var(--sticky-top); max-height: calc(100vh - var(--sticky-top) - 1rem); overflow-y: auto; }
  /* A save comes back to #dabar: the panel is on the first screen here, so the page stays at its top (the title, the
     stages) rather than scrolling them away. */
  .damage-now { scroll-margin-top: 100vh; }
}
.h-part { font-weight: 500; color: var(--muted); }
.h-part::before { content: "· "; }
.row-part { color: var(--muted); }
.part-edit { display: inline-block; margin-left: .4rem; vertical-align: middle; }
.part-edit > summary { list-style: none; display: inline-flex; cursor: pointer; }
.part-edit > summary::-webkit-details-marker { display: none; }
.part-edit[open] { display: block; margin: .4rem 0 0; }
.part-edit .inline-form input { max-width: 22rem; }
.fill-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .3rem; }
.fill-row .amount-input { margin: 0; }
.add-doc > summary { list-style: none; display: inline-flex; cursor: pointer; }
.add-doc > summary::-webkit-details-marker { display: none; }
.add-doc[open] > summary { margin-bottom: .6rem; }
.add-doc > .panel { margin: 0; }
/* An estimate that no longer counts (there's an invoice): greyed out, its sum struck through, saying why. */
.row.uncounted > .row-main { color: var(--muted); }
.row.uncounted .num { text-decoration: line-through; }
/* The row a save just added: lit for a moment (not with reduced motion), and "naujas" either way. */
.is-new { animation: lit-row 3s ease-out; }
.pill-new { background: var(--okbg); color: var(--ok); }
/* Short choices and fields at their own width, not across a wide screen (a damage, Nauja žala, Mokėjimai). */
.choices-fit .check.boxed { flex: 0 0 auto; }
.damage-form input[type=date] { max-width: 13rem; }
.damage-form input[type=text]:not(.amount-input) { max-width: 32rem; }
@media (min-width: 720px) {
  .damage-form .btn-block { width: auto; align-self: flex-start; }
  .damage-form .pick { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
  .damage-form .pick > label.btn { flex: 0 1 16rem; }
  .damage-form .pick > :not(label) { flex: 1 1 100%; }
}
.damage-form > .callout { max-width: 40rem; }
.file-item.off { opacity: .6; }
/* A company's bank account confirmed after a call (views/work/_bank_confirm.php; run ux-safe-clicks, review PD6): the
   button opens the confirm in place, with the account large enough to read out. */
.bank-confirm > summary { list-style: none; display: inline-flex; cursor: pointer; }
.bank-confirm > summary::-webkit-details-marker { display: none; }
.bank-confirm[open] > summary { margin-bottom: .6rem; }
.bank-confirm-form { max-width: 34rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bank-confirm-form > p { margin: 0; }
.bank-confirm-iban { font-size: var(--fs-5); font-weight: 600; overflow-wrap: anywhere; }
/* Payments in columns, sums lined up on the right: Mokėjimai's journal and a damage's payments (review ZD16). */
.pay-log .pay-log-row { display: grid; grid-template-columns: 6.2rem 6.8rem minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .9fr); align-items: baseline; gap: .2rem 1rem; }
.pay-log li.row.static > .pay-log-row { flex: 1 1 auto; min-width: 0; grid-template-columns: 6.2rem 6.8rem minmax(0, 1fr) minmax(0, 1fr); }
.pay-log-sum { text-align: right; }
.pay-log-row > * { min-width: 0; overflow-wrap: break-word; }
.pay-log-row > .pay-log-date, .pay-log-row > .pay-log-sum { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 720px) {
  .pay-log .pay-log-row, .pay-log li.row.static > .pay-log-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pay-log-row > :nth-child(2n) { text-align: right; }
  /* the method and who entered it each get a whole line, so neither breaks inside a word */
  .pay-log-row > .pay-log-method, .pay-log-row > .pay-log-by { grid-column: 1 / -1; text-align: left; }
}
#dokumentai, #mokejimai, #nuotraukos { margin-top: 1.4rem; }

/* Zalos's frame (run ux-zalos-lists): a skip link first; a driver's damages are columns from 900 px; on a phone the top bar's
   search stays off. The register itself: "Rework zalos" at the end. */
.skip-link { position: absolute; left: .5rem; top: -4rem; z-index: 60; padding: .55rem .9rem; background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius); font-weight: 700; }
.skip-link:focus { top: .5rem; }
li.needs { box-shadow: inset 3px 0 0 var(--warn); }
.damage-step { display: flex; align-items: center; gap: .7rem; font-size: var(--fs-3); white-space: nowrap; }
.damage-step a { display: inline-flex; align-items: center; min-height: 44px; }
.damage-step .off { color: var(--line); }
.damage-step-pos { color: var(--muted); font-variant-numeric: tabular-nums; }
.fold-inline { display: inline; }
.fold-inline summary { display: inline; cursor: pointer; color: var(--accent); }
.fold-inline[open] summary { margin-right: .4rem; }
.statement { margin-top: .6rem; }
.statement h2 { margin-top: 1.4rem; font-size: var(--fs-4); }
.statement-table { width: 100%; border-collapse: collapse; font-size: var(--fs-3); }
.statement-table th, .statement-table td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; overflow-wrap: anywhere; }
.statement-table th { background: var(--sunk); color: var(--ink2); font-size: var(--fs-2); font-weight: 700; }
.statement-table .r { text-align: right; }
.statement-table .nw { white-space: nowrap; }
.statement-table tfoot th { color: var(--ink); font-size: var(--fs-3); }
.statement-balance { margin-top: 1rem; font-size: var(--fs-4); }
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .qs-zalos { display: none; }
}
@media (min-width: 900px) {
  .people-grid .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 1rem; }
  .people-grid .row-main { flex-wrap: wrap; } /* a badge that doesn't fit beside the name goes under it, whole (pills are one line) */
  .people-grid .row-main strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .people-grid .row-main .badge { flex: none; }
  .people-grid .row-meta { display: grid; grid-template-columns: minmax(0, 1fr) 13.5rem; column-gap: .8rem; }
  .people-grid .row-meta .pill { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .settings-few { grid-template-columns: minmax(0, 1fr); }
}

/* Darbai, Sąskaitos and Automobiliai as tables from 1100 px (run ux-search-tables, PD4): the rows' cells are grid columns
   under headers that sort; a job's files are a count, their thumbnails a preview on hover. */
.tbl-head, .tbl-jobs .c-files { display: none; }
.tbl-jobs .c-files { display: none; }
.list-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: .7rem .2rem 0; font-size: var(--fs-3); }
.list-foot .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 1100px) {
  .tbl-jobs { --cols: 7.5rem minmax(0, 1fr) 6.5rem 7.5rem 3.5rem 12.5rem; }
  .tbl-jobs.tbl-co { --cols: 7.5rem minmax(0, 1fr) 9rem 6.5rem 7.5rem 3.5rem 12.5rem; }
  .tbl-inv { --cols: 10rem minmax(0, 1fr) 6.5rem 6.5rem 7.5rem 9rem; }
  .tbl-inv.tbl-co { --cols: 10rem minmax(0, 1fr) 9rem 6.5rem 6.5rem 7.5rem 9rem; }
  .tbl-head { display: grid; grid-template-columns: var(--cols); column-gap: .8rem; padding: 0 .2rem .25rem; margin-top: .2rem; border-bottom: 1px solid var(--line); font-size: var(--fs-2); font-weight: 600; }
  .tbl-head a, .tbl-head > span { color: var(--muted); text-decoration: none; white-space: nowrap; padding: .15rem 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .tbl-head a:hover, .tbl-head a.on { color: var(--ink); }
  .tbl-head .th-amount, .tbl-head .th-files, .tbl-head .th-sum, .tbl-head .th-n { text-align: right; justify-self: end; }
  .tbl-head + .list { border-top: 0; }
  .tbl .row { display: grid; grid-template-columns: var(--cols); column-gap: .8rem; align-items: center; }
  .tbl .row-main, .tbl .row-meta { display: contents; }
  .tbl .row > *, .tbl .row-main > *, .tbl .row-meta > * { min-width: 0; }
  .tbl .row-main > *, .tbl .row-meta > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tbl .c-amount, .tbl .c-files, .tbl .c-sum, .tbl .c-n { text-align: right; justify-self: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .tbl .row-notes { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; grid-row: 2; grid-column: 1 / -1; white-space: normal; overflow: visible; } /* several notes: one line each, under the cells, each only as wide as its text (a stretched chip was a bar across the row) */
  .tbl .c-state { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tbl-jobs .c-files { display: block; }
  .tbl-jobs > li { position: relative; }
  /* The thumbnails: not a second line, a preview under the row while the pointer or the keyboard is on it. */
  .tbl-jobs .job-files { display: none; position: absolute; right: .2rem; top: 100%; z-index: 20; margin-top: -.2rem; padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); max-width: min(32rem, 90%); }
  .tbl-jobs > li:hover .job-files, .tbl-jobs > li:focus-within .job-files { display: flex; }
  .tbl-inv .c-due, .tbl-cars .c-date { display: block; }
}
@media (max-width: 1099px) { .tbl-inv .c-due { display: none; } }

@media print {
  @page { size: A4; margin: 14mm; }
  html, body { background: #fff; }
  .staging-badge, .topbar, .help-foot, .no-print, .flash, .pk-offer { display: none !important; }
  .page, .page.wide, .page.narrow { max-width: none; margin: 0; padding: 0; }
  .tabs, .bottombar, .back, .damage-step, .pick, .skip-link, .reg-tools, .reg-new, .reg-foot { display: none !important; }
  .damage-layout form, .damage-layout .btn, .damage-layout .linkbtn { display: none !important; }
  .damage-layout { display: block; }
  .damage-now { position: static; max-height: none; overflow: visible; }
  .statement-table { font-size: 10pt; }
  .print-guide { border: 0; border-radius: 0; padding: 0; margin: 0; font-size: 13.5pt; }
  .pg-head h1 { font-size: 20pt; }
  .pg-steps h2 { font-size: 15pt; }
  .pg-steps > li { break-inside: avoid; }
  .pg-qr { width: 52mm; }
  .pg-steps > li:has(img) { grid-template-columns: minmax(0, 1fr) 55mm; }
  .pg-steps > li > h2, .pg-steps > li > p { grid-column: 1; }
  .pg-steps > li > img { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* Utilities last, so they win over the margins set above */
.mt { margin-top: 1.2rem; }
.mb { margin-bottom: 1.4rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Files (run ux-files): picked files with a picture and an ×, drop targets, the viewer, the photo grid, phone-sized targets */
.label { display: block; font-weight: 600; font-size: var(--fs-3); }
.picked li { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.picked li + li { margin-top: .35rem; }
.picked img { flex: none; width: 48px; height: 48px; border-radius: 6px; object-fit: cover; background: var(--bg); }
.picked-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.picked-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-5); line-height: 1; cursor: pointer; }
.picked-x:hover { color: var(--ink); background: var(--bg); }
.picked-x:focus-visible, .viewer-nav:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.pick-drop-hint { display: none; margin: 0; text-align: center; }
@media (hover: hover) and (pointer: fine) { .pick-drop-hint { display: block; } }
@media (scripting: none) { .pick-doc .pick-camera, button[data-fill] { display: none; } }
.is-dropping { position: relative; outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: var(--radius); }
.is-dropping::after { content: attr(data-drop-text); position: absolute; inset: -6px; z-index: 5; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--accent); font-size: var(--fs-5); font-weight: 700; pointer-events: none; }
.file-list.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
.file-grid .file-item { flex-direction: column; align-items: stretch; gap: .4rem; padding: .6rem; min-width: 0; }
.file-grid .file-thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.file-grid .file-body { flex: none; width: 100%; }
.file-grid .todo-form, .file-grid .todo-form .btn { width: 100%; }
/* The viewer (portal.js): × top left, the title, ⋯ for the rest; the file fills the window, the arrows sit over it (one file:
   none). A phone or tablet: the whole screen, black, the bars over the photo (a tap hides them); a PDF is a card there. */
dialog.viewer { width: min(96vw, 1200px); max-width: none; height: min(92vh, 900px); max-height: none; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); overflow: hidden; }
dialog.viewer[open] { display: flex; flex-direction: column; }
dialog.viewer:focus { outline: none; }
dialog.viewer::backdrop { background: rgba(0, 0, 0, .72); }
html:has(dialog.viewer[open]) { overflow: hidden; }
.viewer-bar { display: flex; align-items: center; gap: .5rem; min-height: 56px; padding: .375rem .5rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.viewer-close, .viewer-more-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: inherit; font: 400 var(--fs-6)/1 var(--font); cursor: pointer; list-style: none; }
.viewer-more-btn::-webkit-details-marker { display: none; }
.viewer-close:hover, .viewer-more-btn:hover { background: var(--tint); }
.viewer-close:focus-visible, .viewer-more-btn:focus-visible, .viewer-menu :is(a, button):focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
.viewer-title { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: .5rem; margin-left: .25rem; }   /* clear of the ×'s focus ring */
.viewer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.viewer-count { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.viewer-more { position: relative; flex: none; }
.viewer-menu { position: absolute; top: calc(100% + .25rem); right: 0; z-index: 3; min-width: 15rem; padding: .3rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.viewer-menu :is(a, button) { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 .8rem; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 600 var(--fs-4) var(--font); text-align: left; cursor: pointer; }
.viewer-menu :is(a, button):hover { background: var(--tint); }
.viewer-menu [hidden] { display: none; }
.viewer-stage { position: relative; flex: 1; min-height: 0; display: flex; background: var(--sunk); }
.viewer-media { flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer-media:has(.viewer-img) { touch-action: none; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; transition: transform .2s ease; }
.viewer-media.zoomed .viewer-img { transform: translate(var(--zx, 0), var(--zy, 0)) scale(var(--zs, 1)); transition: none; cursor: zoom-out; }
.viewer-pdf { align-self: stretch; flex: 1; width: 100%; height: 100%; border: 0; background: var(--surface); }
/* While a PDF loads: a calm sheet, not an empty frame (review portal-team-56). */
.viewer-media.is-loading { background: linear-gradient(90deg, var(--sunk) 0%, var(--surface) 50%, var(--sunk) 100%) 0 0 / 200% 100%; animation: viewer-wait 1.4s ease-in-out infinite; }
.viewer-media.is-loading .viewer-pdf { opacity: 0; }
@keyframes viewer-wait { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .viewer-media.is-loading { animation: none; } .viewer-img { transition: none; } }
.viewer-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 64px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow); color: var(--ink); font: 400 var(--fs-6)/1 var(--font); cursor: pointer; }
.viewer-prev { left: .75rem; }
.viewer-next { right: .75rem; }
.viewer-nav:hover { background: var(--surface); }
.viewer-nav[hidden] { display: none; }
.viewer-card { display: flex; flex-direction: column; align-items: center; gap: .9rem; width: min(22rem, calc(100% - 2rem)); padding: 1.5rem; border-radius: var(--radius); background: var(--surface); color: var(--ink); text-align: center; }
.viewer-card .file-type { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 88px; border-radius: 8px; background: var(--sunk); color: var(--ink2); font-size: var(--fs-4); }
.viewer-card-pic { max-width: 100%; max-height: 40vh; border-radius: 8px; }
.viewer-card-name { max-width: 100%; overflow-wrap: anywhere; }
/* A file that isn't on the server: in the viewer, in a frame (frame_page()), in a file list. */
.file-gone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; min-height: 100%; padding: 2rem 1rem; color: var(--ink); text-align: center; }
.file-gone .file-type, .file-missing .file-type { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; background: var(--redbg); color: var(--red); font-size: var(--fs-5); }
.viewer .file-gone { padding: 1.5rem; border-radius: var(--radius); background: var(--surface); min-height: 0; }
.frame-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--surface); color: var(--ink); font: 400 var(--fs-4)/1.5 var(--font); }
.file-missing .file-thumb { background: var(--redbg); }
.file-missing .file-name { color: var(--muted); }
@media (max-width: 959px), (pointer: coarse) {
  dialog.viewer { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; border: 0; border-radius: 0; background: #000; color: #fff; }
  dialog.viewer::backdrop { background: #000; }
  .viewer-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 4; padding-top: max(.375rem, env(safe-area-inset-top, 0px)); border: 0; background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); transition: opacity .2s ease; }
  .viewer-count { color: rgba(255, 255, 255, .8); }
  .viewer-close:hover, .viewer-more-btn:hover { background: rgba(255, 255, 255, .14); }
  .viewer-stage { background: #000; }
  .viewer-nav { background: rgba(0, 0, 0, .45); box-shadow: none; color: #fff; }
  .viewer-nav:hover { background: rgba(0, 0, 0, .6); }
  .viewer-prev { left: .25rem; }
  .viewer-next { right: .25rem; }
  dialog.viewer.bare .viewer-bar, dialog.viewer.bare .viewer-nav { opacity: 0; pointer-events: none; }
}
@media (max-width: 959px) { .files-first > section:last-child { order: -1; } }
@media (max-width: 640px) {
  .filters a, .hist-dates > summary, .btn-small, .back, .nav a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Run ux-approve: the status pill right after the title, Apžvalga's tiles and columns, the invoice beside its file,
   return-reason chips, the start page's two columns. */
.head-row.head-start { justify-content: flex-start; align-items: center; gap: .3rem .8rem; }
.head-row.head-start h1 { min-width: 0; overflow-wrap: anywhere; }
/* Run portal-staging-polish: a heading row with a pill or a button keeps its air below itself, not under its heading, so an
   item that wraps to a line of its own keeps it too (a wrapped Pateikta sat on the plate under it); its items are centred on one
   another. In a section's h2 row the button is the small one on computers (Pakviesti žmogų was a 48 px button sitting on the
   people table). A page's actions row before a chip row gets air between them (Įkelti už partnerį sat on Visi). */
.head-row.head-start, .head-row:has(> .btn) { align-items: center; margin-bottom: .4rem; }
.head-row.head-start > :is(h1, h2), .head-row:has(> .btn) > :is(h1, h2) { margin-bottom: 0; }
@media (min-width: 761px) { .head-row > h2 ~ .btn { min-height: 36px; padding: 0 .85rem; font-size: var(--fs-3); } }
.actions + .filters { margin-top: .8rem; }
.jobs-open { margin: 0 0 1rem; }
.tiles { display: none; list-style: none; margin: 0 0 1.2rem; padding: 0; gap: .7rem; }
.tile { display: flex; flex-direction: column; gap: .15rem; min-width: 0; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile-value { font-size: var(--fs-6); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.tile-label { color: var(--muted); font-size: var(--fs-3); overflow-wrap: anywhere; }
.todo-col:not(:has(*)) { display: none; }
.todo-system { margin: 0 0 1.4rem; border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: var(--radius); background: var(--surface); }
.todo-system > summary { display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem; cursor: pointer; }
.todo-system > .todo-list { margin: 0; padding: 0 .6rem .7rem; }
.todo-raw { margin-top: .4rem; font-size: var(--fs-3); }
.todo-raw > summary { cursor: pointer; color: var(--muted); }
.reason-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.reason-chips[hidden] { display: none; }
.reason-chips .chip { min-height: 36px; padding: .3rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-3); cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.reason-chips .chip:hover { border-color: var(--muted); }
.reason-chips .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.person-filter { max-width: 28rem; }
.person-filter[hidden] { display: none; }
.home-cols { display: block; }
@media (max-width: 640px) { .reason-chips .chip { min-height: 44px; } }
@media (min-width: 1100px) {
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .todo-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 2rem; align-items: start; }
  .home-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 2.5rem; align-items: start; }
  .home-recent > section:first-child h2 { margin-top: 0; }
}

.btn-primary .h-count { color: inherit; opacity: .9; }

/* Run ux-paying: Apmokėjimui's copy buttons, tick-all, subtotals and bank file; the company page's money line; export links; chip sums. */
.copy-btn { display: none; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -.5rem -.2rem; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
@media (scripting: enabled) { .copy-btn { display: inline-flex; } }
.copy-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.copy-btn.copied { color: var(--accent); }
.copy-toast { position: fixed; left: 50%; bottom: 5rem; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: .5rem 1rem; border-radius: var(--radius); background: var(--ink); color: var(--bg); font-weight: 600; z-index: 30; overflow-wrap: anywhere; }
.pay-pick { cursor: default; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .3rem 1rem; }
.pay-pick .row-main { flex: 1 1 22rem; min-width: 0; }
.pay-tick { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; max-width: 100%; }
.pay-pick.blocked .pay-tick { cursor: default; }
.pay-who { min-width: 0; overflow-wrap: anywhere; }
.pay-iban { user-select: all; overflow-wrap: anywhere; }
.pay-all { margin: 0 0 .4rem; }
.pay-all label { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; font-weight: 600; cursor: pointer; }
.pay-all input { width: 1.3rem; height: 1.3rem; margin: 0; }
.pay-groups { margin: 0 0 1rem; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pay-groups h2 { font-size: var(--fs-4); margin: 0 0 .3rem; }
.pay-groups li { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; padding: .25rem 0; min-width: 0; overflow-wrap: anywhere; }
.pay-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.pay-picked { font-weight: 600; overflow-wrap: anywhere; }
.pay-sepa-hint { margin: 0; }
.pay-date { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; }
.pay-date input { min-height: 48px; }
.pay-confirm-actions { flex-wrap: wrap; }
.money-line { margin: -.3rem 0 .8rem; display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; overflow-wrap: anywhere; }
.money-line a { min-height: 44px; display: inline-flex; align-items: center; }
.export-links { margin: 0 0 .8rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-sum { color: var(--muted); font-weight: 500; white-space: nowrap; }
.chip-sum::before { content: '· '; }
.pay-groups .pay-group-sum { display: block; margin-top: 2px; }
.unpay-form { margin-top: .8rem; }

/* Run ux-partner-forms (review P2, P3, PD7, P9, P12, P19, P13, PD17, PD19, PD22): the account link, the tick-all line, the fill-in
   button, date boxes with a calendar button, wording by device. */
a.who { text-decoration: none; padding: .2rem .6rem; border: 1px solid var(--line); border-radius: 999px; }
a.who:hover, a.who[aria-current] { color: var(--ink); border-color: var(--accent); }
.on-desk { display: none; }
@media (hover: hover) and (pointer: fine) { .on-desk { display: inline; } .on-touch { display: none; } }
.job-picks { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
.job-picks .btn { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.job-picks .btn[disabled] { opacity: .5; cursor: default; }
.fill-line { margin: -.2rem 0 .2rem; }
.fill-line .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.date-field { position: relative; display: flex; align-items: center; gap: .3rem; max-width: 100%; }
.date-field input[data-date] { flex: 1 1 auto; min-width: 0; }
.date-pick { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); cursor: pointer; }
.date-pick[hidden] { display: none; }
.date-pick:hover { color: var(--ink); }
.date-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 640px) { a.who { min-height: 44px; display: inline-flex; align-items: center; } .job-picks .btn.btn-small, .fill-line .btn.btn-small { min-height: 44px; display: inline-flex; align-items: center; } }
.date-field input[data-date] { padding-left: .6rem; padding-right: .4rem; }

/* ===== Matcha, zalos (run matcha-zalos): the register's screens laid out as the boards ===== */
/* Only a link inside running text is underlined (and bold): a sentence's link in a paragraph, a callout, a hint. Tiles,
   rows, cards, tabs, chips, buttons and lists are their own parts, and any link with a class of its own keeps its look:
   everything here weighs nothing (:where), so one class wins (tech-findings 3, reviews portal-team-11, portal-partner-10). */
:where(main :is(p, dd, .hint, .callout, .flash, .lead, .empty, .prose)) a:where(:not([class])) {
  font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; text-decoration-skip-ink: auto;
}
/* A paragraph that is only a link ("Visi darbai (12)", "Mano įrenginiai") is a way on, not text: bold, no line. */
:is(.more, .page-links, .center-link, .jobs-open, .money-line) a { font-weight: 700; text-decoration: none; }
:is(.more, .page-links, .center-link, .jobs-open, .money-line) a:hover, .head-row > a:hover { text-decoration: underline; text-underline-offset: .2em; }
.head-row > a { font-weight: 700; }
/* The footer's links are in its sentences, so underlined like running text: a phone has no hover to show them (run b's review
   R1.2, over portal-team-10's hover-only). The language chips aren't. */
.help-foot a:not(.lang-pick a) { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
/* A plate is a small bordered chip, in one font with figures of one width. */
.plate { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 .5rem; background: var(--surface); line-height: 1.5; }
h1.plate { border: 0; padding: 0; background: none; }
/* An amount field: the € sits inside it, on the right. */
.amount-field { position: relative; display: block; max-width: 12rem; margin-top: .3rem; }
.amount-field > .amount-input { margin: 0; max-width: none; padding-right: 2.2rem; }
.amount-eur { position: absolute; right: .85rem; top: 50%; transform: translateY(-50%); color: var(--ink2); font-weight: 700; pointer-events: none; }
.fill-row .amount-field { margin: 0; }

/* A damage (ZDamage): the title and the progress strip side by side, the step as a card in the column that stays in view, and
   the facts, photos, documents, payments and history as cards. */
.damage-top { display: flex; align-items: center; justify-content: space-between; gap: .2rem .8rem; flex-wrap: wrap; }
.damage-top .back { margin: 0; }
.damage-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2rem; align-items: end; }
.damage-head h1 { margin: .3rem 0 .5rem; }
.stages-wrap { min-width: 0; }
.stages-pos { margin: 0 0 .1rem; font-size: var(--fs-3); font-weight: 700; color: var(--ink2); }
.stages { max-width: none; }
@media (min-width: 1100px) { .damage-head { grid-template-columns: minmax(0, 1fr) 27rem; } .stages { margin-bottom: .5rem; } }
.facts-card, .money-card, .now-card, .damage-main #dokumentai, .damage-main #mokejimai, .damage-main #nuotraukos, .damage-main #istorija {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 1.1rem 1.25rem; margin: 0 0 1.1rem;
}
.facts-card > h2, .money-card > h2, .now-card > h2, .damage-main section > h2:first-child { margin: 0 0 .7rem; font-size: var(--fs-5); }
.facts-card .facts { margin: 0; }
.now-card { border: 2px solid var(--honey); }
.now-card.is-done { border: 1px solid var(--line); }
.now-card > h2 { font-size: var(--fs-5); }
.now-card > .hint { margin-bottom: .6rem; }
.damage-now { margin: 0; }
.damage-now .money-card .now-sums { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; margin: 0; padding: 0; border: 0; }
.money-card .now-sums dd { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: .1rem .5rem; text-align: right; font-weight: 700; }
.money-card .now-sums dd .muted { font-weight: 500; }
@media (min-width: 1100px) {
  .damage-now { padding: 4px; margin: -4px; }
  .damage-main > .facts-card:first-child, .damage-main > .callout:first-child { margin-top: 0; }
}
/* On a phone the step's main button is a bar fixed to the bottom (it replaces the menu bar there); the page ends with room under it.
   A phone held sideways keeps it too (zalos-phone-126). */
@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) {
  .damage-bar, .action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px var(--tint); }
  .damage-bar .btn, .action-bar .btn { width: 100%; }
  body:has(.damage-bar) .bottombar { display: none; }
  body:has(.damage-bar, .action-bar) .help-foot { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 640px) {
  .filters a, .hist-dates > summary, .btn-small, .check.boxed { min-height: 44px; }
  .back, .damage-top .back { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 640px) {
  .topbar .brand, .topbar .linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding-top: 0; padding-bottom: 0; }
  main summary:not(.btn) { display: flex; align-items: center; min-height: 44px; }
}
/* In a damage's cards a row's button goes under its text on a phone, so a long pill or amount has the whole width. */
@media (max-width: 560px) {
  .damage-main li.row.static { flex-wrap: wrap; justify-content: flex-start; }
  .damage-main li.row.static > .row-main { flex: 1 1 100%; }
}
/* A plate in a row's grey line (document lists) stays plain text: it's one of several and the line mustn't outgrow its row. */
.muted .plate { display: inline; border: 0; padding: 0; background: none; }

/* ===== Matcha, partner portal (run matcha-portal): the team's screens (PApzvalga, Approve, PPay) and the partner's phone (PartnerPhone, PUpload) ===== */

/* zalos's menu in the header on a computer, as the boards draw it (the tabs under the header go there; below 1100 px they stay, and on a phone the bar at the bottom is the menu) */
.nav-site { display: none; }
@media (min-width: 1100px) {
  .nav-site { display: flex; margin-left: 0; }
  .tabs-site { display: none; }
  .topbar .nav-site ~ .qs { margin-left: auto; }
}

/* Apžvalga: the greeting, and the to-do counts as cards (a computer shows them) */
.greeting { font-size: var(--fs-6); margin: .4rem 0 1rem; overflow-wrap: anywhere; }
@media (min-width: 900px) { .greeting { font-size: 2.25rem; } }
.tile { position: relative; gap: .35rem; padding: 1.2rem 1.4rem; border-radius: 18px; box-shadow: var(--shadow); }
.tile:hover { border-color: var(--field); color: var(--ink); }
.tile-title { font-weight: 700; }
.tile-value { font-size: 2.5rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
.tile-money { font-size: var(--fs-6); }
.tile-label { font-size: var(--fs-3); }
.tile-go { margin-top: auto; padding-top: .5rem; font-weight: 700; }
.tile-warn { border: 2px solid var(--honey); }
.tile-danger { background: var(--redbg); border-color: transparent; box-shadow: none; }
.tile-danger .tile-title { color: var(--red); }
.todo { border-radius: 18px; box-shadow: var(--shadow); }
.todo-system { border-radius: 18px; }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.1rem; } }

/* Approving an invoice: the document wide on the left, the panel (amount, facts, buttons) beside it and sticky, as a card */
.review-head { margin: 0 0 .5rem; }
.review-amount { display: block; font-size: var(--fs-6); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.review-net { display: block; margin-top: .1rem; color: var(--muted); font-size: var(--fs-3); font-weight: 600; }
@media (min-width: 1100px) {
  .split.split-review { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1.4rem; }
  .split-review > .review-panel { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: var(--sticky-top); max-height: calc(100vh - var(--sticky-top) - 1rem); overflow-y: auto;
    padding: 1.2rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
  .split-review > section:not(.review-panel) { grid-column: 1; grid-row: 1; padding-top: 0; }
  .split-review > section:not(.review-panel) > h2:first-child { margin-top: 0; }
  .split-review .preview-pdf { height: max(520px, calc(100vh - 14rem)); }
  .review-panel .facts { margin: .4rem 0 1rem; gap: .35rem 1rem; }
  .review-panel .invoice-actions { flex-direction: column; align-items: stretch; }
  .review-panel .invoice-actions form, .review-panel .invoice-actions .btn { width: 100%; }
  .review-panel .return-form { margin: 0 0 1rem; }
  .review-panel .return-form > summary { display: flex; align-items: center; justify-content: center; min-height: 48px; list-style: none; border: 1px solid var(--field); border-radius: var(--radius); background: var(--surface); font-weight: 700; }
  .review-panel .return-form > summary::-webkit-details-marker { display: none; }
  .review-panel .return-form[open] > summary { margin-bottom: .8rem; }
}

/* Apmokėjimui: the rows as one card, the total at the right of the heading line, a bar that sticks to the bottom of the screen */
.pay-head { display: flex; justify-content: flex-end; margin: 0 0 .6rem; }
.pay-head .pay-total { margin: 0; text-align: right; }
.pay-head .pay-total strong { font-size: var(--fs-6); font-weight: 800; }
.pay-rows { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.pay-rows > li:last-child { border-bottom: 0; }
.pay-rows .row { padding-left: .5rem; padding-right: .5rem; }
.pay-groups { border-radius: 18px; box-shadow: var(--shadow); }
.pay-bar { margin: .8rem 0 0; padding: .8rem .2rem calc(.8rem + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px var(--tint); z-index: 5; }
.pay-bar .pay-picked { font-size: var(--fs-5); font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .pay-bar { flex-wrap: nowrap; } .pay-bar .pay-picked { order: -1; margin-right: auto; } }

/* The partner's phone: the start page and an invoice's check page. The main action is a bar at the bottom of the screen (see .damage-bar above),
   the language switch sits in the header (a person's language is kept on their account), the cards are cards. */
.lang-switch { display: none; }
.home-cols section { padding: .8rem 1rem .4rem; margin: 0 0 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.home-cols section > h2, .home-cols section .head-row h2 { margin: 0 0 .3rem; font-size: var(--fs-5); }
.home-cols .list { border-top: 0; }
.home-cols .list > li:last-child { border-bottom: 0; }
.invoice-doc .file-list, .check-form .split > section.invoice-doc { min-width: 0; }
.from { display: inline-block; max-width: 100%; vertical-align: bottom; padding: 0 .55rem; border-radius: 999px; background: var(--skybg); color: var(--sky); font-size: var(--fs-1); font-weight: 700; line-height: 1.5; }
@media (max-width: 640px) {
  .topbar:has(.lang-switch) { flex-wrap: wrap; row-gap: .2rem; }
  .topbar:has(.lang-switch) .nav { order: 3; flex: 1 1 100%; margin-left: 0; }
  .lang-switch { display: inline-flex; margin-left: auto; padding: 2px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--fs-2); font-weight: 700; }
  .lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 999px; color: var(--ink2); text-decoration: none; }
  .lang-switch a[aria-current] { background: var(--btn); color: var(--btnink); }
  .home-main { margin: 0; }
  .topbar a.who { min-width: 44px; min-height: 44px; justify-content: center; }
  main .btn-quiet { min-height: 44px; }
  .btn-primary.btn-big { box-shadow: none; }
  .job-choice, .check.boxed { min-height: 48px; }
  .invoice-doc, .check-form .split > section:first-child { padding: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
}



/* Russian's longer words (Зарегистрирован, Сумма) break inside their box rather than push it wider */
.stages li, .stages li > span:last-child, .facts dt { overflow-wrap: anywhere; min-width: 0; }
.c-stage { min-width: 0; }
.pay-pick .row-meta .copy-btn:last-child { margin-right: 0; }
.stages .stage-name { min-width: 0; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }

/* ===== Matcha polish (run matcha-polish): what the lead found in the staging screenshots; the bounds check's clip, align and edge rules guard each ===== */


/* A select draws its own arrow, inside its right padding, so its width (the widest option plus the padding) always has room for the text beside the
   arrow; the native one sat on top of the text ("Visi mėnesia"). */
select { -webkit-appearance: none; appearance: none; padding-right: 2.4rem; background-color: var(--surface); background-repeat: no-repeat; background-position: right .85rem center; background-size: .8rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235a6b2a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a3b07a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}

/* Search rows: a select is as wide as its longest option (or the row when that is wider: it then takes a line of its own), a search field as
   wide as its longest placeholder (lt, en, ru); when they don't fit side by side the row wraps, so nothing is clipped. */
.search { flex-wrap: wrap; }
.search select { flex: 0 1 auto; min-width: 0; max-width: 100%; }   /* min(max-content, 100%) was invalid CSS, so dropped */
.search input[type="search"] { min-width: min(17rem, 100%); }
.search:not(:has(select)) input[type="search"] { flex: 1 1 17rem; }
/* The top bar's search and the settings' search keep room for their placeholder (and the icon and the "/" key) */
.qs { min-width: 9.5rem; }
@media (max-width: 560px) { .with-search .qs { flex: 1 1 9.5rem; } }
.settings-find input { padding-right: .5rem; }

/* The lists' rows: the same padding as their card's header, `.list.compact .row` (.5rem .2rem) used to win over a plain `.pay-rows .row` */
.pay-rows.list .row { padding-left: 1rem; padding-right: 1rem; }
.pay-bar { padding-left: 1rem; padding-right: 1rem; }

/* A phone has nothing to drop a file from: no drop hint on touch screens or at phone width; the language switch is in the header there, so
   the footer's picker is hidden (it shows from 641 px, where the header's is not). */
@media (pointer: coarse), (max-width: 640px) { .pick-drop-hint { display: none; } }
@media (max-width: 640px) { body:has(header .lang-switch) .help-foot .lang-pick { display: none; } }

/* The bottom bar's labels: 12 px (zalos-phone-08; two tabs leave the room the five didn't) */
@media (max-width: 480px) { .bottombar a.on { font-weight: 700; } }

/* ===== The parts both sites share (run rework-foundation-c, after the four reviews of 2026-11-18) ===== */
/* A plate: one chip in every row, list and table, the same size on both sites (Components, ZList: 14 px, 1 px line, 6 px
   corners); plain text in a heading, in a sentence and in a log line (portal-partner-38, zalos-desktop-89). Several plates in
   an invoice row are chips too (they were plain there, portal-team-75). */
.plate { font-size: var(--fs-3); line-height: 1.45; padding: 0 .375rem; color: var(--ink); }
.c-plates .plate { display: inline-block; border: 1px solid var(--line); padding: 0 .375rem; background: var(--surface); }
:is(h1, h2) .plate, h1.plate, .activity .plate, :is(p, dd, li.event) > .plate, .btn .plate { display: inline; border: 0; padding: 0; background: none; font-size: inherit; line-height: inherit; }
.btn .plate { color: inherit; }
/* In a table row the chip is as wide as its plate, not as its column. */
.tbl .row .plate { justify-self: start; }
.plate-input::placeholder { font-weight: 400; color: var(--ink2); }

/* A search field's clear button: an own × in the page's colour, not the browser's blue one (zalos-desktop-31, portal-team-05). */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 1rem; height: 1rem; margin: 0 0 0 .4rem; cursor: pointer; background: var(--ink2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* One table look (Components "Sąrašas kompiuteryje"): zalos's register and the portal's Darbai, Sąskaitos and Automobiliai
   share the header row (the sunk band, 13 px, 700) and 44 px rows (zalos-desktop-32, portal-team-121). */
@media (min-width: 1100px) {
  .tbl-head { align-items: center; min-height: 40px; padding: .45rem .6rem; margin-top: .2rem; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
    background: var(--sunk); font-size: var(--fs-2); font-weight: 700; color: var(--ink2); }
  .tbl-head a, .tbl-head > span { color: var(--ink2); font-weight: 700; }
  .tbl .row { min-height: 44px; }
  .list.compact.tbl .row { padding-left: .6rem; padding-right: .6rem; } /* the header's padding: header and body cells line up */
  /* An invoice's plates (up to three chips and "+n"): they wrap inside their column instead of running past it. */
  .tbl .row-main > .c-plates, .tbl .row-meta > .c-plates { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; white-space: normal; overflow: visible; }
}

/* The start pages' tiles: every tile in a row as tall as the tallest (portal-team-13). */
.tiles > li { display: flex; min-width: 0; }
.tiles > li > .tile { flex: 1 1 auto; }

/* The menu: one weight for every item, so the current one doesn't widen and push the others (zalos-desktop-12); its tint and
   colour mark it. */
.nav a, .nav a.on, .nav-more summary, .nav-more summary.on { font-weight: 600; }

/* On a computer the header's edges are the wide pages' (1200 px): the logo above the content's left edge, the last item above
   its right edge (zalos-desktop-04). */
@media (min-width: 761px) { .topbar { padding-left: max(1rem, calc((100% - 1200px) / 2 + 1rem)); padding-right: max(1rem, calc((100% - 1200px) / 2 + 1rem)); } }

/* On a phone the header scrolls away with the page instead of keeping 64 to 117 px of the screen (zalos-phone-05,
   portal-partner-06, portal-team-06); zalos's bottom bar keeps its menu in reach, and the header is back at the top. */
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .topbar { position: static; }
  html { scroll-padding-top: 1rem; }
}

/* zalos's bottom bar steps aside while the keyboard is up (a text field has focus), so it never covers the field being typed
   in, its error or the files just picked (zalos-phone-58, portal-partner-69); bars above it come down to the screen's edge. */
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  body:has(:is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"], [type="hidden"]), textarea, select):focus) .bottombar { display: none; }
  body:has(.bottombar):has(:is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"], [type="hidden"]), textarea, select):focus) :is(.settings-form.dirty .savebar, .pay-bar, .pay-foot, .pay-save) { bottom: env(safe-area-inset-bottom, 0px); }
  body:has(.bottombar) main :is([aria-invalid="true"], .err-text, .pick-list) { scroll-margin-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== Rework zalos (run rework-zalos-a, after the reviews of 2026-11-18): the register's shell and its Žalos list, as the ZList and
   ListPhone boards draw them. A phone held sideways ((pointer: coarse) and (max-height: 500px)) keeps the phone's layout. ===== */

/* Pills and badges are always one line (the user, 2026-11-18: "pills should always only be one line"; the bounds check's pill
   rule): the text next to them gives way instead (it wraps, or Komanda's names end in "…"), or they go under it. */
.pill, .badge { flex: none; }
.job-rows .c-date { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; }

/* The header: the logo, zalos's menu (a computer), the quick search (pages without their own) and the avatar at the right edge. */
.topbar .qs-zalos { margin-left: auto; }
.me-menu { position: relative; flex: none; margin-left: auto; }
.qs ~ .me-menu { margin-left: 0; }
.me-menu > summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--btn); color: var(--btnink); font-weight: 800; font-size: var(--fs-3); letter-spacing: .02em; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.me-menu > summary::-webkit-details-marker { display: none; }
.me-menu > summary:hover { box-shadow: 0 0 0 3px var(--tint); } /* no filter: it would hold the phone's dimmed backdrop (position: fixed) inside the avatar */
.me-panel { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 40; width: 17.5rem; max-width: calc(100vw - 2rem); padding: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.me-who { display: flex; flex-direction: column; gap: .1rem; margin: 0 0 .3rem; padding: .4rem .6rem .6rem; border-bottom: 1px solid var(--line); min-width: 0; }
.me-who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-who span { color: var(--ink2); font-size: var(--fs-3); }
.me-links { display: flex; flex-direction: column; }
.me-links a { display: flex; align-items: center; min-height: 44px; padding: 0 .6rem; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.me-links a:hover, .me-links a[aria-current] { background: var(--tint); }
.me-links .me-phone { display: none; }
.me-lang { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .3rem 0; padding: .4rem .6rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.me-lang-label { color: var(--ink2); font-weight: 600; }
.me-lang-pick { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.me-lang-pick a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .5rem; border-radius: 999px; color: var(--ink2); font-size: var(--fs-2); font-weight: 700; text-decoration: none; }
.me-lang-pick a:hover { color: var(--ink); background: var(--tint); }
.me-lang-pick a[aria-current] { background: var(--btn); color: var(--btnink); }
.me-panel .logout { display: block; margin: .4rem 0 0; }
.me-panel .logout .btn { width: 100%; }
.logout-sure { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.logout-sure[hidden] { display: none; }
.logout-ask { grid-column: 1 / -1; margin: .2rem .2rem 0; font-weight: 700; }
.logout-sure .btn { width: 100%; min-width: 0; padding: 0 .6rem; }

/* A phone (and one held sideways): the menu is a sheet from the bottom over a dimmed page; Komanda is in it (no tab of its own). */
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .topbar:has(.me-menu[open]) { z-index: 60; }
  .me-menu[open] > summary::before { content: ''; position: fixed; inset: 0; z-index: 45; background: rgb(18 20 14 / .4); cursor: default; }
  .me-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; width: auto; max-width: none; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
    padding: .7rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  .me-links .me-phone { display: flex; }
  body:has(.bottombar) main.page { padding-bottom: calc(58px + 2rem + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-color-scheme: dark) { .me-menu[open] > summary::before { background: rgb(0 0 0 / .55); } }

/* The register's heading line: Žalos, the money in one line of text, and one + Nauja žala at the right. */
.reg-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.6rem; margin: .4rem 0 1.2rem; }
.reg-top h1 { margin: 0; }
.reg-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem 1.3rem; margin: 0; color: var(--ink2); font-size: var(--fs-3); }
.reg-sum a { color: var(--ink2); text-decoration: none; }
.reg-sum a:hover { color: var(--ink); text-decoration: underline; }
.reg-sum strong { color: var(--ink); font-weight: 800; white-space: nowrap; }
.reg-sum .none, .reg-sum-phone .none { color: var(--ink2); font-weight: 400; }
.reg-sum-phone { display: none; }
.reg-new { margin-left: auto; }
.reg-new svg { flex: none; }

/* One toolbar row: the chips on the left, the month and the search on the right (Enter searches; the month sends itself). */
.reg-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 1rem; }
.reg-chips { flex: 0 1 auto; margin: 0; }
.reg-chips a, .reg-chips > span[aria-disabled], .hist-dates > summary { padding: 0 .65rem; } /* a little tighter: the chips, the month and the search share one row from 1280 px (ZList) */
.reg-chips > span[aria-disabled] { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .9rem; border: 1px dashed var(--line); border-radius: 999px; color: var(--ink2); font-size: var(--fs-3); }
.page.wide .reg-search { flex: 1 1 28rem; flex-wrap: nowrap; align-items: center; max-width: min(31rem, 100%); margin: 0 0 0 auto; } /* at least what the month and the whole placeholder need; under the chips at the right when that doesn't fit (1100 px, as ZList-1100) */
.reg-search { gap: .4rem; }
.reg-search select { flex: none; width: auto; field-sizing: content; padding-right: 2rem; background-position: right .7rem center; } /* as wide as the month shown, not the longest one (Chrome, Edge) */
.reg-q { position: relative; flex: 1 1 15rem; min-width: 0; display: flex; }
.reg-q input[type="search"] { flex: 1 1 auto; min-width: 0; width: 100%; padding-right: 2.6rem; }
.reg-q .qs-key { right: .7rem; }
.reg-q:focus-within .qs-key, .reg-q input:not(:placeholder-shown) ~ .qs-key { display: none; }
@media (hover: none), (pointer: coarse) { .reg-q .qs-key { display: none; } }
.reg-found { margin: -.3rem 0 .8rem; color: var(--ink2); }
.reg-found a { font-weight: 600; }
.reg-drivers { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; }
.reg-drivers a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.reg-drivers a:hover { border-color: var(--field); }
.reg-driver-owed { color: var(--honey); font-weight: 700; white-space: nowrap; }

/* The list: cards (a phone, a phone held sideways, a narrow window) ... */
.reg-table { --reg-date: 5.6rem; --reg-stage: 8rem; }
html[lang="ru"] .reg-table { --reg-stage: 9.8rem; } /* Būsena: Russian's longest stage, Зарегистрирован, fits */
.reg-short-dates { --reg-date: 3.4rem; }
.reg-cols { display: none; }
.reg-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.reg-group { display: none; }
.reg-item { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.reg-row { display: grid; grid-template-columns: max-content minmax(0, max-content) max-content minmax(auto, 1fr); grid-template-areas: "nr nr nr stage" "part part part part" "car driver date amt" "why why why why";
  align-items: center; gap: .3rem .5rem; padding: .8rem 1rem; color: var(--ink); text-decoration: none; }
.reg-item.needs > .reg-row { box-shadow: inset 4px 0 0 var(--honey); }
.reg-row:hover { background: var(--tint); }
.reg-row > * { min-width: 0; } /* the plate and the date keep their width (max-content columns); the driver's name gives way. The last column is as wide as the
   amount (its min-width) and takes what's left; the stage doesn't widen it (min-width 0), so on a card without an amount a wide
   stage reaches left into the number's row instead of taking the driver's room */
.reg-row .c-nr { grid-area: nr; justify-self: start; max-width: 100%; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* its own width: the stage may reach into its row */
.reg-row .c-stage { grid-area: stage; justify-self: unsafe end; }
.reg-row .c-part { display: contents; }
.reg-row .c-part-t { grid-area: part; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-row .c-part-t.is-none { color: var(--ink2); font-weight: 500; font-style: italic; }
.reg-row .c-why { grid-area: why; color: var(--honey); font-size: var(--fs-2); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-row .c-car { grid-area: car; display: flex; align-items: center; gap: .5rem; min-width: 0; }
.reg-row .c-model { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.reg-row .c-driver { grid-area: driver; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-row .c-date { grid-area: date; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.reg-row .c-amt { grid-area: amt; justify-self: end; min-width: max-content; display: flex; flex-direction: column; align-items: flex-end; font-weight: 700; white-space: nowrap; }
.reg-row .c-amt small { color: var(--ink2); font-size: var(--fs-1); font-weight: 500; }
.reg-row .c-amt .pill-mark { font-size: var(--fs-1); padding: 0 .4rem; }
.reg-row .c-total, .reg-row .c-left { display: none; }
.reg-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin: .9rem .2rem 0; color: var(--ink2); font-size: var(--fs-3); }
.reg-foot strong { color: var(--ink); }
.reg-export a { font-weight: 600; }

@media (max-width: 899px), (pointer: coarse) and (max-height: 500px) {
  .reg-row .c-model { display: none; }
  .reg-row .c-date::before { content: '· '; }
  /* the cards needing action first, then the other open ones, then the closed ones (the page's order stays the date's: grouping is only
     how a phone shows them; the group labels are hidden from screen readers, each card says it needs action) */
  .reg-grouped .reg-group { display: block; margin: .4rem .2rem -.2rem; color: var(--ink2); font-size: var(--fs-2); font-weight: 700; }
  .reg-grouped .reg-group.g-need { order: 0; margin-top: 0; }
  .reg-grouped .reg-item.g-need { order: 1; }
  .reg-grouped .reg-group.g-open { order: 2; }
  .reg-grouped .reg-item.g-open { order: 3; }
  .reg-grouped .reg-group.g-closed { order: 4; }
  .reg-grouped .reg-item.g-closed { order: 5; }
}

/* ... and a table from 900 px (with a mouse, or a screen taller than a phone held sideways). */
@media (min-width: 900px) and (min-height: 501px), (min-width: 900px) and (pointer: fine) {
  .reg-table { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
    --reg-grid: 7.4rem var(--reg-date) minmax(0, 1.25fr) minmax(0, 1.3fr) minmax(0, 1fr) var(--reg-stage) 6.6rem 6.6rem; }
  .reg-cols, .reg-row { display: grid; grid-template-columns: var(--reg-grid); grid-template-areas: none; column-gap: .9rem; align-items: center; padding: 0 1.1rem; }
  .reg-cols { min-height: 40px; background: var(--sunk); border-bottom: 1px solid var(--line); color: var(--ink2); font-size: var(--fs-2); font-weight: 700; }
  .reg-cols > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); text-decoration: none; padding: .55rem 0; }
  .reg-cols a:hover, .reg-cols a.on { color: var(--ink); }
  .reg-cols .rc-suma, .reg-cols .rc-liko { text-align: right; }
  .reg-rows { display: block; }
  .reg-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; overflow: visible; }
  .reg-item:last-child { border-bottom: 0; }
  .reg-row { min-height: 46px; padding-top: .35rem; padding-bottom: .35rem; gap: 0 .9rem; }
  /* the cards' named areas off (.reg-row .c-stage etc. outweigh .reg-row > *): each cell in its column, in the markup's order */
  .reg-row > *, .reg-row .c-nr, .reg-row .c-stage, .reg-row .c-car, .reg-row .c-driver, .reg-row .c-date, .reg-row .c-amt { grid-area: auto; justify-self: stretch; }
  .reg-row .c-nr { font-weight: 700; }
  .reg-row .c-part { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
  .reg-row .c-part-t { font-weight: 500; }
  .reg-row .c-why { font-size: var(--fs-1); }
  .reg-row .c-car .plate { flex: none; }
  .reg-row .c-driver { color: var(--ink); }
  .reg-row .c-date { color: var(--ink); }
  .reg-row .c-stage { justify-self: start; max-width: 100%; }
  .reg-row .c-stage .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; } /* one line, whatever the language */
  .reg-row .c-total, .reg-row .c-left { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
  .reg-row .c-total .pill-mark { font-size: var(--fs-1); padding: 0 .4rem; }
  .reg-row .c-left { font-weight: 700; }
  .reg-row .none { color: var(--ink2); font-weight: 400; }
  .reg-row .c-amt { display: none; }
  .reg-foot { margin: 0; padding: .7rem 1.1rem; border-top: 1px solid var(--line); } /* inside the table's card, as ZList */
}
@media (min-width: 900px) and (max-width: 1199px) { .reg-row .c-model { display: none; } } /* the plate alone where the column is narrow (ZList-1100) */
@media (min-width: 900px) and (max-width: 1099px) {
  .reg-table { --reg-grid: 7rem var(--reg-date) minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, 1fr) var(--reg-stage) 6.2rem 6.2rem; }
  .reg-cols, .reg-row, .reg-foot { column-gap: .6rem; padding-left: .9rem; padding-right: .9rem; }
}

/* A phone: the money as two lines beside the heading (a link to Mokėjimai), the search above the chips, which wrap; Užregistruotos
   and Uždarytos only on a computer (or when chosen), the month only once one is chosen; + Nauja žala a round button above the bar
   that shrinks to its + while scrolling down. */
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .reg-top { flex-wrap: nowrap; justify-content: space-between; margin-bottom: .9rem; }
  .reg-sum { display: none; }
  .reg-sum-phone { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; color: var(--ink2); font-size: var(--fs-3); line-height: 1.35; text-align: right; text-decoration: none; }
  .reg-sum-phone span { white-space: nowrap; }
  .reg-sum-phone strong { color: var(--ink); font-weight: 800; }
  .reg-new { position: fixed; right: 1rem; bottom: calc(58px + .9rem + env(safe-area-inset-bottom, 0px)); z-index: 25; min-height: 56px; padding: 0 1.25rem; border-radius: 999px; box-shadow: 0 6px 18px #00000040; transition: padding .2s, gap .2s; }
  .reg-new.is-small { gap: 0; padding: 0; width: 56px; }
  .reg-new.is-small span { display: none; }
  body:has(.reg-new) main.page { padding-bottom: calc(58px + 56px + 2.6rem + env(safe-area-inset-bottom, 0px)); }
  .page.wide .reg-search { order: -1; flex: 1 1 100%; max-width: none; margin: 0; }
  .reg-tools { gap: .7rem; }
  .reg-chips { flex: 1 1 100%; }
  .reg-chips .chip-wide, .reg-chips .chip-zero { display: none; }
  .reg-search select.is-unset { display: none; }
  .reg-found { margin-top: -.2rem; }
  .reg-foot { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .reg-new { transition: none; } }

/* ---- Run zalos-overdue: Pradelsta, and the totals that follow the filters ------------------------------------------------- */
/* The totals: one line above the cards (parts wrap between, never inside); at a desk the table's last row instead (below). */
/* The foot on a phone (after the cards): "7 žalos · iš viso … · liko … · Išvalyti" (wrapping between the parts), then the download. */
.reg-clear { font-weight: 600; }
.reg-foot-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 0; margin: 0; min-width: 0; }
.reg-foot-n .reg-export { flex-basis: 100%; }
.reg-tot-moka, .reg-tot-liko { display: none; }
.reg-count { color: var(--ink); font-weight: 700; white-space: nowrap; }
.reg-foot-total, .reg-foot-left, .reg-foot-clear { white-space: nowrap; font-variant-numeric: tabular-nums; }
.reg-foot-total, .reg-foot-left { color: var(--ink); font-weight: 700; }
.reg-tot-moka, .reg-tot-liko { justify-self: end; min-width: max-content; color: var(--ink); font-weight: 800; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.reg-tot-moka .none, .reg-tot-liko .none { color: var(--ink2); font-weight: 400; }
@media (min-width: 900px) and (min-height: 501px), (min-width: 900px) and (pointer: fine) {
  .reg-foot-total, .reg-foot-left { display: none; }
  .reg-foot-n .reg-export { flex-basis: auto; }
  .reg-foot { display: grid; grid-template-columns: var(--reg-grid); column-gap: .9rem; align-items: center; min-height: 46px; background: var(--sunk); }
  .reg-foot-n { grid-column: 1 / 7; }
  .reg-export { margin-left: auto; }
  .reg-tot-moka { display: block; grid-column: 7; }
  .reg-tot-liko { display: block; grid-column: 8; }
}
@media (min-width: 900px) and (max-width: 1099px) { .reg-foot { column-gap: .6rem; } }

/* The damage's page: who marked it, when and why under the title, and Panaikinti žymą; the small form the ⋯ menu opens. */
.damage-overdue { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .9rem; margin: .45rem 0 0; color: var(--ink2); font-size: var(--fs-3); }
.damage-overdue p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.damage-overdue-why { color: var(--ink); }
.damage-overdue form { margin: 0; }
.overdue-form { max-width: 36rem; margin: 0 0 1.2rem; }
.overdue-form label { display: block; }
.overdue-form .btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }

/* ---- Run rework-zalos-b: Mokėjimai as ZPay, Mokėjimų istorija, Vairuotojai, a driver, Išrašas ------------------------------ */

/* Mokėjimai's and Mokėjimų istorija's heading: the title (and a line under it), the other page's link at the right. On a phone
   two tabs instead (Skolos, Istorija) and a Vairuotojai button, the bar at the bottom having only Žalos and Mokėjimai. */
.pay-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .4rem 1.5rem; margin: .4rem 0 1.2rem; }
.pay-top h1 { margin: 0; }
.pay-title { min-width: 0; }
.pay-lede { margin: .35rem 0 0; color: var(--ink2); }
.pay-hist-link { padding: .3rem 0; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pay-drivers-link, .pay-tabs { display: none; }

/* Nothing above the table (run zalos-pay-pills: the methods there read as filters): Mokėjimų data is in the footer, each row
   has its own Kaip sumokėta; the oldest-first rule at the right of the heading. */
.pay-cap { display: block; margin: 0 0 .35rem; padding: 0; color: var(--ink2); font-size: var(--fs-2); font-weight: 700; line-height: 1.3; }
.pay-date { display: block; flex: none; margin: 0; font-weight: 400; } /* the label above the box (not beside it, as Apmokėjimui's .pay-date) */
.pay-date input { width: 11rem; margin: 0; }
.pay-rule { float: right; margin: 0 0 0 1rem; color: var(--ink2); font-size: var(--fs-3); font-weight: 400; }

/* Who owes: a card with a row per driver. */
.pay-head { display: block; margin: 0 0 .6rem; font-weight: 700; } /* on the left, the words spaced (not Apmokėjimui's flex row at the right) */
.pay-head-sum { color: var(--ink2); }
.pay-head-n { display: none; }
.pay-head a { margin-left: .6rem; font-weight: 600; }
.pay-table { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.pay-cols { display: none; }
.zpay-rows { list-style: none; margin: 0; padding: 0; }
.pay-row { display: grid; grid-template-columns: minmax(0, 1fr) max-content; grid-template-areas: "who amt" "owed amt" "after all" "way way"; align-items: center; gap: .15rem .8rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.zpay-rows > .pay-row:last-child { border-bottom: 0; }
.pay-row.on, .pay-row:focus-within { background: var(--tint); }
.pay-row.is-over { background: var(--redbg); }
.pay-row .pay-who { grid-area: who; min-width: 0; }
.pay-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.pay-dmg { display: none; }
.pay-dmg a { margin-right: .5rem; color: var(--ink); font-size: var(--fs-3); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.pay-owed { grid-area: owed; color: var(--ink2); font-size: var(--fs-3); }
.pay-row .pay-amt { grid-area: amt; align-self: center; width: 8.5rem; margin: 0; max-width: none; }
.pay-amt .amount-input { margin: 0; text-align: right; scroll-margin: 6rem 0 9rem; }
.pay-row .pay-all { grid-area: all; justify-self: end; margin: .35rem 0 0; white-space: nowrap; }
.pay-after { grid-area: after; min-width: 0; margin-top: .35rem; font-size: var(--fs-3); }
.pay-after .field-err { margin: 0; }
.pay-none-yet { color: var(--ink2); }
.pay-after .pay-plan { display: block; color: var(--ink2); font-size: var(--fs-2); }
.pay-after.is-paid .pay-left { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .6rem; border-radius: 999px; background: var(--okbg); color: var(--ok); font-weight: 700; white-space: nowrap; }
.pay-after.is-over { color: var(--red); font-weight: 700; }
/* A row's Kaip sumokėta (run zalos-pay-pills): two small radios in the field's border, part of the row and never chips; under the
   amount on a phone, stacked in their own column at a desk. */
.pay-way { grid-area: way; display: flex; min-width: 0; max-width: 26rem; margin: .55rem 0 0; border: 1px solid var(--field); border-radius: var(--radius); background: var(--surface); }
.pay-way > label { flex: 1 1 auto; display: flex; align-items: center; gap: .5rem; min-height: 44px; margin: 0; padding: .3rem .7rem; color: var(--ink2); font-size: var(--fs-3); font-weight: 600; line-height: 1.2; cursor: pointer; }
.pay-way > label + label { border-left: 1px solid var(--line); }
.pay-way > label:has(input:checked) { color: var(--ink); font-weight: 700; }
.pay-way input { -webkit-appearance: none; appearance: none; position: static; flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; border: 2px solid var(--field); border-radius: 50%; background: var(--surface); box-shadow: none; opacity: 1; cursor: pointer; }
.pay-way input:checked { border-color: var(--ink); background: radial-gradient(circle closest-side, var(--ink) 55%, transparent 62%); }
.pay-way > label:hover input { border-color: var(--ink); }
.pay-way > label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--radius); }

/* Under the table, stuck to the bottom of the screen: what will be saved (how many of each method), Mokėjimų data and the
   button. .pay-save holds the sum and the button: one box with the date at a desk, the sticky part on a phone. */
.pay-save { display: contents; }
.pay-foot .pay-date { order: 1; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: 0; font-weight: 400; }
.pay-foot .pay-date .pay-cap { margin: 0; }
.pay-foot .pay-date input { width: 11rem; min-height: 48px; margin: 0; }
.pay-foot .pay-date .field-err { flex-basis: 100%; margin: 0; }
.pay-foot [data-pay-save] { order: 2; margin-left: auto; } /* at the right when it wraps under the rest */
.pay-foot { position: sticky; bottom: 0; z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; margin: 1.2rem 0 0; padding: .85rem 0; border-image: linear-gradient(var(--line) 0 1px, var(--surface) 0) fill 0 / / 0 100vmax; }
.pay-sum { flex: 1 1 18rem; min-width: 0; margin: 0; }
.pay-sum-n { margin-right: .6rem; font-size: var(--fs-5); font-weight: 800; }
.pay-sum-when { color: var(--ink2); font-size: var(--fs-3); }
.pay-sum-err { color: var(--red); font-size: var(--fs-3); font-weight: 700; white-space: nowrap; } /* on a line of its own rather than broken */
.pay-keys { margin: 0; color: var(--ink2); font-size: var(--fs-2); white-space: nowrap; }
.pay-keys kbd { display: inline-block; min-width: 1.6rem; padding: .05rem .4rem; border: 1px solid var(--line); border-radius: 6px; background: var(--sunk); color: var(--ink); font: 700 var(--fs-1) var(--font); text-align: center; }
@media (hover: none), (pointer: coarse) { .pay-keys { display: none; } }
.pay-foot .btn-primary[disabled] { opacity: .55; cursor: not-allowed; }

/* Paskutinis įrašas, with Atšaukti įrašą for the whole batch. */
.pay-last { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.2rem; margin: 1rem 0 0; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.pay-last h2 { margin: 0; font-size: var(--fs-4); }
.pay-last-what { flex: 1 1 16rem; min-width: 0; margin: 0; color: var(--ink2); }
.pay-last-undo { display: flex; align-items: center; gap: .8rem; margin: 0; }
.pay-last-left { color: var(--ink2); font-size: var(--fs-3); white-space: nowrap; }

/* A computer: the table of ZPay, Vairuotojas · Atviros žalos · Liko · Mokėjimas · Visa · Po mokėjimo. */
@media (min-width: 900px) and (min-height: 501px), (min-width: 900px) and (pointer: fine) {
  .pay-table { --pay-grid: minmax(9rem, 1.1fr) minmax(0, 1fr) 7.2rem 9.5rem max-content max-content minmax(11rem, 1.4fr); }
  /* the header and every row share the table's columns (subgrid), so one row's wider Visa {sum} doesn't shift the others */
  .pay-table { display: grid; grid-template-columns: var(--pay-grid); }
  .pay-table, .zpay-rows, .pay-cols, .pay-row { column-gap: 1rem; }
  .zpay-rows, .pay-cols, .pay-row { grid-column: 1 / -1; display: grid; grid-template-columns: var(--pay-grid); grid-template-columns: subgrid; }
  .pay-cols, .pay-row { grid-template-areas: none; padding: 0 1.1rem; }
  .pay-cols { min-height: 40px; align-items: center; background: var(--sunk); border-bottom: 1px solid var(--line); color: var(--ink2); font-size: var(--fs-2); font-weight: 700; }
  .pay-cols > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pay-cols .r { text-align: right; }
  .pay-row { min-height: 60px; padding-top: .5rem; padding-bottom: .5rem; row-gap: 0; }
  .pay-row .pay-who, .pay-row .pay-dmg, .pay-row .pay-owed, .pay-row .pay-amt, .pay-row .pay-all, .pay-row .pay-way, .pay-row .pay-after { grid-area: auto; margin: 0; }
  .pay-way { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; border: 0; border-radius: 0; background: none; }
  .pay-way > label { min-height: 24px; padding: 0 .2rem; white-space: nowrap; }
  .pay-way > label + label { border-left: 0; }
  .pay-dmg { display: block; min-width: 0; }
  .pay-owed { color: var(--ink); font-size: var(--fs-4); font-weight: 600; text-align: right; }
  .pay-owed .lbl { display: none; }
  .pay-row .pay-all { justify-self: start; }
  .pay-row .pay-amt { width: auto; justify-self: stretch; } /* as wide as its column, so it ends under Mokėjimas */
}
/* Narrower: Kaip sumokėta has no column of its own (it would squeeze Atviros žalos to nothing), its two radios sit side by side
   on a second line under the amount instead. */
@media (min-width: 900px) and (max-width: 1199px) {
  .pay-table { --pay-grid: minmax(8rem, 1fr) minmax(0, .8fr) 6.6rem 8.5rem max-content minmax(9.5rem, 1.2fr); }
  .pay-table, .zpay-rows, .pay-cols, .pay-row { column-gap: .7rem; }
  .pay-cols, .pay-row { padding-left: .9rem; padding-right: .9rem; }
  .pay-cols > :nth-child(6) { display: none; }
  .pay-row .pay-way { grid-column: 4 / -1; grid-row: 2; flex-direction: row; gap: .2rem 1.2rem; margin: .3rem 0 0; }
  .pay-row .pay-way > label { flex: none; }
}

/* A phone: Mokėjimų data at the top (the footer is hidden until something is typed, and rides above the keyboard: a date there
   would be out of reach first, then cover the rows); a row's method under its amount; Skolos | Istorija as tabs; the sum and
   the button only once an amount is typed, above the bar at the bottom. */
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .pay-top { flex-wrap: nowrap; align-items: center; margin-bottom: .8rem; }
  .pay-top h1 { font-size: var(--fs-6); }
  .pay-lede, .pay-hist-link, .pay-rule { display: none; }
  .pay-drivers-link { display: inline-flex; flex: none; }
  .pay-tabs { display: flex; gap: 0; margin: 0 0 1rem; } /* .tabs: pages, not filters (run zalos-pay-pills) */
  .pay-tabs a { flex: 1 1 0; justify-content: center; }
  .pay-form[data-pay-batch] { display: flex; flex-direction: column; }
  .pay-foot { display: contents; }
  .pay-foot .pay-date { order: -1; display: block; margin: 0 0 1rem; }
  .pay-foot .pay-date .pay-cap { margin: 0 0 .35rem; }
  .pay-foot .pay-date input { width: 100%; max-width: none; } /* not the damage form's 13rem */
  .pay-save { position: sticky; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 1.2rem 0 0; padding: .6rem 0; border-image: linear-gradient(var(--line) 0 1px, var(--surface) 0) fill 0 / / 0 100vmax; }
  .pay-none-yet { display: none; }
  .js .pay-form:not(.is-typed) .pay-save { display: none; }
  .pay-head-wide, .pay-keys { display: none; }
  .pay-head-n { display: inline; }
  .pay-sum { flex-basis: 100%; }
  .pay-sum-when { display: block; font-size: var(--fs-2); }
  .pay-save .btn-primary { flex: 1 1 auto; }
}

/* Mokėjimų istorija: one row of controls (periods, Kita… with the dates); the payments as a headed table from 900 px, two lines
   grouped by day below that. A driver's page shows theirs the same way (without the Vairuotojas column). */
.hist-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1rem; } /* the chips' own gap: Kita… is the next chip */
.hist-chips { margin: 0; }
.hist-dates > summary { list-style: none; cursor: pointer; }
.hist-dates > summary::-webkit-details-marker { display: none; }
.hist-dates:not([open]) > :not(summary) { display: none; } /* closed means gone, whatever the browser does with details */
.hist-dates[open] { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.hist-range { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: 0 0 0 .4rem; vertical-align: middle; }
.hist-range label { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.hist-range input { width: auto; min-height: 40px; margin: 0; padding: .3rem .6rem; }
.hist-empty { margin: .4rem 0 0; text-align: left; }
.hist-table { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.hist-cols { display: none; }
.hist-rows { list-style: none; margin: 0; padding: 0; }
.hist-rows > li { border-bottom: 1px solid var(--line); }
.hist-rows > li:last-child { border-bottom: 0; }
.hist-day { padding: .4rem 1rem; background: var(--sunk); color: var(--ink2); font-size: var(--fs-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.hist-row { position: relative; display: grid; grid-template-columns: max-content minmax(0, 1fr); grid-template-areas: "sum driver" "meta meta"; align-items: baseline; column-gap: .6rem; padding: .5rem 1rem; color: var(--ink); text-decoration: none; }
.hist-row:hover { background: var(--tint); }
.hist-row .h-date { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* the day's band shows it; read aloud still */
.hist-row .h-sum { grid-area: sum; font-weight: 800; }
.hist-row .h-driver { grid-area: driver; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hist-row .h-meta { grid-area: meta; display: flex; min-width: 0; color: var(--ink2); font-size: var(--fs-2); white-space: nowrap; }
/* one line: each part shortened with its own …, who entered it first, the damage's number never (zalos-phone-106: two lines a payment) */
.hist-row .h-meta > * { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hist-row .h-meta > .h-dmg { flex: none; }
.hist-row .h-meta > .h-by { flex-shrink: 100; }
.hist-row .h-meta > :empty { display: none; }
.hist-row .h-meta > * + *::before { content: '·'; padding: 0 .3em; }
.hist-row .plate { display: inline; border: 0; padding: 0; background: none; }
.no-driver .hist-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "sum" "meta"; }
.hist-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; margin: 0; padding: .7rem 1rem; border-top: 1px solid var(--line); color: var(--ink2); font-size: var(--fs-3); }
.hist-foot a { font-weight: 600; }
@media (min-width: 900px) and (min-height: 501px), (min-width: 900px) and (pointer: fine) {
  .hist-table { --hist-grid: 6.2rem 7rem minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, .9fr); }
  .hist-table.no-driver { --hist-grid: 6.2rem 7rem minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, .9fr); }
  .hist-cols, .hist-row, .no-driver .hist-row { display: grid; grid-template-columns: var(--hist-grid); grid-template-areas: none; column-gap: .9rem; align-items: center; padding: 0 1.1rem; }
  .hist-cols { min-height: 40px; background: var(--sunk); border-bottom: 1px solid var(--line); color: var(--ink2); font-size: var(--fs-2); font-weight: 700; }
  .hist-cols > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hist-cols .r, .hist-row .h-sum { text-align: right; }
  .hist-day { display: none; }
  .hist-rows > li:has(+ .hist-day) { border-bottom: 1px solid var(--line); }
  .hist-row { min-height: 44px; padding-top: .3rem; padding-bottom: .3rem; }
  .hist-row .h-sum, .hist-row .h-driver, .hist-row .h-meta, .no-driver .hist-row .h-sum { grid-area: auto; }
  .hist-row .h-date { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .hist-row .h-sum { font-weight: 700; }
  .hist-row .h-meta { display: grid; grid-column: span 3; grid-template-columns: subgrid; align-items: center; } /* its three cells in the table's columns, with a box of its own (not display: contents) */
  .hist-row .h-meta > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-3); }
  .hist-row .h-meta > :empty { display: block; }
  .hist-row .h-meta > * + *::before { content: none; }
  .hist-row .h-method, .hist-row .h-by { color: var(--ink2); }
  .hist-row .h-dmg { color: var(--ink); }
  .hist-foot { padding: .7rem 1.1rem; }
}
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .hist-dates { flex: 1 1 100%; } /* Kita… under the chips, where it stays when open */
  .hist-range { display: grid; flex: 1 1 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: .1rem 0 0; }
  .hist-range label { flex-direction: column; align-items: stretch; gap: .25rem; min-width: 0; }
  .hist-range input { width: 100%; min-height: 44px; }
}

/* ⋯: a button that opens a short menu (Vairuotojai's import; a driver's Išrašas, Excel, Išjungti). */
.more-menu { position: relative; flex: none; }
.more-menu > summary { list-style: none; min-width: 48px; justify-content: center; padding: 0 .8rem; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu:not([open]) > .more-list { display: none; } /* closed means gone, whatever the browser does with details */
.more-list { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 30; display: flex; flex-direction: column; min-width: 14rem; padding: .35rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / .16); }
.more-list form { margin: 0; }
.more-list a, .more-list button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 .8rem; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 600 var(--fs-3) var(--font); text-align: left; text-decoration: none; white-space: nowrap; cursor: pointer; }
.more-list a:hover, .more-list button:hover, .more-list a:focus-visible, .more-list button:focus-visible { background: var(--tint); }

/* Vairuotojai: who owes most first; a table from 900 px (Vardas · Kodas · Atviros žalos · Skola), on a phone the name and a
   grey line "skola … · n atviros". */
.drv-top h1 .h-count { font-size: var(--fs-5); }
.drv-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.drv-new svg { flex: none; }
.drv-table { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.drv-cols { display: none; }
.drv-rows { list-style: none; margin: 0; padding: 0; }
.drv-rows > li { border-bottom: 1px solid var(--line); }
.drv-rows > li:last-child { border-bottom: 0; }
.drv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name go" "meta go"; align-items: center; column-gap: .6rem; min-height: 56px; padding: .55rem 1rem; color: var(--ink); text-decoration: none; }
.drv-row::after { content: '›'; grid-area: go; color: var(--ink2); font-size: var(--fs-5); line-height: 1; }
.drv-row:hover { background: var(--tint); }
.drv-row .d-name { grid-area: name; display: flex; align-items: center; gap: .5rem; min-width: 0; font-weight: 700; }
.d-name-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-name .pill, .d-name .badge { flex: none; }
.drv-row.off .d-name-t { color: var(--ink2); }
.drv-row .d-code, .drv-row .d-open, .drv-row .d-owed { display: none; }
.drv-row .drv-meta { grid-area: meta; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); font-size: var(--fs-3); }
.drv-row .drv-meta:empty { display: none; }
.drv-row .none { color: var(--ink2); font-weight: 400; }
@media (min-width: 900px) and (min-height: 501px), (min-width: 900px) and (pointer: fine) {
  .drv-table { --drv-grid: minmax(0, 1.8fr) minmax(0, 1fr) 10.5rem 9rem; } /* Открытые повреждения whole */
  .drv-cols, .drv-row { display: grid; grid-template-columns: var(--drv-grid); grid-template-areas: none; column-gap: .9rem; align-items: center; padding: 0 1.1rem; }
  .drv-cols { min-height: 40px; background: var(--sunk); border-bottom: 1px solid var(--line); color: var(--ink2); font-size: var(--fs-2); font-weight: 700; }
  .drv-cols > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .drv-cols .r { text-align: right; }
  .drv-row { min-height: 46px; padding-top: .3rem; padding-bottom: .3rem; }
  .drv-row::after { content: none; }
  .drv-row .d-name { grid-area: auto; }
  .drv-row .d-code, .drv-row .d-open, .drv-row .d-owed { display: block; min-width: 0; }
  .drv-row .drv-meta { display: none; }
  .drv-row .d-code { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .drv-row .d-open, .drv-row .d-owed { text-align: right; }
  .drv-row .d-owed.is-owed { font-weight: 800; }
}
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .drv-top h1 { font-size: var(--fs-6); white-space: nowrap; }
  .drv-new { width: 48px; min-width: 48px; padding: 0; justify-content: center; }
  .drv-new span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* A driver: the name, then three tiles (Skola with Įvesti mokėjimą, Laukia sąskaitos, Atviros), then Žalos, Mokėjimai, Istorija. */
.drv-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .6rem 1rem; margin: .2rem 0 1.1rem; }
.drv-title { min-width: 0; }
.drv-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin: 0; overflow-wrap: anywhere; }
.drv-head h1 .pill { font-size: var(--fs-3); letter-spacing: 0; }
.drv-sub { margin: .25rem 0 0; color: var(--ink2); }
.drv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 0 0 1.4rem; }
.drv-tile { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-width: 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.drv-tile-k { color: var(--ink2); font-size: var(--fs-2); font-weight: 700; }
.drv-tile-v { font-size: var(--fs-6); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.drv-tile-d { color: var(--ink2); font-size: var(--fs-3); }
.drv-tile-owed .btn { margin-top: .5rem; }
.drv-card { margin: 0 0 1.4rem; }
/* A driver's page lists only their damages: no Vairuotojas column, and on a card the date right after the plate. */
.drv-damages .reg-row { grid-template-areas: "nr nr nr stage" "part part part part" "car date date amt" "why why why why"; }
@media (min-width: 900px) and (min-height: 501px), (min-width: 900px) and (pointer: fine) {
  .drv-damages .reg-table { --reg-grid: 7.4rem var(--reg-date) minmax(0, 1.25fr) minmax(0, 2.3fr) var(--reg-stage) 6.6rem 6.6rem; }
  .drv-damages .reg-row { grid-template-areas: none; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .drv-damages .reg-table { --reg-grid: 7rem var(--reg-date) minmax(0, .8fr) minmax(0, 2.2fr) var(--reg-stage) 6.2rem 6.2rem; }
}
.drv-card > h2 { margin: 0 0 .6rem; font-size: var(--fs-5); }
.drv-history .activity { padding: .2rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .drv-tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .drv-tile-owed { grid-column: 1 / -1; }
  .drv-tile-owed .btn { align-self: stretch; }
  .drv-tile:not(.drv-tile-owed) .drv-tile-v { font-size: var(--fs-5); }
}

/* Išrašas: a table on a computer and on paper, a card per damage on a phone; the company at the top and a signature line on
   paper, with page numbers. */
.print-only { display: none; }
.st-meta { color: var(--ink2); }
.st-print-phone { display: none; }
.statement .st-repair h2 .num { font-weight: 800; }
.st-repair-list { list-style: none; margin: 0; padding: 0; }
.st-repair-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
.st-repair-sum { margin-left: auto; color: var(--ink2); }
.st-repair-list .nw { white-space: nowrap; }
.st-cards, .st-pay-list { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 640px) {
  .statement-table { display: none; }
  .st-cards { display: flex; flex-direction: column; gap: .6rem; }
  .st-card { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .st-card p { margin: 0; }
  .st-card-top { display: flex; justify-content: space-between; gap: .5rem; }
  .st-card-date { color: var(--ink2); }
  .st-card-what { color: var(--ink2); font-size: var(--fs-3); overflow-wrap: anywhere; }
  .st-card p.st-card-money { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .35rem; font-size: var(--fs-3); }
  .st-card-total { background: var(--tint); }
  .st-pay-list { display: block; }
  .st-pay-list li { padding: .5rem .2rem; border-bottom: 1px solid var(--line); }
  .st-repair-sum { margin-left: 0; }
  .st-excel, .st-print-wide { display: none; }
  .st-print-phone { display: inline; }
  .st-head h1 { overflow-wrap: anywhere; }
}
@media print {
  .print-only { display: block !important; }
  .st-page { page: statement; }
  .print-head { margin: 0 0 6mm; padding: 0 0 3mm; border-bottom: 1px solid #000; font-size: 10pt; }
  .sign-line { display: grid !important; gap: 9mm; margin-top: 14mm; font-size: 10pt; break-inside: avoid; }
  .sign-line p { margin: 0; }
  .sign-blank { display: inline-block; width: 70mm; margin: 0 2mm; border-bottom: 1px solid #000; }
  .sign-hint { color: #555; font-size: 8.5pt; }
  .st-cards, .st-pay-list { display: none !important; }
}
@page statement { @bottom-right { content: counter(page) " / " counter(pages); font-size: 9pt; } }

/* Run rework-zalos-c: sign-in and its code page (zalos-desktop-17/18, zalos-phone-13/15): one left edge, one filled button,
   the other ways in as quiet links; the footer as wide as the form. The team list's header (Paskutinį kartą); payment history
   on a phone without who entered it. */
.login .login-alt { margin: .4rem 0 0; }
.login .linkbtn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; text-decoration: underline; text-underline-offset: .2em; font-weight: 700; } /* on a phone too: no hover there (review R1.5 of run rework-zalos-c) */
.login-more { display: flex; flex-direction: column; align-items: flex-start; margin-top: .4rem; }
.login-more form { margin: 0; }
.login .code-input { height: 48px; min-height: 48px; padding: 0 .9rem; font: 700 var(--fs-5) var(--font); letter-spacing: .35em; text-align: left; }
body:has(main .login) .help-foot { max-width: 460px; padding-left: 1rem; padding-right: 1rem; border-top: 0; text-align: left; }
@media (scripting: enabled) { .inline-form .send-btn { display: none; } }  /* the select sends itself (select[data-autosubmit]) */
.people-head { display: none; }
@media (min-width: 900px) {
  .people-grid > .people-head { display: block; }
  .people-head .row { min-height: 0; padding-top: .45rem; padding-bottom: .45rem; color: var(--ink2); font-size: var(--fs-2); font-weight: 700; }
  .people-grid .last-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 899.98px) { .hist-row .h-meta > .h-by { display: none; } }  /* no "·" left at the line's end */
.row.static > form { flex: none; }
.row.static > form .btn { white-space: nowrap; }  /* Atsijungti čia on one line beside the device */

/* A damage as ZDamage and ZPhoneDamage (run rework-zalos-d): the top with ⋯, the number with its stage, what was damaged, one
   line about the car, driver and date, the progress (a stepper with dates on a computer, four bars on a phone); the Dabar card
   and Pinigai with a paid bar; photos as tiles; facts in a grid; documents as file rows with the sum on the right; payments
   in columns; Istorija time first. The save's message is a toast at the top. */
.damage-top-end { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.damage-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }  /* Registruoti kitą, Pažymėti kaip pradelstą */
/* On a phone: Žalos, ‹ › and ⋯ on the first line, the page's own buttons on a line of their own under them (run zalos-overdue-button). */
@media (max-width: 640px) {
  .damage-top { row-gap: .5rem; }
  .damage-top-end { display: contents; }
  .damage-top-end > :is(.damage-step, .more-menu):not(.damage-step ~ .more-menu) { margin-left: auto; }
  .damage-acts { order: 1; flex-basis: 100%; justify-content: flex-start; }
}
.damage-step a { justify-content: center; min-width: 44px; font-size: var(--fs-5); }
.damage-step .off { display: inline-flex; justify-content: center; min-width: 44px; font-size: var(--fs-5); }
.damage-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem 2rem; align-items: end; margin-bottom: 1.1rem; }
.damage-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin: .3rem 0 .2rem; }
.damage-head h1 .pill { font-size: var(--fs-3); letter-spacing: 0; }
.damage-part { margin: 0 0 .3rem; font-size: var(--fs-4); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.damage-sub { margin: 0; line-height: 1.6; color: var(--ink2); font-size: var(--fs-3); }
.damage-sub a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.damage-sub .sep { margin: 0 .15rem; }
.damage-sub .damage-when { white-space: nowrap; }
.others-chip { display: inline-block; margin-left: .3rem; padding: 0 .55rem; border-radius: 999px; background: var(--honeybg); color: var(--honey) !important; font-size: var(--fs-2); font-weight: 700; line-height: 1.6; text-decoration: none !important; white-space: nowrap; }
.stages-line { min-width: 0; }
.stages { margin: 0; }
.stages li { gap: .15rem; }
.stage-date { font-size: var(--fs-1); color: var(--muted); font-weight: 500; }
.stages-phone { display: none; }
.stages-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: .2rem 0 .4rem; }
.stages-bars span { height: 6px; border-radius: 3px; background: var(--line); }
.stages-bars span.on { background: var(--leaf); }
.stages-phone p { margin: 0; font-size: var(--fs-2); color: var(--ink2); }
.stages-phone strong { color: var(--ink); }
@media (min-width: 1100px) { .damage-head { grid-template-columns: minmax(0, 1fr) minmax(24rem, 30rem); } }
@media (max-width: 720px) {
  .damage-head .stages { display: none; }
  .stages-phone { display: block; }
}
.flash-toast { position: fixed; z-index: 45; top: calc(var(--sticky-top, 4.8rem) + .5rem); left: 50%; transform: translateX(-50%); width: max-content; max-width: min(36rem, calc(100vw - 2rem)); margin: 0; background: linear-gradient(var(--okbg), var(--okbg)), var(--surface); box-shadow: 0 10px 30px rgb(0 0 0 / .18); transition: opacity .35s; }
.flash-toast.flash-warn { background: linear-gradient(var(--honeybg), var(--honeybg)), var(--surface); }
.flash-toast.flash-err { background: linear-gradient(var(--redbg), var(--redbg)), var(--surface); }
.flash-toast.flash-going { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .flash-toast { transition: none; } }
/* The Dabar card: a "Dabar" tag over the step; in dark a quiet line with a honey edge, not a bright frame. */
.now-tag { display: inline-block; margin: 0 0 .35rem; padding: 0 .55rem; border-radius: 999px; background: var(--honeybg); color: var(--honey); font-size: var(--fs-1); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.now-card > h2 { margin: 0 0 .8rem; }
.now-card .damage-form { gap: .75rem; }
.now-closed { margin: 0; font-weight: 700; }
.now-reason { margin: 0 0 .8rem; overflow-wrap: anywhere; }
.now-card .now-sums { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1rem; margin: 0; }
.now-card .now-sums dd { text-align: right; font-weight: 700; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; gap: .75rem; } /* a two-line label keeps the fields level */
@media (min-width: 560px) { .field-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.field-pair input { max-width: none !important; }
.finish-form:has(input[name=nopay]:checked) .share-row { display: none; }
.amount-field.has-chip > .amount-input { padding-right: 5.2rem; }
.amount-field.has-chip > .amount-eur { right: 4.1rem; }
.amount-chip { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--sunk); color: var(--ink); font: 700 var(--fs-2) var(--font); cursor: pointer; }
.amount-chip:hover { background: var(--tint); }
.pay-closes { margin: .35rem 0 0; color: var(--ok); font-weight: 700; }
.seg-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.seg-field > legend { padding: 0 0 .35rem; font-weight: 600; }
/* A form choice (run zalos-pay-pills): Kaip sumokėta on a damage's payment, a document's kind and Nauja žala's Kada
   įvyko are radios in the field's look (its border and corners, a visible radio mark), never a chip: chips filter a list, a
   choice is saved with its form. */
.seg, .when-chips { display: grid; gap: .5rem; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
.seg { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 26rem; }
.seg-opt, .when-chips .chip { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: .55rem; min-width: 0; min-height: 48px; margin: 0; padding: .35rem .9rem .35rem .75rem; border: 1px solid var(--field); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: var(--fs-3); font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer; }
.seg-opt > input, .when-chips .chip > input { -webkit-appearance: none; appearance: none; position: static; flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; border: 2px solid var(--field); border-radius: 50%; background: var(--surface); box-shadow: none; opacity: 1; cursor: pointer; } /* drawn, so it's the same in light and dark */
.seg-opt > input:checked, .when-chips .chip > input:checked { border-color: var(--ink); background: radial-gradient(circle closest-side, var(--ink) 58%, transparent 64%); }
.seg-opt:hover, .when-chips .chip:hover { border-color: var(--ink); }
.seg-opt:has(input:checked), .when-chips .chip:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.seg-opt:has(input:focus-visible), .when-chips .chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 640px), (pointer: coarse) and (max-height: 500px) {
  .seg-opt, .when-chips .chip { padding: .35rem .6rem; }
}
.money-card .now-sums dd { flex-wrap: nowrap; }
.money-bar { display: block; width: 100%; height: 8px; margin: .9rem 0 0; border: 0; border-radius: 4px; background: var(--line); overflow: hidden; -webkit-appearance: none; appearance: none; }
.money-bar::-webkit-progress-bar { background: var(--line); border-radius: 4px; }
.money-bar::-webkit-progress-value { background: var(--leaf); border-radius: 4px; }
.money-bar::-moz-progress-bar { background: var(--leaf); border-radius: 4px; }
@media (prefers-color-scheme: dark) {
  .now-card:not(.is-done) { border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--honey), var(--shadow); }
}
/* A phone held sideways: the sums don't stretch across it. */
@media (max-width: 1099px) { .damage-now .now-sums { max-width: 36rem; } }
/* The order: on a phone as in the page (Dabar, Pinigai, then photos, facts, documents, payments, history); on a computer
   the facts first in the left column, as ZDamage. */
.damage-main { display: flex; flex-direction: column; min-width: 0; }
@media (min-width: 1100px) { .damage-main > #faktai { order: -1; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-head > h2 { margin: 0 0 .7rem; font-size: var(--fs-5); }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .8rem 1.2rem; margin: 0; }
.facts-grid > div { min-width: 0; }
.facts-grid dt { font-size: var(--fs-2); color: var(--muted); }
.facts-grid dd { margin: .1rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.facts-card { position: relative; }
.facts-edit { margin-top: .9rem; }
.facts-edit > summary { position: absolute; top: .85rem; right: 1.1rem; } /* Taisyti in the card's head, as ZDamage */
.facts-card > h2 { padding-right: 9rem; }
.facts-edit > summary { list-style: none; display: inline-flex; cursor: pointer; }
.facts-edit > summary::-webkit-details-marker { display: none; }
.facts-edit[open] > summary { margin-bottom: .7rem; }
.facts-edit:not([open]) > form { display: none; }
.damage-form .field-pair input[type=date] { max-width: none; }
/* Photos: ~120 px tiles, no names (the viewer says them), ⋯ in a corner; the last tile adds more. */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, 120px); gap: .6rem; margin: 0; }
.photo-tile { position: relative; display: block; padding: 0; border: 0; background: none; }
.photo-tile .file-thumb { width: 120px; height: 120px; border-radius: 12px; border: 1px solid var(--line); }
.photo-tile .file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile.off .file-thumb { opacity: .6; }
.tile-menu { position: absolute; top: 4px; right: 4px; }
.tile-menu > summary { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0; border-radius: 10px; background: rgb(0 0 0 / .45); color: #ffffff; font-weight: 800; }
.tile-menu > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.tile-menu .more-list { min-width: 10rem; }
.tile-restore { position: absolute; left: 6px; right: 6px; bottom: 6px; margin: 0; }
.tile-restore .btn { width: 100%; }
/* Pridėti and Fotografuoti are cells of the photo grid themselves (the li and its form draw nothing), each one box: the dashed line
   and the fill on the tile (run zalos-field). The picked list, a message and the button take a row of their own. */
.photo-add, .photo-add form { display: contents; }
.photo-add form > :not(.photo-add-tile) { grid-column: 1 / -1; }
.photo-add-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; width: 120px; height: 120px; border: 2px dashed var(--field); border-radius: 12px; background: var(--sunk); color: var(--ink2); font-weight: 700; font-size: var(--fs-3); text-align: center; cursor: pointer; }
.photo-add-tile:hover { background: var(--sunk) linear-gradient(var(--tint), var(--tint)); }
.photo-add-tile > svg { flex: none; }
.photo-add-tile:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.photo-add-plus { font-size: var(--fs-6); line-height: 1; }
@media (hover: hover) and (pointer: fine) { .photo-cam:not([data-cam-on]) { display: none; } } /* a computer: only with a camera (data-cam-on, portal.js) */
.photo-add-tile > input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.photo-add .field-err, .photo-add .flash-err { margin: .4rem 0 0; }
@media (max-width: 560px) {
  /* .5rem: three photos of 100 px or more on a 390 px phone (the gap Nauja žala's rules gave it before run zalos-field) */
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .photo-tile .file-thumb, .photo-add-tile { width: 100%; height: auto; aspect-ratio: 1; }
}
/* Documents: a file row (opening in the viewer), the sum on the right; one an invoice replaced, greyed with its tag. */
.doc-list { gap: .4rem; }
.doc-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .3rem .8rem; }
.doc-item .file-thumb { width: 44px; height: 52px; }
.doc-item .file-body { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; }
.doc-item .file-name { font-weight: 700; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 560px) { .doc-item { grid-template-columns: auto minmax(0, 1fr) auto; } .doc-item .todo-form { grid-column: 2 / -1; } }
.doc-item .muted { font-size: var(--fs-2); }
.doc-sum { font-weight: 700; text-align: right; }
.doc-item.uncounted > :not(.todo-form) { color: var(--muted); }
.doc-item.uncounted .doc-sum .num { text-decoration: line-through; }
.doc-item .todo-form { margin: 0; }
@media (max-width: 560px) {
  .doc-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .doc-item .todo-form { grid-column: 2 / -1; justify-self: start; }
}
.jobs-fold { margin: .8rem 0 0; }
.jobs-fold > summary { cursor: pointer; font-weight: 700; color: var(--ink2); }
.jobs-fold:not([open]) > :not(summary) { display: none; }
.add-doc { margin-top: .8rem; }
.add-doc:not([open]) > form { display: none; }
/* Payments: date · sum · how · the action, in columns. */
.pay-rows { list-style: none; margin: 0; padding: 0; }
.pay-line { display: grid; grid-template-columns: 6.4rem 7.5rem minmax(0, 1fr) auto; align-items: center; gap: .2rem .9rem; min-height: 48px; padding: .3rem .5rem; border-bottom: 1px solid var(--line); border-radius: 8px; }
.pay-line:last-child { border-bottom: 0; }
.pay-line .pay-sum { text-align: right; }
.pay-line .pay-how { min-width: 0; overflow-wrap: anywhere; }
.pay-line .todo-form { margin: 0; }
.pay-line.off { color: var(--muted); }
.pay-line.off .pay-sum { text-decoration: line-through; font-weight: 500; }
.pay-line.is-new { background: var(--okbg); }
@media (max-width: 560px) {
  /* date and amount on the first line, how and Atšaukti on the second: at 360 px a worst-case amount left the date 77 px of
     its 93 (run rework-zalos-e) */
  .pay-line { grid-template-columns: minmax(max-content, 1fr) auto; }
  .pay-line .pay-sum { grid-column: 2; grid-row: 1; }
  .pay-line .pay-how { grid-column: 1; grid-row: 2; font-size: var(--fs-2); }
  .pay-line .todo-form, .pay-line > span:empty { grid-column: 2; grid-row: 2; justify-self: end; }
}
/* Istorija: a note for the team on top, then time · what happened; older lines behind Rodyti visus. */
.note-form { display: flex; gap: .5rem; margin: 0 0 .9rem; }
.note-form input { flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; }
.note-form .btn { flex: none; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: baseline; gap: .1rem 1rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: var(--fs-3); }
.log-row time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-text { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .log-row { grid-template-columns: minmax(0, 1fr); } }
.log-more > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--ink2); border-top: 1px solid var(--line); }
.log-more:not([open]) > .log-list { display: none; }
.log-more[open] > summary { display: none; }
@media print { .flash-toast, .note-form, .more-menu, .add-doc, .facts-edit, .photo-add { display: none !important; } }
/* A repair's dates may take two lines in a narrow facts cell (1100 px); a date itself never breaks (no break after a hyphen before digits). */
.facts-grid dd.num, .facts-grid dd .num { white-space: normal; }
/* The team note on a phone: the field across the card (its placeholder whole in Russian), Pridėti under it. */
@media (max-width: 560px) { .note-form { flex-wrap: wrap; } .note-form input { flex-basis: 100%; } }

/* Nauja žala as ZPhoneNew draws it (run rework-zalos-e; views/damages/new.php): one 560 px column of fields at a desk with the
   car's open damages to its right (Šiam automobiliui), one column on a phone. The car and the driver are the portal's lists,
   the dates three chips, the photos two buttons on one row and a grid of squares, the button with who gets the email under it. */
.nw { white-space: nowrap; }
.new-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 1rem; margin: 0 0 1rem; }
.new-head h1 { margin: 0; }
.new-cancel { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; color: var(--ink2); font-weight: 600; text-decoration: none; }
.new-cancel > span { font-size: var(--fs-5); line-height: 1; }
.draft-note { grid-column: 2; margin: 0; color: var(--muted); font-size: var(--fs-2); }
.new-errs { max-width: 35rem; }
.new-errs p { margin: 0; }
.new-errs ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.new-errs a { color: inherit; }
.new-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: start; }
.new-main { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.new-field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.new-field > legend { padding: 0 0 .4rem; font-weight: 600; font-size: var(--fs-3); }
.new-field .field-err { margin: 0; }
.new-damage.damage-form input[type=text]:not(.amount-input), .new-damage textarea { width: 100%; max-width: none; margin: 0; } /* the column's width, not .damage-form's 32rem */
.new-damage textarea { min-height: 4.5rem; resize: vertical; }
.new-damage ::placeholder { color: var(--field); font-weight: 400; opacity: 1; letter-spacing: normal; text-transform: none; }
.combo { position: relative; }
.combo[hidden] { display: none; }
.combo-list {
  position: absolute; left: 0; right: 0; z-index: 30; max-height: 20rem; overflow-y: auto; margin: .25rem 0 0; padding: .25rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .35);
}
.combo-option { display: flex; flex-direction: column; justify-content: center; min-height: 2.75rem; padding: .35rem .7rem; border-radius: 8px; cursor: pointer; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.combo-option[aria-selected="true"], .combo-option:active { background: var(--bg); box-shadow: inset 3px 0 0 var(--accent); }
.combo-main { font-weight: 600; overflow-wrap: anywhere; }
#f-plate-list .combo-main { font-variant-numeric: tabular-nums; }
.combo-sub { color: var(--muted); font-size: var(--fs-2); }
.combo-option.is-off { cursor: default; color: var(--muted); }
.combo-option.is-off .combo-main { font-weight: 500; }
.car-found { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; min-height: 48px; padding: .3rem .4rem .3rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.car-found[hidden] { display: none; }
.car-found .plate { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.car-model { flex: 1 1 auto; min-width: 0; color: var(--ink2); }
.car-found .linkbtn { min-height: 40px; padding: 0 .5rem; }
.dup-warn { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; padding: .7rem .9rem; border-radius: var(--radius); background: var(--honeybg); box-shadow: inset 3px 0 0 var(--honey); }
.dup-warn[hidden] { display: none; }
.dup-warn:focus { outline: 3px solid color-mix(in srgb, var(--honey) 55%, transparent); outline-offset: 2px; }
.dup-title { margin: 0; font-weight: 600; }
.dup-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .2rem; }
.dup-list a { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.add-driver { align-self: flex-start; min-height: 32px; font-weight: 600; }
.new-driver { margin: 0; }
.when-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; max-width: 26rem; }
.when:not(:has(input[value="other"]:checked)) .when-date { display: none; }
.when-date .date-field { max-width: 16rem; }
.pick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; max-width: 26rem; }
.pick-row label.btn { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; border: 1px solid var(--field); color: var(--ink); white-space: normal; text-align: center; line-height: 1.2; }
.pick-row label.btn > svg { flex: none; }
.pick-row label.btn:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
@media (scripting: enabled) { .pick-row input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; } }
@media (hover: hover) and (pointer: fine) { .pick-row label.btn.pick-camera:not([data-cam-on]) { display: none; } .pick-row:not(:has([data-cam-on])) { grid-template-columns: minmax(0, 1fr); max-width: 13rem; } } /* no camera at this desk: one button */
/* Nauja žala's squares only ([data-photo-grid]): the damage page's photo list is a .photo-grid of its own, and these rules once gave its
   Pridėti cell a 133 px grey square around the 120 px dashed tile (run zalos-field) */
.photo-grid[data-photo-grid] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; max-width: 26rem; margin: 0; padding: 0; list-style: none; }
.photo-grid[data-photo-grid][hidden] { display: none; }
[data-photo-grid] li { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--sunk); }
[data-photo-grid] img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-photo-grid] li.is-going img { opacity: .6; }
.photo-x { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; border-radius: 0 0 0 10px; background: rgba(0, 0, 0, .55); color: #fff; font: inherit; font-size: var(--fs-5); line-height: 1; cursor: pointer; }
.photo-x:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.photo-bar { position: absolute; left: .4rem; right: .4rem; bottom: .4rem; width: auto; height: 6px; border: 0; border-radius: 3px; background: rgba(0, 0, 0, .3); -webkit-appearance: none; appearance: none; }
.photo-bar::-webkit-progress-bar { background: rgba(0, 0, 0, .3); border-radius: 3px; }
.photo-bar::-webkit-progress-value { background: var(--leaf); border-radius: 3px; }
.photo-bar::-moz-progress-bar { background: var(--leaf); border-radius: 3px; }
.new-side { display: none; }
.new-side h2 { margin: 0 0 .6rem; font-size: var(--fs-4); }
.new-side p { margin: 0; }
.side-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.side-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.side-list a { font-weight: 700; font-variant-numeric: tabular-nums; }
.side-part { flex: 1 1 100%; color: var(--ink2); overflow-wrap: anywhere; }
.mail-line { margin: .45rem 0 0; color: var(--muted); font-size: var(--fs-2); text-align: center; }
.damage-bar .mail-line { text-align: left; }
@media (min-width: 721px) { .new-damage .damage-bar { margin-top: 1.5rem; } }
@media (min-width: 1100px) {
  .new-grid { grid-template-columns: 35rem minmax(0, 22rem); }
  .new-side { display: block; position: sticky; top: var(--sticky-top, 5rem); }
}
@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) {
  .damage-bar .mail-line { margin-top: .35rem; text-align: center; }
  body:has(.new-damage) .help-foot { display: none; } /* no help footer on a form (zalos-phone-56) */
  body:has(.new-damage) main.page { padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px)); } /* main.page: beats the bottom menu's padding */
  /* the fixed bar never covers the field being typed in (zalos-phone-58), nor a damage's last field */
  html:has(.damage-bar) { scroll-padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }
  .damage-form :is(input, textarea, select, fieldset) { scroll-margin-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }
  body:has(.new-damage :is(input[type=text], textarea):focus) .damage-bar { visibility: hidden; }
  /* the title in the middle of the screen, not of the room right of × Atšaukti: equal side columns. A title too long to fit between
     two of them (Russian at 360 px) breaks onto two centred lines instead of moving right (run zalos-field). */
  .new-head { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .new-cancel { justify-self: start; }
  .new-head h1 { grid-column: 2; max-width: calc(100vw - 2rem - 2 * 5rem); font-size: var(--fs-5); text-align: center; text-wrap: balance; }
  .draft-note { grid-column: 1 / -1; text-align: center; }
  .when-date .date-field { max-width: none; } /* as wide as the other fields (zalos-phone-61) */
}
/* A phone at 360 px in Russian (run rework-zalos-e): "осталось 11 111,11 €" and "долг 11 111,11 €" break after the word, never
   inside the amount (money() joins it with no-break spaces), instead of pushing the row past its card. */
@media (max-width: 400px) {
  .reg-row .c-amt { min-width: min-content; text-align: right; } /* not 0: its column's minimum is this (0 let it run over the date) */
  .reg-row .c-amt .num, .pay-row .pay-owed { white-space: normal; }
}
/* Tokios žalos nėra (run rework-zalos-e, zalos-desktop-23): the register's search on one row, then Visos žalos */
.find-damage { display: flex; gap: .5rem; max-width: 30rem; margin: 1.25rem auto 0; }
.find-damage input { flex: 1 1 auto; min-width: 0; margin: 0; }
.find-damage .btn { flex: none; margin: 0; }
@media (max-width: 380px) {
  .find-damage { flex-wrap: wrap; }
  .find-damage input, .find-damage .btn { flex: 1 1 100%; }
}

/* --- rework-portal-team-a: the team's header (PApzvalga): logo, the menu on the left, the search on the right, the avatar.
   Below 1280 px the search folds into its magnifier (it opens over the bar while used); below 1100 px the menu moves into
   the avatar's panel, which shows a menu icon there (a sheet from the bottom on a phone). --- */
.topbar.team-bar { flex-wrap: nowrap; justify-content: flex-start; gap: .75rem; }
.team-bar .brand { flex: none; }
.team-bar .team-nav { flex: none; margin-left: .5rem; margin-right: auto; overflow: visible; gap: .1rem; }
.team-nav a { display: inline-flex; align-items: center; gap: .35rem; min-height: 40px; padding: .4rem .7rem; }
.team-nav .nav-more { display: block; }
.team-nav .nav-more-list a { min-height: 44px; padding: 0 .8rem; border-radius: 8px; }
.nav-n { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem; border-radius: 999px;
  background: var(--btn); color: var(--btnink); font-size: var(--fs-1); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.team-bar .qs { flex: 0 1 280px; min-width: 9rem; max-width: 280px; margin-left: auto; } /* the menu keeps its width (ru is the widest); the search gives way */
.team-bar .qs ~ .me-menu { margin-left: 0; }
.me-team .avatar-menu { display: none; }
.me-nav { display: none; }
.me-nav a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; padding: 0 .6rem; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.me-nav a:hover, .me-nav a[aria-current] { background: var(--tint); }
@media (max-width: 1279px) {
  .team-bar .qs { flex: 0 0 44px; min-width: 0; max-width: none; }
  .team-bar .qs input { width: 44px; min-width: 44px; height: 44px; padding: 0; color: transparent; background-position: center; cursor: pointer; }
  .team-bar .qs input::placeholder { color: transparent; }
  .team-bar .qs input::-webkit-search-cancel-button { display: none; }
  .team-bar .qs .qs-key { display: none; }
  .team-bar .qs:focus-within { position: absolute; z-index: 20; left: 1rem; right: 1rem; top: calc(.6rem + env(safe-area-inset-top, 0px)); max-width: none; }
  .team-bar .qs:focus-within input { width: 100%; padding: .35rem 1rem .35rem 2.4rem; color: var(--ink); background-position: .8rem 50%; cursor: text; box-shadow: var(--shadow); }
  .team-bar .qs:focus-within input::placeholder { color: var(--muted); }
  .team-bar .qs:focus-within input::-webkit-search-cancel-button { display: block; }
}
@media (max-width: 1099px) {
  .team-bar .team-nav { display: none; }
  .team-bar .qs { margin-left: auto; }
  .me-team .me-nav { display: flex; flex-direction: column; margin: 0 0 .3rem; padding: 0 0 .3rem; border-bottom: 1px solid var(--line); }
  .me-team .avatar-ini { display: none; }
  .me-team .avatar-menu { display: block; }
  .me-team > summary { background: var(--tint); color: var(--ink); }
}
@media (max-width: 640px) { .team-bar .qs { position: relative; } .team-bar .qs:focus-within { position: absolute; } }
.help-foot.team-foot a:not(.lang-pick a) { text-decoration: none; }
.help-foot.team-foot a:not(.lang-pick a):hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }

/* --- Apžvalga (PApzvalga): only the work to do. --- */
.ov-head { display: flex; flex-direction: column; gap: .15rem; margin: .4rem 0 1.25rem; }
.ov-head h1 { margin: 0; }
.ov-date { margin: 0; color: var(--ink2); font-size: var(--fs-3); }
.ov-alarms { display: flex; flex-direction: column; gap: .5rem; margin: 0 0 1rem; }
.ov-alarm { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: 14px; background: var(--redbg); color: var(--ink); }
.ov-alarm.ov-warn { background: var(--honeybg); }
.ov-alarm-ico { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--red); color: var(--surface); font-weight: 800; font-size: var(--fs-3); }
.ov-warn .ov-alarm-ico { background: var(--honey); }
.ov-alarm-text { flex: 1; min-width: 0; }
.ov-alarm-text p { margin: 0; overflow-wrap: anywhere; }
.ov-alarm-more { color: var(--ink2); font-size: var(--fs-3); }
.ov-act { flex: none; margin: 0; }
@media (max-width: 640px) { .ov-alarm { flex-wrap: wrap; } .ov-alarm > .ov-act { margin-left: 2.35rem; } }
.ov-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: .75rem; margin: 0 0 1.25rem; }
.ov-tile { display: flex; flex-direction: column; gap: .3rem; min-width: 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; }
.ov-tile:hover { border-color: var(--ink2); }
.ov-tile-sky { background: var(--skybg); }
.ov-tile-ok { background: var(--okbg); }
.ov-tile-red { background: var(--redbg); }
.ov-tile-honey { background: var(--honeybg); }
.ov-tile-title { font-size: var(--fs-3); font-weight: 700; color: var(--ink2); overflow-wrap: anywhere; }
.ov-tile-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .6rem; }
.ov-n { font-size: 2.5rem; letter-spacing: -.02em; white-space: nowrap; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ov-sum { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-tile-line { color: var(--ink2); font-size: var(--fs-3); }
.tile-bad { color: var(--red); font-weight: 700; white-space: nowrap; }
.ov-tile-go { margin-top: auto; padding-top: .3rem; font-size: var(--fs-3); font-weight: 700; }
@media (max-width: 640px) { .ov-tiles { grid-template-columns: 1fr 1fr; gap: .5rem; } .ov-tile { padding: .8rem .85rem; border-radius: 14px; } }
.ov-done { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.25rem; padding: .9rem 1rem; border-radius: 14px; background: var(--okbg); color: var(--ink); font-weight: 600; }
.ov-done-ico { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ok); color: var(--surface); font-weight: 800; }
.ov-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.ov-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
@media (max-width: 900px) { .ov-cols { grid-template-columns: minmax(0, 1fr); } }
.ov-cols .card, .ov-setup, .sys-card { gap: .4rem; min-height: 0; padding: 1rem 1.1rem .5rem; }
.ov-cols h2, .ov-setup h2, .sys-card h2 { margin: 0; font-size: var(--fs-4); }
.ov-cols .section-head, .sys-card .section-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; }
.ov-rows { list-style: none; margin: 0; padding: 0; }
.ov-rows > li + li { border-top: 1px solid var(--line); }
.ov-row { display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .5rem 0; color: var(--ink); text-decoration: none; }
a.ov-row:hover .ov-row-main, a.ov-row:hover .ov-co { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.ov-row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ov-row time { flex: none; color: var(--ink2); font-size: var(--fs-2); white-space: nowrap; }
.ov-co { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ov-amt { flex: none; white-space: nowrap; font-weight: 700; }
.ov-due-row .pill { flex: none; min-width: 4.5rem; text-align: center; }
.ov-bank-row .ov-row-main { display: flex; flex-direction: column; }
.ov-bank-row .ov-co { flex: none; }
.ov-iban { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); font-size: var(--fs-3); }
.ov-bank-row .pill { flex: none; }
.ov-quiet { color: var(--ink2); font-size: var(--fs-3); font-weight: 600; text-decoration: none; }
.ov-quiet:hover { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.ov-none { margin: 0; padding: .5rem 0 .75rem; color: var(--ink2); }
.ov-setup { margin: 0 0 1.25rem; }
.ov-setup-row { flex-wrap: wrap; }
.ov-setup-row .ov-row-main { flex: 1 1 16rem; overflow-wrap: break-word; } /* on a phone the button goes under the text, an address stays whole */
.ov-system { margin: 1.25rem 0 0; font-size: var(--fs-3); }
.ov-sys-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--ink2); font-weight: 600; text-decoration: none; }
.ov-sys-link:hover { color: var(--ink); }
.ov-sys-ok, .ov-sys-bad { display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--ok); color: var(--surface); font-size: var(--fs-1); font-weight: 800; }
.ov-sys-bad { background: var(--red); }
/* Valdymas → Sistema */
.sys-card .section-head form { margin: 0; }
.sys-raw summary { display: flex; align-items: center; min-height: 44px; color: var(--ink2); font-weight: 600; cursor: pointer; }
.sys-lines { list-style: none; margin: 0 0 .5rem; padding: 0; font-size: var(--fs-2); }
.sys-lines li { padding: .4rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.sys-lines time { margin-right: .4rem; color: var(--ink2); white-space: nowrap; }
.sys-id { color: var(--ink2); font-variant-numeric: tabular-nums; }
.draft-note.draft-lost { color: var(--red); font-weight: 600; }

/* ===== rework-portal-team-b: Tvirtinti (Approve), a job, Apmokėti (PPay), the desk lists ===== */
/* Tvirtinti: the queue | the document | the panel (sticky) from 1280 px; under it the queue is a strip on top; on a phone
   the strip, the panel, then the document (the PDF behind Peržiūrėti PDF: the phone's own viewer). */
.approve-ws, .job-ws { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.approve-ws > *, .job-ws > * { min-width: 0; }
.job-ws > .review-panel { order: -1; }
@media (min-width: 1100px) {
  .approve-ws { grid-template-columns: minmax(0, 1fr) 22rem; grid-template-areas: "doc panel"; gap: 1.25rem; }
  .approve-ws.has-queue { grid-template-areas: "queue queue" "doc panel"; }
  .approve-ws > .aq { grid-area: queue; }
  .approve-ws > .ad { grid-area: doc; }
  .approve-ws > .review-panel { grid-area: panel; }
  .approve-ws > .review-panel, .job-ws > .review-panel { position: sticky; top: 1rem; }
  .job-ws { grid-template-columns: minmax(0, 1fr) 22rem; gap: 1.25rem; }
  .job-ws > .review-panel { order: 0; }
}
@media (min-width: 1280px) {
  .approve-ws.has-queue { grid-template-columns: 14rem minmax(0, 1fr) 22rem; grid-template-areas: "queue doc panel"; }
  .approve-ws > .aq { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
}
.aq h2 { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .45rem; margin: 0 0 .5rem; font-size: var(--fs-4); }
.aq-list { list-style: none; display: flex; gap: .5rem; margin: 0; padding: 0 0 .3rem; overflow-x: auto; scrollbar-width: thin; }
.aq-list > li { flex: 0 0 12.5rem; min-width: 0; }
@media (min-width: 1280px) { .aq-list { flex-direction: column; overflow: visible; padding: 0; } .aq-list > li { flex: none; } }
.aq-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .5rem; min-height: 44px; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.aq-item:hover { border-color: var(--ink2); color: var(--ink); }
.aq-item.on { border-color: var(--btn); background: var(--tint); box-shadow: inset 3px 0 0 var(--btn); }
.aq-num { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aq-amount { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aq-co, .aq-age { min-width: 0; color: var(--ink2); font-size: var(--fs-2); white-space: nowrap; }
.aq-co { overflow: hidden; text-overflow: ellipsis; }
.aq-age { display: flex; align-items: center; justify-content: flex-end; gap: .3rem; }
.chip-iban { display: inline-block; padding: 0 .35rem; border-radius: 6px; background: var(--redbg); color: var(--red); font-size: var(--fs-1); font-weight: 800; line-height: 1.5; letter-spacing: .02em; white-space: nowrap; }
.late { color: var(--red); font-weight: 700; white-space: nowrap; }

/* The panel: a card; the amount big, the checks, the buttons, the jobs, Banko duomenys, the facts. */
.review-panel { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.review-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .5rem; margin: 0 0 .2rem; font-size: var(--fs-3); font-weight: 600; }
.review-kicker > a { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.review-title { margin: 0 0 .45rem; font-size: var(--fs-5); overflow-wrap: anywhere; }
.review-amount { white-space: nowrap; }
.review-due { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin: 0 0 .8rem; color: var(--ink2); font-size: var(--fs-3); }
.checks { list-style: none; display: flex; flex-direction: column; gap: .4rem; margin: 0 0 1rem; padding: 0; }
.checks > li { display: flex; align-items: flex-start; gap: .5rem; font-size: var(--fs-3); overflow-wrap: anywhere; }
.check-mark { flex: none; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; margin-top: .05rem; border-radius: 50%; font-size: var(--fs-1); font-weight: 800; }
.checks > .ok .check-mark { background: var(--okbg); color: var(--ok); }
.checks > .bad { font-weight: 600; }
.checks > .bad .check-mark { background: var(--honeybg); color: var(--honey); }
.review-actions { display: flex; flex-direction: column; gap: .5rem; margin: 0 0 .8rem; }
.review-actions > form, .review-actions > form > .btn, .review-actions > .btn { width: 100%; margin: 0; }
.review-more { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.review-more > form { margin: 0; }
.btn-text { min-height: 44px; padding: 0 .2rem; border: 0; background: none; color: var(--ink); font: 600 var(--fs-3) var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-text:hover { text-decoration-thickness: 2px; }
.review-more .return-form { flex: 1 1 auto; }
.review-panel .return-form > summary, .unpay-form > summary { list-style: none; cursor: pointer; }
.review-panel .return-form > summary::-webkit-details-marker, .unpay-form > summary::-webkit-details-marker, .export-menu > summary::-webkit-details-marker { display: none; }
.review-panel .return-form > summary.btn { width: 100%; }
.review-more .return-form[open] { flex-basis: 100%; }
.review-panel .return-form[open] > summary { margin-bottom: .6rem; }
.review-who { margin: 0 0 .8rem; color: var(--ink2); font-size: var(--fs-3); }
.unpay-form { margin: 0 0 .8rem; }
.unpay-form > summary { display: inline-flex; align-items: center; min-height: 44px; }
.review-paid { margin: 0 0 .8rem; font-weight: 600; }
.review-h { display: flex; align-items: baseline; gap: .4rem; margin: 1.2rem 0 .5rem; font-size: var(--fs-4); }
.review-h-sum { margin-left: auto; font-weight: 700; white-space: nowrap; }
.review-jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.review-jobs > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "plate what amount" "plate date date"; gap: .05rem .6rem; align-items: baseline; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: var(--fs-3); }
.review-jobs .plate { grid-area: plate; align-self: center; }
.rj-what { grid-area: what; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.rj-amount { grid-area: amount; font-weight: 700; text-align: right; white-space: nowrap; }
.rj-date { grid-area: date; color: var(--ink2); font-size: var(--fs-2); }
.tbl .plate, .review-jobs .plate, p.job-meta > a.plate { display: inline-block; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.bank-card { margin: 1.2rem 0 0; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.bank-card.bad { border-color: color-mix(in srgb, var(--honey) 40%, var(--line)); background: var(--honeybg); }
.bank-card > .review-h { margin-top: 0; }
.bank-card p { margin: 0 0 .4rem; overflow-wrap: anywhere; }
.bank-line { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.bank-card .facts { margin: .5rem 0; font-size: var(--fs-3); }
.review-panel > .facts { margin: 1.1rem 0 1rem; font-size: var(--fs-3); }
.review-panel > .return-form { display: block; margin: 0 0 .3rem; }
.review-panel > .return-form > summary.btn { width: 100%; }
.review-panel > .actions { margin: 1rem 0 .5rem; }

/* The document: its name, size and links over it, the PDF full height in a frame (on a phone: Peržiūrėti PDF instead). */
.ad-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; margin: 0 0 .5rem; font-size: var(--fs-3); }
.ad-name { flex: 1 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ad-size { color: var(--ink2); }
.ad-links { display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.ad-links a { color: var(--ink); font-weight: 600; }
.ad-drive { margin: 0 0 .5rem; color: var(--ink2); font-size: var(--fs-3); overflow-wrap: anywhere; }
.ad-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.ad-frame iframe { display: block; width: 100%; height: calc(100vh - 8rem); min-height: 540px; border: 0; background: #fff; }
.ad-fallback { margin: 0; padding: .5rem .8rem; border-top: 1px solid var(--line); color: var(--ink2); font-size: var(--fs-2); }
.ad-frame > .ad-fallback:only-child { border-top: 0; padding: 1rem; }
.ad-img { display: block; }
.ad-img img { display: block; width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; }
.ad-open { display: none; }
.jd > .review-h:first-of-type { margin-top: 1.2rem; }
@media (max-width: 640px) {
  .ad-frame:has(iframe) { display: none; }
  .ad-open { display: flex; width: 100%; margin: 0 0 .8rem; }
  .ad-img img { max-height: 60vh; }
}
.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; margin: -.1rem 0 1rem; color: var(--ink2); }
.job-meta a:not(.plate) { color: var(--ink); }

/* Apmokėti: one card, a group per transfer (copy chips for the bank's fields), a row per invoice; the bar sticks to the bottom. */
.pay-sum { margin: 0; color: var(--ink2); }
.pay-undo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.pay-undo p { flex: 1 1 16rem; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.pay-undo form { margin: 0; }
.pay-card { margin-top: .6rem; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.pay-all-row { padding: .2rem 1rem; border-bottom: 1px solid var(--line); font-size: var(--fs-3); font-weight: 600; }
.pay-all-row label { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; margin: 0; cursor: pointer; }
.pay-all-row input, .pay-group .pay-rows input[type="checkbox"] { flex: none; width: 1.3rem; height: 1.3rem; margin: 0; }
.pay-group + .pay-group { border-top: 1px solid var(--line); }
.pay-group.blocked { background: var(--honeybg); }
.pay-group-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name sum" "iban sum" "copy copy"; gap: .15rem .8rem; align-items: center; padding: .8rem 1rem .6rem; }
.pay-group-name { grid-area: name; display: flex; align-items: center; gap: .4rem; min-width: 0; margin: 0; font-size: var(--fs-4); overflow-wrap: anywhere; }
.pay-group-name .lock { flex: none; color: var(--honey); }
.pay-iban { grid-area: iban; color: var(--ink2); font-size: var(--fs-3); white-space: nowrap; }
.pay-group-sum { grid-area: sum; text-align: right; white-space: nowrap; }
.pay-group-sum strong { font-size: var(--fs-4); }
.pay-group-sum .muted { display: block; font-size: var(--fs-2); }
.pay-copy { grid-area: copy; display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.pay-copy .chip { min-height: 36px; padding: .2rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 var(--fs-2) var(--font); cursor: pointer; }
.pay-copy .chip:hover { border-color: var(--ink2); }
.pay-copy .chip.copied { border-color: var(--accent); }
.pay-copy .chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }
@media (min-width: 900px) {
  .pay-group-head { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name copy sum" "iban copy sum"; }
  .pay-copy { justify-content: flex-end; margin-top: 0; }
}
.pay-block { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: 0 1rem .7rem; }
.pay-block-why { flex: 1 1 16rem; min-width: 0; margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pay-block .bank-confirm { flex: 1 1 100%; }
.pay-card .pay-rows { list-style: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.pay-group .pay-rows > li { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .8rem; min-height: 44px; padding: .35rem 1rem; border-top: 1px solid var(--line); }
.pay-num { font-weight: 700; color: var(--ink); }
.pay-due { color: var(--ink2); font-size: var(--fs-3); white-space: nowrap; }
.pay-group .pay-rows .late { font-size: var(--fs-3); }
.pay-amount { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-group .pay-rows .row-note { order: 9; flex-basis: 100%; padding-left: 2.1rem; }
.pay-group .pay-rows input:disabled { cursor: not-allowed; }
.pay-bar { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-top: 1rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 -4px 18px rgba(0, 0, 0, .08); }
.pay-picked { font-weight: 700; font-variant-numeric: tabular-nums; }
.pay-bar-acts { display: flex; flex-wrap: wrap; gap: .5rem; margin-left: auto; }
.pay-sepa-why { flex-basis: 100%; margin: 0; color: var(--ink2); font-size: var(--fs-3); }
/* Run portal-staging-polish: the reason sits beside SEPA failas bankui (it was a line of its own at the bar's far left), and a
   click on the button while it can't make a file brings it forward. On a phone it sits under the button, before the next one. */
.pay-bar-acts { align-items: center; }
.pay-sepa-why[hidden] { display: none; }
.pay-sepa-why.nudge { color: var(--ink); font-weight: 700; }
@media (min-width: 641px) {
  .pay-bar-acts { flex: 1 1 0; justify-content: flex-end; flex-wrap: nowrap; }
  .pay-sepa-why { order: -1; flex: 0 1 24rem; text-align: right; }
}
.btn[aria-disabled="true"] { background: var(--tint); border-color: transparent; color: var(--ink2); box-shadow: none; cursor: not-allowed; }
@media (max-width: 640px) { .pay-bar-acts { width: 100%; } .pay-bar-acts .btn { flex: 1 1 100%; } .pay-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .pay-copy .chip { min-height: 44px; } }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 2.5rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: center; }
.empty-state p { margin: 0; }
.empty-state .empty-mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: .4rem; border-radius: 50%; background: var(--okbg); color: var(--ok); font-size: var(--fs-5); font-weight: 800; }

/* The desk lists (Sąskaitos, Darbai): state chips, then one toolbar row (search, company, month, Atsisiųsti ▾); the total
   under Suma; Apmokėti iki says how late; an invoice and its state in two cells. */
.search.toolbar, .page.wide .search.toolbar { flex-wrap: wrap; align-items: center; max-width: none; }
.search.toolbar input[type="search"] { flex: 1 1 14rem; max-width: 360px; }
.search.toolbar select[name="imone"] { flex: 0 1 auto; width: auto; min-width: 260px; max-width: 100%; field-sizing: content; } /* as wide as the company shown: a long name never clipped */
.review-panel .reason-chips { display: grid; grid-template-columns: minmax(0, 1fr); } /* the panel is narrow: one reason a line, none alone */
.search.toolbar select[name="men"] { flex: 0 0 180px; width: 180px; }
.export-menu { position: relative; margin-left: auto; }
.export-menu > summary { list-style: none; }
.export-pop { position: absolute; right: 0; top: calc(100% + .3rem); z-index: 30; display: flex; flex-direction: column; min-width: 10rem; padding: .3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.export-pop a { display: flex; align-items: center; min-height: 44px; padding: 0 .8rem; border-radius: 8px; color: var(--ink); font-weight: 600; text-decoration: none; }
.export-pop a:hover { background: var(--tint); }
@media (max-width: 640px) {
  .search.toolbar input[type="search"] { flex-basis: 100%; max-width: none; }
  .search.toolbar select[name="imone"], .search.toolbar select[name="men"] { flex: 1 1 10rem; width: auto; min-width: 0; max-width: 100%; field-sizing: content; }
  main nav.filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  main nav.filters > a { flex: none; }
}
/* Žalos's chips wrap on a phone (ListPhone), never a sideways row (run zalos-overdue: the rule above had reached them). */
@media (max-width: 640px) { main nav.filters.reg-chips { flex-wrap: wrap; overflow-x: visible; } }
.filters .chip-todo { border-style: dashed; }
.c-due.none, .c-inv.none, .c-files.none { color: var(--ink2); }
@media (min-width: 1100px) {
  .tbl-jobs { --cols: 7.5rem minmax(0, 1fr) 6.5rem 7.5rem 3.5rem 8rem 8.5rem; }
  .tbl-jobs.tbl-co { --cols: 7.5rem minmax(0, 1fr) 9rem 6.5rem 7.5rem 3.5rem 8rem 8.5rem; }
  .tbl-inv { --cols: 10rem minmax(0, 1fr) 6.5rem 9.5rem 7.5rem 9rem; }
  .tbl-inv.tbl-co { --cols: 10rem minmax(0, 1fr) 9rem 6.5rem 9.5rem 7.5rem 9rem; }
  .tbl-foot { display: grid; grid-template-columns: var(--cols); column-gap: .8rem; align-items: baseline; margin: .7rem 0 0; padding: 0 .6rem; }
  .tbl-foot .tf-n { grid-column: 1 / span 2; }
  .tbl-foot .c-amount { justify-self: end; }
  .tbl-inv.tbl-foot .c-amount { grid-column: 5; }
  .tbl-inv.tbl-co.tbl-foot .c-amount { grid-column: 6; }
  .tbl-jobs.tbl-foot .c-amount { grid-column: 4; }
  .tbl-jobs.tbl-co.tbl-foot .c-amount { grid-column: 5; }
}

/* Carried from rework-portal-team-a: a lonely last tile spans the row on a phone; the search's × takes a 44 px tap there. */
@media (max-width: 640px) { .ov-tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 1279px) {
  .team-bar .qs:focus-within input { height: 44px; padding-top: 0; padding-bottom: 0; padding-right: 0; }
  .team-bar .qs:focus-within input::-webkit-search-cancel-button { width: 44px; height: 42px; margin: 0; -webkit-mask-size: 1rem 1rem; mask-size: 1rem 1rem; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
}

/* ===== rework-portal-team-c: Gauti laiškai, Partneriai and a company, Automobiliai and a car, Valdymas, the team screens ===== */
/* Gauti laiškai: a table (portal-team-121), an email on the Approve layout: the panel beside its files (portal-team-111). */
@media (min-width: 1100px) {
  .tbl-mail { --cols: minmax(0, 1fr) minmax(0, .7fr) 8.5rem 3.5rem 12.5rem; }
  .tbl .cell-label { display: none; }
}
.mail-ws .mail-assign { margin: 0 0 .4rem; }
.mail-ws .mail-assign > label { font-weight: 700; }
.mail-ws .mail-drop > summary { list-style: none; cursor: pointer; }
.mail-ws .mail-drop > summary::-webkit-details-marker { display: none; }
.mail-ws .mail-drop[open] > summary { margin-bottom: .4rem; }
.mail-ws .mail-drop p { margin: 0; }
.mail-ws .mail-why { margin: 0 0 .8rem; }
.mail-ws .callout { margin: 0 0 1rem; }
.mail-ws .callout p { margin: 0 0 .6rem; }
.refused-list { margin: 0; padding-left: 1.1rem; color: var(--ink2); font-size: var(--fs-3); overflow-wrap: anywhere; }
@media (min-width: 641px) { .mail-ws .file-item.mail-first { display: none; } }
@media (max-width: 640px) { .mail-ws .ad > .ad-bar { display: none; } }
/* Automobiliai (portal-team-125…129): Automobilis is the plate chip, the model and a state pill in one cell; empty cells a dash. */
.tbl-cars .c-car { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem; min-width: 0; }
.tbl-cars .c-model { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.tbl-cars .c-car > .pill { flex: none; }
.c-n.none, .c-last.none, .c-sum.none { color: var(--ink2); }
@media (min-width: 1100px) {
  .tbl-cars { --cols: minmax(0, 1fr) 5rem 9.5rem 9.5rem; }
  .tbl .row-main.c-car { display: flex; flex-wrap: nowrap; overflow: hidden; }
  .tbl-cars .c-car > .plate { flex: none; }
}
/* Partneriai (portal-team-97…99): the name with its short name only when it adds something; grey where nothing needs doing. */
.tbl-partners .c-co { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; min-width: 0; }
.tbl-partners .c-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-partners .c-co > .pill, .tbl-partners .c-co > .badge { flex: none; }
.iban-ok > [aria-hidden] { color: var(--ok); font-weight: 800; }
.c-iban .none, .c-amount.none, .c-last.none { color: var(--ink2); }
@media (min-width: 1100px) {
  .tbl-partners { --cols: minmax(0, 1fr) 5rem 9.5rem 9rem 9.5rem; }
  .tbl .row-main.c-co { display: flex; flex-wrap: nowrap; overflow: hidden; }
  .tbl-head .th-iban { white-space: nowrap; }
}
/* A car (portal-team-130…134): the plate and model as the title under the back link; one facts card; the rest full width. */
.car-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.car-title .car-model { color: var(--ink2); font-size: var(--fs-4); font-weight: 600; }
.car-facts { margin: 0 0 1.2rem; }
.car-facts .facts { margin-top: 0; }
@media (min-width: 900px) { .car-facts .facts { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); } }
.ext-site { color: var(--ink2); font-size: var(--fs-2); white-space: nowrap; }
@media (min-width: 1100px) {
  .tbl-jobs.tbl-co.tbl-noplate { --cols: 12.5rem 8rem minmax(0, 1fr) 7rem 3.5rem 8rem 11.5rem; }
  .tbl-noplate .c-date { order: -2; }
  .tbl-noplate .c-co { order: -1; }
}
/* A company's stat cards (portal-team-100): label, the number, "N vėluoja" in red with a "!"; one column of rows on a phone. */
.stat-cards { list-style: none; margin: .2rem 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.stat-card { display: grid; align-content: start; gap: .15rem; height: 100%; box-sizing: border-box; padding: .75rem .95rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.stat-card:hover { border-color: var(--accent); }
.stat-label { color: var(--ink2); font-size: var(--fs-2); font-weight: 600; }
.stat-value { font-size: var(--fs-5); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-note.late { color: var(--danger); font-size: var(--fs-2); font-weight: 700; white-space: nowrap; }
@media (min-width: 641px) and (max-width: 899px) { .stat-cards.n-3 > :last-child { grid-column: 1 / -1; } }
@media (min-width: 900px) { .stat-cards.n-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat-cards.n-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .stat-cards { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
  .stat-cards > li + li { border-top: 1px solid var(--line); }
  .stat-card { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: .8rem; min-height: 44px; border: 0; border-radius: 0; padding: .6rem .9rem; }
  .stat-value { font-size: var(--fs-4); text-align: right; }
  .stat-note.late { grid-column: 1 / -1; }
}
.bank-ok { display: block; margin-top: .3rem; }
/* Komanda (portal-team-136, zalos-desktop-128/129, zalos-phone-119…121): a table; role and last sign-in grey text; › on a phone. */
.tbl-team .c-name { display: flex; align-items: center; gap: .2rem .5rem; min-width: 0; }
.tbl-team .c-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl-team .c-name .badge, .tbl-team .pill { flex: none; white-space: nowrap; }
.tbl-team .c-role, .tbl-team .c-email, .tbl-team .c-last.muted { color: var(--ink2); }
.tbl-team .c-email { min-width: 0; overflow-wrap: anywhere; }
.invite-panel { margin: 0 0 1.2rem; max-width: 40rem; }
@media (min-width: 1100px) {
  .tbl-team { --cols: minmax(0, 1fr) 11rem minmax(0, 1.3fr) 13.5rem; } /* 13.5rem: ru "Учётная запись отключена" in one line */
  .tbl .row-main.c-name { display: flex; overflow: hidden; }
}
@media (max-width: 1099px) {
  .tbl-team a.row { position: relative; padding-right: 2.2rem; }
  .tbl-team a.row::after { content: "›"; position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--ink2); font-size: 1.4rem; line-height: 1; }
  .tbl-team .row-meta { flex-wrap: wrap; }
}
.tbl-team a.row:active, .activity a.row:active { background: var(--tint); }
/* History lines that open something look like it: a › at the end (portal-team-107). */
.activity a.row::after { content: "›"; flex: none; margin-left: .5rem; color: var(--ink2); }
/* Veikla's filters (portal-team-138). */
.activity-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; margin: 0 0 1rem; }
.activity-filters label { display: flex; flex-direction: column; gap: .2rem; flex: 1 1 13rem; max-width: 22rem; min-width: 0; color: var(--ink2); font-size: var(--fs-2); font-weight: 600; }
.activity-filters select { width: 100%; min-height: 44px; }
.activity-filters > .btn { min-height: 44px; }
/* Nustatymai: a plain menu, a dot on a section with changes or errors (portal-team-140); zalos's one card (zalos-phone-122/123). */
.toc a.changed::after, .toc a.has-error::after { content: "●"; flex: none; color: var(--warn); font-size: .7em; }
.toc a.has-error::after { color: var(--danger); }
.settings-few .settings-section { padding: 20px; }
.savebar.savebar-in { padding: 1rem 0 0; background: none; border-top: 0; box-shadow: none; position: static; }
@media (scripting: enabled) { .settings-few .settings-form:not(.dirty) .savebar-in { display: none; } }
@media (max-width: 640px) { .savebar-in { flex-direction: column-reverse; align-items: stretch; } .savebar-in .btn { width: 100%; } }
@media (pointer: coarse) { .settings textarea { resize: none; } }
/* A company's people: the email has room from 1100 px (portal-team-106). */
@media (min-width: 1100px) {
  .people-grid .row { grid-template-columns: minmax(0, .85fr) minmax(0, 1.6fr); }
  .people-grid .row-meta { grid-template-columns: minmax(0, 1fr) 12rem; }
}

/* Run rework-portal-team-c, after the screenshots: an activity line's time at the right, before its ›, in every row
   (the › made a third item that space-between spread the time towards the middle); Automobiliai's Spin line apart from the chips. */
.activity a.row > time { margin-left: auto; }
/* A row that isn't a link keeps the ›'s room, so every time lines up. */
.activity li.row::after { content: "›"; visibility: hidden; flex: none; margin-left: .5rem; }
.head-row + .hint { margin: -.15rem 0 .8rem; }

/* Įkelti → Patikrinkite and the invoice check (run rework-portal-partner-a, R3/R4, the PUpload board) */
/* The files as one strip: a row each (picture or type, name, kind tag, 44 px remove), then "+ Pridėti" */
.file-strip { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.strip-file { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px; align-items: center; gap: .7rem; padding: .4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.strip-thumb { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--sunk); color: var(--ink2); text-decoration: none; }
.strip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.strip-name { font-weight: 600; overflow-wrap: anywhere; } /* a long name wraps rather than hides (portal-partner-80) */
/* One line, so "Skaitoma…" coming and going moves nothing (the tag gives way) */
.strip-meta { display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem; min-width: 0; }
.strip-meta:not(:has(> :not([hidden]))) { display: none; }
.strip-kind { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; min-height: 28px; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--sunk); color: var(--ink2); font: inherit; font-size: var(--fs-2); font-weight: 600; cursor: pointer; }
.strip-kind > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-kind:hover { color: var(--ink); border-color: var(--field); }
.strip-busy { flex: none; display: inline-flex; align-items: center; gap: .35rem; color: var(--sky); font-size: var(--fs-2); font-weight: 600; }
.strip-busy::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: wait-pulse 1.2s ease-in-out infinite; }
.strip-file > select { grid-column: 2 / -1; width: 100%; min-height: 40px; padding-top: .3rem; padding-bottom: .3rem; }
.strip-remove { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); cursor: pointer; }
.strip-remove:hover { background: var(--redbg); color: var(--red); }
.strip-add-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; border: 2px dashed var(--field); border-radius: var(--radius); color: var(--ink); font-weight: 600; cursor: pointer; }
.strip-add-btn:hover, .strip-add-btn:focus-within { border-color: var(--accent); background: var(--tint); }
.strip-plus { font-size: var(--fs-5); line-height: 1; }
@media (scripting: enabled) {
  .strip-add-btn input[type=file], .inv-file-change input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
}
@media (scripting: none) {
  .strip-kind { display: none; }
  .strip-file > select[hidden] { display: block !important; }
}
.pick-strip .picked:not([hidden]) { margin-bottom: .5rem; }
.picked-type { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 6px; background: var(--surface); color: var(--ink2); font-size: var(--fs-1); font-weight: 700; letter-spacing: .04em; }
.undo-toast { position: fixed; left: 50%; bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px)); z-index: 40; transform: translateX(-50%); display: flex; align-items: center; gap: .9rem; max-width: calc(100vw - 2rem); padding: .4rem .5rem .4rem 1rem; border-radius: var(--radius); background: var(--ink); color: var(--surface); box-shadow: var(--shadow); }
.undo-toast .linkbtn { color: inherit; min-height: 40px; padding: 0 .5rem; }
@media (min-width: 721px) { .undo-toast { bottom: 1.5rem; } }

/* While the first reading runs: the panel over the fields, which wait as placeholders (inert), in the form's own place */
.wait-area { position: relative; }
.wait-panel { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.wait-file { flex: none; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--sunk); color: var(--ink2); }
.wait-file img { width: 100%; height: 100%; object-fit: cover; }
.wait-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .35rem; }
.wait-line { font-size: var(--fs-4); }
.wait-name { color: var(--ink2); font-size: var(--fs-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The bar's light is its own background (a moving child would stick out of the bar) */
.wait-bar { display: block; height: 4px; margin: .2rem 0; border-radius: 2px; background: linear-gradient(var(--leaf), var(--leaf)) no-repeat -67% 0 / 40% 100%, var(--tint); animation: wait-slide 1.6s ease-in-out infinite; }
.wait-skip { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.is-waiting :is(input, textarea, select):not([type=hidden]) { color: transparent; border-color: var(--line); background: linear-gradient(90deg, var(--sunk) 25%, var(--tint) 50%, var(--sunk) 75%); background-size: 200% 100%; animation: wait-shimmer 1.4s linear infinite; }
.is-waiting :is(input, textarea)::placeholder { color: transparent; }
.is-waiting :is(.from, .date-pick, .unit, .mode-switch, .callout) { visibility: hidden; }
.is-waiting { opacity: .75; }
@keyframes wait-slide { from { background-position: -67% 0, 0 0; } to { background-position: 167% 0, 0 0; } }
@keyframes wait-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes wait-pulse { 50% { opacity: .3; } }
.just-filled, .just-filled input, input.just-filled, textarea.just-filled { background-color: var(--okbg); transition: background-color .6s ease-out; }

/* An amount with € in the box; the invoice's "+ Įrašyti …" chip under it */
.input-unit { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; }
.input-unit > input, .input-unit > .amount-input { flex: 1 1 100%; max-width: none; margin: 0; padding-right: 2.2rem; }
.input-unit > .unit { position: absolute; top: 0; right: .9rem; height: 48px; display: flex; align-items: center; color: var(--ink2); font-weight: 700; pointer-events: none; }
.fill-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 40px; padding: 0 .9rem; border: 1px dashed var(--sky); border-radius: 10px; background: var(--skybg); color: var(--sky); font: inherit; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; text-align: left; }
.fill-chip:hover { border-style: solid; }
@media (max-width: 430px) { .two.stack-narrow { grid-template-columns: minmax(0, 1fr); } }

/* Live warnings under the plate; the jobs' sum against the invoice; where the money goes */
.plate-warn { margin: .5rem 0 0; }
.sum-check { margin: .2rem 0 0; padding: .6rem .9rem; border-radius: var(--radius); font-weight: 600; }
.sum-check.is-ok { background: var(--okbg); color: var(--ok); }
.sum-check.is-off { background: var(--honeybg); color: var(--ink); }
.bank-line { margin: 0; color: var(--ink2); font-size: var(--fs-3); overflow-wrap: anywhere; }
.bank-line .mono { color: var(--ink); font-weight: 600; }
.source-line { margin-top: -.3rem; }
.flow-chip { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem; max-width: 100%; margin: 0 0 .6rem; padding: .3rem .8rem; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); color: var(--ink2); font-size: var(--fs-3); }
.flow-chip svg { flex: none; }
.pick-toggle { min-height: 44px; }

/* The invoice's card: on a phone its picture or file at the top, "Pakeisti" beside it (the big preview on a computer only) */
.inv-file { display: flex; align-items: center; gap: .8rem; margin: 0 0 .8rem; min-width: 0; }
.inv-file-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; }
.inv-file-open img, .inv-file-open .file-type { flex: none; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--sunk); color: var(--ink2); box-shadow: var(--shadow); }
.inv-file-text { display: flex; flex-direction: column; min-width: 0; }
.inv-file-name { font-weight: 700; overflow-wrap: anywhere; }
.inv-file-change { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 44px; }
/* A picture is shown on a phone too, under its card (portal-partner-70); a PDF is its card there (no PDF frame on phones) */
@media (max-width: 959px) {
  .invoice-doc > a.preview img { max-height: 40vh; }
  .inv-file:has(~ a.preview) .inv-file-open img { display: none; }
}
/* Įkelti's dark Fotografuoti: the button's own ink (the outlined camera button's green would vanish on it) */
.pick-camera.btn-primary { color: var(--btnink); border-color: var(--btn); }
/* "iš „file“" over a field in a two-up row: a tag, not a bar */
.check-form .two .from { width: fit-content; }
/* The calendar button inside its date box on these forms (portal-partner-66, 73) */
.check-form .date-field input[data-date] { padding-right: 3rem; }
.check-form .date-pick { position: absolute; top: 50%; right: 2px; transform: translateY(-50%); border: 0; background: transparent; }

/* The bar: its button, a quiet line under it; deleting a draft reads as deleting */
.bar-note { margin: .4rem 0 0; color: var(--ink2); font-size: var(--fs-2); text-align: center; }
.cancel-danger summary, .cancel-danger[open] summary { color: var(--red); }
.cancel-danger .btn-danger { background: var(--red); border-color: var(--red); color: var(--redink); }
.fix-cancel { margin: .6rem 0 0; text-align: center; }
/* The bar steps aside while a text field has focus on a phone (portal-partner-69), as the menu bar does */
@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) {
  body:has(.action-bar):has(:is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"], [type="hidden"]), textarea, select):focus) .action-bar { display: none; }
  main :is([aria-invalid="true"], .field-err) { scroll-margin-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
/* The in-page camera (run zalos-field; portal.js, [data-cam]): a computer's camera in a sheet over the page, the viewer's look (× top
   left, the title). The live
   picture, then the shutter in the middle of the bar; one shot is held with Iš naujo (left) and Naudoti (right); several shots
   (Nuotraukos, Nauja žala) line up under the picture, each with ×. Refused or missing: one line and Pasirinkti failą. */
dialog.cam-sheet { width: min(96vw, 760px); max-width: none; max-height: 94vh; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); overflow: auto; }
dialog.cam-sheet[open] { display: flex; flex-direction: column; }
dialog.cam-sheet::backdrop { background: rgba(0, 0, 0, .72); }
.cam-head { display: flex; align-items: center; gap: .5rem; min-height: 56px; padding: .375rem 1rem .375rem .5rem; border-bottom: 1px solid var(--line); }
.cam-head h2 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: var(--fs-4); }
.cam-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: var(--fs-6); line-height: 1; cursor: pointer; }
.cam-x:hover { background: var(--tint); }
.cam-stage { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; max-height: 62vh; background: var(--sunk); }
.cam-stage video, .cam-still { display: block; width: 100%; height: 100%; object-fit: contain; }
.cam-msg { margin: 0 1rem; line-height: 1.5; text-align: center; }
.cam-shots { display: flex; gap: .6rem; margin: 0; padding: .8rem 1rem 0; overflow-x: auto; list-style: none; }
.cam-shots li { position: relative; flex: none; width: 96px; height: 96px; }
.cam-shots img { display: block; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 8px; object-fit: cover; }
.cam-shot-x { position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0 8px 0 10px; background: rgba(0, 0, 0, .55); color: #ffffff; font: inherit; font-size: var(--fs-4); line-height: 1; cursor: pointer; }
.cam-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .8rem; padding: .8rem 1rem 1rem; }
.cam-again { grid-column: 1; justify-self: start; }
.cam-shutter, .cam-file { grid-column: 2; }
.cam-use { grid-column: 3; justify-self: end; }
.cam-shutter { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; padding: 0; border: 4px solid var(--ink); border-radius: 999px; background: var(--surface); cursor: pointer; }
.cam-shutter::after { content: ""; width: 48px; height: 48px; border-radius: 999px; background: var(--ink); }
.cam-shutter:hover::after { background: var(--ink2); }
.cam-shutter:disabled { opacity: .6; cursor: progress; }
:is(.cam-x, .cam-shutter, .cam-shot-x):focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
@media print { dialog.cam-sheet { display: none !important; } }
