﻿/* Mărimea textului (Setări → Text size) se aplică prin factorul --term-fsr setat de MainLayout.
   Toate font-size-urile erau în px absoluți, deci moștenirea de pe rădăcină nu avea NICIUN efect
   — de aceea alegerea din Setări nu schimba nimic. calc(px * factor) păstrează proporțiile. */
h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ===== Terminal web (oglinda MAUI) ===== */
/* Tokene de temă = EXACT MAUI Resources/Styles/Colors.xaml (light + dark). */
:root{
  --term-primary:#3B8DC8; --term-primary-d:#2A6F9E; --term-primary-l:#5BA8DD;
  --term-bg:#F5F5F5; --term-surface:#FFFFFF;
  --term-text:#1A1A1A; --term-text2:#555555; --term-border:#CCCCCC;
  /* TextOnPrimary — text sitting ON a Primary background (app bar, buttons, active tab).
     White in every MAUI theme except High Contrast, which is black on yellow. */
  --term-on-primary:#FFFFFF;
}
.term-root[data-theme="dark"]{
  --term-bg:#121212; --term-surface:#252525;
  --term-text:#F0F0F0; --term-text2:#B0B0B0; --term-border:#444444;
}
@media (prefers-color-scheme:dark){
  .term-root[data-theme="system"]{
    --term-bg:#121212; --term-surface:#252525;
    --term-text:#F0F0F0; --term-text2:#B0B0B0; --term-border:#444444;
  }
}

/* ── Extra MAUI themes (Resources/Styles/Colors.<theme>.xaml) ──────────────────────────────
   Each one is a "single-look" overlay in MAUI (identical values on the Light and the Dark
   branch), so the mapping is unambiguous: --term-primary/-d/-l = Primary/PrimaryDark/
   PrimaryLight, --term-bg = BackgroundLight (page background), --term-surface = Surface (cards
   and tiles), --term-text/-2 = TextPrimary/TextSecondary, --term-border = Border,
   --term-error = Error. Colors are copied from the XAML as they are. */
.term-root[data-theme="highcontrast"]{
  --term-primary:#FFD600; --term-primary-d:#FFD600; --term-primary-l:#FFE566;
  --term-bg:#000000; --term-surface:#141414;
  --term-text:#FFFFFF; --term-text2:#F0F0F0; --term-border:#FFFFFF;
  --term-on-primary:#000000; --term-error:#FF5252; --term-delborder:#FF6659;
}
.term-root[data-theme="oceanblue"]{
  --term-primary:#1565C0; --term-primary-d:#0D47A1; --term-primary-l:#42A5F5;
  --term-bg:#EAF2FB; --term-surface:#FFFFFF;
  --term-text:#0D1B2A; --term-text2:#37474F; --term-border:#9FB8D4;
  --term-error:#C62828;
}
.term-root[data-theme="warmamber"]{
  --term-primary:#FFB300; --term-primary-d:#FF8F00; --term-primary-l:#FFCA28;
  --term-bg:#1C1712; --term-surface:#2A2219;
  --term-text:#FFF3E0; --term-text2:#E0CFB4; --term-border:#5A4A34;
  --term-error:#FF7043; --term-delborder:#FF6659;
}
.term-root[data-theme="forestgreen"]{
  --term-primary:#2E7D32; --term-primary-d:#1B5E20; --term-primary-l:#66BB6A;
  --term-bg:#EDF5EE; --term-surface:#FFFFFF;
  --term-text:#12281A; --term-text2:#37474F; --term-border:#A8C7AC;
  --term-error:#C62828;
}
.term-root[data-theme="carbondark"]{
  --term-primary:#0F62FE; --term-primary-d:#0C50D0; --term-primary-l:#0F62FE;
  --term-bg:#161616; --term-surface:#161616;
  --term-text:#DDDDDD; --term-text2:#DDDDDD; --term-border:#1B3A52;
  --term-error:#C62828; --term-delborder:#FF6659;
}
.term-root[data-theme="materiallight"]{
  --term-primary:#6200EE; --term-primary-d:#C5C5C5; --term-primary-l:#6200EE;
  --term-bg:#FFFFFF; --term-surface:#FFFFFF;
  --term-text:#3F3F3F; --term-text2:#3F3F3F; --term-border:#CDCDCD;
  --term-error:#C62828;
}
.term-root[data-theme="midnightpurple"]{
  --term-primary:#8B5CF6; --term-primary-d:#714BC9; --term-primary-l:#9C4DCC;
  --term-bg:#1E0D35; --term-surface:#1E0D35;
  --term-text:#DEC8FF; --term-text2:#DEC8FF; --term-border:#3D1A6E;
  --term-error:#C62828; --term-delborder:#FF6659;
}
/* High Contrast pairs a yellow Primary with a black TextOnPrimary; the bar icons are white SVG
   assets (not tintable font glyphs as in MAUI), so they are inverted to stay readable. */
.term-root[data-theme="highcontrast"] .term-appbar img,
.term-root[data-theme="highcontrast"] .term-drawer-head img{ filter:invert(1); }

/* The shell fills the viewport instead of sitting in a 480px column: the terminal also runs on
   tablets and larger rugged devices, where the old fixed width left the app bar floating in the
   middle of an empty page while the (fixed) bottom tab bar spanned the full width. Content that
   reads badly when stretched is capped individually below, not by squeezing the whole app. */
.term-shell{ width:100%; margin:0; min-height:100vh; background:var(--term-bg); color:var(--term-text); display:flex; flex-direction:column; position:relative; }
/* 50, nu 30: drawer-ul meniului este copilul appbar-ului, deci propriul lui z-index ramane prins
   in stacking-context-ul parintelui. Cu appbar=30 si tabbar=40, taburile de jos se desenau PESTE
   backdrop/drawer si puteau fi apasate cu meniul deschis. 50 tine intreg shell-ul drawerului peste
   tabbar, dar sub overflow-menu (60), camera/busy (190+) si dialoguri (200). */
.term-appbar{ position:sticky; top:0; z-index:50; background:var(--term-primary); color:var(--term-on-primary); display:flex; align-items:center; justify-content:space-between; padding:14px 16px; font-size:calc(20px * var(--term-fsr, 1)); }
/* Titlul nu se rupe pe doua randuri: pe ecrane mici butoanele de actiune ii mancau latimea si
   bara crestea in inaltime. Cand nu incape, se taie cu trei puncte, iar butoanele intra in meniul
   vertical de mai jos. */
.term-title{ font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; flex:1; }
.term-actions{ display:flex; gap:14px; }
/* Butoanele de actiune din bara (tastatura, clopotel) moșteneau doar padding-ul de baza si ieseau
   31–34px, adica mai mici decat butonul de INAPOI de 38px din aceeasi bara. Aceeasi bara cu tinte
   de doua masuri, iar cea mai folosita pe ecranele de scanare era cea mica. Se aliniaza la butonul
   de inapoi; inaltimea barii nu creste, fiind deja data de el. */
.term-appbar .term-actions .term-iconbtn{ min-width:42px; min-height:38px;
  display:inline-flex; align-items:center; justify-content:center; }
.term-iconbtn{ background:none; border:none; color:var(--term-on-primary); font-size:calc(20px * var(--term-fsr, 1)); cursor:pointer; padding:2px 4px; }

/* Butonul de INAPOI: primul din bara pe fiecare ecran (login-ul nu are). Glifa de chevron se citeste
   mult mai mic decat iconitele desenate de langa ea, iar back-ul e cel mai apasat control din bara —
   pe un terminal tinut in mana, cu manusa, o tinta de 24px nu se nimereste. Marit la dimensiunea din
   aplicatia nativa (34px) si asezat intr-o zona de apasare patrata, fara sa creasca inaltimea barei. */
/* :not(.term-hamburger) — pe meniu primul buton e hamburger-ul, nu un back; fara excludere
   primea sageata de intoarcere si arata ca si cum te-ar scoate din meniu. */
.term-appbar > .term-iconbtn:first-child:not(.term-hamburger){
  /* Sageata desenata in locul chevronului "<": glifa se citea mult mai subtire decat iconitele
     desenate din dreapta barei si nu se vedea ca e un buton. Imaginea vine din images/back.svg
     (alba, facuta pentru bara albastra), pusa ca fundal — asa se schimba pe TOATE ecranele dintr-un
     singur loc, fara sa umblam in cele ~70 de antete. Textul din buton se ascunde, dar ramane in
     DOM pentru cititoarele de ecran. */
  font-size:0; color:transparent;
  width:46px; height:42px; padding:0; margin-right:2px; flex:none;
  background:url('/images/back.svg') no-repeat center / 30px 30px;
  border-radius:8px;
}
.term-appbar > .term-iconbtn:first-child:not(.term-hamburger):active{ background-color:rgba(255,255,255,.18); }
.term-body{ padding:12px; display:flex; flex-direction:column; }
/* Spatiu strans: pe terminalele mici randurile pierdute aici impingeau butonul de
   autentificare sub tastatura virtuala. */
.term-brand{ text-align:center; color:var(--term-primary); font-size:calc(24px * var(--term-fsr, 1)); font-weight:700; margin:2px 0 10px; }
.term-lbl{ color:var(--term-text2); margin:10px 2px 4px; font-size:calc(15px * var(--term-fsr, 1)); }
.term-input{ border:none; border-bottom:1px solid var(--term-border); background:var(--term-surface); color:var(--term-text); padding:12px 8px; font-size:calc(16px * var(--term-fsr, 1)); outline:none; }
.term-input:focus{ border-bottom:2px solid var(--term-primary); }
.term-check{ display:flex; align-items:center; gap:8px; margin:14px 2px; font-size:calc(15px * var(--term-fsr, 1)); color:var(--term-text2); }
/* WMS-031: text-only toggle (Username/Password <-> Badge+PIN) - no fill, so it reads as a mode
   switch rather than a second submit button next to term-btn. */
