/* Sorvation Mini: presentation copied from the CURRENT shipped Sorvation product (blue identity, Ink rail).
   Fonts bundled locally (no CDN): Manrope variable (OFL, fonts/manrope-OFL.txt) for Latin,
   IBM Plex Sans Arabic (OFL, fonts/OFL.txt) for Arabic. */


@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("/fonts/plex-arabic-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url("/fonts/plex-arabic-arabic-500.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url("/fonts/plex-arabic-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url("/fonts/plex-arabic-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("/fonts/plex-arabic-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url("/fonts/plex-arabic-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url("/fonts/plex-arabic-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url("/fonts/plex-arabic-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Values from the CURRENT shipped product (sorvation-github worktree demo-upgrade-2026-10-29):
   tokens = css/sorvation-ui-tokens.css (copied verbatim from src/frontend/public/assets);
   shell = src/frontend/src/redesign-phase-a.css (Ink rail) over approved-design.css;
   list = procurement/sourcing-list.css; detail + comparison = procurement/request-detail.css;
   sign in = ops/identity-themes/sorvation/login/resources/css/sorvation-auth-v4.css;
   supplier = supplier-experience.css (.supplier-secure-brand / workspace).
   Arabic text is one pixel larger than Latin at the same step (--ar). */
:root {
  --ar: 0px;
  --background: var(--sorvation-background, #f6f7f9);
  --surface: var(--sorvation-surface, #ffffff);
  --band: var(--sorvation-band, #f6f7f9);
  --hover: var(--sorvation-surface-hover, #f1f3f6);
  --muted: var(--sorvation-surface-muted, #eceef2);
  --border: var(--sorvation-border, #dce0e7);
  --border-strong: var(--sorvation-border-strong, #bec5d0);
  --field: var(--sorvation-field, #7a8494);
  --ink: var(--sorvation-ink, #0b1a33);
  --ink-muted: var(--sorvation-ink-muted, #4a5262);
  --primary: var(--sorvation-action, #1f4fd8);
  --primary-hover: var(--sorvation-action-hover, #1a41b4);
  --primary-pressed: var(--sorvation-action-pressed, #173a9e);
  --danger: var(--sorvation-danger, #c42f2f);
  --rail: var(--sorvation-ink, #0b1a33);
  --rail-raised: color-mix(in srgb, var(--sorvation-blue-600, #1f4fd8) 14%, var(--sorvation-ink, #0b1a33));
  --rail-line: rgb(255 255 255 / 12%);
  --rail-text: #c9d1de;
  --motion: var(--sorvation-motion-fast-01, 70ms) var(--sorvation-ease-standard, ease);
  --font: "Manrope", "IBM Plex Sans Arabic", system-ui, sans-serif;
}
html[lang="ar"] { --ar: 1px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-width: 320px; background: var(--background); color: var(--ink); }
body, button, input, select, textarea { font-family: var(--font); font-size: calc(14px + var(--ar)); }
body { line-height: 20px; font-variant-numeric: tabular-nums; }
::selection { background: var(--sorvation-blue-100, #d6e2fd); color: var(--ink); }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: 0; }
p { margin: 0 0 12px; color: var(--ink-muted); }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
b, strong { font-weight: 700; }
button, a, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.muted { color: var(--ink-muted); }
.small { font-size: calc(12px + var(--ar)); }
.spacer { flex: 1; }
.icon { display: block; flex: none; }
[dir="rtl"] .icon.flip { transform: scaleX(-1); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Logo + product label ---------- */
.product-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px 16px 16px; text-decoration: none; }
.sorvation-logo { display: block; flex: none; width: auto; height: 22px; }
.product-label { font: 600 12px/16px "Manrope", system-ui, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary); }

/* ---------- Buyer frame: 208 px Ink rail + content (approved-design .buyer-frame, redesign-phase-a rail) ---------- */
.frame { display: grid; grid-template-columns: 208px minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--rail); color: #fff; }
.sidebar .product-label { color: var(--sorvation-blue-400, #6a92f5); }
.nav-search {
  display: flex; align-items: center; gap: 8px; margin: 0 12px 12px; padding: 0 10px; height: 32px; flex: none;
  border: 1px solid var(--rail-line); border-radius: 6px; background: rgb(255 255 255 / 6%); color: var(--rail-text);
  transition: border-color var(--motion), background-color var(--motion);
}
.nav-search:focus-within { border-color: var(--sorvation-blue-400, #6a92f5); background: rgb(255 255 255 / 10%); }
.nav-search input { -webkit-appearance: none; appearance: none; min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #fff; }
.nav-search input::placeholder { color: var(--rail-text); opacity: 1; }
.nav-search input::-webkit-search-cancel-button { filter: invert(1); }
.product-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.product-nav a, .sidebar-link {
  position: relative; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 8px 10px;
  border: 0; border-radius: 6px; background: transparent; color: var(--rail-text); font: inherit; font-weight: 500;
  text-align: start; text-decoration: none; transition: background-color var(--motion), color var(--motion);
}
.product-nav a:hover, .sidebar-link:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.product-nav a:active, .sidebar-link:active { background: rgb(255 255 255 / 12%); }
.product-nav a[aria-current="page"] { background: var(--rail-raised); color: #fff; font-weight: 600; }
.product-nav a[aria-current="page"]::before {
  content: ""; position: absolute; inset-block: 6px; inset-inline-start: 0; width: 3px;
  border-start-end-radius: 2px; border-end-end-radius: 2px; background: var(--sorvation-blue-400, #6a92f5);
}
.sidebar :focus-visible { outline-color: #fff; }
.sidebar-tools { margin-top: auto; padding: 0 8px 8px; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--rail-line); color: #fff; }
.sidebar-foot .who { min-width: 0; flex: 1; }
.sidebar-foot strong { display: block; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot small { display: block; overflow: hidden; color: var(--rail-text); font-size: calc(12px + var(--ar)); line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.account-avatar { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; }
.icon-button { display: inline-grid; place-items: center; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: var(--primary); }
.sidebar .icon-button { color: var(--rail-text); }
.sidebar .icon-button:hover { color: #fff; background: rgb(255 255 255 / 8%); }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 0; background: transparent; color: var(--primary); font: inherit; font-weight: 600; }
.text-button:hover { color: var(--primary-hover); }

/* ---------- Content column ---------- */
.main { min-width: 0; overflow: auto; }
.workspace { padding: 20px; }
.workspace.wide { padding: 24px 32px; }
/* Header bar (approved-page-header): white, 64 px, Carbon heading-03 title + helper subtitle. */
.page-header {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.page-header .titles { min-width: 0; }
.page-header h1 { font-size: calc(20px + var(--ar)); line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.page-header .sub { margin: 0; font-size: calc(12px + var(--ar)); line-height: 16px; color: var(--ink-muted); }
.page-header .actions { margin-inline-start: auto; }
.lead { margin: 0 0 16px; color: var(--ink); }

/* Sourcing list header: 22/28 extra-bold title with the counts inline, actions on the far side. */
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; margin-bottom: 16px; }
.page-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.page-title h1 { font-size: calc(22px + var(--ar)); line-height: 28px; font-weight: 800; letter-spacing: -0.015em; white-space: nowrap; }
.page-title span { overflow: hidden; font-size: calc(12.5px + var(--ar)); color: var(--ink-muted); text-overflow: ellipsis; white-space: nowrap; }

/* Tabs (sl-views / rd-tabs): 40 px, Blue 600 selected rule. */
.tabs { display: flex; align-items: stretch; gap: 4px; height: 40px; margin-bottom: 12px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs > button, .tabs > a {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; margin: 0 0 -1px; padding: 0 12px;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--ink-muted);
  font: inherit; font-size: calc(13px + var(--ar)); font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: color var(--motion), background-color var(--motion);
}
.tabs > button:hover:not(.on), .tabs > a:hover:not(.on) { color: var(--ink); background: var(--hover); }
.tabs > .on { border-bottom-color: var(--primary); color: var(--ink); }
.tabs b { font-weight: 700; color: var(--ink); }
.rd-tabs { gap: 2px; margin-bottom: 16px; }
.rd-tabs > a { font-size: calc(13.5px + var(--ar)); }
.rd-tabs > a.on { font-weight: 700; }
.rd-tabs .count { color: var(--ink-muted); font-size: calc(11.5px + var(--ar)); font-weight: 700; }

/* ---------- Buttons (approved-design .button + redesign-phase-a states) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; line-height: 18px; text-decoration: none; white-space: nowrap; box-shadow: none;
  transition: background-color var(--motion), border-color var(--motion), color var(--motion);
}
.btn:hover:not(:disabled) { border-color: var(--border-strong); background: var(--hover); color: var(--ink); }
.btn:active:not(:disabled) { background: var(--muted); }
.btn.lg { min-height: 36px; padding-inline: 14px; }
.btn.primary { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:hover:not(:disabled) { border-color: var(--primary-hover); background: var(--primary-hover); color: #fff; }
.btn.primary:active:not(:disabled) { border-color: var(--primary-pressed); background: var(--primary-pressed); }
.btn.primary:focus-visible { box-shadow: inset 0 0 0 1px #fff; }
.btn.danger { border-color: var(--danger); background: var(--danger); color: #fff; font-weight: 600; }
.btn.danger:hover:not(:disabled) { border-color: #a82626; background: #a82626; color: #fff; }
.btn.danger-outline { color: var(--danger); }
.btn.danger-outline:hover:not(:disabled) { color: var(--danger); background: var(--sorvation-danger-tint, #fcebeb); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.btn.link { border-color: transparent; background: transparent; color: var(--primary); font-weight: 600; padding-inline: 6px; }
.btn.link:hover:not(:disabled) { border-color: transparent; background: transparent; color: var(--primary-hover); }
.btn .icon { width: 14px; height: 14px; }
.btn.primary.lg .icon { width: 16px; height: 16px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 0; padding: 0; border: 0; background: none;
  color: var(--primary); font: inherit; font-size: calc(12.5px + var(--ar)); font-weight: 700; text-decoration: none;
}
.link-btn:hover { color: var(--primary-hover); text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.action-row { margin-top: 12px; }

/* ---------- Cards and table cards (sl-card / rd-card) ---------- */
.card { min-width: 0; margin: 0 0 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.card-band {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 20px;
  border-bottom: 1px solid var(--border); background: var(--band);
}
.card-band h2 { font-size: calc(15px + var(--ar)); line-height: 20px; font-weight: 700; }
.card-band .muted { font-size: calc(12.5px + var(--ar)); }
.card-body { padding: 16px 20px; }
.card-foot { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 20px; border-top: 1px solid var(--border); font-size: calc(12.5px + var(--ar)); }
.empty { display: grid; place-items: center; min-height: 160px; padding: 28px 24px; color: var(--ink-muted); text-align: center; }
.after-card { margin-top: -4px; font-size: calc(12.5px + var(--ar)); }
.panel { margin: 0 0 16px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.panel > h2 { margin: 0 0 12px; font-size: calc(15px + var(--ar)); line-height: 20px; font-weight: 700; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.data th {
  height: 40px; padding: 0 12px; border-bottom: 1px solid var(--border); background: var(--band); color: var(--ink-muted);
  font: 600 calc(12px + var(--ar))/16px var(--font); letter-spacing: 0; text-align: start; text-transform: none; white-space: nowrap; vertical-align: middle;
}
.data td { height: 48px; padding: 0 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data th:first-child, .data td:first-child { padding-inline-start: 20px; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr { transition: background-color var(--motion); }
.data tbody tr:hover td { background: var(--hover); }
.data .c-fit { width: 1%; white-space: nowrap; }
.data .c-end { width: 1%; text-align: end; white-space: nowrap; }
.data .c-chev { width: 40px; padding-inline: 0 12px; color: var(--ink-muted); text-align: end; }
.data .c-chev .icon { display: inline-block; vertical-align: middle; }
.data .c-title { min-width: 240px; }
.rows-link tbody tr { cursor: pointer; }
.rows-link tbody tr:active td { background: var(--muted); }
.title-link { color: var(--ink); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.title-link:hover { color: var(--primary); text-decoration: underline; }
.data tr.editing td { padding-block: 6px; }
.data tr.editing input { margin-top: 0; }

/* ---------- Chips (sl-chip / rd-chip; status palette) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  background: var(--sorvation-neutral-tint, #eceef2); color: var(--sorvation-neutral-ink, #4a5262);
  font-size: calc(11.5px + var(--ar)); font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: middle;
}
.chip .icon { width: 12px; height: 12px; stroke-width: 2.5; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip.info { background: var(--sorvation-info-tint, #ebf1fe); color: var(--sorvation-info-ink, #1a41b4); }
.chip.ok { background: var(--sorvation-success-tint, #e7f4ec); color: var(--sorvation-success-ink, #16794a); }
.chip.warn { background: var(--sorvation-warning-tint, #fdf2e2); color: var(--sorvation-warning-ink, #a85a00); }
.chip.bad { background: var(--sorvation-overdue-tint, #fcebeb); color: var(--sorvation-overdue-ink, #c42f2f); }
.chip.plain { border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); }
.chip.aw { border: 1px solid var(--ink); background: var(--surface); color: var(--ink); }

/* ---------- Request detail head (rd-head): crumb, 22/28 title, facts; chip + actions on the far side ---------- */
.rd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.rd-head-main { min-width: 0; }
.crumb { display: flex; align-items: center; gap: 6px; min-width: 0; height: 18px; margin-bottom: 4px; color: var(--ink-muted); font-size: calc(12.5px + var(--ar)); }
.crumb > .icon { width: 14px; height: 14px; }
.crumb > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-muted); font-weight: 600; text-decoration: none; }
.crumb-back:hover { color: var(--primary); }
.rd-head h1 { overflow: hidden; font-size: calc(22px + var(--ar)); line-height: 28px; font-weight: 800; letter-spacing: -0.015em; text-overflow: ellipsis; white-space: nowrap; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; color: var(--ink-muted); font-size: calc(12.5px + var(--ar)); line-height: 18px; }
.facts b { color: var(--ink); }
.rd-head-side { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* "Current step"-style banner: white card, 4 px accent on the start edge, icon tile, title + helper. */
.banner {
  display: flex; align-items: center; gap: 16px; margin: 0 0 16px; padding: 12px 20px;
  border: 1px solid var(--border); border-inline-start: 4px solid var(--primary); border-radius: 12px; background: var(--surface);
}
.banner strong { display: block; font-size: calc(14px + var(--ar)); }
.banner div > span { display: block; color: var(--ink-muted); font-size: calc(12.5px + var(--ar)); }
.banner-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 8px; background: var(--band); color: var(--ink); }
.banner.ok { border-inline-start-color: var(--sorvation-success-accent, #2e8b5c); }
.banner.ok .banner-icon { background: var(--sorvation-success-tint, #e7f4ec); color: var(--sorvation-success-ink, #16794a); }
.banner.warn { border-inline-start-color: var(--sorvation-warning-accent, #d98a1f); }
.banner.warn .banner-icon { background: var(--sorvation-warning-tint, #fdf2e2); color: var(--sorvation-warning-ink, #a85a00); }
.banner.neutral { border-inline-start-color: var(--sorvation-neutral-accent, #8e97a6); }

/* ---------- Offers side by side (rd-cmp): one value per cell ---------- */
/* Fixed columns # | Item | Unit | Qty, then one column group per supplier: Unit price | VAT % | Total. */
.cmp { table-layout: fixed; font-size: calc(12.5px + var(--ar)); }
.cmp col.c-no { width: 44px; }
.cmp col.c-unit, .cmp col.c-qty { width: 96px; }
.cmp col.c-price { width: 120px; }
.cmp col.c-vat { width: 72px; }
.cmp col.c-total { width: 108px; }
.cmp th, .cmp td { height: 36px; padding: 6px 12px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: middle; white-space: nowrap; }
.cmp .n { text-align: end; font-variant-numeric: tabular-nums; }
.cmp .grp { border-inline-start: 1px solid var(--border-strong); }
.cmp thead th { background: var(--band); color: var(--ink-muted); font-size: calc(12px + var(--ar)); font-weight: 600; }
.cmp thead th.sup { color: var(--ink); font-size: calc(13px + var(--ar)); font-weight: 700; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.cmp thead th.c-no, .cmp td.c-no { padding-inline: 16px 8px; }
.cmp tbody th.c-item { color: var(--ink); font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.cmp .fix { position: sticky; z-index: 1; background: var(--surface); }
.cmp thead .fix { z-index: 2; background: var(--band); }
.cmp .c-no.fix, .cmp th.lbl.fix { inset-inline-start: 0; }
.cmp .c-item.fix { inset-inline-start: 44px; }
.cmp td .price { display: inline-flex; align-items: center; gap: 6px; }
.cmp td.best { font-weight: 700; color: var(--ink); }
.cmp td.best .icon { color: var(--sorvation-success-ink, #16794a); stroke-width: 3; }
.cmp td.na { color: var(--ink-muted); text-align: center; }
.cmp td.short { color: var(--sorvation-warning-ink, #a85a00); }
.cmp .awarded-col { background: var(--sorvation-surface-selected, #ebf1fe); }
.cmp tbody.sums th.lbl { padding-inline-start: 16px; color: var(--ink-muted); font-weight: 600; }
.cmp tbody.sums tr.sum th, .cmp tbody.sums tr.sum td { border-top: 1px solid var(--border-strong); }
.cmp tbody.sums tr.tot th, .cmp tbody.sums tr.tot td { color: var(--ink); font-size: calc(13.5px + var(--ar)); font-weight: 800; }
.cmp tbody.sums tr.txt td { color: var(--ink-muted); font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.cmp tbody.sums tr:last-child th, .cmp tbody.sums tr:last-child td { border-bottom: 0; }

/* ---------- Forms (approved-design product-workspace fields; Carbon label 12/16) ---------- */
label.field { display: block; margin-bottom: 16px; color: var(--ink-muted); font-size: calc(12px + var(--ar)); font-weight: 500; line-height: 16px; }
label.field > span { display: block; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=datetime-local], input[type=number], textarea {
  width: 100%; margin-top: 6px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--field); border-radius: 6px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: calc(14px + var(--ar)); line-height: 20px;
}
/* Deadline picker (day / month / year / time selects in the app language), drawn like the text fields. */
label.field > .dt-field { display: grid; grid-template-columns: minmax(56px, .7fr) minmax(96px, 1.5fr) minmax(72px, .9fr) minmax(100px, 1.3fr); gap: 8px; margin-top: 6px; }
.dt-field select {
  -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; min-height: 34px; padding: 6px 12px; padding-inline-end: 28px;
  border: 1px solid var(--field); border-radius: 6px; background: var(--surface) no-repeat right 10px center / 12px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5262' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color: var(--ink); font: inherit; font-size: calc(14px + var(--ar)); line-height: 20px; cursor: pointer;
}
[dir=rtl] .dt-field select { background-position: left 10px center; }
.dt-field select:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
textarea { min-height: 96px; resize: vertical; }
input:disabled, textarea:disabled { background: var(--muted); color: var(--ink-muted); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-card { padding: 24px; }
.form-section { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-section > h2 { margin: 0 0 12px; font-size: calc(14px + var(--ar)); line-height: 20px; font-weight: 700; }
.form-section + .form-section { margin-top: 20px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.form-actions .btn { min-height: 36px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink); cursor: pointer; }
.check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.pick-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.check.pick { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.check.pick:last-child { border-bottom: 0; }
.check.pick:hover { background: var(--hover); }
.check.pick .muted { font-size: calc(12.5px + var(--ar)); }
.items { border: 1px solid var(--border); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.items th { height: 36px; padding: 0 8px; border-bottom: 1px solid var(--border); background: var(--band); color: var(--ink-muted); font-size: calc(12px + var(--ar)); font-weight: 600; text-align: start; }
.items td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.items tbody tr:last-child td { border-bottom: 0; }
.items td input[type=text] { margin-top: 0; }
.items .col-no { width: 40px; padding-inline-start: 14px; }
.items .col-qty { width: 130px; }
.items .col-unit { width: 140px; }
.items .col-x { width: 44px; }
.remove-line { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-muted); }
.remove-line:hover { background: var(--muted); color: var(--danger); }

/* ---------- Messages ---------- */
.alert {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: calc(13px + var(--ar));
}
.alert.error { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); background: var(--sorvation-danger-tint, #fcebeb); color: var(--sorvation-overdue-ink, #c42f2f); }
.alert.ok { border-color: color-mix(in srgb, var(--sorvation-success, #16794a) 25%, var(--border)); background: var(--sorvation-success-tint, #e7f4ec); color: var(--sorvation-success-ink, #16794a); }
.alert.info { color: var(--ink-muted); }
.alert.warn { border-color: color-mix(in srgb, var(--sorvation-warning-accent, #d98a1f) 35%, var(--border)); background: var(--sorvation-warning-tint, #fdf2e2); color: var(--sorvation-warning-ink, #a85a00); }
/* Daftra: actions at the end of the award banner; sign-in divider; linked-product hint under an item line */
.banner .banner-end { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-inline-start: auto; }
.login-alt { display: grid; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.items td small.daftra-tag { display: block; margin-top: 2px; }

/* ---------- Dialog ---------- */
dialog { width: calc(100% - 32px); max-width: 480px; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 16px 48px rgb(11 26 51 / 18%); }
dialog::backdrop { background: rgb(11 26 51 / 40%); }
dialog h2 { margin: 0 0 12px; font-size: calc(18px + var(--ar)); line-height: 24px; font-weight: 700; }
dialog p { color: var(--ink); }
dialog p.muted { color: var(--ink-muted); font-size: calc(13px + var(--ar)); }
dialog .check { margin: 4px 0 8px; }
dialog .alert { margin: 12px 0 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dialog-actions .btn { min-height: 36px; }

/* ---------- Sign in (sorvation-auth-v4) ---------- */
.login { display: grid; align-content: center; justify-items: center; min-height: 100vh; min-height: 100dvh; padding: 32px 24px; background: var(--background); }
.login-box { display: grid; gap: 24px; width: min(100%, 432px); }
.login-head { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.login-head .sorvation-logo { height: 30px; }
.login-head .product-label { color: var(--ink-muted); font-size: 11px; font-weight: 600; line-height: 1.5; letter-spacing: 0.1em; }
.login-card { padding: 28px 32px 32px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 32px rgb(11 26 51 / 5%); }
.login-card h1 { margin: 0 0 24px; font-size: calc(20px + var(--ar)); line-height: 1.4; font-weight: 700; letter-spacing: -0.02em; }
.login-card label.field { margin-bottom: 20px; color: var(--ink); font-size: calc(12px + var(--ar)); font-weight: 600; line-height: 1.5; }
.login-card input[type=email], .login-card input[type=password] { min-height: 42px; margin-top: 6px; padding: 9px 12px; }
.login-card .btn.primary { width: 100%; min-height: 42px; margin-top: 4px; font-weight: 600; }
.login-foot { display: flex; justify-content: center; }
.login-foot .text-button { font-size: calc(13px + var(--ar)); }

/* ---------- Supplier (secure shell) and dev pages: 56 px header, centred workspace ---------- */
.solo { min-height: 100vh; background: var(--background); }
.solo-top { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.solo-top .product-brand { flex-direction: row; align-items: center; gap: 12px; padding: 0; direction: ltr; }
.solo-main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 40px; }
.supplier-form .card { margin-bottom: 16px; }
.items-quote .col-no { width: 48px; }
.items-quote .col-unit, .items-quote .col-qty { width: 96px; }
.items-quote .price-col { width: 150px; }
.items-quote .price-col input { margin-top: 0; text-align: end; }
.items-quote .vat-col { width: 88px; }
.items-quote .vat-col input { margin-top: 0; text-align: end; }
.items-quote .amount { width: 130px; text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.items-quote .na-cell { width: 1%; text-align: center; white-space: nowrap; }
.items-quote .num-cell { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.items-quote td { padding-block: 8px; }
.supplier-form .totals { margin-inline-start: auto; }
.totals { display: grid; grid-template-columns: 1fr auto; row-gap: 8px; max-width: 380px; }
.totals > span:nth-child(odd) { padding-inline-end: 24px; color: var(--ink-muted); }
.totals .grand { padding-top: 8px; border-top: 1px solid var(--ink); color: var(--ink); font-size: calc(15px + var(--ar)); font-weight: 800; }
.totals .num { text-align: end; }
.mail { padding: 16px 20px; }
.mail h2 { font-size: calc(15px + var(--ar)); line-height: 20px; }
.mail .meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 4px; color: var(--ink-muted); font-size: calc(12.5px + var(--ar)); }
.mail pre { margin: 12px 0 0; padding: 12px; border-radius: 8px; background: var(--band); color: var(--ink); font: inherit; white-space: pre-wrap; word-break: break-word; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media (max-width: 900px) {
  .form-grid, .form-grid.two { grid-template-columns: 1fr; }
  .rd-head { flex-direction: column; }
  .rd-head-side { justify-content: flex-start; margin-top: 0; }
}
@media (max-width: 720px) {
  .frame { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .sidebar { overflow: visible; }
  .nav-search { display: none; }
  .product-nav { flex-direction: row; padding-bottom: 8px; }
  .sidebar-tools { margin-top: 0; }
  .main { overflow: visible; }
  .workspace, .workspace.wide { padding: 16px; }
  .page-top { flex-wrap: wrap; }
  .page-title { flex-wrap: wrap; }
  .page-header { flex-wrap: wrap; padding: 8px 16px; }
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], textarea { font-size: 16px; }
  .dt-field select { font-size: 16px; }
  label.field > .dt-field { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
