:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #f8fbff;
  --surface-soft: #eef4ff;
  --side-bg: #333f4c;
  --side-hover: rgba(255, 255, 255, 0.08);
  --side-active: rgba(255, 255, 255, 0.14);
  --line: #dbe3ef;
  --line-strong: #c6d1df;
  --text: #1f2a37;
  --muted: #66758c;
  --blue: #0f62fe;
  --blue-strong: #0043ce;
  --blue-soft: #e8f1ff;
  --green: #16a56a;
  --green-soft: #e9f8ef;
  --orange: #e08a1e;
  --orange-soft: #fff4e2;
  --red: #e10600;
  --red-soft: #fdecef;
  --shadow: 0 10px 30px rgba(20, 35, 70, 0.06);
  --shadow-soft: 0 6px 18px rgba(20, 35, 70, 0.05);
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow: auto;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body.theme-dark {
  color-scheme: dark;
  --bg: #0f1621;
  --surface: #182231;
  --surface-alt: #1d2a3b;
  --surface-soft: #22344a;
  --side-bg: #17212d;
  --side-hover: #203041;
  --side-active: #25364a;
  --line: #324457;
  --line-strong: #41586c;
  --text: #e8edf5;
  --muted: #9aa8b8;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.18);
}

body.theme-dark .login-shell {
  background:
    linear-gradient(180deg, rgba(8, 13, 20, 0.98), rgba(13, 19, 28, 0.98)),
    url("/static/background-ds-gray.jpg") center/cover no-repeat;
}

body.theme-dark .login-tagline,
body.theme-dark .workspace-subtitle,
body.theme-dark .section-head span,
body.theme-dark .mini-stat span,
body.theme-dark .summary-tile span,
body.theme-dark .timeline-stage-head span,
body.theme-dark .timeline-stage-meta span,
body.theme-dark .timeline-alert-text span,
body.theme-dark .detail-summary-list span,
body.theme-dark .profile-chip span,
body.theme-dark .user-row span,
body.theme-dark .alert-reason,
body.theme-dark .alert-protocol,
body.theme-dark .status-label span,
body.theme-dark .client-process-row span,
body.theme-dark .detail-subtitle,
body.theme-dark .table-muted,
body.theme-dark .toast span,
body.theme-dark .field span,
body.theme-dark .login-form .field > span,
body.theme-dark .login-form .field-head span,
body.theme-dark .text-link,
body.theme-dark .search-result-subtitle,
body.theme-dark .search-result span {
  color: #aab6c6;
}

body.theme-dark .login-card,
body.theme-dark .card,
body.theme-dark .modal-card,
body.theme-dark .table-card,
body.theme-dark .detail-card,
body.theme-dark .alert-item,
body.theme-dark .status-row,
body.theme-dark .process-tabs,
body.theme-dark .settings-tabs,
body.theme-dark .columns-menu,
body.theme-dark .sort-menu,
body.theme-dark .search-menu-panel,
body.theme-dark .user-menu,
body.theme-dark .metric,
body.theme-dark .summary-tile,
body.theme-dark .timeline-stage-card,
body.theme-dark .timeline-alert-inline,
body.theme-dark .detail-alert-box,
body.theme-dark .timeline-content,
body.theme-dark .client-process-row,
body.theme-dark .mini-stat,
body.theme-dark .profile-chip,
body.theme-dark .user-row,
body.theme-dark .tab-chip,
body.theme-dark .secondary,
body.theme-dark .field > input,
body.theme-dark .search,
body.theme-dark select,
body.theme-dark .input-shell,
body.theme-dark .toast,
body.theme-dark .badge,
body.theme-dark .empty-state,
body.theme-dark .client-process-card,
body.theme-dark .client-detail-shell .detail-card,
body.theme-dark .settings-hero,
body.theme-dark .communication-panel,
body.theme-dark .alert-status,
body.theme-dark .dashboard-cards .metric,
body.theme-dark .login-form .input-shell,
body.theme-dark .login-form .secondary,
body.theme-dark .login-form .primary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