.term-linkbtn{ margin-top:10px; background:none; border:none; padding:6px 2px; color:var(--term-primary); font-size:calc(14px * var(--term-fsr, 1)); font-weight:600; text-align:left; cursor:pointer; }
.term-linkbtn:hover{ color:var(--term-primary-d); text-decoration:underline; }
.term-btn{ margin-top:16px; background:var(--term-primary); color:var(--term-on-primary); border:none; border-radius:6px; padding:16px; font-size:calc(17px * var(--term-fsr, 1)); font-weight:700; cursor:pointer; }
/* Shared single-field layout for labeled controls. */
.term-field{ display:flex; flex-direction:column; gap:6px; margin:12px 0; }
.term-field .term-input{ width:100%; box-sizing:border-box; }
.sfa-cart-product{ display:block; }
.sfa-page :is(button, a, input, select, textarea):focus-visible{ outline:3px solid var(--term-primary); outline-offset:3px; }
.sfa-page .term-body{ width:100%; max-width:1100px; margin-inline:auto; box-sizing:border-box; }
.sfa-page .term-input{ width:100%; max-width:100%; box-sizing:border-box; min-height:44px; }
.sfa-page .term-btn{ min-height:44px; }
.sfa-page .term-card{ overflow-wrap:anywhere; }
.sfa-page .term-card > .term-btn{ margin-right:8px; margin-bottom:8px; }
.sfa-page [role=alert]{ padding:12px; border:1px solid currentColor; border-radius:6px; }
.sfa-page [role=status]{ padding-block:8px; }
/* The result of an action stays in view: on long lists the action is far below the top of the page. */
.sfa-page .term-body > .sfa-message{ position:sticky; top:56px; z-index:40; margin:0; padding:12px; background:var(--term-surface); color:var(--term-text); border:1px solid var(--term-border); border-radius:6px; }
.sfa-page .term-body > .sfa-message[role=alert]{ border-color:currentColor; }
.sfa-page label.term-lbl{ display:block; }
.sfa-row{ display:flex; flex-wrap:wrap; gap:8px; }
.sfa-page .sfa-row .term-btn{ margin-top:0; }
.sfa-agent-context{ margin-top:12px; }
/* Visit questionnaire: the unanswered required question is marked by its border, not by a colour of its own. */
.sfa-visit-questions{ margin-block:8px; padding-top:8px; border-top:1px solid currentColor; }
.sfa-question{ padding-left:8px; border-left:3px solid transparent; }
.sfa-question-missing{ border-left-color:var(--term-primary); }
.sfa-question-photo{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.sfa-question-preview{ max-width:120px; max-height:120px; object-fit:cover; border-radius:4px; }
/* Gate questionnaire: both actions share a row, so the form above keeps its height on small terminals. */
.term-btn.gate-secondary{ background:var(--term-surface); color:var(--term-text); border:1px solid var(--term-border); margin-top:0; padding:10px; display:inline-flex; align-items:center; gap:6px; }
.term-btn.gate-secondary:hover:not(:disabled){ color:var(--term-primary); border-color:var(--term-primary); background:var(--term-surface); }
.gate-actions{ display:flex; gap:8px; margin-top:8px; }
.gate-actions .term-btn{ flex:1; margin-top:0; padding:12px 8px; justify-content:center; }
.gate-refused{ color:var(--term-error); }
.sfa-return-photo{ max-width:100%; max-height:240px; object-fit:contain; border-radius:4px; }
.sfa-agent-context .term-lbl{ margin-top:0; }
.sfa-context-help{ margin-bottom:0; font-size:.9em; }
.sfa-context-name{ font-weight:600; }
@media(min-width:768px){ #sfa-operations{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } }
/* SFA action hierarchy inherits the active terminal theme. */
.term-action-icon{ width:20px; height:20px; flex:0 0 auto; vertical-align:middle; }
.sfa-page .term-body{ gap:12px; }
.sfa-page .term-btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; align-self:flex-start; padding:10px 14px; margin-top:8px; font-size:calc(14px * var(--term-fsr,1)); font-weight:600; border:1px solid transparent; }
.sfa-page .term-btn{ max-width:100%; }
.sfa-page .term-btn > span{ min-width:0; overflow-wrap:anywhere; }
.sfa-page .term-btn.sfa-secondary{ background:var(--term-surface); color:var(--term-text); border-color:var(--term-border); }
.sfa-page .term-btn.sfa-secondary:hover:not(:disabled){ color:var(--term-primary); border-color:var(--term-primary); background:var(--term-surface); }
.sfa-page .term-card{ padding:16px; border-radius:8px; }
.sfa-page .term-card p{ margin-block:8px; line-height:1.45; }
.sfa-page h2{ display:flex; align-items:center; gap:10px; font-size:calc(18px * var(--term-fsr,1)); font-weight:600; margin:4px 0 16px; }
.sfa-page .term-input{ border:1px solid var(--term-border); border-radius:5px; padding:10px 12px; font-size:calc(14px * var(--term-fsr,1)); }
.sfa-page .term-input:focus{ border-color:var(--term-primary); }
.sfa-page .term-field{ gap:6px; margin:10px 0; font-size:calc(14px * var(--term-fsr,1)); color:var(--term-text2); }
.sfa-page .sfa-context-help{ font-size:calc(12px * var(--term-fsr,1)); line-height:1.5; color:var(--term-text2); }
#sfa-operations{ display:grid; grid-template-columns:1fr; gap:12px; }
.sfa-operation{ box-sizing:border-box; display:flex; align-items:center; gap:14px; min-height:76px; padding:16px; background:var(--term-surface); color:var(--term-text); border:1px solid var(--term-border); border-radius:8px; text-decoration:none; font-size:calc(16px * var(--term-fsr,1)); font-weight:600; }
.sfa-operation:hover{ border-color:var(--term-primary); }
.sfa-operation > span:nth-child(2){ flex:1; }
.sfa-operation > .term-action-icon{ color:var(--term-text2); width:16px; }
.sfa-operation-icon{ display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:8px; border:1px solid var(--term-border); color:var(--term-primary); }
.sfa-operation-icon .term-action-icon{ width:25px; height:25px; }
@media(min-width:768px){ #sfa-operations{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
.term-btn:hover{ background:var(--term-primary-d); }
.term-btn:disabled{ opacity:.6; }
.term-msg{ margin-top:14px; color:var(--term-primary-d); font-size:calc(14px * var(--term-fsr, 1)); background:rgba(59,141,200,.12); padding:10px; border-radius:6px; }
.term-overlay{ position:absolute; inset:0; background:rgba(0,0,0,.4); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:#fff; }
.term-spinner{ width:36px; height:36px; border:4px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; animation:spin 1s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* meniu tab-uri + tile-uri — 1:1 cu MAUI ActionTile: bordură Primary 3px, colț 12px, PĂTRAT,
   iconiță mare (AspectFit), text Primary BOLD UPPERCASE centrat pe max 2 rânduri. */
/* Tab bar, 1:1 with MAUI (verified on a physical TC78, 05.08.2026): it sits at the BOTTOM of the
   screen on the primary-coloured background, the icons are rendered WHITE by the Android TabBar,
   and the selected tab is the fully opaque one with a bold label while the others are translucent.
   The white icons are produced with a brightness/invert filter — the source SVGs are blue line art
   with a white fill, so this is the same flattening Android does. */
/* Inaltimea barei de jos e o valoare cu nume: zona de tile-uri isi rezerva exact atat, iar cele doua
   nu mai pot ajunge sa spuna lucruri diferite. Include si zona de gesturi de pe telefoanele fara
   butoane fizice (safe-area). */
/* Inaltimea barei creste cu marimea textului din Setari (--term-fsr), deci si rezervarea trebuie sa
   creasca: 43px fix (icon 26 + spatiu 2 + padding 15) + eticheta, care scaleaza. Cu valoare fixa,
   la text marit ultimul rand de butoane intra din nou sub bara. */
:root{ --term-tabh:calc(46px + 14px * var(--term-fsr, 1)); }
.term-tabs{ position:fixed; left:0; right:0; bottom:0; z-index:40; display:flex; gap:0;
  margin:0; background:var(--term-primary); padding-bottom:env(safe-area-inset-bottom, 0px); }
.term-tab{ flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:8px 2px 7px; border:0; border-radius:0; background:transparent;
  color:var(--term-on-primary); font-size:calc(12px * var(--term-fsr, 1)); line-height:1.15; cursor:pointer; opacity:.65; }
.term-tab.active{ opacity:1; font-weight:700; }
.term-tab-ico{ width:26px; height:26px; object-fit:contain; filter:brightness(0) invert(1); }
/* The tile area must not hide behind the fixed bar. */
.term-tilescroll{ padding-bottom:calc(var(--term-tabh) + env(safe-area-inset-bottom, 0px)); }
/* Notification bell in the app bar (MAUI MainTitleBar equivalent), with the red count badge. */
.term-bell{ position:relative; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; padding:0; }
.term-bell img{ width:24px; height:24px; object-fit:contain; }
.term-bellbadge{ position:absolute; top:-2px; right:-2px; min-width:17px; height:17px; padding:0 4px;
  box-sizing:border-box; border-radius:9px; background:var(--term-danger,#d32f2f); color:#fff;
  font-size:calc(11px * var(--term-fsr, 1)); font-weight:700; line-height:17px; text-align:center; }
/* Column count comes from the "buttons per row" setting (MAUI TilesPerRow, 2..5, default 3):
   Menu.razor sets --term-tiles on the container, like MainViewModel sets FlexLayout.Basis=1/N. */
.term-tiles{ display:grid; grid-template-columns:repeat(var(--term-tiles,3),1fr); gap:6px; }
/* WMS-031 (PDA-006, meniu pe procese): section header spanning every column of the tile grid, so
   grouping by warehouse process reads as sections rather than dividers inside one flat row. */
.term-tiles-hdr{ grid-column:1 / -1; margin:10px 2px 2px; font-weight:700; font-size:calc(12px * var(--term-fsr, 1)); text-transform:uppercase; letter-spacing:.03em; color:var(--term-text2); }
.term-tiles-hdr:first-child{ margin-top:2px; }
/* Padding 8 horizontal / 10 vertical = MAUI Border Padding="8,10". container-type provides the
   cqw unit used by the label below (1cqw = 1% of the tile content box). */
.term-tile{ width:100%; min-width:0; background:var(--term-surface); color:inherit; font:inherit; border:3px solid var(--term-primary); border-radius:12px; padding:10px 8px; aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center; cursor:pointer; container-type:inline-size; }
.term-tile:focus-visible, .term-tab:focus-visible, .term-drawer-host > summary:focus-visible,
.term-drawer-item:focus-visible, .term-drawer-close:focus-visible{
  outline:3px solid var(--term-primary-l, #90caf9); outline-offset:2px;
}
.term-tile-img{ flex:1; min-height:0; width:100%; object-fit:contain; margin:2px 0; }
/* Tile label as in MAUI ActionTile: Primary, bold, uppercase, centred, at most 2 lines and NEVER
   truncated — MAUI shrinks the font (FitText) until the text fits; the same result without any
   JavaScript here: --tile-fit (computed in Menu.razor from the label) is a multiple of 1cqw, so
   the font recomputes itself at any screen width and any column count. The cap is 0.6875em
   (=11px at normal scaling) so the label follows the text-size tier; the 6px floor is the
   equivalent of MAUI's MinFont=5 (55% of the base font). The first declaration stays as the
   fallback for browsers without container query units. */
.term-tile-lbl{ margin-top:4px; font-size:calc(11px * var(--term-fsr, 1)); font-size:clamp(6px, calc(var(--tile-fit,16) * 1cqw), 0.6875em);
  line-height:1.15; color:var(--term-primary); font-weight:700; text-transform:uppercase; text-align:center;
  /* Trei randuri, nu doua: la 4-5 butoane pe rand placa e ingusta, iar etichete ca
     „Validate customer returns" sau „Build production pallet" au nevoie de un al treilea rand
     CHIAR si la fontul minim de 6px. Cu limita de doua, ultimul cuvant disparea — masurat pe
     telefon, in engleza: 8 etichete taiate la 4 si la 5 pe rand, niciuna la 2. Iconita cedeaza
     spatiul (are flex:1), deci placa ramane patrata. */
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
  /* Only kicks in for a word longer than the line (at the font floor): it wraps mid-word like
     MAUI's WordWrap instead of cutting the word off at the tile edge. */
  overflow-wrap:anywhere; }

/* iconite reale (SVG din MAUI) */
.term-appicon{ width:22px; height:22px; vertical-align:middle; }

/* carduri info / randuri detalii */
.term-card{ margin-top:16px; background:var(--term-surface); border:1px solid var(--term-border); border-radius:10px; padding:14px; }
.term-card-title{ font-size:calc(17px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); margin-bottom:10px; }
.term-rows{ width:100%; border-collapse:collapse; }
.term-rows td{ padding:8px 4px; border-bottom:1px solid var(--term-border); font-size:calc(15px * var(--term-fsr, 1)); }
.term-rk{ color:var(--term-text2); width:42%; }
.term-rv{ color:var(--term-text); font-weight:500; }
.term-stock td{ font-weight:700; color:var(--term-primary); border-bottom:none; }

/* pagina Setări */
.term-section{ margin-top:8px; }
.term-section-title{ font-weight:700; color:var(--term-primary); font-size:calc(15px * var(--term-fsr, 1)); margin:18px 2px 6px; text-transform:uppercase; letter-spacing:.03em; }
.term-opt{ display:flex; align-items:center; gap:10px; padding:12px 4px; border-bottom:1px solid var(--term-border); cursor:pointer; font-size:calc(16px * var(--term-fsr, 1)); }
.term-opt input{ width:18px; height:18px; accent-color:var(--term-primary); }
/* Opțiune prezentă dar indisponibilă pe această platformă (ex. imprimanta locală Bluetooth/Wi-Fi,
   care pe MAUI e un socket deschis de pe terminal — un browser nu poate face asta). */
.term-opt.disabled{ opacity:.55; cursor:default; }
.term-info{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); padding:8px 4px; }
/* "Buttons per row" — the web equivalent of the Stepper on MAUI SqlSettingsPage: current value,
   the −/+ buttons and the allowed range (2-5) on the right. */
.term-stepper{ display:flex; align-items:center; gap:8px; padding:8px 4px; }
.term-stepval{ min-width:30px; text-align:center; font-size:calc(18px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text); }
.term-step{ width:44px; height:40px; background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; color:var(--term-primary); font-size:calc(20px * var(--term-fsr, 1)); font-weight:700; cursor:pointer; }
.term-step:disabled{ opacity:.4; cursor:default; }
.term-stephint{ color:var(--term-text2); font-size:calc(14px * var(--term-fsr, 1)); }
/* "Test sound" — the MAUI Button with HeightRequest 40 placed under each sound group. */
.term-btn.term-testsound{ height:40px; padding:0 14px; margin-top:8px; font-size:calc(15px * var(--term-fsr, 1)); }

/* liste General (Reaprovizionare etc.) — toggle + carduri de rând + badge */
.term-toggle{ display:flex; gap:0; margin:4px 0 12px; border:1px solid var(--term-primary); border-radius:6px; overflow:hidden; }
.term-toggle-btn{ flex:1; background:var(--term-surface); color:var(--term-primary); border:none; padding:11px 8px; font-size:calc(14px * var(--term-fsr, 1)); cursor:pointer; }
.term-toggle-btn.active{ background:var(--term-primary); color:var(--term-on-primary); }
.term-status{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); margin:2px 2px 8px; }
.term-listcard{ display:flex; justify-content:space-between; gap:10px; padding:12px 10px; border:1px solid var(--term-border); border-radius:8px; margin-bottom:8px; background:var(--term-surface); }
/* Cardul ca <button> (Panoul meu → Începe cu): un buton e inline, cu text centrat și lățime după conținut,
   deci cardurile ieșeau de lățimi diferite și centrate. Ocupă tot rândul și aliniază la stânga, ca listele. */
button.term-listcard{ display:flex; width:100%; text-align:left; font:inherit; color:inherit; cursor:pointer; -webkit-appearance:none; appearance:none; }
button.term-listcard .term-listcard-main{ flex:1; min-width:0; text-align:left; }
/* Rândurile care execută o singură acțiune sunt butoane native (Tab/Enter/Space), dar păstrează
   exact geometria cardurilor existente. Border-ul nu este resetat aici: term-listcard îl folosește
   pentru selecția depozitului; celelalte trei familii nu au border. */
.term-interactive-row{ width:100%; min-width:0; box-sizing:border-box; appearance:none; color:inherit;
  font:inherit; text-align:left; cursor:pointer; }
.term-valdoc.term-interactive-row, .term-mtcard.term-interactive-row,
.term-notifrow.term-interactive-row{ border:0; }
.term-interactive-row:focus-visible{ outline:3px solid var(--term-primary); outline-offset:2px; }
.term-listcard-title{ font-weight:600; font-size:calc(16px * var(--term-fsr, 1)); color:var(--term-text); }
.term-listcard-sub{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:2px; }
.term-listcard-right{ text-align:right; min-width:96px; }
.term-listcard-deficit{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:6px; }
.term-badge{ display:inline-block; padding:3px 9px; border-radius:10px; font-size:calc(12px * var(--term-fsr, 1)); font-weight:700; color:#fff; }
.term-badge.urgent{ background:#e53935; }
.term-badge.reco{ background:#fb8c00; }

/* Info Produs — imagine, sugestii, grid imagini */
.term-modes{ display:flex; margin:2px 0 12px; border:1px solid var(--term-primary); border-radius:6px; overflow:hidden; }
.term-prodimg{ display:block; max-width:160px; max-height:160px; margin:0 auto 12px; border-radius:8px; object-fit:contain; }
.term-suggest{ margin-top:10px; border:1px solid var(--term-border); border-radius:8px; overflow:hidden; }
.term-suggest-row{ padding:11px 12px; border-bottom:1px solid var(--term-border); cursor:pointer; }
.term-suggest-row:hover{ background:rgba(59,141,200,.12); }
.term-imggrid{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.term-gridimg{ width:100%; aspect-ratio:1; object-fit:contain; border:1px solid var(--term-border); border-radius:8px; background:var(--term-surface); }
.term-rows .term-stock .term-rv{ color:var(--term-primary); font-weight:700; }

/* Flyout (drawer) hamburger — 1:1 cu MAUI AppShell.Flyout */
.term-drawer-host{ display:block; flex:none; }
.term-drawer-host > summary{ list-style:none; display:flex; align-items:center; justify-content:center; }
.term-drawer-host > summary::-webkit-details-marker{ display:none; }
.term-drawer-host:not([open]) > .term-backdrop,
.term-drawer-host:not([open]) > .term-drawer{ display:none; }
.term-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:40; }
.term-drawer{ position:fixed; top:0; left:0; bottom:0; width:280px; max-width:82vw; background:var(--term-surface); color:var(--term-text);
  z-index:41; display:flex; flex-direction:column; box-shadow:2px 0 12px rgba(0,0,0,.3); animation:drawerIn .16s ease-out; }
@keyframes drawerIn{ from{ transform:translateX(-100%); } to{ transform:translateX(0); } }
.term-drawer-head{ background:var(--term-primary); color:var(--term-on-primary); padding:18px 16px; }
.term-drawer-headrow{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.term-drawer-close{ width:44px; height:44px; flex:none; border:0; border-radius:8px; background:transparent;
  color:var(--term-on-primary); font-size:32px; line-height:1; cursor:pointer; }
.term-drawer-close:active{ background:rgba(255,255,255,.18); }
.term-drawer-brand{ font-size:calc(20px * var(--term-fsr, 1)); font-weight:700; }
.term-drawer-user{ font-size:calc(13px * var(--term-fsr, 1)); margin-top:4px; }
.term-drawer-wh{ font-size:calc(11px * var(--term-fsr, 1)); opacity:.85; }
.term-drawer-items{ flex:1; overflow-y:auto; padding:6px 0; }
.term-drawer-item{ display:flex; align-items:center; gap:14px; min-height:48px; box-sizing:border-box; padding:13px 18px;
  cursor:pointer; font-size:calc(15px * var(--term-fsr, 1)); color:inherit; text-decoration:none; }
.term-drawer-item:hover{ background:rgba(59,141,200,.12); }
.term-drawer-button{ width:100%; border:0; background:transparent; font-family:inherit; text-align:left; }
.term-drawer-ico{ width:22px; height:22px; object-fit:contain; }
.term-drawer-foot{ padding:12px 16px; font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); border-top:1px solid var(--term-border); text-align:center; }
.term-drawer-ver{ margin-bottom:6px; }
.term-drawer-links{ display:flex; justify-content:center; gap:16px; font-size:calc(12px * var(--term-fsr, 1)); }
.term-drawer-links a{ color:var(--term-primary); text-decoration:underline; }

/* Layout „doar lista derulează" — shell înălțime fixă, controalele statice sticky, lista scroll (opt-in via .fixed) */
/* box-sizing: the 100dvh height must include the safe-area padding (PWA); without it the page was
   taller than the screen by exactly that inset, which produced a second scrollbar and hid the
   last row behind the gesture bar. */
/* min-height is reset too: the base .term-shell asks for 100vh, which on a mobile browser is the
   LARGE viewport (URL bar hidden) and would push the shell past the visible 100dvh. */
/* The vh pair comes FIRST as a fallback: dvh exists only from Chrome 108, and the industrial
   terminals (Skorpio X5 and friends) run an older Android WebView that drops the declaration.
   Without a height the flex child never becomes shorter than its content, so nothing scrolls and
   overflow:hidden simply cuts the page — the pallet height and tare fields were unreachable at a
   customer (07.09.2026). Newer engines override with dvh and keep the URL-bar-aware behaviour. */
/* --term-vh vine din visualViewport (App.razor): in WebView-ul Android tastatura NU micsoreaza
   intotdeauna viewportul, deci nici 100dvh nu scade, iar butonul de jos ramane sub tastatura.
   Cu inaltimea reala, coloana se stramteaza si actiunea de jos ramane la vedere. */
.term-shell.fixed{ height:100vh; min-height:100vh; height:100dvh; min-height:100dvh;
  height:var(--term-vh, 100dvh); min-height:var(--term-vh, 100dvh); overflow:hidden; box-sizing:border-box; }
.term-shell.fixed .term-body{ flex:1; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.term-scroll{ flex:1; min-height:0; overflow-y:auto; margin:8px -12px 0; padding:0 12px; }
/* .term-body si .term-scroll pe ACELASI element: marja negativa de mai sus e gandita pentru un
   COPIL al corpului, ca zona derulabila sa ajunga pana la marginile ecranului anulind padding-ul
   parintelui. Pusa pe corpul insusi, il lateste peste container — 10px de derulare orizontala pe
   toate dimensiunile de ecran, cu textul taiat la dreapta — si ii anuleaza padding-ul vertical.
   Garda repara ecranele care combina clasele (recepție SSCC, articol manual, validare articol)
   si sta langa regula care creeaza capcana, ca sa fie vazuta de cine o modifica. */
.term-body.term-scroll{ margin:0; padding:12px; }

/* ── Keyboard up: the screen's bottom action stays visible ──────────────────────────────────────
   The screens above (the "fixed" shell) shrink themselves, so their bottom bar always sits above
   the keyboard. The other screens scroll the whole document, and their bottom button (Login,
   Continue, Validate) ended up underneath the keyboard: present, but reachable only by scrolling
   down with the keyboard open, in order to confirm what was just typed.
   While the keyboard is up, the script in App.razor puts `term-kbup` on <html> and marks the bottom
   action block with `term-kbpin`; that block then sticks to the bottom edge of the visible area and
   the rest of the page scrolls underneath it. When the keyboard goes down the screen looks exactly
   as before — which is why the sticking is driven by a class instead of being permanent.
   It relies on the LAYOUT viewport shrinking: inside Rosistem One adjustResize does that, in a
   browser the interactive-widget hint in the page head does. */
html.term-kbup .term-kbpin{ position:sticky; bottom:0; z-index:20; background:var(--term-bg);
  box-shadow:0 -6px 10px -6px rgba(0,0,0,.35); }
/* Blocks holding several buttons are transparent, so they need a background and some room below for
   the gesture bar. On a lone button the padding IS its shape — changing it would squash the label —
   so there only the margin above it becomes a band of background, to hide the row passing under. */
html.term-kbup .term-kbpin:not(button){ padding-bottom:calc(4px + env(safe-area-inset-bottom, 0px)); }
html.term-kbup button.term-kbpin{ margin-top:8px; box-shadow:0 -8px 0 var(--term-bg), 0 -14px 10px -8px rgba(0,0,0,.35); }

/* Menu: the tab strip stays put and only the tiles scroll. No top margin (the tabs already have
   a bottom one).
   ATENTIE: aici era 'padding-bottom:8px', care anula rezervarea de mai sus — fiind mai specifica
   si mai tarzie, castiga. Efectul: pe ecrane mici, cand tile-urile nu incap, ultimul rand
   ramanea sub bara de tab-uri si nu putea fi apasat. Rezervarea se pastreaza. */
.term-scroll.term-tilescroll{ margin-top:0;
  padding-bottom:calc(var(--term-tabh) + env(safe-area-inset-bottom, 0px) + 8px); }

/* PWA standalone — elimină border-ul alb: reset body + status-bar (safe-area) colorat ca appbar */
html, body { margin:0; padding:0; }
/* One sans-serif face everywhere. Without it the page text fell back to the browser default — Roboto on the
   Android terminals, where nobody noticed, but Times New Roman on a Windows POS PC, next to buttons drawn in
   the system font. The stack keeps Roboto first so the handheld layouts, measured with it, do not move. */
body { background: var(--term-bg); font-family: Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }
button, input, select, textarea { font-family: inherit; }
.term-appbar { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.term-shell { padding-bottom: env(safe-area-inset-bottom, 0px); }
.term-listcard.selected{ border-color:var(--term-primary); border-width:2px; }

/* ── Pagina de articol (manual-product) — 1:1 cu MAUI InventoryProductPage ─────────────
   Chip-uri colorate (locație albastru / lot verde / serie portocaliu) cu ✕ roșu,
   culorile EXACTE din XAML (AppThemeBinding Light/Dark). */
.term-scanrow{ display:flex; gap:4px; align-items:center; margin-top:8px; }
/* min-width:0 e obligatoriu: un element flex NU coboara sub latimea continutului sau, asa ca
   pe un ecran ingust (NLS-N7, 480px) placeholder-ul lung tinea campul lat si impingea butoanele
   in afara ecranului — se vedea doar jumatate din butonul de paleti. */
.term-scanrow .term-input{ flex:1; min-width:0; margin:0; }
.term-scanrow{ min-width:0; }
.term-scanbtn{ width:44px; height:44px; margin:0 !important; padding:0 !important; display:flex; align-items:center; justify-content:center; flex:none; }
.term-scanbtn img{ width:22px; height:22px; }
.term-prodname{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:6px 8px; font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); margin-top:8px; }
.term-prodimg-frame{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:4px; margin-top:8px; text-align:center; }
.term-prodimg-frame img{ max-height:160px; max-width:100%; object-fit:contain; }
.term-chiprow{ display:flex; gap:4px; align-items:stretch; margin-top:8px; }
.term-chiprow.sn{ margin-top:2px; }
.term-chip{ flex:1; border-radius:6px; padding:6px 8px; font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); border:1px solid transparent; word-break:break-word; }
.term-chip.loc{ background:#E3F2FD; border-color:#1565C0; color:#0D47A1; }
.term-chip.lot{ background:#E8F5E9; border-color:#2E7D32; color:#1B5E20; }
.term-chip.sn{ background:#FFF3E0; border-color:#E65100; color:#BF360C; font-weight:400; font-size:calc(13px * var(--term-fsr, 1)); }
.term-root.dark-look .term-chip.loc{ background:#1A3A5C; border-color:#5BA8DD; color:#90CAF9; }
.term-root.dark-look .term-chip.lot{ background:#1B3A2A; border-color:#66BB6A; color:#81C784; }
.term-root.dark-look .term-chip.sn{ background:#3E2723; border-color:#FFB74D; color:#FFAB91; }
.term-chip-x{ width:44px; border:none; border-radius:6px; background:#E53935; color:#fff; font-weight:700; font-size:calc(18px * var(--term-fsr, 1)); cursor:pointer; flex:none; }
.term-chip-x.small{ width:44px; font-size:calc(14px * var(--term-fsr, 1)); }
.term-snheader{ margin-top:10px; font-size:calc(13px * var(--term-fsr, 1)); font-weight:700; color:#BF360C; }
.term-root.dark-look .term-snheader{ color:#FFAB91; }
.term-snlist{ max-height:180px; overflow-y:auto; }
/* "One serial per row" switched off: the serials sit side by side and wrap. */
.term-snlist.inline{ display:flex; flex-wrap:wrap; gap:4px 6px; align-content:flex-start; }
.term-snlist.inline .term-chiprow{ margin-top:0; }
.term-hiddendate{ position:absolute; width:0; height:0; opacity:0; border:0; padding:0; margin:0; }
.term-qty{ margin-top:8px; }
/* Butonul de scan de lângă câmp = MAUI SecondaryButton: fundal surface + bordură Primary, icon albastru */
.term-btn.term-scanbtn{ background:var(--term-surface); border:1px solid var(--term-primary); color:var(--term-primary); }

/* ── Manual IN/OUT content (manual-in/out/returns) — 1:1 with MAUI ManualInOutContentPage.
   Exact MAUI values: header/panel = Surface bg + Primary 1px border r6; badge #E53935;
   qty = Error #C0392B; total bar #1a472a; delete-all border #D33 (dark #FF6659). ── */
.term-hdrbox{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:10px; font-weight:700; font-size:calc(13px * var(--term-fsr, 1)); margin-top:8px; word-break:break-word; }
.term-snno{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; margin-top:6px; }
.term-snno-head{ display:flex; justify-content:space-between; align-items:center; padding:8px 10px; cursor:pointer; }
.term-snno-lbl{ font-weight:700; font-size:calc(13px * var(--term-fsr, 1)); }
.term-snno-chevron{ color:var(--term-primary); font-size:calc(16px * var(--term-fsr, 1)); margin-left:8px; }
.term-snno-input{ display:block; width:calc(100% - 20px); margin:0 10px 8px; box-sizing:border-box; }
/* Pallets button with live count badge in the corner (palletinfo icon, Surface bg + Primary border) */
.term-palletbtn{ position:relative; width:44px; height:44px; flex:none; background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:8px; cursor:pointer; }
.term-palletbtn img{ width:100%; height:100%; object-fit:contain; display:block; }
.term-palletbadge{ position:absolute; top:-4px; right:-4px; min-width:18px; background:#E53935; color:#fff; font-size:calc(10px * var(--term-fsr, 1)); font-weight:700; border-radius:9px; padding:1px 4px; text-align:center; box-sizing:border-box; }
/* "+" add-manually = MAUI SecondaryButton (transparent bg, Primary border/text), 52x44 */
.term-addbtn{ width:52px; height:44px; flex:none; background:transparent; border:1px solid var(--term-primary); border-radius:6px; color:var(--term-primary); font-size:calc(22px * var(--term-fsr, 1)); font-weight:700; cursor:pointer; }
/* CollectionView EmptyView (italic, centered, MAUI Padding 16,32,16,16) = .term-empty,
   defined once with the inventory block below. */
/* Line card: thumbnail 52x48 | name bold + qty red | Lot/Exp | 📍 location | delete 36x36 */
.term-line{ display:flex; align-items:center; background:var(--term-surface); padding:8px; margin-bottom:6px; }
.term-line-img{ width:52px; height:48px; object-fit:contain; margin-right:8px; flex:none; cursor:pointer; align-self:center; }
.term-line-main{ flex:1; min-width:0; }
.term-line-top{ display:flex; align-items:center; }
.term-line-name{ flex:1; min-width:0; font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); word-break:break-word; }
.term-line-qty{ font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); color:#C0392B; margin-left:6px; white-space:nowrap; }
.term-line-meta{ display:flex; gap:8px; font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-line-meta span{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-line-loc{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-primary); font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-line-del{ width:36px; height:36px; flex:none; background:transparent; border:none; padding:6px; cursor:pointer; }
.term-line-del img{ width:100%; height:100%; object-fit:contain; display:block; }
/* Total bar (Manual Out with prices): dark green, white bold text, right aligned */
.term-totalbar{ background:#1a472a; color:#fff; font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); text-align:right; border-radius:6px; padding:6px 10px; margin-top:6px; flex:none; }
/* Bottom row: delete-all (left, red border) + compact Pallet button (right, Primary border) */
.term-bottomrow{ display:flex; gap:6px; align-items:center; margin-top:6px; flex:none; }
/* Delete-all shares .term-delallbtn (base look defined with the inventory block below:
   Surface bg, red --term-delborder). The manual bottom row is a flex container, so the
   fixed 56px width MAUI gives the button comes from here. */
.term-bottomrow .term-delallbtn{ width:56px; flex:none; }
/* Background follows the theme token (same as the previous #fff / #252525 on Light / Dark, and
   correct on the themes added since). */
.term-palletcta{ display:flex; align-items:center; gap:6px; height:48px; padding:0 14px; background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; cursor:pointer; }
.term-palletcta img{ width:24px; height:24px; object-fit:contain; }
.term-palletcta span{ color:var(--term-primary); font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); }
/* Fullscreen product image — web equivalent of MAUI FullscreenImagePage (black, Primary top bar 56px) */
.term-imgoverlay{ position:fixed; inset:0; background:#000; z-index:60; display:flex; flex-direction:column; }
.term-hdrbox-sub{ font-size:calc(12px * var(--term-fsr, 1)); font-weight:400; color:var(--term-text2); margin-top:2px; word-break:break-word; }
.term-imgoverlay-bar{ min-height:56px; background:var(--term-primary); display:flex; align-items:center; padding:0 8px; flex:none; }
/* Titlul din bara pozei mărite: denumire pe primul rând, cod | cod de bare pe al doilea. */
.term-imgoverlay-title{ flex:1; min-width:0; padding:6px 4px; color:var(--term-on-primary); }
.term-imgoverlay-title .l1{ font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); word-break:break-word; }
.term-imgoverlay-title .l2{ font-size:calc(12px * var(--term-fsr, 1)); opacity:.85; word-break:break-word; }
.term-imgoverlay > img{ flex:1; min-height:0; width:100%; object-fit:contain; }

/* ── Paleți (pallet-generate / document-pallets / pallet-edit) — 1:1 cu MAUI Pages/General ───── */
.term-lbl-b{ font-weight:700; color:var(--term-text); }
/* Antetul „Caracteristici" — MAUI Border Primary, RoundRectangle 4, Padding 10,6, text alb bold */
.term-charhead{ margin-top:14px; background:var(--term-primary); color:var(--term-on-primary); font-weight:700; border-radius:4px; padding:6px 10px; font-size:calc(15px * var(--term-fsr, 1)); }
/* Grila 2 coloane (dimensiuni/greutate) — MAUI Grid ColumnDefinitions * ,* ColumnSpacing 10 RowSpacing 6 */
.term-grid2{ display:grid; grid-template-columns:1fr 1fr; column-gap:10px; row-gap:6px; margin-top:6px; align-items:end; }
.term-grid2 .term-lbl{ margin:4px 2px 0; }
.term-grid2 .term-input{ width:100%; box-sizing:border-box; height:46px; }
.term-grid2 .span2{ grid-column:1 / span 2; }
select.term-input{ height:48px; }
textarea.term-input{ min-height:80px; resize:vertical; font-family:inherit; }
/* MAUI SecondaryButton: fundal transparent, bordură Primary 1px, text Primary, colț 6 */
.term-btn2{ background:transparent; border:1px solid var(--term-primary); color:var(--term-primary); border-radius:6px; font-size:calc(14px * var(--term-fsr, 1)); height:46px; cursor:pointer; }
.term-sscc{ color:var(--term-primary); font-weight:600; font-size:calc(14px * var(--term-fsr, 1)); margin:2px 2px 0; }
/* Empty view CollectionView — label centrat TextSecondary */
.term-emptyview{ text-align:center; color:var(--term-text2); padding:16px; margin:auto 0; }
/* Rând palet — MAUI Border Surface, Padding 10,8, Margin 0,0,0,4, fără bordură */
.term-palletrow{ display:flex; gap:6px; padding:8px 10px; background:var(--term-surface); margin-bottom:4px; }
.term-palletrow-main{ flex:1; min-width:0; cursor:pointer; }
.term-palletrow .sscc{ font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); color:var(--term-primary); }
.term-palletrow .ptype{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text); margin-top:2px; }
.term-palletrow .pname{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.term-palletrow .pdims{ display:grid; grid-template-columns:1fr 1fr; column-gap:8px; font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:2px; }
.term-palletrow .pdate{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:2px; }
/* Buton pătrat cu icon pe rând (print/edit) — MAUI ImageButton 40×40 Primary, colț 6, padding 8 */
.term-sqbtn{ width:40px; height:40px; border:none; border-radius:6px; background:var(--term-primary); padding:8px; cursor:pointer; flex:none; align-self:center; }
.term-sqbtn img{ width:100%; height:100%; object-fit:contain; }

/* ── Inventar (inventory / inventory-content) — 1:1 cu MAUI InventorySelectLocationPage +
   InventoryContentPage. Culori exacte: Error #C0392B (Colors.xaml), chenar Șterge-tot
   #D33 light / #FF6659 dark (XAML AppThemeBinding). */
:root{ --term-error:#C0392B; --term-delborder:#D33333; }
.term-root[data-theme="dark"]{ --term-delborder:#FF6659; }
@media (prefers-color-scheme:dark){
  .term-root[data-theme="system"]{ --term-delborder:#FF6659; }
}
/* EmptyView MAUI: text italic centrat, TextSecondary */
.term-empty{ text-align:center; font-style:italic; font-size:calc(14px * var(--term-fsr, 1)); color:var(--term-text2); padding:32px 16px 16px; }
/* Antetul cu locația: chenar Primary 1px, colț 6, bold (Border-ul din rândul 0 MAUI) */
.term-invheader{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:10px; font-size:calc(13px * var(--term-fsr, 1)); font-weight:700; }
/* Cantitatea numărată: bold, roșu Error — ca DisplayQty din rândul de linie MAUI */
.term-invqty{ color:var(--term-error); font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); white-space:nowrap; }
/* Butonul „+" (adăugare manuală) = MAUI SecondaryButton: transparent + bordură Primary */
.term-plusbtn{ width:52px; height:44px; flex:none; background:transparent; color:var(--term-primary); border:1px solid var(--term-primary); border-radius:6px; font-size:calc(22px * var(--term-fsr, 1)); font-weight:700; cursor:pointer; }
/* Ștergere pe rând: iconul delete (36px MAUI) */
.term-delline img{ width:22px; height:22px; vertical-align:middle; }
/* Bara de jos: Șterge tot (56px) + Validează inventar (restul) — Grid-ul din rândul 4 MAUI */
.term-invbottom{ display:grid; grid-template-columns:56px 1fr; gap:6px; padding-top:6px; }
.term-delallbtn{ height:48px; background:var(--term-surface); border:1px solid var(--term-delborder); border-radius:6px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.term-delallbtn img{ width:24px; height:24px; }
.term-btnicon{ width:20px; height:20px; vertical-align:-4px; margin-right:6px; }
/* ── Assembly/Disassembly (MAUI Manual{As,Dis}assemblyPage + components pages) ── */
/* Kit/product details card: Surface, NO border (Stroke=Transparent), radius 4, padding 8,6;
   name Primary bold 15, second line TextSecondary 12; Info = SecondaryButton on the right. */
.term-asmcard{ display:flex; gap:6px; align-items:center; background:var(--term-surface); border-radius:4px; padding:6px 8px; margin-top:8px; }
.term-asmcard-main{ flex:1; min-width:0; }
.term-asmcard-name{ color:var(--term-primary); font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); word-break:break-word; }
.term-asmcard-sub{ color:var(--term-text2); font-size:calc(12px * var(--term-fsr, 1)); margin-top:2px; }
.term-asmcard .term-btn2{ height:40px; padding:0 10px; font-size:calc(12px * var(--term-fsr, 1)); flex:none; text-decoration:none; display:flex; align-items:center; }
/* Component row (components list): Surface, no border, Padding 12,10, Margin bottom 4;
   the ✕ is a TRANSPARENT text button in Error color (assembly list only). */
.term-comprow{ display:flex; align-items:center; gap:6px; background:var(--term-surface); padding:10px 12px; margin-bottom:4px; }
.term-comprow-txt{ flex:1; min-width:0; font-size:calc(14px * var(--term-fsr, 1)); word-break:break-word; }
.term-xtext{ background:transparent; border:none; color:var(--term-error); font-size:calc(14px * var(--term-fsr, 1)); padding:4px 8px; cursor:pointer; flex:none; }
/* Location name under the scan row: Primary 13px (MAUI Label) */
.term-locname{ color:var(--term-primary); font-size:calc(13px * var(--term-fsr, 1)); margin:2px 2px 0; }

/* ── Retur la raft / Punere la raft (MAUI ShelfReturn*, PutAway* pages) ── */
/* Generic list chevron "›" (MAUI trailing Label, TextSecondary, 20px) */
.term-listcard-chevron{ color:var(--term-text2); font-size:calc(20px * var(--term-fsr, 1)); align-self:center; margin-left:8px; flex:none; }
/* Shelf return task card: Surface, NO border (Stroke=Transparent), radius 6, Padding 12,10,
   with the 4px status color bar on the left (DodgerBlue=InProgress / Orange=Pending). */
.term-srcard{ display:flex; background:var(--term-surface); border-radius:6px; padding:10px 12px; margin-bottom:6px; }
.term-srbar{ width:4px; border-radius:3px; flex:none; margin-right:8px; }
.term-srmain{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.term-sraction{ font-size:calc(11px * var(--term-fsr, 1)); font-weight:700; letter-spacing:.5px; }
.term-srprod{ font-size:calc(14px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-srdetail{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-srroute{ font-size:calc(12px * var(--term-fsr, 1)); font-style:italic; color:var(--term-primary); }
.term-srbtns{ display:flex; gap:8px; margin-top:6px; }
.term-srbtn{ height:36px; border:none; border-radius:6px; color:#fff; font-size:calc(12px * var(--term-fsr, 1)); padding:0 6px; cursor:pointer; }
.term-srbtn.confirm{ background:var(--term-primary); width:120px; }
.term-srbtn.skip{ background:var(--term-text2); width:90px; }
/* Wrist terminals: the two buttons move into a column on the right of the card. Underneath they cost
   a whole row per task, and at 365x254 only one task fitted on screen. Text keeps its size. */
@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  .term-srcard{ padding:6px 8px; }
  .term-srmain{ display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:8px; row-gap:1px; }
  .term-srmain > *{ grid-column:1; }
  .term-srbtns{ grid-column:2; grid-row:1 / span 4; flex-direction:column; justify-content:center; gap:4px; margin-top:0; }
  .term-srbtn.confirm, .term-srbtn.skip{ width:auto; min-width:84px; height:34px; }
}
/* Execute page: detail panel (Surface, radius 8, padding 12) + 140px label/value grid rows */
.term-panel{ background:var(--term-surface); border-radius:8px; padding:12px; }
.term-kvgrid{ display:grid; grid-template-columns:140px 1fr; gap:6px 8px; font-size:calc(13px * var(--term-fsr, 1)); align-items:center; }
.term-kvgrid .k{ font-weight:700; }
.term-kvdoc{ display:flex; align-items:center; gap:8px; }
.term-kvdoc > span{ flex:1; min-width:0; }
.term-infobtn{ height:32px; background:var(--term-primary); color:var(--term-on-primary); border:none; border-radius:6px; font-size:calc(12px * var(--term-fsr, 1)); padding:0 10px; cursor:pointer; flex:none; }
.term-formcol{ display:flex; flex-direction:column; gap:10px; }
.term-textarea{ min-height:72px; resize:vertical; font-family:inherit; }
/* Bottom action bar: Cancel (TextSecondary) + Validate (Primary), both 48px, side by side */
.term-actionbar{ display:flex; gap:8px; padding:8px 0 0; }
.term-actionbar .term-btn{ flex:1; margin-top:0; height:48px; padding:0; font-size:calc(14px * var(--term-fsr, 1)); }
.term-btn.gray{ background:var(--term-text2); }
.term-btn.gray:hover{ background:var(--term-text2); }
/* Put away: progress header (Surface, Primary 1px border, bold Primary 13) */
.term-progress{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:4px 6px; font-size:calc(13px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); margin-top:8px; }
/* Current product info box on the scan step (Surface + Primary border) */
.term-pabox{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:10px 12px; }
.term-pabox-name{ font-size:calc(16px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text); }
.term-pabox-qty{ font-size:calc(14px * var(--term-fsr, 1)); color:var(--term-text2); }
/* Suggested location box (Surface, no border, radius 4) */
.term-sugbox{ background:var(--term-surface); border-radius:4px; padding:4px 6px; }
.term-sugbox-txt{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-primary); }

/* ── Bulk move + SSCC transfer (bulk-move / sscc-transfer / pallet-product-detail) —
   1:1 MAUI BulkMovePage / SsccTransferPage / PalletProductDetailPage ── */
/* Step banner: Surface bg, Primary 1px border, radius 6, Padding 6,4; label 13 bold Primary */
.term-stepban{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:4px 6px; font-size:calc(13px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); flex:none; }
/* Info banner (source location / pallet header): Surface, no border, radius 4, Padding 6,4 */
.term-infoban{ background:var(--term-surface); border-radius:4px; padding:4px 6px; margin-top:8px; flex:none; }
/* Pasul următor al comenzii (ambalare → camion): se distinge de butoanele obișnuite ale ecranului,
   pentru că mută operatorul pe alt ecran, nu doar termină o acțiune de aici. */
.term-btn.term-nextstep{ background:var(--term-success, #2e7d32); }
.term-infoban .t1{ font-size:calc(14px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); }
.term-infoban .t2{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }
/* Destination banner: "→ name" 14 bold, default text color */
/* Destination banner is deliberately loud - this is where the goods will land (user 13.08). */
.term-destban{ background:var(--term-primary); color:#fff; border-radius:4px; padding:8px 10px; margin-top:6px; font-size:calc(16px * var(--term-fsr, 1)); font-weight:700; flex:none; }
.term-bmshowall{ display:flex; align-items:center; gap:8px; margin-top:6px; font-size:calc(13px * var(--term-fsr, 1)); flex:none; }
.term-bmshowall input{ width:18px; height:18px; accent-color:var(--term-primary); margin:0; }
/* Status message: MAUI AppThemeBinding Light #CC3333 / Dark #FF6659, 12px */
.term-statusred{ font-size:calc(12px * var(--term-fsr, 1)); color:#CC3333; margin:6px 2px 0; flex:none; }
.term-root.dark-look .term-statusred{ color:#FF6659; }
@media (prefers-color-scheme:dark){
  .term-root[data-theme="system"] .term-statusred{ color:#FF6659; }
}
/* Bulk-move content row: checkbox + text 13; selected = Surface bg, unselected = transparent + 50% */
.term-bmrow{ display:flex; align-items:center; gap:8px; padding:6px 8px; margin-bottom:4px; border-radius:4px; background:var(--term-surface); font-size:calc(13px * var(--term-fsr, 1)); }
.term-bmrow.off{ background:transparent; opacity:.5; }
.term-bmrow input[type=checkbox]{ width:18px; height:18px; accent-color:var(--term-primary); flex:none; margin:0; }
/* SSCC selected header row: count label 12 bold Primary + small Add-all secondary button (h32, 11px) */
.term-selrow{ display:flex; align-items:center; gap:4px; margin-top:6px; flex:none; }
.term-selrow .t1{ flex:1; font-size:calc(12px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); }
.term-btn2.small{ height:32px; font-size:calc(11px * var(--term-fsr, 1)); padding:0 8px; flex:none; }
/* SSCC selected item row: Surface, Padding 8,6, margin bottom 3; delete image button 28×28 */
.term-ssccitem{ display:flex; align-items:center; background:var(--term-surface); padding:6px 8px; margin-bottom:3px; font-size:calc(13px * var(--term-fsr, 1)); }
.term-ssccitem .txt{ flex:1; min-width:0; word-break:break-word; }
.term-ssccitem .del{ width:28px; height:28px; flex:none; background:transparent; border:none; padding:2px; cursor:pointer; }
.term-ssccitem .del img{ width:100%; height:100%; object-fit:contain; display:block; }
/* In the shared bottom .term-actionbar (defined with shelf-return above) the Back button of these
   flows is a SECONDARY auto-width button (MAUI Padding 12,0), next to the filling primary one. */
.term-actionbar .term-btn2{ flex:none; height:48px; padding:0 12px; }

/* ── Indirect activities / Shunter / Route manifest / Stop detail —
   1:1 MAUI IndirectActivitiesPage / ShunterPage / RouteManifestPage / StopDetailPage ── */
/* Status banner (MAUI Border Surface bg + Primary 1px, RoundRectangle 6, Padding 12,10;
   label 14 bold Primary) */
.term-actban{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:10px 12px; font-size:calc(14px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); flex:none; }
/* Selectable activity row (Surface, Stroke transparent, Padding 14,12, Margin bottom 6;
   name bold 15 + code 12 TextSecondary right). Selection shown with a Primary border,
   same pattern as the warehouse list. */
.term-actrow{ display:flex; justify-content:space-between; gap:8px; background:var(--term-surface); padding:12px 14px; margin-bottom:6px; cursor:pointer; border:2px solid transparent; }
.term-actrow.selected{ border-color:var(--term-primary); }
.term-actrow .name{ font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); min-width:0; word-break:break-word; }
.term-actrow .code{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); align-self:center; margin-left:8px; flex:none; }
/* Session notes editor filling the free height (MAUI Border Primary 1px r6 Padding 4 + Editor) */
.term-noteswrap{ flex:1; min-height:0; border:1px solid var(--term-primary); border-radius:6px; padding:4px; margin-top:4px; display:flex; }
.term-noteswrap textarea{ flex:1; border:none; background:transparent; color:var(--term-text); font-size:calc(15px * var(--term-fsr, 1)); font-family:inherit; resize:none; outline:none; padding:8px; }
/* Stop button = MAUI BackgroundColor Error (#C0392B, Colors.xaml) + white text */
.term-btn.danger{ background:var(--term-error); }
.term-btn.danger:hover{ background:var(--term-error); }
/* Shunter move / route stop card (Surface, Stroke transparent, r6, Padding 12,10, Margin bottom 6) */
.term-movecard{ display:flex; gap:8px; background:var(--term-surface); border-radius:6px; padding:10px 12px; margin-bottom:6px; }
.term-movecard-main{ flex:1; min-width:0; }
.term-movecard-title{ font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); }
.term-movecard-sub{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); word-break:break-word; }
/* Tappable variant (route stop = MAUI TapGestureRecognizer on the border) */
.term-movecard.tap{ cursor:pointer; }
/* ✔ button on the shunter row (MAUI Button 56×48, font 18, centered) */
.term-checkbtn{ width:56px; height:48px; flex:none; align-self:center; background:var(--term-primary); color:var(--term-on-primary); border:none; border-radius:6px; font-size:calc(18px * var(--term-fsr, 1)); cursor:pointer; }
/* Delivered ✔ on the route stop (MAUI label 20 bold, #2E7D32 hardcoded for both themes) */
.term-checkgreen{ color:#2E7D32; font-size:calc(20px * var(--term-fsr, 1)); font-weight:700; align-self:center; margin-left:8px; flex:none; }
/* Route manifest header banner: vehicle + summary left, small pick button right */
.term-rmhead{ display:flex; gap:8px; align-items:center; background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:10px 12px; flex:none; }
.term-rmhead-main{ flex:1; min-width:0; }
.term-rmhead .veh{ font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); }
.term-rmhead .sum{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-primary); margin-top:2px; }
.term-rmhead .term-btn2{ height:40px; font-size:calc(12px * var(--term-fsr, 1)); padding:0 10px; flex:none; }
/* Stop detail header (partner 16 bold / address 13 / doc no 13 TextSecondary / delivered green) */
.term-sdhead{ background:var(--term-surface); border:1px solid var(--term-primary); border-radius:6px; padding:10px 12px; flex:none; }
.term-sdhead .p1{ font-weight:700; font-size:calc(16px * var(--term-fsr, 1)); }
.term-sdhead .p2{ font-size:calc(13px * var(--term-fsr, 1)); word-break:break-word; }
.term-sdhead .p3{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-sdhead .pod{ font-size:calc(14px * var(--term-fsr, 1)); font-weight:700; color:#2E7D32; margin-top:2px; }
/* Stop order line (Surface, r6, Padding 12,8, Margin bottom 4: name 14 + qty bold right) */
.term-stopline{ display:flex; gap:8px; background:var(--term-surface); border-radius:6px; padding:8px 12px; margin-bottom:4px; }
.term-stopline .n{ flex:1; min-width:0; font-size:calc(14px * var(--term-fsr, 1)); word-break:break-word; }
.term-stopline .q{ font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); align-self:center; white-space:nowrap; }
/* Bottom action sheet — web equivalent of MAUI DisplayActionSheet (vehicle picker) */
.term-sheet{ position:fixed; left:0; right:0; bottom:0; z-index:50; max-width:480px; margin:0 auto; background:var(--term-surface); color:var(--term-text); border-radius:12px 12px 0 0; padding:4px 0 12px; max-height:70vh; display:flex; flex-direction:column; box-shadow:0 -4px 16px rgba(0,0,0,.3); }
.term-sheet-title{ font-size:calc(14px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text2); padding:10px 16px; flex:none; }
.term-sheet-items{ overflow-y:auto; min-height:0; }
/* Scan + search rows of the vehicle picker: they stay put while the list below them scrolls, so a
   plate can be scanned or looked up without first scrolling back to the top of the sheet. */
.term-sheet-pick{ flex:none; padding:0 16px 8px; }
.term-sheet-pick .term-scanrow{ margin-top:0; }
.term-sheet-pick > .term-input{ display:block; width:100%; margin-top:8px; }
.term-sheet-pick + .term-sheet-items .term-empty{ padding:16px; }
.term-sheet-item{ display:block; width:100%; text-align:left; background:none; border:none; color:var(--term-text); font-size:calc(16px * var(--term-fsr, 1)); padding:13px 16px; cursor:pointer; }
.term-sheet-item:hover{ background:rgba(59,141,200,.12); }
.term-sheet-cancel{ margin:8px 16px 0; flex:none; }
/* Full-screen variant: the pallet-type picker holds the whole flow (type is mandatory), so it
   takes the entire viewport instead of a 70vh strip — the list gets room and nothing shows
   through from the page behind. */
/* Page background (not the white surface): the labels/inputs strip like the Generate-pallet page —
   white inputs stand out on the grey page background. */
.term-sheet.full{ top:0; height:100vh; height:100dvh; max-height:none; max-width:none; width:100%; border-radius:0; padding:0; background:var(--term-bg); }
.term-sheet.full .term-sheet-items{ flex:1; }
/* Form layout (same look as the Generate-pallet page): its own app bar (back = cancel, save in
   the title bar) and the fields flowing from the top. */
.term-sheet.full .term-appbar{ flex:none; }
/* Same column layout as .term-body on the Generate-pallet page: every label/field on its own
   full-width row. Without the flex column the label and the select share one line. */
.term-sheet-form{ flex:1; min-height:0; overflow-y:auto; padding:12px; display:flex; flex-direction:column; }
.term-sheet .term-iconbtn:disabled{ opacity:.45; cursor:default; }

/* ── Message box în pagină (echivalentul MAUI DisplayAlert/DisplayPrompt) ────────────────
   Bară de titlu Primary + corp pe suprafața temei + butoane Da/Nu. Înlocuiește alert/confirm
   de browser, ca dialogurile să arate la fel cu restul terminalului în ambele teme. */
.term-dlg-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:200;
  display:flex; align-items:center; justify-content:center; padding:20px; }
/* Inaltimea e plafonata la ecran, iar mesajul primeste scroll propriu: un dialog cu lista de
   articole (ex. "articole care nu sunt pe niciun palet" pe o comanda mare) crestea peste ecran si
   impingea butoanele Da/Nu afara, fara nicio cale de a ajunge la ele — pe telefon operatorul ramanea
   blocat cu mesajul pe ecran. Antetul si butoanele stau fixe, doar corpul se deruleaza.
   dvh urmeaza bara de adrese a browserului; vh ramane ca rezerva unde dvh nu exista. */
.term-dlg{ width:100%; max-width:420px; background:var(--term-surface); border-radius:10px;
  overflow:hidden; box-shadow:0 8px 28px rgba(0,0,0,.35);
  display:flex; flex-direction:column;
  max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); }
.term-dlg-head{ background:var(--term-primary); color:var(--term-on-primary); padding:12px 14px; display:flex;
  align-items:center; gap:10px; font-weight:700; font-size:calc(16px * var(--term-fsr, 1));
  flex:0 0 auto; }
.term-dlg-ico{ font-size:calc(18px * var(--term-fsr, 1)); line-height:1; }
.term-dlg-title{ flex:1; }
.term-dlg-body{ padding:16px 14px; flex:1 1 auto; min-height:0; overflow-y:auto;
  -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.term-dlg-msg{ font-size:calc(15px * var(--term-fsr, 1)); color:var(--term-text); white-space:pre-wrap; word-break:break-word; }
.term-dlg-input{ margin-top:12px; }
.term-dlg-foot{ display:flex; gap:8px; padding:12px 14px 14px; justify-content:flex-end;
  flex:0 0 auto; background:var(--term-surface); }
.term-dlg-code{ margin-right:auto; align-self:center; font-size:11px; opacity:.55; color:var(--term-text); cursor:pointer; user-select:all; white-space:nowrap; }
.term-dlg-btn{ min-width:96px; height:44px; border-radius:6px; font-size:calc(15px * var(--term-fsr, 1)); font-weight:700; cursor:pointer; }
.term-dlg-btn.accept{ background:var(--term-primary); color:var(--term-on-primary); border:none; }
.term-dlg-btn.cancel{ background:var(--term-surface); color:var(--term-primary);
  border:1px solid var(--term-primary); }

/* ── Overlay „se procesează" (echivalentul MAUI Controls/BusyOverlay) ───────────────────
   Foaie semi-transparentă care înghite orice tap cât timp o scanare e în curs + card cu
   spinner (48x48) și mesaj, exact ca Border-ul MAUI (padding 24, colț 8, spacing 12).
   z-index SUB message box (200), ca un dialog deschis în timpul procesării să rămână
   deasupra și apăsabil. */
.term-busy-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:190;
  display:flex; align-items:center; justify-content:center; padding:20px; }
.term-busy{ background:var(--term-surface); color:var(--term-text); border-radius:8px;
  padding:24px; display:flex; flex-direction:column; align-items:center; gap:12px;
  box-shadow:0 8px 28px rgba(0,0,0,.35); }
.term-busy-spin{ width:48px; height:48px; border-radius:50%; box-sizing:border-box;
  border:4px solid var(--term-border); border-top-color:var(--term-primary);
  animation:term-busy-rot .9s linear infinite; }
@keyframes term-busy-rot{ to{ transform:rotate(360deg); } }
.term-busy-msg{ font-size:calc(14px * var(--term-fsr, 1)); text-align:center; }

/* ── Asociere coduri (MAUI BarcodeAssociationPage) ──────────────────────────────────────
   Lista de sugestii = CollectionView HeightRequest 180, rând Grid Padding 6,4 pe Surface:
   numele la stânga (13), codul la dreapta (11, TextSecondary). */
.term-assoclist{ max-height:180px; overflow-y:auto; margin-top:4px; }
.term-assocrow{ display:flex; align-items:center; gap:8px; background:var(--term-surface);
  padding:4px 6px; cursor:pointer; }
.term-assocrow:hover{ background:rgba(59,141,200,.12); }
.term-assocrow .name{ flex:1; min-width:0; font-size:calc(13px * var(--term-fsr, 1)); word-break:break-word; }
.term-assocrow .code{ flex:none; font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); }

/* ── Productivitatea mea (MAUI MyProductivityPage) ──────────────────────────────────────
   Card = Border Surface r6 Padding 14,12 Margin bottom 6; nume 15 bold + procent 16 bold Primary
   pe primul rând, realizat 14 pe al doilea, extra/target 13 TextSecondary pe al treilea (spacing 12). */
.term-prodcard{ background:var(--term-surface); border-radius:6px; padding:12px 14px; margin-bottom:6px; }
.term-prodcard-top{ display:flex; align-items:flex-start; gap:8px; }
.term-prodcard-name{ flex:1; min-width:0; font-size:calc(15px * var(--term-fsr, 1)); font-weight:700; word-break:break-word; }
.term-prodcard-pct{ flex:none; font-size:calc(16px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); }
.term-prodcard-real{ font-size:calc(14px * var(--term-fsr, 1)); }
.term-prodcard-meta{ display:flex; gap:12px; flex-wrap:wrap; font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); }
/* Bara de jos: Reîmprospătează (înălțime 52, 16 bold) + ora ultimei actualizări (12, TextSecondary) */
.term-prodfoot{ display:flex; align-items:center; gap:8px; flex:none; padding-top:8px; }
.term-prodfoot .term-btn{ flex:1; margin-top:0; height:52px; padding:0; font-size:calc(16px * var(--term-fsr, 1)); }
.term-prodfoot .upd{ flex:none; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }

/* ── Notificări (MAUI NotificationsPage) ────────────────────────────────────────────────
   Rând = Border Surface r6 Padding 12,10 Margin bottom 6: clopoțel 22×22 + titlu 14 bold
   și detaliu 12 TextSecondary, ambele cu wrap. */
.term-notifrow{ display:flex; align-items:center; gap:10px; background:var(--term-surface);
  border-radius:6px; padding:10px 12px; margin-bottom:6px; cursor:pointer; }
.term-notifrow > img{ flex:none; width:22px; height:22px; object-fit:contain; }
.term-notifrow .txt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.term-notifrow .t{ font-size:calc(14px * var(--term-fsr, 1)); font-weight:700; word-break:break-word; }
.term-notifrow .d{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); word-break:break-word; }

/* ── Creare palet (create-pallet) — 1:1 cu MAUI CreatePalletPage ─────────────────────────────
   Valori exacte din XAML: selectorul de mod SSCC = Grid "*,*" ColumnSpacing 6 FontSize 13;
   caseta SSCC = Border #E3F2FD/#1A3A5C cu chenar #1565C0/#5BA8DD, Padding 12,8; antetul listei =
   Primary bold 13 Padding 2,6; rândul de linie = Border Surface Padding 12,10 Margin bottom 4;
   „Șterge tot" = DangerButton (#D32F2F, colț 6, înălțime 48, Padding 10,0). */
.term-cpmodes{ display:grid; grid-template-columns:1fr 1fr; column-gap:6px; margin:6px 2px 0; }
.term-cpradio{ display:flex; align-items:center; gap:6px; font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text); cursor:pointer; }
.term-cpradio input{ width:18px; height:18px; accent-color:var(--term-primary); flex:none; }
.term-cpsscc{ background:#E3F2FD; border:1px solid #1565C0; padding:8px 12px; margin-top:6px; flex:none; }
.term-cpsscc .lbl{ font-size:calc(12px * var(--term-fsr, 1)); color:#1565C0; }
.term-cpsscc .val{ font-size:calc(16px * var(--term-fsr, 1)); font-weight:700; color:#0D47A1; word-break:break-all; }
.term-root.dark-look .term-cpsscc{ background:#1A3A5C; border-color:#5BA8DD; }
.term-root.dark-look .term-cpsscc .lbl{ color:#5BA8DD; }
.term-root.dark-look .term-cpsscc .val{ color:#90CAF9; }
@media (prefers-color-scheme:dark){
  .term-root[data-theme="system"] .term-cpsscc{ background:#1A3A5C; border-color:#5BA8DD; }
  .term-root[data-theme="system"] .term-cpsscc .lbl{ color:#5BA8DD; }
  .term-root[data-theme="system"] .term-cpsscc .val{ color:#90CAF9; }
}
.term-cphead{ font-weight:700; font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-primary); padding:6px 2px; flex:none; }
/* List header with the clear-all icon pushed to the right edge */
.term-cphead-row{ display:flex; align-items:center; justify-content:space-between; }
.term-clearall{ background:none; border:none; padding:2px 4px; cursor:pointer; line-height:0; }
.term-clearall img{ width:22px; height:22px; }
.term-cprow{ display:flex; align-items:center; gap:6px; background:var(--term-surface); padding:10px 12px; margin-bottom:4px; }
.term-cprow .txt{ flex:1; min-width:0; font-size:calc(14px * var(--term-fsr, 1)); word-break:break-word; }
.term-cprow .term-line-del{ width:32px; height:32px; padding:4px; }
/* Open pallets of the client offered for a top-up: the whole row is the tap target. */
.term-topup-row{ width:100%; border:0; text-align:left; cursor:pointer; color:var(--term-text); font:inherit; }
.term-topup-row.sel{ outline:2px solid var(--term-primary); outline-offset:-2px; }
.term-actionbar .term-btn.term-cpdanger{ flex:none; background:#D32F2F; height:48px; padding:0 10px;
  margin-top:0; font-size:calc(13px * var(--term-fsr, 1)); font-weight:600; }
.term-actionbar .term-btn.term-cpdanger:hover{ background:#B71C1C; }

/* ── Ecranele „Adaugă …" (add-location / add-partner / add-product / add-indirect-activity) ──
   MAUI: ScrollView + Grid Padding 14 RowSpacing 10, etichete bold 13, rezultat în Success #27AE60. */
.term-addwh{ font-size:calc(14px * var(--term-fsr, 1)); color:gray; margin:2px 2px 4px; }
.term-addtoggle{ margin-top:10px; height:40px; }
.term-addradios{ display:flex; flex-wrap:wrap; gap:16px; margin:6px 2px 0; }
.term-addstatus{ margin-top:12px; font-size:calc(14px * var(--term-fsr, 1)); color:#27AE60; word-break:break-word; }
.term-addprint{ margin-top:10px; height:44px; }
/* Butonul de căutare din SelectWarehouse = ImageButton MAUI: transparent, fără bordură (doar lupa). */
.term-btn.term-scanbtn.plain{ background:transparent; border:none; }

/* ── Confirmare livrare (verification-out) — 1:1 MAUI VerificationOutPage ──────────────
   Antetul documentului = Border Surface, Stroke transparent, radius 4, Padding 6,4, label 13 bold;
   statusul scanării = 13/12 TextSecondary Margin 2,0,0,0; rândul de linie = Border Padding 12,10
   Margin bottom 4, fundal #FFF3E0 (dark #3E2723) și #E8F5E9 când linia e scanată complet. */
.term-vodoc{ background:var(--term-surface); border-radius:4px; padding:4px 6px; font-size:calc(13px * var(--term-fsr, 1)); font-weight:700; word-break:break-word; flex:none; }
.term-vostatus{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); margin:0 0 0 2px; flex:none; }
/* Rândul din lista de documente (Border Surface, Padding 14,12, Margin bottom 6, chevron ›) */
.term-vodoc-row{ display:flex; gap:8px; background:var(--term-surface); padding:12px 14px; margin-bottom:6px; cursor:pointer; }
.term-vodoc-lbl{ flex:1; min-width:0; font-size:calc(14px * var(--term-fsr, 1)); word-break:break-word; }
.term-verifrow{ background:#FFF3E0; padding:10px 12px; margin-bottom:4px; font-size:calc(14px * var(--term-fsr, 1)); word-break:break-word; }
.term-root.dark-look .term-verifrow{ background:#3E2723; }
@media (prefers-color-scheme:dark){
  .term-root[data-theme="system"] .term-verifrow{ background:#3E2723; }
}
/* Linie completă: MAUI forțează #E8F5E9 pe ambele teme (Setter simplu, nu AppThemeBinding),
   deci fixăm și textul închis ca să rămână lizibil pe fundalul deschis. */
.term-verifrow.done,
.term-root.dark-look .term-verifrow.done{ background:#E8F5E9; color:#1A1A1A; }
@media (prefers-color-scheme:dark){
  .term-root[data-theme="system"] .term-verifrow.done{ background:#E8F5E9; color:#1A1A1A; }
}

/* ── Încărcare mașină (loading-scan) — 1:1 MAUI LoadingScanPage ───────────────────────
   Progresul = 15 bold Primary Margin 2,2,0,0; ✔ pe rândul încărcat = 22 bold,
   #1a472a light / #81C784 dark; butonul „Închide cursa" = PrimaryButton 48px lângă sigiliu. */
.term-loadprog{ font-size:calc(15px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); margin:2px 0 0 2px; flex:none; }
.term-loadcheck{ color:#1a472a; font-size:calc(22px * var(--term-fsr, 1)); font-weight:700; align-self:center; margin-left:8px; flex:none; }
.term-root.dark-look .term-loadcheck{ color:#81C784; }
@media (prefers-color-scheme:dark){
  .term-root[data-theme="system"] .term-loadcheck{ color:#81C784; }
}
.term-btn.term-closetrip{ flex:none; height:48px; margin:0; padding:0 14px; font-size:calc(15px * var(--term-fsr, 1)); }

/* ── Cluster picking (cluster-pick) — 1:1 MAUI ClusterPickPage ────────────────────────
   Titluri de secțiune 14 bold (culoare implicită); rând comandă = CheckBox + Label, Padding 2;
   rezumatul = Success #27AE60 13; task consolidat = Label 14 Padding 4. */
.term-clhead{ font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); padding:2px; flex:none; }
.term-clrow{ display:flex; align-items:center; gap:8px; padding:2px; font-size:calc(15px * var(--term-fsr, 1)); cursor:pointer; }
.term-clrow input[type=checkbox]{ width:18px; height:18px; accent-color:var(--term-primary); flex:none; margin:0; }
.term-clrow span{ min-width:0; word-break:break-word; }
.term-clsum{ font-size:calc(13px * var(--term-fsr, 1)); color:#27AE60; padding:0 2px; flex:none; word-break:break-word; }
.term-cltask{ font-size:calc(14px * var(--term-fsr, 1)); padding:4px; word-break:break-word; }
.term-btn.term-clbuild{ flex:none; height:48px; margin-top:6px; padding:0; font-weight:700; }
.term-clfinished{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; height:100%; text-align:center; }
.term-clfinished .t1{ font-weight:700; font-size:calc(16px * var(--term-fsr, 1)); color:#27AE60; }

/* ── POD — dovadă de livrare (pod-pending / pod-confirm) — 1:1 cu MAUI Pages/Pod ─────────────
   Valori exacte din XAML: lista = Grid Padding 8 RowSpacing 6, status 12 TextSecondary Margin 4,0;
   rândul = Border Surface RoundRectangle 6 Padding 12,10 Margin bottom 6 (partener 15 bold + dată 12,
   document • adresă 12 TextSecondary). Confirmarea = ScrollView + VerticalStackLayout Padding 12
   Spacing 10, etichete bold 13, semnătură într-un Border 1px TextSecondary colț 6 înălțime 180,
   GPS/Foto pe Grid "*,Auto", galerie de poze 90 cu miniaturi 80×80 și ✕ pe fundal #80000000. */
.term-podstatus{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); margin:0 4px; flex:none; }
.term-podrow{ background:var(--term-surface); border-radius:6px; padding:10px 12px; margin-bottom:6px; cursor:pointer; }
.term-podrow-top{ display:flex; align-items:flex-start; gap:8px; }
.term-podrow-top .n{ flex:1; min-width:0; font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); word-break:break-word; }
.term-podrow-top .d{ flex:none; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-podrow-sub{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); word-break:break-word; }
/* Antetul documentului pe ecranul de confirmare (partener 16 bold / document 13 / adresă 12) */
.term-poddoc{ background:var(--term-surface); border-radius:6px; padding:10px 12px; }
.term-poddoc .p1{ font-weight:700; font-size:calc(16px * var(--term-fsr, 1)); word-break:break-word; }
.term-poddoc .p2{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-poddoc .p3{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); word-break:break-word; }
/* Etichetele secțiunilor = Label bold 13 (Spacing 10 între elementele stivei) */
.term-podlbl{ font-weight:700; font-size:calc(13px * var(--term-fsr, 1)); margin-top:10px; }
.term-podfield{ margin-top:4px; width:100%; box-sizing:border-box; }
/* Pad-ul de semnătură = DrawingView (LineColor Primary, LineWidth 3) în Border 1px, colț 6, h180 */
.term-sigbox{ margin-top:4px; border:1px solid var(--term-text2); border-radius:6px; height:180px;
  overflow:hidden; flex:none; }
.term-sigpad{ display:block; width:100%; height:100%; background:#FFFFFF; touch-action:none; cursor:crosshair; }
.term-root.dark-look .term-sigpad{ background:#252525; }
@media (prefers-color-scheme:dark){ .term-root[data-theme="system"] .term-sigpad{ background:#252525; } }
.term-btn.term-podclear{ height:40px; font-size:calc(13px * var(--term-fsr, 1)); padding:0; margin-top:10px; }
/* Rândurile GPS și Foto: text la stânga, buton la dreapta (Grid "*,Auto" ColumnSpacing 8) */
/* Per-line POD: one compact row per delivery line; a line with a difference opens its quantity
   and reason underneath and is marked with the accent border. */
.term-podlines{ margin-top:4px; display:flex; flex-direction:column; gap:4px; }
.term-podline{ background:var(--term-surface); border-radius:6px; padding:6px 8px; border-left:3px solid transparent; }
.term-podline.diff{ border-left-color:var(--term-primary); }
.term-podline-top{ display:flex; align-items:center; gap:8px; }
.term-podline-top .n{ flex:1; min-width:0; font-weight:700; font-size:calc(13px * var(--term-fsr, 1)); word-break:break-word; }
.term-podline-top .n .s{ font-weight:400; color:var(--term-text2); }
.term-podline-top .q{ flex:none; font-size:calc(13px * var(--term-fsr, 1)); }
.term-btn.term-podline-btn{ flex:none; height:34px; margin-top:0; padding:0 10px; font-size:calc(12px * var(--term-fsr, 1)); }
.term-podline-diff{ display:flex; gap:6px; margin-top:6px; }
.term-podline-diff .term-input{ flex:1; min-width:0; }
.term-podside{ display:flex; align-items:center; gap:8px; margin-top:10px; }
.term-podside-main{ flex:1; min-width:0; }
.term-podside .term-podlbl{ margin-top:0; }
.term-podgpstext{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); word-break:break-word; }
.term-btn.term-podside-btn{ flex:none; height:44px; margin-top:0; padding:0 14px; font-size:calc(14px * var(--term-fsr, 1)); }
.term-btn.term-podside-btn.gpsbtn{ width:80px; padding:0; }
/* Galeria de poze: bandă orizontală de 90 cu miniaturi 80×80 și ✕ peste colțul din dreapta-sus */
.term-podphotos{ display:flex; gap:6px; height:90px; overflow-x:auto; margin:4px 0;
  align-items:flex-start; flex:none; }
.term-podphoto{ position:relative; width:80px; height:80px; flex:none; border-radius:6px; overflow:hidden; }
.term-podphoto img{ width:100%; height:100%; object-fit:cover; display:block; }
.term-podphoto .x{ position:absolute; top:0; right:0; width:24px; height:24px; padding:0; border:none;
  background:rgba(0,0,0,.5); color:#fff; font-size:calc(13px * var(--term-fsr, 1)); line-height:24px; cursor:pointer; }
.term-poderr{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-error); margin-top:10px; word-break:break-word; }
.term-btn.term-podsave{ height:52px; font-size:calc(16px * var(--term-fsr, 1)); font-weight:700; margin:8px 0 16px; }
.term-hiddenfile{ position:absolute; width:0; height:0; opacity:0; border:0; padding:0; margin:0; }

/* ── Linie producție (production-line) — 1:1 cu MAUI ProductionLinePage ──────────────────────
   Grid Padding 10 RowSpacing 10: două casete Surface Padding 10 colț 6 (sesiune 13 / palet 13 bold),
   câmpul de scanare, Grid "*,*" ColumnSpacing 6 cu Adaugă (Primary) + Finalizează (Secondary),
   ANDON = buton Error alb h52 16 bold cu textul opririi sub el (12 bold Error, centrat),
   caseta de status ocupă rândul elastic, iar Închide sesiunea e tot un buton Error. */
.term-plcard{ background:var(--term-surface); border-radius:6px; padding:10px; font-size:calc(13px * var(--term-fsr, 1));
  word-break:break-word; flex:none; margin-top:10px; }
.term-plcard.b{ font-weight:700; }
.term-plscan{ margin-top:10px; width:100%; box-sizing:border-box; flex:none; }
/* Scan row of the production line: the field alone on larger screens; on small ones it shares the row
   with "Add box", and finishing the pallet and ANDON sit in the title bar (.term-plmini). */
.term-plscanrow{ display:flex; gap:4px; align-items:stretch; margin-top:10px; flex:none; min-width:0; }
.term-plscanrow .term-plscan{ margin-top:0; flex:1; min-width:0; }
.term-appbar .term-actions .term-plmini, .term-plscanrow .term-plmini{ display:none; }
.term-plbtns{ display:grid; grid-template-columns:1fr 1fr; column-gap:6px; margin-top:10px; flex:none; }
.term-plbtns .term-btn, .term-plbtns .term-btn2{ margin-top:0; height:48px; padding:0; font-size:calc(14px * var(--term-fsr, 1)); }
.term-btn.term-andon{ background:var(--term-error); height:52px; font-size:calc(16px * var(--term-fsr, 1)); font-weight:700;
  margin-top:10px; flex:none; }
.term-btn.term-andon:hover{ background:var(--term-error); }
.term-andontext{ font-size:calc(12px * var(--term-fsr, 1)); font-weight:700; color:var(--term-error); text-align:center; margin-top:4px; }
.term-plstatus{ background:var(--term-surface); border-radius:6px; padding:10px; font-size:calc(12px * var(--term-fsr, 1));
  color:var(--term-text2); margin-top:10px; flex:1; min-height:0; overflow-y:auto; word-break:break-word; }
/* Pe ecranele unde e un RASPUNS de o linie, nu un jurnal, cutia se face cat textul. Cu flex:1
   mostenit de la jurnalul liniei de productie, un mesaj de doua randuri desena un card gol cat tot
   ecranul — vizibil mai ales pe telefon, unde inghitea pagina intreaga. */
.term-plstatus.is-message{ flex:none; }
/* Fara mesaj nu se deseneaza nimic: banda goala de sub butoane arata ca un camp pe care operatorul
   incearca sa apese. */
.term-plstatus:empty, .term-plcard:empty{ display:none; }
.term-btn.term-plclose{ background:var(--term-error); margin-top:10px; flex:none; }
.term-btn.term-plclose:hover{ background:var(--term-error); }

/* Linia de producție pe ecrane scunde (WD5 254/321 px, WD1 II 313 px).
   Ce se vede pe telefon nu se schimbă: totul de aici e sub pragul de ecran mic.

   Trei lucruri costau rândurile în care ar trebui să se vadă paleții:
   • caseta de jurnal avea `flex:1`, deci înghițea TOT spațiul liber — pe captura de la client era
     un dreptunghi alb de vreo 350 px cu un singur rând de text în el. Aici primește două rânduri;
   • butoanele de 48-52 px și marginile de 10 px, în șase locuri, adunau singure peste 100 px;
   • lista de paleți creștea nelimitat, împingând „Închide sesiunea" sub marginea de jos.
   Literele NU se micșorează (regula ecranelor mici): se strâng benzile, nu textul. */
@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  .term-plcard{ padding:6px 8px; margin-top:5px; }
  .term-plscan{ margin-top:5px; }
  .term-plscanrow{ margin-top:5px; }
  .term-plscanrow .term-plscan{ margin-top:0; }
  .term-plscanrow .term-plmini{ display:block; margin-top:0; padding:0 10px; white-space:nowrap; font-size:calc(14px * var(--term-fsr, 1)); }
  .term-appbar .term-actions .term-plmini{ display:inline-flex; }
  /* ANDON keeps its red in the title bar; once the line is stopped a ring marks that the same button
     now resumes production, because the stop text below can be scrolled away. */
  .term-appbar .term-actions .term-andonmini{ background:var(--term-error); border-radius:6px; margin-right:4px; }
  .term-appbar .term-actions .term-andonmini.on{ box-shadow:inset 0 0 0 3px var(--term-on-primary); }
  .term-plbtns{ display:none; }
  .term-plrest .term-btn.term-andon{ display:none; }
  .term-plrest .term-section-title.term-plonly{ display:none; }
  .term-plbtns{ margin-top:5px; }
  .term-plbtns .term-btn, .term-plbtns .term-btn2{ height:38px; }
  .term-btn.term-andon{ height:40px; margin-top:5px; }
  .term-andontext{ margin-top:2px; }
  .term-plstatus{ flex:none; max-height:38px; padding:5px 8px; margin-top:5px; }
  .term-pllist{ max-height:132px; }
  .term-btn.term-plclose{ margin-top:5px; height:40px; }
  .term-plrest .term-section-title{ margin:6px 0 3px; }
}

/* ── Validare / Confirmare producție — 1:1 cu MAUI ValidateProductionHeaderPage ──────────────
   Rând = Border Surface Padding 12,10 Margin bottom 6: produs 15 bold (trunchiat) + #id 13 bold
   Primary, document 12 și dată 12 TextSecondary, iar userul alocat 11 bold Primary (doar admin). */
.term-vprow{ background:var(--term-surface); padding:10px 12px; margin-bottom:6px; cursor:pointer; }
.term-vprow-line{ display:flex; align-items:center; gap:6px; }
.term-vprow .name{ flex:1; min-width:0; font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.term-vprow .id{ flex:none; font-weight:700; font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-primary); }
.term-vprow .no{ flex:1; min-width:0; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); word-break:break-word; }
.term-vprow .date{ flex:none; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-vprow .alloc{ font-size:calc(11px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); margin-top:2px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── Validare (validate-in/out/transfer/retururi + validate-content) — 1:1 cu MAUI ──────────
   Lista de documente: Border Surface, Stroke=Transparent, Padding 12,10, Margin bottom 6.
   Grid "*,Auto": partener 15 bold + #id 13 bold Primary; nr. document 12 și data 12
   TextSecondary; detalii 11 TextSecondary pe toată lățimea; userul alocat 11 bold Primary
   (vizibil doar pentru IsSystem/IsAdmin). La transfer, destinația e 14 bold Primary. */
.term-valdoc{ background:var(--term-surface); padding:10px 12px; margin-bottom:6px; cursor:pointer; }
.term-valdoc-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:6px; }
.term-valdoc-name{ flex:1; min-width:0; font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.term-valdoc-id{ flex:none; font-weight:700; font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-primary); }
.term-valdoc-dest{ font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); color:var(--term-primary); overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.term-valdoc-sub{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-valdoc-det{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:2px; word-break:break-word; }
.term-valdoc-alloc{ font-size:calc(11px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); margin-top:2px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ── „Se lucrează acum pe documentul ăsta" ─────────────────────────────────────────────────
   Marcaj pentru documentele preluate de cineva ȘI cu semn de viață recent (WorkInProgressLogic).
   Contur, nu bară laterală și nu fundal: `outline` nu ocupă spațiu, deci rândul marcat rămâne
   aliniat cu restul listei, iar în MAUI se obține exact același efect din Stroke-ul Border-ului
   (regula „UI identic în toate aplicațiile"). Culoarea vine din --term-primary, nu hardcodată:
   ecranele au opt teme, iar un accent fix devine invizibil pe cel puțin una dintre ele.
   Rândul propriu (cine + de când) e 11 bold, ca linia de alocare de deasupra. */
.term-valdoc.wip, .term-vprow.wip{ outline:2px solid var(--term-primary); outline-offset:-2px; }
/* ── Conținutul paletului pe ecranul de editare ─────────────────────────────────────────────
   Un rând per articol: denumirea la stânga, cantitatea cu unitatea la dreapta (aliniată, ca să
   poată fi citită în coloană când paletul are multe articole), iar codul și lotul dedesubt.
   Aceleași dimensiuni ca rândurile din listele de validare, ca ecranele să arate ca o familie. */
.term-palcontent{ background:var(--term-surface); padding:8px 12px; margin-bottom:4px; }
.term-palcontent-row{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.term-palcontent-name{ flex:1; min-width:0; font-weight:700; font-size:calc(14px * var(--term-fsr, 1));
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-palcontent-qty{ flex:none; font-weight:700; font-size:calc(14px * var(--term-fsr, 1));
  color:var(--term-primary); white-space:nowrap; }
.term-palcontent-qtyin{ flex:none; width:72px; text-align:right; font-weight:700;
  font-size:calc(14px * var(--term-fsr, 1)); }
.term-palcontent-uom{ flex:none; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-palcontent-del{ flex:none; }
.term-palcontent-sub{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:2px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.term-wip{ font-size:calc(11px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary);
  margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Documentul propriu: contur întrerupt, mai discret — pe el operatorul lucrează oricum, iar
   conturul plin trebuie să rămână semnalul „e ALTCINEVA pe documentul ăsta". */
.term-valdoc.wip.mine, .term-vprow.wip.mine{ outline-style:dashed; }
.term-wip.mine{ font-weight:400; color:var(--term-text2); }
/* REC-010: editorul inline de lot/expirare/serie de pe linia de recepție. */
.term-lotedit{ display:grid; gap:6px; margin:6px 0 4px; padding:8px;
  border:1px dashed var(--term-primary); border-radius:6px; }
.term-lotedit-btns{ display:flex; gap:6px; }
.term-lotedit-btns .term-btn{ flex:1; }

/* REC-005: filtrul Toate / În lucru / Libere de deasupra listei de validare. Segmente egale,
   starea activă pe culoarea primară — același limbaj vizual ca marcajul term-wip de mai sus. */
.term-wipfilter{ display:flex; gap:4px; margin-top:6px; }
.term-wipfilter button{ flex:1; border-radius:6px; padding:6px 4px; font-weight:700;
  font-size:calc(13px * var(--term-fsr, 1)); border:1px solid var(--term-border, #B0BEC5);
  background:var(--term-surface, transparent); color:var(--term-text2); }
.term-wipfilter button.active{ background:var(--term-primary); border-color:var(--term-primary);
  color:#fff; }

/* Linia de document în validare: denumire 14 bold + cantitate scanată/comandată 14 bold Error
   (aliniată dreapta), butoanele de acțiune 36×36 fără fundal, cod|cod de bare 11 TextSecondary,
   locația sugerată 11 bold verde (#1B5E20 light / #81C784 dark) și link-ul „Toate locațiile (N)"
   11 Primary subliniat. */
.term-valline{ background:var(--term-surface); padding:10px 12px; margin-bottom:6px; cursor:pointer;
  display:flex; align-items:flex-start; }
/* Poza articolului în lista de poziții — aceeași dimensiune ca în listele de intrare/ieșire manuală. */
.term-valline-img{ width:52px; height:48px; object-fit:contain; margin-right:8px; flex:none; align-self:center; }
.term-valline-main{ flex:1; min-width:0; }
.term-valline-top{ display:flex; align-items:center; gap:6px; }
.term-valline-name{ flex:1; min-width:0; font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); word-break:break-word; }
.term-valline-qty{ flex:none; font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); color:var(--term-error);
  text-align:right; white-space:nowrap; }
.term-valline-btn{ width:36px; height:36px; flex:none; padding:5px; background:transparent;
  border:none; cursor:pointer; }
.term-valline-btn img{ width:100%; height:100%; object-fit:contain; display:block; }
.term-valline-sub{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); word-break:break-word; margin-top:2px; }
.term-valline-loc{ font-size:calc(11px * var(--term-fsr, 1)); font-weight:700; color:#1B5E20; word-break:break-word; margin-top:2px; }
.term-valline-more{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-primary); text-decoration:underline;
  padding:2px 12px 2px 0; cursor:pointer; }
.term-root.dark-look .term-valline-loc{ color:#81C784; }
@media (prefers-color-scheme:dark){ .term-root[data-theme="system"] .term-valline-loc{ color:#81C784; } }
/* Paleti intregi propusi la picking (ORD-009/010/016) — albastru, ca sa se distinga de locatia
   de picking (verde): sunt doua instructiuni diferite pentru operator. */
.term-valline-pallets{ font-size:calc(11px * var(--term-fsr, 1)); font-weight:700; color:#0D47A1; word-break:break-word; margin-top:2px; }
.term-root.dark-look .term-valline-pallets{ color:#90CAF9; }
@media (prefers-color-scheme:dark){ .term-root[data-theme="system"] .term-valline-pallets{ color:#90CAF9; } }

/* Bara de jos: panoul de totaluri (mereu vizibil, FĂRĂ colapsare). Butonul Creare palet s-a mutat
   in bara de titlu (2026-08-27, ecrane mici) — jos ramane doar linia subtire de totaluri. */
.term-valbottom{ display:flex; align-items:center; gap:6px; padding-top:4px; flex:none; }
/* Totalurile pe UN singur rand, subtiri — nu mai mananca din lista de pozitii. */
.term-valtotals.slim{ flex-direction:row; align-items:center; gap:8px; height:auto; padding:3px 8px; }
/* 2026-08-27 (ecrane mici): antetul documentului se restrange la o singura linie din tap. */
.term-hdr-toggle{ cursor:pointer; }
.term-hdr-chevron{ color:var(--term-primary); flex:none; }
.term-hdrbox-text.one-line{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; word-break:normal; }
.term-valtotals{ flex:1; min-width:0; display:flex; flex-direction:column; justify-content:center;
  height:48px; padding:4px 8px; box-sizing:border-box; background:var(--term-surface);
  border:1px solid var(--term-primary); border-radius:6px; font-size:calc(11px * var(--term-fsr, 1)); font-weight:700; }
.term-valtotals div{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-valbottom .term-palletcta{ flex:none; }

/* Butonul „Paleți document" din rândul de scanare, cu badge-ul roșu de număr peste colț. */
.term-palletbtn-wrap{ position:relative; flex:none; }

/* Sugestia de locație pe pagina de scanare: doar indicație (portocaliu), nu pre-completare. */
/* Sugestia de locatie si randul "ramas de validat" stau pe aceeasi margine ca restul continutului
   si putin mai mari: sunt informatia pe care operatorul o citeste inainte de scanare, si lipite
   de marginea ecranului se citeau greu. */
.term-sughint{ font-size:calc(14px * var(--term-fsr, 1)); color:#B45309; word-break:break-word;
  margin-top:6px; padding:0 10px; }
.term-root.dark-look .term-sughint{ color:#FBBF24; }
@media (prefers-color-scheme:dark){ .term-root[data-theme="system"] .term-sughint{ color:#FBBF24; } }

/* Panoul cu seriile acumulate (galben, culorile EXACTE din XAML). */
.term-snbox{ background:#FFF9C4; border:1px solid #F9A825; border-radius:6px; padding:6px 8px;
  font-size:calc(13px * var(--term-fsr, 1)); color:#5D4037; word-break:break-word; margin-top:8px; }
.term-root.dark-look .term-snbox{ background:#3E3718; border-color:#FFF176; color:#BCAAA4; }
@media (prefers-color-scheme:dark){ .term-root[data-theme="system"] .term-snbox{
  background:#3E3718; border-color:#FFF176; color:#BCAAA4; } }

/* ── Sarcinile mele (MAUI MyTasksPage) ──────────────────────────────────────────────────
   Valorile exacte din XAML: Grid RowSpacing 6; starea = label bold 14 Margin 2,4,0,0; listele =
   CollectionView Margin 0,4,0,0; antetul documentelor = bold 14 Margin 2,10,0,0; EmptyView =
   italic 14 TextSecondary centrat (Padding 16,16,16,8 la sarcini / 16,8,16,16 la documente);
   cardul = Border Surface Stroke transparent Padding 10 Margin bottom 6; butoanele de pe card =
   înălțime 34 (Start = PrimaryButton, Gata = Success #27AE60 din Colors.xaml). */
.term-mtstatus{ font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); margin:4px 0 0 2px; }
.term-mtlist{ margin-top:10px; }
.term-mthead{ font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); margin:16px 0 0 2px; }
.term-empty.tasks{ padding:16px 16px 8px; }
.term-empty.docs{ padding:8px 16px 16px; }
.term-mtcard{ background:var(--term-surface); padding:10px; margin-bottom:6px; }
.term-mtcard.tap{ cursor:pointer; }
.term-mtcard-top{ display:flex; align-items:center; gap:8px; }
.term-mtcard-type{ flex:1; min-width:0; font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); word-break:break-word; }
.term-mtcard-status{ flex:none; font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-primary); }
.term-mtcard-mid{ display:flex; align-items:center; gap:8px; }
.term-mtcard-prod{ flex:1; min-width:0; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); word-break:break-word; }
.term-mtcard-prio{ flex:none; font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-mtcard-actions{ display:flex; align-items:center; gap:6px; margin-top:6px; }
.term-mtcard-src{ flex:1; min-width:0; font-size:calc(11px * var(--term-fsr, 1)); word-break:break-word; }
.term-mtbtn{ flex:none; height:34px; border:none; border-radius:6px; color:#fff;
  font-size:calc(12px * var(--term-fsr, 1)); font-weight:700; padding:0 14px; cursor:pointer; }
.term-mtbtn.start{ background:var(--term-primary); }
.term-mtbtn.done{ background:#27AE60; }
/* Butonul de reîncărcare rămâne fixat sub liste (SecondaryButton, înălțime 44). */
.term-mtfoot{ flex:none; padding-top:6px; }
.term-mtfoot .term-btn2{ width:100%; height:44px; }

/* ── Badge de notificări pe tile-ul din meniu (MAUI Controls/ActionTile) ─────────────────
   Border Error (#C0392B) în colțul dreapta-sus, colț 11, înălțime 22 și lățime minimă 22,
   Padding 5,0, Margin 0,2,2,0, InputTransparent; text alb bold 12, „99+" peste 99. */
.term-tile{ position:relative; }
.term-tilebadge{ position:absolute; top:2px; right:2px; box-sizing:border-box;
  min-width:22px; height:22px; padding:0 5px; border-radius:11px;
  background:var(--term-error); color:#fff; font-size:calc(12px * var(--term-fsr, 1)); font-weight:700;
  display:flex; align-items:center; justify-content:center; pointer-events:none; }
/* Butonul de foto e un <label for> ca să deschidă camera în gestul utilizatorului; îl aliniem
   vizual cu butoanele reale (labelul nu moștenește centrarea de la <button>). */
label.term-btn{ display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }

/* ── Camera barcode scanning (MAUI Pages/Common/CameraScanPage) ──────────────────────────
   Full-screen black sheet with the live preview between the two hint lines and the same two
   buttons as the device page: flashlight on Primary, cancel on Error. It sits above the busy
   overlay (190) and below the message box (200), so an alert raised while it is open stays on top. */
.term-cam-backdrop{ position:fixed; inset:0; z-index:195; background:#000000;
  display:flex; flex-direction:column; }
.term-cam-head{ flex:none; background:var(--term-primary); color:var(--term-on-primary);
  padding:12px 14px; font-size:calc(16px * var(--term-fsr, 1)); font-weight:700; }
.term-cam-hint{ flex:none; padding:8px 12px; text-align:center; font-size:calc(13px * var(--term-fsr, 1)); color:#FFFFFF; }
.term-cam-view{ flex:1; min-height:0; position:relative; overflow:hidden; }
.term-cam-video{ display:block; width:100%; height:100%; object-fit:cover; background:#000000; }
/* Aiming frame — the operator points the label at the middle band, as on the device overlay. */
.term-cam-frame{ position:absolute; left:8%; right:8%; top:50%; height:34%;
  transform:translateY(-50%); border:2px solid var(--term-primary); border-radius:8px;
  pointer-events:none; }
.term-cam-foot{ flex:none; display:flex; gap:10px; padding:10px;
  padding-bottom:calc(10px + env(safe-area-inset-bottom, 0px)); }
.term-cam-btn{ flex:1; height:48px; border:none; border-radius:0; cursor:pointer;
  color:#FFFFFF; font-size:calc(15px * var(--term-fsr, 1)); font-weight:700; }
.term-cam-btn.torch{ background:var(--term-primary); color:var(--term-on-primary); }
.term-cam-btn.cancel{ background:var(--term-error); }

/* About page — same visual order and proportions as MAUI Pages/About/AboutPage: centred name and
   version, a 120px logo, left-aligned description blocks (easier to read for long text, per the
   MAUI comment), the two site cards, then the copyright line. */
.term-about{ padding:20px 24px; }
.about-name{ font-size:calc(32px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); text-align:center; margin:8px 0 4px; }
.about-version{ font-size:calc(14px * var(--term-fsr, 1)); color:var(--term-text2); text-align:center; margin-bottom:20px; }
.about-rule{ height:1px; background:var(--term-primary); opacity:.15; margin:20px 0; }
.about-logo{ display:block; width:120px; height:120px; object-fit:contain; margin:0 auto 20px; }
.about-text{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); text-align:left; margin:0 0 12px; line-height:1.45; }
.about-links{ display:flex; justify-content:center; gap:20px; margin-bottom:16px; flex-wrap:wrap; }
.about-link{ display:flex; flex-direction:column; align-items:center; gap:2px; padding:10px 16px;
  border:1.5px solid var(--term-primary); border-radius:8px; text-decoration:none; background:transparent; }
.about-link .l1{ font-size:calc(13px * var(--term-fsr, 1)); font-weight:700; color:var(--term-primary); }
.about-link .l2{ font-size:calc(10px * var(--term-fsr, 1)); color:var(--term-text2); }
.about-copyright{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); text-align:center; }


/* Wider screens: keep the operator's "buttons per row" setting on phones (1:1 with MAUI), but let
   the grid fill the available width on tablets and large terminals instead of leaving half the
   screen empty. Tiles stay in a comfortable touch range rather than growing without limit. */
@media (min-width: 700px){
  .term-tiles{ grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:10px; }
  .term-body{ padding:16px; }
  .term-body.term-scroll{ padding:16px; }
  .term-tile-lbl{ font-size:calc(13px * var(--term-fsr, 1)); }
}
@media (min-width: 1100px){
  .term-tiles{ grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); }
}
/* Reading-width cap for text-heavy screens, so long lines do not run the full width of a tablet. */
@media (min-width: 700px){
  .term-about{ max-width:720px; margin:0 auto; }
  .term-notifrow{ max-width:900px; }
}

/* ── Triaj retururi (RMA) — butoanele de dispoziție per linie ─────────────────────────────────
   Patru opțiuni scurte pe un rând; cea aleasă rămâne evidențiată. Fără culori fixe: folosim
   variabilele temei, ca restul terminalului. */
.term-disprow{ display:flex; gap:6px; margin-top:8px; flex-wrap:wrap; }
.term-dispbtn{ flex:1 1 0; min-width:72px; padding:8px 6px; font-size:calc(13px * var(--term-fsr, 1)); font-weight:700;
  border:1px solid var(--term-border); border-radius:6px; background:var(--term-surface);
  color:var(--term-text); cursor:pointer; }
.term-dispbtn.on{ background:var(--term-primary); color:var(--term-on-primary);
  border-color:var(--term-primary); }

/* ── Poziții închise pe validare (comutator lângă partener) ─────────────────
   Cantitatea unei poziții complet scanate se vede verde, ca să se distingă dintr-o privire
   de cele rămase de lucrat (care sunt roșii). */
.term-valline-qty.is-closed{ color:var(--term-success, #2e7d32); }

/* Antetul devine rând: textul la stânga, comutatorul împins la dreapta. */
.term-hdrbox-row{ display:flex; align-items:center; gap:10px; }
.term-hdrbox-row .term-hdrbox-text{ flex:1; min-width:0; }

/* Comutator compact (checkbox ascuns + pistă/buton desenate), dimensionat pentru deget. */
.term-switch{ flex:none; display:inline-flex; align-items:center; cursor:pointer; }
.term-switch input{ position:absolute; opacity:0; width:0; height:0; }
.term-switch-track{ width:42px; height:24px; border-radius:12px; background:#c8ccd2;
  transition:background .15s; display:block; position:relative; }
.term-switch-thumb{ position:absolute; top:2px; left:2px; width:20px; height:20px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3); transition:transform .15s; }
.term-switch input:checked + .term-switch-track{ background:var(--term-success, #2e7d32); }
.term-switch input:checked + .term-switch-track .term-switch-thumb{ transform:translateX(18px); }
.term-switch input:focus-visible + .term-switch-track{ outline:2px solid var(--term-primary, #4a86c8);
  outline-offset:2px; }

/* ── Vizualizator de imagine cu zoom (Info produs → Imagini) ────────────────
   Echivalentul MAUI FullscreenImagePage. `touch-action:none` e obligatoriu: fără el browserul
   preia gesturile de pinch/scroll și pointerele nu mai ajung la aplicație. */
.term-imgzoom{ flex:1; min-height:0; overflow:hidden; display:flex; align-items:center;
  justify-content:center; touch-action:none; cursor:grab; background:#000; }
.term-imgzoom:active{ cursor:grabbing; }
.term-imgzoom img{ max-width:100%; max-height:100%; object-fit:contain;
  transform-origin:center center; will-change:transform; user-select:none; -webkit-user-drag:none; }

/* Navigare între imagini, când produsul are mai multe. */
.term-imgnav{ flex:none; display:flex; gap:8px; justify-content:center; padding:8px;
  background:#000; }
.term-imgnav .term-btn{ min-width:72px; }
.term-imgnav .term-btn:disabled{ opacity:.35; }

/* Miniaturile devin acționabile: semnalăm că se pot deschide. */
.term-gridimg{ cursor:zoom-in; }

/* ── Panoul „scanat pe locațiile" de pe rândul de validare ── */
.term-valline-splits{ margin:4px 0 2px 8px; border-left:2px solid var(--term-line, #d5dae1);
  padding-left:10px; }
.term-valline-split{ display:flex; justify-content:space-between; gap:10px; font-size:calc(12.5px * var(--term-fsr, 1));
  color:var(--term-text2, #5d6b7a); padding:2px 0; }
.term-valline-split .qty{ font-weight:700; color:var(--term-text, #16202b); white-space:nowrap; }

/* Eticheta „Group by lots" de lângă switch, pe rândul locației (Info locație). */
.term-lots-lbl{ flex:none; font-size:calc(12.5px * var(--term-fsr, 1)); color:var(--term-text2, #5d6b7a); }

/* Chenarul imaginii de sub tabelul Info produs — paritate cu MAUI (imagine jos, în ramă). */
.term-prodimg-box{ margin-top:10px; border:1px solid var(--term-primary, #4a86c8);
  border-radius:8px; padding:6px; }
.term-prodimg-box .term-prodimg{ display:block; max-width:100%; margin:0 auto; }

/* ── Info Document: cardul documentului, oglinda Border-ului MAUI (badge + meta + detalii) ── */
.term-doccard{ border:1.5px solid var(--term-primary); border-radius:8px; background:var(--term-surface); padding:12px 14px; margin-bottom:8px; }
.term-doccard-head{ display:flex; align-items:center; gap:8px; }
.term-doccard-badge{ background:var(--term-primary); color:#fff; font-weight:700; font-size:calc(11px * var(--term-fsr, 1)); border-radius:4px; padding:3px 8px; }
.term-doccard-no{ font-weight:700; font-size:calc(13px * var(--term-fsr, 1)); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-doccard-partner{ font-size:calc(12px * var(--term-fsr, 1)); margin-top:4px; }
.term-doccard-meta{ display:grid; grid-template-columns:1fr 1fr; gap:2px 8px; margin-top:4px; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-doccard-status{ color:var(--term-primary); }
.term-doccard-details{ display:flex; justify-content:space-between; margin-top:6px; font-size:calc(12px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text2); cursor:pointer; }
.term-doccard-detail-text{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:2px; white-space:pre-wrap; }
/* Liniile documentului: lot/exp + cantitati pe 2 coloane, ca grila MAUI. */
.term-docline-2col{ display:grid; grid-template-columns:1fr 1fr; gap:2px 8px; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-docline-qty{ color:var(--term-error); margin-top:2px; }
/* Butonul de print de pe randul unui palet asociat. */
.term-pallet-print{ align-self:center; flex:0 0 auto; }

/* Stare document: selector + buton Salveaza pe acelasi rand (Picker + PrimaryButton in MAUI). */
.term-statusrow{ display:flex; gap:8px; align-items:center; margin-top:4px; }
.term-statusrow select{ flex:1; }
.term-savestatus{ flex:0 0 auto; width:52px; height:44px; display:flex; align-items:center; justify-content:center; background:var(--term-primary); border:none; border-radius:8px; }

/* Info Palet: totalul pe rand, rosu aldin — ca Label-ul TotalLine din MAUI. */
.term-pallet-total{ color:var(--term-error); font-weight:700; }

/* ── Stoc pe locatii: oglinda paginii MAUI (antet produs, switch-uri pe rand, total jos) ── */
.term-stock-descr{ font-weight:700; color:var(--term-primary); font-size:calc(14px * var(--term-fsr, 1)); padding:4px 2px; white-space:pre-line; }
.term-stock-switchrow{ display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0 2px; }
.term-stock-switch{ display:flex; align-items:center; justify-content:space-between; gap:4px; height:36px; font-size:calc(12px * var(--term-fsr, 1)); }
.term-stock-switch-full{ padding:0 2px; }
.term-stock-locdetail{ font-size:calc(10px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-stock-wh{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-primary); }
.term-stock-qty{ color:var(--term-error); font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); align-self:flex-start; }
.term-stock-reserved{ color:var(--term-error); }
.term-stock-available{ color:var(--term-primary); font-weight:700; }
.term-stock-totalbar{ border-top:1px solid var(--term-primary); margin-top:4px; padding:6px 2px 4px; text-align:right; font-weight:700; font-size:calc(15px * var(--term-fsr, 1)); color:var(--term-primary); }

/* Antetul panoului pliabil de imagine (Validare produs) — ca randul MAUI cu chevron. */
.term-imgpanel-head{ display:flex; justify-content:space-between; font-size:calc(12px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text2); cursor:pointer; padding:2px 2px 0; }

/* Cantitatea ramasa de validat pe pagina de atribute — bold albastru, ca pe MAUI. */
.term-remaining{ font-weight:700; color:var(--term-primary); font-size:calc(14px * var(--term-fsr, 1)); padding:0 10px; }

/* Productivitate: filtrele de perioada (Azi / Luna trecuta / Interval) + range de date. */
.term-prodfilters{ display:flex; gap:6px; margin-bottom:6px; }
.term-tabbtn{ flex:1; padding:8px 4px; border:1px solid var(--term-primary); border-radius:8px; background:var(--term-surface); color:var(--term-primary); font-weight:700; font-size:calc(12px * var(--term-fsr, 1)); }
.term-tabbtn.active{ background:var(--term-primary); color:var(--term-on-primary); }
.term-prodrange{ display:flex; gap:10px; margin-bottom:6px; font-size:calc(12px * var(--term-fsr, 1)); }
.term-prodrange label{ display:flex; flex-direction:column; gap:2px; flex:1; }
.term-prodrange input{ padding:6px; border:1px solid var(--term-border); border-radius:6px; background:var(--term-surface); color:var(--term-text); }

/* Bulk move: per-row quantity input (visible only on selected rows) */
.term-bmqty { width: 84px; text-align: right; padding: 4px 6px; flex: none; }


/* ── Terminale cu ecran ingust (NLS-N7 si similare, sub ~540px) ─────────────────────────────────
   Nu schimbam structura, doar strangem spatiile: pe latime nimic nu mai iese din ecran, iar pe
   inaltime incap cu 2-3 randuri de lista mai mult, ceea ce conteaza cand operatorul cauta un
   articol intr-o receptie lunga. */
@media (max-width: 540px) {
  .term-body{ padding-left:8px; padding-right:8px; }
  .term-body.term-scroll{ padding-left:8px; padding-right:8px; }
  .term-input{ padding:9px 6px; }
  .term-scanbtn{ width:40px; height:40px; }
  .term-scanbtn img{ width:20px; height:20px; }
  .term-hdrbox{ padding:7px 8px; margin-top:6px; }
  .term-panel{ padding:8px; }
  .term-scanrow{ margin-top:6px; gap:3px; }
  .term-appbar{ padding:12px 10px; }
  .term-appbar > .term-iconbtn:first-child:not(.term-hamburger){ width:42px; height:38px; background-size:27px 27px; }
  .term-valline{ padding:8px 10px; margin-bottom:4px; }
  .term-valline-img{ width:42px; height:40px; margin-right:6px; }
  .term-valline-btn{ width:32px; height:32px; }
  .term-btn{ margin-top:10px; padding:12px; }
  .term-actionbar{ padding:6px 8px; gap:6px; }
}

/* Nimic nu are voie sa depaseasca latimea ecranului: pe un terminal nu exista derulare orizontala
   comoda, iar un buton pe jumatate vizibil e un buton pe care operatorul nu-l apasa.
   'clip', NU 'hidden': hidden face din element un container de derulare, iar position:sticky se
   raporteaza atunci la el in loc de ecran — bara de titlu pleca in sus la derulare (vazut la
   generare palet). 'clip' taie ce depaseste fara sa creeze container, deci sticky ramane intreg. */
.term-shell, .term-body{ max-width:100%; overflow-x:clip; }


/* ── Meniu de actiuni (⋮) pentru ecrane inguste ────────────────────────────────────────────────
   Butoanele din bara raman in pagina (Blazor le detine si le re-randeaza), doar ca sunt ascunse;
   meniul le apasa prin click. Asa nu ne batem cu randarea si nu pierdem nicio actiune. */
/* DEZACTIVAT (cerere user 15.08): butoanele barii raman vizibile TOT timpul — salvarea in
   primul rand, care e regula, dar si restul. In loc sa ascundem actiuni, micsoram titlul.
   Regulile meniului vertical raman mai jos, nefolosite, ca sa poata fi reactivat usor. */
.term-actions.collapsed > *:not(.term-ovfbtn){ }
.term-ovfbtn{ display:none; }
.term-actions.collapsed > .term-ovfbtn{ display:inline-flex; align-items:center; justify-content:center;
  font-size:calc(24px * var(--term-fsr, 1)); line-height:1; min-width:34px; }
.term-ovfmenu{ position:fixed; z-index:60; background:var(--term-surface); color:var(--term-text);
  border:1px solid var(--term-border); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.28);
  padding:6px; min-width:190px; max-width:78vw; }
.term-ovfmenu button{ display:flex; align-items:center; gap:10px; width:100%; background:none; border:0;
  padding:11px 10px; border-radius:8px; color:inherit; font-size:calc(15px * var(--term-fsr, 1));
  text-align:left; cursor:pointer; }
.term-ovfmenu button:active{ background:rgba(0,0,0,.08); }
.term-ovfmenu img{ width:22px; height:22px; object-fit:contain; filter:brightness(0) saturate(100%); opacity:.75; }
.term-root.dark-look .term-ovfmenu img{ filter:brightness(0) invert(1); opacity:.85; }
.term-ovfbackdrop{ position:fixed; inset:0; z-index:59; background:transparent; }

/* Hamburger-ul isi pastreaza glifa, la o marime apropiata de a sagetii de inapoi. */
.term-hamburger{ font-size:calc(26px * var(--term-fsr, 1)); line-height:1; min-width:40px; }


/* ── Bara de titlu pe ecrane inguste ───────────────────────────────────────────────────────────
   Butoanele NU se ascund niciodata: salvarea trebuie sa fie la vedere, iar operatorul nu are timp
   sa caute actiuni intr-un meniu. Ce cedeaza e titlul: scade in dimensiune si, la nevoie, se taie
   cu trei puncte. */
@media (max-width: 540px) {
  .term-appbar{ padding-left:8px; padding-right:8px; }
  .term-title{ font-size:calc(17px * var(--term-fsr, 1)); }
  .term-actions{ gap:6px; }
  .term-appicon{ width:22px; height:22px; }
}
@media (max-width: 420px) {
  .term-title{ font-size:calc(15px * var(--term-fsr, 1)); }
  .term-actions{ gap:4px; }
  .term-appicon{ width:20px; height:20px; }
}

/* Un pic de aer la marginile paginii: campurile si textul incepeau fix din marginea ecranului. */
.term-body{ padding-left:12px; padding-right:12px; }
@media (max-width: 540px) { .term-body{ padding-left:10px; padding-right:10px; } }


/* ── Butonul de salvare, mai mare decat restul ─────────────────────────────────────────────────
   E actiunea care incheie lucrul pe ecran si singura care trebuie sa fie la vedere tot timpul, deci
   primeste si cea mai mare tinta de apasare — un deget cu manusa pe un ecran de 4 inch nu nimereste
   o iconita de 22px. Se aplica pe toate cele 26 de ecrane cu salvare, dintr-un singur loc: se
   recunoaste dupa imaginea din buton, nu dupa vreo clasa scrisa in fiecare pagina. */
.term-actions .term-appicon[src*="save"]{ width:38px; height:38px; }
.term-actions button:has(> img[src*="save"]){
  min-width:54px; height:48px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:8px;
}
.term-actions button:has(> img[src*="save"]):active{ background:rgba(255,255,255,.18); }

@media (max-width: 540px) {
  .term-actions .term-appicon[src*="save"]{ width:34px; height:34px; }
  .term-actions button:has(> img[src*="save"]){ min-width:48px; height:44px; }
}

/* Motor web prea vechi: mesaj randat pe server, singurul lucru care mai ajunge la operator cand
   partea interactiva nu poate porni deloc. */
.term-engine-old { padding: 10px 12px; background: #8a5300; color: #fff; line-height: 1.35;
  font-size: calc(13px * var(--term-fsr, 1)); }
.term-engine-old a { display: inline-block; margin-top: 6px; color: #fff; font-weight: 600; }

/* Grup de campuri cu eticheta deasupra. Fara el, eticheta si campul sunt elemente in linie: eticheta
   se lipeste in dreapta campului anterior, iar campul ia doar cat ii trebuie, nu toata latimea. */
.term-fields{ display:flex; flex-direction:column; }
.term-fields .term-lbl{ display:block; }
.term-fields .term-input{ width:100%; box-sizing:border-box; }

/* ── Ecrane SCURTE (terminale purtabile: WD5 = 502×410 px @220 dpi → 365×254 px CSS sub barele
   de sistem) ────────────────────────────────────────────────────────────────────────────────
   Măsurat pe terminal, nu în simulator: pe ecranul de validare a unui document, bara de titlu
   (68) + antetul documentului (48) + rândul de scanare (56) + bara de jos (54) ocupă 226 din
   254 px, deci lista de articole rămâne fără niciun rând vizibil. Operatorul vede documentul,
   dar nu și marfa de pe el; iar cu tastatura ridicată dispare inclusiv câmpul în care scrie.

   Aici se strânge DOAR cromul vertical (paddinguri, înălțimi de bară, iconuri). Textul rămâne
   la mărimea lui: ecranul e lat cât al unui telefon (365 px), iar micșorarea literelor pentru
   că ecranul e scund l-ar face ilizibil fără să câștige spațiu util — lecția de pe terminalele
   testate anterior, unde clasificarea „ecran mic" amesteca ceasul cu terminalul scurt și lat.

   ATENȚIE la orientare: învelișul (Rosistem One) are „Forțează orientarea portret" BIFAT implicit,
   iar pe ceasurile-scanner portretul e o rotire a panoului, nu forma lui naturală. Măsurat pe WD5:
   în peisaj zona utilă e 365×254 px CSS, în portret devine 298×321 — mai înaltă, dar mai îngustă
   decât un telefon. WD1 II trece de la 465×313 la 349×429, adică peste pragul de înălțime, deși
   rămâne tot un ceas. De aceea condiția prinde și ecranele ÎNGUSTE, nu doar pe cele scunde: fără
   a doua clauză, terminalul rotit pierdea exact regulile scrise pentru el. Pragurile lasă pe
   dinafară telefoanele obișnuite (360×640 și mai mari). */
@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  /* Bara de titlu: 68 → ~40 px. Titlul rămâne pe un rând (are deja ellipsis). */
  .term-appbar{ padding:5px 10px; font-size:calc(16px * var(--term-fsr, 1)); }
  .term-appicon{ width:18px; height:18px; }
  .term-iconbtn{ font-size:calc(17px * var(--term-fsr, 1)); padding:1px 3px; }
  .term-body{ padding-top:6px; padding-bottom:6px; }

  /* Antetul documentului: rămâne pliabil, dar pornește strâns. */
  .term-hdrbox{ padding:5px 8px; margin-top:4px; font-size:calc(12px * var(--term-fsr, 1)); }
  .term-hdrbox-sub{ font-size:calc(11px * var(--term-fsr, 1)); }

  /* Rândul de scanare — singurul care NU are voie să dispară sub tastatură. */
  .term-scanrow{ margin-top:4px; }
  .term-scanrow .term-input{ padding:7px 8px; }
  .term-scanbtn{ width:38px; height:38px; }
  .term-scanbtn img{ width:19px; height:19px; }

  /* Bara de jos: totaluri + acțiunea principală pe un singur rând scund. */
  .term-valbottom{ padding-top:3px; }
  .term-valtotals{ padding:2px 6px; }
  .term-palletcta{ height:36px; padding:0 10px; }
  .term-palletcta img{ width:19px; height:19px; }

  /* Rândurile de listă: mai multe articole pe ecran, aceleași informații. */
  .term-valline{ padding:6px 8px; margin-bottom:4px; }
  /* Linia „cod / cod de bare" se rupea în două rânduri pe lățimea unui ceas și costa ~14 px din
     fiecare articol. Rămâne pe un rând, cu tăiere la capăt; codul întreg se vede pe ecranul
     articolului, la o atingere distanță. */
  .term-valline-sub{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .term-valline-img{ width:38px; height:34px; margin-right:6px; }
  .term-valline-btn{ width:30px; height:30px; padding:4px; }
  .term-valdoc{ padding:6px 10px; margin-bottom:4px; }
  .term-listcard{ padding:7px 9px; margin-bottom:5px; }

  /* Cutie noua, dupa salvare: pe un terminal scund cu tastatura ridicata raman vreo 110px sub
     antet. Articolul nu mai ajuta acolo — se stie de pe ecranul dinainte si scrie si pe eticheta —
     iar locul lui il ia exact randul de tiparire, singurul in care operatorul mai are ceva de facut. */
  .term-body.tablet.has-print .term-plcard.b{ display:none; }
  /* Si tot nu incape: cu tastatura ridicata pe un ecran de 254px raman ~110px sub antet, cat pentru
     UN rand. Tiparirea trece prima, inaintea codului: acolo mai are operatorul ceva de facut, iar
     codul ramane imediat sub ea, la o derulare distanta. */
  .term-body.tablet.has-print .term-printrow{ order:-1; }
  /* Si randul in sine se strange: butonul de actiune are inaltime minima scrisa pentru ecrane mari,
     iar cei 52px ai lui treceau cu 4 peste cat ramane sub tastatura pe un ecran de 254px. */
  .term-printrow{ margin:4px 0 2px; }
  .term-body.tablet .term-printrow .term-palletcta{ height:34px; min-height:0; padding:0 10px; }
  .term-body.tablet .term-printrow .pf-qty{ padding:6px; height:34px; min-height:34px;
    font-size:calc(16px * var(--term-fsr, 1)); }

  /* Pe terminalul scund, paletul sesiunii incape pe UN rand: codul in stanga, cutiile si ora in
     dreapta. Cu ele una sub alta, in zona derulabila intra un singur palet, iar operatorul nu poate
     compara ultimii doi. Nu se micsoreaza textul — se scoate randul, nu literele. */
  .term-pllist .term-listcard-main{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; width:100%; }
  .term-pllist .term-listcard-sub{ margin-top:0; white-space:nowrap; }

  /* Filtrul de reaprovizionare se apasa rar, lista se citeste tot timpul: marginile lui platesc
     exact al doilea card din lista. */
  .term-toggle{ margin:2px 0 5px; }

  /* Formulare (autentificare, generare palet, setări). */
  .term-brand{ font-size:calc(19px * var(--term-fsr, 1)); margin:0 0 6px; }
  .term-lbl{ margin:5px 2px 2px; }
  .term-input{ padding:8px; }
  .term-btn{ margin-top:8px; padding:10px; }
  .term-check{ margin:8px 2px; }

  /* Meniul cu plăci: bara de file mai scundă, plăcile nu mai sunt pătrate (aspect-ratio 1 pe
     un ecran de 254 px lasă un singur rând). */
  :root{ --term-tabh:calc(34px + 10px * var(--term-fsr, 1)); }
  .term-tab-ico{ width:20px; height:20px; }
  .term-tile{ aspect-ratio:1.4; padding:6px 4px; border-width:2px; }

  /* Dialogurile: pe 254 px, antetul și butoanele trebuie să rămână cât mai subțiri, ca mesajul
     să aibă loc (înălțimea maximă și derularea corpului sunt setate în regula generală). */
  .term-dlg-head{ padding:8px 12px; font-size:calc(14px * var(--term-fsr, 1)); }
  .term-dlg-body{ padding:10px 12px; }
  .term-dlg-foot{ padding:8px 12px 10px; }
  .term-dlg-btn{ height:36px; min-width:80px; }

  /* Foaia de alegere (vehiculul rutei): pe 254 px, cu benzile late rămânea un singur rând din
     listă. Se strâng titlul, rândurile de scanare/căutare și articolele — câmpul de scanare NU se
     pliază, el e singura cale fără alternativă — ca sub el să rămână cel puțin două plăcuțe. */
  .term-sheet-title{ padding:5px 12px; }
  .term-sheet-pick{ padding:0 12px 5px; }
  .term-sheet-pick > .term-input{ margin-top:5px; }
  .term-sheet-item{ padding:9px 12px; }
  .term-sheet-cancel{ margin:5px 12px 0; }
}

/* Ecrane scurte — controalele care TREBUIE completate rămân pe ecran ──────────────────────────
   Pe validarea unui produs dintr-o livrare, panoul de sugestii (locația propusă, lotul FEFO,
   lista tuturor locațiilor cu stoc) urcă înălțimea conținutului la ~400 px într-o zonă de 192 px.
   Zona chiar se derulează, dar câmpul de cantitate — singurul lucru pe care operatorul TREBUIE
   să-l scrie — ajungea sub marginea ecranului, iar cu tastatura ridicată dispărea cu totul.
   Rămâne lipit de baza zonei de derulare: informația se derulează pe sub el, câmpul stă pe ecran. */
@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  .term-scroll .term-qty{
    position:sticky; bottom:0; z-index:3;
    background:var(--term-surface);
    box-shadow:0 -6px 8px -6px rgba(0,0,0,.35);
  }
  /* Ultimul rând de scanare dinaintea cantității (dată expirare / serie) rămâne și el vizibil:
     pe fluxurile cu lot și serie, cantitatea singură nu ajunge. */
  .term-scroll .term-snbox{ max-height:60px; overflow-y:auto; }
}

/* Plasă de siguranță pe ecrane scurte: un ecran cu structură fixă (antet, zonă derulabilă,
   acțiune jos) care nu încape rămâne accesibil prin derulare, în loc să taie ultimul control.
   Fără ea, pe 254 px, butonul „Începe expedierea" (transfer între depozite) sau butoanele de
   linie de producție cădeau la câțiva pixeli sub margine și nu mai puteau fi apăsate deloc. */
@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  .term-shell.fixed .term-body{ overflow-y:auto; }
  /* Butoanele de acțiune cu înălțime scrisă în pagină nu au ce căuta la 52 px pe un ecran de 254. */
  .term-shell.fixed .term-body .term-btn[style*="height"]{ height:40px !important; }
}


/* Câmpurile ocupă lățimea zonei, nu lățimea + chenarul: fără border-box, un input pe toată
   lățimea depășea ecranul cu 2 px, iar zona derulabilă (care are margini negative) îl scotea
   sub marginea din stânga. Nu se vedea pe ecran mare; pe terminal, chenarul rămânea tăiat. */
.term-input{ box-sizing:border-box; }

/* Zona derulabilă își scoate marginile cât padding-ul REAL al corpului, ca rândurile ei să atingă
   exact marginea ecranului. Sub 540 px lățime corpul trece la 10 px, dar compensarea rămăsese
   scrisă fix pe 12 px: fiecare câmp care umple lățimea ieșea cu 2 px în stânga, cu chenarul tăiat.
   Se vede doar pe terminal, unde ecranul chiar are lățimea aia. */
@media (max-width: 540px){
  .term-scroll{ margin-left:-10px; margin-right:-10px; padding-left:10px; padding-right:10px; }
}

/* ── Ecrane MICI ȘI ÎNGUSTE (ceasuri-scanner: WD1 II = 640×480 px pe 2,8") ────────────────────
   WD5 e scurt, dar lat cât un telefon (365 px): acolo ajunge să se strângă cromul pe verticală.
   Ceasurile sunt strâmte în AMBELE direcții — sub 360 px lățime, un rând de listă cu denumire,
   cantitate și trei butoane nu mai are unde încăpea, iar plăcile de meniu ajung fâșii.

   Aici se schimbă LAYOUT-ul, nu mărimea literelor: pe un ecran de 2,8" textul e deja la limita
   citirii dintr-o privire, iar micșorarea lui l-ar face inutil. Ce cedează sunt coloanele care
   pot deveni rânduri. */
@media (max-width: 360px){
  /* Rândurile de listă trec pe două niveluri: informația sus, valorile și acțiunile dedesubt. */
  .term-valline-top{ flex-wrap:wrap; }
  .term-valline-qty{ order:3; width:100%; text-align:right; }
  .term-listcard{ flex-wrap:wrap; }
  /* Coborat pe rand propriu, blocul din dreapta isi punea eticheta si deficitul unul SUB altul,
     adaugand inapoi randul castigat. Pe acelasi rand incap amandoua, iar cardul scade cu ~22px —
     diferenta dintre un card vizibil si doua pe portretul terminalului-ceas (298x321). */
  .term-listcard-right{ min-width:0; text-align:left; flex-basis:100%;
    display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .term-valdoc-row{ flex-wrap:wrap; }

  /* Bara de titlu: iconurile rămân, dar nu mai fură din titlu. */
  .term-appbar{ padding-left:6px; padding-right:6px; gap:2px; }
  .term-appicon{ width:17px; height:17px; }
  .term-iconbtn{ padding:1px 2px; }

  /* Plăcile de meniu: pătratul devine mai lat decât înalt, ca eticheta să încapă pe un rând. */
  .term-tile{ aspect-ratio:1.25; padding:5px 3px; }
  .term-tile-lbl{ margin-top:2px; }

  /* Dialogurile ocupă toată lățimea utilă — pe 320 px, marginile de 20 px erau un sfert din ecran. */
  .term-dlg-backdrop{ padding:8px; }
  .term-dlg-btn{ min-width:0; flex:1; }

  /* Formularele cu două coloane (dimensiuni palet, caracteristici) devin o coloană. */
  .term-grid2{ grid-template-columns:1fr; }
}

/* ── Panoul pliabil pentru comenzi secundare (TerminalCollapsible) ────────────────────────────
   Regula ecranelor mici (user 07.09): zona de SCANARE rămâne mereu vizibilă, iar titlurile,
   antetele de document și filtrele fie se pliază, fie primesc bandă mai subțire. Pe un ceas,
   fiecare bandă de deasupra listei costă exact un rând de marfă. */
.term-collapsible{ margin-top:4px; }
.term-collapsible-head{ display:flex; align-items:center; gap:8px; cursor:pointer;
  padding:6px 8px; border:1px solid var(--term-border); border-radius:6px;
  background:var(--term-surface); color:var(--term-text2);
  font-size:calc(13px * var(--term-fsr, 1)); }
.term-collapsible-chevron{ color:var(--term-primary); flex:none; }
.term-collapsible-title{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.term-collapsible-body{ margin-top:4px; }

@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  /* Rândul pliat: cât mai aproape de o simplă linie de text. */
  .term-collapsible{ margin-top:2px; }
  .term-collapsible-head{ padding:3px 8px; font-size:calc(12px * var(--term-fsr, 1)); }
  .term-collapsible-body{ margin-top:2px; }

  /* Cardul de context (Info locație / Info articol): titlu și subtitlu pe un singur rând, cu
     comutatorul lipit în dreapta. Ca bandă, trece de la ~70 px la ~34 px. */
  .term-card{ margin-top:4px; padding:5px 8px; }
  .term-card-title{ margin-bottom:0; font-size:calc(15px * var(--term-fsr, 1)); }
  .term-card.term-hdrbox-row .term-hdrbox-text{ display:flex; align-items:baseline; gap:6px;
    min-width:0; overflow:hidden; }
  .term-card.term-hdrbox-row .term-listcard-sub{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  /* Eticheta lungă a comutatorului nu încape lângă titlu pe un ecran îngust; comutatorul singur
     spune destul (are deja titlu la apăsare lungă). */
  .term-lots-lbl{ display:none; }

  /* Bara de acțiuni de jos: butoanele rămân apăsabile (34 px e încă peste minimul de atingere
     pentru un buton lat), dar banda nu mai fură două rânduri din listă. */
  .term-bottomrow{ padding-top:2px; gap:4px; }
  .term-delallbtn{ height:34px; min-width:44px; padding:0 8px; }
  .term-bottomrow .term-palletcta{ height:34px; padding:0 8px; }
  .term-bottomrow .term-palletcta img{ width:17px; height:17px; }
  .term-totalbar{ padding:2px 8px; font-size:calc(13px * var(--term-fsr, 1)); }

  /* Panoul de număr document furnizor: același tratament ca restul benzilor. */
  .term-snno-head{ padding:3px 8px; }
}

/* ── Panoul operatorului (/dashboard) ─────────────────────────────────────────────────────────
   Cifre mari + două grafice desenate din CSS. Fără librărie de grafice: terminalul trebuie să
   pornească și fără internet, iar pe un ceas de 2,8" o librărie ar costa mai mult decât arată.
   O singură serie pe grafic → fără legendă; valorile stau direct pe bare, deci identitatea nu
   depinde de culoare (regula de accesibilitate a graficelor). */
.term-dashsect{ display:flex; align-items:baseline; gap:8px; margin:10px 2px 6px;
  font-size:calc(13px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text2); }
.term-dashsub{ font-weight:400; font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-dashlink{ margin-left:auto; background:transparent; border:0; padding:0;
  color:var(--term-primary); text-decoration:underline; cursor:pointer;
  font-size:calc(11px * var(--term-fsr, 1)); }

/* Plăcile de cifre: 2 coloane pe terminal, 4 pe ecran lat. Cele care duc undeva arată apăsabile. */
.term-dashgrid{ display:grid; grid-template-columns:repeat(2, 1fr); gap:6px; }
@media (min-width: 620px){ .term-dashgrid{ grid-template-columns:repeat(4, 1fr); } }
.term-stat{ display:flex; flex-direction:column; align-items:flex-start; gap:2px;
  background:var(--term-surface); border:1px solid var(--term-border); border-radius:8px;
  padding:8px 10px; cursor:pointer; text-align:left; }
.term-stat.is-plain{ cursor:default; }
.term-stat-num{ font-size:calc(22px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text);
  line-height:1.1; }
.term-stat-lbl{ font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }

/* Bare verticale (săptămâna). Capătul de date e rotunjit 4px și stă ancorat pe linia de bază. */
/* Linia de bază e a graficului, nu a fiecărei coloane: desenată pe track-uri, ieșea punctată. */
.term-chartbars{ display:flex; align-items:flex-end; gap:6px; padding:4px 8px 0;
  background:var(--term-surface); border:1px solid var(--term-border); border-radius:8px;
  max-width:720px; }
.term-chartcol{ flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; min-width:0; }
.term-chartval{ font-size:calc(10px * var(--term-fsr, 1)); color:var(--term-text2); height:13px; }
.term-charttrack{ width:100%; height:76px; display:flex; align-items:flex-end; }
.term-chartbars{ border-bottom:1px solid var(--term-border); }
.term-chartbar{ width:100%; background:var(--term-primary); border-radius:4px 4px 0 0; }
.term-chartbar.is-today{ background:var(--term-primary-d); }
.term-chartlbl{ font-size:calc(10px * var(--term-fsr, 1)); color:var(--term-text2); padding:2px 0 4px; }
.term-chartlbl.is-today{ color:var(--term-text); font-weight:700; }

/* Bare orizontale (azi, pe activitate): etichetă · bară · valoare, toate pe un rând. */
.term-hbars{ background:var(--term-surface); border:1px solid var(--term-border); border-radius:8px;
  padding:6px 8px; max-width:720px; }
.term-hbar-row{ display:flex; align-items:center; gap:6px; margin:4px 0; }
.term-hbar-lbl{ flex:0 0 84px; font-size:calc(11px * var(--term-fsr, 1)); color:var(--term-text2);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.term-hbar-track{ flex:1; height:12px; background:var(--term-bg); border-radius:4px; min-width:0; }
.term-hbar-fill{ height:100%; background:var(--term-primary); border-radius:4px; }
.term-hbar-val{ flex:0 0 auto; font-size:calc(11px * var(--term-fsr, 1)); font-weight:700;
  color:var(--term-text); min-width:22px; text-align:right; }

/* Ecrane de ceas: cifrele rămân mari (se citesc dintr-o privire), dar benzile se strâng, iar
   graficul săptămânii scade la jumătate ca să încapă și lista „Începe cu" pe același ecran. */
@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  .term-dashsect{ margin:6px 2px 4px; }
  .term-dashgrid{ gap:4px; }
  .term-stat{ padding:5px 8px; }
  .term-stat-num{ font-size:calc(19px * var(--term-fsr, 1)); }
  .term-charttrack{ height:44px; }
  .term-chartbars{ gap:4px; }
  .term-hbar-lbl{ flex-basis:66px; }
}

/* ── Ecrane FOARTE scunde (WD5: 254 px pe lat, 321 px în portret) ─────────────────────────────
   Aici nu mai ajunge strânsul cromului: rândul de listă însuși are ~125 px (denumire pe două
   rânduri, cantitate pe rând propriu, cod, locație, stoc, link) iar zona de listă are ~150 px,
   deci operatorul vede UN articol. Ținta regulii (scanare + două rânduri) se atinge doar
   rearanjând rândul, nu micșorând literele:

   • denumirea primește rândul ei întreg (rămâne citibilă — e informația după care se caută);
   • cantitatea și butoanele de linie coboară pe rândul următor, împreună;
   • locația propusă și paleții întregi trec pe UN rând, unul lângă altul;
   • codul articolului și linkul „toate locațiile" ies din rând — codul se vede pe ecranul
     articolului, iar locațiile se deschid tot de acolo, la o atingere distanță.

   Rezultat măsurat pe WD5 în portret: rândul scade de la 124 la ~78 px, deci încap două
   articole întregi sub câmpul de scanare. */
@media (max-height: 360px){
  .term-valline{ padding:5px 8px; margin-bottom:3px; }
  .term-valline-img{ width:30px; height:28px; }
  .term-valline-name{ flex-basis:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .term-valline-qty{ order:2; width:auto; margin-right:auto; text-align:left; }
  .term-valline-btn{ width:28px; height:28px; padding:3px; }
  .term-valline-sub, .term-valline-more{ display:none; }
  .term-valline-locrow{ display:flex; gap:6px; min-width:0; overflow:hidden; }
  .term-valline-locrow > *{ min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .term-valline-locrow br{ display:none; }
}

/* Banner de comandă nouă (TASK-0007): fundal Primary, text alb, apăsabil — deschide lista de validare.
   Stă deasupra grilei de tile-uri, nu peste ea, ca să nu acopere butoanele. */
.term-neworder{ display:flex; align-items:center; gap:10px; margin:8px 8px 0; padding:10px 12px; background:var(--term-primary); color:#fff; border-radius:8px; font-weight:700; font-size:calc(14px * var(--term-fsr, 1)); cursor:pointer; animation:neworder-in .3s ease-out; }
.term-neworder img{ width:22px; height:22px; flex:none; }
@keyframes neworder-in{ from{ transform:translateY(-8px); opacity:0; } to{ transform:none; opacity:1; } }

/* Label printed on the print server's default printer: a notice floating above the screen, so no page
   layout has to make room for it. Theme colours only. */
.term-print-warn{ position:fixed; left:8px; right:8px; bottom:8px; z-index:900; padding:10px 12px; border-radius:8px;
  background:var(--term-danger,#d32f2f); color:#fff; font-weight:600; font-size:calc(14px * var(--term-fsr, 1));
  box-shadow:0 2px 8px rgba(0,0,0,.3); cursor:pointer; animation:neworder-in .3s ease-out; }

/* TASK-0009: punctul de lucru al partenerului pe cardul de validare — un rând propriu, bold, ca magazinul să se vadă dintr-o privire. */
.term-valdoc-site{ display:block; font-weight:700; color:var(--term-primary-d); margin-top:2px; }

/* TASK-0108: the POS screen runs both on a 5–6" mobile till (Datecs BC50, Android) and on an 8–10" POS
   display. One markup, two shapes: a single column on the small device, articles and payment side by
   side on the wide one, where the payment column stays visible while articles are scanned. */
/* Payment: fields stacked with their labels; on a wide screen money on the left, gift card and change on the right. */
.pos-pay .term-lbl{ display:block; margin-top:10px; }
.pos-pay .term-input{ display:block; width:100%; box-sizing:border-box; font-size:calc(20px * var(--term-fsr, 1)); }
.pos-pay-grid{ display:grid; grid-template-columns:1fr; gap:16px; max-width:900px; }
.pos-pay-total{ font-size:calc(24px * var(--term-fsr, 1)); padding:10px 12px; }
.pos-change{ margin-top:14px; font-weight:700; font-size:calc(22px * var(--term-fsr, 1)); }
@media (min-width: 760px){ .pos-pay-grid{ grid-template-columns:1fr 1fr; } }
/* Shift panel: the totals read as a two-column statement, labels sit above their fields. */
.pos-shift .term-card .term-line-meta,
.pos-shift .term-card .term-line-top{ display:flex; justify-content:space-between; gap:12px; padding:3px 0;
  font-size:calc(15px * var(--term-fsr, 1)); border-bottom:1px solid var(--term-border); }
.pos-shift .term-card .term-line-top{ font-weight:700; border-bottom:none; padding-top:6px; }
.pos-shift .term-lbl{ display:block; margin-top:8px; }
.pos-shift .term-input{ display:block; width:100%; max-width:480px; box-sizing:border-box; }
.pos-shift .term-card{ max-width:560px; }
.pos-shift .term-line{ max-width:560px; }
/* Small device: scan row on top, the receipt fills the rest, the article tiles open on demand (▦). */
.pos-layout{ display:flex; flex-direction:column; flex:1; min-height:0; }
.pos-main{ display:flex; flex-direction:column; flex:none; min-height:0; }
.pos-side{ display:flex; flex-direction:column; flex:1; min-height:0; }
.pos-receipt{ flex:1; min-height:0; }
.pos-catalog{ display:none; flex-direction:column; min-height:0; max-height:45vh; }
.pos-catalog.open{ display:flex; }
/* TASK-0161: no horizontal scrollbar — the categories wrap onto rows (small screen) and become a column
   beside the tiles on a wide POS screen (see the min-width:760px block). */
.pos-cats{ display:flex; flex-wrap:wrap; gap:6px; padding:0; margin:6px 0; flex:none; max-height:82px; overflow-y:auto; }
.pos-chip{ flex:none; border:1px solid var(--term-border, #c9d3de); background:var(--term-surface, #fff); color:var(--term-text);
  border-radius:18px; padding:6px 12px; min-height:36px; font-size:calc(14px * var(--term-fsr, 1)); white-space:nowrap; cursor:pointer; }
/* Text on a primary background follows the theme (black on yellow in High Contrast), never a fixed white. */
.pos-chip.on{ background:var(--term-primary); border-color:var(--term-primary); color:var(--term-on-primary); }
.pos-tiles{ display:grid; grid-template-columns:repeat(auto-fill, minmax(104px, 1fr)); gap:6px; overflow-y:auto; min-height:0; padding-bottom:6px; }
.pos-tile{ display:flex; flex-direction:column; justify-content:space-between; min-height:72px; padding:8px; text-align:left;
  border:1px solid var(--term-border, #c9d3de); border-radius:8px; background:var(--term-surface, #fff); color:var(--term-text); cursor:pointer; }
.pos-tile:active{ background:var(--term-primary); color:var(--term-on-primary); }
.pos-tile-name{ font-size:calc(14px * var(--term-fsr, 1)); line-height:1.2; overflow:hidden; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow-wrap:anywhere; }
.pos-tile-price{ font-weight:700; margin-top:4px; }
.pos-line{ cursor:pointer; }
.pos-line.sel{ outline:2px solid var(--term-primary); outline-offset:-2px; }
.pos-promo{ margin-left:6px; color:var(--term-primary-d); font-weight:600; }
.pos-list-price{ opacity:.6; margin-left:4px; }
.pos-linebar{ display:flex; gap:6px; align-items:center; padding:4px 8px 8px; flex-wrap:wrap; }
.pos-mini{ min-height:38px; padding:4px 10px; border-radius:6px; border:1px solid var(--term-border, #c9d3de);
  background:var(--term-surface, #fff); color:var(--term-text); font-size:calc(14px * var(--term-fsr, 1)); cursor:pointer; }
.pos-mini:disabled{ opacity:.45; cursor:default; }
/* The shortcut legend is for tills with a keyboard — the wide screens; a handheld has no F keys. */
/* TASK-0161: the line the last scan/tap touched flashes once */
@keyframes posJust { from { background:var(--term-primary-soft, #D6EAF8); } to { background:transparent; } }
.pos-line.just{ animation:posJust 1.6s ease-out; }
.pos-keys-hint{ display:none; font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-text2); margin-top:6px; text-align:right; }
@media (min-width: 760px){ .pos-keys-hint{ display:block; } }
.pos-customer{ display:flex; align-items:center; gap:8px; padding:6px 8px; margin-top:6px; border-radius:6px;
  background:var(--term-surface); border:1px solid var(--term-border); font-size:calc(14px * var(--term-fsr, 1)); }
.pos-customer-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.pos-actions{ display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.pos-pad{ display:flex; flex-direction:column; gap:6px; padding:6px 0; }
.pos-pad-head{ display:flex; justify-content:space-between; align-items:baseline; font-weight:700; }
.pos-pad-value{ font-size:calc(24px * var(--term-fsr, 1)); }
.pos-pad-keys{ display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
.pos-key{ min-height:48px; font-size:calc(20px * var(--term-fsr, 1)); border-radius:8px; border:1px solid var(--term-border, #c9d3de);
  background:var(--term-surface, #fff); color:var(--term-text); cursor:pointer; }
.pos-pad-row{ display:flex; gap:8px; }
.pos-pad-row .term-palletcta{ flex:1; justify-content:center; }
/* With the tiles open on a small device the receipt keeps its room: the secondary actions step aside
   until the tiles close again (the total and Pay stay). */
@media (max-width: 759px){
  .pos-layout.catalog-open .pos-actions > :not(.pos-keep){ display:none; }
  .pos-catalog{ max-height:38vh; }
}
/* On a short screen (BC50 in landscape, handheld with the keyboard up) the keypad keys shrink first. */
@media (max-height: 460px){
  .pos-key{ min-height:36px; font-size:calc(17px * var(--term-fsr, 1)); }
  .pos-catalog{ max-height:40vh; }
}
@media (min-width: 760px){
  .pos-layout{ flex-direction:row; gap:12px; }
  /* Wide POS screen: the tiles are always there on the left, the receipt column on the right. */
  .pos-main{ flex:1; min-width:0; }
  .pos-catalog{ display:flex; flex:1; max-height:none; flex-direction:row; gap:10px; }
  .pos-cats{ flex-direction:column; flex-wrap:nowrap; width:180px; max-height:none; overflow-y:auto; padding:0; }
  .pos-cats .pos-chip{ text-align:left; white-space:normal; }
  .pos-tiles{ flex:1; align-content:start; }
  .pos-catalog-toggle{ display:none; }
  .pos-tiles{ grid-template-columns:repeat(auto-fill, minmax(128px, 1fr)); }
  .pos-tile{ min-height:88px; }
  .pos-side{ width:380px; flex:none; }
  .pos-side .term-totalbar{ font-size:calc(22px * var(--term-fsr, 1)); margin-top:8px; }
  /* The payment button stays at the bottom of its column, where the hand rests. */
  .pos-side .term-bottomrow .term-palletcta{ width:100%; height:64px; justify-content:center; }
  .pos-side .term-bottomrow .term-palletcta span{ font-size:calc(20px * var(--term-fsr, 1)); font-weight:700; }
  /* Touch targets on a POS screen are pressed with a finger, not a stylus. */
  .pos-layout .term-sqbtn{ width:44px; height:44px; }
  .pos-layout .term-line{ padding:10px; }
}

/* WMS-166: the line tablet is operated with a finger, standing, from a step away — the start screen
   uses large cards and inputs instead of the handheld's compact rows. */
.term-body.tablet .term-input{ min-height:52px; font-size:calc(18px * var(--term-fsr, 1)); }
.term-body.tablet .term-section-title{ font-size:calc(20px * var(--term-fsr, 1)); }
.tablet-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:12px; }
.tablet-card{ display:flex; flex-direction:column; gap:6px; align-items:flex-start; justify-content:center;
  min-height:96px; padding:14px; border:1px solid var(--term-border); background:var(--term-surface);
  color:var(--term-text); cursor:pointer; }
.tablet-card-title{ font-size:calc(20px * var(--term-fsr, 1)); font-weight:700; }
.tablet-card-sub{ font-size:calc(14px * var(--term-fsr, 1)); color:var(--term-text2); }

/* Panifcom: product picker on the 15" line tablet — picture buttons in a paged grid, the shape the
   Scale Print front office uses. The tile is sized for a finger at arm's length, and the picture is
   contained rather than cropped: two breads differ by shape, and a cropped thumbnail hides it.
   Colours come from the theme variables only — this screen runs under every installed theme. */
.tablet-tile{ display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:8px;
  min-height:180px; padding:12px; border:1px solid var(--term-border); background:var(--term-surface);
  color:var(--term-text); cursor:pointer; text-align:center; }
.tablet-tile-img{ width:120px; height:120px; object-fit:contain; }
/* Two lines of name, then ellipsis: a third line pushes the next row off a 15" screen. */
.tablet-tile-name{ font-size:calc(16px * var(--term-fsr, 1)); font-weight:600; line-height:1.2;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
/* Subsolul tabletei de linie si denumirea articolului raman la vedere cat timp formularul se
   deruleaza: fara ele, pe un ecran plin de campuri, pornirea productiei si articolul ales cadeau
   sub marginea de jos. Culorile vin din variabilele temei, ca sa urmeze tema aleasa de utilizator. */
.term-body.tablet .tablet-footer{ position:sticky; bottom:0; z-index:5; gap:8px;
  padding:8px 0; margin-top:4px; background:var(--term-bg); border-top:1px solid var(--term-border); }
.term-body.tablet .tablet-footer-gap{ flex:1; }
.term-body.tablet .tablet-sticky-product{ position:sticky; top:0; z-index:4; background:var(--term-bg); }

.tablet-pager{ display:flex; align-items:center; gap:12px; padding:12px 2px; }
.tablet-pager-pos{ flex:1; text-align:center; font-size:calc(16px * var(--term-fsr, 1)); color:var(--term-text2); }

/* Bara de file de pas, lipita sub bara de titlu. NU se numeste .term-tabs: numele ala apartine barei
   de navigare de jos din meniu, iar refolosirea lui ii rescria pozitia si culorile pe tot terminalul.

   Aceeasi culoare cu antetul, ca sa se citeasca drept continuarea lui: fila aleasa e scrisa cu
   culoarea de pe primar si subliniata gros, cealalta ramane estompata. Totul din variabilele temei —
   ecranul ruleaza si pe tema galbena de mare contrast, unde textul pe primar e negru.

   Etichetele sunt scurte pentru ca latimea unui terminal se imparte la doua file; daca tot nu incap
   (limba mai lunga, ecran ingust), textul se taie cu trei puncte in loc sa rupa bara pe doua randuri. */
.term-segtabs{ position:sticky; top:0; z-index:49; display:flex; background:var(--term-primary); }
.term-segtab{ flex:1 1 0; min-width:0; padding:11px 6px 9px; border:none; background:none;
  color:var(--term-on-primary); opacity:.65; cursor:pointer;
  font-size:calc(15px * var(--term-fsr, 1)); font-weight:600; letter-spacing:.01em;
  border-bottom:3px solid transparent;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.term-segtab.on{ opacity:1; border-bottom-color:var(--term-on-primary); }
/* Actiunea din capatul randului nu creste cu textul: randul ramane pentru denumirea articolului. */
.term-listcard-action{ flex:0 0 auto; margin-left:8px; align-self:center;
  padding:8px 10px; font-size:calc(14px * var(--term-fsr, 1)); }
/* Randul de lista devine o linie cu doua capete cand are actiune proprie. */
.term-pllist .term-listcard{ display:flex; align-items:center; }
.term-pllist .term-listcard-main{ flex:1; min-width:0; }

/* Formular de start pe tableta de linie. O eticheta si un input sunt amandoua elemente de rand, deci
   puse unul dupa altul eticheta unui camp ajunge langa inputul campului precedent. Grila tine fiecare
   eticheta deasupra campului ei si fiecare camp pe toata latimea coloanei. */
.tablet-form{ display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:12px 16px; margin:4px 0 2px; }
.tablet-field{ display:flex; flex-direction:column; gap:4px; min-width:0; }
.tablet-field-lbl{ color:var(--term-text2); font-size:calc(15px * var(--term-fsr, 1)); }
.tablet-field .term-input{ width:100%; }

/* Eticheta pe acelasi rand cu campul: formularul de deschidere a liniei intra pe un ecran de
   tableta fara derulare. Eticheta primeste o latime fixa ca toate campurile sa se alinieze. */
.tablet-form.inline .tablet-field{ flex-direction:row; align-items:center; gap:10px; }
.tablet-form.inline .tablet-field-lbl{ flex:0 0 46%; text-align:right; }
.tablet-form.inline .tablet-field .term-input{ flex:1 1 auto; min-width:0; }

/* Sub 270px randul s-ar rupe si eticheta ar ajunge langa alt camp (motivul pentru care eticheta
   statea initial deasupra), deci pe ecranele cele mai mici se revine la stivuire. */
@media (max-width:270px){
  .tablet-form.inline .tablet-field{ flex-direction:column; align-items:stretch; gap:4px; }
  .tablet-form.inline .tablet-field-lbl{ flex:none; text-align:left; }
}

/* Explicatia sugestiei de cutii pe palet: discreta cand totul e in regula, evidenta cand numarul
   introdus trece peste cat duce paletul din fisa articolului. */
.tablet-estimate{ color:var(--term-text2); font-size:calc(13px * var(--term-fsr, 1)); margin:2px 0 0; }
.tablet-estimate.is-warn{ color:var(--term-error); font-weight:600; }
.term-lbl.is-error{ color:var(--term-error); font-weight:600; }
.term-printrow{ display:flex; gap:8px; align-items:center; margin:6px 0 2px; flex:none; }
.term-printrow .pf-qty{ flex:0 0 80px; width:80px; text-align:center; }
.term-printrow .term-palletcta{ flex:1 1 auto; min-width:0; }

/* Ecranul de incheietura: butoanele stau pe un rand, iar panoul de etichete apare sub ele doar cand
   e cerut. Randurile de etichete se string la maximum — pe 254px inaltime fiecare pixel permanent
   se ia din numarul de cutii, singurul lucru pe care operatorul il urmareste cu mana ocupata. */
.hf-btnrow{ display:flex; gap:6px; width:100%; }
.hf-btnrow .hf-btn{ flex:1 1 0; min-width:0; }
.hf-labels{ display:flex; flex-direction:column; gap:4px; width:100%; margin-top:4px; }
.hf-labels.open{ flex:1 1 auto; justify-content:center; overflow:auto; margin-top:0; }
.hf-labelrow{ display:flex; align-items:center; gap:6px; }
.hf-labellbl{ flex:0 0 auto; text-align:right; color:var(--term-text2); font-size:calc(13px * var(--term-fsr, 1)); }
.hf-labelrow .term-input{ flex:0 0 64px; width:64px; min-width:0; text-align:center; }
/* Butonul de tiparire din rand e COMPACT: cel de la butoanele mari ale ecranului are inaltime
   minima si text intins, iar doua randuri cu el nu incap pe un terminal de incheietura. */
.hf-labelrow .hf-btn{ flex:1 1 auto; min-width:0; min-height:0; padding:6px 8px; font-size:calc(14px * var(--term-fsr, 1)); }
.tablet-form.inline .term-palletcta.slim{ flex:1 1 auto; min-width:0; min-height:0; padding:8px 12px; }
/* Campul de data gol isi deseneaza propria masca, in formatul browserului si nu al aplicatiei, si se
   citeste ca o valoare deja completata. Ascunsa cat timp campul e gol si nefocalizat; butonul de
   calendar ramane vizibil, altfel nu mai exista niciun semn ca se poate deschide selectorul. */
.tablet-date.is-empty:not(:focus), .term-date.is-empty:not(:focus){ color:transparent; }
.tablet-date.is-empty:not(:focus)::-webkit-datetime-edit,
.term-date.is-empty:not(:focus)::-webkit-datetime-edit{ color:transparent; }
.tablet-date::-webkit-calendar-picker-indicator,
.term-date::-webkit-calendar-picker-indicator{ opacity:1; }
.term-fields .term-date{ width:100%; box-sizing:border-box; }

@media (max-height: 460px), (max-width: 380px) and (max-height: 600px)
{
  .term-segtab{ padding:8px 4px 6px; font-size:calc(14px * var(--term-fsr, 1)); }
  .term-listcard-action{ padding:6px 8px; }
}

/* Ecranul pentru cititorul purtat pe mana (WMS-155). Se citeste de la distanta, cu ochii pe cutii,
   nu pe ecran: un singur numar mare, culoarea starii si nimic altceva. Culorile vin din variabilele
   temei; starile folosesc primarul si eroarea, nu valori scrise in cod. */
.term-body.hf{ display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:6px; }
/* flex:none pe randurile de text: intr-o coloana flex ele se micsoreaza inaintea numarului urias, iar
   cu overflow:hidden denumirea articolului ajunge taiata pe jumatate pe ecranele scunde. */
.hf-product{ flex:none; font-size:calc(20px * var(--term-fsr, 1)); font-weight:700; color:var(--term-text);
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hf-count{ flex:none; display:flex; align-items:baseline; justify-content:center; gap:2px; line-height:1;
  color:var(--term-text); }
.hf-now{ font-size:calc(96px * var(--term-fsr, 1)); font-weight:800; }
.hf-of{ font-size:calc(34px * var(--term-fsr, 1)); font-weight:600; color:var(--term-text2); }
/* Ultima cutie inainte de limita: avertisment, nu eroare. */
.hf-count.near .hf-now{ color:var(--term-primary); }
/* Paletul plin si refuzul de stoc se vad la fel de departe, in culoarea de eroare a temei. */
.hf-count.full .hf-now, .hf-count.bad .hf-now{ color:var(--term-error); }
.hf-msg{ flex:none; font-size:calc(18px * var(--term-fsr, 1)); color:var(--term-text2); min-height:1.2em;
  text-align:center; }
.hf-msg.bad{ color:var(--term-error); font-weight:700; }
/* Campul de scanare a fost multa vreme invizibil (cititorul de pe mana scrie in el ca o tastatura).
   Acum se vede si se poate tasta in el: cand eticheta unei cutii nu se citeste, codul se bate de mana
   pe loc, in loc sa se caute alt terminal. Sta SUS, ca pe restul ecranelor de terminal, si ramane
   focalizat, altfel scanarea urmatoare s-ar pierde. */
.hf-scanrow{ flex:none; width:100%; }
/* Corpul ecranului centreaza (numarul urias trebuie sa stea in mijloc), dar lista de productii
   deschise NU are ce cauta stransa la latimea textului: pe ea se APASA, cu manusa, iar o tinta mai
   lata e o tinta mai usoara. align-self o scoate din centrare fara sa mute numarul. */
.term-body.hf .term-pllist, .term-body.hf .term-section-title, .term-body.hf .term-empty{
  align-self:stretch; width:100%; }
.term-body.hf .term-listcard{ width:100%; box-sizing:border-box; }
.hf-scanrow .hf-scan{ flex:1; min-width:0; text-align:center;
  font-size:calc(18px * var(--term-fsr, 1)); }
.hf-btn{ margin-top:auto; width:100%; min-height:56px; border:none; background:var(--term-primary);
  color:var(--term-on-primary); font-size:calc(18px * var(--term-fsr, 1)); font-weight:700; cursor:pointer; }
/* Pe terminalele-ceas (WD5 are 254 px utili in peisaj, WD1 II 313) campul de scanare, numarul si
   butonul nu mai incap toate. Campul de scanare ramane — e singura actiune fara alternativa — iar
   numarul cedeaza din inaltime: si la 72 px, respectiv 56 px pe cel mai scund ecran, se citeste in
   continuare de la cativa metri, si asa ecranul nu ajunge sa aiba scroll. */
@media (max-height: 460px)
{
  .hf-now{ font-size:calc(72px * var(--term-fsr, 1)); }
  .hf-of{ font-size:calc(28px * var(--term-fsr, 1)); }
  .hf-product{ font-size:calc(17px * var(--term-fsr, 1)); }
  .hf-msg{ font-size:calc(15px * var(--term-fsr, 1)); }
  .term-body.hf{ gap:3px; }
}
@media (max-height: 300px)
{
  .hf-now{ font-size:calc(56px * var(--term-fsr, 1)); }
  .hf-of{ font-size:calc(24px * var(--term-fsr, 1)); }
  .hf-product{ font-size:calc(16px * var(--term-fsr, 1)); }
  /* Ramane peste pragul de 34 px al regulii de ecrane mici, deci se apasa la fel de usor. */
  .hf-btn{ min-height:48px; }
  /* Butonul e ultimul element si e lipit de marginea de jos; padding-ul de sub el era tot ce mai
     scotea ecranul din pagina pe cel mai scund terminal. */
  .term-body.hf{ gap:2px; padding-bottom:0; }
}

/* Customer display: read from a distance, so large type, high contrast, nothing to press. */
.posd{ position:fixed; inset:0; display:flex; flex-direction:column; background:#10263a; color:#fff; font-family:inherit; }
.posd-lines{ flex:1; overflow:hidden; padding:24px 32px; display:flex; flex-direction:column; justify-content:flex-end; }
.posd-line{ display:grid; grid-template-columns:1fr auto auto; gap:24px; font-size:clamp(18px, 3vw, 34px); padding:6px 0; border-bottom:1px solid rgba(255,255,255,.12); }
.posd-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.posd-qty{ opacity:.75; }
.posd-sum{ font-weight:700; min-width:5ch; text-align:right; }
.posd-promo{ color:#ffd166; font-size:clamp(14px, 2vw, 22px); padding-bottom:4px; }
.posd-total{ background:#1b4d2e; padding:18px 32px; text-align:right; font-size:clamp(28px, 6vw, 64px); }
.posd-idle{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:16px; }
.posd-welcome, .posd-thanks{ font-size:clamp(28px, 6vw, 64px); font-weight:700; }
.posd-paid{ font-size:clamp(20px, 4vw, 40px); opacity:.85; }

/* Lot row: the field (typed lot, or the list) with the "choose from list" switch on its right. */
.term-lotpick{ align-items:center; gap:8px; }
.term-lotpick .term-input{ flex:1; min-width:0; }
.term-lotpick-switch{ flex:none; margin-right:4px; }
.term-lotpick-scope{ margin:4px 0; }
.term-lotpick-scope .term-toggle-btn{ padding:6px 4px; }

/* Audit F12: deliberate disclosure of secondary receipt details on short terminals. */
.term-valdoc-entry{ position:relative; }
.term-valdoc-expand{ display:none; color:var(--term-text); }
@media (max-height:420px){
  .term-valdoc-entry{ display:grid; grid-template-columns:minmax(0,1fr) 34px; gap:2px; margin-bottom:4px; }
  .term-valdoc-entry .term-valdoc{ margin:0; padding:6px 8px; }
  .term-valdoc-entry .term-valdoc-sub{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
  .term-valdoc-entry .term-valdoc-extra{ display:none; }
  .term-valdoc-entry.expanded .term-valdoc-extra{ display:block; }
  .term-valdoc-expand{ display:block; width:34px; min-height:34px; align-self:start; }
}

/* ── Ruta șoferului: harta + ordinea de parcurs (TASK-0575) ──────────────────────────────────
   Harta e CONȚINUTUL ecranului, nu o bandă în plus: ocupă tot ce rămâne din corp, iar comenzile
   ei stau suprapuse peste ea, în colț. Pe terminalele-ceas (WD5: 365×254) o bandă de butoane
   deasupra hărții ar lăsat-o fără înălțime utilă.
   Pastila numerotată e lizibilă pe orice fundal de hartă, deci fundalul ȘI textul sunt fixate
   împreună (regula culorilor semantice) — nu depind de tema terminalului. */
.term-movecard-plan{ font-size:calc(12px * var(--term-fsr, 1)); color:var(--term-primary); margin-top:2px; }
.term-rmhead .warn{ font-size:calc(12px * var(--term-fsr, 1)); color:#E65100; margin-top:2px; }
.term-rmactions{ display:flex; gap:6px; flex:none; margin-top:6px; }
.term-rmactions .term-btn2{ flex:1; height:44px; }

.term-mapwrap{ position:relative; flex:1; min-height:140px; margin-top:6px; border-radius:6px; overflow:hidden; }
/* Grila de fundal ține pozițiile relative citibile când dalele OSM nu se încarcă. */
.term-map{ position:absolute; inset:0; background-color:var(--term-surface);
  background-image:linear-gradient(0deg, rgba(128,128,128,.18) 1px, transparent 1px),
                   linear-gradient(90deg, rgba(128,128,128,.18) 1px, transparent 1px);
  background-size:100% 24px, 24px 100%; }
.term-mapoffline{ position:absolute; left:6px; right:6px; bottom:6px; z-index:500; background:rgba(0,0,0,.72);
  color:#fff; font-size:calc(12px * var(--term-fsr, 1)); padding:6px 8px; border-radius:6px; }
.term-mapctl{ position:absolute; right:6px; bottom:6px; z-index:500; display:flex; flex-direction:column; gap:4px; }
.term-mapctl .term-btn2{ height:34px; padding:0 8px; font-size:calc(12px * var(--term-fsr, 1));
  background:var(--term-surface); }
.term-mapstop{ display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:14px;
  background:#1565C0; color:#fff; font-weight:700; font-size:13px; border:2px solid #fff; box-sizing:border-box; }
.term-mapstop.next{ background:#E65100; }
.term-mapstop.done{ background:#2E7D32; }
/* Butonul de hartă din bara de titlu e text, nu pictogramă: nu există glif de hartă în set și un
   simbol unicode nu se desenează la fel pe toate WebView-urile din flotă. */
.term-iconbtn-text{ font-size:calc(13px * var(--term-fsr, 1)); font-weight:700; }

/* Alegerea aplicației de navigație (TASK-0642). Butonul poartă NUMELE aplicației, deci textul lui
   variază („Implicit", „Google Maps", „Waze") și nu poate împinge afară „Navighează" și „Hartă":
   nu se lățește după conținut, se scurtează. */
.term-navpick{ flex:0 1 auto; min-width:0; font-size:calc(12px * var(--term-fsr, 1)); padding:0 8px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Rândul secundar al unei foi (numele navigației sub „Navighează"): aceeași listă, altă greutate —
   e o informație despre acțiunea de deasupra, nu o acțiune egală cu ea. */
.term-sheet-item.sub{ font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); padding-top:6px; }
.term-sheet-item.sel{ font-weight:700; }

/* Banda „oprirea următoare", suprapusă peste hartă în partea de sus: spune unde trebuie să ajungă
   șoferul ACUM și pornește navigarea dintr-o apăsare, fără să caute pastila portocalie. Suprapusă,
   nu adăugată deasupra hărții — pe WD5 (254 px utili) o bandă în plus ar fi o oprire mai puțin
   vizibilă. Fundalul e fixat, ca pastilele numerotate: trebuie citită peste dale de orice culoare. */
.term-mapnext{ position:absolute; left:6px; right:6px; top:6px; z-index:500; display:flex; gap:6px;
  align-items:center; background:rgba(0,0,0,.72); color:#fff; border-radius:6px; padding:5px 6px; }
.term-mapnext-main{ flex:1; min-width:0; display:flex; flex-direction:column; align-items:flex-start;
  background:none; border:none; color:inherit; text-align:left; cursor:pointer; padding:0; }
.term-mapnext .t{ font-weight:700; font-size:calc(13px * var(--term-fsr, 1));
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.term-mapnext .s{ font-size:calc(12px * var(--term-fsr, 1)); opacity:.85;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.term-mapnext .term-btn2{ flex:none; height:32px; padding:0 10px; font-size:calc(12px * var(--term-fsr, 1));
  background:var(--term-surface); }
/* Leaflet își pune comenzile de zoom exact unde stă banda: le coboară sub ea, altfel banda ar
   acoperi butoanele de zoom și nu s-ar mai putea mări harta. */
.term-mapwrap .leaflet-top.leaflet-left{ margin-top:44px; }

@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  .term-rmactions .term-btn2{ height:36px; }
  .term-mapwrap{ margin-top:4px; }
  .term-mapctl .term-btn2{ height:30px; }
  /* Banda rămâne, dar mai subțire — textul NU se micșorează (regula ecranelor mici). */
  .term-mapnext{ padding:4px 5px; gap:4px; }
  .term-mapnext .term-btn2{ height:28px; padding:0 8px; }
  .term-mapwrap .leaflet-top.leaflet-left{ margin-top:38px; }
}

/* Nomenclature picker (TerminalLookupField): the value on one line with its two actions — browse
   and search — instead of a dropdown nobody can read on a terminal. The value takes the row and
   shrinks; the two actions keep their tap size, because a picker that cannot be tapped is worse
   than a long list. */
/* Above the sheets the terminal already uses: some screens put this field INSIDE a full-page sheet
   (choosing a pallet type), and a picker whose backdrop sat under its own form would leave the form
   underneath clickable while the picker is open. */
.term-lookup-back{ z-index:60; }
.term-lookup-sheet{ z-index:61; }
.term-lookup{ display:flex; gap:4px; align-items:stretch; margin-top:8px; min-width:0; }
.term-lookup-value{ flex:1; min-width:0; text-align:left; cursor:pointer; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap; }
.term-lookup-value:disabled{ cursor:default; opacity:.7; }
.term-lookup-ph{ color:var(--term-text2); }
.term-lookup-act{ flex:none; width:46px; display:inline-flex; align-items:center; justify-content:center; }
/* Secondary detail of a row (remaining quantity, status, plate): information about the row above
   it, not a second row to choose from. */
.term-lookup-extra{ display:block; font-size:calc(13px * var(--term-fsr, 1)); color:var(--term-text2); }
.term-lookup-pager{ flex:none; display:flex; gap:8px; align-items:center; justify-content:center;
  padding:6px 16px 0; color:var(--term-text2); font-size:calc(13px * var(--term-fsr, 1)); }
.term-lookup-foot{ flex:none; display:flex; gap:8px; padding:8px 16px 0; }
.term-lookup-foot .term-btn2{ flex:1; }
/* Small screens (watch terminals): the search row stays — it is the only action without an
   alternative — while the bands around it get thinner. The text is NOT made smaller. */
@media (max-height: 460px), (max-width: 380px) and (max-height: 600px){
  .term-lookup-act{ width:40px; }
  .term-lookup-pager{ padding:4px 12px 0; }
  .term-lookup-foot{ padding:5px 12px 0; }
  .term-lookup-foot .term-btn2{ height:36px; }
  .term-lookup-sheet{ max-height:88vh; max-height:88dvh; }
}

/* Planul de încărcare: următoarea paletă de urcat trebuie să sară în ochi de la un metru, cu mâinile
   ocupate, iar ce e deja în mașină trebuie să se stingă fără să dispară — omul are nevoie să vadă și
   cât a făcut, nu doar ce mai are. Culorile vin din variabilele temei, ca pe tot terminalul. */
/* Only theme variables that exist: an undefined one makes the whole declaration fall back to the
   text colour, and the card meant to stand out looked like every other. */
.term-movecard.next { border-left: 4px solid var(--term-primary); background: var(--term-surface); }
.term-movecard.loaded { opacity: .55; }
.term-movecard.loaded .term-movecard-title { text-decoration: line-through; }
.term-checkbtn.done { display: inline-flex; align-items: center; justify-content: center;
                      color: var(--term-primary); opacity: .8; }

/* Refusal shown by js/scanonly.js under the scan field: the code was typed, not scanned. */
.term-scanonly-msg { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; font-weight: 600;
                     color: var(--term-error); border: 1px solid var(--term-error); }
