/* RB Weekly P&L - B - Deeper: the Routing family, with a deeper primary for
   money actions. One spacing scale (4 8 12 16 20 24 32), one control height,
   one radius. */
:root {
  --page:   #f2f7fb;
  --surf:   #ffffff;
  --soft:   #f4f9fd;
  --line:   #cfe0ec;
  --line2:  #e3edf5;
  --ink:    #1f5f8f;
  --inkx:   #164d76;
  --muted:  #55738f;
  --faint:  #7b96ad;
  --pri:    #1a6d9e;
  --pritint:#e9f3fa;
  --priline:#bdd8ea;
  --gold:   #d79b12;
  --warn:   #a06a12;
  --warnbg: #fbf3e5;
  --warnln: #f0d9af;
  --ok:     #2e7d4f;
  --okbg:   #eaf6ee;
  --field:  #fbfdff;
  --shadow: 0 1px 2px rgba(25,82,120,.06), 0 3px 12px rgba(25,82,120,.08);
  --lift:   0 2px 6px rgba(25,82,120,.08), 0 14px 34px rgba(25,82,120,.13);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 1560px; margin: 0 auto; padding: 0 0 24px; }
.n { font-variant-numeric: tabular-nums; }

header {
  display: flex; justify-content: space-between; align-items: center;
  height: 56px; padding: 0 24px; margin-bottom: 20px;
  background: linear-gradient(90deg, var(--pri) 0%, #54b6e7 62%, #c88f10 100%);
  border-bottom: 4px solid var(--gold);
  color: #fff;
}
.header-left { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand { font-weight: 700; font-size: 17px; line-height: 1; letter-spacing: .2px; white-space: nowrap; }
h1 { font-size: 15px; font-weight: 600; margin: 0; color: rgba(255,255,255,.94); }
h2 { font-size: 16px; margin: 0 0 8px; color: var(--inkx); }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-right .who { font-size: 13.5px; color: rgba(255,255,255,.92); white-space: nowrap; }
header button.link, header button.link.back { color: rgba(255,255,255,.94); }
header button.link:hover { color: #fff; }

.card {
  background: var(--surf); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin: 0 24px 16px; box-shadow: var(--shadow);
}
.card.signin { max-width: 380px; margin: 80px auto; }
/* The page h1 is styled for the dark header bar; on the sign-in card it was
   invisible (white on white, found during the 2026-11-02 browser QA). */
.card.signin h1 { color: #17548a; font-size: 20px; margin: 0 0 10px; }
.card.signin .envmark {
  display: inline-block; margin: 0 0 8px; padding: 2px 8px; border-radius: 6px;
  background: #fff3cd; color: #7a5a00; border: 1px solid #f0d27a; font-size: 13px; font-weight: 600;
}
.card.signin .config-problems { margin: 8px 0 12px 18px; padding: 0; color: #a12a2a; }
.card.signin .config-problems li { margin: 4px 0; }
.card.empty { padding: 24px; }
.card.summary { display: flex; gap: 32px; }
.card.summary strong { font-size: 20px; margin-right: 4px; }

.muted { color: var(--muted); }
small.muted { font-size: 12px; }

label { display: block; margin: 10px 0; font-weight: 600; }
label input, label select {
  display: block; width: 100%; margin-top: 4px; font-weight: 400;
}
input[type=text], input[type=email], input[type=password], select {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
  background: var(--field); color: var(--ink);
}
input[type=text]:focus, select:focus {
  outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px var(--pritint);
}
textarea {
  display: block; width: 100%; margin-top: 4px; font-weight: 400; font: inherit; font-size: 14px;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--field); color: var(--ink); resize: vertical;
}
textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px var(--pritint); }
.addriver { border-top: 1px solid var(--line2); padding-top: 12px; }
.addriver label.radio { font-weight: 600; }

button {
  font-size: 14px; font-weight: 600; height: 36px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--priline); background: var(--surf); color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
button.primary, button.btn.pri { background: var(--pri); border-color: var(--pri); color: #fff; }
button.primary:disabled, button.btn.pri:disabled {
  background: #8aa5bd; border-color: #8aa5bd; cursor: default;
}
button.link {
  border: none; background: none; color: var(--ink); padding: 0; height: auto;
  font-weight: 500; border-bottom: 1px solid var(--priline);
}
button.link:hover { color: var(--gold); border-bottom-color: var(--gold); }
button.link.quiet { color: var(--muted); }
button.icon {
  width: 28px; height: 28px; padding: 0; border: none; background: none;
  color: var(--pri); font-size: 20px; line-height: 1; border-radius: 6px;
}
button.icon:disabled { color: var(--faint); cursor: default; }
button.icon:hover:not(:disabled) { background: var(--pritint); }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: var(--muted); padding: 0 14px; height: 38px;
  background: #f8fbfd; border-bottom: 1px solid var(--line);
}
td { padding: 10px 14px; border-bottom: 1px solid var(--line2); vertical-align: top; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--soft); }
tr.attention > td:first-child { color: #b05e00; font-weight: 700; }

tr.detail { display: none; }
tr.detail.open { display: table-row; }
tr.detail > td { background: #f8fafc; border-left: 3px solid #17548a; }

.chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 600; white-space: nowrap;
}
.chip.done { background: var(--okbg); color: var(--ok); border: 1px solid #bfe3cb; }
.chip.ready { background: var(--pritint); color: var(--pri); border: 1px solid var(--priline); }
.chip.progress { background: var(--warnbg); color: var(--warn); border: 1px solid var(--warnln); }
.chip.open { background: var(--warnbg); color: var(--warn); border: 1px solid var(--warnln); }
.chip.waiting { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }

.banner { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
.banner.error { background: #fdecec; color: #8f1d1d; border: 1px solid #f3c3c3; }
.banner.info { background: #e4eefb; color: #17548a; border: 1px solid #c3d8f0; }

.loading { padding: 24px; color: #5c6875; }

fieldset { border: 1px solid #dde3ea; border-radius: 6px; margin: 12px 0; padding: 10px 14px; }
legend { font-weight: 600; padding: 0 6px; }
label.radio { display: flex; gap: 8px; font-weight: 400; margin: 6px 0; align-items: baseline; }
label.radio input { width: auto; }

dl { display: grid; grid-template-columns: 220px 1fr; gap: 4px 12px; margin: 8px 0; }
dt { font-weight: 600; color: #5c6875; }
dd { margin: 0; }

.resolve {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px; margin-top: 8px; background: #fff; border: 1px solid #dde3ea;
  border-radius: 6px;
}
.resolve strong { min-width: 180px; }
.resolve select { min-width: 220px; }
.resolve input { flex: 1; min-width: 160px; }

/* --- navigation ------------------------------------------------------- */
.mainnav { display: flex; gap: 4px; margin-right: 8px; }
button.navlink {
  border: 1px solid transparent; background: none; color: rgba(255,255,255,.92);
  height: 32px; padding: 0 14px; border-radius: 8px; font-weight: 600;
}
button.navlink:hover { background: rgba(255,255,255,.16); }
button.navlink.current {
  background: #fff; color: var(--inkx); border-color: #fff;
  box-shadow: 0 1px 2px rgba(15,60,95,.18);
}

/* --- financial tables ------------------------------------------------- */
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num.strong { font-weight: 700; }
td.negative { color: #8f1d1d; }
tr.subtotal td { border-top: 1px solid #c4ccd6; background: #f8fafc; font-weight: 600; }
tr.stat td { color: #5c6875; border-top: 2px solid #dde3ea; }

.card.weeknav {
  display: flex; align-items: center; gap: 16px; padding: 10px 16px;
}
.card.weeknav .muted { flex: 1; }
button.link[disabled] { color: #a8b3bf; cursor: default; text-decoration: none; }

.headline { display: flex; gap: 40px; margin-top: 12px; flex-wrap: wrap; }
.headline > div { display: flex; flex-direction: column; }
.hl-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #5c6875; }
.hl-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hl-result .hl-value { color: #17548a; }

details.card > summary {
  font-size: 16px; font-weight: 600; cursor: pointer; padding: 2px 0;
}
details.card > summary:hover { color: #17548a; }
details.card[open] > summary { margin-bottom: 8px; }
.provenance { font-size: 12px; margin-top: 10px; }

.chiprow { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* A two-tier table header, so two bases reported side by side stay readable. */
thead tr:first-child th[colspan] {
  text-align: center;
  border-bottom: 1px solid #dde3ea;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #5c6875;
}

/* --- week lifecycle: the deliberate correction of a locked week ------- */
details.reopenbox {
  margin-top: 12px; padding: 10px 14px;
  border: 1px solid #e6d3b3; border-radius: 6px; background: #fffaf0;
}
details.reopenbox > summary {
  font-weight: 600; cursor: pointer; color: #7a5600;
}
details.reopenbox[open] > summary { margin-bottom: 8px; }
details.reopenbox p { margin: 6px 0; }
button.reopen { border-color: #b05e00; color: #7a5600; background: #fff; font-weight: 600; }
button.reopen:hover { background: #fff3d6; }
button.reopen:disabled { color: #a8b3bf; border-color: #c4ccd6; cursor: default; }

/* --- choosing different source evidence ------------------------------ */
.replace {
  margin-top: 14px; padding: 10px 14px;
  border: 1px solid #dde3ea; border-radius: 6px; background: #f8fafc;
}
.replace h3, details.card h3 { font-size: 14px; margin: 14px 0 6px; }
.replace .resolve { background: #fff; }


/* =====================================================================
   Reconcile - the week's work list
   ===================================================================== */

.weekbar {
  display: flex; align-items: center; gap: 0;
  height: 54px; padding: 0 24px; margin: -20px 24px 20px;
  background: var(--surf); border: 1px solid var(--line);
  border-radius: 0 0 12px 12px; border-top: none;
}
.weekbar .weekname { font-weight: 700; font-size: 17px; line-height: 1; color: var(--inkx); white-space: nowrap; }
.weekbar .chip { margin-left: 14px; }
.weekbar .rule { width: 1px; height: 20px; background: var(--line); margin: 0 18px; }
.weekbar .stats { display: flex; align-items: baseline; gap: 22px; }
.weekbar .stat { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap;
  font-size: 13.5px; color: var(--muted); }
.weekbar .stat b { font-weight: 700; font-size: 16px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.weekbar .spacer, .card.record .spacer, .cardnav .spacer { flex: 1 1 auto; }

/* ---- workstreams: where the week's work is entered ---- */
.streams {
  display: grid; gap: 14px; padding: 0 24px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.card.stream { margin: 0; padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 14px; }
.card.stream.go { cursor: pointer; }
.card.stream.go:hover { border-color: var(--priline); box-shadow: var(--lift); }
.card.stream.go:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; }
.card.stream.settled { background: var(--soft); }
.streamhead { display: flex; align-items: baseline; gap: 12px; }
.streamname {
  font-weight: 700; font-size: 15.5px; line-height: 1.25; color: var(--inkx);
  flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;
}
.streamcount { font-weight: 700; font-size: 26px; line-height: 1; color: var(--pri); }
.streamcount.zero { color: var(--faint); }
.streamfoot {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 12.5px; border-top: 1px solid var(--line2); padding-top: 10px;
}
.streamfoot .muted { flex: 1 1 auto; min-width: 0; }
.streamfoot .risk { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* ---- the trail back up ---- */
.crumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 0 24px 12px; font-size: 13px;
}
.crumb .csep { color: var(--faint); }
.crumb .chere { font-weight: 600; color: var(--inkx); }

/* ---- a batch of decisions ---- */
.batchfoot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 2px 0; font-size: 12.5px;
}
.batchfoot .spacer { flex: 1 1 auto; }
.batchfoot button[disabled] { color: var(--faint); border-color: var(--line2); cursor: default; }

.board {
  display: flex; align-items: flex-start; gap: 22px; padding: 0 24px;
}
.board.solo { justify-content: flex-start; }
.listwrap { flex: 1 1 auto; min-width: 0; }
.listwrap .card.tasks { margin: 0; padding: 0; overflow: hidden; }
.card.tasks table { table-layout: fixed; }
.card.tasks th.type, .card.tasks td.type { width: 150px; }
.card.tasks th.amt,  .card.tasks td.amt  { width: 136px; text-align: right; }

tr.groupline td {
  border-bottom: none; border-top: 1px solid var(--line);
  padding: 15px 14px 7px; white-space: nowrap;
}
tr.groupline:first-child td { border-top: none; }
.groupname { font-weight: 700; font-size: 12.5px; line-height: 1; color: var(--muted); letter-spacing: .02em; }
.groupcount { margin-left: 9px; font-weight: 600; font-size: 12.5px; line-height: 1; color: var(--faint); }

tr.taskrow { cursor: pointer; }
tr.taskrow td {
  height: 38px; padding: 0 14px; font-size: 14px; vertical-align: middle;
  border-bottom: 1px solid var(--line2);
}
tr.taskrow td.issue {
  max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
tr.taskrow td.type { color: var(--muted); white-space: nowrap; }
tr.taskrow td.amt { text-align: right; white-space: nowrap; }
tr.taskrow:hover td { background: var(--soft); }
tr.taskrow.selected td { background: var(--pritint); }
tr.taskrow.selected td.issue { font-weight: 600; box-shadow: inset 3px 0 0 var(--pri); }

/* ---- the focused task card ---- */
.card.task {
  flex: 0 0 480px; align-self: flex-start; margin: 0; padding: 0;
  border-radius: 14px; box-shadow: var(--lift);
}
.cardnav {
  display: flex; align-items: center; height: 44px; padding: 0 12px 0 20px;
  border-bottom: 1px solid var(--line2);
}
.cardnav .pos { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cardbody { padding: 20px; }
.cardtitle {
  font-weight: 700; font-size: 22px; line-height: 1.24; color: var(--inkx); letter-spacing: -.01em;
}
.pillrow { margin-top: 12px; }
.pill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 12px; font-weight: 600; font-size: 12.5px; line-height: 1;
  background: var(--warnbg); color: var(--warn); border: 1px solid var(--warnln);
}

.evidence { margin-top: 16px; }
.erow {
  display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--line2);
}
.elabel { font-size: 13.5px; color: var(--muted); }
.evalue { font-weight: 600; font-size: 14.5px; line-height: 1.35; text-align: right; }
.evalue .warn { color: var(--warn); }
.cardbody .note { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }

.actions { margin-top: 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.chooser { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
/* An explicit display value beats the browser's default [hidden] rule, so
   say it: without this the collapsed chooser stays on screen. */
[hidden] { display: none !important; }
.chooser select { padding: 4px; height: auto; background: var(--surf); }
.chooser select option { padding: 5px 7px; }
.chooser .btn.pri { align-self: flex-start; }

.cardfoot {
  padding: 0 20px; border-top: 1px solid var(--line2); background: var(--soft);
  border-radius: 0 0 14px 14px;
}
.cardfoot > button.link { margin: 14px 0; }
.evpanel { padding-bottom: 16px; }
/* Evidence is subordinate to the decision above it, and visibly nested. */
.evpanel table.evtable { width: 100%; border-collapse: collapse; margin-left: 12px;
  border-left: 2px solid var(--priline); }
.evpanel th {
  height: 30px; font-size: 11.5px; background: transparent;
  border-bottom: 1px solid var(--line); padding: 0 8px;
}
.evpanel td {
  padding: 6px 8px; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line2);
}
.evpanel th.n, .evpanel td.n { text-align: right; font-variant-numeric: tabular-nums; }
.evpanel .why { margin: 10px 0 0 12px; font-size: 12.5px; color: var(--faint); line-height: 1.45; }
.evpanel .loading { padding: 12px 0; }

.card.record { display: flex; align-items: center; gap: 16px; }
.card.record .recordlead { font-weight: 600; color: var(--inkx); }

@media (max-width: 1120px) {
  .board { flex-direction: column; }
  .card.task { flex: 1 1 auto; width: 100%; }
}

@media (max-width: 720px) {
  .streams { grid-template-columns: 1fr; padding: 0 16px; }
  .crumb { padding: 0 16px 12px; }
  .board { padding: 0 16px; }
  .listwrap { padding: 0 16px; }
  /* The week bar is one row on a wide screen and several on a narrow one; it
     must never be what makes the page scroll sideways. */
  .weekbar { flex-wrap: wrap; height: auto; padding: 12px 16px; row-gap: 10px; }
  .weekbar .rule { display: none; }
  .weekbar .stats { flex-wrap: wrap; gap: 8px 18px; }
  .weekbar .spacer { flex-basis: 100%; }
}

/* =====================================================================
   Order Exceptions (approved design, Figma 1qQY1y191kZ8Ozaep3ED39,
   2026-10-15; database 0072). One week workspace: the week bar, then
   Orders (list | order) or Changes (summary, tables, an order drawer).
   A cool grey ground, white surfaces, 13px text, 30px controls. A changed
   value is tinted with the Axon value beneath it; fill is otherwise kept
   for interaction. Status is an icon with its word, never colour alone.
   ===================================================================== */
:root {
  --oe-bg: #f4f6f9; --oe-surf: #ffffff; --oe-line: #dfe4ea; --oe-line2: #edf0f4;
  --oe-ink: #1d2733; --oe-muted: #66727f; --oe-faint: #98a2ad;
  --oe-navy: #1f4e79; --oe-navybg: #eaf1f8; --oe-blue: #1d5fb4; --oe-chg: #eef4fc;
  --oe-amber: #b45309; --oe-amberbg: #fff6e5; --oe-amberln: #f0b45c;
  --oe-red: #b42318; --oe-redbg: #fdeceb; --oe-green: #2e7d32; --oe-greenbg: #e9f5ea;
}
.ok { color: var(--ok); }
.bad { color: #b83a2e; }
.warn { color: var(--warn); }

/* shared pieces the placeholder and original-rows drawers still use */
.oe2-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(20, 30, 45, .25); display: flex; justify-content: flex-end; }
.oe2-drawer { width: min(860px, 100%); height: 100%; overflow: auto; background: #fff; padding: 14px 18px; font-size: 13px; color: var(--oe-ink); }
.oe2-drawer-head { display: flex; align-items: flex-start; margin-bottom: 12px; }
.oe2-drawer-head .sub { color: var(--oe-muted); font-size: 12px; margin-top: 2px; }
.oe2-drawer-head .spacer { flex: 1; }
.oe2-src { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.oe2-src th, .oe2-src td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--oe-line2); height: auto; background: none; text-transform: none; letter-spacing: 0; color: var(--oe-ink); }
.oe2-src th { color: var(--oe-muted); font-weight: 600; }
.oe2-src td.edit { font-weight: 600; }
.oe2-src td.blank { color: var(--oe-faint); font-style: italic; }
.oe2-src th.num, .oe2-src td.num { text-align: right; font-variant-numeric: tabular-nums; }
.oe2-textbtn { border: 0; background: none; color: var(--oe-navy); cursor: pointer; padding: 4px 6px; font: inherit; font-size: 12.5px; }
.oe2-textbtn:hover { text-decoration: underline; }
.oe2-btn {
  height: 30px; padding: 0 14px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--oe-line); background: var(--oe-surf); color: var(--oe-ink);
}
.oe2-btn.primary { background: var(--oe-navy); border-color: var(--oe-navy); color: #fff; }
.oe2-btn.ghost:hover { border-color: var(--oe-navy); color: var(--oe-navy); }
.oe2-btn[disabled] { opacity: .45; cursor: default; }
.oe2-chev { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; color: var(--oe-navy); }
.oe2-menu {
  position: absolute; z-index: 70; min-width: 260px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 4px; background: #fff; border: 1px solid var(--oe-line);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 45, .16); font-size: 13px;
}
.oe2-opt {
  display: flex; align-items: center; gap: 16px; width: 100%; height: 30px; padding: 0 10px; border: 0; white-space: nowrap;
  background: none; border-radius: 5px; color: var(--oe-ink); cursor: pointer; text-align: left; font: inherit;
}
.oe2-opt:hover, .oe2-opt:focus { background: var(--oe-navybg); outline: none; }
.oe2-opt.on { font-weight: 600; }
.oe2-opt .muted { color: var(--oe-muted); font-size: 12px; }
.oe2-opt .spacer { flex: 1; }

/* ---- primitives ---- */
[class^="oe3"] button, [class*=" oe3"] button { font: inherit; }
/* the global button sets a 36px height, padding and weight; these do not want them */
button.oe3-item, button.oe3-tab, button.oe3-textbtn, button.oe3-x, button.oe3-weekopt.add { height: auto; }
button.oe3-btn.primary:disabled { background: var(--oe-navy); border-color: var(--oe-navy); }
.oe3-orders .spacer, .oe3-weekbar .spacer, .oe3-changes .spacer, .oe3-dialog .spacer, .oe3-ohead .spacer, .oe3-foot .spacer,
.oe3-step .spacer, .oe3-item .spacer, .oe3-weekopt .spacer, .oe3-filerow .spacer, .oe3-ctools .spacer, .oe3-dbox .spacer { flex: 1; }
.oe3-orders .muted, .oe3-weekbar .muted, .oe3-changeswrap .muted, .oe3-dialog .muted, .oe3-upload .muted, .oe3-weekmenu .muted { color: var(--oe-muted); }
.oe3-orders .small, .oe3-changeswrap .small, .oe3-dialog .small, .oe3-upload .small { font-size: 12px; }
.oe3-ic { display: inline-flex; line-height: 0; vertical-align: -2px; }
.oe3-ic.ok { color: var(--oe-green); }
.oe3-ic.warn { color: var(--oe-amber); }
.oe3-ic.big svg { width: 18px; height: 18px; }
.oe3-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.oe3-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--oe-line); background: var(--oe-surf); color: var(--oe-ink); white-space: nowrap;
}
.oe3-btn.primary { background: var(--oe-navy); border-color: var(--oe-navy); color: #fff; }
.oe3-btn.primary:hover:not([disabled]) { background: #183f62; }
.oe3-btn.ghost:hover:not([disabled]) { border-color: var(--oe-navy); color: var(--oe-navy); }
.oe3-btn.small { height: 26px; padding: 0 10px; font-size: 12.5px; }
.oe3-btn[disabled] { opacity: .45; cursor: default; }
.oe3-textbtn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--oe-navy); cursor: pointer; padding: 4px 6px; font-size: 12.5px; white-space: nowrap; }
.oe3-textbtn:hover:not([disabled]) { text-decoration: underline; }
.oe3-textbtn[disabled] { color: var(--oe-faint); cursor: default; }
.oe3-textbtn.light { color: #9cc3ea; font-weight: 600; }
.oe3-iconbtn { width: 26px; height: 26px; border: 1px solid var(--oe-line); border-radius: 6px; background: var(--oe-surf); color: var(--oe-ink); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; }
.oe3-iconbtn[disabled] { opacity: .4; cursor: default; }
.oe3-x { border: 0; background: none; color: var(--oe-muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.oe3-x:hover { color: var(--oe-ink); }
.oe3-badge { display: inline-block; padding: 1px 7px; border-radius: 9px; background: var(--oe-amberbg); color: var(--oe-amber); font-size: 11px; font-weight: 600; white-space: nowrap; }
.oe3-badge.blue { background: var(--oe-navybg); color: var(--oe-blue); margin-left: 8px; }
.oe3-chip { display: inline-block; padding: 2px 9px; border-radius: 10px; background: var(--oe-bg); color: var(--oe-muted); font-size: 11.5px; font-weight: 600; border: 1px solid var(--oe-line); }
.oe3-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.oe3-status.to_do { color: var(--oe-muted); }
.oe3-status.in_progress { color: var(--oe-blue); }
.oe3-status.ready { color: var(--oe-green); }
.oe3-otitle .oe3-status { padding: 2px 9px; border-radius: 10px; background: var(--oe-bg); }
.oe3-otitle .oe3-status.in_progress { background: var(--oe-navybg); }
.oe3-otitle .oe3-status.ready { background: var(--oe-greenbg); }
.oe3-empty { padding: 16px 14px; margin: 0; color: var(--oe-muted); font-size: 13px; }
.oe3-search { flex: 1; min-width: 0; height: 30px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--oe-ink); padding: 0; margin: 0; }
.oe3-search:focus { outline: none; }
.oe3-searchbox { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--oe-line); border-radius: 6px; background: var(--oe-surf); color: var(--oe-muted); margin: 0; font-weight: 400; }
.oe3-searchbox:focus-within { border-color: var(--oe-navy); }
.oe3-searchbox.narrow { width: 220px; flex: none; }
.oe3-seg { display: inline-flex; gap: 2px; padding: 2px; background: var(--oe-bg); border-radius: 7px; }
.oe3-segbtn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 5px; background: none; color: var(--oe-muted); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.oe3-segbtn.on { background: var(--oe-surf); color: var(--oe-ink); box-shadow: 0 1px 2px rgba(20, 30, 45, .12); }

/* ---- the week bar ---- */
.oe3-weekbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 24px; background: var(--oe-surf); border-bottom: 1px solid var(--oe-line);
  font-size: 13px; color: var(--oe-ink); min-height: 52px; flex-wrap: wrap; row-gap: 8px;
}
.oe3-weekpick { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px 0 10px; border: 1px solid var(--oe-line); border-radius: 6px; background: var(--oe-surf); color: var(--oe-ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.oe3-weekpick:hover { border-color: var(--oe-navy); }
.oe3-weekmenu { position: absolute; z-index: 70; min-width: 420px; max-width: calc(100vw - 16px); padding: 4px; background: #fff; border: 1px solid var(--oe-line); border-radius: 8px; box-shadow: 0 8px 24px rgba(20, 30, 45, .16); font-size: 13px; }
.oe3-weekopt { display: flex; align-items: center; gap: 8px; font-weight: 400; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 5px; background: none; color: var(--oe-ink); cursor: pointer; text-align: left; white-space: nowrap; }
.oe3-weekopt:hover { background: var(--oe-navybg); }
.oe3-weekopt.on .wk { font-weight: 600; }
.oe3-weekopt .tick { width: 14px; color: var(--oe-navy); }
.oe3-weekopt .st { color: var(--oe-muted); font-size: 12px; }
.oe3-weekopt.add { border-top: 1px solid var(--oe-line2); border-radius: 0 0 5px 5px; color: var(--oe-navy); font-weight: 600; margin-top: 2px; }
.oe3-tabs { display: flex; gap: 4px; align-self: stretch; margin: -10px 0; }
.oe3-tab { border: 0; border-bottom: 2px solid transparent; background: none; padding: 0 12px; color: var(--oe-muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.oe3-tab:hover { color: var(--oe-ink); }
.oe3-tab.on { color: var(--oe-navy); border-bottom-color: var(--oe-navy); }
.oe3-weekstate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.oe3-progress { display: inline-block; width: 96px; height: 6px; border-radius: 3px; background: var(--oe-line2); overflow: hidden; }
.oe3-progress > span { display: block; height: 100%; background: var(--oe-green); }
.oe3-done { display: inline-flex; align-items: center; gap: 6px; color: var(--oe-ink); }

/* ---- Orders: the list and the order ---- */
.oe3-orders { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 156px); min-height: 520px; background: var(--oe-bg); color: var(--oe-ink); font-size: 13px; }
.oe3-list { display: flex; flex-direction: column; min-height: 0; background: var(--oe-surf); border-right: 1px solid var(--oe-line); }
.oe3-list-head { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-bottom: 1px solid var(--oe-line2); }
.oe3-list-head .oe3-seg { align-self: flex-start; }
.oe3-list-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.oe3-list-foot { padding: 6px 8px; border-top: 1px solid var(--oe-line2); }
.oe3-group { display: flex; justify-content: space-between; padding: 12px 14px 4px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--oe-muted); }
.oe3-item { display: block; width: 100%; font-weight: 400; padding: 8px 14px; border: 0; border-left: 3px solid transparent; background: none; text-align: left; cursor: pointer; color: var(--oe-ink); }
.oe3-item:hover { background: var(--oe-bg); }
.oe3-item.sel { background: var(--oe-navybg); border-left-color: var(--oe-navy); }
.oe3-item .l1 { display: flex; align-items: center; gap: 8px; }
.oe3-item .l2 { display: flex; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--oe-muted); white-space: nowrap; overflow: hidden; }
.oe3-item .l2 .kind { flex: none; }
.oe3-item .l2 .cust { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.oe3-item .l2 .cust::before { content: '\00b7'; margin-right: 6px; }
.num-order { font-variant-numeric: tabular-nums; font-weight: 600; }

.oe3-detail { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.oe3-detail.empty { align-items: center; justify-content: center; }
.oe3-allready { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.oe3-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px 20px; }
.oe3-ohead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oe3-otitle { display: flex; align-items: center; gap: 10px; }
.oe3-otitle h2 { margin: 0; font-size: 18px; color: var(--oe-ink); font-variant-numeric: tabular-nums; }
.oe3-pager { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; font-size: 12px; }
.oe3-oline { margin-top: 4px; color: var(--oe-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oe3-facts { display: flex; gap: 20px; margin: 6px 0 4px; font-size: 12.5px; flex-wrap: wrap; }
.oe3-facts b { font-variant-numeric: tabular-nums; }
.oe3-step { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px; flex-wrap: wrap; }
.oe3-step strong { font-size: 14px; }
.oe3-step .muted { font-size: 12.5px; }
.oe3-step.waiting strong { color: var(--oe-muted); }
.oe3-stepno { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--oe-line); color: var(--oe-muted); font-size: 11.5px; font-weight: 700; }
.oe3-stepno.on { background: var(--oe-navy); color: #fff; }

.oe3-gridwrap { background: var(--oe-surf); border: 1px solid var(--oe-line); border-radius: 8px; overflow-x: auto; }
.oe3-grid { width: 100%; border-collapse: collapse; min-width: 880px; font-size: 13px; }
.oe3-grid th { height: auto; padding: 8px 10px; background: #fafbfc; border-bottom: 1px solid var(--oe-line); text-align: left; font-size: 11.5px; font-weight: 600; color: var(--oe-muted); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.oe3-grid th.num, .oe3-grid td.num { text-align: right; }
.oe3-grid td { padding: 6px 10px; border-bottom: 1px solid var(--oe-line2); vertical-align: top; font-variant-numeric: tabular-nums; color: var(--oe-ink); }
.oe3-grid td.tractor { min-width: 170px; max-width: 240px; }
.oe3-grid .tn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oe3-grid .tsub { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11.5px; flex-wrap: wrap; }
.oe3-grid tr.duprow td.tractor { box-shadow: inset 3px 0 0 var(--oe-amberln); }
.oe3-grid td.chg { background: var(--oe-chg); }
.oe3-grid td.chg .oe3-in, .oe3-grid td.chg .oe3-val { color: var(--oe-blue); font-weight: 600; }
.oe3-grid td.dup { background: var(--oe-amberbg); }
.oe3-grid td.pay { white-space: nowrap; color: var(--oe-muted); padding-top: 11px; }
.oe3-grid td.pay.over { color: var(--oe-amber); font-weight: 600; }
.oe3-grid tfoot td { background: #fafbfc; padding: 7px 10px; border-bottom: 0; font-size: 12.5px; }
.oe3-grid tfoot tr.alloc td { border-top: 1px solid var(--oe-line); font-weight: 600; }
.oe3-grid tfoot tr.alloc td .ok, .oe3-grid tfoot tr.alloc td .warn { font-size: 11.5px; font-weight: 600; margin-top: 1px; }
.oe3-grid tfoot tr.alloc td .ok { color: var(--oe-green); }
.oe3-grid tfoot tr.alloc td .warn { color: var(--oe-amber); }
.oe3-grid tfoot td.off { background: var(--oe-amberbg); }
.oe3-grid tfoot tr.exp td .muted, .oe3-grid tfoot tr.ax td { font-size: 11.5px; }
.oe3-grid tfoot tr.ax td { color: var(--oe-muted); }
.oe3-in, .oe3-val, .oe3-pick { box-sizing: border-box; width: 100%; min-width: 84px; height: 30px; margin: 0; padding: 0 8px; border: 1px solid var(--oe-line); border-radius: 5px; background: var(--oe-surf); color: var(--oe-ink); font: inherit; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.oe3-in:hover { border-color: #c5ced8; }
.oe3-in:focus { outline: none; border-color: var(--oe-navy); box-shadow: 0 0 0 2px var(--oe-navybg); }
.oe3-in.bad { border-color: var(--oe-red); background: var(--oe-redbg); }
.oe3-val { border-color: transparent; background: none; line-height: 28px; }
.oe3-pick { display: flex; align-items: center; justify-content: flex-end; gap: 2px; padding-right: 2px; cursor: pointer; border-color: var(--oe-amberln); background: var(--oe-amberbg); }
.oe3-pick:hover, .oe3-pick:focus { outline: none; border-color: var(--oe-amber); }
.oe3-inwrap { position: relative; }
.oe3-inwrap.has-caret .oe3-in { padding-right: 26px; }
.oe3-caret { position: absolute; top: 4px; right: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.oe3-caret:hover, .oe3-caret:focus { background: var(--oe-navybg); outline: none; }
.oe3-axon { margin-top: 2px; font-size: 11px; color: var(--oe-muted); white-space: nowrap; }
.oe3-mini { height: 22px; padding: 0 8px; border: 1px solid var(--oe-amberln); border-radius: 5px; background: var(--oe-surf); color: var(--oe-amber); font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.oe3-mini:hover { background: var(--oe-amberbg); }
.oe3-info { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--oe-muted); }

.oe3-checkwrap { margin-top: 4px; }
.oe3-checks { display: flex; flex-direction: column; gap: 6px; }
.oe3-ok, .oe3-bad { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.oe3-bad { color: var(--oe-amber); font-weight: 600; }
.oe3-callout { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--oe-amberln); border-radius: 8px; background: var(--oe-amberbg); }
.oe3-callout .txt { flex: 1 1 280px; min-width: 0; }
.oe3-callout .txt .muted { font-size: 12px; margin-top: 2px; }
.oe3-callout .acts { display: flex; gap: 8px; }
.oe3-keep { display: flex; align-items: center; gap: 8px; flex: 1 1 100%; }
.oe3-reasonin { flex: 1; min-width: 200px; height: 30px; margin: 0; padding: 0 8px; border: 1px solid var(--oe-line); border-radius: 5px; font: inherit; font-size: 13px; background: #fff; }
.oe3-reasonin:focus { outline: none; border-color: var(--oe-navy); }
.oe3-err:empty { display: none; }
.oe3-err .banner { margin: 10px 0 0; font-size: 13px; }

.oe3-foot { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 24px; background: var(--oe-surf); border-top: 1px solid var(--oe-line); flex-wrap: wrap; }
.oe3-foot .left, .oe3-foot .right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.oe3-foot.ro { margin-top: 16px; border: 1px solid var(--oe-line); border-radius: 8px; }
/* The workspace's primary actions sit under the table, not in a bottom bar. */
.oe3-foot.inline { margin-top: 14px; padding: 12px 0 0; min-height: 0; background: none; border-top: 1px solid var(--oe-line); }
.oe3-item.one { padding-top: 9px; padding-bottom: 9px; }
.oe3-dotline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--oe-blue); }
.oe3-dotline::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.oe3-dotline.warn { color: var(--oe-amber); }
.oe3-why { font-size: 12px; color: var(--oe-amber); }

/* ---- history ---- */
.oe3-history { display: flex; flex-direction: column; font-size: 12.5px; }
.oe3-history .row { display: grid; grid-template-columns: 120px 110px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--oe-line2); }
.oe3-history .when { color: var(--oe-muted); font-variant-numeric: tabular-nums; }
.oe3-history .who { font-weight: 600; }

/* ---- dialogs and toasts ---- */
.oe3-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(20, 30, 45, .3); }
.oe3-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; border-radius: 10px; background: #fff; color: var(--oe-ink); font-size: 13px; box-shadow: 0 12px 32px rgba(20, 30, 45, .22); }
.oe3-dialog-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px 6px; }
.oe3-dialog-head strong { font-size: 15px; }
.oe3-dialog-body { padding: 4px 20px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.oe3-dialog-body p { margin: 0; }
.oe3-dialog-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--oe-line2); }
.oe3-changelist { margin: 0; padding-left: 18px; color: var(--oe-ink); }
.oe3-changelist li { margin: 2px 0; }
.oe3-mini-table, .oe3-approve, .oe3-review { width: 100%; border-collapse: collapse; font-size: 13px; }
.oe3-mini-table th, .oe3-mini-table td, .oe3-approve td, .oe3-review td { height: auto; padding: 6px 4px; border-bottom: 1px solid var(--oe-line2); background: none; text-align: left; text-transform: none; letter-spacing: 0; color: var(--oe-ink); font-weight: 400; vertical-align: top; }
.oe3-mini-table th { color: var(--oe-muted); font-size: 11.5px; font-weight: 600; }
.oe3-mini-table .num, .oe3-approve .num, .oe3-review .num { text-align: right; font-variant-numeric: tabular-nums; }
.oe3-mini-table td.warn { color: var(--oe-amber); font-weight: 600; }
.oe3-mini-table td .muted { font-size: 11.5px; }
.oe3-approve td.muted { color: var(--oe-muted); }
.oe3-review tr.total td { font-weight: 600; border-bottom: 0; }
.oe3-warnbox { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 6px; background: var(--oe-amberbg); color: #6e3a06; }
.oe3-reasonlbl { display: flex; flex-direction: column; gap: 4px; margin: 0; font-weight: 600; }
.oe3-reason { width: 100%; box-sizing: border-box; margin: 0; padding: 6px 8px; border: 1px solid var(--oe-line); border-radius: 6px; font: inherit; font-size: 13px; font-weight: 400; resize: vertical; }
.oe3-reason:focus { outline: none; border-color: var(--oe-navy); }
.oe3-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 9px 14px; border-radius: 8px; background: var(--oe-ink); color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgba(20, 30, 45, .25); }
.oe3-toast .oe3-ic.ok { color: #7fd38a; }
.oe3-toast.bad { background: #7a1d14; }

/* ---- Changes ---- */
.oe3-changeswrap { position: relative; min-height: calc(100vh - 156px); background: var(--oe-bg); color: var(--oe-ink); font-size: 13px; }
.oe3-changes { padding: 18px 24px 24px; }
.oe3-chead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.oe3-chead h2 { margin: 0; font-size: 18px; }
.oe3-sumtable, .oe3-ctable { width: 100%; border-collapse: collapse; background: var(--oe-surf); font-size: 13px; }
.oe3-sumtable { border: 1px solid var(--oe-line); }
.oe3-sumtable th, .oe3-ctable th { height: auto; padding: 8px 10px; background: #fafbfc; border-bottom: 1px solid var(--oe-line); text-align: left; font-size: 11.5px; font-weight: 600; color: var(--oe-muted); text-transform: none; letter-spacing: 0; white-space: nowrap; }
.oe3-sumtable td, .oe3-ctable td { padding: 8px 10px; border-bottom: 1px solid var(--oe-line2); color: var(--oe-ink); vertical-align: top; }
.oe3-sumtable .num, .oe3-ctable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oe3-sumtable th.num, .oe3-ctable th.num { text-align: right; }
.oe3-sumtable tr.total td { font-weight: 600; border-bottom: 0; background: #fafbfc; }
.oe3-ctools { display: flex; align-items: center; gap: 12px; margin: 20px 0 10px; flex-wrap: wrap; }
.oe3-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; font-size: 12.5px; color: var(--oe-muted); cursor: pointer; }
.oe3-toggle input { width: auto; margin: 0; }
.oe3-cwrap { border: 1px solid var(--oe-line); border-radius: 8px; overflow-x: auto; background: var(--oe-surf); }
.oe3-ctable { min-width: 900px; }
.oe3-ctable tr.pick { cursor: pointer; }
.oe3-ctable tr.pick:hover td { background: var(--oe-navybg); }
.oe3-ctable td .muted { font-size: 11.5px; }
.oe3-ctable td .warn { color: var(--oe-amber); font-size: 11.5px; }
.oe3-ctable td.strong { font-weight: 600; color: var(--oe-blue); }
.oe3-shade { position: fixed; inset: 0; z-index: 30; background: rgba(20, 30, 45, .18); }
.oe3-cdrawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 35; width: min(960px, 100%); display: flex; flex-direction: column; background: var(--oe-bg); box-shadow: -8px 0 28px rgba(20, 30, 45, .18); }
.oe3-cdrawer > .oe3-pager { justify-content: flex-end; margin: 0; padding: 10px 16px 0; }
.oe3-cdrawer .oe3-detail { flex: 1; }
.oe3-decision { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.oe3-decision > strong { font-size: 14px; }
.oe3-dbox { padding: 10px 12px; border: 1px solid var(--oe-amberln); border-radius: 8px; background: var(--oe-amberbg); }
.oe3-dbox .l1 { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.oe3-dbox .quote { margin: 4px 0 2px; }
.oe3-dbox .muted, .oe3-dbox .warn { font-size: 12px; }

/* ---- upload ---- */
.oe3-upload { max-width: 720px; margin: 24px auto; padding: 24px; background: var(--oe-surf); border: 1px solid var(--oe-line); border-radius: 10px; color: var(--oe-ink); font-size: 13px; }
.oe3-upload h2 { margin: 0 0 4px; font-size: 18px; }
.oe3-upload h3 { margin: 18px 0 6px; font-size: 14px; }
.oe3-upload p { margin: 4px 0; }
.oe3-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 16px 0 10px; padding: 32px 16px; border: 1.5px dashed #b9c4d0; border-radius: 10px; background: var(--oe-bg); color: var(--oe-ink); cursor: pointer; font-weight: 400; text-align: center; }
.oe3-drop:hover, .oe3-drop.over { border-color: var(--oe-navy); background: var(--oe-navybg); }
.oe3-filerow { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; padding: 8px 10px; border: 1px solid var(--oe-line); border-radius: 6px; flex-wrap: wrap; }
.oe3-upload .oe3-checks { margin-top: 4px; }
.oe3-uploadbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 900px) {
  .oe3-weekbar { padding: 10px 16px; }
  .oe3-orders { grid-template-columns: 1fr; height: auto; }
  .oe3-list { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--oe-line); }
  .oe3-scroll { padding: 12px 16px; }
  .oe3-foot { padding: 10px 16px; }
  .oe3-changes { padding: 14px 16px; }
  .oe3-searchbox.narrow { width: 100%; }
  .oe3-weekmenu { min-width: 0; right: 8px; }
  .oe3-history .row { grid-template-columns: 1fr; gap: 2px; }
}

/* allocation placeholders (administrators): a compact list, a detail view per
   record, and a collapsed add form below a rule */
.oe2-ph { display: flex; flex-direction: column; gap: 14px; }
.oe2-ph .muted { color: #66727f; font-size: 12px; margin: 0; }
.oe2-phlist td { vertical-align: middle; white-space: nowrap; }
.oe2-phlist td.name { font-weight: 600; }
.oe2-phlist tr.pick { cursor: pointer; }
.oe2-phlist tr.pick:hover td { background: #f4f6f9; }
.oe2-phlist tr.gone td, .oe2-phlist tr.gone td.name { color: #98a2ad; }
.oe2-phlist td.acts { text-align: right; }
.oe2-ph .back { align-self: flex-start; padding-left: 0; }
.oe2-phhead { display: flex; align-items: baseline; gap: 10px; }
.oe2-phhead h3 { margin: 0; font-size: 15px; }
.oe2-phdetail th { width: 130px; vertical-align: top; }
.oe2-phdetail td { white-space: normal; }
.oe2-ph > .oe2-phbtns { padding-left: 0; }
.oe2-phadd { border-top: 1px solid #dfe4ea; padding-top: 14px; }
.oe2-phform { display: flex; flex-direction: column; gap: 8px; }
.oe2-phform h3 { margin: 0 0 2px; font-size: 13px; }
.oe2-phform label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font-weight: 400; }
.oe2-phform label > span:first-child { width: 170px; color: #66727f; }
.oe2-phform input { height: 30px; padding: 0 8px; border: 1px solid #dfe4ea; border-radius: 6px; font: inherit; margin: 0; box-sizing: border-box; }
.oe2-phform input[type=text] { flex: 1; min-width: 200px; max-width: 420px; }
.oe2-phform input[type=date] { width: auto; }
.oe2-phform input:focus { outline: none; border-color: #1f4e79; }
.oe2-phbtns { display: flex; gap: 8px; padding-left: 180px; }
.oe2-phform .banner { margin: 4px 0 0; font-size: 13px; }
.oe2-charges { display: flex; flex-direction: column; gap: 22px; }
.oe2-charge h3 { margin: 0 0 6px; font-size: 14px; }
.oe2-charge table { max-width: 420px; margin-bottom: 10px; }
.oe2-charge tr.sum td { font-weight: 600; }
.oe2-charge td.bad { color: #b42318; }
.oe2-chacts { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.oe2-chact {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 12px; text-align: left; font: inherit;
  border: 1px solid #dfe4ea; border-radius: 6px; background: #fff; color: #1d2733; cursor: pointer;
}
.oe2-chact > span:first-child { font-weight: 600; }
.oe2-chact .muted { color: #66727f; font-size: 12px; }
.oe2-chact:hover, .oe2-chact:focus { border-color: #1f4e79; background: #eaf1f8; outline: none; }
@media (max-width: 700px) {
  .oe2-phform label > span:first-child { width: 100%; }
  .oe2-phbtns { padding-left: 0; }
}

/* ---- Order Exceptions: refreshing the week's Axon report (0075) ---- */
.oe3-ic.bad { color: var(--oe-red); }
.oe3-status.conflict { color: var(--oe-red); }
.oe3-otitle .oe3-status.conflict { background: var(--oe-redbg); }
.oe3-callout.conflict { border-color: #e7a19b; background: var(--oe-redbg); }
.oe3-resume { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--oe-red); font-weight: 600; }
.oe3-resume .oe3-textbtn { font-weight: 600; }
.rf-refresh .rf-counts { max-width: 720px; margin: 12px 0; }
.rf-refresh .oe3-checks { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.rf-refresh .rf-reason { width: 100%; max-width: 560px; height: 34px; }
.rf-wrap { padding: 16px; max-width: 1180px; margin: 0 auto; box-sizing: border-box; }
.rf-window { background: var(--oe-surf); border: 1px solid var(--oe-line); border-radius: 10px; padding: 14px 16px 16px; color: var(--oe-ink); }
.rf-window .muted { color: var(--oe-muted); }
.rf-kicker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; }
.rf-kicker .spacer { flex: 1; }
.rf-changed { margin: 2px 0 6px; font-size: 12.5px; }
.rf-window .rf-prev td { color: var(--oe-muted); }
.rf-window .rf-prev td .oe3-val { color: var(--oe-ink); }
.rf-opts { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.rf-window .oe3-checks { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rf-window .oe3-foot.inline { margin-top: 12px; }
.rf-done { text-align: center; padding: 32px 16px; }
.oe3-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.rf-done .oe3-actions { justify-content: center; }
.rf-revisions { margin-top: 24px; }
.rf-revisions .oe3-callout { margin-top: 10px; }
