/* ==========================================================================
   Kartel Ops Console — stylesheet
   One file for every screen. Sections:
     1. Tokens        5. Controls       9.  Overlays (menu, toast, modal)
     2. Base          6. Data display   10. Orders, kanban, list
     3. Motion        7. Layout         11+. One section per other screen
     4. Sidebar       8. Page chrome
   Colours, radii and motion values come from the design-system page.
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --orange-500: #FF6600;
  --orange-700: #C44D0C;
  --orange-900: #8A3A08;
  --orange-300: #F3C9A1;
  --orange-200: #FFE3C2;
  --orange-50: #FFF4E8;
  --cream-50: #FFF8EE;

  --ink-900: #1C1C1C;
  --ink-800: #3A3A3A;
  --ink-700: #4A4A4A;
  --ink-600: #5F5F5F;
  --ink-500: #6B6B6B;
  --ink-400: #8C8C8C;
  --ink-300: #A3A3A0;

  --line-100: #ECECEA;
  --line-150: #E6E6E4;
  --line-200: #E3E3E1;
  --line-300: #DCDCDA;
  --line-dash: #CFCFCC;
  --surface-50: #FAFAF9;
  --surface-100: #F4F4F3;
  --surface-150: #F1F1EF;
  --board: #F5F5F4;

  --ok: #15803D;
  --ok-bg: #E8F6EE;
  --ok-ink: #146C35;
  --danger: #B4231A;
  --danger-bright: #C8261C;
  --danger-bg: #FDEBEA;
  --card-bg: #E7F1FD;
  --card-ink: #1A5FB4;
  --cash-bg: #FFF0D4;
  --cash-ink: #8A4E00;
  --exch-bg: #F1ECFD;
  --exch-ink: #5B3BB5;
  --chip-bg: #F2F2F1;

  --font: 'SF Pro', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --k-ease: cubic-bezier(.2, .7, .2, 1);
  --k-spring: cubic-bezier(.3, 1.4, .5, 1);
  --k-fast: 140ms;
  --k-med: 220ms;
  --k-slow: 420ms;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink-900);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink-900); text-decoration: none; }
a:hover { color: var(--orange-700); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--orange-500); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--ink-900); cursor: pointer; flex: none; }
[aria-disabled=true] { opacity: .42; pointer-events: none; box-shadow: none !important; transform: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--ink-900); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }
.mono { font-family: var(--mono); }

/* 3. Motion ---------------------------------------------------------------- */
@keyframes k-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes k-fade { from { opacity: 0; } }
@keyframes k-slide { from { opacity: 0; transform: translateX(14px); } }
@keyframes k-grow { from { width: 0; } }
@keyframes k-scale { from { transform: scaleX(0); } }
@keyframes k-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes k-up { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes k-down { from { opacity: 0; transform: translate(-50%, -10px); } }

button, a, [role=tab], article, input, select, textarea, td, label {
  transition: background-color var(--k-fast) ease, border-color var(--k-fast) ease, color var(--k-fast) ease,
    box-shadow var(--k-med) var(--k-ease), transform var(--k-med) var(--k-ease);
}
button svg, a svg { transition: transform var(--k-med) var(--k-ease); }

/* page sections rise in 60ms apart */
.main > * { animation: k-rise 520ms var(--k-ease) backwards; }
.main > *:nth-child(2) { animation-delay: 60ms; }
.main > *:nth-child(3) { animation-delay: 120ms; }
.main > *:nth-child(4) { animation-delay: 180ms; }
.main > *:nth-child(n+5) { animation-delay: 240ms; }

/* re-rendered regions only animate when flagged with .enter (first paint, tab change) */
.enter .card { animation: k-rise var(--k-slow) var(--k-ease) backwards; }
.enter .card:nth-of-type(2) { animation-delay: 40ms; }
.enter .card:nth-of-type(3) { animation-delay: 80ms; }
.enter .card:nth-of-type(4) { animation-delay: 120ms; }
.enter .card:nth-of-type(5) { animation-delay: 160ms; }
.enter .card:nth-of-type(n+6) { animation-delay: 200ms; }
.enter .kpi { animation: k-rise 480ms var(--k-ease) backwards; }
.enter .kpi:nth-child(2) { animation-delay: 50ms; }
.enter .kpi:nth-child(3) { animation-delay: 100ms; }
.enter .kpi:nth-child(4) { animation-delay: 150ms; }
.enter tbody tr { animation: k-fade 300ms ease backwards; }
.enter tbody tr:nth-child(2) { animation-delay: 20ms; }
.enter tbody tr:nth-child(3) { animation-delay: 40ms; }
.enter tbody tr:nth-child(4) { animation-delay: 60ms; }
.enter tbody tr:nth-child(5) { animation-delay: 80ms; }
.enter tbody tr:nth-child(6) { animation-delay: 100ms; }
.enter tbody tr:nth-child(n+7) { animation-delay: 120ms; }
.enter .bar > i { animation: k-grow 700ms var(--k-ease) backwards; animation-delay: 200ms; }

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

/* 4. Sidebar --------------------------------------------------------------- */
.app { display: flex; flex-wrap: nowrap; min-height: 100vh; background: #fff; }
.sidebar {
  flex: 0 0 auto;
  align-self: flex-start;
  position: sticky; top: 0;
  width: 240px; height: 100vh; min-height: 560px;
  background: var(--surface-50);
  border-right: 1px solid var(--line-100);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 24px;
  overflow: hidden auto;
  transition: width 160ms ease;
}
.sidebar.is-collapsed { width: 72px; padding: 20px 12px; }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 0 8px; height: 36px; }
.is-collapsed .sb-head { flex-direction: column; justify-content: flex-start; padding: 0; height: auto; gap: 12px; }
.sb-logo { display: flex; align-items: center; justify-content: center; height: 36px; }
.sb-logo img { height: 22px; width: auto; display: block; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; background: transparent; border-radius: 8px; color: var(--ink-800);
}
.btn-ghost:hover { background: #EFEFED; color: var(--ink-900); }
.btn-ghost:active { transform: scale(.97); transition-duration: 80ms; }
.sb-toggle { width: 36px; height: 36px; flex: none; color: var(--ink-400); }
.sb-toggle--wide { width: 44px; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar .sb-util { margin-top: auto; }
.sb-label { font-size: 13px; color: var(--ink-400); padding: 0 8px 6px; }
.sb-divider { height: 1px; background: var(--line-150); margin: 0 8px 8px; }
.sb-item {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px;
  border-radius: 10px; font-size: 15px; color: var(--ink-800); white-space: nowrap;
}
.sb-item svg { flex: none; }
.is-collapsed .sb-item { justify-content: center; padding: 0; }
.sb-item:not([aria-current]):hover { background: #EFEFED; color: var(--ink-900); }
.sb-item:not([aria-current]):hover svg { transform: translateX(2px); }
.sb-item[aria-current=page] { background: var(--orange-200); font-weight: 600; color: var(--ink-900); box-shadow: inset 0 0 0 1px rgba(255, 102, 0, .18); }
.sb-item span { animation: k-fade 220ms ease backwards; }

/* 5. Controls -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line-300); background: #fff; border-radius: 8px;
  font-size: 14px; color: var(--ink-900); white-space: nowrap;
}
.btn:hover { background: #F7F7F5; border-color: #C9C9C6; box-shadow: 0 1px 2px rgba(28, 28, 28, .06); transform: translateY(-1px); color: var(--ink-900); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: 80ms; }
.btn-lg { height: 42px; font-size: 15px; gap: 10px; }
.btn-md { height: 40px; }
.btn-sm { height: 34px; padding: 0 12px; }
.btn-primary { background: var(--ink-900); border: 0; color: #fff; font-weight: 500; }
.btn-primary:hover { background: #000; color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(28, 28, 28, .55); }
.btn-danger { border-color: #F1C7C3; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: #E9A9A3; color: var(--danger); }
.btn-text { color: var(--orange-700); font-weight: 500; }
.btn-ghost.btn-text:hover { color: var(--orange-700); }
.btn-ghost.btn-sm, .btn-ghost.btn-md { padding: 0 12px; font-size: 14px; }
.btn-icon { width: 32px; height: 32px; padding: 0; color: var(--ink-500); border-radius: 6px; }
.dd { position: relative; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px dashed var(--line-dash); background: #fff; border-radius: 8px; font-size: 14px; color: var(--ink-800);
}
.chip strong { font-weight: 600; color: var(--ink-900); }
.chip:hover { border-style: solid; border-color: #BDBDBA; background: var(--surface-50); transform: translateY(-1px); }
.chip.is-on { border: 1px solid var(--orange-300); background: var(--orange-50); color: var(--orange-900); }
.chip.is-on:hover { background: #FFE9D2; }

.search {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 42px; width: 320px; max-width: 100%; padding: 0 14px;
  background: var(--surface-100); border-radius: 8px;
}
.search svg { color: var(--ink-400); flex: none; }
.search input { border: 0; background: transparent; outline: none; font-size: 15px; flex: 1; min-width: 0; }
.search:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--orange-500), 0 0 0 4px rgba(255, 102, 0, .14); }

.field {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-300); border-radius: 8px; background: #fff;
  min-height: 42px; padding: 0 12px;
}
.field:hover { border-color: #C9C9C6; }
.field:focus-within, select:focus, textarea:focus { border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(255, 102, 0, .16); outline: none; }
.field input, .field select { border: 0; outline: none; background: transparent; font-size: 15px; flex: 1; min-width: 0; height: 40px; }
.field input:focus-visible, .field select:focus-visible { outline: none; }
.field .unit { color: var(--ink-500); font-size: 15px; }
.field-label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.field-label .hint { font-size: 13px; font-weight: 400; color: var(--ink-500); }
textarea { border: 1px solid var(--line-300); border-radius: 8px; padding: 10px 12px; font-size: 15px; width: 100%; resize: vertical; background: #fff; }
select { border: 1px solid var(--line-300); border-radius: 8px; background: #fff; font-size: 15px; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line-150); }
.tab {
  display: flex; align-items: center; gap: 8px;
  border: 0; background: transparent; padding: 10px 14px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--ink-500); font-size: 16px;
}
.tab:hover { color: var(--ink-900); }
.tab[aria-selected=false]:hover { border-bottom-color: #D6D6D3; }
.tab[aria-selected=true] { border-bottom-color: var(--orange-500); color: var(--orange-700); font-weight: 500; }
.count { background: #EDEDEB; color: var(--ink-700); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tab[aria-selected=true] .count { background: var(--orange-200); color: var(--orange-900); }
.count--dark { background: #575757; color: #fff; padding: 2px 9px; }

.seg { display: flex; gap: 2px; background: var(--surface-150); padding: 4px; border-radius: 10px; }
.seg > a, .seg > button {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 0; background: transparent;
  border-radius: 7px; font-size: 15px; color: var(--ink-800);
}
.seg > a:not([aria-current]):hover, .seg > button[aria-pressed=false]:hover { background: rgba(255, 255, 255, .65); color: var(--ink-900); }
.seg > [aria-current=page], .seg > [aria-pressed=true] { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 500; color: var(--ink-900); }

.switch {
  position: relative; display: inline-block; flex: none;
  width: 44px; height: 26px; border: 0; padding: 0; border-radius: 999px; background: #D6D6D3;
  transition: background-color 200ms ease, box-shadow var(--k-fast) ease;
}
.switch > span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 260ms var(--k-spring), width 120ms ease; }
.switch[aria-checked=true] { background: var(--ink-900); }
.switch[aria-checked=true] > span { left: 21px; }
.switch:hover { box-shadow: 0 0 0 4px rgba(255, 102, 0, .14); }
.switch:active > span { width: 24px; }
.switch:active[aria-checked=true] > span { left: 17px; }

input[type=checkbox]:hover, input[type=radio]:hover { transform: scale(1.1); }
input[type=checkbox]:active { transform: scale(.92); }

/* 6. Data display ---------------------------------------------------------- */
.badge { display: inline-block; background: var(--chip-bg); color: var(--ink-800); font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
.b-cash, .b-card, .b-credit, .b-exch { letter-spacing: .4px; }
.b-cash { background: var(--cash-bg); color: var(--cash-ink); }
.b-card { background: var(--card-bg); color: var(--card-ink); }
.b-credit { background: var(--ok-bg); color: var(--ok-ink); }
.b-exch { background: var(--exch-bg); color: var(--exch-ink); }
.b-late { background: var(--danger-bg); color: var(--danger); }
.b-otp { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.b-otp svg { color: var(--ok); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-100); border-radius: 6px; padding: 3px 8px; font-size: 13px; color: var(--ink-800); white-space: nowrap; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
i.dot { font-style: normal; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%; background: #EFE6DC; color: #6B3D14; font-size: 11px; font-weight: 600;
}
.avatar--sm { width: 22px; height: 22px; font-size: 10px; }
.avatar--lg { width: 32px; height: 32px; font-size: 12px; }
.avatar--blue { background: var(--card-bg); color: var(--card-ink); }
.callout { background: var(--cream-50); border: 1px solid #F6E0C2; border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #6B4310; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { border: 1px solid var(--line-200); border-radius: 10px; overflow: hidden; background: #fff; }
.kpi:hover { border-color: #D3D3D0; box-shadow: 0 14px 28px -18px rgba(28, 28, 28, .3); transform: translateY(-2px); }
.kpi__body { padding: 14px 18px 12px; display: flex; flex-direction: column; gap: 8px; }
.kpi__label { font-size: 14px; color: var(--ink-800); display: flex; align-items: center; gap: 8px; }
.kpi__label span { border-bottom: 1px dashed var(--line-dash); }
.kpi__value { display: flex; align-items: baseline; gap: 10px; }
.kpi__value b { font-size: 32px; font-weight: 600; letter-spacing: -.5px; }
.kpi__value span { font-size: 14px; color: var(--ink-600); }
.kpi__foot { border-top: 1px solid var(--line-100); padding: 10px 18px; font-size: 14px; color: var(--ink-600); }

.bar { display: block; width: 80px; height: 6px; border-radius: 6px; background: var(--line-100); overflow: hidden; }
.bar > i { display: block; height: 6px; background: var(--ink-900); }

.table-wrap { border: 1px solid var(--line-200); border-radius: 10px; overflow-x: auto; background: #fff; }
.tbl { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 14px; }
.tbl thead tr { background: var(--surface-50); text-align: left; color: var(--ink-600); }
.tbl th { padding: 12px 8px; font-weight: 500; }
.tbl td { padding: 12px 8px; vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child, .tbl th:last-child, .tbl td:last-child { padding-left: 16px; padding-right: 16px; }
.tbl tbody tr { border-top: 1px solid var(--line-100); background: #fff; }
.tbl tbody tr:hover td { background: #FAF7F3; }
.tbl tbody tr.is-sel td { background: #FFF8F0; }
.tbl .nowrap { white-space: nowrap; }
.tbl .num { text-align: right; }
.tbl td.muted { color: var(--ink-500); }
.tbl .cell-empty td { padding: 48px 16px; text-align: center; color: var(--ink-500); }
td a, .card a, .link-u {
  background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size var(--k-med) var(--k-ease), color var(--k-fast) ease;
}
td a:hover, .card a:hover, .link-u:hover { background-size: 100% 1px; }
.link-btn { border: 0; background: transparent; padding: 0 4px; color: var(--orange-700); font-weight: 600; }

/* 7. Layout ---------------------------------------------------------------- */
.main {
  flex: 1 1 0; min-width: 0; padding: 24px 28px 32px;
  display: flex; flex-direction: column; gap: 22px;
}
.page-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-start; }
.page-head__text { display: flex; flex-direction: column; gap: 4px; }
.page-head__tools { display: flex; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 24px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.page-sub { font-size: 15px; color: var(--ink-600); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.toolbar__group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar__hint { font-size: 14px; color: var(--ink-600); padding-right: 4px; }
.bar-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.list-foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink-600); }
.pager { display: flex; gap: 6px; }
.pager .btn { height: 34px; }
.pager .btn-num { width: 34px; padding: 0; }
.pager .btn-primary { cursor: default; }

/* 9. Overlays -------------------------------------------------------------- */
.menu-scrim { position: fixed; inset: 0; z-index: 39; }
.menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; min-width: 180px;
  background: #fff; border: 1px solid var(--line-200); border-radius: 10px; padding: 6px;
  box-shadow: 0 18px 40px -16px rgba(28, 28, 28, .3);
  animation: k-pop 180ms var(--k-ease) backwards;
}
.menu--right { left: auto; right: 0; min-width: 260px; }
.menu-item {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 10px; border: 0; background: transparent; border-radius: 7px;
  font-size: 14px; color: var(--ink-900); text-align: left; white-space: nowrap;
}
.menu-item:hover { background: var(--surface-100); }
.menu-item[aria-selected=true] { font-weight: 600; }
.menu-check { color: var(--orange-700); font-weight: 700; }

.toast {
  position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 60;
  background: var(--ink-900); color: #fff; border-radius: 10px; padding: 11px 14px 11px 16px;
  display: flex; align-items: center; gap: 14px; font-size: 14px; max-width: calc(100vw - 32px);
  box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .45);
  animation: k-down 260ms var(--k-ease) backwards;
}
.toast-undo { border: 0; background: transparent; color: #FFB27A; font-size: 14px; font-weight: 600; padding: 0; }
.toast-x { border: 0; background: transparent; color: var(--ink-300); padding: 0 2px; font-size: 18px; line-height: 1; }

.bulkbar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 45;
  background: #fff; border: 1px solid var(--line-200); border-radius: 12px; padding: 8px 8px 8px 16px;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 20px 40px -18px rgba(28, 28, 28, .35);
  font-size: 14px; white-space: nowrap; max-width: calc(100vw - 24px);
  animation: k-up 260ms var(--k-ease) backwards;
}
.bulkbar b { font-weight: 600; padding-right: 6px; }
.bulkbar .sep { width: 1px; height: 20px; background: var(--line-150); }

.scrim {
  position: fixed; inset: 0; z-index: 50; background: rgba(28, 28, 28, .38);
  display: flex; align-items: flex-start; justify-content: center; padding: min(120px, 10vh) 16px 16px; overflow-y: auto;
  animation: k-fade 180ms ease backwards;
}
.scrim--pass { background: transparent; pointer-events: none; animation: none; }
.scrim--pass > * { pointer-events: auto; }
.modal {
  width: 440px; max-width: 100%;
  background: #fff; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .4);
  animation: k-pop 220ms var(--k-ease) backwards;
}
.modal--md { width: 520px; }
.modal__head { padding: 20px 22px 6px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal__head h2 { font-size: 18px; font-weight: 600; }
.modal__close { width: 32px; height: 32px; font-size: 20px; line-height: 1; color: var(--ink-500); }
.modal__body { padding: 6px 22px 18px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.modal__body p { color: var(--ink-600); line-height: 1.5; }
.modal__foot { padding: 14px 22px; border-top: 1px solid var(--line-100); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.btn-destructive { background: var(--danger); color: #fff; border: 0; font-weight: 500; }
.btn-destructive:hover { background: #8F1B14; color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(180, 35, 26, .6); }
.select-btn { width: 100%; height: 42px; padding: 0 12px; justify-content: space-between; }
.select-btn .caret { color: var(--ink-400); }

/* 10. Orders: kanban + list ------------------------------------------------ */
.board-scroll { overflow-x: auto; }
.board { display: grid; gap: 12px; align-items: start; grid-template-columns: repeat(var(--cols, 6), minmax(200px, 1fr)); min-width: calc(var(--cols, 6) * 212px); }
.col { background: var(--board); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 760px; }
.col__head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px; }
.col__title { font-size: 15px; font-weight: 400; color: var(--ink-800); display: flex; align-items: center; gap: 8px; }
.card { background: #fff; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; outline: 0 solid transparent; outline-offset: -1px; will-change: transform; }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(28, 28, 28, .28), 0 0 0 1px var(--line-200); }
.card:active { transform: translateY(0) scale(.99); }
.card.is-sel { outline: 2px solid var(--orange-500); }
.card__top { display: flex; justify-content: space-between; align-items: center; }
.card__top a { font-weight: 600; }
.card__name { font-weight: 500; }
.card__addr { font-size: 14px; color: var(--ink-500); line-height: 1.35; }
.card__tags { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.card__foot { border-top: 1px solid var(--line-100); margin-top: 6px; padding-top: 10px; font-size: 14px; }
.card__foot > span { display: flex; align-items: center; gap: 8px; }
.card__foot .none { color: var(--ink-500); }
.card input[type=checkbox] { opacity: .55; transition: opacity var(--k-fast) ease, transform var(--k-fast) ease; }
.card:hover input[type=checkbox], .card input[type=checkbox]:checked { opacity: 1; }
.col-empty { border: 1px dashed #D6D6D3; border-radius: 10px; padding: 20px 12px; text-align: center; font-size: 13px; color: var(--ink-400); }

.cell-driver { display: inline-flex; align-items: center; gap: 8px; }
.cell-driver.none { color: var(--ink-400); }
.row-actions { position: relative; display: inline-flex; justify-content: flex-end; }
.rowmenu {
  position: absolute; right: 38px; top: -4px; z-index: 40; display: flex; gap: 2px;
  background: #fff; border: 1px solid var(--line-200); border-radius: 10px; padding: 4px; white-space: nowrap;
  box-shadow: 0 14px 30px -14px rgba(28, 28, 28, .35); animation: k-pop 160ms var(--k-ease) backwards;
}
.rm-item { padding: 7px 10px; border: 0; background: transparent; border-radius: 7px; font-size: 13px; color: var(--ink-900); }
.rm-item:hover { background: var(--surface-100); color: var(--ink-900); }
.rm-item--danger, .rm-item--danger:hover { color: var(--danger); }
.rm-item--ok, .rm-item--ok:hover { color: var(--ok); }

/* responsive */
@media (max-width: 720px) {
  .main { padding: 16px 16px 28px; gap: 18px; }
  .search { width: 100%; }
  .page-head__tools { width: 100%; }
  .page-head__tools .dd, .page-head__tools .dd > .btn { width: 100%; }
  .page-head__tools .dd > .btn { justify-content: space-between; }
  .toast { white-space: normal; }
  .bulkbar { flex-wrap: wrap; justify-content: center; white-space: normal; }
}

/* 11. Panels + order detail ------------------------------------------------ */
.panel { border: 1px solid var(--line-200); border-radius: 10px; background: #fff; }
.panel:hover { border-color: #D6D6D3; }
.panel--pad { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.panel h2 { font-size: 16px; font-weight: 600; }
.panel__head { padding: 14px 18px; border-bottom: 1px solid var(--line-100); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel__meta { font-size: 13px; color: var(--ink-500); }
.crumbs { font-size: 14px; color: var(--ink-500); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--ink-500); }
.crumbs a:hover { color: var(--orange-700); }
.crumbs [aria-current] { color: var(--ink-900); }
.od-head { display: flex; flex-direction: column; gap: 8px; }
.od-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.od-title h1 { font-size: 26px; font-weight: 600; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-100); border-radius: 6px; padding: 4px 10px; font-size: 13px; color: var(--ink-800); }
.tag-orange { background: var(--orange-200); color: var(--orange-900); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.steps-panel { padding: 18px 20px; overflow-x: auto; }
.steps { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 8px; min-width: 760px; }
.steps li { display: flex; flex-direction: column; gap: 8px; }
.step-bar { display: block; height: 4px; border-radius: 4px; transform-origin: left center; }
.step-label { font-size: 14px; font-weight: 600; }
.step-time { font-size: 13px; color: var(--ink-500); }
.enter .step-bar { animation: k-scale 600ms var(--k-ease) backwards; }
.enter li:nth-child(2) > .step-bar { animation-delay: 90ms; }
.enter li:nth-child(3) > .step-bar { animation-delay: 180ms; }
.enter li:nth-child(4) > .step-bar { animation-delay: 270ms; }
.enter li:nth-child(5) > .step-bar { animation-delay: 360ms; }
.enter li:nth-child(6) > .step-bar { animation-delay: 450ms; }
.split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.split__main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.ok-note { font-size: 13px; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.tbl--inner { min-width: 520px; }
.tbl--inner th { padding: 10px 8px; }
.tbl--inner th:first-child, .tbl--inner td:first-child { padding-left: 18px; }
.tbl--inner th:last-child, .tbl--inner td:last-child { padding-right: 18px; }
.prod { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.prod__img { width: 40px; height: 40px; border-radius: 8px; background: var(--surface-100); border: 1px solid var(--line-100); display: flex; align-items: center; justify-content: center; color: var(--ink-300); flex: none; }
.sku { color: var(--ink-500); font-family: var(--mono); font-size: 13px; }
.totals { border-top: 1px solid var(--line-100); padding: 14px 18px; display: grid; grid-template-columns: 1fr auto; row-gap: 8px; font-size: 14px; color: var(--ink-600); }
.totals span:nth-child(even) { text-align: right; color: var(--ink-900); }
.totals .grand { font-weight: 600; color: var(--ink-900); padding-top: 6px; }
.totals .grand:nth-child(even) { font-size: 16px; }
.log { display: flex; flex-direction: column; gap: 16px; }
.log li { display: flex; gap: 12px; }
.log .dot { width: 10px; height: 10px; margin-top: 5px; }
.log__text { font-size: 14px; }
.log__meta { font-size: 13px; color: var(--ink-500); }
.log > li > div { display: flex; flex-direction: column; gap: 2px; }
.avatar--xl { width: 40px; height: 40px; font-size: 14px; }
.who { display: flex; align-items: center; gap: 12px; }
.who__name { font-weight: 600; }
.who__sub { font-size: 13px; color: var(--ink-500); }
.iconline { font-size: 14px; color: var(--ink-800); display: flex; gap: 8px; }
.iconline svg { flex: none; margin-top: 2px; color: var(--ink-500); }
.placeholder-box { height: 140px; border-radius: 8px; background: var(--surface-100); border: 1px dashed #D6D6D3; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink-500); }
.kvrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.kvrow > span:first-child { color: var(--ink-600); }
.btn-icon-sq { width: 36px; height: 36px; padding: 0; color: var(--ink-800); }
.link-strong { border: 0; background: transparent; color: var(--orange-700); font-size: 14px; font-weight: 600; padding: 0; }
.muted { color: var(--ink-400); }

/* 12. Job assignment -------------------------------------------------------- */
.check-box { height: 42px; padding: 0 14px; border: 1px solid var(--line-300); border-radius: 8px; display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; background: #fff; }
.check-box:hover { border-color: #C9C9C6; }
.search--sm { height: 38px; width: 240px; padding: 0 12px; gap: 8px; }
.search--sm input { font-size: 14px; }
.queue { flex: 1 1 300px; min-width: 0; background: var(--board); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.drivers { flex: 3 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.queue__head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; }
.queue__head h2 { font-size: 15px; font-weight: 500; color: var(--ink-800); }
.qcard { background: #fff; border-radius: 10px; border: 1px solid var(--line-100); padding: 0; display: flex; flex-direction: row; gap: 0; }
.qcard.is-cur { border: 2px solid var(--orange-500); }
.qbtn { flex: 1; min-width: 0; border: 0; background: transparent; padding: 14px; margin: 0; text-align: left; display: flex; flex-direction: column; gap: 8px; border-radius: 10px; color: inherit; }
.qcard.is-cur .qbtn { padding: 13px; }
.qbtn__top { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 8px; }
.qbtn__top b { font-weight: 600; }
.qbtn__name { font-weight: 500; }
.qbtn__addr { font-size: 14px; color: var(--ink-500); }
.qbtn__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.done-card { background: #fff; border-radius: 10px; padding: 28px 16px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.done-card span:last-child { font-size: 13px; color: var(--ink-500); }
.banner { border: 1px solid var(--orange-300); background: #FFF8F0; border-radius: 10px; padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.banner__label { font-size: 13px; color: var(--orange-900); font-weight: 600; letter-spacing: .3px; margin-bottom: 4px; }
.banner__body { font-size: 15px; }
.banner__actions { display: flex; gap: 8px; }
.banner--ok { border-color: #CDEBD8; background: #F1FAF4; color: var(--ok-ink); font-size: 15px; display: block; }
.dcell { display: flex; align-items: center; gap: 10px; }
.dcell__name { font-weight: 500; }
.dcell__sub { font-size: 13px; color: var(--ink-500); }
.capcell { display: flex; align-items: center; gap: 8px; }
.capcell span:last-child { color: var(--ink-600); font-size: 13px; }
.tbl--drivers { min-width: 720px; }
.tbl--drivers td { color: var(--ink-800); }
.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; }
.tbl--drivers tr.is-best td { background: #FFF8F0; }

/* 13. Returns --------------------------------------------------------------- */
.board--returns { grid-template-columns: repeat(var(--cols, 5), minmax(220px, 1fr)); min-width: calc(var(--cols, 5) * 230px); }
.board--returns { align-items: stretch; }
.board--returns .col { min-height: 0; }
.card--ret { gap: 8px; }
.card--ret .card__top .lead { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tag-new { background: var(--orange-200); color: var(--orange-900); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.card__meta { border-top: 1px solid var(--line-100); padding-top: 10px; font-size: 14px; color: var(--ink-600); display: flex; justify-content: space-between; gap: 8px; }
.card__meta b { font-weight: 500; color: var(--ink-900); white-space: nowrap; }
.input { height: 42px; border: 1px solid var(--line-300); border-radius: 8px; padding: 0 12px; font-size: 15px; font-weight: 400; background: #fff; width: 100%; }
.input:hover { border-color: #C9C9C6; }
.input:focus { border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(255, 102, 0, .16); outline: none; }
.opt-row { display: flex; gap: 8px; }
.opt { flex: 1; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-300); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.opt:hover { border-color: #BDBDBA; background: var(--surface-50); }
.opt.is-on { border-color: var(--ink-900); }
.legend { font-weight: 500; padding: 0 0 8px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }

/* 14. Refunds --------------------------------------------------------------- */
.rf-main { flex: 2 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.rf-panel { flex: 1 1 320px; min-width: 0; border: 1px solid var(--line-200); border-radius: 12px; overflow: hidden; background: #fff; }
.rf-panel:empty { display: none; }
.rf-panel.enter { animation: k-slide 360ms var(--k-ease) backwards; }
.rf-panel__head { padding: 16px 18px; border-bottom: 1px solid var(--line-100); display: flex; flex-direction: column; gap: 6px; }
.rf-panel__head h2 { font-size: 18px; font-weight: 600; }
.rf-panel__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rf-panel__sub { font-size: 14px; color: var(--ink-600); }
.rf-panel__sub a { text-decoration: underline; }
.rf-panel__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.rf-panel__foot { padding: 14px 18px; border-top: 1px solid var(--line-100); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.rf-amount { display: flex; justify-content: space-between; align-items: baseline; }
.rf-amount span:first-child { font-size: 14px; color: var(--ink-600); }
.rf-amount span:last-child { font-size: 28px; font-weight: 600; letter-spacing: -.5px; }
.kv-grid { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 8px; font-size: 14px; }
.kv-grid > span:nth-child(odd) { color: var(--ink-600); }
.kv-grid > span:nth-child(even) { text-align: right; }
.kv-grid > .badge { justify-self: end; letter-spacing: .4px; }
.opt--dest { font-size: 14px; }
.opt--dest .end { margin-left: auto; color: var(--ink-500); }
.opt--dest .end.ok { color: var(--ok); font-weight: 500; }
.col-stack { display: flex; flex-direction: column; gap: 8px; }
.tbl--refunds { min-width: 720px; }
.tbl--refunds td:first-child { box-shadow: inset 3px 0 0 transparent; }
.tbl--refunds tr.is-cur td { background: #FFF8F0; }
.tbl--refunds tr.is-cur td:first-child { box-shadow: inset 3px 0 0 var(--orange-500); }
.rowpick { border: 0; background: transparent; padding: 0; margin: 0; text-align: left; color: inherit; }
.rowpick b { display: block; font-weight: 600; }
.rowpick span { display: block; font-size: 13px; color: var(--ink-500); }
.done-panel { padding: 40px 20px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.done-panel b { font-weight: 600; font-size: 16px; }
.done-panel span { font-size: 14px; color: var(--ink-500); }

/* 15. System preferences ---------------------------------------------------- */
.switch > span { box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.prefs { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.prefs__nav { flex: 1 1 200px; max-width: 100%; display: flex; flex-direction: column; gap: 2px; }
.prefs__nav a { padding: 9px 12px; border-radius: 8px; font-size: 15px; color: var(--ink-600); }
.prefs__nav a:hover { background: var(--surface-100); color: var(--ink-900); }
.prefs__nav a[aria-current=page] { background: var(--surface-150); color: var(--ink-900); font-weight: 600; }
.prefs__body { flex: 4 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.psec { overflow: hidden; }
.psec__head { padding: 16px 20px; border-bottom: 1px solid var(--line-100); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.psec__head h2 { font-size: 17px; font-weight: 600; }
.psec__head p { margin-top: 4px; font-size: 14px; color: var(--ink-600); }
.psec__grid { padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.psec__row { padding: 16px 20px; border-top: 1px solid var(--line-100); display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.psec__head + .psec__row { border-top: 0; }
.psec__row > div { display: flex; flex-direction: column; gap: 2px; }
.psec__row b { font-size: 15px; font-weight: 500; }
.psec__row span { font-size: 14px; color: var(--ink-600); }
.dirty-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: var(--orange-50); color: var(--orange-900); border: 1px solid var(--orange-300); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; margin-top: 4px; }
.dirty-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange-500); }
.tbl--types { min-width: 560px; }
.tbl--types th { padding: 10px 8px; }
.tbl--types th:first-child, .tbl--types td:first-child, .tbl--types th:last-child, .tbl--types td:last-child { padding-left: 20px; padding-right: 20px; }
.tbl--types td { color: var(--ink-800); }
.tbl--types td:first-child { font-weight: 500; color: var(--ink-900); }
.status-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-100); border: 1px solid transparent; border-radius: 6px; padding: 3px 8px; font-size: 13px; color: var(--ink-800); }
.status-btn:hover { background: #F7F7F5; border-color: #C9C9C6; }
.soon { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.soon h2 { font-size: 18px; font-weight: 600; }
.soon p { font-size: 14px; color: var(--ink-600); max-width: 420px; }

/* 16. Profile --------------------------------------------------------------- */
.pf-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pf-main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pf-card { border-radius: 12px; overflow: hidden; }
.pf-card__band { height: 72px; background: var(--orange-50); border-bottom: 1px solid #F6E0C2; }
.pf-card__body { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.pf-card__top { display: flex; align-items: flex-end; justify-content: space-between; margin-top: -36px; }
.pf-avatar { width: 72px; height: 72px; border-radius: 50%; background: #EFE6DC; color: #6B3D14; font-size: 24px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 4px solid #fff; }
.pf-name { font-size: 20px; font-weight: 600; }
.pf-role { font-size: 14px; color: var(--ink-600); }
.shift-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: var(--ok-bg); color: var(--ok-ink); border-radius: 6px; padding: 4px 10px; font-size: 13px; font-weight: 500; }
.pf-facts { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 10px; font-size: 14px; border-top: 1px solid var(--line-100); padding-top: 14px; }
.pf-facts > span:nth-child(odd) { color: var(--ink-500); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface-50); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 24px; font-weight: 600; letter-spacing: -.4px; }
.stat span { font-size: 13px; color: var(--ink-600); }
.sec-row { padding: 16px 20px; border-top: 1px solid var(--line-100); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.psec__head + .sec-row { border-top: 0; }
.sec-row > div { display: flex; flex-direction: column; gap: 2px; }
.sec-row b { font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.sec-row > div > span { font-size: 14px; color: var(--ink-600); }
.sec-label { padding: 16px 20px 8px; border-top: 1px solid var(--line-100); font-size: 15px; font-weight: 500; }
.session { padding: 10px 20px; display: flex; align-items: center; gap: 12px; }
.session__icon { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-100); display: flex; align-items: center; justify-content: center; color: var(--ink-600); flex: none; }
.session__text { flex: 1; min-width: 0; }
.session__text b { display: block; font-size: 14px; font-weight: 500; }
.session__text span { font-size: 13px; color: var(--ink-500); }
.session__here { font-size: 13px; color: var(--ok); font-weight: 500; }
.alerts-row { padding: 14px 20px; }

/* 17. Design-system page ----------------------------------------------------- */
.ds { max-width: 1440px; margin: 0 auto; padding: 32px 48px 64px; display: flex; flex-direction: column; gap: 48px; }
.ds-back { font-size: 14px; color: var(--ink-500); margin-bottom: -28px; }
.ds-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--line-200); padding-bottom: 28px; }
.ds-head__text { display: flex; flex-direction: column; gap: 12px; }
.ds-logo { height: 40px; width: auto; align-self: flex-start; }
.ds-head h1 { font-size: 44px; font-weight: 600; letter-spacing: -1px; line-height: 1.1; }
.ds-head p { font-size: 17px; color: var(--ink-600); max-width: 760px; }
.ds-ver { font-size: 13px; color: var(--ink-500); }
.ds-sec { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ds-sec > h2 { font-size: 24px; font-weight: 600; }
.ds-logos { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.ds-logos figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ds-logo-box { height: 200px; border: 1px solid var(--line-200); border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ds-logo-box img { width: auto; max-width: 100%; }
.ds-logos figcaption { font-size: 13px; color: var(--ink-600); }
.ds-logos figcaption strong { color: var(--ink-900); font-weight: 600; }
.ds-group { display: flex; flex-direction: column; gap: 12px; }
.ds-gtitle { font-size: 14px; font-weight: 600; color: var(--ink-800); }
.ds-swatches { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.ds-sw { border: 1px solid var(--line-200); border-radius: 10px; overflow: hidden; }
.ds-sw__chip { height: 72px; display: flex; align-items: flex-end; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.ds-sw__meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ds-sw__meta b { font-size: 14px; font-weight: 500; }
.ds-sw__meta span { font-size: 12px; color: var(--ink-500); }
.ds-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.ds-note { font-size: 14px; color: var(--ink-600); }
.ds-types { border: 1px solid var(--line-200); border-radius: 10px; }
.ds-type { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line-100); }
.ds-type:first-child { border-top: 0; }
.ds-type .mono { font-size: 12px; color: var(--ink-500); white-space: nowrap; }
.ds-spaces { display: flex; flex-direction: column; gap: 10px; }
.ds-space { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--ink-600); }
.ds-space .mono { font-size: 12px; color: var(--ink-500); width: 64px; }
.ds-space i { height: 14px; background: var(--orange-200); border: 1px solid var(--orange-300); border-radius: 2px; flex: none; }
.ds-radii { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ds-radius { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.ds-radius div { height: 56px; background: var(--surface-100); border: 1px solid var(--line-300); }
.ds-radius span { color: var(--ink-600); }
.ds-radius strong { color: var(--ink-900); font-weight: 600; }
.ds-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ds-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ds-box { border: 1px solid var(--line-200); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ds-box--lg { padding: 20px; gap: 14px; }
.ds-cap { font-size: 12px; font-weight: 600; color: var(--ink-500); letter-spacing: .4px; }
.ds-box--lg > .ds-cap { font-size: 13px; }
.ds-hint { font-size: 13px; color: var(--ink-500); }
.ds-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ds-sidebars { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.ds-frame { display: flex; border: 1px solid var(--line-100); border-radius: 10px; overflow: hidden; }
.sidebar--demo { position: static; height: 640px; min-height: 0; border-right: 0; }
.ds-list { padding-left: 18px; list-style: disc; font-size: 14px; color: var(--ink-800); line-height: 1.6; max-width: 520px; }
.ds-icons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ds-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; background: var(--surface-50); border-radius: 8px; font-size: 12px; color: var(--ink-600); }
.ds-icon svg { color: var(--ink-900); }
@media (max-width: 1100px) {
  .ds-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-grid3, .ds-two, .ds-logos { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ds { padding: 20px 16px 48px; gap: 36px; }
  .ds-head h1 { font-size: 32px; }
  .ds-swatches, .ds-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-icons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
