:root {
  --bg: #eef4fb;
  --bg-elevated: #f7fbff;
  --bg-card: rgba(255,255,255,0.95);
  --line: rgba(82,112,168,0.14);
  --text: #18324d;
  --muted: #5f7693;
  --accent: #2493d1;
  --ok: #1fa36a;
  --warn: #d98a18;
  --danger: #d94f69;
  --shadow: 0 10px 24px rgba(31,56,88,0.1);
}

:root[data-theme="dark"] {
  --bg: #07111f;
  --bg-elevated: #0d1b2e;
  --bg-card: rgba(13,27,46,0.93);
  --line: rgba(130,170,255,0.12);
  --text: #eef4ff;
  --muted: #96a7c3;
  --accent: #62d0ff;
  --ok: #63f59a;
  --warn: #ffb84d;
  --danger: #ff6978;
  --shadow: 0 10px 24px rgba(0,0,0,0.18);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; max-width: 100%; overflow-x: hidden; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%); color: var(--text); }
:root[data-theme="dark"] html, :root[data-theme="dark"] body { background: var(--bg); }
body { min-height: 100vh; max-width: 100%; overflow-x: hidden; }
button, input, textarea { font: inherit; }
button { border: none; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: white; color: var(--text); }
textarea { resize: vertical; }
.app-shell { display: grid; grid-template-columns: minmax(248px, 292px) minmax(0, 1fr); min-height: 100vh; width: 100%; max-width: 100vw; overflow-x: hidden; }
.sidebar { border-right: 1px solid rgba(82, 112, 168, 0.12); background: radial-gradient(circle at top left, rgba(98, 208, 255, 0.14), transparent 36%), linear-gradient(180deg, rgba(248,252,255,0.98), rgba(239,246,252,0.96)); padding: 26px 20px 20px; display: flex; flex-direction: column; gap: 22px; min-width: 0; box-shadow: inset -1px 0 0 rgba(255,255,255,0.4); }
:root[data-theme="dark"] .sidebar { border-right: 1px solid rgba(130, 170, 255, 0.12); background: radial-gradient(circle at top left, rgba(98, 208, 255, 0.08), transparent 34%), linear-gradient(180deg, rgba(7,18,31,0.98), rgba(5,14,25,0.96)); box-shadow: inset -1px 0 0 rgba(255,255,255,0.03); }
.brand { display: flex; gap: 14px; align-items: center; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; position: relative; background: linear-gradient(135deg, #2c5c8f, #4aa3d8); color: white; font-weight: 800; flex: 0 0 auto; box-shadow: 0 10px 24px rgba(98, 208, 255, 0.24); border: 1px solid rgba(160, 245, 220, 0.34); overflow: hidden; }
.brand-mark::before { content: ''; position: absolute; inset: 1px; border-radius: 13px; background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 55%); pointer-events: none; }
.brand-mark::after { content: ''; position: absolute; inset: -6px; background-image: url('/balancell-order-hub-icon.png?v=WEB_V37'); background-size: cover; background-position: center; background-repeat: no-repeat; z-index: 1; }
.brand h1 { margin: 0; font-size: 1.2rem; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.menu { display: grid; gap: 8px; }
.menu.menu-bubbles { display: grid; gap: 8px; overflow: visible; }
.menu-item { border: 1px solid transparent; border-radius: 14px; background: rgba(255,255,255,0.62); color: var(--text); padding: 12px 15px; text-align: left; cursor: pointer; min-width: 0; width: 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: flex-start; font-weight: 600; -webkit-tap-highlight-color: transparent; position: relative; box-shadow: none; }
.menu-item::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 999px; background: transparent; transition: 140ms ease; }
.menu-item:hover { background: rgba(98, 208, 255, 0.12); border-color: rgba(82, 112, 168, 0.16); }
.menu-item.active { background: linear-gradient(90deg, rgba(98,208,255,0.18), rgba(98,208,255,0.08)); border-color: rgba(82,112,168,0.18); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 8px 22px rgba(31, 56, 88, 0.1); }
.menu-item.active::before { background: linear-gradient(180deg, var(--accent), #7ab6ff); box-shadow: 0 0 14px rgba(98, 208, 255, 0.45); }
:root[data-theme="dark"] .menu-item { background: rgba(255,255,255,0.01); }
:root[data-theme="dark"] .menu-item:hover { background: rgba(98, 208, 255, 0.08); border-color: rgba(130,170,255,0.14); }
:root[data-theme="dark"] .menu-item.active { background: linear-gradient(90deg, rgba(98,208,255,0.16), rgba(98,208,255,0.08)); border-color: rgba(130,170,255,0.2); box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 22px rgba(0,0,0,0.16); }
.sidebar-footer { margin-top: auto; color: var(--muted); font-size: 0.88rem; border-top: 1px solid var(--line); padding-top: 16px; }
.content { padding: 28px; min-width: 0; width: 100%; max-width: 100%; overflow-x: hidden; background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0)); }
.dashboard-gantt-host { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
:root[data-theme="dark"] .content { background: transparent; }
.topbar-kicker { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.version-pill, .refresh-inline, .secondary-button, .inline-link { border-radius: 999px; padding: 7px 12px; background: rgba(36,147,209,0.1); color: var(--accent); border: 1px solid rgba(36,147,209,0.16); }
.refresh-inline, .secondary-button, .inline-link, .icon-button, .primary-button { cursor: pointer; }
.version-pill, .refresh-inline { padding: 6px 12px; font-size: 0.9rem; }
.refresh-now { background: rgba(255,255,255,0.92); color: #111827; border: 1px solid rgba(17,24,39,0.08); }
.theme-inline { background: rgba(255,255,255,0.92); color: var(--text); border: 1px solid rgba(82,112,168,0.12); }
:root[data-theme="dark"] .version-pill,
:root[data-theme="dark"] .refresh-inline,
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .inline-link,
:root[data-theme="dark"] .refresh-now,
:root[data-theme="dark"] .theme-inline {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-color: rgba(130,170,255,0.14);
}
:root[data-theme="dark"] .inline-link.active,
:root[data-theme="dark"] .products-top-tab.active {
  background: linear-gradient(90deg, rgba(98,208,255,0.16), rgba(98,208,255,0.08));
  color: var(--text);
  border-color: rgba(130,170,255,0.2);
}
.products-top-tabs { display: flex; gap: 12px; overflow-x: auto; padding: 6px 0 14px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.products-top-tab { border: 1px solid rgba(36,147,209,0.16); background: rgba(255,255,255,0.85); color: var(--text); border-radius: 999px; padding: 14px 24px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); }
.products-top-tab.active { background: linear-gradient(90deg, rgba(98,208,255,0.2), rgba(98,208,255,0.08)); border-color: rgba(36,147,209,0.28); color: var(--text); }
:root[data-theme="dark"] .products-top-tab { background: rgba(255,255,255,0.04); border-color: rgba(130,170,255,0.14); }
:root[data-theme="dark"] .products-top-tab.active { background: linear-gradient(90deg, rgba(98,208,255,0.16), rgba(98,208,255,0.08)); border-color: rgba(130,170,255,0.2); }
.primary-button { border-radius: 999px; padding: 10px 16px; background: linear-gradient(90deg, #2493d1, #1a6fb4); color: white; box-shadow: var(--shadow); }
.icon-button { background: transparent; color: var(--muted); font-size: 1rem; }
.inline-link { padding: 5px 10px; background: rgba(36,147,209,0.08); }
.view { display: none; }
.view.active { display: block; }
.kanban-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; min-width: 0; width: 100%; max-width: 100%; }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.health-good {
  border-color: rgba(31, 163, 106, 0.2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 8px 22px rgba(31, 163, 106, 0.08);
}
.health-watch,
.health-risk {
  border-color: rgba(217, 138, 24, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 8px 22px rgba(217, 138, 24, 0.08);
}
.health-critical {
  border-color: rgba(217, 79, 105, 0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 8px 22px rgba(217, 79, 105, 0.08);
}
.health-neutral {
  border-color: var(--line);
}
:root[data-theme="dark"] .health-good {
  border-color: rgba(122, 240, 180, 0.2);
}
:root[data-theme="dark"] .health-watch,
:root[data-theme="dark"] .health-risk {
  border-color: rgba(255, 184, 77, 0.22);
}
:root[data-theme="dark"] .health-critical {
  border-color: rgba(255, 105, 120, 0.24);
}
.order-chip.health-good,
.mobile-timeline-card.health-good,
.mobile-order-card.health-good,
.mobile-stage-card.health-good {
  background: linear-gradient(180deg, rgba(31, 163, 106, 0.07), rgba(255,255,255,0.96));
}
.order-chip.health-watch,
.order-chip.health-risk,
.mobile-timeline-card.health-watch,
.mobile-timeline-card.health-risk,
.mobile-order-card.health-watch,
.mobile-order-card.health-risk,
.mobile-stage-card.health-watch,
.mobile-stage-card.health-risk {
  background: linear-gradient(180deg, rgba(217, 138, 24, 0.08), rgba(255,255,255,0.96));
}
.order-chip.health-critical,
.mobile-timeline-card.health-critical,
.mobile-order-card.health-critical,
.mobile-stage-card.health-critical {
  background: linear-gradient(180deg, rgba(217, 79, 105, 0.08), rgba(255,255,255,0.96));
}
:root[data-theme="dark"] .order-chip.health-good,
:root[data-theme="dark"] .mobile-timeline-card.health-good,
:root[data-theme="dark"] .mobile-order-card.health-good,
:root[data-theme="dark"] .mobile-stage-card.health-good {
  background: linear-gradient(180deg, rgba(122, 240, 180, 0.08), rgba(13,27,46,0.96));
}
:root[data-theme="dark"] .order-chip.health-watch,
:root[data-theme="dark"] .order-chip.health-risk,
:root[data-theme="dark"] .mobile-timeline-card.health-watch,
:root[data-theme="dark"] .mobile-timeline-card.health-risk,
:root[data-theme="dark"] .mobile-order-card.health-watch,
:root[data-theme="dark"] .mobile-order-card.health-risk,
:root[data-theme="dark"] .mobile-stage-card.health-watch,
:root[data-theme="dark"] .mobile-stage-card.health-risk {
  background: linear-gradient(180deg, rgba(255, 184, 77, 0.09), rgba(13,27,46,0.96));
}
:root[data-theme="dark"] .order-chip.health-critical,
:root[data-theme="dark"] .mobile-timeline-card.health-critical,
:root[data-theme="dark"] .mobile-order-card.health-critical,
:root[data-theme="dark"] .mobile-stage-card.health-critical {
  background: linear-gradient(180deg, rgba(255, 105, 120, 0.09), rgba(13,27,46,0.96));
}
.metric-card { grid-column: span 4; min-width: 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0; }
.card-header h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 16px 18px 18px; display: grid; gap: 10px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 0.8rem; font-weight: 700; background: rgba(82,112,168,0.12); color: var(--muted); }
.badge.ok { background: rgba(31,163,106,0.14); color: var(--ok); }
.badge.warn { background: rgba(217,138,24,0.14); color: var(--warn); }
.badge.danger { background: rgba(217,79,105,0.14); color: var(--danger); }
.metric { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.metric:last-child { border-bottom: none; padding-bottom: 0; }
.metric-label { color: var(--muted); text-transform: capitalize; }
.metric-value { font-weight: 700; }
.kanban-board { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.kanban-column { background: rgba(255,255,255,0.55); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 12px; }
.kanban-column h3 { margin: 0; }
.order-chip { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: white; display: grid; gap: 6px; }
.order-chip .meta, .feed-item small { color: var(--muted); font-size: 0.9rem; }
:root[data-theme="dark"] .kanban-column { background: rgba(255,255,255,0.05); }
:root[data-theme="dark"] .order-chip { background: rgba(255,255,255,0.03); }
.chip-actions, .action-bar, .modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.split-actions { justify-content: space-between; align-items: center; margin-bottom: 12px; }
.action-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search-group { margin-left: auto; }
.search-group input, .search-group select { min-width: 180px; }
.table-wrap { grid-column: 1 / -1; overflow: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 1180px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-size: 0.86rem; background: rgba(36,147,209,0.05); }
:root[data-theme="dark"] .table th { background: rgba(255,255,255,0.04); }
.feed-item { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.feed-item:last-child { border-bottom: none; padding-bottom: 0; }
.chart-row { display: grid; gap: 6px; }
.chart-label-row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.92rem; }
.chart-label-row strong { color: var(--text); }
.chart-track { width: 100%; height: 10px; background: rgba(82,112,168,0.12); border-radius: 999px; overflow: hidden; }
.chart-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7fc9f3, #2493d1); }
.chart-fill.ok { background: linear-gradient(90deg, #89dfb5, #1fa36a); }
.chart-fill.warn { background: linear-gradient(90deg, #f5c470, #d98a18); }
.chart-fill.danger { background: linear-gradient(90deg, #f6a4b4, #d94f69); }
.modal { border: none; border-radius: 22px; padding: 0; width: min(900px, calc(100vw - 24px)); background: transparent; }
.detail-panel { position: fixed; inset: 0; background: rgba(15, 33, 60, 0.35); display: flex; justify-content: flex-end; z-index: 20; }
.detail-panel.hidden { display: none; }
.detail-panel-card { width: min(920px, 100vw); height: 100vh; background: #f8fbff; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.detail-panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: white; }
.detail-kicker { margin: 0 0 4px; color: var(--accent); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.detail-panel-header h3 { margin: 0; }
.detail-panel-header p { margin: 4px 0 0; color: var(--muted); }
.detail-panel-body { padding: 20px 22px 28px; overflow: auto; display: grid; gap: 18px; }
.detail-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.detail-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.detail-card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; }
:root[data-theme="dark"] .detail-card { background: rgba(255,255,255,0.03); }
.detail-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.detail-card-header h4 { margin: 0; }
.summary-pill { background: rgba(36,147,209,0.08); border: 1px solid rgba(36,147,209,0.16); border-radius: 16px; padding: 12px; }
.summary-pill .metric-label { margin-bottom: 4px; }
.milestone-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.milestone-row:last-child { border-bottom: none; }
.history-item { border-bottom: 1px solid var(--line); padding: 10px 0; }
.history-item:last-child { border-bottom: none; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.select-input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: white; color: var(--text); }
.modal::backdrop { background: rgba(15, 33, 60, 0.45); }
.modal-card { background: white; border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
:root[data-theme="dark"] .modal-card { background: rgba(13,27,46,0.98); }
.modal-card.compact { width: min(760px, calc(100vw - 24px)); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-header h3 { margin: 0; }
.modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.modal-grid label { display: grid; gap: 6px; font-size: 0.92rem; color: var(--muted); }
input, textarea, select { color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.9; }
:root[data-theme="dark"] input, :root[data-theme="dark"] textarea, :root[data-theme="dark"] select { background: rgba(255,255,255,0.96); color: #102033; border-color: rgba(130,170,255,0.12); }
:root[data-theme="dark"] input::placeholder, :root[data-theme="dark"] textarea::placeholder { color: #6c7f98; opacity: 1; }
input[readonly], textarea[readonly] { background: rgba(36,147,209,0.06); color: var(--muted); cursor: default; }
:root[data-theme="dark"] input[readonly], :root[data-theme="dark"] textarea[readonly] { background: rgba(255,255,255,0.16); color: #d6e3f5; }
.full-width { grid-column: 1 / -1; }
.form-section-title { margin: 10px 0 12px; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.gantt-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; max-width: 100%; }
.gantt-table { display: grid; min-width: 820px; }
.gantt-table-wide { min-width: 1320px; }
.gantt-row { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(120px, 1fr)); align-items: center; border-bottom: 1px solid var(--line); }
.gantt-table-wide .gantt-row { grid-template-columns: minmax(220px, 1.5fr) repeat(7, minmax(150px, 1fr)); }
.gantt-header { font-weight: 700; color: var(--muted); background: rgba(36,147,209,0.05); }
.gantt-order-cell, .gantt-stage-cell { padding: 14px 16px; }
.gantt-order-cell { display: grid; gap: 4px; }
.gantt-order-cell span { color: var(--muted); font-size: 0.92rem; }
.gantt-stage-cell { text-align: center; font-size: 1rem; }
.gantt-stage-title { font-size: 0.84rem; line-height: 1.25; }
.gantt-stage-cell.done { color: var(--ok); }
.gantt-stage-cell.pending { color: var(--muted); }
:root[data-theme="dark"] .gantt-header { background: rgba(255,255,255,0.04); }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-card { grid-column: span 12; }
  .kanban-board { grid-template-columns: 1fr; }
  .menu.menu-bubbles { display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; overflow-y: hidden; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .menu-item { flex: 0 0 auto; border-radius: 999px; padding: 14px 24px; text-align: center; justify-content: center; white-space: nowrap; width: auto; min-width: max-content; box-shadow: var(--shadow); }
  .menu-item::before { display: none; }
}
.mobile-order-list,
.mobile-stage-list,
.mobile-kanban-list,
.mobile-timeline-list {
  display: none;
}
.mobile-timeline-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 22px rgba(31, 56, 88, 0.08);
}
:root[data-theme="dark"] .mobile-timeline-card {
  background: rgba(255,255,255,0.04);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
.mobile-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.mobile-timeline-card strong {
  font-size: 1.05rem;
}
.mobile-order-card .card-header,
.mobile-stage-card .card-header,
.mobile-kanban-section .card-header {
  align-items: flex-start;
  gap: 10px;
}
.mobile-order-card .card-header h3,
.mobile-stage-card .card-header h3,
.mobile-kanban-section .card-header h3 {
  font-size: 1rem;
  line-height: 1.2;
}
.mobile-order-card .card-body,
.mobile-stage-card .card-body,
.mobile-kanban-section .card-body {
  gap: 12px;
}
.mobile-order-card .metric,
.mobile-stage-card .metric,
.mobile-kanban-section .metric,
.mobile-timeline-card .metric {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}
.mobile-order-card .metric-value,
.mobile-stage-card .metric-value,
.mobile-kanban-section .metric-value,
.mobile-timeline-card .metric-value {
  word-break: break-word;
}
.stage-mobile-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.stage-mobile-row:last-child {
  border-bottom: none;
}
.stage-mobile-row strong {
  font-size: 0.92rem;
}
.stage-mobile-row span {
  font-weight: 700;
}
.stage-mobile-row small {
  color: var(--muted);
}

@media (max-width: 720px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .app-shell, .content, .sidebar, .view, .kanban-grid, .card, .card-body, .dashboard-gantt-host {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .content { padding: 12px; }
  .topbar h2 {
    font-size: 1.4rem;
    line-height: 1.15;
    margin: 6px 0 6px;
  }
  .topbar p {
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .topbar-kicker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }
  .version-pill, .refresh-inline {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .split-actions,
  .action-group,
  .search-group {
    width: 100%;
    margin-left: 0;
  }
  .split-actions {
    align-items: stretch;
    gap: 10px;
  }
  .action-group,
  .search-group {
    display: grid;
    grid-template-columns: 1fr;
  }
  .search-group input,
  .search-group select,
  .primary-button,
  .secondary-button {
    min-width: 0;
    width: 100%;
  }
  .modal-grid { grid-template-columns: 1fr; }
  .detail-summary-grid, .detail-columns { grid-template-columns: 1fr; }
  .products-top-tabs { gap: 10px; padding-bottom: 12px; margin-inline: -2px; padding-inline: 2px; }
  .products-top-tab { padding: 11px 16px; font-size: 0.92rem; }
  .menu.menu-bubbles {
    gap: 10px;
    padding-bottom: 12px;
    padding-inline: 2px;
    scroll-snap-type: x proximity;
  }
  .menu-item {
    flex: 0 0 auto;
    padding: 11px 16px;
    min-width: max-content;
    scroll-snap-align: start;
    font-size: 0.94rem;
  }
  .kanban-grid { grid-template-columns: 1fr; gap: 14px; }
  .metric-card { grid-column: 1 / -1; width: 100%; }
  .card { width: 100%; border-radius: 18px; }
  .sidebar { padding: 18px 14px 14px; }
  .brand {
    padding: 0 0 8px;
    min-width: 0;
  }
  .brand h1 {
    font-size: 1.05rem;
    line-height: 1.15;
  }
  .brand p {
    font-size: 0.85rem;
  }
  .desktop-orders-table,
  .desktop-stages-table,
  .desktop-kanban-board,
  .desktop-gantt-host {
    display: none;
  }
  .mobile-order-list,
  .mobile-stage-list,
  .mobile-kanban-list,
  .mobile-timeline-list {
    display: grid;
    gap: 14px;
    grid-column: 1 / -1;
  }
  .mobile-order-card,
  .mobile-stage-card {
    width: 100%;
  }
  .mobile-order-card .detail-actions,
  .mobile-kanban-section .detail-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .mobile-order-card .inline-link,
  .mobile-kanban-section .inline-link {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 8px 10px;
  }
  .table-wrap,
  .gantt-wrap,
  .dashboard-gantt-host {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .table { min-width: 860px; }
  .gantt-table-wide { min-width: 1180px; }
  .kanban-board {
    grid-template-columns: 1fr;
    gap: 14px;
    overflow-x: visible;
  }
  .mobile-kanban-section {
    width: 100%;
  }
  .kanban-column {
    min-width: 0;
    width: 100%;
  }
  .order-chip {
    min-width: 0;
  }
  .mobile-kanban-section .order-chip {
    padding: 14px;
  }
  .mobile-timeline-card strong,
  .mobile-order-card strong,
  .mobile-stage-card strong {
    font-size: 0.98rem;
  }
}
