:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #203544;
  --ink: #172c3a;
  --muted: #586c79;
  --subtle: #677c89;
  --accent: #087e98;
  --teal-ink: #08677c;
  --teal-soft: #e5f5f8;
  --line: #dfe8ed;
  --surface: #fff;
  --canvas: #f3f7fa;
  --sidebar: 224px;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; background: var(--canvas); font-size: .875rem; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid #0086a9; outline-offset: 2px; }
[hidden], .icon-library { display: none !important; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.workspace { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  height: 100dvh; position: sticky; top: 0; z-index: 3; display: flex; flex-direction: column;
  background: white; border-right: 1px solid var(--line); padding: 0 17px;
}
.brand { height: 81px; display: flex; align-items: center; padding: 6px 5px 0; }
.brand img { width: 100%; height: auto; max-width: 185px; display: block; }
.brand .brand-mark, .sidebar-toggle { display: none; }
.sidebar-content { overflow: auto; padding: 26px 1px 14px; }
.nav-title { display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: .7rem; font-weight: 750; text-transform: uppercase; color: var(--subtle); letter-spacing: .105em; margin-bottom: 10px; }
.nav-title .icon { width: 15px; height: 15px; }
.nav-button {
  width: 100%; display: flex; align-items: center; text-align: left; gap: 10px; min-height: 42px; border: 0;
  padding: 0 10px; border-radius: 8px; background: transparent; color: #415965; font-weight: 650;
}
.nav-button:hover { background: #f1f7fa; }
.nav-button[aria-current="page"] { background: var(--teal-soft); color: var(--teal-ink); }
.nav-button[aria-current="page"] .nav-count { color: var(--teal-ink); background: #fff; }
.nav-count { margin-left: auto; font-size: .75rem; font-variant-numeric: tabular-nums; min-width: 25px; min-height: 21px; display: grid; place-items: center; border-radius: 5px; padding: 0 5px; color: #607480; font-weight: 700; }
.owner-nav { margin-top: 26px; }
.owner-nav .nav-button { min-height: 39px; }
.owner-dot { width: 8px; height: 8px; margin: 0 5px 0 3px; border-radius: 3px; background: var(--owner-color); flex: none; }
.sidebar-footer { margin-top: auto; padding: 14px 0 20px; background: white; }
.source-card { padding: 11px 9px; border: 1px solid #e6eef2; border-radius: 10px; background: #f7fafc; display: flex; align-items: center; gap: 8px; }
.source-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--teal-ink); background: #e4f1f5; flex: none; }
.source-icon .icon { width: 15px; height: 15px; }
.source-card strong, .source-card small { display: block; }
.source-card strong { font-size: .75rem; color: #2a4250; }
.source-card small { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.topbar { height: 63px; border-bottom: 1px solid var(--line); background: white; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; gap: 12px; }
.topbar-left { display: flex; align-items: center; gap: 9px; color: var(--muted); }
.breadcrumb-icon { display: grid; align-items: center; color: #66808d; }
.breadcrumb-icon .icon { width: 16px; height: 16px; }
.breadcrumb-divider { width: 13px; height: 13px; color: #7c919c; }
.breadcrumb-current { font-weight: 730; color: var(--ink); }
.demo-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 30px; background: #edf7f9; color: #096579; border: 1px solid #d8eef3; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.demo-pill span { width: 7px; height: 7px; background: #0d8da3; border-radius: 50%; }
.main-content { max-width: 1920px; padding: 20px 30px 34px; margin: auto; container-type: inline-size; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 132px; display: flex; align-items: center;
  border-radius: 16px; color: white; background: linear-gradient(110deg,#07384b 0%,#08536a 46%,#092c39 100%);
  box-shadow: 0 6px 18px #104c641c;
}
.hero-copy { position: relative; z-index: 1; padding: 15px 26px; }
.hero-label { font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .16em; color: #a9e5f0; }
h1, h2, p { margin: 0; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 3vw, 2.75rem); font-weight: 750; line-height: 1.12; letter-spacing: -.055em; margin: 3px 0 6px; }
.hero p { color: #d5eef4; font-size: .98rem; line-height: 1.45; }
.hero-photo {
  position: absolute; inset: 0 0 0 auto; width: 61%; height: 100%; object-fit: cover;
  object-position: 68% 70%; pointer-events: none; mask-image: linear-gradient(90deg,transparent,black 32%);
}
@property --metric-share { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --ring-late-end { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --ring-today-end { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@property --ring-upcoming-end { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
.metrics { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; margin: 13px 0 14px; }
.metric {
  text-align: left; display: flex; align-items: center; gap: 8px; min-height: 66px; padding: 8px 10px; min-width: 0;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 2px 5px #20354405;
}
.metric:hover, .metric[aria-pressed="true"] { border-color: #8bcbd8; background: #fcfeff; }
.metric[aria-pressed="true"] { box-shadow: inset 0 0 0 1px #8bcbd8; }
.metric-ring {
  position: relative; width: 39px; height: 39px; flex: none; display: grid; place-items: center;
  color: var(--metric-fg); border-radius: 50%;
  background: conic-gradient(var(--metric-fg) 0% var(--metric-share, 0%), #e5edf1 var(--metric-share, 0%) 100%);
}
.metric-ring::before { content: ""; position: absolute; inset: 4px; border: 1px solid white; border-radius: inherit; background: var(--metric-bg); }
.metric-ring .icon { position: relative; width: 16px; height: 16px; }
.metric-all .metric-ring {
  background: conic-gradient(
    #ae293b 0% var(--ring-late-end, 0%),
    #bf652a var(--ring-late-end, 0%) var(--ring-today-end, 0%),
    #346787 var(--ring-today-end, 0%) var(--ring-upcoming-end, 0%),
    #087b93 var(--ring-upcoming-end, 0%) 100%
  );
}
.metric-all .metric-ring[data-empty] { background: #e5edf1; }
.metric-copy { display: grid; gap: 3px; min-width: 0; }
.metric-label { font-size: .75rem; line-height: 1.2; color: var(--muted); font-weight: 650; }
.metric-number { order: -1; font-size: 1.55rem; line-height: 1.1; color: var(--ink); font-weight: 760; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric-all { --metric-fg: #087b93; --metric-bg: #e4f5f8; }
.metric-due { --metric-fg: #a24815; --metric-bg: #ffefdf; }
.metric-late { --metric-fg: #ae293b; --metric-bg: #fcecef; }
.metric-upcoming { --metric-fg: #346787; --metric-bg: #eaf3fa; }
.metric-flagged { --metric-fg: #960b55; --metric-bg: #f9e8f1; }
.metric-ready { --metric-fg: #246a55; --metric-bg: #e5f4ec; }
@container (max-width: 850px) {
  .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
.order-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 10px #213b4807; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 17px 18px 15px; }
.card-title-row { display: flex; align-items: center; gap: 9px; }
.card-header h2 { font-size: 1.24rem; line-height: 1.2; letter-spacing: -.026em; font-weight: 750; color: var(--ink); }
.card-header p { margin-top: 6px; color: var(--muted); font-size: .82rem; }
.queue-actions, .queue-view { display: flex; align-items: center; gap: 7px; }
.queue-view { padding: 3px; gap: 3px; border: 1px solid var(--line); background: #f3f8fa; border-radius: 9px; }
.queue-view button { min-height: 31px; padding: 3px 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.queue-view button[aria-pressed="true"] { background: white; border-color: #d4e5eb; color: var(--teal-ink); }
.queue-view button span { margin-left: 3px; font-variant-numeric: tabular-nums; }
.result-badge { border-radius: 20px; color: var(--teal-ink); background: #eaf6f8; padding: 3px 8px; font-size: .72rem; font-weight: 750; }
.control {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px;
  padding: 0 10px; font-size: .81rem; font-weight: 680; color: #2c4958; background: #fff; border: 1px solid #d6e2e9; border-radius: 8px; white-space: nowrap;
}
.control:hover:not(:disabled), .control[aria-pressed="true"] { color: var(--teal-ink); background: var(--teal-soft); border-color: #abd5df; }
.control:disabled { opacity: .44; }
.control .icon { width: 16px; height: 16px; }
.export-button { color: var(--teal-ink); padding: 0 12px; }
.toolbar { display: flex; gap: 8px; padding: 0 18px 13px; align-items: stretch; flex-wrap: wrap; }
.order-filters { display: contents; }
.search-field {
  display: flex; align-items: center; flex: 1 1 214px; gap: 8px; min-height: 38px; min-width: 160px; border: 1px solid #d6e2e9; border-radius: 8px;
  padding: 0 9px 0 11px; color: #597482;
}
.search-field:focus-within { border-color: #2c97ae; box-shadow: 0 0 0 2px #d7eef2; }
.search-field .icon { width: 17px; height: 17px; }
.search-field input { outline: none; width: 100%; min-width: 0; border: 0; background: transparent; font-size: .84rem; color: var(--ink); padding: 7px 0; }
.search-field input::placeholder { color: #5d7481; opacity: 1; }
.search-field input:focus-visible { outline: 0; }
kbd { color: #617985; background: #f4f8fa; border: 1px solid #e2ebf0; border-radius: 4px; padding: 1px 5px; font-size: .7rem; }
.select-field { position: relative; display: inline-flex; }
.select-field select { width: 100%; appearance: none; min-height: 38px; padding: 0 29px 0 10px; border: 1px solid #d6e2e9; border-radius: 8px; color: #2f4b58; background: white; font-size: .8rem; font-weight: 620; }
.select-field select:hover { border-color: #acc7d1; }
.select-field .icon { position: absolute; pointer-events: none; top: 50%; right: 8px; transform: translateY(-50%); width: 15px; height: 15px; color: #607985; }
.toolbar-actions { display: flex; gap: 7px; margin-left: auto; }
.icon-button { padding: 0; width: 38px; }
.columns-menu { position: relative; }
.columns-menu summary { list-style: none; min-height: 38px; }
.columns-menu summary::-webkit-details-marker { display: none; }
.columns-menu[open] summary { color: var(--teal-ink); background: var(--teal-soft); border-color: #abd5df; }
.columns-popover {
  z-index: 5; position: absolute; right: 0; top: calc(100% + 7px); width: 238px; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 12px 32px #12384926;
}
.popover-title { display: flex; align-items: center; justify-content: space-between; margin: 1px 2px 7px; }
.text-button { border: 0; background: transparent; color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; font-size: .8rem; font-weight: 680; }
.column-option { display: flex; min-height: 30px; align-items: center; gap: 8px; padding: 0 3px; border-radius: 5px; color: #354d5b; cursor: pointer; }
.column-option:hover { background: #f2f8fa; }
.column-option input { accent-color: var(--accent); width: 15px; height: 15px; }
.active-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.filter-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; background: #edf8fa; padding: 4px 7px 4px 9px; border: 1px solid #d5edf1; color: var(--teal-ink); font-weight: 650; font-size: .75rem; }
.filter-chip .icon { width: 13px; height: 13px; }
.table-wrap { position: relative; overflow: auto; width: 100%; outline-offset: -2px; }
.progress-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 0 18px 9px; font-size: .77rem; color: var(--muted); }
.progress-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.legend-mark { font-size: 1rem; font-weight: 750; line-height: 1; }
.legend-done { color: var(--teal-ink); }
.legend-not-required { color: #606773; }
.legend-issue { color: #960b55; }
.progress-legend .legend-scroll { display: none; margin-left: auto; }
.order-card.has-grid-overflow .legend-scroll { display: inline-flex; }
.progress-grid { table-layout: fixed; }
.progress-grid:has(.progress-row), .progress-grid:has(.group-row) { min-width: 850px; }
.progress-grid thead th { height: 49px; padding: 6px 3px; white-space: normal; text-align: center; line-height: 1.22; background: #e7f3f7; color: #375b6c; }
.progress-grid thead th:first-child { width: clamp(137px, 16vw, 220px); padding-left: 14px; }
.progress-grid thead th:nth-child(2) { width: clamp(109px, 12vw, 164px); padding-left: 10px; }
.progress-grid thead th:nth-child(9), .progress-grid thead th:last-child { width: clamp(65px, 7vw, 91px); }
.progress-grid thead th:nth-child(-n+2) { text-align: left; }
.progress-grid thead th:first-child, .progress-grid .progress-order { position: sticky; left: 0; z-index: 1; }
.has-grid-overflow .progress-grid :is(thead th:first-child, .progress-order) { box-shadow: 3px 0 5px #23495516; }
.progress-grid .group-toggle { position: sticky; left: 10px; width: auto; }
.progress-row { cursor: pointer; }
.progress-grid .progress-row td { height: 64px; padding: 5px 3px; text-align: center; }
.progress-grid .progress-row td:nth-child(2) { text-align: left; padding-inline: 10px; }
.progress-grid .progress-order { height: 64px; padding: 6px 7px 6px 14px; border-bottom: 1px solid #edf2f4; background: #fff; font-size: .84rem; }
.progress-grid .progress-row:hover > *, .progress-grid .progress-row:focus-within > * { background: #f5fafb; }
.progress-grid .progress-order .order-link { padding: 1px 0; font-size: .87rem; }
.progress-customer { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 650; color: #29414f; }
.progress-order-meta { display: flex; flex-wrap: wrap; gap: 2px 7px; margin-top: 3px; color: var(--muted); font-size: .71rem; font-weight: 620; }
.progress-order-meta span { border-radius: 4px; padding: 0 4px; background: #edf3f5; }
.progress-meter { --meter-color: #087e98; --meter-track: #e4edf0; }
.progress-meter.progress-due { --meter-color: #ad4e17; --meter-track: #ffe3c8; }
.progress-meter.progress-late { --meter-color: #ad2839; --meter-track: #f9dce1; }
.progress-meter-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: 1px 6px; color: var(--meter-color); font-size: .71rem; font-weight: 700; }
.progress-meter-label strong { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 1rem; }
.progress-track { height: 7px; margin: 4px 0; overflow: hidden; background: var(--meter-track); border-radius: 10px; }
.progress-track span { display: block; height: 100%; background: var(--meter-color); border-radius: inherit; }
.progress-updated { display: block; color: var(--muted); font-size: .67rem; line-height: 1.2; white-space: normal; }
.milestone {
  display: inline-flex; justify-content: center; align-items: center; gap: 5px; min-width: 34px; min-height: 34px; padding: 4px;
  color: #587482; border: 1px solid #d3e1e7; border-radius: 7px; background: white; font-weight: 700;
}
.milestone:hover:not(:disabled) { color: var(--teal-ink); border-color: #74b6c7; background: #e9f7fa; }
.milestone[data-value="1"] { color: white; border-color: #087b94; background: #087b94; }
.milestone[data-value="2"] { color: #960b55; border-color: #e2a7c4; background: #f9e5ef; }
.milestone[data-value="3"] { color: #505865; border-color: #c4c9d0; background: #eceef1; }
.milestone[data-value="0"][data-milestone="9"] { color: var(--teal-ink); border-color: #b1dce6; background: #e8f6f8; }
.milestone .milestone-complete-icon { width: 17px; height: 17px; }
.orders-table tbody tr.is-archiving > * { background: #e4f5f6; }
.milestone:disabled { opacity: .7; }
.milestone-mark { font-size: 1rem; line-height: 1; }
.milestone-status { display: block; font-size: .72rem; font-weight: 600; }
.reopen-button { font-size: .71rem; padding-inline: 1px; }
.detail-milestone-buttons { margin-block: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.detail-milestone-buttons .milestone { justify-content: flex-start; padding: 8px; text-align: left; font-size: .8rem; }
.tracking-links { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-bottom: 7px; font-size: .8rem; }
.tracking-links:empty { display: none; }
.tracking-links a { color: var(--teal-ink); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .85rem; }
thead { color: #526977; background: #f4f8fa; }
th { text-align: left; font-size: .76rem; white-space: nowrap; padding: 0 9px; height: 40px; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 16px; }
thead tr { border-top: 1px solid #e5edf1; border-bottom: 1px solid #e3ebef; }
.sort-button { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: transparent; font: inherit; font-weight: 750; color: inherit; white-space: nowrap; }
.sort-button:hover, th[aria-sort] .sort-button { color: var(--teal-ink); }
.sort-button .icon { width: 13px; height: 13px; opacity: .56; }
th[aria-sort] .sort-button .icon { opacity: 1; }
th[aria-sort="ascending"] .sort-button .icon { transform: rotate(180deg); }
td { height: 51px; padding: 5px 9px; white-space: nowrap; border-bottom: 1px solid #edf2f4; }
tbody tr:last-child td { border-bottom: 0; }
.order-row { cursor: pointer; }
.order-row:hover, .order-row:focus-within { background: #f5fafb; }
.order-link { color: var(--teal-ink); background: transparent; font-size: .86rem; border: 0; padding: 4px 0; font-weight: 780; white-space: nowrap; }
.order-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.customer-cell { max-width: 196px; overflow: hidden; text-overflow: ellipsis; font-weight: 650; color: #263f4c; }
.owner-tag { padding: 3px 6px; border-radius: 5px; background: #eef3f6; color: #426173; font-size: .73rem; font-weight: 740; font-variant-numeric: tabular-nums; }
.choice-editor { position: relative; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 2px 4px; margin: 0 -4px; border: 1px solid transparent; border-radius: 7px; }
.choice-editor:hover, .choice-editor:focus-within { border-color: #b8d4de; background: #f3f9fa; }
.choice-editor:has(.choice-input:focus-visible) { outline: 2px solid #0086a9; outline-offset: 1px; }
.choice-editor .icon { width: 13px; height: 13px; color: #537382; }
.choice-editor.is-empty { width: calc(100% + 8px); justify-content: flex-end; }
.choice-editor.is-empty .icon { opacity: 0; }
.choice-editor.is-empty:hover .icon, .choice-editor.is-empty:focus-within .icon { opacity: 1; }
.choice-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.choice-tag { display: inline-block; background: var(--choice-bg); color: var(--choice-fg); font-size: .75rem; font-weight: 720; line-height: 1.2; padding: 4px 8px; border-radius: 20px; white-space: nowrap; }
.status-sent-proof { --choice-fg: #00568b; --choice-bg: #dbeefb; }
.status-proof-approved { --choice-fg: #005e54; --choice-bg: #cfefea; }
.status-items-ordered { --choice-fg: #484077; --choice-bg: #e3dff5; }
.status-vendor-shipped, .production-alterations { --choice-fg: #784900; --choice-bg: #fce8b9; }
.status-decoration, .production-silkscreen { --choice-fg: #2d5c10; --choice-bg: #d1efd0; }
.status-shipped { --choice-fg: #fff; --choice-bg: #4059cf; }
.status-ready-for-pick-up { --choice-fg: #fff; --choice-bg: #3c7210; }
.status-invoiced, .production-embroidery { --choice-fg: #00585d; --choice-bg: #c6f3f4; }
.status-back-order { --choice-fg: #fff; --choice-bg: #a53d09; }
.status-complete { --choice-fg: #fff; --choice-bg: #006f75; }
.status-cancelled { --choice-fg: #fff; --choice-bg: #a1262e; }
.production-heat-seal { --choice-fg: #941e30; --choice-bg: #fbd0d5; }
.production-hard-goods { --choice-fg: #fff; --choice-bg: #006aac; }
.choice-feedback { color: var(--teal-ink); font-size: .8rem; }
.choice-feedback:not(:empty) { margin-top: 10px; }
.date-cell { color: #4d6573; font-variant-numeric: tabular-nums; }
.date-late { color: #a14032; font-weight: 690; }
.date-today { color: #946017; font-weight: 680; }
.amount-cell { color: var(--ink); font-weight: 730; font-variant-numeric: tabular-nums; text-align: right; }
.amount-heading { text-align: right; }
.extra-cell { max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: #4e6471; }
.po-cell { max-width: 132px; font-variant-numeric: tabular-nums; }
.row-chevron { width: 13px; height: 13px; vertical-align: middle; color: #6c8796; }
.mobile-cell-label, .mobile-sort, .mobile-filters-button { display: none; }
.group-row td { height: 42px; background: #edf6f8; color: #145d70; border-bottom: 1px solid #dcecef; }
.group-toggle { border: 0; padding: 0; background: none; display: inline-flex; gap: 8px; align-items: center; font-weight: 750; }
.group-toggle .icon { width: 15px; height: 15px; }
.group-toggle small { color: #4b6875; font-weight: 600; font-size: .75rem; }
.empty-state { min-height: 200px; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 20px; white-space: normal; }
.empty-state .icon { color: var(--teal-ink); width: 29px; height: 29px; }
.empty-state p { color: var(--muted); }
.table-footer { min-height: 59px; border-top: 1px solid var(--line); padding: 8px 17px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .8rem; }
.page-controls, .page-size { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.page-size { margin-right: 7px; }
.page-size select { min-height: 30px; }
.page-button { width: 31px; min-height: 30px; }
.mobile-menu, .mobile-scrim { display: none; }
.order-dialog { margin: 0 0 0 auto; width: min(100%, 552px); max-width: none; height: 100dvh; max-height: none; padding: 0; border: 0; color: var(--ink); background: #f5f9fb; box-shadow: -12px 0 55px #06263338; }
.order-dialog::backdrop { background: #102e42a6; }
.detail-header { position: sticky; z-index: 2; top: 0; background: white; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); padding: 23px 23px 18px; }
.detail-overline { color: var(--teal-ink); font-size: .73rem; letter-spacing: .09em; text-transform: uppercase; font-weight: 750; margin-bottom: 5px; }
.detail-header h2 { font-size: 1.85rem; letter-spacing: -.04em; line-height: 1.15; margin-bottom: 6px; }
.detail-header p { color: var(--muted); }
.detail-content { display: grid; gap: 13px; padding: 16px 22px 24px; }
.detail-panel { border: 1px solid var(--line); border-radius: 11px; background: white; padding: 15px; }
.detail-panel h3 { margin: 0 0 11px; font-size: .98rem; }
.detail-facts { display: grid; margin: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 10px; }
.detail-facts dt { color: var(--muted); font-size: .75rem; margin-bottom: 4px; }
.detail-facts dd { margin: 0; font-size: .9rem; font-weight: 650; overflow-wrap: anywhere; }
.detail-facts .detail-wide { grid-column: 1 / -1; }
.detail-items { width: 100%; border-collapse: collapse; }
.detail-items td { white-space: normal; height: auto; padding: 7px 5px; vertical-align: top; }
.detail-items th { height: 32px; padding: 0 5px; }
.detail-items th:last-child, .detail-items td:last-child { text-align: right; white-space: nowrap; }
.item-vendor { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.detail-notes { display: block; width: 100%; padding: 8px 9px; resize: vertical; min-height: 85px; border: 1px solid #ccdde5; border-radius: 7px; margin: 0 0 9px; color: var(--ink); }
.note-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.note-footer small { color: var(--muted); line-height: 1.35; }
.primary-button { background: #087e98; color: white; border-color: #087e98; }
.primary-button:hover:not(:disabled) { background: #056a81; color: white; border-color: #056a81; }
.toast { position: fixed; bottom: 18px; right: 18px; z-index: 10; border-radius: 9px; background: #103d4b; color: white; padding: 12px 17px; box-shadow: 0 5px 18px #0b37443b; font-weight: 650; max-width: calc(100% - 36px); }
.toast-undo { margin-left: 10px; padding: 3px 7px; border: 1px solid #b2dbe5; border-radius: 5px; background: white; color: var(--teal-ink); font-weight: 750; }
@media (min-width: 1001px) {
  .workspace.sidebar-folded { grid-template-columns: 57px minmax(0,1fr); }
  .sidebar-toggle { position: absolute; z-index: 2; right: -14px; top: 17px; width: 28px; min-height: 28px; padding: 0; border-radius: 50%; display: inline-flex; color: var(--teal-ink); box-shadow: 0 2px 6px #244d601a; }
  .sidebar-toggle .icon { width: 15px; height: 15px; }
  .sidebar-folded .sidebar { padding-inline: 9px; }
  .sidebar-folded .brand { justify-content: center; padding-inline: 0; }
  .sidebar-folded .brand .brand-mark { display: block; width: 24px; }
  .sidebar-folded :is(.brand-lockup, .sidebar-content, .sidebar-footer) { display: none; }
}
@media (max-width: 1220px) {
  :root { --sidebar: 196px; }
  .sidebar { padding-inline: 13px; }
  .main-content { padding-inline: 20px; }
  .topbar { padding-inline: 20px; }
  .metric { gap: 9px; padding-inline: 10px; }
  .metrics { gap: 10px; }
  th, td { padding-inline: 7px; }
}
@media (max-width: 1000px) {
  .workspace { grid-template-columns: minmax(0,1fr); }
  .sidebar { display: none; position: fixed; top: 0; left: 0; width: 236px; box-shadow: 8px 0 33px #18304c26; z-index: 7; }
  .sidebar.is-open { display: flex; }
  body:has(.sidebar.is-open) { overflow: hidden; }
  .sidebar .brand { justify-content: space-between; gap: 6px; padding-inline: 0; flex: none; }
  .sidebar .brand img { width: calc(100% - 50px); }
  .mobile-menu { display: inline-flex; min-height: 44px; width: 44px; flex: none; }
  .sidebar .nav-button { min-height: 44px; }
  .mobile-scrim { display: block; position: fixed; inset: 0; z-index: 6; background: #0c263e70; }
  .main-content { padding-top: 19px; }
}
@media (max-width: 660px) {
  .topbar { height: 57px; padding-inline: 12px; }
  .breadcrumb-icon, .breadcrumb-parent, .breadcrumb-divider { display: none; }
  .main-content { padding: 13px 11px 22px; }
  .hero { min-height: 92px; }
  .hero-copy { padding: 16px; }
  .hero h1 { font-size: 2.05rem; margin-bottom: 0; }
  .hero p { display: none; }
  .hero-photo { opacity: .68; width: 68%; mask-image: linear-gradient(90deg,transparent,black 58%); }
  .metrics { gap: 6px; margin: 10px 0; }
  .metric { min-height: 54px; padding-block: 6px; }
  .metric-ring { width: 30px; height: 30px; }
  .metric-ring::before { inset: 3px; }
  .metric-ring .icon { width: 14px; height: 14px; }
  .metric-number { font-size: 1.27rem; }
  .card-header { padding: 13px 10px 10px; align-items: flex-start; flex-direction: column; }
  .queue-actions { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .queue-view button { min-height: 36px; }
  .toolbar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; padding-inline: 10px; }
  .search-field { grid-column: 1 / -1; min-width: 0; min-height: 44px; }
  .search-field kbd { display: none; }
  .search-field input, .select-field select, .choice-input, .detail-notes { font-size: 1rem; }
  .toolbar .select-field, .toolbar .select-field select { min-width: 0; }
  .toolbar .select-field select { min-height: 44px; padding-inline: 8px 24px; text-overflow: ellipsis; }
  .mobile-sort, .mobile-filters-button { display: inline-flex; }
  .mobile-filters-button[aria-expanded="true"] { color: var(--teal-ink); background: var(--teal-soft); }
  .order-filters { display: none; grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .order-filters.is-open { display: grid; }
  .toolbar-actions { margin-left: 0; }
  .tool-button { min-width: 44px; }
  .tool-button span { display: none; }
  .layout-button { min-height: 44px; }
  .tool-button, .columns-menu summary, .export-button, .mobile-filters-button { min-height: 44px; }
  .columns-popover { max-width: calc(100vw - 46px); }
  .column-option { min-height: 40px; }
  .table-wrap:not(:has(.progress-grid)) { overflow: visible; padding: 0 10px 8px; }
  .orders-table:not(.progress-grid), .orders-table:not(.progress-grid) :is(.group-row, .group-row td) { display: block; }
  .orders-table:not(.progress-grid) thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .orders-table:not(.progress-grid) thead button { display: none; }
  .orders-table:not(.progress-grid) tbody { display: grid; gap: 8px; }
  .order-row {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 12px;
    padding: 10px 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  }
  .order-row td { display: block; height: auto; min-width: 0; max-width: none; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
  .order-row [data-column="number"] { grid-area: 1 / 1; align-self: center; }
  .order-row [data-column="owner"] { grid-area: 1 / 2; justify-self: end; align-self: center; }
  .order-row [data-column="customer"] { grid-column: 1 / -1; font-size: .96rem; }
  .order-row [data-column="notes"], .order-row [data-column="products"], .order-row [data-column="vendors"] { grid-column: 1 / -1; }
  .order-row .row-detail { display: none; }
  .order-link { min-height: 44px; font-size: .96rem; }
  .progress-grid .progress-order .order-link { min-height: 0; padding-block: 5px; }
  .progress-legend { padding-inline: 10px; }
  .mobile-cell-label { display: block; margin-bottom: 3px; color: var(--muted); font-size: .73rem; font-weight: 650; }
  .order-row :is([data-column="number"], [data-column="owner"], [data-column="customer"]) .mobile-cell-label { display: none; }
  .choice-editor, .choice-editor.is-empty { width: 100%; margin: 0; padding-inline: 5px; min-height: 44px; border-color: #d6e2e9; }
  .choice-editor { justify-content: space-between; }
  .choice-editor.is-empty .icon { opacity: 1; }
  .choice-tag { white-space: normal; }
  .group-row td { height: auto; padding: 0; border-radius: 8px; }
  .group-toggle { min-height: 44px; width: 100%; padding-inline: 10px; }
  .table-footer { padding-inline: 10px; }
  .page-controls { flex-wrap: wrap; row-gap: 5px; }
  .page-size { margin-right: 0; }
  .page-size select, .page-button { min-height: 44px; }
  .page-button { width: 44px; }
  .order-dialog { width: 100%; }
  body:has(.order-dialog[open]) { overflow: hidden; }
  .detail-content { padding-inline: 12px; grid-template-columns: minmax(0,1fr); }
  .detail-header { padding-inline: 14px; }
  .detail-header > div { min-width: 0; overflow-wrap: anywhere; }
  .detail-header .icon-button { min-height: 44px; width: 44px; flex: none; }
  .detail-panel { padding-inline: 11px; }
  .detail-items th { white-space: normal; }
}
@media (max-width: 480px) {
  .metric-ring { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; }
  .metric-ring .icon { display: none; }
  .metric-label { font-size: .74rem; }
  .metric { position: relative; min-height: 58px; padding-inline: 7px; }
  .layout-button { width: 44px; padding: 0; }
  .layout-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (pointer: coarse) {
  .milestone { min-width: 44px; min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .control, .nav-button, .metric { transition: background-color .15s ease, border-color .15s ease; }
  .metric-ring { transition: --metric-share .44s ease-out, --ring-late-end .44s ease-out, --ring-today-end .44s ease-out, --ring-upcoming-end .44s ease-out, transform .15s ease; }
  .metric:hover .metric-ring { transform: scale(1.07); }
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.page-controls[hidden] { display: none; }
