/* ==========================================================================
   Exhibition Evaluation System - same design tokens as the PO System:
   ink sidebar, cool paper workspace, petrol primary. Status colours are the
   only saturated colours. Right-to-left: only logical properties are used.
   ========================================================================== */
:root {
  --ink: #13293d;
  --ink-2: #1c3850;
  --ink-text: #c9d6e2;
  --petrol: #0e5e6f;
  --petrol-dark: #0a4855;
  --petrol-tint: #e3f0f2;
  --paper: #f2f4f6;
  --surface: #ffffff;
  --line: #dce1e6;
  --line-strong: #c3cbd3;
  --text: #1a2633;
  --muted: #5b6b7a;

  --draft: #5b6b7a;      --draft-bg: #eceff2;
  --pending: #94600f;    --pending-bg: #fbf0dc;
  --approved: #24683f;   --approved-bg: #e1f1e7;
  --rejected: #a3332d;   --rejected-bg: #f8e3e1;
  --sent: #2b5a9e;       --sent-bg: #e3ecf8;
  --cancelled: #6d6d6d;  --cancelled-bg: #ececec;

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Tahoma, "Geeza Pro", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, Tahoma, sans-serif;

  --r-sm: 4px;
  --r-md: 8px;
  --shadow: 0 1px 2px rgba(19, 41, 61, .06), 0 2px 8px rgba(19, 41, 61, .05);
  --focus: 0 0 0 3px rgba(14, 94, 111, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
h1 { font-size: 26px; font-weight: 600; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
a { color: var(--petrol); }
.icon { flex: none; }

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

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--ink);
  color: var(--ink-text);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brandmark { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
.brandmark-seal {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid #8fc1cb; color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px #8fc1cb;
}
.brandmark-text { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 15.5px; }
.brandmark-dark .brandmark-seal { border-color: var(--petrol); color: var(--petrol); box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--petrol); }
.brandmark-dark .brandmark-text { color: var(--ink); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-group { margin: 18px 10px 6px; font-size: 12px; color: #7f97ab; font-weight: 600; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--ink-text); text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--ink-2); color: #fff; }
.nav-link:focus-visible { outline: none; box-shadow: var(--focus); }
.nav-link.is-active { background: var(--petrol); color: #fff; }
.nav-link.is-soon { color: #6f8799; cursor: default; }
.nav-link.is-soon:hover { background: none; color: #6f8799; }
.nav-link small { margin-inline-start: auto; font-size: 11px; color: #5a7184; }

.whoami { border-top: 1px solid var(--ink-2); padding: 14px 6px 0; }
.whoami-name { color: #fff; font-weight: 600; }
.whoami-role { font-size: 12.5px; color: #8ea4b6; margin-bottom: 10px; }

.main { padding: 28px 36px 48px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head p { margin-top: 2px; }
.page-actions { display: flex; gap: 8px; }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  font: inherit; font-weight: 600; font-size: 14px;
  border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: var(--muted); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn-primary { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-dark); border-color: var(--petrol-dark); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-text); justify-content: flex-start; padding: 0 8px; }
.btn-quiet:hover { background: var(--ink-2); color: #fff; border-color: transparent; }
.btn-block { width: 100%; }
.btn.is-disabled { opacity: .5; cursor: not-allowed; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 40px; padding: 0 12px;
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--petrol); box-shadow: var(--focus); }

/* ---------- Messages ---------- */
.flash-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.flash { padding: 10px 14px; border-radius: var(--r-sm); border-inline-start: 4px solid; background: var(--surface); margin-bottom: 14px; }
.flash-success { border-color: var(--approved); background: var(--approved-bg); }
.flash-warning { border-color: var(--pending); background: var(--pending-bg); }
.flash-error   { border-color: var(--rejected); background: var(--rejected-bg); }
.flash-info    { border-color: var(--petrol); background: var(--petrol-tint); }
.notice { padding: 10px 14px; margin-bottom: 18px; background: var(--petrol-tint); border-radius: var(--r-sm); color: var(--petrol-dark); }

/* ---------- Status badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding-block: 2px; padding-inline: 8px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-draft     { color: var(--draft); background: var(--draft-bg); }
.badge-pending   { color: var(--pending); background: var(--pending-bg); }
.badge-approved  { color: var(--approved); background: var(--approved-bg); }
.badge-rejected  { color: var(--rejected); background: var(--rejected-bg); }
.badge-sent, .badge-partial { color: var(--sent); background: var(--sent-bg); }
.badge-completed { color: var(--approved); background: var(--surface); box-shadow: inset 0 0 0 1px var(--approved); }
.badge-cancelled { color: var(--cancelled); background: var(--cancelled-bg); text-decoration: line-through; }

/* ---------- Dashboard pipeline (status strip) ---------- */
.pipeline {
  display: grid; grid-template-columns: 1.1fr repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden;
}
.pipeline-step { padding: 16px 20px 18px; border-inline-start: 1px solid var(--line); position: relative; }
.pipeline-step:first-child { border-inline-start: 0; background: var(--ink); color: #fff; }
.pipeline-step:first-child .pipeline-label { color: #a9bccc; }
.pipeline-step[data-status]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.pipeline-step[data-status="draft"]::after    { background: var(--draft); }
.pipeline-step[data-status="pending"]::after  { background: var(--pending); }
.pipeline-step[data-status="approved"]::after { background: var(--approved); }
.pipeline-step[data-status="rejected"]::after { background: var(--rejected); }
.pipeline-label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.pipeline-count { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 600; line-height: 1.2; margin-top: 4px; }

/* ---------- Panels & tables ---------- */
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); }
.panel-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: start; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 18px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.table td { padding: 11px 18px; border-bottom: 1px solid var(--line); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8fafb; }
.table .num { text-align: end; white-space: nowrap; }
.po-number { font-weight: 600; }

.empty { text-align: center; padding: 38px 24px; color: var(--muted); }
.empty .icon { width: 30px; height: 30px; color: var(--line-strong); margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }

.activity { list-style: none; margin: 0; padding: 6px 0; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 18px; }
.activity time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: minmax(380px, 460px) 1fr; min-height: 100vh; }
.login-panel { background: var(--surface); padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-panel h1 { margin: 26px 0 6px; }
.login-panel .muted { margin-bottom: 26px; max-width: 34ch; }
.login-side { background: var(--ink); color: var(--ink-text); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px; padding: 48px; }
.login-side p { max-width: 32ch; text-align: center; color: #a9bccc; }
.ledger { width: min(420px, 100%); background: var(--surface); border-radius: var(--r-md); padding: 6px 0; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.ledger-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; color: var(--text); border-bottom: 1px dashed var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-stamp {
  color: var(--approved); border: 2px solid var(--approved); border-radius: var(--r-sm);
  padding: 1px 10px; font-weight: 700; font-size: 13px; transform: rotate(-4deg);
}

/* ---------- Error page ---------- */
.error-page { max-width: 520px; margin: 14vh auto; padding: 0 24px; text-align: center; }
.error-code { font-family: var(--font-display); font-size: 64px; font-weight: 700; color: var(--line-strong); }
.error-page h1 { margin-bottom: 8px; }
.error-page p { margin-bottom: 24px; }

@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-side { display: none; }
}

/* ==========================================================================
   Phase 3 - lists, forms, dialogs
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.strong { font-weight: 600; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.panel-form { position: sticky; top: 24px; }
.panel-body { padding: 18px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
.input {
  height: 36px; padding: 0 10px; min-width: 200px;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
}
.input:focus { outline: none; border-color: var(--petrol); box-shadow: var(--focus); }
.input-narrow { min-width: 130px; }

.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.segmented a { padding: 7px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13px; border-inline-start: 1px solid var(--line-strong); }
.segmented a:first-child { border-inline-start: 0; }
.segmented a span { font-weight: 400; margin-inline-start: 4px; }
.segmented a.is-on { background: var(--petrol-tint); color: var(--petrol-dark); }
.segmented a:focus-visible { outline: none; box-shadow: inset var(--focus); }

.table .actions-col { width: 1%; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.row-actions form { margin: 0; }
.table tr.is-muted td { color: var(--muted); }
.table td a { text-decoration: none; }
.table td a:hover { text-decoration: underline; }

.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-danger { background: var(--rejected); border-color: var(--rejected); color: #fff; }
.btn-danger:hover { background: #8a2a25; border-color: #8a2a25; }
.btn-danger-quiet { color: var(--rejected); }
.btn-danger-quiet:hover { border-color: var(--rejected); background: var(--rejected-bg); }
.btn.is-busy { opacity: .6; cursor: progress; }

.field.has-error input, .field.has-error select { border-color: var(--rejected); }
.field-error { display: block; font-style: normal; color: var(--rejected); font-size: 12.5px; margin-top: 5px; }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.pager-links { display: flex; align-items: center; gap: 10px; }

.dialog {
  border: 0; border-radius: var(--r-md); padding: 22px 24px; width: min(440px, 92vw);
  box-shadow: 0 24px 60px rgba(19, 41, 61, .3); color: var(--text);
}
.dialog::backdrop { background: rgba(19, 41, 61, .45); }
.dialog[open] { animation: dialog-in .16s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dialog-title { font-size: 18px; margin-bottom: 8px; }
.dialog .field { margin-top: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.flash { transition: opacity .4s; }
.flash.is-leaving { opacity: 0; }

@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } .panel-form { position: static; } }

/* ==========================================================================
   Orders, settings, users, maintenance
   ========================================================================== */
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 10px; }
.small { font-size: 13px; }
.pre { white-space: pre-line; }
.opt, .req { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; margin-inline-start: 4px; }
.req { color: var(--rejected); }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.rev { font-size: 11.5px; font-weight: 600; color: var(--petrol-dark); background: var(--petrol-tint); border-radius: 999px; padding: 1px 7px; }
.cell-sub { font-size: 12px; color: var(--muted); margin-inline-end: 4px; }
.truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-quiet { font-size: 13px; text-decoration: none; font-weight: 600; }
.link-btn { background: none; border: 0; color: var(--petrol); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.stack { display: grid; gap: 20px; }
.panel + .panel, .split + .panel, .panel + .split { margin-top: 20px; }
.grid-2 .panel + .panel, .stack .panel + .panel { margin-top: 0; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
ul.plain { margin: 6px 0 0; padding-inline-start: 18px; }

.nav-count { margin-inline-start: auto; background: var(--pending); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 0 7px; line-height: 19px; }
a.pipeline-step { text-decoration: none; color: inherit; transition: background .15s; }
a.pipeline-step:hover { background: #f7f9fa; }
a.pipeline-step:first-child:hover { background: var(--ink-2); }
.pipeline { margin-bottom: 8px; }
.pipeline-foot { margin: 0 4px 22px 0; font-size: 13px; }
.pipeline-foot a { color: var(--muted); }
.panel-alert { border-inline-start: 4px solid var(--rejected); margin-bottom: 20px; }
.list-links { list-style: none; margin: 0; padding: 4px 0; }
.list-links li > a, .list-links .doc-row { display: flex; align-items: center; gap: 12px; padding: 9px 18px; text-decoration: none; color: inherit; }
.list-links li > a:hover { background: #f8fafb; }
.list-links li > a .muted:last-child, .doc-row .muted { margin-inline-start: auto; }
.doc-actions { display: flex; gap: 10px; margin-inline-start: 10px; }
.doc-actions a { font-size: 13px; font-weight: 600; }
.table-click tbody tr[data-href] { cursor: pointer; }
.po-number { font-weight: 600; text-decoration: none; color: var(--ink); }
a.po-number:hover { color: var(--petrol); text-decoration: underline; }

/* -- Fields shared */
.grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 16px; }
.grid-fields.grid-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.field textarea { height: auto; padding: 8px 12px; resize: vertical; line-height: 1.45; }
.field input[readonly] { background: #f6f8f9; color: var(--text); }
.field.narrow { max-width: 320px; }
.readonly-value { height: 40px; display: flex; align-items: center; font-weight: 600; font-size: 15px; }
.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--petrol); }
.inset { margin: 14px 18px 0; }
.count-pill { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--paper); border-radius: 999px; padding: 2px 9px; margin-inline-start: 6px; }

/* -- Filters */
.filters { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; padding: 16px 18px 2px; border-bottom: 1px solid var(--line); }
.filters .field { margin-bottom: 14px; }
.filters .field input, .filters .field select { height: 38px; }
.filters .grow { flex: 1 1 280px; }
.filter-actions { display: flex; gap: 8px; margin-bottom: 14px; }

/* -- Detail */
.po-title { font-size: 26px; }
.page-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-actions { flex-wrap: wrap; justify-content: flex-end; }
.page-actions form { margin: 0; }
.badge-lg { font-size: 13.5px; padding-block: 4px; padding-inline: 10px 12px; }
.banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 14px 18px; border-radius: var(--r-md); margin-bottom: 20px; border: 1px solid; }
.banner > div { flex: 1 1 320px; }
.banner form { margin: 0; }
.banner .reason { flex-basis: 100%; order: 3; font-size: 15px; margin: 2px 0 4px; }
.banner-rejected { background: var(--rejected-bg); border-color: #e9b9b5; color: #6e221e; }
.banner-pending { background: var(--pending-bg); border-color: #eed39d; color: #5f3d07; }
.banner-approved { background: var(--approved-bg); border-color: #b7dcc4; color: #174a2c; }
.banner-draft { background: var(--draft-bg); border-color: var(--line); }
.banner-cancelled { background: var(--cancelled-bg); border-color: var(--line); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 20px; min-width: 0; }
.detail-main .panel + .panel, .detail-side .panel + .panel { margin-top: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.detail-grid p { margin: 0; }
.lines-table td { vertical-align: top; }
.side-actions { display: grid; gap: 8px; }
.side-actions form { margin: 0; }
.disclose summary { list-style: none; }
.disclose summary::-webkit-details-marker { display: none; }
.disclose[open] summary { border-color: var(--petrol); }
.disclose-body { padding: 12px 0 4px; }
.decisions { list-style: none; margin: 0; padding: 4px 0; }
.decisions li { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.decisions li:last-child { border-bottom: 0; }
.decisions p { margin: 2px 0 0; }
.dec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.dec-comment { font-style: italic; color: var(--text); }
.decision { border: 2px solid var(--petrol); }
.decision-choice { display: flex; gap: 10px; margin-bottom: 14px; }
.choice { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; font-weight: 600; }
.choice input { accent-color: var(--petrol); }
.choice-approve:has(input:checked) { border-color: var(--approved); background: var(--approved-bg); color: var(--approved); }
.choice-reject:has(input:checked) { border-color: var(--rejected); background: var(--rejected-bg); color: var(--rejected); }
.timeline { list-style: none; margin: 0; padding: 10px 18px 14px; }
.timeline li { display: flex; gap: 12px; padding: 7px 0; position: relative; }
.timeline li p { margin: 0; }
.timeline .muted { font-size: 12.5px; }
.tl-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); margin-top: 6px; }
.tl-approved .tl-dot { background: var(--approved); } .tl-rejected .tl-dot { background: var(--rejected); }
.tl-submitted .tl-dot { background: var(--pending); } .tl-created .tl-dot { background: var(--petrol); }
.wait { font-weight: 600; color: var(--pending); }

/* -- Settings */
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.settings-main, .settings-side { display: grid; gap: 20px; }
.settings-main .panel + .panel, .settings-side .panel + .panel { margin-top: 0; }
.sticky-save { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--paper) 30%); }
.logo-box { height: 120px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: 14px; background: #fff; padding: 10px; }
.logo-box img { max-width: 100%; max-height: 100px; }
.logo-placeholder { text-align: center; color: var(--muted); font-weight: 600; }
.currency-add { border-top: 1px solid var(--line); }
.field input[type=file] { height: auto; padding: 8px; }
.field input[type=number] { padding-inline-end: 4px; }
.field input[dir=ltr] { text-align: left; }

@media (max-width: 1200px) {
  .detail-layout, .settings-layout { grid-template-columns: minmax(0, 1fr); }
}
/* keep inner grids inside their column, so wide tables scroll instead of overlapping */
.detail-main, .detail-side, .settings-main, .settings-side, .stack { grid-template-columns: minmax(0, 1fr); }
.activity a { color: inherit; text-decoration: none; } .activity a:hover { color: var(--petrol); text-decoration: underline; }
/* Extra access */
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { font-size: 11.5px; font-weight: 600; color: var(--petrol-dark); background: var(--petrol-tint); border-radius: 999px; padding: 1px 8px; }
.perm-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 13.5px; }
.perm-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--petrol); flex: none; }
.dialog { max-height: 90vh; overflow-y: auto; }
/* Company branding */
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; text-decoration: none; }
.side-logo { flex: none; width: 46px; height: 46px; border-radius: 10px; background: #fff; display: grid; place-items: center; padding: 5px; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.side-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.side-brand-text { display: flex; flex-direction: column; min-width: 0; }
.side-company { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.side-app { color: #8fc1cb; font-size: 11.5px; font-weight: 600; margin-top: 3px; }
.side-brand .brandmark-seal { flex: none; }

.login-brand { margin-bottom: 8px; }
.login-logo { display: block; max-width: 240px; max-height: 84px; object-fit: contain; margin-bottom: 18px; }
.brandmark-seal-lg { width: 54px; height: 54px; font-size: 16px; border-color: var(--petrol); color: var(--petrol); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--petrol); margin-bottom: 18px; }
.login-company { font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0; }
.login-app { color: var(--petrol); font-weight: 600; font-size: 14px; margin-top: 4px; }
.login-panel h1 { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 22px; }
.login-side { position: relative; }
.login-side-company { position: absolute; top: 40px; inset-inline: 48px; text-align: start !important; max-width: none !important;
  font-family: var(--font-display); font-size: 15px; font-weight: 600; color: #8fc1cb !important; }
.login-side-foot { position: absolute; bottom: 32px; font-size: 12.5px; color: #6f8799 !important; }
.perm-row.is-off { opacity: .55; cursor: not-allowed; }

/* ==========================================================================
   Exhibition evaluation
   ========================================================================== */
html[dir=rtl] body { text-align: start; }
.num-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.nav-section-gap { height: 4px; }
.page-head h1 small { font-size: 15px; font-weight: 400; color: var(--muted); }

/* Month / year picker in the page head */
.period-form { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 0 4px 0 10px; height: 38px; }
.period-form .icon { color: var(--muted); }
.period-form select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--text); height: 34px; padding: 0 4px; cursor: pointer; }
.period-form select:focus { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.period-step { width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; }
.period-step:hover { background: var(--paper); color: var(--text); }
.toolbar-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.toolbar-form .field { margin-bottom: 0; min-width: 220px; }

/* Dashboard strip re-uses .pipeline; five equal steps here */
.pipeline.pipeline-5 { grid-template-columns: 1.1fr repeat(4, 1fr); }
.pipeline-sub { font-size: 12.5px; color: var(--muted); }
.pipeline-step:first-child .pipeline-sub { color: #a9bccc; }
.pipeline-step[data-status="complete"]::after { background: var(--approved); }
.pipeline-step[data-status="remaining"]::after { background: var(--pending); }
.pipeline-step[data-status="required"]::after { background: var(--petrol); }
.pipeline-step[data-status="visits"]::after { background: var(--sent); }

/* Badges for the monthly status */
.badge-complete { color: var(--approved); background: var(--approved-bg); }
.badge-provisional { color: var(--pending); background: var(--pending-bg); }
.badge-no_target, .badge-empty { color: var(--draft); background: var(--draft-bg); }
.badge-stopped { color: var(--cancelled); background: var(--cancelled-bg); }
.badge-custom { color: var(--petrol-dark); background: var(--petrol-tint); }
.badge-default { color: var(--draft); background: var(--draft-bg); }

/* Progress bar */
.progress { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.progress-track { flex: 1; height: 7px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.progress-fill { display: block; height: 100%; background: var(--petrol); border-radius: 999px; }
.progress.is-done .progress-fill { background: var(--approved); }
.progress-text { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Monthly result: score out of 9 first, 1000 scale directly underneath */
.result { text-align: center; padding: 18px 16px 16px; border-radius: var(--r-md); border: 2px solid var(--petrol); background: var(--petrol-tint); }
.result.is-provisional { border-color: #e2bf7c; background: var(--pending-bg); }
.result.is-empty { border-color: var(--line); background: #fafbfc; }
.result-cap { font-weight: 700; font-size: 13px; color: var(--ink); }
.result.is-provisional .result-cap { color: #5f3d07; }
.result-9 { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1.15; color: var(--ink); direction: ltr; margin-top: 4px; }
.result-1000 { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--muted); direction: ltr; }
.result-note { font-size: 12.5px; margin-top: 6px; color: #5f3d07; font-weight: 600; }

/* Comparison chart */
.cmp { padding: 14px 18px 18px; display: grid; gap: 12px; }
.cmp-row { display: grid; grid-template-columns: minmax(120px, 200px) 1fr 104px; gap: 14px; align-items: center; }
.cmp-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--ink); }
a.cmp-name:hover { color: var(--petrol); text-decoration: underline; }
.cmp-track { height: 20px; border-radius: var(--r-sm); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); position: relative; overflow: hidden; }
.cmp-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--petrol); border-radius: var(--r-sm); }
.cmp-fill.is-provisional { background: repeating-linear-gradient(135deg, var(--pending) 0 6px, #b98a3d 6px 12px); }
.cmp-score { font-family: var(--font-display); font-weight: 700; text-align: end; direction: ltr; font-variant-numeric: tabular-nums; }
.cmp-score small { font-weight: 400; color: var(--muted); font-size: 12px; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--petrol); vertical-align: -1px; margin-inline-end: 5px; }
.legend i.is-provisional { background: var(--pending); }

/* Trend */
.trend { padding: 10px 18px 16px; }
.trend svg { width: 100%; min-width: 460px; height: auto; display: block; direction: ltr; }

/* Exhibition cards on the evaluations page */
.ex-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ex-card { display: grid; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.ex-card:hover { border-color: var(--petrol); }
.ex-card.is-on { border-color: var(--petrol); box-shadow: 0 0 0 2px var(--petrol-tint), var(--shadow); }
.ex-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ex-card-name { font-weight: 700; color: var(--ink); }
.ex-card-score { font-family: var(--font-display); font-weight: 700; direction: ltr; font-size: 15px; }
.stat-trio { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.stat-trio div { padding: 14px 18px; border-inline-start: 1px solid var(--line); }
.stat-trio div:first-child { border-inline-start: 0; }
.stat-trio b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.2; }
.stat-trio span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.panel-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.panel-cols > .panel-aside { padding: 16px 18px; border-inline-start: 1px solid var(--line); }

/* Evaluation form */
.eval-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.eval-main { display: grid; gap: 14px; min-width: 0; }
.eval-side { position: sticky; top: 20px; display: grid; gap: 14px; }
.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px 12px; box-shadow: var(--shadow);
  transition: border-color .15s, opacity .15s; }
.q-card:focus-within { border-color: #9fc6ce; box-shadow: 0 0 0 3px rgba(14, 94, 111, .07); }
.q-card.is-unset { border-style: dashed; border-color: var(--line-strong); }
.q-card.has-error { border-color: var(--rejected); background: #fffafa; }
.q-card.is-na { opacity: .62; }
.q-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.q-no { width: 28px; height: 28px; border-radius: 50%; background: var(--petrol-tint); color: var(--petrol-dark); display: grid; place-items: center;
  font-weight: 700; font-size: 12.5px; }
.q-text { font-weight: 600; font-size: 15px; padding-top: 2px; overflow-wrap: anywhere; }
.q-value { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; color: var(--petrol); min-width: 74px; text-align: end; direction: ltr; }
.q-value small { font-size: 14px; font-weight: 600; color: var(--muted); }
.q-card.is-unset .q-value, .q-card.is-na .q-value { color: var(--line-strong); }
.scale { direction: ltr; margin: 14px 2px 4px; }
.scale input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.scale input[type=range]:focus { outline: none; }
.scale input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--petrol) 0 var(--fill, 0%), #e3e8ec var(--fill, 0%) 100%); }
.scale input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: #e3e8ec; }
.scale input[type=range]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--petrol); }
.scale input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%;
  background: #fff; border: 3px solid var(--petrol); box-shadow: 0 2px 6px rgba(19, 41, 61, .25); }
.scale input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--petrol); box-shadow: 0 2px 6px rgba(19, 41, 61, .25); }
.scale input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus); }
.q-card.is-unset .scale input[type=range]::-webkit-slider-thumb { border-color: var(--line-strong); }
.q-card.is-unset .scale input[type=range]::-moz-range-thumb { border-color: var(--line-strong); }
.ticks { display: flex; justify-content: space-between; padding: 0 5px; }
.tick { width: 26px; border: 0; background: none; padding: 4px 0 2px; border-radius: var(--r-sm); cursor: pointer; font: inherit; font-size: 12.5px;
  color: var(--muted); font-variant-numeric: tabular-nums; position: relative; }
.tick::before { content: ""; position: absolute; top: -3px; left: 50%; width: 1px; height: 5px; background: var(--line-strong); }
.tick:hover { background: var(--paper); color: var(--text); }
.tick.is-on { color: var(--petrol); font-weight: 700; }
.tick:disabled { cursor: default; }
.q-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.q-tools .check { margin: 0; font-size: 13.5px; }
.q-tools .spacer { flex: 1; }
.q-comment { margin-top: 10px; }
.q-comment textarea, .eval-comment textarea { width: 100%; min-height: 64px; padding: 8px 12px; font: inherit; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); resize: vertical; line-height: 1.5; }
.q-comment textarea:focus, .eval-comment textarea:focus { outline: none; border-color: var(--petrol); box-shadow: var(--focus); }
.q-error { color: var(--rejected); font-size: 12.5px; margin-top: 6px; display: block; font-style: normal; }
.live-score { font-family: var(--font-display); font-size: 34px; font-weight: 700; direction: ltr; color: var(--ink); text-align: center; padding: 6px 0 2px; }
.live-score small { font-size: 15px; color: var(--muted); }
.pending-note { font-size: 12.5px; color: var(--muted); text-align: center; min-height: 18px; }

/* Questions */
.q-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.q-row:last-child { border-bottom: 0; }
.q-row.is-off .q-row-text { color: var(--muted); }
.q-row-text { overflow-wrap: anywhere; }
.order-btns { display: flex; flex-direction: column; gap: 2px; }
.order-btns form { margin: 0; }
.order-btns .icon-btn { width: 26px; height: 20px; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid transparent; background: none; border-radius: var(--r-sm); color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--paper); border-color: var(--line); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; border-color: transparent; }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.icon-btn.danger:hover { color: var(--rejected); background: var(--rejected-bg); border-color: transparent; }

.target-input { width: 84px; height: 34px; padding: 0 8px; font: inherit; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.target-input:focus { outline: none; border-color: var(--petrol); box-shadow: var(--focus); }
.target-input::placeholder { color: var(--line-strong); }

/* Report preview */
.report-result { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.qa-bar { height: 7px; width: 120px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; display: inline-block; vertical-align: middle; }
.qa-bar i { display: block; height: 100%; background: var(--petrol); }
tr.is-low td { background: #fdf4f3; }
tr.is-low .qa-bar i { background: var(--rejected); }
.flag { color: var(--rejected); font-weight: 600; font-size: 12px; }
.visit-block + .visit-block { margin-top: 20px; }
.visit-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.comment-box { padding: 10px 18px 14px; border-top: 1px solid var(--line); background: #fafbfc; overflow-wrap: anywhere; }
.na { color: var(--muted); font-size: 13px; }

@media (max-width: 1100px) {
  .eval-layout, .report-result, .panel-cols { grid-template-columns: minmax(0, 1fr); }
  .eval-side { position: static; }
  .panel-cols > .panel-aside { border-inline-start: 0; border-top: 1px solid var(--line); }
  .pipeline.pipeline-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .main { padding: 18px 14px 40px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-actions { justify-content: flex-start; }
  .pipeline.pipeline-5 { grid-template-columns: repeat(2, 1fr); }
  .cmp-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .cmp-track { grid-column: 1 / -1; grid-row: 2; }
  .q-value { font-size: 26px; min-width: 60px; }
  .tick { width: 22px; font-size: 12px; }
  .sidebar { padding: 14px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group { width: 100%; margin: 8px 6px 2px; }
  .stat-trio b { font-size: 21px; }
}
@media print {
  .sidebar, .page-actions, .no-print { display: none !important; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main { padding: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
}
.trend-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; padding: 18px 22px 14px; align-items: end; }
.trend-col { display: grid; justify-items: center; gap: 6px; }
.trend-val { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; direction: ltr; }
.trend-bar { width: 42px; height: 140px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-sm); display: flex; align-items: flex-end; overflow: hidden; }
.trend-bar i { display: block; width: 100%; background: var(--petrol); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.trend-bar i.is-provisional { background: var(--pending); }
.trend-lbl { font-size: 12.5px; text-align: center; line-height: 1.35; }
.dialog.dialog-wide { width: min(640px, 94vw); }
.progress-text { direction: ltr; unicode-bidi: isolate; }
/* Totals list (same look as the PO summary panel) */
.totals { margin: 0; padding: 10px 0 4px; }
.panel > .totals { padding: 10px 18px 4px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; white-space: nowrap; }
.totals .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }
.totals .grand dt { color: var(--ink); font-weight: 700; }
.totals .grand dd { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary:disabled:hover { background: var(--petrol); border-color: var(--petrol); }

/* Rankings */
.rank-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 14px 18px; margin-bottom: 20px; }
.rank-filters .field { margin: 0; min-width: 130px; }
.rank-filters .rank-by { min-width: 260px; flex: 1; max-width: 460px; }
.rank-filters .segmented { align-self: flex-end; height: 38px; }
.rank-col { width: 70px; }
.bar-col { width: 140px; }
.rank { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: 13.5px;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); font-variant-numeric: tabular-nums; }
.rank-1 { background: var(--petrol); color: #fff; box-shadow: none; }
.rank-2 { background: var(--petrol-tint); color: var(--petrol-dark); box-shadow: inset 0 0 0 1px #9fc6ce; }
.rank-3 { background: var(--pending-bg); color: var(--pending); box-shadow: inset 0 0 0 1px #e2bf7c; }
.rank-sm { width: 22px; height: 22px; font-size: 11.5px; margin-inline-end: 4px; }
.rank-table tr.is-first td { background: #f3f9fa; }
.matrix th a { color: inherit; text-decoration: none; }
.matrix th a:hover { color: var(--petrol); text-decoration: underline; }
.matrix th { white-space: normal; min-width: 92px; vertical-align: bottom; }
.matrix td.is-best { background: var(--approved-bg); color: var(--approved); font-weight: 700; }
.login-lang { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.lang-form { margin: 0; }
html[dir=ltr] .field input[dir=ltr] { text-align: start; }

/* ==========================================================================
   HMG system: purchase-order form, tickets, maintenance, users, home.
   Logical properties only, so Arabic (RTL) and English (LTR) both work.
   ========================================================================== */
/* ---------- Purchase order form ---------- */
.po-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.po-main { display: grid; gap: 20px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.po-main .panel + .panel { margin-top: 0; }
.po-side { position: sticky; top: 20px; }
.lines { padding: 6px 18px 0; }
.line { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px 0; margin-top: 12px; background: #fbfcfd; transition: opacity .15s, transform .15s; }
.line:focus-within { border-color: #9fc6ce; background: #fff; box-shadow: 0 0 0 3px rgba(14, 94, 111, .07); }
.line.is-leaving { opacity: 0; }
.line-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.line-no { font-size: 12.5px; font-weight: 700; color: var(--petrol-dark); }
.line-tools { display: flex; gap: 4px; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid transparent; background: none; border-radius: var(--r-sm); color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--paper); border-color: var(--line); color: var(--text); }
.icon-btn.danger:hover { color: var(--rejected); background: var(--rejected-bg); border-color: transparent; }
.line-grid { display: grid; gap: 0 12px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.line-grid .field { margin-bottom: 12px; }
.line-grid .field > span { font-size: 12px; }
.line-grid input, .line-grid select { height: 36px; }
.f-brand, .f-type { grid-column: span 3; } .f-model { grid-column: span 6; }
.f-mname, .f-mnum { grid-column: span 4; } .f-origin { grid-column: span 4; }
.f-cont, .f-per { grid-column: span 2; } .f-qty { grid-column: span 2; } .f-price { grid-column: span 2; }
.f-prev { grid-column: span 2; } .f-total { grid-column: span 2; }
.f-cont input, .f-per input, .f-price input { text-align: end; }
.f-total output, .f-qty output, .f-prev output { display: flex; align-items: center; justify-content: flex-end; height: 36px; font-weight: 700; font-size: 14.5px; direction: ltr; }
.f-prev output { font-weight: 600; color: var(--muted); font-size: 13px; }
.f-qty output { background: var(--petrol-tint); border-radius: var(--r-sm); padding-inline: 8px; }
.is-blank { color: var(--line-strong) !important; font-weight: 400 !important; }
.line-qty.is-warn { background: var(--rejected-bg); color: var(--rejected); }
.line:not(.is-manual) .f-mname input, .line:not(.is-manual) .f-mnum input { border-style: dashed; }
.lines-foot { display: flex; align-items: center; gap: 14px; padding: 16px 18px 18px; flex-wrap: wrap; }
.lines-foot .hint { margin: 0; }
.summary .panel-head { padding: 14px 18px; }
.summary .totals { padding: 10px 18px 4px; }
.totals .is-warn { color: var(--rejected); }
.summary-actions { display: grid; gap: 8px; }
.totals-inline { max-width: 360px; margin-inline-start: auto; padding: 12px 18px 16px; }
.price-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; margin-bottom: 6px; cursor: pointer; user-select: none; }
.price-toggle input { width: 15px; height: 15px; accent-color: var(--petrol); margin: 0; }
.warn-text { color: var(--pending); font-weight: 600; }
.ok-text { color: var(--approved); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn .icon { pointer-events: none; }
.step-list { margin: 0 0 18px; padding-inline-start: 20px; display: grid; gap: 10px; max-width: 75ch; }
.example { border: 1px solid var(--line); border-radius: var(--r-sm); overflow-x: auto; margin-bottom: 12px; }
.example .table td, .example .table th { padding: 7px 12px; font-size: 13px; }
.import-actions { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.import-summary { grid-template-columns: repeat(5, 1fr); }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.term { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; background: #fbfcfd; }
.term:has(input:checked) { border-color: var(--petrol); background: var(--petrol-tint); }
.term.is-off { opacity: .6; }
.term-desc { font-size: 12.5px; color: var(--muted); margin: 4px 0; min-height: 1em; }
.lock-input { display: flex; gap: 8px; }
.lock-input input[readonly] { background: var(--paper); color: var(--muted); }
.panel-internal { border-inline-start: 4px solid var(--pending); }
.panel-internal.has-error { border-color: var(--rejected); box-shadow: 0 0 0 3px rgba(163, 51, 45, .12); }
.panel-internal .panel-head h2 { display: flex; gap: 8px; align-items: center; }
.big-check { font-weight: 600; align-self: center; }
.big-check input { width: 20px; height: 20px; }
.internal-col { background: #fdf8ec; }
.cell-sub.up { color: var(--rejected); font-weight: 600; } .cell-sub.down { color: var(--approved); font-weight: 600; }
.terms-show { margin: 4px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.term-admin { list-style: none; margin: 0; padding: 0; }
.term-admin > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); align-items: start; }
.term-admin > li.is-off { background: var(--paper); }
.term-edit { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 0 12px; align-items: start; }
.term-edit .term-code { padding-top: 26px; font-size: 15px; }
.term-edit .term-actions { grid-column: 2 / -1; }
.term-new { border-top: 1px solid var(--line); }

/* ---------- Tabs, lists ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.tab { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.is-on { color: var(--petrol-dark); border-color: var(--petrol); }
.tab-n { font-size: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; color: var(--muted); }
.nav-count { margin-inline-start: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #d9534f; color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; text-decoration: none; }
.tab .nav-count { margin-inline-start: 4px; }
.prio { font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--paper); white-space: nowrap; }
.prio-high { color: var(--pending); background: var(--pending-bg); }
.prio-urgent { color: #fff; background: var(--rejected); }
.prio-low { color: var(--muted); }
.treq-list { list-style: none; margin: 0; padding: 0; }
.treq { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.treq:last-child { border-bottom: 0; }
.treq-main { flex: 1 1 320px; min-width: 0; }
.treq-accept { display: flex; gap: 8px; align-items: center; }
.treq-accept .input { width: 170px; }
.kv { display: grid; gap: 12px; margin: 0; }
.kv > div { display: grid; gap: 2px; }
.kv dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

/* ---------- Ticket conversation ---------- */
.tk-title { font-size: 16px; margin-top: 4px; }
.thread { list-style: none; margin: 0; padding: 12px 18px; display: grid; gap: 10px; }
.msg { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; background: var(--surface); max-width: 92%; }
.msg.is-me { background: var(--petrol-tint); border-color: #c4dfe4; margin-inline-start: auto; }
.msg-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.ev { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); padding-inline-start: 4px; }
.ev .tl-dot { flex: none; }
.ev-closed { color: var(--approved); }
.files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.file { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.5px; }
.file-name { font-weight: 600; word-break: break-all; }
.file.is-gone .file-name { text-decoration: line-through; color: var(--muted); }
.reply-form { border-top: 1px solid var(--line); }
.reply-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-pick { position: relative; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--petrol); cursor: pointer; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-count { margin-inline-start: 8px; }
.upload-progress { margin: 10px 0; display: grid; gap: 4px; }
.done-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.done-list li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); }
.done-list li .icon { border: 1.5px solid var(--line-strong); border-radius: 50%; padding: 2px; color: transparent; }
.done-list li.is-done { color: var(--text); }
.done-list li.is-done .icon { background: var(--approved); border-color: var(--approved); color: #fff; }

/* ---------- Scores and home ---------- */
.score-cards, .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 16px 18px; }
.kpis { padding: 0; margin-bottom: 20px; }
.score-cards > div, .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 2px; text-decoration: none; color: inherit; }
.score-cards b, .kpi b { font-family: var(--font-display); font-size: 28px; color: var(--petrol-dark); line-height: 1.1; }
.score-cards span, .kpi span { font-size: 13px; color: var(--muted); }
.score-cards .soft b { color: var(--muted); }
.kpi:hover { border-color: var(--petrol); }
.kpi.is-alert { border-color: #eed39d; background: var(--pending-bg); }
.kpi.is-alert b { color: var(--pending); }
.kpi-score { background: var(--petrol-tint); border-color: #c4dfe4; }
th.is-sorted { color: var(--petrol-dark); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.home-grid .panel { margin-top: 0; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 16px 18px; }
.quick a { display: grid; gap: 4px; justify-items: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--text); font-weight: 600; }
.quick a:hover { border-color: var(--petrol); background: var(--petrol-tint); }
.quick a .icon { color: var(--petrol); }
.quick em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- Maintenance ---------- */
.steps-dots { display: inline-flex; gap: 4px; }
.steps-dots i { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.steps-dots i.on { background: var(--approved); }
.steps-dots.is-cancelled i.on { background: var(--cancelled); }
.step-panel.is-next { border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(14, 94, 111, .1); }
.step-panel h2 { display: flex; align-items: center; gap: 10px; }
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--line-strong); font-size: 13px; }
.step-panel.is-done .step-no { background: var(--approved); border-color: var(--approved); color: #fff; }
.step-panel.is-next .step-no { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 18px; }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); display: block; }
.photo-grid figcaption { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 4px; }
.photo-gone { aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); background: var(--paper); border-radius: var(--r-sm); padding: 8px; }
.photo-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 10px 0 16px; }
.photo-input { position: relative; cursor: pointer; }
.photo-input input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.photo-slot { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 2px dashed var(--line-strong); border-radius: var(--r-md); background: var(--paper); overflow: hidden; }
.photo-slot.has-photo { border-style: solid; border-color: var(--approved); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot.has-photo .photo-ph { display: none; }
.photo-ph { display: grid; justify-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 13px; }
.photo-ph .icon { width: 28px; height: 28px; }
.form-section { margin: 4px 0 12px; color: var(--petrol-dark); }

/* ---------- Users, departments ---------- */
.perm-groups { display: grid; gap: 18px; }
.perm-group { border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 14px 10px; margin: 0; }
.perm-group legend { font-weight: 700; padding: 0 6px; color: var(--petrol-dark); }
.chip-soft { background: var(--paper); color: var(--muted); font-size: 11.5px; display: inline-block; margin-top: 4px; }
.chips-check { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.tree-indent { display: inline-block; width: calc(var(--depth, 0) * 22px); }
.perm-table input { width: 18px; height: 18px; accent-color: var(--petrol); }
.perm-table .group-row th { background: var(--paper); text-align: start; color: var(--petrol-dark); }
.mt { margin-top: 12px; }

/* ---------- Mobile ---------- */
.mobile-bar { display: none; }
@media (max-width: 1100px) {
  .po-layout, .home-grid { grid-template-columns: minmax(0, 1fr); }
  .po-side { position: static; }
  .f-brand, .f-type { grid-column: span 6; } .f-model { grid-column: span 12; }
  .f-mname, .f-mnum, .f-origin { grid-column: span 6; }
  .f-cont, .f-per, .f-qty { grid-column: span 4; }
  .f-price, .f-prev, .f-total { grid-column: span 4; }
  .term-edit { grid-template-columns: minmax(0, 1fr); } .term-edit .term-code { padding-top: 0; } .term-edit .term-actions { grid-column: auto; }
}
@media (max-width: 800px) {
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
  .mobile-bar .icon-btn { color: #fff; }
  .mobile-brand { color: #fff; text-decoration: none; font-weight: 600; flex: 1; }
  .sidebar { display: none; }
  body.nav-open .sidebar { display: flex; position: fixed; inset: 52px 0 0 0; height: auto; z-index: 19; overflow-y: auto; }
  .photo-grid, .photo-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-brand, .f-type, .f-mname, .f-mnum, .f-origin { grid-column: span 12; }
  .f-cont, .f-per, .f-qty, .f-price, .f-prev, .f-total { grid-column: span 6; }
  .msg { max-width: 100%; }
  .treq-accept { width: 100%; } .treq-accept .input { flex: 1; }
}

/* Required fields: a red star right next to the label (instead of the word "required") */
.field > span i.req, label > span i.req, i.req {
  display: inline !important; padding: 0 !important; border: 0 !important;
  font-size: 0 !important; margin-inline-start: 3px;
}
i.req::after { content: "*"; font-size: 15px; font-weight: 700; color: #a3332d; }
.log-table tr.is-danger td { background: var(--rejected-bg); }
.log-details summary { cursor: pointer; color: var(--petrol); font-size: 12.5px; margin-top: 4px; }
.log-details pre { max-height: 320px; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; font-size: 12px; white-space: pre-wrap; word-break: break-word; text-align: left; }
/* Notifications */
.bell { position: relative; color: #fff; display: inline-grid; place-items: center; width: 36px; height: 36px; }
.bell .nav-count { position: absolute; top: -2px; inset-inline-end: -4px; margin: 0; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li a { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.notif-list li.is-unread a { color: var(--text); font-weight: 600; background: var(--petrol-tint); }
.notif-list li a:hover { background: var(--paper); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.notif-list li.is-unread .notif-dot { background: var(--petrol); }
.notif-text { flex: 1; }
.toasts { position: fixed; bottom: 18px; inset-inline-end: 18px; display: grid; gap: 8px; z-index: 50; max-width: min(380px, calc(100vw - 36px)); }
.toast { display: block; background: var(--ink, #1d2b33); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0,0,0,.18); text-decoration: none; font-weight: 600; font-size: 14px; border-inline-start: 4px solid var(--petrol); animation: toast-in .25s ease-out; transition: opacity .4s; }
.toast.is-leaving { opacity: 0; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
/* Technical assets */
.st { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 9px; border-radius: 10px; white-space: nowrap; }
.st-green { background: #e3f3ea; color: #23744a; } .st-blue { background: #e4eef8; color: #285d93; }
.st-amber { background: #fbf0d9; color: #8a5a06; } .st-red { background: #f8e3e1; color: #a3332d; }
.st-grey { background: #eceff1; color: #55626b; } .st-purple { background: #eee6f6; color: #6a3c94; }
.kv-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.kv-2 .span-2 { grid-column: 1 / -1; }
.opt-admin { list-style: none; margin: 0; padding: 0; }
.opt-admin li { border-bottom: 1px solid var(--line); }
.opt-admin li.is-off { background: var(--paper); }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 18px; }
.opt-row input, .opt-row select { height: 34px; flex: 1 1 120px; min-width: 0; }
.opt-row select { flex: 0 0 100px; }
.detail-side .holder-fields { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 800px) { .kv-2 { grid-template-columns: minmax(0, 1fr); } }
/* Analytics */
.an-filters { padding: 12px 18px; margin-bottom: 16px; }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.an-grid .panel { margin-top: 0; }
.hbars { list-style: none; margin: 0; padding: 12px 18px 16px; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; }
.hb-label { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-label em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.hb-track { display: block; height: 10px; background: var(--paper); border-radius: 5px; overflow: hidden; min-width: 40px; }
.bar-cell { min-width: 140px; } .bar-cell .hb-track { display: inline-block; width: 70%; vertical-align: middle; margin-inline-end: 6px; }
.hb-fill { display: block; height: 100%; background: var(--petrol); border-radius: 5px; min-width: 2px; }
.hb-fill.hb-urgent { background: var(--rejected); } .hb-fill.hb-high { background: var(--pending); } .hb-fill.hb-low { background: var(--line-strong); }
.hb-fill.st-green { background: #3a9a66; } .hb-fill.st-blue { background: #3f7cbf; } .hb-fill.st-amber { background: #d39a24; }
.hb-fill.st-red { background: #c9473f; } .hb-fill.st-grey { background: #8a969e; } .hb-fill.st-purple { background: #8a5cb8; }
.hb-val { font-weight: 700; font-size: 13.5px; white-space: nowrap; direction: ltr; }
.vchart { padding: 12px 18px 16px; }
.vc-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.vc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-inline-end: 5px; vertical-align: middle; }
.vc-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 220px; direction: ltr; }
.vc-col { display: grid; grid-template-rows: 1fr auto; height: 100%; }
.vc-bars { display: flex; gap: 2px; align-items: flex-end; justify-content: center; height: 100%; border-bottom: 1px solid var(--line); }
.vc-bar { flex: 1; max-width: 22px; min-height: 1px; border-radius: 3px 3px 0 0; position: relative; }
.vc-bar b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.vc-1 { background: var(--petrol); } .vc-2 { background: #d39a24; }
.vc-month { text-align: center; font-size: 11.5px; color: var(--muted); padding-top: 4px; line-height: 1.2; }
.up-text { color: var(--rejected); font-weight: 700; } .down-text { color: var(--approved); font-weight: 700; }
@media (max-width: 1000px) { .an-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .vc-bar b { display: none; } .vc-cols { gap: 2px; } }
/* Ticket deadlines and ratings */
.sla { font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.sla-ok { color: var(--muted); background: var(--paper); }
.sla-soon { color: #8a5a06; background: #fbf0d9; }
.sla-late { color: #fff; background: var(--rejected); }
.sla-met { color: #23744a; background: #e3f3ea; }
.kpi.is-danger { border-color: #e7b1ac; background: var(--rejected-bg); }
.kpi.is-danger b { color: var(--rejected); }
.stars { color: var(--line-strong); letter-spacing: 1px; white-space: nowrap; }
.stars i { font-style: normal; }
.stars i.on { color: #e0a521; }
.rate-box { flex-wrap: wrap; }
.rate-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rate-form .input { min-width: 200px; }
.star-input { display: inline-flex; flex-direction: row-reverse; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 28px; color: var(--line-strong); cursor: pointer; padding: 0 2px; line-height: 1; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #e0a521; }
.star-input input:focus-visible + label { outline: 2px solid var(--petrol); border-radius: 4px; }

/* Sign-in page background (General settings → Sign-in page): classic / image / video */
.login-side.login-bg-image, .login-side.login-bg-video { background-color: #020f22; background-position: center; background-size: cover; background-repeat: no-repeat; overflow: hidden; }
.login-side.login-bg-image > *, .login-side.login-bg-video > * { display: none !important; }
.login-side.login-bg-video > .login-video { display: block !important; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-bg-choice { display: grid; gap: 6px; }
.login-bg-preview { margin-top: 12px; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; background: #020f22; }
.login-bg-preview img, .login-bg-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-bg-classic { height: 100%; display: grid; place-items: center; color: #a9bccc; background: #13293d; font-weight: 600; }
.sla-pause { font-size: 12px; color: var(--muted); cursor: help; }
.names-table input { width: 100%; min-width: 220px; }
.kind-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--paper); white-space: nowrap; }
.kind-badge.kind-external { background: #e4eef8; color: #285d93; }
.kind-badge.kind-internal { background: #e3f3ea; color: #23744a; }
.pipeline-group { margin-bottom: 12px; }
.pipeline-group h3 { font-size: 14px; margin: 0 0 6px; color: var(--petrol-dark); }
.drag-col { width: 34px; text-align: center; }
.drag-handle { cursor: grab; font-size: 18px; color: var(--muted); user-select: none; touch-action: none; padding: 4px 6px; border-radius: 6px; }
.drag-handle:hover { background: var(--paper); color: var(--text); }
tr.is-dragging { opacity: .55; background: var(--petrol-tint); }
.live-sub { text-align: center; color: var(--muted); font-weight: 600; margin-top: -4px; }
.live-float { display: none; }
@media (max-width: 900px) {
  .live-float { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 30; gap: 12px; align-items: center;
                justify-content: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #13293d; color: #fff;
                box-shadow: 0 -6px 18px rgba(0,0,0,.18); font-size: 14px; }
  .live-float b { font-size: 20px; }
  .live-float span:last-child { color: #a9bccc; }
  #eval-form { padding-bottom: 64px; }
}
.rate5 { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.rate5 b { font-size: 14px; color: var(--petrol-dark); }
.rate5-1 b, .rate5-2 b { color: var(--rejected); } .rate5-3 b { color: var(--pending); } .rate5-4 b, .rate5-5 b { color: var(--approved); }
.num-input { display: inline-flex; gap: 6px; align-items: center; }
.num-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.num-input label { width: 38px; height: 38px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 10px; font-weight: 700; font-size: 16px; cursor: pointer; background: #fff; }
.num-input label:hover { border-color: var(--petrol); }
.num-input input:checked + label { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.num-input input:focus-visible + label { outline: 2px solid var(--petrol); outline-offset: 2px; }
.num-of { color: var(--muted); font-weight: 600; margin-inline-start: 4px; }
.seg-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-choice label { display: inline-flex; gap: 6px; align-items: center; padding: 8px 14px; border: 1.5px solid var(--line-strong); border-radius: 10px; cursor: pointer; font-weight: 600; }
.seg-choice label:has(input:checked) { border-color: var(--petrol); background: var(--petrol-tint); color: var(--petrol-dark); }
.team-check { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; }
/* Availability */
.pres-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.pres { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.my-pres { margin: 8px 0; }
.my-pres summary { list-style: none; display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-weight: 600; font-size: 13.5px; }
.my-pres summary::-webkit-details-marker { display: none; }
.my-pres summary small { color: #a9bccc; font-weight: 400; }
.my-pres-menu { display: grid; gap: 4px; margin-top: 6px; }
.my-pres-menu button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: start; padding: 7px 10px; border-radius: 8px; border: 0; background: rgba(255,255,255,.05); color: #e8f1f5; cursor: pointer; font: inherit; font-size: 13px; }
.my-pres-menu button:hover { background: rgba(255,255,255,.14); }
.my-pres-menu button.is-on { outline: 1.5px solid #a9bccc; }
.my-pres-menu button:disabled { opacity: .45; cursor: not-allowed; }
.my-pres-menu small { color: #a9bccc; }
.avail-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--paper); min-width: 90px; }
.avail-bar i { display: block; height: 100%; }
.eval-q { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.eval-q .num-input label { width: 34px; height: 34px; font-size: 14px; }
.eval-total { font-family: var(--font-display); font-size: 34px; color: var(--petrol-dark); text-align: center; }
.color-in { width: 46px; height: 34px; padding: 2px; flex: 0 0 46px !important; border-radius: 8px; }
.legend-pres { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-inline-start: auto; }

/* ---- 2.1.0: evaluation sections in the menu */
.nav-sub > summary { list-style: none; cursor: pointer; }
.nav-sub > summary::-webkit-details-marker { display: none; }
.nav-sub > summary::after { content: "▾"; margin-inline-start: auto; font-size: 11px; opacity: .7; transition: transform .15s; }
.nav-sub:not([open]) > summary::after { transform: rotate(90deg); }
[dir="rtl"] .nav-sub:not([open]) > summary::after { transform: rotate(-90deg); }
.nav-link-sub { padding-inline-start: 30px; font-size: 13.5px; }

/* ---- 2.1.0: maintenance photo boxes with a drawing of the side to photograph */
.side-ico { display: block; margin: 0 auto 4px; color: var(--petrol); }
.side-ico .f { fill: #eef2f5; stroke: #8fa3b3; stroke-width: 1.4; stroke-linejoin: round; }
.side-ico .f-top { fill: #f7f9fb; }
.side-ico .f-side { fill: #dfe6ec; }
.side-ico .f-on { fill: #0e5e6f; fill-opacity: .85; stroke: #0e5e6f; stroke-width: 1.6; stroke-linejoin: round; }
.side-ico .f-ghost polygon { fill-opacity: .35; }
.side-ico .e-hid { fill: none; stroke: #8fa3b3; stroke-width: 1.1; stroke-dasharray: 2.5 2; }
.side-ico .arr { fill: none; stroke: #d9822b; stroke-width: 2.2; stroke-linecap: round; }
.photo-ph .side-ico { margin-bottom: 2px; }
.photo-slot.is-optional .photo-ph::after { content: attr(data-opt); display: block; font-size: 11px; color: var(--muted); }
.step-extra { border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin: 10px 0; }
.step-extra > summary, .step-extra > label.check { font-weight: 600; }
.photo-grid figure video { width: 100%; border-radius: 6px; background: #000; max-height: 260px; }
.photo-group-title { margin: 12px 16px 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.kv-list { margin: 0 16px 12px; display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; }
.kv-list dt { color: var(--muted); }
.public-link { display: flex; gap: 6px; }
.public-link input { flex: 1; direction: ltr; font-size: 12.5px; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.comment-list li { background: var(--paper, #f5f7f9); border-radius: var(--r-sm); padding: 8px 12px; }
.comment-list li.is-staff { background: #e6f1f3; }
.comment-list .who { font-size: 12.5px; color: var(--muted); }
.q-task { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; margin-top: 10px; background: #fafbfc; }
.q-task-list { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13px; }
.q-task-list:empty { display: none; }
.public-page { background: var(--paper, #f3f5f7); }
.public-main { max-width: 980px; margin: 0 auto; padding: 18px; }
.public-logo { max-height: 56px; max-width: 200px; display: block; margin-bottom: 8px; }
.answer-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.answer-form .input { flex: 1; min-width: 180px; }
.stage-list { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 10px; }
.stage-list li { display: flex; gap: 10px; align-items: flex-start; opacity: .65; }
.stage-list li.is-done { opacity: 1; }
.stage-no { width: 24px; height: 24px; border-radius: 50%; background: #dfe6ec; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.stage-list li.is-done .stage-no { background: var(--petrol); color: #fff; }
.size-pick { display: flex; gap: 4px; }
.size-pick select { flex: 1; min-width: 0; }
.prev-cost { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.badge-initial { color: var(--pending); background: var(--pending-bg); }
/* 2.1.0: container size in the product line */
.f-size { grid-column: span 3; } .line-grid .f-price { grid-column: span 3; }
.line-grid .f-prev, .line-grid .f-total { grid-column: span 3; }
@media (max-width: 1100px) { .f-size { grid-column: span 4; } .line-grid .f-price, .line-grid .f-prev, .line-grid .f-total { grid-column: span 4; } }

/* ---- 2.2.0 */
/* Radio buttons and check boxes inside a field keep their normal size (they were stretched like text boxes) */
.field input[type=radio], .field input[type=checkbox] {
  width: 16px; height: 16px; padding: 0; margin: 0; border: 0; background: none; box-shadow: none;
  flex: none; accent-color: var(--petrol);
}
/* Previous price and total of a product line: a box under the label, like «Quantity» */
.line-grid .f-prev output, .line-grid .f-total output {
  height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #f6f8f9;
}
.line-grid .f-total output { color: var(--text); }
.line-grid .f-qty output { height: 40px; }
.line-grid .f-prev output { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-row { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.type-row .grid-fields .field { margin-bottom: 0; }
/* ---- 2.2.0: condition and value of the physical assets */
.cond { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.cond-track { flex: 1; height: 8px; border-radius: 99px; background: #eef1f4; overflow: hidden; }
.cond-fill { height: 100%; border-radius: 99px; transition: width .3s; }
.cond-pct { font-size: 12.5px; font-weight: 700; min-width: 38px; text-align: end; }
.cond-lg .cond-track { height: 12px; }
.cond-lg .cond-pct { font-size: 15px; }
.asset-dash-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding: 18px 20px; }
.donut { margin: 0; text-align: center; }
.donut svg { transform: rotate(0deg); display: block; margin: 0 auto; }
.donut-num { font-size: 8px; font-weight: 700; fill: var(--text); }
.donut-lbl { font-size: 3.2px; fill: var(--muted); }
.donut figcaption { font-weight: 600; margin-top: 4px; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; min-width: 260px; flex: 1; }
.donut-legend a { display: grid; grid-template-columns: 14px 1fr auto 40px; gap: 10px; align-items: center; padding: 6px 10px;
  border-radius: var(--r-sm); text-decoration: none; color: var(--text); }
.donut-legend a:hover, .donut-legend a.is-active { background: #f1f4f6; }
.donut-legend .dot { width: 14px; height: 14px; border-radius: 4px; }
.donut-legend .lg-n { text-align: end; }
.asset-money { display: grid; gap: 10px; min-width: 200px; }
.asset-money > div { display: grid; grid-template-columns: auto auto; gap: 2px 12px; align-items: baseline; }
.w-num { width: 90px !important; }
input[type=color] { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.field.narrow { max-width: 340px; }
.input-pair { display: flex; gap: 6px; }
.input-pair input { flex: 1; min-width: 0; }
.input-pair select { width: 110px !important; flex: none; }
.input-pair.pair-wide select { width: auto !important; flex: 1; }
.input-pair.pair-wide input { flex: none; width: 90px !important; }
.pair-unit { align-self: center; color: var(--muted); }
.donut-legend { max-width: 460px; }
.asset-money { min-width: 260px; max-width: 360px; flex: 1; align-self: flex-start; }
.asset-money .field { margin-bottom: 10px; }
.money-big { font-size: 22px; font-weight: 700; }
.asset-money .table td { padding: 6px 8px; }
.asset-money > div[data-view] { display: block; }

/* ---- 2.2.2: on phones a wide table scrolls inside its box and never makes the whole page wider */
.panel-cols > *, .detail-layout > *, .split > *, .settings-layout > *, .po-layout > *, .eval-layout > * { min-width: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 800px) {
  .stat-trio div { padding: 12px 10px; }
  .stat-trio span { font-size: 11.5px; }
  .panel-head { flex-wrap: wrap; gap: 10px; }
}

/* 2.3.0 - files on phones: busy button, short tip at the bottom */
.btn.is-busy, a.is-busy { opacity: .6; cursor: progress; pointer-events: none; }
.file-toast { position: fixed; inset-inline: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 300;
  background: #13293d; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-size: 14px; line-height: 1.5; max-width: 560px; margin-inline: auto; transition: opacity .5s; }
.file-toast:empty { display: none; }
.file-toast.is-gone { opacity: 0; }

/* 2.4.0 - notifications on this device; «Keep me signed in» */
.push-panel .panel-head h2 { display: flex; align-items: center; gap: 8px; }
.push-panel [data-push-status] { margin: 0 0 12px; }
.check.remember { margin: 6px 0 2px; }
.remember-hint { margin: 0 0 14px; }
