@charset "UTF-8";
/* ===========================================================================
   DEJAVU CONCRETE FACTORY ERP — design system
   ---------------------------------------------------------------------------
   Premium dark-navy SaaS shell, Kurdish Sorani RTL content.

   Direction model: the app chrome (sidebar, top bar) is LTR so the sidebar sits
   on the left in every language, exactly as the approved design. The page body
   inherits the document direction, so tables, forms and panels are true RTL in
   Kurdish and Arabic and true LTR in English.
   =========================================================================== */

/* --- 1. tokens ---------------------------------------------------------- */
:root{
  --blue:#3b82f6; --blue-600:#2563eb; --blue-700:#1d4ed8;
  --emerald:#10b981; --purple:#a855f7; --amber:#f59e0b;
  --cyan:#06b6d4; --violet:#8b5cf6; --rose:#f43f5e;

  /* The sidebar is dark in the light and dark themes — it is the product's
     signature. The bright theme restates every one of these. */
  --side-bg:#0c1322; --side-bg-2:#0a1020;
  --side-ink:#c3cee0; --side-ink-dim:#6b7c99; --side-rule:#1a2439;
  --side-hover:#15203551;
  --side-strong:#ffffff;      /* text on a hovered item */
  --side-name:#e8eefb;        /* the signed-in person */
  --side-sec:#4d5c78;         /* section captions */
  --side-user-bg:#131d3166; --side-user-hover:#18243c;
  --side-scroll:#1e2a42;
  --side-by:#93b4f7; --side-by-hover:#bcd3fb;

  --page:#eef2f7; --card:#ffffff; --card-2:#f8fafc;
  --rule:#e2e8f0; --rule-soft:#eef2f7;
  --ink:#0f172a; --ink-2:#55637a; --ink-3:#8494ac;

  --r-lg:16px; --r-md:12px; --r-sm:9px;
  --sidebar:248px; --topbar:68px;

  --f:"Noto Sans Arabic","Inter","Segoe UI",system-ui,sans-serif;
  --fn:"Inter","Noto Sans Arabic",system-ui,sans-serif;

  --shadow:0 8px 24px -14px rgba(15,23,42,.30);
  --shadow-pop:0 16px 40px -12px rgba(15,23,42,.28),0 2px 8px rgba(15,23,42,.10);
}

[data-theme="dark"]{
  --page:#080d18; --card:#101a2c; --card-2:#0d1626;
  --rule:#1e2a42; --rule-soft:#17223a;
  --ink:#e9eef7; --ink-2:#9aa9c2; --ink-3:#6b7a94;
  --shadow:0 10px 30px -12px rgba(0,0,0,.65);
  --shadow-pop:0 20px 48px -12px rgba(0,0,0,.8),0 2px 10px rgba(0,0,0,.5);
}

/*
 * Bright: the same system with the contrast turned up.
 *
 * For a plant office in daylight, and for anyone who finds the grey-on-grey
 * of the light theme hard to read: a white page, near-black text, rules you
 * can actually see, deeper accent colours that hold their own on white, and
 * a white sidebar instead of the dark one.
 */
[data-theme="bright"]{
  --blue:#1d4ed8; --blue-600:#1e40af; --blue-700:#1e3a8a;
  --emerald:#047857; --purple:#7e22ce; --amber:#b45309;
  --cyan:#0e7490; --violet:#6d28d9; --rose:#be123c;

  --page:#ffffff; --card:#ffffff; --card-2:#f1f5f9;
  --rule:#b6c2d3; --rule-soft:#dbe3ee;
  --ink:#04070f; --ink-2:#243044; --ink-3:#475569;

  --side-bg:#ffffff; --side-bg-2:#f1f5f9;
  --side-ink:#000000; --side-ink-dim:#1f2937; --side-rule:#d7dfea;
  --side-hover:#e6eeff;
  --side-strong:#04070f;
  --side-name:#04070f;
  --side-sec:#1f2937;
  --side-user-bg:#eef2f8; --side-user-hover:#e2e8f0;
  --side-scroll:#c3cede;
  --side-by:#12377f; --side-by-hover:#0b214f;

  --shadow:0 6px 18px -12px rgba(2,6,23,.35);
  --shadow-pop:0 14px 34px -14px rgba(2,6,23,.35),0 2px 8px rgba(2,6,23,.12);
}