body.theme-dark .login-card,
body.theme-dark .modal-card,
body.theme-dark .search-menu-panel,
body.theme-dark .user-menu,
body.theme-dark .columns-menu,
body.theme-dark .sort-menu,
body.theme-dark .process-tabs,
body.theme-dark .settings-tabs {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

body.theme-dark .login-form .field > span,
body.theme-dark .login-form .field-head span,
body.theme-dark .field span {
  color: #a7b4c7;
}

body.theme-dark .input-shell:focus-within,
body.theme-dark .field > input:focus-visible,
body.theme-dark .search:focus-visible,
body.theme-dark select:focus-visible {
  border-color: rgba(94, 149, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(94, 149, 255, 0.14);
}

body.theme-dark .tab-chip.active,
body.theme-dark .profile-chip.active,
body.theme-dark .metric-clickable:hover,
body.theme-dark .status-row:hover,
body.theme-dark .client-process-row:hover,
body.theme-dark .user-row.active,
body.theme-dark .user-row:hover,
body.theme-dark .alert-item:hover,
body.theme-dark .summary-tile:hover {
  background: #223041;
  border-color: #35516f;
}

body.theme-dark .tab-close:hover,
body.theme-dark .icon-close:hover,
body.theme-dark .password-toggle:hover,
body.theme-dark .secondary:hover {
  background: #223041;
  color: #f0f5ff;
}

body.theme-dark .metric-track,
body.theme-dark .status-bar {
  background: #223041;
}

body.theme-dark .metric-Submitted,
body.theme-dark .badge.Submitted {
  background: rgba(61, 108, 240, 0.18);
  color: #9fc0ff;
  border-color: rgba(61, 108, 240, 0.35);
}

body.theme-dark .metric-Production,
body.theme-dark .badge.Production {
  background: rgba(132, 88, 226, 0.18);
  color: #c0a8ff;
  border-color: rgba(132, 88, 226, 0.35);
}

body.theme-dark .metric-Route,
body.theme-dark .badge.Route {
  background: rgba(224, 138, 30, 0.18);
  color: #ffd09a;
  border-color: rgba(224, 138, 30, 0.35);
}

body.theme-dark .metric-Completed,
body.theme-dark .badge.Completed {
  background: rgba(24, 167, 101, 0.18);
  color: #95e0b7;
  border-color: rgba(24, 167, 101, 0.35);
}

body.theme-dark .metric-Cancelled,
body.theme-dark .badge.Cancelled {
  background: rgba(215, 79, 97, 0.18);
  color: #f0a3ad;
  border-color: rgba(215, 79, 97, 0.35);
}

body.theme-dark .timeline-overview,
body.theme-dark .timeline-alert-inline.ok,
body.theme-dark .timeline-alert-inline.warn,
body.theme-dark .detail-banner.ok,
body.theme-dark .detail-banner.warn {
  background: linear-gradient(180deg, rgba(24, 34, 46, 0.98), rgba(20, 28, 39, 0.98));
  border-color: var(--line);
}

body.theme-dark .timeline-summary-grid .summary-ok,
body.theme-dark .summary-ok,
body.theme-dark .detail-alert-box.ok {
  background: rgba(24, 167, 101, 0.1);
  border-color: rgba(24, 167, 101, 0.25);
}

body.theme-dark .summary-warn,
body.theme-dark .timeline-alert-inline.warn,
body.theme-dark .detail-alert-box.warn {
  background: rgba(215, 79, 97, 0.1);
  border-color: rgba(215, 79, 97, 0.25);
}

body.theme-dark .summary-completed {
  background: rgba(24, 167, 101, 0.1);
  border-color: rgba(24, 167, 101, 0.25);
}

body.theme-dark .timeline-stage-card.stage-future {
  background: linear-gradient(180deg, rgba(30, 40, 54, 0.95), rgba(24, 34, 46, 0.95));
  border-color: #2e4158;
}

body.theme-dark .timeline-stage-card.stage-future .timeline-stage-head strong,
body.theme-dark .timeline-stage-card.stage-future .timeline-stage-head span,
body.theme-dark .timeline-stage-card.stage-future .timeline-stage-meta span,
body.theme-dark .timeline-stage-card.stage-future .timeline-stage-meta b {
  color: #8fa0b4;
}

body.theme-dark .timeline-stage-card.stage-future .timeline-stage-icon {
  background: #223041;
}

body.theme-dark .timeline-progress .timeline-node {
  background: #1c2735;
  border-color: #3a4c62;
  color: #9aa8b8;
}

body.theme-dark .timeline-progress .timeline-node.filled {
  border-color: rgba(94, 149, 255, 0.95);
  color: #9fc0ff;
  box-shadow: 0 0 0 4px rgba(94, 149, 255, 0.1);
}

body.theme-dark .timeline-progress .timeline-connector,
body.theme-dark .timeline-step-line {
  background: #324558;
}

body.theme-dark .timeline-stage-arrow {
  color: #57708a;
}

body.theme-dark .timeline-stage-arrow::after {
  color: #57708a;
}

body.theme-dark .timeline-progress .timeline-connector.filled,
body.theme-dark .timeline-step.done .timeline-step-line,
body.theme-dark .timeline-step.active .timeline-step-line {
  background: linear-gradient(90deg, #5e95ff, #89b3ff);
}

body.theme-dark .timeline-stage-card.active {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

body.theme-dark .timeline-stage-order {
  color: rgba(159, 192, 255, 0.16);
}

body.theme-dark .timeline-stage-card.stage-future .timeline-stage-order {
  color: rgba(176, 191, 212, 0.16);
}

body.theme-dark .toast.success {
  background: rgba(24, 167, 101, 0.15);
  border-color: rgba(24, 167, 101, 0.35);
  color: #d8f6e6;
}

body.theme-dark .toast.error {
  background: rgba(215, 79, 97, 0.15);
  border-color: rgba(215, 79, 97, 0.35);
  color: #f7d6db;
}

body.theme-dark .nav button {
  color: #d9e3ef;
}

body.theme-dark .nav button:hover {
  background: #243344;
  border-color: #344658;
}

body.theme-dark .nav button.active {
  background: #233248;
  border-color: rgba(94, 149, 255, 0.3);
  color: #9fc0ff;
}

body.theme-dark .search-menu-list > *,
body.theme-dark .columns-menu-list > *,
body.theme-dark .sort-menu-list > *,
body.theme-dark .user-menu button,
body.theme-dark .search-menu-panel .search-result {
  background: #1d2735;
  border-color: #314355;
  color: #dce5f2;
}

body.theme-dark .search-menu-title,
body.theme-dark .columns-menu-head strong,
body.theme-dark .columns-menu-head span,
body.theme-dark .columns-menu-note,
body.theme-dark .sort-menu-head strong,
body.theme-dark .sort-menu-head span {
  color: #dce5f2;
}

body.theme-dark .search-result:hover,
body.theme-dark .user-menu button:hover,
body.theme-dark .columns-menu-list > *:hover,
body.theme-dark .sort-menu-list > *:hover {
  background: #243344;
}

body.theme-dark .process-toolbar,
body.theme-dark .settings-hero,
body.theme-dark .process-tabs,
body.theme-dark .settings-tabs,
body.theme-dark .top,
body.theme-dark .search-shell,
body.theme-dark .search-field,
body.theme-dark .user-chip,
body.theme-dark .table-wrap,
body.theme-dark .table-card,
body.theme-dark .detail-card,
body.theme-dark .client-detail-grid .card,
body.theme-dark .client-process-card,
body.theme-dark .workspace-head,
body.theme-dark .detail-head,
body.theme-dark .detail-grid,
body.theme-dark .clients-shell,
body.theme-dark .content {
  border-color: #314355;
}

body.theme-dark .top,
body.theme-dark .search-shell,
body.theme-dark .search-field,
body.theme-dark .user-chip,
body.theme-dark .table-wrap,
body.theme-dark .table-card,
body.theme-dark .detail-card,
body.theme-dark .client-detail-grid .card,
body.theme-dark .client-process-card,
body.theme-dark .workspace-head,
body.theme-dark .detail-head,
body.theme-dark .detail-grid,
body.theme-dark .clients-shell,
body.theme-dark .content {
  background: var(--surface);
}

body.theme-dark th {
  background: #1c2838;
  color: #9ca9ba;
  border-bottom-color: var(--line);
}

body.theme-dark tbody tr:hover,
body.theme-dark .active-row {
  background: rgba(92, 145, 255, 0.08);
}

body.theme-dark .summary-tile,
body.theme-dark .timeline-overview,
body.theme-dark .timeline-stage-card,
body.theme-dark .detail-summary-list div,
body.theme-dark .client-process-row,
body.theme-dark .mini-stat,
body.theme-dark .profile-chip,
body.theme-dark .user-row,
body.theme-dark .tab-chip,
body.theme-dark .secondary,
body.theme-dark .field > input,
body.theme-dark .search,
body.theme-dark select,
body.theme-dark .input-shell,
body.theme-dark .toast,
body.theme-dark .badge,
body.theme-dark .empty-state,
body.theme-dark .communication-panel,
body.theme-dark .alert-status,
body.theme-dark .dashboard-cards .metric,
body.theme-dark .login-form .input-shell,
body.theme-dark .login-form .secondary,
body.theme-dark .login-form .primary,
body.theme-dark .search-menu-panel,
body.theme-dark .columns-menu,
body.theme-dark .sort-menu,
body.theme-dark .user-menu,
body.theme-dark .settings-hero,
body.theme-dark .process-toolbar,
body.theme-dark .top-actions,
body.theme-dark .brand-lockup {
  background: var(--surface-alt);
}

body.theme-dark .summary-tile,
body.theme-dark .timeline-overview,
body.theme-dark .timeline-stage-card,
body.theme-dark .detail-summary-list div,
body.theme-dark .client-process-row,
body.theme-dark .mini-stat,
body.theme-dark .profile-chip,
body.theme-dark .user-row,
body.theme-dark .tab-chip,
body.theme-dark .secondary,
body.theme-dark .field > input,
body.theme-dark .search,
body.theme-dark select,
body.theme-dark .input-shell,
body.theme-dark .toast,
body.theme-dark .badge,
body.theme-dark .empty-state,
body.theme-dark .communication-panel,
body.theme-dark .alert-status,
body.theme-dark .dashboard-cards .metric,
body.theme-dark .login-form .input-shell,
body.theme-dark .login-form .secondary,
body.theme-dark .login-form .primary,
body.theme-dark .search-menu-panel,
body.theme-dark .columns-menu,
body.theme-dark .sort-menu,
body.theme-dark .user-menu,
body.theme-dark .settings-hero,
body.theme-dark .process-toolbar,
body.theme-dark .top-actions,
body.theme-dark .brand-lockup,
body.theme-dark .top,
body.theme-dark .search-shell,
body.theme-dark .search-field {
  border-color: var(--line);
  color: var(--text);
}

body.theme-dark .timeline-stage-card.stage-future {
  background: #17212e;
  border-top-color: #455c73;
}

body.theme-dark .timeline-stage-card.stage-future::before,
body.theme-dark .timeline-stage-card.stage-future .timeline-stage-icon {
  background: #22354b;
  color: #96a9bf;
}

body.theme-dark .detail-summary-list div,
body.theme-dark .client-process-row {
  background: #192434;
}

body.theme-dark .detail-alert-box {
  background: #172133;
}

body.theme-dark .top {
  background:
    linear-gradient(180deg, rgba(29, 42, 59, 0.98), rgba(22, 31, 44, 0.98)),
    var(--surface-alt);
}

body.theme-dark .search-menu-panel,
body.theme-dark .columns-menu,
body.theme-dark .sort-menu,
body.theme-dark .user-menu,
body.theme-dark .modal-card,
body.theme-dark .login-card {
  background: linear-gradient(180deg, rgba(29, 42, 59, 0.98), rgba(23, 33, 48, 0.98));
}

body.theme-dark .search-menu-panel .search-result,
body.theme-dark .user-menu button,
body.theme-dark .columns-menu-list > *,
body.theme-dark .sort-menu-list > * {
  background: rgba(255, 255, 255, 0.02);
}

body.theme-dark .top-actions .search,
body.theme-dark .search-menu-head,
body.theme-dark .columns-menu-head,
body.theme-dark .sort-menu-head {
  background: transparent;
}

body.theme-dark .brand-lockup {
  background: linear-gradient(180deg, rgba(32, 45, 64, 0.98), rgba(24, 35, 50, 0.98));
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

button,
[role="button"],
[data-open-process],
.search-result,
.client-process-row,
.tab-chip,
.tab-close,
.small-action,
.profile-chip,
.nav button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(30, 102, 245, 0.28);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.loading {
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(244, 247, 251, 0.98)),
    url("/static/background-ds-gray.jpg") center/cover no-repeat;
}

.login-logo {
  width: min(472px, 100%);
  max-width: 472px;
  display: block;
  object-fit: contain;
}

.login-card,
.card,
.modal-card,
.table-card,
.detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.login-card {
  width: min(520px, calc(100vw - 48px));
  padding: 30px 24px 24px;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form,
.user-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.login-form.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.login-tagline {
  margin: 0;
  color: #667287;
  font-size: 14px;
  line-height: 1.45;
}

.login-form .field {
  gap: 6px;
}

.login-form .field > span,
.login-form .field-head span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #5f6b7f;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.text-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f62fe;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.text-link:hover {
  text-decoration: underline;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-shell:focus-within {
  border-color: rgba(30, 102, 245, 0.55);
  box-shadow: 0 0 0 3px rgba(30, 102, 245, 0.08);
}

.input-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #8a97ab;
}

.input-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.input-shell input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.input-shell input::placeholder {
  color: #9ba8bb;
}

.password-toggle {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid #0f62fe;
  border-radius: 6px;
  background: #0f62fe;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background: #0043ce;
  border-color: #0043ce;
  color: #fff;
}

.theme-mode-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.theme-mode-btn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.theme-mode-btn.active {
  border-color: var(--blue);
  background: rgba(30, 102, 245, 0.08);
  color: var(--blue);
}

.profile-preferences-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 2px;
}

.password-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.field > input,
.search,
select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}

.field > input::placeholder,
.search::placeholder {
  color: #95a2b5;
}

.auth-actions,
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.primary,
.new,
.small-action {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  padding: 0 14px;
  font-weight: 600;
}

.secondary {
  height: 40px;
  border-radius: 8px;
  border: 1px solid #0f62fe;
  background: #0f62fe;
  color: #fff;
  padding: 0 14px;
  font-weight: 600;
}

.danger {
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e10600;
  background: #e10600;
  color: #fff;
  padding: 0 14px;
  font-weight: 700;
}

.primary:hover,
.new:hover,
.small-action:hover {
  background: var(--blue-strong);
  border-color: var(--blue-strong);
}

.secondary:hover {
  background: #0043ce;
  border-color: #0043ce;
}

.danger:hover {
  background: #b81912;
  border-color: #b81912;
}

.danger:disabled {
  background: #f4a6a3;
  border-color: #f4a6a3;
  color: #fff;
  cursor: not-allowed;
}

.login-submit {
  width: 100%;
  justify-content: center;
  gap: 10px;
  height: 44px;
  margin-top: 2px;
}

.button-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 12px;
  border-top: 1px solid rgba(210, 219, 234, 0.7);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.login-version {
  font-weight: 600;
  color: #6a7689;
  white-space: nowrap;
}

.login-note {
  font-size: 13px;
}

.app {
  width: max(100%, 1280px);
  min-width: 1280px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(1028px, 1fr);
  background: var(--bg);
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 16px;
  background: var(--side-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-lockup {
  padding: 12px 12px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.brand-logo {
  width: 200px;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

body.theme-dark .brand-lockup {
  background: var(--surface);
  border-color: var(--line);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.nav button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
  font-weight: 600;
}

.nav button:hover {
  background: rgba(15, 98, 254, 0.32);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f4f8ff;
}

.nav button.active {
  background: #0f62fe;
  border-color: #0f62fe;
  color: #fff;
}

.nav-ico,
.metric-ico,
.icon-close,
.user-photo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 16px;
  color: currentColor;
}

.nav-ico svg,
.metric-ico svg,
.icon-close svg {
  width: 100%;
  height: 100%;
}

.nav-label {
  white-space: nowrap;
}

.side-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.version {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  text-align: center;
}

.main {
  min-width: 1028px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  background: rgba(244, 247, 251, 0.98);
  border-bottom: 1px solid var(--line);
}

.top-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #73839a;
}

.top-title h2,
.workspace-head h2,
.detail-head h2,
.login-brand-copy h1 {
  letter-spacing: 0;
}

.top-title h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.05;
}

.top-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.search-shell {
  position: relative;
  width: min(440px, 34vw);
  min-width: 320px;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-ico {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #8b9ab0;
  pointer-events: none;
}

.search-ico svg {
  width: 100%;
  height: 100%;
}

.top-actions .search {
  width: 100%;
  height: 44px;
  padding-left: 38px;
  padding-right: 12px;
}

.search-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 28;
  width: 100%;
}

.search-menu-panel {
  max-height: 440px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.search-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 6px;
  border-bottom: 1px solid #edf2f7;
}

.search-menu-head strong {
  display: block;
  font-size: 14px;
}

.search-menu-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.search-menu-group {
  display: grid;
  gap: 8px;
}

.search-menu-title {
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-menu-list {
  display: grid;
  gap: 6px;
}

.search-result {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #0f62fe;
  border-radius: 8px;
  background: #0f62fe;
  color: #fff;
  text-align: left;
}

.search-result:hover {
  background: #0043ce;
  border-color: #0043ce;
}

.search-result-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.search-result-meta {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.user-shell {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 256px;
  padding: 8px 12px;
  border: 1px solid #cbd9ee;
  border-radius: 8px;
  background: #eef4fd;
  color: var(--text);
  box-shadow: 0 3px 10px rgba(32, 61, 103, 0.08);
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.user-meta b,
.user-meta span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta b {
  font-size: 14px;
}

.user-meta span {
  font-size: 12px;
  color: #64758d;
}

.user-photo-wrap {
  margin-left: auto;
}

.user-photo-fallback {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
}

.user-menu button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f3f7fd;
  color: #27364b;
  text-align: left;
  font-size: 13px;
}

.user-menu button:hover {
  background: #e2edfc;
  border-color: #c8d9f3;
  color: #0f62fe;
}

.user-menu button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.content {
  min-width: 1028px;
  flex: 1;
  padding: 20px 24px 24px;
}

.cards {
  display: grid;
  gap: 14px;
}

.dashboard-cards {
  grid-template-columns: repeat(5, minmax(176px, 1fr));
}

.metric {
  position: relative;
  min-height: 154px;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 8px;
}

.metric-clickable {
  text-align: left;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6d7e92;
}

.metric .value {
  margin-top: 4px;
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  color: var(--text);
}

.metric-ico {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.metric-ico svg {
  width: 24px;
  height: 24px;
}

.metric-Submitted { border-top: 4px solid #4f7ef7; }
.metric-Production { border-top: 4px solid #8757ea; }
.metric-Route { border-top: 4px solid #ef8c24; }
.metric-Completed { border-top: 4px solid #18a765; }
.metric-Cancelled { border-top: 4px solid #dc5a68; }

.metric-ico-Submitted {
  color: #1e66f5;
  background: linear-gradient(180deg, #eaf2ff 0%, #dbe8ff 100%);
}

.metric-ico-Production {
  color: #7156e2;
  background: linear-gradient(180deg, #f1edff 0%, #e1d8ff 100%);
}

.metric-ico-Route {
  color: #ee7d12;
  background: linear-gradient(180deg, #fff2e4 0%, #ffe0c0 100%);
}

.metric-ico-Completed {
  color: #1ab15b;
  background: linear-gradient(180deg, #e9f9ef 0%, #d7f1e0 100%);
}

.metric-ico-Cancelled {
  color: #d94a57;
  background: linear-gradient(180deg, #ffe9ec 0%, #f7d2d7 100%);
}

.metric-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.metric-breakdown b {
  color: var(--text);
}

.metric-breakdown.single {
  justify-content: center;
  min-height: 48px;
}

.metric-track {
  height: 6px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.metric-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #58a0ff);
}

.grid-two,
.detail-grid,
.settings-grid,
.clients-grid {
  display: grid;
  gap: 16px;
}

.grid-two,
.clients-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.dashboard-grid {
  margin-top: 16px;
}

.panel,
.table-card,
.detail-card {
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h3,
.workspace-head h2,
.detail-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.alert-list {
  display: grid;
  gap: 10px;
}

.alert-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.alert-status,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.alert-submitted { background: #eef4ff; color: #325fe6; }
.alert-production { background: #f0e9ff; color: #7547db; }
.alert-route { background: #fff3e2; color: #ce7a15; }
.alert-completed { background: #e9f8ef; color: #188255; }
.alert-cancelled { background: #feecef; color: #c54353; }

.alert-main {
  min-width: 0;
}

.alert-protocol {
  font-size: 12px;
  color: var(--muted);
}

.alert-customer {
  margin-top: 2px;
  font-weight: 700;
}

.alert-reason {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-row {
  padding: 12px;
  border: 1px solid rgba(30, 102, 245, 0.22);
  border-radius: 8px;
  background: #eef4ff;
  text-align: left;
}

.status-row:hover {
  background: #e1ecff;
  border-color: rgba(30, 102, 245, 0.34);
}

.status-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.status-label strong {
  font-size: 14px;
}

.status-label span {
  color: var(--muted);
  font-size: 13px;
}

.status-bar {
  height: 8px;
  border-radius: 999px;
  background: #e8edf5;
  overflow: hidden;
}

.status-bar div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #58a0ff);
}

.workspace-shell,
.clients-shell,
.settings-shell,
.detail-shell {
  display: grid;
  gap: 16px;
}

.process-detail-shell {
  gap: 22px;
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.workspace-actions {
  display: flex;
  gap: 10px;
}

.workspace-subtitle {
  margin-top: 4px;
  font-size: 13px;
}

.process-tabs,
.settings-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.process-tabs-list {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.tab-chip-shell {
  display: inline-flex;
  align-items: center;
  gap: 0;
  position: relative;
  min-height: 34px;
  padding: 0 23px 0 0;
  border: 1px solid #0f62fe;
  border-radius: 8px;
  background: #0f62fe;
  color: #fff;
  overflow: hidden;
}

.tab-chip-shell.active {
  border-color: #0f62fe;
  background: #0f62fe;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.18);
}

.tab-chip,
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #0f62fe;
  border-radius: 8px;
  background: #0f62fe;
  color: #fff;
}

.tab-chip {
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.tab-chip-shell.active .tab-chip {
  color: #fff;
}

.tab-title {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.tab-close {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  padding: 4px;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}

.tab-chip-shell:not(:has(.tab-close)) {
  padding-right: 0;
}

.client-status-summary-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(102px, 0.34fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(30, 102, 245, 0.3);
  border-radius: 8px;
  background: #eef4ff;
  color: var(--blue-strong);
  text-align: left;
}

.client-status-summary-row:hover {
  border-color: rgba(30, 102, 245, 0.42);
  background: #e1ecff;
}

.client-status-summary-row span {
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 500;
}

.client-status-summary-row b {
  margin: 0;
  font-size: 14px;
  text-align: left;
}

.client-status-summary-row.status-Submitted:hover { box-shadow: inset 4px 0 0 #4f7ef7; }
.client-status-summary-row.status-Production:hover { box-shadow: inset 4px 0 0 #8757ea; }
.client-status-summary-row.status-Route:hover { box-shadow: inset 4px 0 0 #ef8c24; }
.client-status-summary-row.status-Completed:hover { box-shadow: inset 4px 0 0 #18a765; }
.client-status-summary-row.status-Cancelled:hover { box-shadow: inset 4px 0 0 #dc5a68; }

.profile-password-only {
  grid-template-columns: 1fr;
}

.tab-close:hover {
  background: #0043ce;
  color: #fff;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.list-filters {
  margin-bottom: 14px;
}

.process-filters,
.client-filters {
  padding: 16px 0 0;
  margin: 0;
}

.search {
  min-width: 240px;
}

.process-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.process-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.process-toolbar-actions {
  margin-left: auto;
}

.process-toolbar select {
  min-width: 210px;
  max-width: 210px;
}

.process-toolbar .columns-shell {
  margin-left: auto;
}

.process-toolbar button {
  flex: 0 0 auto;
}

.export-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.export-action svg {
  width: 16px;
  height: 16px;
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
}

.process-tool {
  justify-content: flex-end;
}

.process-tool-actions {
  gap: 8px;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #dfe7f1;
  background: #f6f9fd;
  color: #50627a;
  font-size: 12px;
  font-weight: 700;
}

.columns-shell {
  position: relative;
  display: inline-flex;
}

.columns-trigger {
  min-width: 108px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.columns-trigger svg {
  width: 14px;
  height: 14px;
}

.columns-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 24;
  width: 260px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.columns-menu-head {
  display: grid;
  gap: 2px;
}

.columns-menu-head strong {
  font-size: 14px;
}

.columns-menu-head span,
.columns-menu-note {
  color: var(--muted);
  font-size: 12px;
}

.sort-shell {
  position: relative;
  display: inline-flex;
}

.sort-trigger {
  min-width: 108px;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.sort-trigger:hover {
  background: transparent;
  color: #0f62fe;
}

.sort-trigger svg {
  width: 14px;
  height: 14px;
}

.sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 24;
  width: 290px;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid #0f62fe;
  background: #0f62fe;
  color: #fff;
  text-align: left;
  font-size: 13px;
}

.sort-option small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
}

.sort-option.active {
  border-color: #0f62fe;
  background: #0f62fe;
  box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.18);
}

.sort-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 10px;
  border-radius: 999px;
  border: 1px solid #dfe7f1;
  background: #f7faff;
  color: #374a61;
  font-size: 12px;
  font-weight: 700;
}

.chip-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #657990;
}

.chip-icon svg {
  width: 14px;
  height: 14px;
}

.columns-menu-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.columns-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #fbfdff;
  font-size: 13px;
}

.columns-option.disabled {
  opacity: 0.7;
}

.columns-option input {
  accent-color: var(--blue);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 12px 12px;
  border-bottom: 1px solid #e8edf5;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
  color: #44546a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:hover,
.active-row {
  background: #f7fbff;
}

tbody tr {
  cursor: pointer;
}

.sort-trigger {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.sort-trigger:hover {
  background: transparent;
  color: #0f62fe;
}

.th-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.th-label {
  text-align: left;
  white-space: nowrap;
}

.sort-indicator {
  color: #8594a8;
  margin-left: auto;
}

.process-table tbody tr.status-Submitted td:first-child {
  box-shadow: inset 4px 0 0 #4f7ef7;
}

.process-table tbody tr.status-Production td:first-child {
  box-shadow: inset 4px 0 0 #8757ea;
}

.process-table tbody tr.status-Route td:first-child {
  box-shadow: inset 4px 0 0 #ef8c24;
}

.process-table tbody tr.status-Completed td:first-child {
  box-shadow: inset 4px 0 0 #18a765;
}

.process-table tbody tr.status-Cancelled td:first-child {
  box-shadow: inset 4px 0 0 #dc5a68;
}

.table-strong {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.client-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.total-pill {
  background: linear-gradient(90deg, #1e66f5, #5f8dff);
}

.pill-submitted {
  background: linear-gradient(90deg, #1e66f5, #5f8dff);
}

.pill-production {
  background: linear-gradient(90deg, #7156e2, #9274f0);
}

.pill-route {
  background: linear-gradient(90deg, #ee7d12, #f0a24d);
}

.pill-completed {
  background: linear-gradient(90deg, #1ab15b, #54c982);
}

.pill-cancelled {
  background: linear-gradient(90deg, #dc5a68, #eb7d89);
}

.client-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 14px 0 0;
}

.client-filters select {
  min-width: 210px;
  max-width: 210px;
}

.client-filters .secondary {
  flex: 0 0 auto;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(15, 25, 40, 0.42);
  padding: 28px;
}

.modal-card {
  width: min(1040px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 28, 50, 0.22);
}

.client-modal-card {
  padding: 18px;
}

.table-muted {
  display: block;
  color: var(--muted);
}

.badge {
  color: #27405f;
  background: #edf3fb;
  border: 1px solid #d9e4f0;
}

.badge.Submitted {
  color: #305fe4;
  background: #eef4ff;
  border-color: #d8e5ff;
}

.badge.Production {
  color: #7547db;
  background: #f0e9ff;
  border-color: #dfd2ff;
}

.badge.Route {
  color: #ce7a15;
  background: #fff3e2;
  border-color: #ffe2b6;
}

.badge.Completed {
  color: #188255;
  background: #e9f8ef;
  border-color: #caecd8;
}

.badge.Cancelled {
  color: #c54353;
  background: #feecef;
  border-color: #f9ccd3;
}

.mono {
  font-family: inherit;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fafdff;
  color: var(--muted);
}

.detail-shell {
  display: grid;
  gap: 16px;
}

.detail-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.detail-banner strong {
  font-size: 14px;
}

.detail-banner span {
  font-size: 13px;
}

.detail-banner.ok {
  background: var(--green-soft);
  border-color: #cfe9d9;
  color: #167a50;
}

.detail-banner.warn {
  background: var(--red-soft);
  border-color: #f0c6ce;
  color: #b24756;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.detail-head-actions {
  display: flex;
  gap: 10px;
  margin-top: 0;
}

.detail-subtitle {
  margin-top: 4px;
  font-size: 13px;
}

.customer-document {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  border: 1px solid #cbd9ee;
  border-radius: 6px;
  background: #f5f8fd;
  color: #34445a;
}

.customer-document span {
  color: #5b6d83;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.customer-document b {
  font-size: 13px;
  font-weight: 800;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.process-detail-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.process-detail-grid > .process-group-card:nth-child(1) {
  grid-column: span 6;
}

.process-detail-grid > .process-group-card:nth-child(2) {
  grid-column: span 6;
}

.process-detail-grid > .process-group-card:nth-child(3) {
  grid-column: 1 / -1;
}

.detail-card {
  min-width: 0;
  height: 100%;
}

.process-group-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  align-self: stretch;
}

.process-detail-grid > .process-group-card:nth-child(1),
.process-detail-grid > .process-group-card:nth-child(2) {
  min-height: 264px;
}

.detail-summary-list-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(48px, auto);
  gap: 10px 12px;
  align-content: start;
}

.detail-summary-list-wide > div {
  min-height: 48px;
}

.client-detail-grid {
  align-items: stretch;
}

.detail-summary-row-full {
  grid-column: 1 / -1;
}

.detail-summary-row-full > b {
  white-space: normal;
  line-height: 1.35;
}

.timeline-overview {
  display: grid;
  gap: 16px;
  padding: 20px 20px 18px;
  border-top: 4px solid var(--blue);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 252, 255, 0.98)),
    #fff;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(20, 35, 70, 0.06);
}

.timeline-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.timeline-overview-slim {
  gap: 12px;
}

.timeline-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 420px;
}

.summary-tile {
  display: grid;
  gap: 7px;
  padding: 14px 18px 15px;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 35, 70, 0.05);
  min-height: 86px;
}

.summary-tile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-tile b {
  font-size: 22px;
  line-height: 1.08;
  color: var(--text);
}

.summary-tile small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.summary-ok {
  border-color: #caecd8;
  background: #f0fbf5;
}

.summary-ok b {
  color: #167a50;
}

.summary-warn {
  border-color: #f0c6ce;
  background: #fff5f6;
}

.summary-warn b {
  color: #b24756;
}

.summary-completed {
  border-color: #caecd8;
  background: #f0fbf5;
}

.summary-completed b {
  color: #167a50;
}

.detail-inline-input {
  width: 100%;
  height: 36px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: var(--text);
  box-sizing: border-box;
  max-width: 100%;
}

.detail-summary-list .detail-summary-edit-row {
  min-height: 48px;
  height: 48px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.detail-summary-edit-row > span,
.detail-summary-edit-row > input {
  align-self: center;
}

.inline-edit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
  padding-top: 0;
}

.inline-edit-actions .new {
  min-width: 148px;
}

.detail-inline-input-phone {
  min-width: 180px;
}

.detail-inline-input-email {
  min-width: 180px;
}

.timeline-stage-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr) 16px minmax(0, 1fr) 16px minmax(0, 1fr);
  column-gap: 12px;
  align-items: stretch;
  margin: 2px 0 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.timeline-stage-item {
  display: grid;
  min-width: 0;
  width: 100%;
}

.timeline-stage-arrow {
  position: relative;
  width: 16px;
  height: auto;
  margin: 0;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c7d2e3;
  font-size: 24px;
  line-height: 1;
  font-weight: 400;
}

.timeline-stage-arrow::after {
  content: '>';
  display: block;
}

.timeline-stage-flow > .timeline-stage-item:nth-child(1) {
  grid-column: 1;
}

.timeline-stage-flow > .timeline-stage-arrow:nth-child(2) {
  grid-column: 2;
}

.timeline-stage-flow > .timeline-stage-item:nth-child(3) {
  grid-column: 3;
}

.timeline-stage-flow > .timeline-stage-arrow:nth-child(4) {
  grid-column: 4;
}

.timeline-stage-flow > .timeline-stage-item:nth-child(5) {
  grid-column: 5;
}

.timeline-stage-flow > .timeline-stage-arrow:nth-child(6) {
  grid-column: 6;
}

.timeline-stage-flow > .timeline-stage-item:nth-child(7) {
  grid-column: 7;
}

.timeline-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-top: 18px;
}

.timeline-step-line {
  position: absolute;
  top: 31px;
  left: 50%;
  width: calc(100% + 12px);
  height: 2px;
  background: #cfd8e6;
  transform: translateX(50%);
}

.timeline-step:first-child .timeline-step-line {
  width: 50%;
}

.timeline-step:last-child .timeline-step-line {
  width: 50%;
  right: 50%;
  left: auto;
  transform: none;
}

.timeline-step-circle {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 3px solid #cfd8e6;
  color: #5a6a80;
  font-size: 18px;
  font-weight: 800;
}

.timeline-step.done .timeline-step-circle,
.timeline-step.active .timeline-step-circle {
  border-color: var(--blue);
  color: var(--blue);
}

.timeline-step.done .timeline-step-line,
.timeline-step.active .timeline-step-line {
  background: var(--blue);
}

.timeline-step-label {
  font-size: 13px;
  font-weight: 700;
  color: #3c4e64;
  text-align: center;
}

.timeline-stage-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #dbe3ef;
  color: #24364b;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(20, 35, 70, 0.08);
}

.timeline-stage-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px 16px;
  border: 1px solid #e4eaf3;
  border-top: 4px solid #d7dfeb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 35, 70, 0.05);
  position: relative;
  overflow: hidden;
  min-height: 274px;
  width: 100%;
  height: 100%;
}

.timeline-stage-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #d7dfeb;
}

.timeline-stage-card.active {
  box-shadow: 0 14px 30px rgba(30, 102, 245, 0.12);
  border-color: rgba(30, 102, 245, 0.18);
}

.timeline-stage-card.stage-future {
  border-top-color: #d3dcea;
  background: #f7f9fc;
}

.timeline-stage-card.stage-future::before,
.timeline-stage-card.stage-future .timeline-stage-icon {
  background: #eef2f7;
  color: #8a97a8;
}

.timeline-stage-card.stage-future {
  border-top-color: #8c99aa;
}

.timeline-stage-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 0;
}

.timeline-stage-icon {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--blue);
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.timeline-stage-icon svg {
  width: 26px;
  height: 26px;
}

.timeline-stage-title {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.timeline-stage-card.stage-submitted {
  border-top-color: #1e66f5;
}

.stage-submitted::before,
.stage-submitted .timeline-stage-icon {
  background: linear-gradient(180deg, #eaf2ff 0%, #dbe8ff 100%);
  color: #1e66f5;
}

.timeline-stage-card.stage-production {
  border-top-color: #7156e2;
}

.stage-production::before,
.stage-production .timeline-stage-icon {
  background: linear-gradient(180deg, #f1edff 0%, #e1d8ff 100%);
  color: #7156e2;
}

.timeline-stage-card.stage-route {
  border-top-color: #ee7d12;
}

.stage-route::before,
.stage-route .timeline-stage-icon {
  background: linear-gradient(180deg, #fff2e4 0%, #ffe0c0 100%);
  color: #ee7d12;
}

.timeline-stage-card.stage-completed {
  border-top-color: #1ab15b;
}

.stage-completed::before,
.stage-completed .timeline-stage-icon {
  background: linear-gradient(180deg, #e9f9ef 0%, #d7f1e0 100%);
  color: #1ab15b;
}

.timeline-stage-card.stage-cancelled {
  border-top-color: #d94a57;
}

.stage-cancelled::before,
.stage-cancelled .timeline-stage-icon {
  background: linear-gradient(180deg, #ffe9ec 0%, #f7d2d7 100%);
  color: #d94a57;
}

.timeline-stage-head strong {
  display: block;
  font-size: 17px;
  color: var(--text);
  line-height: 1.1;
}

.timeline-stage-head span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.timeline-stage-order {
  margin-left: auto;
  font-size: 54px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(36, 54, 75, 0.10);
  user-select: none;
}

.timeline-stage-card.stage-future .timeline-stage-head span {
  color: #95a2b4;
}

.timeline-stage-card.stage-future .timeline-stage-head strong {
  color: #5d6b7c;
}

.timeline-stage-card.stage-future .timeline-stage-order {
  color: rgba(105, 120, 140, 0.16);
}

.timeline-stage-body {
  padding-top: 12px;
  border-top: 1px solid #e9eff6;
  display: grid;
  gap: 10px;
}

.timeline-stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.timeline-stage-meta span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.timeline-stage-meta b {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
  flex: 0 0 auto;
}

.timeline-stage-note {
  margin-top: 2px;
  font-size: 12px;
  color: #49607d;
  font-weight: 700;
}

.timeline-alert-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #e4eaf3;
  background: #f8fbff;
}

.timeline-alert-inline.ok {
  border-color: #caecd8;
  background: #f3fbf6;
}

.timeline-alert-inline.warn {
  border-color: #f0c6ce;
  background: #fff5f6;
}

.timeline-alert-text {
  display: grid;
  gap: 3px;
}

.timeline-alert-text strong {
  font-size: 14px;
  color: var(--text);
}

.timeline-alert-text span {
  font-size: 12px;
  color: var(--muted);
}

.timeline-alert-badge {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe4f0;
  font-size: 12px;
  font-weight: 800;
  color: #314663;
}

.empty-state.compact {
  padding: 16px 18px;
  margin: 0;
}

.timeline-stage-body span {
  display: block;
  color: #5b6d83;
  font-size: 13px;
  line-height: 1.45;
}

.timeline-stage-footer {
  font-size: 12px;
  font-weight: 700;
  color: #738397;
}

.timeline-stage-card.active .timeline-stage-head strong {
  color: var(--blue-strong);
}

.timeline-stage-card.active .timeline-stage-body span:last-child {
  font-weight: 700;
  color: #314563;
}

.timeline-stage-card.stage-cancelled.active .timeline-stage-head strong,
.timeline-stage-card.stage-cancelled .timeline-stage-head strong {
  color: #b63543;
}

.timeline-stage-card.stage-cancelled .timeline-stage-body b,
.summary-warn b {
  color: #b63543;
}

.timeline-stage-card.stage-future {
  border-top-color: #8c99aa !important;
}

.timeline-stage-card.stage-future::before,
.timeline-stage-card.stage-future .timeline-stage-icon {
  background: #eef2f7 !important;
  color: #8a97a8 !important;
}

.timeline-stage-card.stage-future .timeline-stage-head strong {
  color: #5d6b7c !important;
}

.process-detail-shell .timeline-overview {
  margin-top: 2px;
}

.detail-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-field {
  padding: 12px;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  background: #fbfdff;
  min-height: 48px;
}

.detail-field span,
.detail-summary-list span,
.permission-row span,
.client-process-row span,
.timeline-stage-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.detail-field b,
.detail-summary-list b,
.client-process-row b {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--text);
}

.detail-summary-list {
  display: grid;
  grid-auto-rows: 48px;
  align-content: start;
  gap: 10px;
}

.detail-summary-list div {
  display: grid;
  grid-template-columns: minmax(102px, 0.34fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  background: #fbfdff;
  min-height: 48px;
}

.detail-summary-list.compact div {
  padding: 9px 12px;
}

.detail-summary-list div > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-summary-list div > b,
.detail-summary-list div > input {
  margin-top: 0;
  min-width: 0;
}

.detail-summary-list div > input {
  width: 100%;
}

.detail-summary-list div > b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.detail-summary-list-wide div > span,
.detail-summary-list-wide div > b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-summary-row-full {
  align-items: start;
  grid-template-columns: 132px minmax(0, 1fr) !important;
}

.detail-summary-row-full > b {
  white-space: normal;
  line-height: 1.35;
  text-align: left;
}

.detail-alert-box {
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fbff;
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.detail-alert-box.ok {
  border-color: #caecd8;
  background: #f0fbf5;
  color: #167a50;
}

.detail-alert-box.warn {
  border-color: #f0c6ce;
  background: #fff5f6;
  color: #b24756;
}

.timeline-list {
  display: grid;
  gap: 14px;
  padding-left: 10px;
  position: relative;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 17px;
  width: 2px;
  background: #dce5f1;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  margin-left: 4px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px #eaf1ff;
}

.timeline-item.final .timeline-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px #e8f8ef;
}

.timeline-content {
  padding: 12px 14px;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  background: #fbfdff;
}

.timeline-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.timeline-top strong {
  font-size: 14px;
}

.timeline-content p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.clients-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
}

.client-detail-card {
  min-width: 0;
}

.client-detail-wrap {
  min-width: 0;
}

.client-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.client-process-card {
  grid-column: 1 / -1;
}

.client-process-list {
  display: grid;
  gap: 10px;
}

.client-process-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(30, 102, 245, 0.22);
  border-radius: 8px;
  background: #eef4ff;
  text-align: left;
  min-width: 0;
}

.client-process-row:hover {
  background: #e1ecff;
  border-color: rgba(30, 102, 245, 0.34);
}

.client-process-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.client-process-row strong,
.client-process-row span,
.client-process-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-table tbody tr.active-row td:first-child {
  box-shadow: inset 4px 0 0 var(--blue);
}

.settings-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-top: 4px solid var(--blue);
}

.settings-hero-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.settings-hero-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
}

.settings-hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.mini-stat {
  min-width: 96px;
  padding: 12px 14px;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  background: #fbfdff;
  display: grid;
  gap: 4px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-stat b {
  font-size: 20px;
  line-height: 1;
}

.settings-head {
  margin-bottom: 0;
}

.settings-tabs {
  justify-content: flex-start;
}

.settings-tabs .tab-chip {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #0f62fe;
  border-radius: 8px;
  background: #0f62fe;
  color: #fff;
}

.settings-tabs .tab-chip:hover,
.settings-tabs .tab-chip.active {
  background: #0043ce;
  border-color: #0043ce;
  color: #fff;
}

.settings-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.settings-users-mode,
.settings-profiles-mode {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.communication-panel {
  max-width: 1180px;
}

.communication-grid .form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.communication-grid .form-actions .new,
.communication-grid .form-actions .secondary {
  min-width: 148px;
}

.communication-test-modal {
  max-width: 620px;
}

.communication-test-overlay .confirmation-copy {
  min-width: 0;
}

.communication-test-symbol {
  background: rgba(15, 98, 254, 0.12);
  color: var(--blue);
}

.communication-test-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.communication-test-actions {
  margin-top: 8px;
}

.communication-test-actions .new,
.communication-test-actions .secondary {
  min-width: 132px;
}

.settings-panel {
  min-width: 0;
}

.settings-profile-list,
.users-list {
  display: grid;
  gap: 10px;
}

.users-list-head,
.profile-editor-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.profile-chip {
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.profile-chip.active {
  border-color: #0f62fe;
  background: #0f62fe;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.18);
}

.profile-chip strong,
.user-row strong {
  font-size: 14px;
}

.profile-chip span,
.user-row span {
  color: var(--muted);
  font-size: 12px;
}

.profile-chip span {
  color: rgba(255, 255, 255, 0.82);
}

.profile-editor-grid,
.communication-grid {
  display: grid;
  gap: 14px;
}

.profile-editor-grid .permissions-grid {
  margin-top: 2px;
}

.profile-editor-grid .field span {
  text-transform: none;
  letter-spacing: 0;
}

.permissions-grid {
  display: grid;
  gap: 10px;
}

.permissions-head,
.permission-row {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) repeat(4, minmax(78px, 0.62fr));
  gap: 14px;
  align-items: center;
}

.permissions-head {
  padding: 0 8px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.permission-row {
  padding: 12px 8px;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  background: #fbfdff;
}

.permission-row input[type="checkbox"] {
  justify-self: center;
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.user-form-grid {
  margin-top: 4px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-na {
  justify-self: center;
  color: #9aa8ba;
}

.user-form-grid .span-2 {
  grid-column: span 2;
}

.user-admin-actions {
  margin-top: 20px;
}

.hint-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f5f9ff;
  border: 1px solid #dce7fb;
  color: #43608f;
  font-size: 13px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 96px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  background: #fbfdff;
}

.user-row.active {
  border-color: rgba(30, 102, 245, 0.38);
  background: #dfeaff;
}

.user-row-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: left;
}

.user-row-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}

.user-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.small-action {
  min-width: 88px;
  height: 34px;
  font-size: 12px;
}

.field select,
.field input {
  width: 100%;
}

.toggle-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  display: inline-flex;
  align-items: center;
}

.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.switch-track {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: #cfd8e6;
  border: 1px solid #bcc7d7;
  position: relative;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  transition: transform 0.18s ease;
}

.switch input:checked + .switch-track {
  background: var(--blue);
  border-color: var(--blue);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(10, 18, 33, 0.42);
  padding: 24px;
}

.modal-card {
  width: min(920px, 100%);
  padding: 20px;
}

.user-modal {
  display: grid;
  gap: 16px;
}

body.theme-dark .theme-mode-btn {
  background: #1d2735;
  border-color: #314155;
  color: #e4ebf5;
}

body.theme-dark .theme-mode-btn.active {
  background: rgba(92, 145, 255, 0.18);
  border-color: rgba(92, 145, 255, 0.65);
  color: #9fc0ff;
}

@media (max-width: 980px) {
  .profile-preferences-grid,
  .password-pair {
    grid-template-columns: 1fr;
  }
}

.icon-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #0f62fe;
  background: #0f62fe;
  color: #fff;
}

.icon-close:hover {
  background: #0043ce;
  border-color: #0043ce;
  color: #fff;
}

.confirmation-overlay {
  z-index: 120;
  background: rgba(13, 21, 33, 0.72);
  backdrop-filter: blur(3px);
}

.confirmation-modal {
  width: min(680px, calc(100vw - 48px));
  min-height: 390px;
  max-height: calc(100vh - 64px);
  padding: 36px;
  border: 1px solid #f0b7b4;
  border-top: 7px solid #e10600;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(8, 16, 29, 0.34);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 24px;
  overflow: auto;
}

.confirmation-symbol {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff0ef;
  border: 2px solid #e10600;
  color: #e10600;
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
}

.confirmation-copy {
  align-self: center;
  min-width: 0;
}

.confirmation-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #b81912;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.confirmation-copy h2 {
  margin: 0;
  color: #1f2a37;
  font-size: 28px;
  line-height: 1.2;
}

.confirmation-copy p {
  margin: 14px 0 0;
  color: #49586b;
  font-size: 16px;
  line-height: 1.55;
}

.confirmation-detail {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #f0c2bf;
  border-radius: 8px;
  background: #fff6f5;
  color: #941b16;
  font-size: 14px;
  font-weight: 700;
}

.confirmation-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid #e4e9f0;
}

.confirmation-actions button {
  min-width: 170px;
  height: 48px;
  font-size: 15px;
}

.success-overlay {
  z-index: 120;
  background: rgba(13, 21, 33, 0.68);
  backdrop-filter: blur(3px);
}

.success-modal {
  width: min(680px, calc(100vw - 48px));
  min-height: 390px;
  max-height: calc(100vh - 64px);
  padding: 36px;
  border: 1px solid #a7dfbd;
  border-top: 7px solid #16a56a;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(8, 16, 29, 0.34);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 24px;
}

.success-symbol {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ecfaf2;
  border: 2px solid #16a56a;
  color: #16a56a;
}

.success-symbol svg {
  width: 38px;
  height: 38px;
}

.success-copy {
  align-self: center;
  min-width: 0;
}

.success-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #13794f;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.success-copy h2 {
  margin: 0;
  color: #1f2a37;
  font-size: 28px;
  line-height: 1.2;
}

.success-copy p {
  margin: 14px 0 0;
  color: #49586b;
  font-size: 16px;
  line-height: 1.55;
}

.success-detail {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #bce5cd;
  border-radius: 8px;
  background: #f0fbf5;
  color: #146b49;
  font-size: 14px;
  font-weight: 700;
}

.success-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid #e4e9f0;
}

.success-actions button {
  min-width: 170px;
  height: 48px;
  font-size: 15px;
}

.reports-shell {
  display: grid;
  gap: 16px;
}

.reports-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.report-picker {
  width: min(520px, 52vw);
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr);
  align-items: center;
  gap: 10px;
}

.report-picker > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.report-picker select {
  width: 100%;
}

.reports-toolbar-actions,
.report-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reports-toolbar h2,
.reports-toolbar p {
  margin: 0;
}

.reports-toolbar h2 {
  font-size: 24px;
}

.reports-toolbar p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.reports-layout {
  display: grid;
  grid-template-columns: 320px minmax(680px, 1fr);
  gap: 14px;
  align-items: start;
}

.report-builder,
.report-preview {
  min-width: 0;
  padding: 16px;
}

.report-builder {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.report-catalog-section {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.report-section-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-list-item {
  width: 100%;
  min-height: 62px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px 12px;
  border: 1px solid #0f62fe;
  border-radius: 8px;
  background: #0f62fe;
  color: #fff;
  text-align: left;
}

.report-list-item:hover,
.report-list-item.active {
  background: #0043ce;
  border-color: #0043ce;
}

.report-list-item.active {
  box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.2);
}

.report-list-item strong {
  font-size: 13px;
}

.report-list-item span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  line-height: 1.35;
}

.saved-report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
}

.report-delete {
  width: 38px;
  height: 38px;
  align-self: center;
  display: grid;
  place-items: center;
  padding: 9px;
}

.report-delete svg {
  width: 16px;
  height: 16px;
}

.report-empty {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.report-builder {
  display: grid;
  gap: 12px;
}

.report-field-palette {
  display: grid;
  gap: 8px;
}

.report-field-list {
  max-height: 260px;
  display: grid;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.report-field-option {
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-bottom: 1px solid #e7edf5;
  cursor: grab;
}

.report-field-option:last-child {
  border-bottom: 0;
}

.report-field-option:hover {
  background: #edf4ff;
}

.report-field-option input {
  width: 16px;
  height: 16px;
  accent-color: #0f62fe;
}

.report-field-option span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-field-option small {
  color: var(--muted);
  font-size: 10px;
}

.report-selected-fields {
  min-height: 72px;
  padding: 9px;
  border: 1px dashed #8caeea;
  border-radius: 8px;
  background: #f6f9ff;
}

.report-selected-fields.drag-over {
  border-color: #0f62fe;
  background: #e9f1ff;
}

.report-selected-fields > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.report-selected-fields > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.report-selected-fields em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.report-selected-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid #b8cef2;
  border-radius: 6px;
  background: #e7f0ff;
  color: #174a9b;
  font-size: 10px;
  font-weight: 600;
}

.report-selected-chip svg {
  width: 12px;
  height: 12px;
}

.report-drop-grid,
.report-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-drop-zone {
  min-height: 70px;
  padding: 10px;
  border: 1px dashed #8caeea;
  border-radius: 8px;
  background: #f6f9ff;
  display: grid;
  gap: 7px;
}

.report-drop-zone.drag-over {
  border-color: #0f62fe;
  background: #e9f1ff;
  box-shadow: inset 0 0 0 1px #0f62fe;
}

.report-drop-zone > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.report-drop-zone select {
  height: 32px;
  padding: 0 8px;
  font-size: 11px;
}

.report-save {
  width: 100%;
}

.report-preview {
  min-height: 650px;
  overflow: hidden;
}

.report-preview .section-head > div {
  min-width: 0;
}

.report-preview-actions > span {
  margin-right: 4px;
}

.report-bars {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.report-bar-row {
  display: grid;
  gap: 7px;
}

.report-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
}

.report-bar-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-bar-track {
  height: 12px;
  border-radius: 4px;
  background: #e7edf6;
  overflow: hidden;
}

.report-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f62fe;
}

.report-table-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.report-table-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.report-table th {
  position: static;
  background: #f8fbff;
}

.report-table th:last-child,
.report-table td:last-child {
  text-align: right;
}

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 60;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 320px;
  max-width: 520px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
}

.toast strong {
  font-size: 14px;
}

.toast span {
  color: var(--muted);
  font-size: 13px;
}

.toast.success {
  border-color: #caecd8;
  background: #f0fbf5;
  color: #167a50;
}

.toast.error {
  border-color: #f0c6ce;
  background: #fff5f6;
  color: #b24756;
}

/* Dark theme keeps the application's semantic colors while lowering surface luminance. */
body.theme-dark .brand-lockup {
  background: #fff;
  border-color: #dbe3ef;
}

body.theme-dark .metric-Submitted,
body.theme-dark .metric-Production,
body.theme-dark .metric-Route,
body.theme-dark .metric-Completed,
body.theme-dark .metric-Cancelled {
  background: #182433;
}

body.theme-dark .metric-Submitted { border-top-color: #4f7ef7; }
body.theme-dark .metric-Production { border-top-color: #8757ea; }
body.theme-dark .metric-Route { border-top-color: #ef8c24; }
body.theme-dark .metric-Completed { border-top-color: #18a765; }
body.theme-dark .metric-Cancelled { border-top-color: #dc5a68; }

body.theme-dark .metric-ico-Submitted {
  color: #75a2ff;
  background: rgba(61, 108, 240, 0.2);
}

body.theme-dark .metric-ico-Production {
  color: #b59aff;
  background: rgba(132, 88, 226, 0.2);
}

body.theme-dark .metric-ico-Route {
  color: #ffb45d;
  background: rgba(224, 138, 30, 0.2);
}

body.theme-dark .metric-ico-Completed {
  color: #6ed7a0;
  background: rgba(24, 167, 101, 0.2);
}

body.theme-dark .metric-ico-Cancelled {
  color: #f28d9a;
  background: rgba(215, 79, 97, 0.2);
}

body.theme-dark .metric-Submitted .metric-track span,
body.theme-dark .status-summary-Submitted .status-bar div {
  background: #4f7ef7;
}

body.theme-dark .metric-Production .metric-track span,
body.theme-dark .status-summary-Production .status-bar div {
  background: #8757ea;
}

body.theme-dark .metric-Route .metric-track span,
body.theme-dark .status-summary-Route .status-bar div {
  background: #ef8c24;
}

body.theme-dark .metric-Completed .metric-track span,
body.theme-dark .status-summary-Completed .status-bar div {
  background: #18a765;
}

body.theme-dark .metric-Cancelled .metric-track span,
body.theme-dark .status-summary-Cancelled .status-bar div {
  background: #dc5a68;
}

body.theme-dark .alert-status.alert-submitted,
body.theme-dark .badge.Submitted {
  color: #9fc0ff;
  background: rgba(61, 108, 240, 0.2);
  border-color: rgba(61, 108, 240, 0.38);
}

body.theme-dark .alert-status.alert-production,
body.theme-dark .badge.Production {
  color: #c0a8ff;
  background: rgba(132, 88, 226, 0.2);
  border-color: rgba(132, 88, 226, 0.38);
}

body.theme-dark .alert-status.alert-route,
body.theme-dark .badge.Route {
  color: #ffd09a;
  background: rgba(224, 138, 30, 0.2);
  border-color: rgba(224, 138, 30, 0.38);
}

body.theme-dark .alert-status.alert-completed,
body.theme-dark .badge.Completed {
  color: #95e0b7;
  background: rgba(24, 167, 101, 0.2);
  border-color: rgba(24, 167, 101, 0.38);
}

body.theme-dark .alert-status.alert-cancelled,
body.theme-dark .badge.Cancelled {
  color: #f0a3ad;
  background: rgba(215, 79, 97, 0.2);
  border-color: rgba(215, 79, 97, 0.38);
}

body.theme-dark .tab-chip-shell {
  background: #1d2a3b;
  border-color: #324457;
}

body.theme-dark .tab-chip-shell.active {
  background: #22344a;
  border-color: rgba(94, 149, 255, 0.48);
  color: #9fc0ff;
}

body.theme-dark .tab-chip {
  background: transparent;
}

body.theme-dark .detail-inline-input {
  background: #101a27;
  border-color: #41586c;
  color: #e8edf5;
}
