/* 30 Oct 2026, main chat: brought into the shared copy from what was deployed on
   Development, with every corner square as Shubh asked ("all of the edges ... sharp and not rounded"): --r and --r-sm are 0
   and the 29 border-radius rules below say 0. Colours, type, spacing, borders and shadows are unchanged. */
/* OrderHub visual polish (30 Oct 2026). Loaded last on every page. Looks only: colours, type, spacing, corners, borders,
   shadows and hover / focus feedback. No element, text, order or behaviour changes; every rule restyles an existing class.
   styles.css squares every corner with "* { border-radius: 0 !important }", so corners set here carry !important too. */

/* ---- 1. Tokens: softer neutrals and borders, the same navy brand, one UI font everywhere ------------------------------ */
:root {
  --bg: #f3f4f7; --ink: #181b26; --muted: #5d6273; --panel: #ffffff; --line: #d6d9e1; --line-soft: #e7e9ef;
  --accent: #1f2340; --accent-ink: #ffffff; --ok: #1d7044; --bad: #b3261e;
  --side: #1f2340; --side-ink: #eef0f7; --side-muted: #a3a9c6;
  --mono: "Segoe UI", "Segoe UI Variable Text", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --code: Consolas, "Cascadia Mono", "Courier New", monospace;
  --hover: #f5f6f9; --sel: #e7e9f4; --head: #f8f9fb; --ring: rgba(31, 35, 64, .18);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
  --r: 0; --r-sm: 0;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1117; --ink: #e6e8ef; --muted: #9da3b5; --panel: #171a22; --line: #2f3442; --line-soft: #252935;
  --accent: #c5cbf3; --accent-ink: #121420; --ok: #7fd19a; --bad: #f0938b; --side: #0b0d14; --side-ink: #e6e8f2; --side-muted: #8d93ae;
  --hover: #1e222c; --sel: #262b3d; --head: #1b1e27; --ring: rgba(197, 203, 243, .28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow: 0 1px 3px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5); } }
:root[data-theme="dark"] {
  --bg: #0f1117; --ink: #e6e8ef; --muted: #9da3b5; --panel: #171a22; --line: #2f3442; --line-soft: #252935;
  --accent: #c5cbf3; --accent-ink: #121420; --ok: #7fd19a; --bad: #f0938b; --side: #0b0d14; --side-ink: #e6e8f2; --side-muted: #8d93ae;
  --hover: #1e222c; --sel: #262b3d; --head: #1b1e27; --ring: rgba(197, 203, 243, .28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --shadow: 0 1px 3px rgba(0, 0, 0, .4); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5); }

/* ---- 2. Type ---------------------------------------------------------------------------------------------------------- */
body { font-family: var(--mono); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
code, pre, kbd, .dk-awb textarea, .inv-paste-card textarea { font-family: var(--code); }
.panel-head h1 { font-size: 1.55rem; font-weight: 700; text-transform: none; letter-spacing: -.01em; margin-bottom: .25rem; }
.panel-head p { line-height: 1.55; }
h2 { font-weight: 700; font-size: .74rem; letter-spacing: .07em; }
.muted { color: var(--muted); }
code { border-radius: 0 !important; }

/* ---- 3. Sidebar ------------------------------------------------------------------------------------------------------- */
.side { border-right: 0; box-shadow: 1px 0 0 rgba(0, 0, 0, .12); }
.brand { border-bottom-color: rgba(255, 255, 255, .12); }
.nav { gap: 3px; }
.nav-item { border: 0; border-radius: 0 !important; padding: 7px 9px; font-weight: 600; color: var(--side-ink); opacity: .9; transition: background .15s, opacity .15s; }
.nav-item:hover { background: rgba(255, 255, 255, .08); opacity: 1; }
.nav-item.is-active { background: rgba(255, 255, 255, .16); color: #fff; opacity: 1; box-shadow: inset 3px 0 0 #fff; }
.nav-sep { background: rgba(255, 255, 255, .14); opacity: 1; }
.qs-open { border-radius: 0 !important; border-color: rgba(255, 255, 255, .22); text-transform: none; letter-spacing: .01em; font-weight: 600; font-size: .82rem; transition: background .15s, border-color .15s; }
.qs-open:hover, .qs-open:focus-visible { background: rgba(255, 255, 255, .1); color: var(--side-ink); border-color: rgba(255, 255, 255, .4); }
.theme-toggle { border-radius: 0 !important; border-color: rgba(255, 255, 255, .25); padding: 4px 9px; letter-spacing: .04em; }
.theme-toggle:hover, .theme-toggle:focus-visible { background: rgba(255, 255, 255, .12); color: var(--side-ink); border-color: rgba(255, 255, 255, .45); }
.turbo-back { letter-spacing: .06em; }

/* ---- 4. Buttons ------------------------------------------------------------------------------------------------------- */
button { border-width: 1px; border-radius: 0 !important; font: 600 .84rem var(--mono); text-transform: none; letter-spacing: .01em; padding: .55rem 1.05rem;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s, box-shadow .15s, filter .15s; }
button:hover { background: color-mix(in srgb, var(--ink) 86%, var(--panel)); color: var(--panel); }
button:disabled:hover { background: var(--ink); color: var(--panel); }
button.secondary { background: var(--panel); color: var(--ink); border-color: var(--line); }
button.secondary:hover { background: var(--hover); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
button.secondary:disabled:hover { background: var(--panel); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.primary:hover { background: var(--accent); color: var(--accent-ink); filter: brightness(1.18); }
button.primary:disabled:hover { filter: none; }
button.small { padding: .34rem .75rem; font-size: .76rem; }
button.danger { background: var(--panel); }
button.danger:hover { background: color-mix(in srgb, var(--bad) 8%, var(--panel)); color: var(--bad); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
a.button-link { border-width: 1px; border-color: var(--line); border-radius: 0 !important; font: 600 .84rem var(--mono); text-transform: none; letter-spacing: .01em; box-shadow: var(--shadow-sm); }
/* The stock check's Upload filled pick list (7 Nov 2026): a label over its file input, dressed as the small secondary buttons beside it */
.sc-file { border-width: 1px; border-color: var(--line); font: 600 .76rem var(--mono); text-transform: none; letter-spacing: .01em; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.sc-file:hover { background: var(--hover); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); }
.sc-file:has(:focus-visible) { outline: none; box-shadow: 0 0 0 3px var(--ring); }
/* Buttons that are tiles or tabs inside a framed box keep square inner corners (the frame rounds them) and no shadow */
:is(.flow, .cards, .travel, .pm-stats, .journey, .bottom-bar) button, .subtab, .dk-modes button, .cm-tabs button, .linkish, .toast-x, .act-x, .toast-go, .staged li .rm { box-shadow: none; }
:is(.flow, .cards, .travel, .pm-stats, .bottom-bar) button, .subtab { border-radius: 0 !important; }
.linkish { font-weight: 600; letter-spacing: .05em; border-bottom-color: color-mix(in srgb, var(--ink) 25%, transparent); transition: border-color .15s; }

/* ---- 5. Inputs -------------------------------------------------------------------------------------------------------- */
:where(input:not([type=checkbox]):not([type=radio]):not(.qs-input), select, textarea) { border-radius: 0 !important; transition: border-color .15s, box-shadow .15s; }
:where(input[type=date], input[type=number], input[type=text], input[type=search], select, textarea):hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
:where(input[type=date], input[type=number], input[type=text], input[type=search], input[type=file], select, textarea):focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.upload-inline { border-width: 1px; border-color: var(--line); border-radius: 0 !important; margin: 0; background: var(--panel); letter-spacing: .04em; }
.upload-inline input { box-shadow: none !important; }
.steps .step-actions, .run-actions { gap: 6px; }
.steps .step-actions button { margin: 0; }
.qs-input { border-bottom-width: 1px; border-bottom-color: var(--line); }
.qs-input:focus-visible { box-shadow: inset 0 -2px 0 var(--accent); }

/* ---- 6. Framed boxes: one 1px border, rounded corners, a soft shadow ---------------------------------------------------- */
:is(.card, .cards, .tiles, .tiles-check, .steps, .format-grid, .outputs, .journey, .checks, .issued, .q-filters, .m-card, .rc-card, .cc-col,
    .table-wrap, .flow, .reasons, .staged, .travel, .rc, .st-block, .flow-nav, .tabulator, .turbo-tile, .turbo-stats, .confirm, .test-ribbon, .drop, .kind-card) {
  border-width: 1px; border-radius: 0 !important;
}
:is(.card, .cards, .tiles, .steps, .format-grid, .outputs, .journey, .checks, .issued, .q-filters, .m-card, .rc-card, .table-wrap, .flow, .reasons, .travel, .rc, .st-block, .flow-nav, .tabulator, .turbo-tile) {
  border-color: var(--line); box-shadow: var(--shadow);
}
:is(.cards, .tiles, .steps, .format-grid, .outputs, .journey, .checks, .issued, .flow, .reasons, .staged, .travel, .rc, .turbo-stats) { overflow: hidden; }
.card, .st-block, .m-card, .rc-card { padding: 1.05rem 1.2rem; }
.cc-col { background: var(--hover); }
.drop { border-width: 2px; border-color: var(--line); background: var(--hover); }
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent); background: var(--sel); }
.kind-card { border-color: var(--line); transition: border-color .15s, background .15s; }
.kind-card:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.kind-card:has(input:checked) { border-color: var(--accent); background: var(--sel); }
.confirm { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 6%, var(--panel)); }
.test-ribbon { border-color: var(--accent); }

/* Number cards and stage strips: tidy spacing, the label in quiet type, the number bold */
.cards div, .cards button { padding: 12px 16px; }
.cards b { font-weight: 700; }
.cards span { letter-spacing: .06em; }
.flow button { padding: 13px 14px; }
.flow .flow-label { letter-spacing: .07em; }
.flow b { font-weight: 700; }
.flow li.side-state button { background: var(--hover); }
.flow > li.flow-foot { background: var(--head); }

/* Lists in boxes */
.reasons li, .staged li { padding: 8px 12px; }
.reasons-more > details > summary { letter-spacing: .06em; }

/* ---- 7. Tables -------------------------------------------------------------------------------------------------------- */
table { font-size: .87rem; }
th { font-weight: 700; font-size: .68rem; letter-spacing: .06em; background: var(--head); border-bottom: 1px solid var(--line); padding: .6rem .65rem; }
td { padding: .55rem .65rem; border-bottom-color: var(--line-soft); }
.table-wrap { padding: 0; }
table.data tbody tr:hover td { background: var(--hover); }
table.data tbody tr:has(td input[type="checkbox"]:checked) td { background: var(--sel); color: var(--ink); }
.tabulator .tabulator-header { background: var(--head); border-bottom: 1px solid var(--line); }
.tabulator .tabulator-header .tabulator-col { background: var(--head); }
.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 8px 10px; }
.tabulator .tabulator-header .tabulator-col .tabulator-col-title { font-weight: 700; font-size: .66rem; letter-spacing: .05em; }
.tabulator .tabulator-header .tabulator-header-filter input { border-radius: 0 !important; }
.tabulator .tabulator-row .tabulator-cell { padding: 6px 10px; border-right-color: var(--line-soft); }
.tabulator .tabulator-row.tabulator-selectable:hover, .tabulator .tabulator-row:hover { background: var(--hover); }
.tabulator .tabulator-row.tabulator-selected, .tabulator .tabulator-row.tabulator-selected:hover { background: var(--sel); color: var(--ink); }
.tabulator .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left { border-right: 1px solid var(--line); }
.tabulator .tabulator-row .tabulator-responsive-collapse-toggle { border-radius: 0 !important; }
.tabulator .tabulator-row.tabulator-selected .tabulator-responsive-collapse-toggle { background: var(--accent); color: var(--accent-ink); }
.tg-cols { border-width: 1px; border-radius: 0 !important; box-shadow: var(--shadow-lg); }

/* ---- 8. Chips, pills, tabs -------------------------------------------------------------------------------------------- */
.chips, .choice, .dk-modes { gap: 6px; }
.chip { margin-right: 0; border-color: var(--line); border-radius: 0 !important; padding: 5px 12px; font-weight: 600; font-size: .74rem; letter-spacing: .03em; transition: background .15s, border-color .15s; }
.chip:hover { background: var(--hover); border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.choice span { margin-right: 0; border-color: var(--line); border-radius: 0 !important; transition: background .15s, border-color .15s; }
.choice span:hover { background: var(--hover); }
.choice input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill { border-radius: 0 !important; padding: 2px 9px; letter-spacing: .06em; }
.subtabs { border-bottom: 1px solid var(--line); }
.subtab { border-bottom-width: 2px; margin-bottom: -1px; letter-spacing: .05em; transition: color .15s, border-color .15s; }
.subtab[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.dk-modes button { margin-right: 0; border-color: var(--line); background: var(--panel); color: var(--ink); }
.dk-modes button:hover { background: var(--hover); color: var(--ink); }
.dk-modes button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.nav-no, .rc-step h3 i, .dept-no, .rc-rank { border-radius: 0 !important; }
.switch-track { border-width: 1px; border-radius: 0 !important; }
.switch-track::after { border-radius: 0 !important; }
.progress, .act-bar { border-radius: 0 !important; }
.progress i, .act-bar i { border-radius: 0 !important; }

/* ---- 9. Hover and selection: a soft tint instead of the solid black flip ------------------------------------------------ */
:is(.tile, .flow li button, .cards button, .cm-open, .turbo-links a, .travel li button, a.button-link):is(:hover, :focus-visible) {
  background: var(--sel) !important; color: var(--ink) !important;
}
.flow li.on button { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.pm-stats button.on { background: var(--accent); color: var(--accent-ink); }
.qs-item.on, .qs-item:hover { background: var(--sel); color: var(--ink); }
.tile { transition: background .15s; }

/* ---- 10. Messages, pop-ups, dialogs ------------------------------------------------------------------------------------- */
.banner { border-color: var(--line); border-left-width: 4px; border-radius: 0 !important; box-shadow: var(--shadow-sm); }
.toast { border-color: var(--line); border-left-width: 4px; border-radius: 0 !important; box-shadow: var(--shadow-lg); }
.toast-go { border-radius: 0 !important; }
.act { border-width: 1px; border-color: var(--line); border-left-width: 4px; border-radius: 0 !important; box-shadow: var(--shadow-lg); }
.update-bar { box-shadow: var(--shadow); }
:is(.qs-dialog, .cm-dialog, .ln-dialog, dialog) { border: 1px solid var(--line); border-radius: 0 !important; box-shadow: var(--shadow-lg); }
.qs-dialog::backdrop, .cm-dialog::backdrop { background: rgba(10, 12, 24, .45); }

/* ---- 11. Turbo home ----------------------------------------------------------------------------------------------------- */
.turbo-top { border-bottom: 0; box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.turbo-tile:hover, .turbo-tile:focus-within { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.turbo-icon { border-radius: 0 !important; }
.turbo-links a { border-radius: 0 !important; border-color: var(--line); padding: 5px 11px; }
.turbo-stats { border-color: var(--line-soft); }

/* ---- 12. Phone ---------------------------------------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .side { box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
  .bottom-bar { box-shadow: 0 -4px 16px rgba(16, 24, 40, .1); }
}
@media (prefers-reduced-motion: reduce) {
  button, .nav-item, .chip, .tile, .turbo-tile, .kind-card, .sc-file { transition: none; }
  .turbo-tile:hover, .turbo-tile:focus-within { transform: none; }
}

/* ---- 13. Motion (Shubh, 25 Nov 2026: "reduce the instant quick changes to animated slow changes in the UI overall") -------
   What appears fades in (a page's panels and Settings sections each time they show, folds as they open, windows) and what
   tells news rises in (banners). Scrolls the page makes glide. Opacity only on the large panels: a transform there would
   move anything fixed inside them while it runs. All of it only for people who have not asked for less motion. */
@keyframes oh-fade { from { opacity: 0; } }
@keyframes oh-rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .panel, .st-block, .dept { animation: oh-fade .26s ease-out both; }
  .banner:not([hidden]) { animation: oh-rise .24s cubic-bezier(.2, .7, .2, 1) both; }
  details[open] > :not(summary) { animation: oh-fade .22s ease-out both; }
  dialog[open] { animation: oh-rise .22s cubic-bezier(.2, .7, .2, 1) both; }
  dialog[open]::backdrop { animation: oh-fade .22s ease-out both; }
  button, .chip, .choice span, .subtab, .tile, .kind-card, .nav-item { transition-duration: .2s; transition-timing-function: ease-out; }
  table.data tbody tr { transition: background-color .15s ease-out; }
}