/* --- 2. reset ----------------------------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--page);color:var(--ink);font:14px/1.55 var(--f);-webkit-font-smoothing:antialiased}
h1,h2,h3,h4,p,figure,ul,ol{margin:0}
ul,ol{padding:0;list-style:none}
img,svg{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}
::selection{background:#3b82f644}

/* Latin numerals stay LTR and tabular inside RTL text. */
.num{font-family:var(--fn);font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
/* A figures cell reads left to right — "22 A 1234" must not have its parts
   reversed — but the cell itself still sits under its own heading. Without
   this, on a right-to-left page the heading is on the right and the number
   underneath it drifts to the left. Columns that are deliberately aligned to
   the far edge (money) keep that. */
[dir="rtl"] td.num:not(.u-end):not(.u-center),
[dir="rtl"] th.num:not(.u-end):not(.u-center){text-align:right}
.u-mute{color:var(--ink-3)}
.u-end{text-align:end}
.u-nowrap{white-space:nowrap}
.up{color:var(--emerald)} .down{color:var(--rose)}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* Any author rule with its own display beats the browser's [hidden] rule,
   which silently breaks el.hidden = true. This settles it once. */
[hidden]{display:none!important}

/* --- 3. shell ----------------------------------------------------------- */
.app{display:grid;grid-template-columns:var(--sidebar) 1fr;min-height:100vh;direction:ltr}
/* ...but the page body takes the document direction back, so tables, forms
   and panels are true RTL in Kurdish and Arabic. Without this the chrome's
   LTR leaks all the way down and a Kurdish screen reads left to right. */
[dir="rtl"] .page{direction:rtl}
.main{min-width:0;display:flex;flex-direction:column}
.page{padding:22px;display:flex;flex-direction:column;gap:18px;flex:1}

/* --- 4. sidebar --------------------------------------------------------- */
.side{background:linear-gradient(180deg,var(--side-bg) 0%,var(--side-bg-2) 100%);
  border-right:1px solid var(--side-rule);display:flex;flex-direction:column;
  position:sticky;top:0;height:100vh;z-index:40}
.side__brand{display:flex;align-items:center;gap:11px;padding:18px 18px 16px;min-height:var(--topbar)}
.side__logo{width:40px;height:40px;border-radius:11px;flex:none;overflow:hidden;
  background:linear-gradient(145deg,#2563eb,#1e40af);display:grid;place-items:center;
  box-shadow:0 6px 16px -6px rgba(37,99,235,.9)}
.side__logo img{width:100%;height:100%;object-fit:cover}
.side__logo.has-logo{background:none;box-shadow:none;border-radius:0;overflow:visible;width:auto;max-width:104px}
.side__logo.has-logo img{display:block;width:auto;height:40px;max-width:104px;max-height:40px;object-fit:contain}
.side__brand>span:last-child{display:block;min-width:0}
.side__wordmark{display:block;font-family:var(--fn);font-weight:700;font-size:19px;letter-spacing:.055em;color:var(--side-strong);line-height:1}
.side__sub{display:block;font-family:var(--fn);font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:var(--side-ink-dim);margin-top:3px}

.side__nav{flex:1;overflow-y:auto;overscroll-behavior:contain;padding:6px 11px 12px}
.side__nav::-webkit-scrollbar{width:5px}
.side__nav::-webkit-scrollbar-thumb{background:var(--side-scroll);border-radius:3px}
.side__sec{padding:14px 12px 6px;font-family:var(--fn);font-size:10.5px;font-weight:700;
  letter-spacing:.13em;text-transform:uppercase;color:var(--side-sec)}

.nav{display:flex;align-items:center;gap:11px;padding:10.5px 12px;border-radius:var(--r-sm);
  color:var(--side-ink);font-size:15px;margin-bottom:2px;transition:background .13s,color .13s}
.nav svg{width:19px;height:19px;flex:none;opacity:.78}
.nav:hover{background:var(--side-hover);color:var(--side-strong)}
.nav.on{background:linear-gradient(90deg,var(--blue-700),var(--blue-600));color:#fff;font-weight:600;
  box-shadow:0 6px 16px -8px rgba(37,99,235,.95)}
.nav.on svg{opacity:1}

.side__foot{border-top:1px solid var(--side-rule);padding:11px}
.side__user{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--r-sm);background:var(--side-user-bg)}
.side__user:hover{background:var(--side-user-hover)}
.side__av{width:32px;height:32px;border-radius:9px;flex:none;display:grid;place-items:center;
  background:linear-gradient(145deg,#2563eb,#1e40af);color:#fff;font:600 12px var(--fn)}
.side__user>span:last-child{display:block;min-width:0}
.side__uname{display:block;font-size:13.5px;font-weight:600;color:var(--side-name);line-height:1.2;
  max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side__urole{display:block;font-size:11.5px;color:var(--side-ink-dim)}
.side__out{display:flex;align-items:center;gap:10px;padding:9px 10px;margin-top:4px;
  border-radius:var(--r-sm);color:var(--side-ink-dim);font-size:13.5px}
.side__out:hover{background:var(--side-hover);color:var(--side-strong)}
.side__out svg{width:18px;height:18px}
button.side__out,button.drop__item{width:100%;border:0;background:none;font:inherit;cursor:pointer;text-align:start}
button.side__out{font-size:13.5px;color:var(--side-ink-dim)}
button.drop__item{font-size:13px;color:var(--ink-2)}
.side__by{text-align:center;padding:10px 0 4px;font-family:var(--fn);font-size:10px;letter-spacing:.09em;color:var(--side-ink-dim)}
.side__by b{color:var(--side-by);font-weight:700;letter-spacing:.12em}
.side__by a:hover b{color:var(--side-by-hover)}

/* --- 5. top bar --------------------------------------------------------- */
.top{height:var(--topbar);display:flex;align-items:center;gap:10px;padding:0 20px;
  background:var(--card);border-bottom:1px solid var(--rule);position:sticky;top:0;z-index:30}

.search{position:relative;flex:1;max-width:420px}
.search>svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:17px;height:17px;color:var(--ink-3);pointer-events:none}
.search input{width:100%;height:42px;border-radius:11px;border:1px solid var(--rule);
  background:var(--card-2);color:var(--ink);padding:0 15px 0 42px;font:14px var(--f)}
.search input::placeholder{color:var(--ink-3)}
.search input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px #3b82f628}
[dir="rtl"] .search input{text-align:right}

.top__sp{margin-left:auto}
.pill{display:flex;align-items:center;gap:8px;height:42px;padding:0 13px;border-radius:11px;
  border:1px solid var(--rule);background:var(--card-2);color:var(--ink-2);font-size:13px;
  font-family:var(--fn);cursor:pointer;white-space:nowrap}
.pill:hover{border-color:var(--blue);color:var(--ink)}
.pill svg{width:16px;height:16px;flex:none}
.pill select{border:0;background:none;font:13px var(--f);color:inherit;cursor:pointer;outline:none;padding:0}

.toggle{display:flex;height:42px;border-radius:11px;border:1px solid var(--rule);background:var(--card-2);overflow:hidden}
.toggle button{width:40px;border:0;background:none;color:var(--ink-3);cursor:pointer;display:grid;place-items:center}
.toggle button svg{width:17px;height:17px}
.toggle button.on{background:var(--blue-600);color:#fff}

.prof{display:flex;align-items:center;gap:10px;padding:4px;border-radius:11px;cursor:pointer}
.prof:hover{background:var(--card-2)}
.prof__av{width:40px;height:40px;border-radius:11px;flex:none;display:grid;place-items:center;
  background:linear-gradient(145deg,#2563eb,#1e40af);color:#fff;font:600 14px var(--fn);
  border:2px solid var(--blue-600)}
.prof>span:last-child{display:block;min-width:0}
.prof__n{display:block;font-size:13px;font-weight:600;line-height:1.25;
  max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prof__r{display:block;font-size:11px;color:var(--ink-3)}

.burger{display:none;width:42px;height:42px;border-radius:11px;border:1px solid var(--rule);
  background:var(--card-2);color:var(--ink-2);cursor:pointer;place-items:center}
.burger svg{width:19px;height:19px}

/* dropdown */
.drop{position:relative}
.drop__menu{position:absolute;top:calc(100% + 7px);right:0;min-width:190px;z-index:60;
  background:var(--card);border:1px solid var(--rule);border-radius:var(--r-md);
  box-shadow:var(--shadow-pop);padding:6px;display:none}
.drop.open .drop__menu{display:block}
.drop__item{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:var(--r-sm);
  font-size:13px;color:var(--ink-2);white-space:nowrap}
.drop__item:hover{background:var(--card-2);color:var(--ink)}
.drop__item svg{width:16px;height:16px}
.drop__sep{height:1px;background:var(--rule-soft);margin:5px 0}

/* --- 6. page head ------------------------------------------------------- */
.page__head{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}
.page__head h1{font-size:21px;font-weight:700;letter-spacing:-.01em}
.page__head p{font-size:13px;color:var(--ink-3);margin-top:3px}
.page__act{margin-inline-start:auto;display:flex;gap:8px;flex-wrap:wrap}

/* --- 7. hero ------------------------------------------------------------ */
.hero{position:relative;border-radius:var(--r-lg);overflow:hidden;border:1px solid var(--rule);
  min-height:196px;display:flex;align-items:center;padding:30px 34px}
/* The plant's own yard. The photograph is wide and shallow, which is the shape
   of this band, so it is anchored on the silos rather than centred: on a narrow
   screen the crop keeps the plant and loses the empty apron. */
.hero__bg{position:absolute;inset:0;z-index:0;
  background:#0d1526 url("../img/hero.png") 38% center/cover no-repeat}
/* The veil is heaviest where the greeting sits — the right in Kurdish and
   Arabic, the left in English — so white text stays readable over a bright sky. */
.hero__veil{position:absolute;inset:0;z-index:1;
  background:linear-gradient(270deg,rgba(8,13,24,.34) 0%,rgba(8,13,24,.84) 55%,rgba(8,13,24,.95) 100%)}
[dir="ltr"] .hero__veil{background:linear-gradient(90deg,rgba(8,13,24,.95) 0%,rgba(8,13,24,.84) 45%,rgba(8,13,24,.34) 100%)}
.hero__in{position:relative;z-index:2;max-width:56%}
.hero h1{font-size:27px;font-weight:700;letter-spacing:-.01em;color:#fff}
.hero p{font-size:15px;color:#b9c7de;margin-top:7px}
.hero__date{display:inline-flex;align-items:center;gap:7px;margin-top:15px;font-size:12.5px;color:#93a4c0}
.hero__date svg{width:15px;height:15px}
.hero__chip{position:relative;z-index:2;margin-inline-start:auto;border-radius:var(--r-md);
  padding:15px 20px;background:#0b1322b8;border:1px solid #22314e;backdrop-filter:blur(8px);min-width:172px}
.hero__chip .k{font-size:11px;color:#8ea0bd;letter-spacing:.04em}
.hero__chip .v{font-size:25px;font-weight:700;color:#fff;margin-top:2px}
.hero__chip .s{font-size:11.5px;color:#7f92b1;margin-top:5px}

/* --- 8. KPI cards ------------------------------------------------------- */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(178px,1fr));gap:14px}
.kpi{position:relative;border-radius:var(--r-lg);padding:16px;border:1px solid var(--rule);
  background:var(--card);overflow:hidden}
.kpi::after{content:"";position:absolute;inset:0;opacity:.09;pointer-events:none;
  background:radial-gradient(120% 100% at 100% 0%,var(--c) 0%,transparent 62%)}
[data-theme="dark"] .kpi::after{opacity:.13}
.kpi__ico{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;margin-bottom:13px;
  background:color-mix(in srgb,var(--c) 17%,transparent);
  border:1px solid color-mix(in srgb,var(--c) 32%,transparent)}
.kpi__ico svg{width:20px;height:20px;color:var(--c)}
.kpi__k{font-size:12.5px;color:var(--ink-2)}
.kpi__v{font-size:22px;font-weight:700;margin-top:3px;letter-spacing:-.015em;
  display:flex;align-items:baseline;gap:5px;flex-wrap:wrap}
.kpi__v .u{font-size:11.5px;font-weight:500;color:var(--ink-3)}
.kpi__t{display:inline-flex;align-items:center;gap:4px;margin-top:9px;font-size:11.5px;font-weight:600;font-family:var(--fn)}
.kpi__t svg{width:12px;height:12px}
.kpi--idle .kpi__v{color:var(--ink-3);font-weight:500}

/* --- 9. grids + cards --------------------------------------------------- */
.cols{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr) minmax(0,.92fr);gap:16px;align-items:start}
.cols2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.48fr);gap:16px;align-items:start}
.cols-half{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.cols-aside{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}

.card{background:var(--card);border:1px solid var(--rule);border-radius:var(--r-lg);box-shadow:var(--shadow)}
.card__h{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid var(--rule-soft);flex-wrap:wrap}
.card__h h2{font-size:15px;font-weight:600}
.card__h .end{margin-inline-start:auto}
.card__b{padding:18px}
.card__f{padding:14px 18px;border-top:1px solid var(--rule-soft);display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.link{font-size:12px;color:var(--blue);font-weight:600}
.link:hover{text-decoration:underline}

.tabs{display:flex;gap:3px;background:var(--card-2);border:1px solid var(--rule);border-radius:9px;padding:3px}
.tabs a,.tabs button{border:0;background:none;color:var(--ink-3);font:12px var(--f);
  padding:5px 11px;border-radius:7px;cursor:pointer}
.tabs a.on,.tabs button.on{background:var(--blue-600);color:#fff;font-weight:600}

/* legend */
.leg{display:flex;flex-direction:column;gap:11px;margin-top:14px}
.leg div{display:flex;align-items:center;gap:9px;font-size:12.5px;color:var(--ink-2)}
.leg i{width:9px;height:9px;border-radius:3px;flex:none}
.leg .p{margin-inline-start:auto;font-family:var(--fn);color:var(--ink);font-weight:600}

/* --- 10. activity list -------------------------------------------------- */
.act{display:flex;align-items:center;gap:12px;padding:11px 18px;border-bottom:1px solid var(--rule-soft)}
.act:last-child{border-bottom:0}
.act__i{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;flex:none;
  background:color-mix(in srgb,var(--c) 15%,transparent)}
.act__i svg{width:18px;height:18px;color:var(--c)}
.act__t{font-size:13px;font-weight:600}
.act__s{font-size:11px;color:var(--ink-3);margin-top:2px}
.act__a{margin-inline-start:auto;text-align:end}
.act__a b{font-size:12.5px;font-family:var(--fn);font-weight:600;display:block}
.act__a span{font-size:10.5px;color:var(--ink-3);font-family:var(--fn)}

/* --- 11. tables --------------------------------------------------------- */
.tw{overflow-x:auto}
/* A table scrolls sideways inside its card rather than squeezing its columns:
   names, codes, badges and links stay on one line, and a cell of free text
   (.t-wrap) keeps a readable width instead of one word per line. */
.tw td > span.t-main,.tw td > span.t-sub,.tw td .badge,.tw td > a,.tw td > span > a,.tw th{white-space:nowrap}
.tw td.t-wrap{min-width:220px}
table{width:100%;border-collapse:collapse}
th{font-size:11px;font-weight:600;color:var(--ink-3);text-align:start;padding:11px 14px;
  border-bottom:1px solid var(--rule);letter-spacing:.02em;white-space:nowrap}
td{padding:12px 14px;border-bottom:1px solid var(--rule-soft);font-size:13px;vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#3b82f60d}
tfoot td{font-weight:700;background:var(--card-2);border-top:2px solid var(--rule)}
.t-main{font-weight:600}
.t-sub{font-size:11px;color:var(--ink-3);margin-top:2px}
.t-act{text-align:end;white-space:nowrap}

.badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:7px;font-size:11px;font-weight:600;white-space:nowrap}
.b-ok{background:#10b98122;color:#047857} .b-wait{background:#f59e0b22;color:#b45309}
.b-no{background:#f43f5e22;color:#be123c} .b-part{background:#8b5cf622;color:#6d28d9}
.b-info{background:#3b82f622;color:#1d4ed8} .b-mute{background:#94a3b822;color:#475569}
[data-theme="dark"] .b-ok{color:#34d399} [data-theme="dark"] .b-wait{color:#fbbf24}
[data-theme="dark"] .b-no{color:#fb7185} [data-theme="dark"] .b-part{color:#a78bfa}
[data-theme="dark"] .b-info{color:#93c5fd} [data-theme="dark"] .b-mute{color:#cbd5e1}

/* --- 12. buttons -------------------------------------------------------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:40px;padding:0 16px;
  border-radius:var(--r-sm);border:1px solid var(--rule);background:var(--card-2);color:var(--ink);
  font:500 13.5px var(--f);cursor:pointer;white-space:nowrap}
.btn:hover{border-color:var(--blue);color:var(--blue)}
.btn svg{width:16px;height:16px}
.btn--primary{background:linear-gradient(90deg,var(--blue-700),var(--blue-600));border-color:var(--blue-600);
  color:#fff;font-weight:600;box-shadow:0 6px 16px -8px rgba(37,99,235,.9)}
.btn--primary:hover{filter:brightness(1.08);color:#fff;border-color:var(--blue-600)}
.btn--danger{color:var(--rose);border-color:#f43f5e44}
.btn--danger:hover{background:#f43f5e14;border-color:var(--rose);color:var(--rose)}
.btn--ghost{background:none;border-color:transparent;color:var(--ink-2)}
.btn--ghost:hover{background:var(--card-2);color:var(--ink);border-color:transparent}
.btn--sm{height:32px;padding:0 11px;font-size:12.5px}
.btn--block{width:100%}
.btn[disabled]{opacity:.5;cursor:not-allowed}

/* --- 13. forms ---------------------------------------------------------- */
.fgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px 18px}
.fgrid--1{grid-template-columns:minmax(0,440px)}
.f-wide{grid-column:1/-1}
.field{display:flex;flex-direction:column;gap:7px;min-width:0}
.field__l{font-size:12.5px;font-weight:600;color:var(--ink-2);display:flex;align-items:baseline;gap:7px}
.field__h{font-weight:400;color:var(--ink-3);font-size:11.5px}
.input,.select,.textarea{width:100%;height:42px;padding:0 13px;border-radius:var(--r-sm);
  border:1px solid var(--rule);background:var(--card-2);color:var(--ink);font:14px var(--f)}
.textarea{height:auto;min-height:92px;padding:11px 13px;line-height:1.55;resize:vertical}
.input:focus,.select:focus,.textarea:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px #3b82f628}
.input::placeholder,.textarea::placeholder{color:var(--ink-3)}
.input--num{font-family:var(--fn);font-variant-numeric:tabular-nums}
.select{appearance:none;cursor:pointer;padding-inline-end:34px;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink-3) 50%),linear-gradient(135deg,var(--ink-3) 50%,transparent 50%);
  background-size:5px 5px,5px 5px;background-repeat:no-repeat;
  background-position:right 15px center,right 10px center}
[dir="rtl"] .select{background-position:left 10px center,left 15px center}
.bad{border-color:var(--rose)!important}
.field__e{font-size:11.5px;color:var(--rose);font-weight:500}

.check{display:flex;align-items:flex-start;gap:9px;font-size:13.5px;cursor:pointer}
.check input{margin:3px 0 0;width:16px;height:16px;accent-color:var(--blue-600);flex:none}
.check span{color:var(--ink-2)}
/* a tick sitting under the field it qualifies, not in a row of its own */
.check--tight{margin-top:7px;font-size:12.5px}

/* A list of ticks in a box of its own — the crew on a ticket, where a plant
   with thirty drivers would otherwise get thirty rows down the form. It
   scrolls rather than growing without end. */
.pickbox{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:6px 14px;
  max-height:190px;overflow-y:auto;padding:11px 12px;border:1px solid var(--rule);
  border-radius:var(--r-sm);background:var(--card-2)}
.pickbox__i{font-size:13px;align-items:center}
.pickbox__i span{color:var(--ink-2)}
.pickbox::-webkit-scrollbar{width:6px}
.pickbox::-webkit-scrollbar-thumb{background:var(--rule);border-radius:3px}

.fgroup+.fgroup{margin-top:24px;padding-top:20px;border-top:1px solid var(--rule-soft)}
.fgroup__t{font-family:var(--fn);font-size:10px;font-weight:600;letter-spacing:.11em;
  text-transform:uppercase;color:var(--ink-3);margin-bottom:14px}
.facts{display:flex;gap:9px;align-items:center;padding-top:20px;margin-top:20px;border-top:1px solid var(--rule-soft);flex-wrap:wrap}
.facts .push{margin-inline-start:auto}

/* file drop (logo) */
.drop-file{display:flex;align-items:center;gap:14px;padding:14px;border-radius:var(--r-md);
  border:1px dashed var(--rule);background:var(--card-2)}
.drop-file__pv{width:64px;height:64px;border-radius:var(--r-md);flex:none;display:grid;place-items:center;
  background:linear-gradient(145deg,#2563eb,#1e40af);overflow:hidden}
.drop-file__pv img{width:100%;height:100%;object-fit:cover}
.drop-file__pv svg{width:26px;height:26px;color:#fff}

/* --- 14. toolbar -------------------------------------------------------- */
.toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:11px;padding:14px 18px;
  background:var(--card-2);border-bottom:1px solid var(--rule)}
.toolbar .field{gap:5px}
.toolbar .field__l{font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3)}
.toolbar .input,.toolbar .select{height:38px;font-size:13px}
.toolbar__s{min-width:210px;flex:1 1 210px}
.toolbar__e{margin-inline-start:auto;display:flex;gap:8px;align-items:flex-end}

/* --- 15. pagination ----------------------------------------------------- */
.pager{display:flex;align-items:center;gap:9px;padding:13px 18px;border-top:1px solid var(--rule-soft);
  font-size:12.5px;color:var(--ink-3);flex-wrap:wrap}
.pager__l{margin-inline-start:auto;display:flex;gap:4px}
.pager__b{min-width:32px;height:32px;padding:0 10px;display:grid;place-items:center;
  border:1px solid var(--rule);border-radius:var(--r-sm);background:var(--card);
  color:var(--ink-2);font:13px var(--fn)}
.pager__b:hover{border-color:var(--blue);color:var(--blue)}
.pager__b.on{background:var(--blue-600);border-color:var(--blue-600);color:#fff;font-weight:600}
.pager__b.off{opacity:.4;pointer-events:none}

/* --- 16. empty / notice / toast ----------------------------------------- */
.empty{padding:48px 24px;text-align:center}
.empty__i{width:60px;height:60px;margin:0 auto 16px;border-radius:18px;display:grid;place-items:center;
  background:var(--card-2);border:1px solid var(--rule)}
.empty__i svg{width:26px;height:26px;color:var(--ink-3)}
.empty__t{font-size:15px;font-weight:600}
.empty__b{font-size:13px;color:var(--ink-3);margin-top:6px;max-width:46ch;margin-inline:auto;line-height:1.6}
.empty__a{margin-top:18px;display:flex;justify-content:center;gap:8px}

.notice{display:flex;gap:12px;padding:14px 16px;border-radius:var(--r-md);
  border:1px solid var(--rule);background:var(--card);font-size:13px;line-height:1.6}
.notice__i{width:22px;height:22px;flex:none;margin-top:1px}
.notice__i svg{width:22px;height:22px}
.notice b{display:block;margin-bottom:3px;font-weight:600}
.n-info{background:#3b82f610;border-color:#3b82f63d} .n-info .notice__i{color:var(--blue)}
.n-ok{background:#10b98110;border-color:#10b9813d} .n-ok .notice__i{color:var(--emerald)}
.n-warn{background:#f59e0b12;border-color:#f59e0b3d} .n-warn .notice__i{color:var(--amber)}
.n-err{background:#f43f5e10;border-color:#f43f5e3d} .n-err .notice__i{color:var(--rose)}

.toasts{position:fixed;top:calc(var(--topbar) + 14px);inset-inline-end:22px;z-index:90;
  display:flex;flex-direction:column;gap:10px;max-width:min(380px,calc(100vw - 32px))}
.toast{display:flex;align-items:flex-start;gap:11px;padding:13px 14px;border-radius:var(--r-md);
  background:var(--card);border:1px solid var(--rule);box-shadow:var(--shadow-pop);font-size:13px;
  animation:tin .18s ease-out}
.toast__i{width:20px;height:20px;flex:none}
.toast__i svg{width:20px;height:20px}
.t-ok .toast__i{color:var(--emerald)} .t-warn .toast__i{color:var(--amber)} .t-error .toast__i{color:var(--rose)}
.toast__x{margin-inline-start:auto;border:0;background:none;color:var(--ink-3);cursor:pointer;
  font-size:17px;line-height:1;padding:0 2px}
@keyframes tin{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* --- 17. spec list ------------------------------------------------------ */
.spec{display:grid;grid-template-columns:max-content 1fr;gap:11px 18px;font-size:13.5px}
.spec dt{font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);font-weight:600;padding-top:2px}
.spec dd{margin:0}

/* --- 18. permission matrix ---------------------------------------------- */
.mx{display:grid;grid-template-columns:200px 1fr;gap:18px;padding:16px 18px;
  border-bottom:1px solid var(--rule-soft);align-items:start}
.mx:last-child{border-bottom:0}
.mx__n{font-size:13.5px;font-weight:600}
.mx__s{font-family:var(--fn);font-size:10.5px;color:var(--ink-3);margin-top:1px}
.mx__a{display:flex;flex-wrap:wrap;gap:10px 20px}

/* --- 19. mixers panel --------------------------------------------------- */
/* A photograph of a mixer rather than a drawing of one: the card is about the
   plant's own trucks, and the tile is small enough that a picture reads faster
   than an illustration. The ratio is fixed so the card's height never depends
   on whether the image has loaded. */
.mix__img{border-radius:var(--r-md);overflow:hidden;border:1px solid var(--rule);margin-bottom:14px;
  aspect-ratio:8/3;min-height:112px;
  background:#16233a url("../img/mixer.png") center 62%/cover no-repeat}
.mix__s{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center}
.mix__s>div{padding:11px 4px;border-radius:var(--r-sm);background:var(--card-2);border:1px solid var(--rule)}
.mix__s svg{width:17px;height:17px;margin:0 auto 5px}
.mix__s b{display:block;font-size:19px;font-family:var(--fn);font-weight:700}
.mix__s span{font-size:10.5px;color:var(--ink-3)}

/* --- 20. auth gate ------------------------------------------------------ */
/* The yard itself behind the form. The photo is dark on its right-hand side,
   so the card sits there and the plant stays readable behind it. The scrim is
   a pseudo-element rather than a second background layer so that a phone can
   swap it for a top-to-bottom one without repeating the image URL. */
.gate{position:relative;min-height:100vh;display:flex;align-items:center;
  padding:clamp(20px,4vw,60px);
  background:#080d18 url("../img/login.png") center/cover no-repeat}
.gate::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(6,11,22,.06) 0%,rgba(6,11,22,.32) 38%,
    rgba(6,11,22,.74) 68%,rgba(6,11,22,.9) 100%)}
/* Physical margins, not logical ones: the card belongs on the right of the
   photograph whether the interface is read right-to-left or left-to-right. */
.gate__box{position:relative;z-index:1;margin-left:auto;margin-right:0;
  width:100%;max-width:404px;background:rgba(13,19,33,.86);
  -webkit-backdrop-filter:blur(16px) saturate(120%);backdrop-filter:blur(16px) saturate(120%);
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;box-shadow:0 40px 90px -30px rgba(0,0,0,.85);overflow:hidden}
.gate__h{padding:30px 30px 22px;text-align:center;border-bottom:1px solid var(--rule-soft)}
.gate__logo{width:62px;height:62px;border-radius:17px;margin:0 auto 15px;display:grid;place-items:center;
  background:linear-gradient(145deg,#2563eb,#1e40af);box-shadow:0 12px 28px -10px rgba(37,99,235,.95);overflow:hidden}
.gate__logo img{width:100%;height:100%;object-fit:cover}
.gate__logo.has-logo{background:none;box-shadow:none;border-radius:0;overflow:visible;
  width:auto;max-width:230px;height:80px}
.gate__logo.has-logo img{display:block;width:auto;height:80px;max-width:230px;max-height:80px;object-fit:contain}
.gate__logo svg{width:30px;height:30px;color:#fff}
.gate__t{font-size:18px;font-weight:700}
.gate__s{font-size:12.5px;color:var(--ink-3);margin-top:4px}
.gate__b{padding:24px 30px 28px;display:flex;flex-direction:column;gap:16px}
.gate__f{padding:14px 30px;border-top:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04);
  display:flex;align-items:center;gap:12px;font-family:var(--fn);font-size:10.5px;color:var(--ink-3)}

/* On a phone there is no room beside the truck, so the card is centred and the
   scrim runs top to bottom instead of across. */
@media (max-width:760px){
  .gate{padding:18px;background-position:32% center}   /* keep the mixer in frame */
  .gate__box{margin-inline:auto}
  .gate::before{background:linear-gradient(180deg,rgba(6,11,22,.5) 0%,rgba(6,11,22,.86) 55%,rgba(6,11,22,.94) 100%)}
}
.gate__langs{margin-inline-start:auto;display:flex;gap:3px}
.gate__lang{padding:3px 9px;border:1px solid var(--rule);border-radius:7px;font-size:10.5px;color:var(--ink-3)}
.gate__lang.on{background:var(--blue-600);border-color:var(--blue-600);color:#fff;font-weight:700}

/* --- 21. setup / installer --------------------------------------------- */
.setup{max-width:880px;margin-inline:auto;padding:30px 20px 60px}
.setup__h{background:var(--card);border:1px solid var(--rule);border-radius:var(--r-lg);
  padding:24px 26px;margin-bottom:18px;display:flex;align-items:center;gap:16px;box-shadow:var(--shadow)}
.setup__logo{width:52px;height:52px;border-radius:14px;flex:none;display:grid;place-items:center;
  background:linear-gradient(145deg,#2563eb,#1e40af);box-shadow:0 10px 24px -10px rgba(37,99,235,.95)}
.setup__logo svg{width:26px;height:26px;color:#fff}
.setup__h h1{font-size:20px;font-weight:700}
.setup__h p{font-size:13px;color:var(--ink-3);margin-top:4px}
.setup__card+.setup__card{margin-top:16px}
.chk{width:100%;border-collapse:collapse;font-size:13px}
.chk td{padding:9px 18px;border-bottom:1px solid var(--rule-soft)}
.chk tr:last-child td{border-bottom:0}

/* --- 22. responsive ----------------------------------------------------- */
@media (max-width:1300px){
  .cols{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .cols>*:last-child{grid-column:1/-1}
}
@media (max-width:1100px){
  /* minmax(0,1fr), not 1fr: a plain fr track is floored at the item's
     min-content width, so one wide table would push the whole page sideways
     on a phone instead of scrolling inside its own box. */
  .cols,.cols2,.cols-half,.cols-aside{grid-template-columns:minmax(0,1fr)}
  .cols>*:last-child{grid-column:auto}
}
@media (max-width:980px){
  .app{grid-template-columns:1fr}
  .side{position:fixed;inset-block:0;left:0;width:var(--sidebar);
    transform:translateX(-100%);transition:transform .2s ease-out;box-shadow:var(--shadow-pop)}
  .side.open{transform:none}
  .burger{display:grid}
  .scrim{position:fixed;inset:0;background:rgba(6,10,18,.62);z-index:35}
  .scrim[hidden]{display:none}
  .search{max-width:none}
  .hero__in{max-width:100%}
  .hero__chip{display:none}
  .mx{grid-template-columns:1fr;gap:10px}
}
@media (max-width:760px){
  .page{padding:14px;gap:14px}
  .top{padding:0 12px;gap:8px}
  .pill--date,.pill--lang span{display:none}
  .prof__n,.prof__r{display:none}
  .hero{padding:22px 20px;min-height:auto}
  .hero h1{font-size:21px} .hero p{font-size:13.5px}
  /* The greeting spans the whole band on a phone, so the veil stops being a
     side-to-side wash and covers the photograph evenly instead. */
  .hero__veil,[dir="ltr"] .hero__veil{background:linear-gradient(180deg,rgba(8,13,24,.72),rgba(8,13,24,.9))}
  .page__head{flex-direction:column;align-items:stretch}
  .page__act{margin-inline-start:0}
  .fgrid{grid-template-columns:1fr}
  .spec{grid-template-columns:1fr;gap:3px 0}
  .spec dd{margin-bottom:10px}
  .toasts{inset-inline:12px;max-width:none}
  .card__h{padding:14px}
  .card__b{padding:14px}
  /* Two figures a row on a phone: eight single-file cards were a long scroll
     before the first chart. */
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .kpi{padding:12px}
  .kpi__ico{width:34px;height:34px;border-radius:10px;margin-bottom:9px}
  .kpi__ico svg{width:17px;height:17px}
  .kpi__k{font-size:11.5px}
  .kpi__v{font-size:17px}
}

/* --- 23. print ---------------------------------------------------------- */
@media print{
  /* Paper is white whatever the screen was. Without resetting the tokens, a
     report printed from dark mode comes out as pale text on dark boxes — or,
     with background printing off, as pale text on nothing. */
  :root,[data-theme="dark"]{
    --page:#fff; --card:#fff; --card-2:#fff;
    --rule:#bfc6d1; --rule-soft:#dde2ea;
    --ink:#000; --ink-2:#333; --ink-3:#555;
    --shadow:none; --shadow-pop:none;
  }
  .side,.top,.toasts,.page__act,.toolbar,.pager,.no-print,.scrim,.btn,.tabs,.burger{display:none!important}
  .app{grid-template-columns:1fr;display:block}
  body{background:#fff;color:#000;font-size:10.5pt}
  .card{border-color:#bfc6d1;box-shadow:none;break-inside:avoid;background:#fff}
  .page{padding:0;gap:12px;direction:inherit}
  a{color:#000}
  /* A table that scrolls on screen would be cut off on paper. */
  .tw{overflow:visible}
  table{font-size:9.5pt}
  thead{display:table-header-group}
  tr{break-inside:avoid}
  .kpi{background:#fff;border-color:#bfc6d1}
  .kpi::after,.hero__bg,.hero__veil{display:none}
  details{display:block}
  details>summary{list-style:none}
  details:not([open])>*:not(summary){display:block}
  .print-head{display:flex!important}
}

/* The masthead a printed app page carries: plant, page, when and by whom.
   Hidden on screen, where the sidebar and top bar already say all of it. */
.print-head{display:none;align-items:flex-end;gap:14px;padding-bottom:10px;margin-bottom:12px;
  border-bottom:2px solid #000;color:#000}
.print-head b{font-size:14pt}
.print-head span{font-size:9pt;color:#333}
.print-head .end{margin-inline-start:auto;text-align:end}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

/* --- 24. sale lines editor ---------------------------------------------- */
.lines{border:1px solid var(--rule);border-radius:var(--r-md);overflow:hidden;background:var(--card-2)}
.lines__h,.line{display:grid;grid-template-columns:minmax(0,2.2fr) 110px 130px minmax(90px,1fr) 40px;
  gap:10px;align-items:center;padding:10px 12px}
.lines__h{background:var(--card-2);border-bottom:1px solid var(--rule);
  font-family:var(--fn);font-size:10px;font-weight:600;letter-spacing:.09em;
  text-transform:uppercase;color:var(--ink-3)}
.lines__h .u-end,.line .u-end{text-align:end}
.line{background:var(--card);border-bottom:1px solid var(--rule-soft)}
.line:last-child{border-bottom:0}
.line .input,.line .select{height:38px;font-size:13px}
.line__t{font-family:var(--fn);font-variant-numeric:tabular-nums;font-weight:600;
  font-size:13.5px;text-align:end;white-space:nowrap}
.line__x{width:34px;height:34px;border-radius:9px;border:1px solid transparent;background:none;
  color:var(--ink-3);display:grid;place-items:center;cursor:pointer}
.line__x:hover{color:var(--rose);border-color:#f43f5e44;background:#f43f5e10}
.line__x svg{width:16px;height:16px}
.lines__f{display:flex;align-items:center;gap:9px;padding:11px 12px;border-top:1px solid var(--rule);
  background:var(--card-2);flex-wrap:wrap}
.sum{margin-inline-start:auto;display:grid;grid-template-columns:auto auto;gap:4px 18px;
  font-size:13px;align-items:baseline}
.sum dt{color:var(--ink-3)}
.sum dd{font-family:var(--fn);font-variant-numeric:tabular-nums;font-weight:600;text-align:end}
.sum .big dd{font-size:17px;color:var(--blue)}
@media (max-width:760px){
  .lines__h{display:none}
  .line{grid-template-columns:1fr 1fr;gap:8px;padding:12px}
  /* the material picker gets the whole first row (the row starts with a hidden id) */
  .line>select{grid-column:1/-1}
  .line__t{grid-column:1/-1;text-align:start}
  .line__x{justify-self:end}
}

/* --- 25. dispatch board -------------------------------------------------- */
.board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:start}
.bcol{background:var(--card);border:1px solid var(--rule);border-radius:var(--r-lg);
  box-shadow:var(--shadow);overflow:hidden}
.bcol__h{display:flex;align-items:center;gap:9px;padding:13px 14px;
  border-bottom:1px solid var(--rule-soft);border-top:3px solid var(--c,var(--blue))}
.bcol__h h2{font-size:13.5px;font-weight:600}
.bcol__n{margin-inline-start:auto;min-width:24px;height:22px;padding:0 7px;border-radius:7px;
  display:grid;place-items:center;background:var(--card-2);border:1px solid var(--rule);
  font-family:var(--fn);font-size:11.5px;font-weight:700;color:var(--ink-2)}
.bcol__b{padding:10px;display:flex;flex-direction:column;gap:9px;min-height:90px}
.load{border:1px solid var(--rule);border-radius:var(--r-md);padding:11px 12px;background:var(--card-2)}
.load__h{display:flex;align-items:baseline;gap:8px}
.load__c{font-family:var(--fn);font-size:11px;font-weight:600;color:var(--ink-3)}
.load__q{margin-inline-start:auto;font-family:var(--fn);font-weight:700;font-size:13.5px}
.load__n{font-size:13.5px;font-weight:600;margin-top:5px;line-height:1.35}
.load__s{font-size:11.5px;color:var(--ink-3);margin-top:3px;line-height:1.5}
.load__f{display:flex;align-items:center;gap:6px;margin-top:10px;flex-wrap:wrap}
.load__f form{display:contents}
.bmove{height:28px;padding:0 10px;border-radius:8px;border:1px solid var(--rule);
  background:var(--card);color:var(--ink-2);font:600 11.5px var(--f);cursor:pointer;
  display:inline-flex;align-items:center;gap:5px}
.bmove:hover{border-color:var(--blue);color:var(--blue)}
.bmove--go{background:linear-gradient(90deg,var(--blue-700),var(--blue-600));
  border-color:var(--blue-600);color:#fff}
.bmove--go:hover{filter:brightness(1.08);color:#fff}
.bmove--x{color:var(--ink-3)}
.bmove--x:hover{border-color:var(--rose);color:var(--rose)}
.bempty{padding:22px 10px;text-align:center;font-size:12px;color:var(--ink-3)}
@media (max-width:1300px){ .board{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:760px){ .board{grid-template-columns:1fr} }

/* --- 26. printable documents -------------------------------------------- */
.sheet{background:#fff;color:#111;border:1px solid var(--rule);border-radius:var(--r-lg);
  padding:28px 30px;max-width:820px;margin-inline:auto;box-shadow:var(--shadow)}
/* The masthead reads as one line: the mark, then who the plant is, then which
   document this is. Centred against each other so a logo of any height does
   not leave the name floating. */
.sheet__h{display:flex;align-items:center;gap:20px;padding-bottom:16px;
  border-bottom:2px solid #111;margin-bottom:20px}
.sheet__logo{width:58px;height:58px;border-radius:12px;flex:none;overflow:hidden;
  display:grid;place-items:center;background:#0c1322}
.sheet__logo img{width:100%;height:100%;object-fit:cover}
/* The plant's own mark, wherever it is shown: no box behind it, no crop, and
   whatever shape it was drawn in. A logo is usually a wide wordmark, so the
   height is fixed and the width follows it. The coloured tile below is only
   for the placeholder, on a plant that has not uploaded one yet. */
.sheet__logo.has-logo{background:none;border-radius:0;overflow:visible;
  width:auto;max-width:220px;height:78px}
.sheet__logo.has-logo img{display:block;width:auto;height:78px;max-width:220px;max-height:78px;object-fit:contain}
.sheet__logo svg{width:28px;height:28px;color:#fff}
.sheet__n{font-size:18px;font-weight:700;color:#111;line-height:1.35}
.sheet__m{font-size:11.5px;color:#555;margin-top:4px;line-height:1.7}
.sheet__m div{display:block}
.sheet__k{margin-inline-start:auto;text-align:end}
.sheet__k b{display:block;font-size:15px;font-weight:700;color:#111}
.sheet__k span{display:block;font-family:var(--fn);font-size:12px;color:#555;margin-top:3px}
.sheet dl.spec dt{color:#555}
.sheet dl.spec dd{color:#111}
.sheet table{width:100%;border-collapse:collapse;font-size:12.5px;margin:6px 0 0}
.sheet th{text-align:start;padding:8px 10px;background:#f2f4f7;color:#111;
  border-bottom:1px solid #999;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.06em}
.sheet td{padding:8px 10px;border-bottom:1px solid #e2e5ea;color:#111}
.sheet tfoot td{border-bottom:0;border-top:1px solid #999;font-weight:600}
.sheet__sig{display:grid;grid-template-columns:repeat(3,1fr);gap:26px;margin-top:40px}
.sheet__sig div{border-top:1px solid #111;padding-top:7px;font-size:11.5px;color:#333}
.sheet__f{margin-top:26px;padding-top:12px;border-top:1px solid #d7dbe2;
  font-size:11px;color:#666;display:flex;gap:12px;flex-wrap:wrap}
.sheet__f span:last-child{margin-inline-start:auto}
@media print{
  .sheet{border:0;box-shadow:none;padding:0;max-width:none}
  .page{padding:0}
  .sheet__h{border-bottom-color:#000}
}

/* --- the car contract ---------------------------------------------------
   A contract is read across a desk and signed, not filed in a folder, so it
   is set larger than the plant's internal vouchers: the sentence that names
   the two sides carries the agreement, and each side gets a box of its own. */
.sheet--contract{font-size:15px;line-height:1.9}
.sheet--contract .sheet__n{font-size:20px}
.sheet--contract .sheet__k b{font-size:17px}
.sheet--contract table{font-size:15px}
.sheet--contract th{font-size:12.5px}
.sheet--contract td{padding:11px 12px}
.contract__say{font-size:17.5px;font-weight:700;line-height:2.1;color:#000;margin:0 0 22px}
.contract__say b{font-size:19px}
.parties{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0 4px}
.party{border:1.5px solid #111;border-radius:8px;padding:14px 16px}
.party__r{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#555;
  border-bottom:1px solid #d7dbe2;padding-bottom:6px;margin-bottom:10px}
.party__n{font-size:19px;font-weight:700;color:#000;line-height:1.5}
.party__l{display:block;font-size:12px;color:#555;margin-top:10px}
.party__v{display:block;font-size:16px;font-weight:600;color:#111}
.sheet--contract .sheet__words{font-size:15px}
.sheet--contract .sheet__sig div{font-size:14px;padding-top:10px}
@media print{
  .sheet--contract{font-size:12.5pt}
  .contract__say{font-size:14pt}
  .party__n{font-size:15pt}
  .party__v{font-size:12.5pt}
  .sheet--contract table{font-size:11.5pt}
  .party{border-color:#000}
}

/* The amount in words, under the figure. */
.sheet__words{margin-top:12px;padding:9px 12px;border:1px dashed #999;border-radius:6px;
  font-size:12px;color:#111;line-height:1.7}
.sheet__words span{color:#555}
.sheet__copy{font-weight:700;letter-spacing:.04em}

/* A5: the same sheet, tighter. */
.paper-a5 .sheet{max-width:560px;padding:20px 22px}
.paper-a5 .sheet__n{font-size:15px}
.paper-a5 .sheet table{font-size:11px}
.paper-a5 .sheet__sig{margin-top:26px;gap:16px}

/* The 80 mm ticket for the gate printer: one column, no boxes, black on
   white, nothing a thermal head renders as a grey smudge. */
.print-ticket .psheet{padding:14px 8px 40px}
.print-ticket .sheet{max-width:302px;padding:10px 8px;border-radius:0;font-size:11px;box-shadow:none}
.print-ticket .sheet__h{flex-direction:column;align-items:center;text-align:center;gap:6px;
  padding-bottom:8px;margin-bottom:10px;border-bottom:1px dashed #000}
.print-ticket .sheet__logo{width:40px;height:40px;background:#000}
.print-ticket .sheet__logo.has-logo{width:auto;max-width:130px;height:44px;background:none}
.print-ticket .sheet__logo.has-logo img{height:44px;max-height:44px;max-width:130px}
.print-ticket .sheet__n{font-size:13px}
.print-ticket .sheet__k{margin:0;text-align:center}
.print-ticket .sheet__k b{font-size:12px}
.print-ticket .sheet dl.spec{grid-template-columns:max-content 1fr;gap:4px 10px;font-size:11px}
.print-ticket .sheet table{font-size:10.5px}
.print-ticket .sheet th,.print-ticket .sheet td{padding:4px 3px}
.print-ticket .sheet th{background:none;border-bottom:1px solid #000}
.print-ticket .sheet__words{border-style:dotted;padding:6px;font-size:10.5px}
.print-ticket .sheet__sig{grid-template-columns:1fr;gap:18px;margin-top:22px}
.print-ticket .sheet__f{flex-direction:column;gap:3px;text-align:center;font-size:9.5px}
.print-ticket .sheet__f span:last-child{margin:0}
@media print{
  .print-ticket .psheet{padding:0}
  .print-ticket .sheet{max-width:none;padding:0}
}

/* --- 27. the result ------------------------------------------------------
   One block per currency. A plant that bills in dollars and buys its diesel
   in dinars has two results and gets two blocks; they are never added. The
   figure carries its own sign in its colour, and the cost bar underneath says
   what the money went on rather than leaving "cost" as one opaque number. */
.res{display:grid;gap:18px}
.res__c{border:1px solid var(--rule);border-radius:var(--r-md);padding:15px 16px;background:var(--card-2)}
.res__h{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.res__cur{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;
  color:var(--ink-3);font-weight:700}
.res__end{margin-inline-start:auto;display:inline-flex;align-items:baseline;gap:10px}
.res__v{font-family:var(--fn);font-variant-numeric:tabular-nums;font-size:26px;
  font-weight:700;letter-spacing:-.02em;direction:ltr;unicode-bidi:isolate}
.res--up .res__v{color:var(--emerald)}
.res--down .res__v{color:var(--rose)}
.res--flat .res__v{color:var(--ink-2)}
.res__pct{font-family:var(--fn);font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:7px}
.res--up .res__pct{background:#10b98122;color:#047857}
.res--down .res__pct{background:#f43f5e22;color:#be123c}
[data-theme="dark"] .res--up .res__pct{color:#34d399}
[data-theme="dark"] .res--down .res__pct{color:#fb7185}

.res__row{display:flex;align-items:baseline;gap:8px;font-size:12.5px;color:var(--ink-2);margin-top:12px}
.res__row b{margin-inline-start:auto;font-family:var(--fn);font-variant-numeric:tabular-nums;
  color:var(--ink);font-weight:600}

/* The cost bar: revenue is the full width, the three costs eat into it. */
.bar{display:flex;height:9px;border-radius:99px;overflow:hidden;margin-top:11px;
  background:var(--rule-soft)}
.bar span{display:block;min-width:2px}
[dir="rtl"] .bar{flex-direction:row-reverse}

.res__note{font-size:11px;color:var(--ink-3);margin-top:12px;line-height:1.65}

/* A ranked list — who owes most, who we owe most, who bought most. */
.rank{display:flex;flex-direction:column}
.rank__r{display:flex;align-items:center;gap:11px;padding:10px 0;border-bottom:1px solid var(--rule-soft)}
.rank__r:last-child{border-bottom:0}
.rank__n{width:22px;height:22px;flex:none;border-radius:7px;display:grid;place-items:center;
  font-family:var(--fn);font-size:11px;font-weight:700;background:var(--rule-soft);color:var(--ink-3)}
.rank__t{min-width:0;flex:1}
.rank__t b{display:block;font-size:13px;font-weight:600;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank__t span{display:block;font-size:11px;color:var(--ink-3);margin-top:2px}
.rank__v{text-align:end;flex:none}
.rank__v b{display:block;font-family:var(--fn);font-variant-numeric:tabular-nums;
  font-size:13px;font-weight:600;direction:ltr;unicode-bidi:isolate}
.rank__v span{display:block;font-family:var(--fn);font-size:11px;color:var(--ink-3);
  margin-top:2px;direction:ltr;unicode-bidi:isolate}

/* --- 28. the gas tank ----------------------------------------------------
   A gauge, not a chart. The plant's own question is "how much is left in
   the tank", and the honest answer to it is a vessel with a level in it —
   read at a glance from the yard, on a phone, before anybody reads a figure.
   The level is set inline from the server's own number; nothing here
   computes it. With no capacity on file there is no level to draw, and the
   vessel stays empty with the litres written across it. */
.tank{display:grid;gap:16px}
.tank__vessel{position:relative;height:190px;border:2px solid var(--rule);
  border-radius:16px 16px 20px 20px;overflow:hidden;background:var(--card-2)}
.tank__fill{position:absolute;inset-inline:0;bottom:0;
  background:linear-gradient(180deg,#3b82f6cc,#1d4ed8);
  transition:height .4s ease}
.tank__read{position:absolute;inset:0;display:grid;align-content:center;justify-items:center;gap:2px;
  text-shadow:0 1px 2px var(--card)}
.tank__read b{font-family:var(--fn);font-variant-numeric:tabular-nums;font-size:28px;
  font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.tank__read span{font-size:11px;color:var(--ink-2);font-weight:600}
.tank__read em{font-family:var(--fn);font-style:normal;font-size:12px;font-weight:700;
  color:var(--ink-3);margin-top:4px}
.tank__facts dd{font-variant-numeric:tabular-nums}

/* The marks down the side of the vessel: a tank reads as a tank with them. */
.tank__vessel::before{content:"";position:absolute;inset-inline-start:10px;top:18px;bottom:18px;width:8px;
  background:repeating-linear-gradient(180deg,var(--rule) 0 2px,transparent 2px 26px);
  opacity:.8;pointer-events:none}
