/* Desk board. Tokens, type and components are the Command Desk prototype's (design canvas, 30 Oct 2026). */
:root {
  --bg: #f5f5f7; --side: #ececef; --surface: #ffffff; --surface2: #fafafc; --text: #1d1d1f; --text2: #6e6e73;
  --sep: rgba(0, 0, 0, .09); --hover: rgba(0, 0, 0, .045); --sel: rgba(0, 0, 0, .075); --skel: rgba(0, 0, 0, .07);
  --accent: #0071e3; --onaccent: #ffffff;
  --shadow: 0 1px 1px rgba(0, 0, 0, .03), 0 6px 20px rgba(0, 0, 0, .05);
  --lift: 0 1px 1px rgba(0, 0, 0, .04), 0 10px 28px rgba(0, 0, 0, .09);
  --good: #1d7a35; --good-t: rgba(36, 138, 61, .11);
  --warn: #9a5b00; --warn-t: rgba(255, 159, 10, .15);
  --risk: #c4001a; --risk-t: rgba(215, 0, 21, .09);
  --c-explain: #4b48c9; --c-explain-t: rgba(88, 86, 214, .11);
  --c-delivery: #0062c4; --c-delivery-t: rgba(0, 113, 227, .10);
  --c-buying: #7f5300; --c-buying-t: rgba(176, 122, 0, .13);
  --c-product: #b23000; --c-product-t: rgba(201, 52, 0, .10);
  --c-fitting: #1d7a35; --c-fitting-t: rgba(36, 138, 61, .11);
  --c-ours: #a3187e; --c-ours-t: rgba(191, 30, 150, .10);
  --note: #fbefc4; --note-body: #fffbea; --note-ink: #6b4f00; --reply-band: rgba(0, 113, 227, .08);
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.45; letter-spacing: -.006em;
  color: var(--text); background: var(--bg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e; --side: #232325; --surface: #2c2c2e; --surface2: #262628; --text: #f5f5f7; --text2: #a1a1a6;
    --sep: rgba(255, 255, 255, .10); --hover: rgba(255, 255, 255, .06); --sel: rgba(255, 255, 255, .10); --skel: rgba(255, 255, 255, .08);
    --accent: #0a84ff;
    --shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 6px 20px rgba(0, 0, 0, .35);
    --lift: 0 1px 1px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .45);
    --good: #63d683; --good-t: rgba(48, 209, 88, .15);
    --warn: #ffc15c; --warn-t: rgba(255, 159, 10, .18);
    --risk: #ff7070; --risk-t: rgba(255, 69, 58, .16);
    --c-explain: #aeacff; --c-explain-t: rgba(124, 122, 255, .18);
    --c-delivery: #70b6ff; --c-delivery-t: rgba(10, 132, 255, .18);
    --c-buying: #f2c461; --c-buying-t: rgba(255, 190, 40, .15);
    --c-product: #ff9d70; --c-product-t: rgba(255, 120, 60, .16);
    --c-fitting: #63d683; --c-fitting-t: rgba(48, 209, 88, .15);
    --c-ours: #ff8ad8; --c-ours-t: rgba(255, 80, 200, .16);
    --note: rgba(255, 204, 0, .22); --note-body: rgba(255, 204, 0, .07); --note-ink: #ffd95c; --reply-band: rgba(10, 132, 255, .16);
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boot { padding: 48px 24px; color: var(--text2); text-align: center; }
.display { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif; letter-spacing: -.022em; }
.hov { transition: background .16s ease, transform .12s ease, filter .16s ease, box-shadow .16s ease; }
.hov:hover { background: var(--hover); }
.press:active { transform: scale(.97); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.lift:hover { box-shadow: var(--lift); }
.rise { animation: rise .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ sign-in */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.gate-card h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.gate-card .lead { color: var(--text2); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input { width: 100%; min-height: 44px; border: 1px solid var(--sep); border-radius: 10px; padding: 10px 12px; background: var(--surface2); font-size: 16px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.input.code { letter-spacing: .3em; font-variant-numeric: tabular-nums; font-size: 20px; text-align: center; }
.qr { align-self: center; width: 180px; height: 180px; background: #fff; border-radius: 12px; padding: 8px; }
.secret { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; word-break: break-all; background: var(--surface2); border-radius: 8px; padding: 8px 10px; }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 16px; border-radius: 980px; border: 1px solid var(--sep); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s ease, transform .1s ease, opacity .15s ease; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--onaccent); }
.btn.primary:hover { filter: brightness(1.07); background: var(--accent); }
.btn.danger { background: var(--risk); border-color: transparent; color: #fff; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); padding: 0 8px; }
.btn.block { width: 100%; min-height: 44px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.linkish { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-size: 14px; }

/* ------------------------------------------------------------ messages */
.note { border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.note.error { background: var(--risk-t); color: var(--risk); }
.note.ok { background: var(--good-t); color: var(--good); }
.note.info { background: var(--surface2); color: var(--text2); }

/* ------------------------------------------------------------ pills, segments, chips */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; border: 0; border-radius: 980px; padding: 6px 15px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--text); text-decoration: none; }
a.pill:hover { text-decoration: none; }
.pill.primary { background: var(--accent); color: var(--onaccent); }
.pill.primary:hover { filter: brightness(1.08); }
.pill.danger { background: var(--risk); color: #ffffff; }
.icon-btn { border: 0; background: transparent; width: 32px; height: 32px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--text2); }
.seg { display: flex; background: var(--hover); border-radius: 9px; padding: 2px; gap: 2px; }
.seg button { flex: 1; border: 0; border-radius: 7px; padding: 5px 10px; font-size: 12px; font-weight: 500; background: transparent; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.seg.inline { display: inline-flex; }
.seg.inline button { flex: none; padding: 5px 12px; font-size: 13px; }
.seg.wrap { flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; border-radius: 5px; padding: 1px 7px; background: var(--hover); color: var(--text2); }
.chip.risk { color: var(--risk); background: var(--risk-t); }
.chip.warn { color: var(--warn); background: var(--warn-t); }
.chip.good { color: var(--good); background: var(--good-t); }
.chip.explain { color: var(--c-explain); background: var(--c-explain-t); }
.chip.delivery { color: var(--c-delivery); background: var(--c-delivery-t); }
.chip.buying { color: var(--c-buying); background: var(--c-buying-t); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sel); display: flex; align-items: center; justify-content: center; flex: none; font-size: 12px; font-weight: 600; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

/* ------------------------------------------------------------ shell */
.desk { display: flex; min-height: 100vh; }
.side { flex: 0 0 240px; position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--side); border-right: 1px solid var(--sep); padding: 18px 12px 16px; display: flex; flex-direction: column; gap: 18px; }
.mark-row { display: flex; align-items: center; gap: 10px; padding: 2px 8px; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; letter-spacing: -.02em; flex: none; }
.mark-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.mark-text b { font-weight: 600; font-size: 15px; }
.sync { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 8px; padding: 8px 10px; text-align: left; font-size: 14px; background: transparent; }
.nav-item svg { color: var(--text2); flex: none; }
.nav-item[aria-current="page"] { background: var(--sel); font-weight: 600; }
.nav-item[aria-current="page"] svg { color: var(--accent); }
.nav-item .label { flex: 1; }
.nav-item .count { font-size: 12px; font-weight: 600; color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nav-item .count.warn { color: var(--warn); }
.nav-item .count.risk { color: var(--risk); }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--sep); }
.me .avatar { width: 30px; height: 30px; }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me-text b { font-size: 13px; font-weight: 600; }
.me-text span { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-only { display: none; }

/* The sidebar as a rail (tablets and narrower desktops by default, or by choice). The rail keeps its
   64px in the layout; opened, the sidebar lies over the page so nothing behind it moves. */
.side-wrap { flex: 0 0 240px; min-width: 0; position: relative; z-index: 20; }
.side-wrap > .side { width: 100%; }
.side-toggle { margin-left: auto; }
.nav-item { position: relative; }
@media (min-width: 761px) {
  .desk.rail .side-wrap { flex-basis: 64px; }
  .desk.rail .side { width: 64px; overflow-x: hidden; transition: width .18s ease, box-shadow .18s ease; }
  .desk.rail .side.peek { width: 240px; box-shadow: 0 12px 40px rgba(0, 0, 0, .14), 0 1px 0 var(--sep); }
  .desk.rail .side:not(.peek) .mark-row { padding: 2px 5px; }
  .desk.rail .side:not(.peek) :is(.mark-text, .side-toggle, .seg, .label, .me-text, .me .icon-btn) { display: none; }
  .desk.rail .side:not(.peek) .nav-item { padding: 9px 11px; }
  .desk.rail .side:not(.peek) .nav-item .count:not(:empty) { position: absolute; top: 6px; left: 25px; width: 8px; height: 8px; padding: 0; border-radius: 50%; font-size: 0; background: var(--text2); box-shadow: 0 0 0 2px var(--side); }
  .desk.rail .side:not(.peek) .nav-item .count.warn:not(:empty) { background: var(--warn); }
  .desk.rail .side:not(.peek) .nav-item .count.risk:not(:empty) { background: var(--risk); }
  .desk.rail .side:not(.peek) .me { padding: 10px 7px; }
  .desk.rail .side.peek :is(.label, .mark-text, .me-text) { animation: side-in .16s ease both; }
}
@keyframes side-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .desk.rail .side { transition: none; } .desk.rail .side.peek :is(.label, .mark-text, .me-text) { animation: none; } }

.main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; }
.main-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 24px; border-bottom: 1px solid var(--sep); background: var(--bg); }
.main-title { display: flex; flex-direction: column; flex: 1 1 260px; min-width: 0; }
.main-title h1 { font-size: 20px; font-weight: 700; }
.main-title .sub { font-size: 12px; color: var(--text2); }
.problem { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--warn-t); color: var(--text); border-bottom: 1px solid var(--sep); font-size: 13px; }
.problem svg { color: var(--warn); flex: none; }
.bar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--sep); }
.content { padding: 34px 40px 64px; max-width: 1180px; width: 100%; display: flex; flex-direction: column; gap: 26px; }
.content.narrow { max-width: 900px; padding-top: 26px; gap: 18px; }
.fresh { font-size: 12px; color: var(--text2); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-label { font-size: 13px; font-weight: 600; color: var(--text2); }
.empty-state { padding: 56px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-state b { font-size: 15px; font-weight: 600; }
.empty-state span:last-child { font-size: 13px; color: var(--text2); }
.ok-icon { color: var(--good); display: inline-flex; }

/* ------------------------------------------------------------ today */
.hello { display: flex; flex-direction: column; gap: 6px; }
.hello .date { font-size: 13px; font-weight: 600; color: var(--text2); }
.hello h2 { font-size: 34px; font-weight: 700; }
.hello p { font-size: 17px; color: var(--text2); max-width: 680px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 14px 20px 8px; }
.card-head h3 { font-size: 15px; font-weight: 600; }
.card-head span { font-size: 13px; color: var(--text2); }
.lrow { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 14px 20px; border-top: 1px solid var(--sep); }
.lrow .time { font-size: 13px; font-weight: 600; color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lrow .time.late { color: var(--risk); }
.lrow-main { border: 0; background: transparent; text-align: left; padding: 6px 8px; margin: -6px -8px; border-radius: 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; color: inherit; text-decoration: none; font: inherit; }
a.lrow-main:hover { text-decoration: none; }
.lrow-main .t, .lrow2 .t { font-size: 15px; font-weight: 600; line-height: 1.3; }
.lrow-main .d, .lrow2 .d { font-size: 13px; color: var(--text2); line-height: 1.4; }
.lrow-main .m { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; margin-top: 3px; }
.lrow-act { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.who { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--text2); }
.who.you { color: var(--accent); }
.who.nobody { color: var(--risk); }
.who .ini { width: 18px; height: 18px; border-radius: 50%; background: var(--sel); color: var(--text); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.lrow2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 14px 20px; }
.lrow2 + .lrow2, .lrow + .lrow2 { border-top: 1px solid var(--sep); }
.lrow2 .stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lrow2 .t { font-size: 14px; }
.urg { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.urg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.urg-head h3 { font-size: 15px; font-weight: 600; }
.urg-head span { font-size: 12px; color: var(--text2); }
.urg-bar { display: flex; height: 14px; gap: 3px; }
.urg-bar .bar { position: relative; min-width: 6px; height: 14px; }
.urg-bar .fill { width: 100%; height: 14px; border-radius: 4px; }
.urg-bar .tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px); background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.35; padding: 7px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; z-index: 5; }
.urg-bar .bar:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.urg-bar .bar:hover .fill { filter: brightness(1.12); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--sep); border-radius: 980px; padding: 6px 13px; font-size: 13px; background: var(--surface); }
.legend .sw { width: 9px; height: 9px; border-radius: 3px; }
.legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.tile { border: 0; text-align: left; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.tile .k { font-size: 13px; font-weight: 600; color: var(--text2); }
.tile .v { font-size: 30px; font-weight: 700; line-height: 1.1; }
.tile .x { font-size: 13px; line-height: 1.45; }
.tile .cta { font-size: 13px; color: var(--accent); font-weight: 500; margin-top: 4px; }

/* ------------------------------------------------------------ trade applications */
.app { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.app-head { display: flex; gap: 12px; align-items: center; }
.who-block { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.who-block h3 { font-size: 18px; font-weight: 700; }
.who-block .meta { font-size: 13px; color: var(--text2); }
.age { font-size: 12px; font-weight: 600; color: var(--text2); white-space: nowrap; align-self: flex-start; padding-top: 4px; }
.age.warn { color: var(--warn); }
.age.late { color: var(--risk); }
.stats { display: flex; flex-wrap: wrap; background: var(--surface2); border: 1px solid var(--sep); border-radius: 12px; }
.stats .cell { flex: 1 1 170px; min-width: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.stats .cell + .cell { border-left: 1px solid var(--sep); }
.stats .k, .quote .k { font-size: 12px; color: var(--text2); }
.stats .v { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.quote { background: var(--surface2); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.quote p { font-size: 14px; white-space: pre-wrap; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acts .grow { flex: 1; }
.confirm { display: flex; flex-direction: column; gap: 10px; background: var(--surface2); border-radius: 12px; padding: 14px; font-size: 14px; }
.spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #ffffff; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ conversations */
.clist { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.citem { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 11px; color: inherit; text-decoration: none; }
a.citem:hover { text-decoration: none; }
.citem .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.citem .top-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.citem .name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.citem .wait { font-size: 12px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.citem .wait.late { color: var(--risk); }
.citem .sum { font-size: 13px; color: var(--text2); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.citem .chips { margin-top: 3px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); background: var(--text); color: var(--bg); border-radius: 12px; padding: 11px 16px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); z-index: 10; animation: toast .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.skel { background: linear-gradient(90deg, var(--skel) 0%, var(--hover) 50%, var(--skel) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; height: 14px; }
.skel.w40 { width: 40%; } .skel.w70 { width: 70%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel, .pulse, .rise, .toast, .spin { animation: none; } .press:active { transform: none; } }

/* ------------------------------------------------------------ team (prototype: Team screen) */
.team-tabs { align-self: flex-start; }
.team-tabs button { padding: 6px 16px; font-size: 13px; }
.team-pane { display: flex; flex-direction: column; gap: 20px; }
.vis { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .k { font-size: 12px; font-weight: 600; color: var(--text2); }
.kpi .v { font-size: 28px; font-weight: 700; line-height: 1.15; }
.kpi.pending .v { color: var(--text2); }
.kpi .t { font-size: 12px; font-weight: 500; }
.kpi .g { font-size: 12px; color: var(--text2); }
.sb { padding: 6px 0; }
.sb h3, .checkin h3 { font-size: 15px; font-weight: 600; padding: 14px 20px 8px; }
.scrollx { overflow-x: auto; }
.sb-grid { min-width: 760px; }
.sb-row { display: grid; grid-template-columns: 1.1fr repeat(5, minmax(0, 1fr)); gap: 12px; padding: 12px 20px; border-top: 1px solid var(--sep); align-items: center; }
.sb-row.head { padding: 8px 20px; font-size: 12px; font-weight: 600; color: var(--text2); align-items: end; }
.sb-row.empty { display: block; font-size: 13px; color: var(--text2); }
.sb-person { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; min-width: 0; }
.sb-person .avatar { width: 30px; height: 30px; }
.sb-cell { display: flex; flex-direction: column; }
.sb-cell .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sb-cell .t { font-size: 11px; font-weight: 500; }
.cov { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.cov-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.cov-head h3 { font-size: 15px; font-weight: 600; }
.cov-head span { font-size: 12px; color: var(--text2); }
.cov-chart { min-width: 640px; display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.cov-hours { display: flex; padding-left: 100px; font-size: 11px; color: var(--text2); }
.cov-hours span { flex: 1; }
.cov-row { display: flex; align-items: center; gap: 12px; }
.cov-name { width: 88px; flex: none; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cov-track { flex: 1; position: relative; height: 24px; background: var(--hover); border-radius: 6px; }
.cov-track .bar { position: absolute; top: 4px; bottom: 4px; min-width: 3px; outline-offset: 1px; }
.cov-track .fill { width: 100%; height: 100%; border-radius: 4px; }
.cov-track .tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px); background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.35; padding: 7px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, transform .15s ease; z-index: 5; }
.cov-track .bar:hover .tip, .cov-track .bar:focus-visible .tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.cov-track .bar:hover .fill { filter: brightness(1.12); }
.cov-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text2); }
.cov-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cov-legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.checkin { padding: 6px 0; }
.ci-row { display: flex; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--sep); align-items: flex-start; }
.ci-name { font-size: 14px; font-weight: 600; width: 56px; flex: none; }
.ci-text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ci-note { font-size: 12px; color: var(--text2); }

/* ------------------------------------------------------------ phone */
@media (max-width: 760px) {
  .desk { flex-direction: column; }
  .side-wrap { flex: none; }
  .side-toggle { display: none; }
  .side { flex: none; position: static; height: auto; width: 100%; overflow: visible; border-right: 0; border-bottom: 1px solid var(--sep); padding: 12px 16px; gap: 12px; }
  .mark-row { padding: 0; }
  .phone-only { display: inline-flex; }
  .me, .seg.single { display: none; }
  .nav { flex-direction: row; gap: 4px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .nav-item { width: auto; flex: none; white-space: nowrap; padding: 7px 12px; border-radius: 980px; }
  .nav-item .label { flex: none; }
  .main-top, .bar-row, .problem { padding-left: 16px; padding-right: 16px; }
  .content, .content.narrow { padding: 22px 16px 48px; gap: 20px; }
  .hello h2 { font-size: 27px; }
  .hello p { font-size: 15px; }
  .lrow { grid-template-columns: 64px minmax(0, 1fr); column-gap: 12px; row-gap: 10px; padding: 14px 16px; align-items: start; }
  .lrow .time { padding-top: 2px; }
  .lrow .lrow-act { grid-column: 2; justify-content: flex-start; }
  .lrow2 { grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding: 14px 16px; }
  .lrow2 > :last-child { justify-self: start; }
  .card-head { padding: 14px 16px 8px; }
  .tiles { grid-template-columns: 1fr; gap: 14px; }
  .app { padding: 16px; }
  .app-head { flex-wrap: wrap; }
  .age { width: 100%; order: 3; padding-top: 0; }
  .stats .cell { flex-basis: 100%; }
  .stats .cell + .cell { border-left: 0; border-top: 1px solid var(--sep); }
  .acts .grow { display: none; }
}

/* ------------------------------------------------------------ prototype additions */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; }
.search { position: relative; flex: 0 1 260px; }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--text2); }
.search input { width: 100%; border: 0; border-radius: 9px; padding: 7px 10px 7px 32px; font-size: 13px; background: var(--hover); color: var(--text); }
.search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(0, 113, 227, .28); }
.search-note { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.linkish.small { font-size: 12px; align-self: inherit; padding: 2px 4px; }
.quiet-btn { border: 0; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 500; background: var(--hover); }
.pending-line { font-size: 12px; color: var(--text2); line-height: 1.45; }
.avatar.xl { width: 52px; height: 52px; font-size: 17px; }

.tile.pending .v { font-size: 20px; color: var(--text2); line-height: 1.3; }
.pending-card { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.pending-card h3 { font-size: 15px; font-weight: 600; }
.pending-card p { font-size: 13px; color: var(--text2); }
.waiting-screen { padding: 40px 36px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 720px; }
.waiting-screen .plug { width: 52px; height: 52px; border-radius: 14px; background: var(--hover); display: flex; align-items: center; justify-content: center; color: var(--text2); }
.waiting-screen h2 { font-size: 24px; font-weight: 700; }
.waiting-screen .what { font-size: 15px; line-height: 1.55; }
.waiting-screen .needs { margin-top: 6px; background: var(--surface2); border: 1px solid var(--sep); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; width: 100%; }
.waiting-screen .needs .k { font-size: 12px; font-weight: 600; color: var(--text2); }
.waiting-screen .needs p { font-size: 14px; }

/* conversations: toolbar, list, detail */
.convs { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.split { display: flex; flex: 1; min-height: 0; }
.pane { height: calc(100vh - 124px); overflow: auto; }
.list-pane { flex: 0 0 380px; border-right: 1px solid var(--sep); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.detail-pane { flex: 1 1 480px; min-width: 0; padding: 24px 32px 56px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 10px 6px; font-size: 13px; font-weight: 600; }
.group-head span:last-child { font-size: 12px; font-weight: 400; color: var(--text2); }
.group-head .risk { color: var(--risk) !important; }
.list-empty { padding: 60px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.list-empty b { font-size: 15px; font-weight: 600; }
.list-empty span:last-child { font-size: 13px; color: var(--text2); }
button.citem { border: 0; width: 100%; text-align: left; background: transparent; font: inherit; }
.citem[aria-current="true"] { background: var(--sel); }
.citem .wait.good { color: var(--good); }
.avatar-skel { width: 34px; height: 34px; border-radius: 50%; flex: none; }

.detail { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.detail-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.detail-head .who-block { flex: 1 1 220px; }   /* the name keeps its room; the buttons wrap below on a phone */
.detail-head .who-block h2 { font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.detail-head .meta { font-size: 13px; color: var(--text2); }
.status { display: flex; flex-wrap: wrap; padding: 4px 0; }
.status .cell { flex: 1 1 160px; padding: 12px 18px; display: flex; flex-direction: column; gap: 2px; }
.status .cell + .cell { border-left: 1px solid var(--sep); }
.status .k, .status .note-line { font-size: 12px; color: var(--text2); }
.status .v { font-size: 15px; font-weight: 600; }
.status .v.risk { color: var(--risk); } .status .v.warn { color: var(--warn); } .status .v.good { color: var(--good); }

.thread { display: flex; flex-direction: column; }
.thread .section-label { margin-bottom: 10px; }
.msg { display: flex; flex-direction: column; gap: 3px; max-width: 78%; margin-bottom: 6px; }
.msg.left { align-self: flex-start; }
.msg.right { align-self: flex-end; align-items: flex-end; }
.msg-meta { font-size: 11px; color: var(--text2); }
.bubble { border-radius: 16px; padding: 9px 13px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.theirs { background: var(--surface); box-shadow: var(--shadow); }
.bubble.mine { background: var(--accent); color: #ffffff; }
.bubble.fin { background: var(--sel); }
.bubble.note { background: var(--note); border: 1px solid rgba(160, 120, 0, .25); }
.note-tag { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--note-ink); margin-bottom: 3px; white-space: normal; }
.gap { align-self: center; margin: 8px 0; font-size: 11px; font-weight: 600; border-radius: 980px; padding: 3px 10px; }
.gap.late { color: var(--risk); background: var(--risk-t); }
.gap.ok { color: var(--good); background: var(--good-t); }
.gap.warn { color: var(--warn); background: var(--warn-t); }
.event { align-self: center; margin: 6px 0; font-size: 11px; color: var(--text2); }
.bubble-skel { height: 56px; width: 60%; border-radius: 16px; margin-bottom: 10px; }
.bubble-skel.right { align-self: flex-end; width: 50%; }

.two { display: flex; flex-wrap: wrap; gap: 16px; }
.records, .read { flex: 1 1 300px; min-width: 0; }
.records { padding: 6px 0 12px; }
.records h3, .read h3 { font-size: 12px; font-weight: 600; color: var(--text2); }
.records h3 { padding: 10px 18px 6px; }
.fact { display: flex; justify-content: space-between; gap: 14px; padding: 9px 18px; border-top: 1px solid var(--sep); font-size: 13px; }
.fact .k { color: var(--text2); flex: none; }
.fact .v { text-align: right; overflow-wrap: anywhere; }
.records .pending-line { padding: 10px 18px 0; border-top: 1px solid var(--sep); }
.read { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.read-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.read p { font-size: 14px; line-height: 1.5; }
.read .pending-line { font-size: 12px; border-top: 1px solid var(--sep); padding-top: 12px; }
.cause { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; border-radius: 980px; padding: 4px 10px 4px 8px; background: var(--hover); color: var(--text2); }
.cause.delivery { color: var(--c-delivery); background: var(--c-delivery-t); }
.cause.explain { color: var(--c-explain); background: var(--c-explain-t); }
.cause.buying { color: var(--c-buying); background: var(--c-buying-t); }
.cause.product { color: var(--c-product); background: var(--c-product-t); }
.cause.fitting { color: var(--c-fitting); background: var(--c-fitting-t); }
.cause.our_side { color: var(--c-ours); background: var(--c-ours-t); }

/* Claude's reading: the summary, "Is this right?", guidance */
.read .read-summary { font-weight: 600; }
.read .mismatch, .respond .mismatch, .draft-cautions .mismatch { margin: 0; }
.read-wait { display: flex; align-items: center; gap: 8px; }
.read-wait .spin, .respond .pill .spin { border-color: var(--sep); border-top-color: var(--accent); }
.pill.primary .spin { border-color: rgba(255, 255, 255, .45); border-top-color: #ffffff; }
.fb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--sep); padding-top: 12px; }
.fb-row .k, .fb-edit .k, .guide-box .k, .draft-head .k { font-size: 12px; font-weight: 600; color: var(--text2); }
.fb-row .k { margin-right: 4px; }
.pill.small { min-height: 28px; padding: 4px 12px; font-size: 12px; }
.fb-edit, .guide-box { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--sep); padding-top: 12px; }
.fb-edit textarea, .guide-box textarea { font-size: 14px; resize: vertical; font-family: inherit; }
.fb-done { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--good); border-top: 1px solid var(--sep); padding-top: 12px; }
.cause-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.cause.pick { border: 1px solid var(--sep); background: transparent; color: var(--text); cursor: pointer; padding: 4px 11px; }
.cause.pick[aria-pressed="true"] { border-color: currentColor; }

/* The suggested reply */
.note-line { font-size: 12px; color: var(--text2); }
.draft-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.draft-head .linkish.small, .trans { font-size: 12px; }
.draft-versions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.draft-view { display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.6; }
.draft-view p { white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-cautions { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--warn-t); display: flex; flex-direction: column; gap: 4px; }
.draft-cautions .k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--warn); }
.draft-cautions p { font-size: 13px; line-height: 1.45; }
.respond-body > .note-line { display: block; margin-top: 10px; }
.guide-box { margin-top: 14px; }
.chip-btn { border: 1px solid var(--sep); background: var(--surface); color: var(--text); border-radius: 980px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chip-btn.on { border-color: var(--accent); color: var(--accent); background: var(--reply-band); }
.tick-row { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text); font-size: 13px; padding: 0; cursor: pointer; align-self: flex-start; }
.foot-note.done-line { display: inline-flex; align-items: center; gap: 6px; color: var(--good); }
.respond-foot > .foot-note { flex-basis: 100%; }
.respond-foot > .foot-note:empty { display: none; }
.msg .trans { align-self: inherit; color: var(--text2); }

/* Feedback: the team's replies checked against our records, and why customers write */
.fb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fb-bar .grow { flex: 1; }
.tiles.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.review { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.review-head .stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.review-head .t { font-size: 15px; font-weight: 600; }
.review-head .d { font-size: 13px; color: var(--text2); }
.rv-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
@media (max-width: 760px) { .rv-parts { grid-template-columns: 1fr; } }
.rv-part { display: flex; flex-direction: column; gap: 4px; }
.rv-part .k { font-size: 12px; font-weight: 600; color: var(--text2); }
.rv-part .k.warn { color: var(--warn); } .rv-part .k.risk { color: var(--risk); }
.rv-part p, .rv-example p { font-size: 14px; line-height: 1.5; }
.rv-example { padding: 12px 14px; border-radius: 10px; background: var(--good-t); display: flex; flex-direction: column; gap: 4px; }
.rv-example .k { font-size: 12px; font-weight: 600; color: var(--good); }
.export { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.export .stack { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.export .sub { font-size: 12px; color: var(--text2); }
.md { margin: 0; max-height: 360px; overflow: auto; padding: 12px 14px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--sep); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.bars { padding-bottom: 10px; }
.bar-row2 { display: grid; grid-template-columns: 170px minmax(0, 1fr) 48px; align-items: center; gap: 12px; padding: 8px 20px; }
.bar-row2 .bar { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.bar-row2 .fill { height: 100%; border-radius: 4px; background: var(--text2); }
.bar-row2 .fill.explain { background: var(--c-explain); } .bar-row2 .fill.delivery { background: var(--c-delivery); } .bar-row2 .fill.product { background: var(--c-product); }
.bar-row2 .fill.fitting { background: var(--c-fitting); } .bar-row2 .fill.our_side { background: var(--c-ours); } .bar-row2 .fill.buying { background: var(--c-buying); }
.bar-row2 .n { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; }
@media (max-width: 760px) { .bar-row2 { grid-template-columns: 1fr 40px; } .bar-row2 .bar { grid-column: 1 / -1; grid-row: 2; } }

.respond { padding: 0; overflow: hidden; }
.respond-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--sep); }
.modes button { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text2); }
.modes .mode-reply[aria-pressed="true"] { color: var(--accent); }
.modes .mode-note[aria-pressed="true"] { color: var(--note-ink); background: var(--note); }
.band { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 18px; font-size: 12px; font-weight: 600; }
.is-reply .band { background: var(--reply-band); color: var(--accent); }
.is-note .band { background: var(--note); color: var(--note-ink); }
.respond-body { padding: 16px 18px; }
.is-note .respond-body { background: var(--note-body); }
.draft { width: 100%; border: 1px solid var(--sep); border-radius: 10px; padding: 12px 14px; font-size: 15px; line-height: 1.6; background: var(--surface); color: var(--text); resize: vertical; }
.draft:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 113, 227, .2); }
.respond-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--sep); background: var(--surface2); }
.foot-note { font-size: 12px; color: var(--text2); flex: 1 1 260px; }
.respond-foot .grow { flex: 1 1 0; }
.pill.note-btn { background: var(--note-ink); color: #ffffff; }
.back { display: none; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--accent); font-size: 14px; font-weight: 600; padding: 4px 0; align-self: flex-start; }

@media (max-width: 1100px) {
  .list-pane { flex-basis: 320px; }
  .detail-pane { padding: 20px 22px 48px; }
}
@media (max-width: 760px) {
  .search { flex: 1 1 100%; }
  .pane { height: auto; overflow: visible; }
  .split { flex-direction: column; }
  .list-pane { flex: none; border-right: 0; padding: 8px 8px 40px; }
  .detail-pane { padding: 16px 16px 48px; }
  .split:not(.has-detail) .detail-pane { display: none; }
  .split.has-detail .list-pane { display: none; }
  .back.phone-only { display: inline-flex; }
  .convs:has(.split.has-detail) .bar-row { display: none; }
  .msg { max-width: 90%; }
  .status .cell { flex-basis: 100%; }
  .status .cell + .cell { border-left: 0; border-top: 1px solid var(--sep); }
  .waiting-screen { padding: 28px 20px; }
}

/* the store's facts on an order (records card) */
.order { border-top: 1px solid var(--sep); padding: 10px 0 4px; display: flex; flex-direction: column; }
.order .skel { margin: 6px 18px; }
.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 2px 18px 6px; font-size: 13px; }
.order .fact { border-top: 0; padding: 5px 18px; }
.order .fact .v { max-width: 70%; }
.fact .v.good { color: var(--good); } .fact .v.warn { color: var(--warn); } .fact .v.risk { color: var(--risk); }
.parcel { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.parcel .sub { font-size: 12px; color: var(--text2); }
.mismatch { margin: 0 18px 6px; font-size: 12px; color: var(--warn); }
.order .pending-line, .order .linkish { padding: 0 18px; }

/* ---------------------------------------------------------------- cases (loss prevention and business) */
.lrow .time.money { color: var(--risk); }
.fresh.warn-text { color: var(--warn); }
.group-head .risk { color: var(--risk); font-weight: 600; }
.case-tabs { flex: none; }
.found h3, .todo h3 { font-size: 15px; font-weight: 600; padding: 14px 20px 8px; }
.finding { display: flex; gap: 10px; align-items: flex-start; padding: 12px 20px; border-top: 1px solid var(--sep); font-size: 14px; line-height: 1.5; }
.finding .dot { margin-top: 7px; }
.finding .dot.risk { background: var(--risk); }
.finding .dot.warn { background: var(--warn); }
.finding .dot.info { background: var(--accent); }
.finding .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.finding .when { font-size: 12px; color: var(--text2); white-space: nowrap; padding-top: 2px; }
.todo { padding-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.todo h3 { padding-bottom: 0; }
.todo > p, .todo > .case-acts, .todo > .rep-block { margin: 0 20px; }
.todo .act { font-size: 15px; font-weight: 600; line-height: 1.45; }
.case-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.case-acts .input { flex: 1 1 240px; min-height: 34px; font-size: 14px; padding: 6px 12px; }
.snooze-label { font-size: 12px; color: var(--text2); margin-left: 6px; }

/* Files and photos: a strip of photos and a list of documents from the exchange, and the photo viewer. */
.files { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.files-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.files-head h3 { font-size: 15px; font-weight: 600; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.thumb { border: 0; padding: 0; background: transparent; display: flex; flex-direction: column; text-align: left; min-width: 0; }
.thumb img { width: 100%; height: 96px; object-fit: cover; border-radius: 10px; background: var(--hover); display: block; }
.thumb .cap { font-size: 12px; padding: 6px 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb .who, .doc .who, .viewer .who { font-size: 11px; color: var(--text2); }
.docs { display: flex; flex-direction: column; }
.doc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--sep); }
.doc-kind { width: 34px; height: 42px; border-radius: 6px; background: var(--c-delivery-t); color: var(--c-delivery); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.doc-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.doc-text .name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
.viewer-card { width: 640px; max-width: 100%; max-height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.viewer-card img { width: 100%; max-height: 70vh; object-fit: contain; background: #000000; display: block; }
.viewer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; }
.returning { padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.returning h3 { font-size: 15px; font-weight: 600; }

/* Customs and duties */
.list-section { padding: 6px 0; }
.list-section .pad { padding: 14px 20px 8px; }
.list-section .section-head h3 { font-size: 15px; font-weight: 600; }
.list-section .section-head .sub, .section-toggle .sub { font-size: 12px; color: var(--text2); }
.customs-item + .customs-item { border-top: 1px solid var(--sep); }
.customs-answer { margin: 0 20px 16px; padding: 16px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--sep); display: flex; flex-direction: column; gap: 10px; }
.customs-answer .k, .k-block .k { font-size: 12px; color: var(--text2); }
.customs-answer textarea { font-size: 14px; min-height: 120px; resize: vertical; font-family: inherit; }
.k-block { display: flex; flex-direction: column; gap: 4px; }
.section-toggle { width: 100%; border: 0; background: transparent; display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-radius: 14px; text-align: left; font-size: 15px; font-weight: 600; }
.pill.ghost { background: transparent; color: var(--accent); }
.stack .d.good { color: var(--good); }

/* Refunds: the sheet on a case or a customs charge, and the Refunds screen */
.refund-sheet { margin-top: 12px; padding: 16px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--sep); display: flex; flex-direction: column; gap: 12px; }
.refund-sheet h3 { font-size: 15px; font-weight: 600; }
.rf-lines { display: flex; flex-direction: column; }
.rf-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--sep); font-size: 14px; }
.rf-line:first-child { border-top: 0; }
.rf-name { flex: 1; min-width: 0; }
.rf-price { font-variant-numeric: tabular-nums; color: var(--text2); }
.rf-qty select { width: 64px; padding: 4px 6px; }
.tick { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid var(--text2); background: transparent; color: var(--onaccent, #fff); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.tick.on { background: var(--accent); border-color: var(--accent); }
.rf-amount { display: flex; flex-direction: column; gap: 6px; max-width: 260px; }
.rf-amount .k, .rf-sum .k, .say .k { font-size: 12px; color: var(--text2); }
.rf-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rf-sum > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.rf-sum .v { font-size: 15px; font-weight: 600; }
.rf-sum .v.good { color: var(--good); } .rf-sum .v.warn { color: var(--warn); } .rf-sum .v.risk { color: var(--risk); } .rf-sum .v.delivery { color: var(--c-delivery); }
.say p { font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.done-line { font-size: 14px; }
.rules-line { font-size: 12px; color: var(--text2); }
.pending-line.grow { flex: 1 1 220px; }
.pill.danger:disabled, .pill.primary:disabled { opacity: .5; }
.pad-x { padding-left: 20px; padding-right: 20px; }
.pb { padding-bottom: 16px; }
.day-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 12px; padding-bottom: 4px; border-top: 1px solid var(--sep); }
.day-head b { font-size: 14px; }
.day-head .sub { font-size: 12px; color: var(--text2); }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding-top: 4px; padding-bottom: 8px; }
.rule { display: flex; flex-direction: column; gap: 6px; }
.rule .k { font-size: 12px; color: var(--text2); }
.rule-in { display: flex; align-items: center; gap: 6px; }
.rule-in .input { width: 90px; }

/* A replacement order made for a case's order: its own block with its own supplier buttons */
.rep-block { padding-top: 12px; border-top: 1px solid var(--sep); display: flex; flex-direction: column; gap: 8px; }
.rep-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 14px; }
.rep-head .sub { font-size: 12px; color: var(--text2); }
.rep-block .case-acts { margin-top: 0; }

/* Placing a case's order: the console's checks, one group per supplier, shipping choices */
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-group { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--bg); }
.rf-group.dim { opacity: .6; }
.rf-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.rf-item + .rf-item { border-top: 1px solid var(--sep); padding-top: 6px; }
.rf-ship { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px; }
.rf-opt { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--sep); border-radius: 9px; padding: 7px 10px; background: transparent; font-size: 13px; text-align: left; }
.rf-opt.on { border-color: var(--accent); }
.rf-dot { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1.5px solid var(--text2); }
.rf-opt.on .rf-dot { border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--bg); background: var(--accent); }
