﻿/* DOMINIUM — Impeccable command-deck visual system, 2026-09-25 */
@font-face {
  font-family: "Archivo DOM";
  src: url("/assets/fonts/archivo-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root,
:root[data-theme="dark"],
:root[data-theme="light"] {
  color-scheme: dark;
  font-family: "Archivo DOM", "Segoe UI", sans-serif;
  --ink: #f7f7f5;
  --muted: #a0a0a8;
  --dim: #66666e;
  --line: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.15);
  --soft: #030304;
  --surface: #0a0a0b;
  --surface-raised: #101012;
  --surface-hover: #17171a;
  --surface-active: #1c1c20;
  --navy: #050506;
  --blue: #ff1738;
  --accent: #ff1738;
  --accent-hi: #ff4961;
  --accent-deep: #a8001d;
  --accent-soft: rgba(255, 23, 56, 0.12);
  --green: #40d99b;
  --green-soft: rgba(64, 217, 155, 0.11);
  --amber: #ffc857;
  --amber-soft: rgba(255, 200, 87, 0.11);
  --red: #ff3854;
  --red-soft: rgba(255, 56, 84, 0.12);
  --info: #78c9ff;
  --warning: #ffc857;
  --danger: #ff3854;
  --glass: rgba(9, 9, 11, 0.78);
  --glass-strong: rgba(12, 12, 14, 0.92);
  --ui-radius-xs: 7px;
  --ui-radius-sm: 10px;
  --ui-radius-md: 14px;
  --ui-shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.34);
  --ui-shadow-strong: 0 30px 90px rgba(0, 0, 0, 0.68);
  --ui-focus: 0 0 0 3px rgba(255, 23, 56, 0.22);
}

html {
  background: #020203;
  scrollbar-color: #38383e #09090a;
  scrollbar-width: thin;
}

body {
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(920px 520px at 14% -16%, rgba(255, 23, 56, 0.10), transparent 68%),
    radial-gradient(640px 460px at 104% 8%, rgba(255, 255, 255, 0.025), transparent 72%),
    #030304;
  font-family: "Archivo DOM", "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 1, "ss02" 1;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  accent-color: var(--accent);
  caret-color: var(--accent-hi);
}

body::after {
  content: "";
  position: fixed;
  z-index: 0;
  top: -260px;
  right: -180px;
  width: 620px;
  height: 620px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 23, 56, 0.10) 0, rgba(255, 23, 56, 0.025) 36%, transparent 68%);
  filter: blur(12px);
  opacity: 0.55;
  animation: dominium-ambient 12s cubic-bezier(.4,0,.2,1) infinite alternate;
}

.app-header,
.app-shell {
  position: relative;
  z-index: 1;
}

::selection {
  color: #fff;
  background: rgba(255, 23, 56, 0.72);
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #080809; }
::-webkit-scrollbar-thumb {
  background: #303034;
  border: 2px solid #080809;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: #48484f; }

a,
button,
input,
select,
textarea { font: inherit; }

:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-hi) !important;
  outline-offset: 2px;
  box-shadow: var(--ui-focus);
}

.app-header {
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(19, 19, 22, 0.96), rgba(5, 5, 6, 0.92));
  border-bottom: 1px solid rgba(255, 23, 56, 0.24);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px) saturate(118%);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
}

.app-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 0 34%, rgba(255,255,255,.025) 43%, transparent 52% 100%);
}

.app-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,23,56,.75) 24%, rgba(255,255,255,.16) 48%, rgba(255,23,56,.34) 72%, transparent);
}

.brand-mark {
  background: #f6f6f4;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 7px 18px rgba(0,0,0,.28);
}

.product {
  color: #fff;
  font-size: .81rem;
  font-weight: 820;
  letter-spacing: .012em;
}

.product-tagline {
  color: #777780;
  font-size: .57rem;
  font-weight: 620;
}

.header-partner-logo { filter: saturate(1.12) contrast(1.08); }

.sidebar-toggle,
.icon-button,
.notification-bell {
  color: #96969e;
  background: rgba(255,255,255,.018);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sidebar-toggle:hover,
.icon-button:hover:not(:disabled),
.notification-bell:hover {
  color: #fff;
  background: rgba(255,255,255,.055);
  border-color: var(--line-strong);
}

.theme-toggle { display: none !important; }

.profile-tabs {
  gap: 2px;
  padding: 3px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.profile-tab {
  min-width: 112px;
  height: 31px;
  padding: 0 11px;
  color: #8d8d96;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.profile-tab:hover:not(:disabled) {
  color: #f5f5f3;
  background: rgba(255,255,255,.05);
}

.profile-tab.active {
  color: #fff;
  background: linear-gradient(180deg, #ff2948, #d80027);
  box-shadow: 0 8px 20px rgba(135, 0, 24, .34);
}

.operator {
  border-left-color: var(--line);
}

.operator span { color: #f3f3f1; }
.operator small { color: #74747c; }

.operator-avatar {
  color: #fff;
  background: linear-gradient(180deg, #1d1d21, #101012);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.side-nav {
  background:
    linear-gradient(180deg, rgba(12,12,14,.98), rgba(5,5,6,.99));
  border-right: 1px solid var(--line);
}

.side-nav::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,23,56,.34), transparent 28%, transparent 72%, rgba(255,23,56,.10));
}

.side-nav-label {
  margin-top: 6px;
  color: #5f5f67;
  font-size: .57rem;
  font-weight: 760;
  letter-spacing: .08em;
}

.side-nav-item {
  min-height: 46px;
  margin-bottom: 3px;
  padding: 6px 10px;
  color: #96969f;
  border-radius: 8px;
  transition: color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.side-nav-item::before {
  inset: 9px auto 9px 0;
  width: 1px;
  background: transparent;
}

.side-nav-item:hover {
  color: #f3f3f1;
  background: rgba(255,255,255,.042);
}

.side-nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255,23,56,.12), rgba(255,255,255,.025) 58%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255,23,56,.08);
}

.side-nav-item.active::before {
  width: 1px;
  background: var(--accent-hi);
  box-shadow: 4px 0 16px rgba(255,23,56,.3);
}

.side-nav-item > svg { color: #76767e; }
.side-nav-item.active > svg,
.side-nav-item:hover > svg { color: var(--accent-hi); }

.side-nav-item strong {
  font-size: .73rem;
  font-weight: 680;
}

.side-nav-item small {
  color: #5d5d65;
  font-size: .54rem;
  letter-spacing: .04em;
}

.side-nav-footer {
  color: #6f6f77;
  background: rgba(5,5,6,.96);
  border-top: 1px solid var(--line);
}

.side-brand-technet {
  border-radius: 6px;
  background: #f5f5f3;
}

.side-nav-assurance,
.side-nav-legal { color: #6b6b74; }
.side-nav-legal:hover { color: #f0f0ee; }

main {
  position: relative;
  background:
    radial-gradient(700px 360px at 90% -40px, rgba(255,23,56,.045), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.006), transparent 180px),
    #030304;
}

.workspace-heading {
  min-height: 46px;
  margin-bottom: 18px;
  align-items: center;
  justify-content: space-between;
}

.workspace-heading h2 {
  margin: 0;
  color: #fafaf8;
  font-size: clamp(1.2rem, 1.5vw, 1.52rem);
  font-weight: 760;
  letter-spacing: -.026em;
  line-height: 1.05;
}

.workspace-description { max-width: 72ch; color: #9898a0; font-size: .72rem; line-height: 1.5; }
.section-label { display: none !important; }
.dashboard-updated, .technician-source, #technicianSource, #dashboardUpdated { color: #777780; font-size: .61rem; font-weight: 650; }

.dashboard-metrics, .summary, .stock-summary, .import-summary {
  overflow: hidden;
  gap: 0;
  background: #09090a;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.dashboard-metric, .metric, .fixed-code, .stock-summary .metric, .import-summary > div {
  min-height: 82px;
  padding: 13px 15px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.dashboard-metric:last-child, .metric:last-child, .import-summary > div:last-child { border-right: 0; }
.dashboard-metric:hover, .metric:hover, .fixed-code:hover, .stock-summary .metric:hover, .import-summary > div:hover { background: rgba(255,255,255,.018); border-color: var(--line); }

.dashboard-metric > div span, .metric span, .fixed-code > span, .import-summary span { color: #808089; font-size: .63rem; font-weight: 620; }
.dashboard-metric strong, .metric strong { color: #f7f7f5; font-size: 1.62rem; font-weight: 720; letter-spacing: -.025em; }
.dashboard-metric > div svg { color: #62626a; width: 15px; height: 15px; }
.dashboard-metric.success strong, .success-metric strong { color: var(--green); }
.dashboard-metric.warning strong { color: var(--amber); }
.dashboard-metric.danger strong { color: var(--red); }
.dashboard-grid, .intelligence-grid { gap: 12px; }

.dashboard-panel, .intelligence-panel, .table-section, .stock-table-section,
.bulk-create-table-section, .import-preview-section, .history-import-audit,
.toa-automation, .automation-test-controls, .automation-test-review, .automation-result-card {
  background: #09090a;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
}

.dashboard-panel:hover, .intelligence-panel:hover { border-color: rgba(255,255,255,.12); }
.dashboard-panel > header, .intelligence-panel > header, .table-section > header,
.stock-table-section > header, .bulk-create-table-section > header,
.import-preview-section > header, .history-import-audit > header { border-bottom-color: var(--line); }
.dashboard-panel h3, .intelligence-panel h3, .table-section h3, .stock-table-section h3 { color: #f4f4f2; font-weight: 690; letter-spacing: -.012em; }
.dashboard-panel header span, .intelligence-panel header span { color: #74747c; }

.distribution-track { overflow: hidden; height: 5px; background: #18181a; border-radius: 999px; }
.distribution-track i { background: linear-gradient(90deg, #c30023, var(--accent-hi)); box-shadow: none; }
.distribution-track .completed-bar { background: var(--green); }
.distribution-track .failure-bar { background: var(--red); }

.toolbar, .stock-toolbar, .import-toolbar, .bulk-create-form, .stock-filters,
.close-toolbar, .report-toolbar, .database-toolbar, .history-toolbar {
  background: #080809;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}

.field span, .search-field span, .compact-field span, label > span { color: #8a8a92; font-weight: 620; }
.field input, .field select, .field textarea, .search-field input,
.compact-field input, .compact-field select, .bulk-contracts-field textarea,
.equipment-row input, .equipment-row select, .material-row input, .material-row select,
.toa-paste textarea, .stock-writeoff-dialog input, .stock-writeoff-dialog select,
.dominium-dialog select, .dominium-dialog textarea, .account-role-select {
  color: #f2f2f0;
  background: #0b0b0d;
  border: 1px solid #29292e;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.field input:hover, .field select:hover, .field textarea:hover,
.search-field input:hover, .compact-field input:hover, .compact-field select:hover { border-color: #3c3c42; }
.field input:focus, .field select:focus, .field textarea:focus,
.search-field input:focus, .compact-field input:focus, .compact-field select:focus,
.dominium-dialog select:focus, .dominium-dialog textarea:focus {
  background: #0d0d0f;
  border-color: rgba(255,23,56,.72);
}

input::placeholder, textarea::placeholder { color: #66666e; opacity: 1; }
select option { color: #f3f3f1; background: #0c0c0e; }

.button, .auth-register-submit, .auth-submit-track button { min-height: 36px; border-radius: 8px; font-weight: 680; letter-spacing: -.005em; }
.button.primary, .auth-register-submit, .auth-submit-track button {
  color: #fff;
  background: linear-gradient(180deg, #ff2d4b, #d50026);
  border: 0;
  box-shadow: 0 9px 22px rgba(124,0,23,.30);
}
.button.primary:hover:not(:disabled), .auth-register-submit:hover:not(:disabled), .auth-submit-track button:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff405b, #e6002a);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(124,0,23,.36);
}

.button.primary:active:not(:disabled), .auth-register-submit:active:not(:disabled), .auth-submit-track button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 5px 14px rgba(124,0,23,.28);
}
.button.secondary, .button.compact, .view-tab, .code-option {
  color: #d9d9dc;
  background: #111113;
  border: 1px solid #2c2c31;
  box-shadow: none;
}
.button.secondary:hover:not(:disabled), .button.compact:hover:not(:disabled),
.view-tab:hover:not(:disabled), .code-option:hover:not(:disabled) {
  color: #fff;
  background: #18181b;
  border-color: #3b3b42;
}
.button.danger, .danger.button {
  color: #ff8293;
  background: rgba(255,56,84,.08);
  border: 1px solid rgba(255,56,84,.28);
  box-shadow: none;
}
.button:disabled, button:disabled { filter: saturate(.45); opacity: .44; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.view-tabs { padding: 3px; background: #0a0a0b; border: 1px solid var(--line); border-radius: 9px; }
.view-tab.active { color: #fff; background: #1a1a1d; box-shadow: inset 0 -1px 0 var(--accent); }
.code-option.active { color: #fff; background: rgba(255,23,56,.09); border-color: rgba(255,23,56,.36); box-shadow: inset 0 -1px 0 var(--accent); }
.code-option strong { color: var(--accent-hi); }

.runbar { overflow: hidden; background: #09090a; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.runbar::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,23,56,.5), transparent);
}
.progress-track, .progress-bar, .run-progress { overflow: hidden; background: #171719; border-radius: 999px; }
.progress-fill, #progressFill { background: linear-gradient(90deg, #b90021, var(--accent-hi)); }

.table-scroll { background: #070708; scrollbar-gutter: stable both-edges; }
table { border-collapse: separate; border-spacing: 0; }
thead th, th {
  color: #85858e !important;
  background: rgba(16,16,18,.96) !important;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
  font-size: .59rem;
  font-weight: 720;
  letter-spacing: .055em;
  text-transform: uppercase;
}

tbody td, td { color: #d7d7da; border-color: rgba(255,255,255,.055); }
tbody tr { background: transparent; transition: background-color .12s ease; }
tbody tr:hover { background: rgba(255,255,255,.025); }
tbody tr[aria-selected="true"], tbody tr.selected { background: rgba(255,23,56,.055); }

.status-badge, .failure-badge, .badge, .status-pill, .chip { border-radius: 999px; box-shadow: none; }
.status-badge.success, .badge.success, .status-pill.success, .chip.success {
  color: #7ff0bd;
  background: rgba(64,217,155,.10);
  border-color: rgba(64,217,155,.22);
}
.status-badge.warning, .badge.warning, .status-pill.warning, .chip.warning {
  color: #ffd985;
  background: rgba(255,200,87,.10);
  border-color: rgba(255,200,87,.22);
}
.status-badge.error, .failure-badge, .badge.danger, .status-pill.error, .chip.danger {
  color: #ff91a0;
  background: rgba(255,56,84,.10);
  border-color: rgba(255,56,84,.22);
}
.empty-state, .loading-state, .intelligence-empty { color: #76767e; background: transparent; }
.empty-state svg, .loading-state svg, .intelligence-empty svg { color: #505058; }

.auth-gate {
  background: rgba(2,2,3,.91);
  backdrop-filter: blur(22px) saturate(118%);
  -webkit-backdrop-filter: blur(22px) saturate(118%);
}
.auth-ambient {
  background:
    radial-gradient(620px 360px at 50% 24%, rgba(255,23,56,.13), transparent 68%),
    radial-gradient(480px 320px at 82% 86%, rgba(255,255,255,.025), transparent 72%);
}
.auth-mascots { display: none !important; }
.auth-card {
  max-width: 500px;
  padding: 32px;
  gap: 18px;
  background: linear-gradient(155deg, rgba(20,20,23,.96), rgba(7,7,8,.98) 56%);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 34px 110px rgba(0,0,0,.72), 0 10px 34px rgba(105,0,20,.18);
  isolation: isolate;
}
.auth-card::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,23,56,.94) 34%, rgba(255,255,255,.28) 50%, rgba(255,23,56,.5) 68%, transparent);
}

.auth-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(255,255,255,.035), transparent 24% 78%, rgba(255,23,56,.025));
}
.auth-brand { margin-bottom: 2px; }
.auth-brand img { width: 38px; height: 38px; border-radius: 8px; background: #f5f5f3; padding: 3px; }
.auth-brand strong { color: #f7f7f5; font-size: .86rem; font-weight: 780; }
.auth-brand span { color: #707078; font-size: .6rem; }
.auth-heading { gap: 7px; text-align: left; }
#authEyebrow { display: none; }
#authTitle { color: #fff; font-size: 1.62rem; font-weight: 760; letter-spacing: -.028em; }
#authSubtitle { max-width: 44ch; margin: 0; color: #92929a; font-size: .72rem; line-height: 1.5; }
.auth-tabs { padding: 3px; background: #09090a; border: 1px solid var(--line); border-radius: 9px; }
.auth-tabs button { color: #85858e; background: transparent; border-radius: 6px; }
.auth-tabs button.active { color: #fff; background: #1b1b1e; box-shadow: inset 0 -1px 0 var(--accent); }
.auth-form label > span { color: #97979f; font-size: .69rem; }
.auth-form input { color: #f4f4f2; background: #080809; border: 1px solid #2b2b30; }
.auth-form input:hover { border-color: #3a3a40; }
.auth-form input:focus { border-color: rgba(255,23,56,.72); background: #0c0c0e; }

.auth-password-toggle { color: #777780; }
.auth-password-toggle:hover { color: #fff; background: rgba(255,255,255,.05); }
.auth-field-hint { color: #66666e !important; }
.auth-message { color: #f4f4f2; background: #101012; border: 1px solid var(--line); }
.auth-card footer { color: #6e6e76; border-top-color: var(--line); }
.auth-card footer svg { color: #808088; }

dialog,
.dominium-dialog,
dialog.account-dialog {
  color: #f3f3f1;
  background: linear-gradient(155deg, rgba(20,20,23,.98), rgba(8,8,9,.99));
  border: 0;
  border-radius: 16px;
  box-shadow: 0 34px 100px rgba(0,0,0,.72);
}
dialog::backdrop,
.dominium-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.dialog-content, .account-shell { color: #f3f3f1; }
.dominium-dialog h2, dialog h2 { color: #fff; font-weight: 720; letter-spacing: -.015em; }
.dominium-dialog p, dialog p { color: #96969e; }
.account-current, .account-attribution > div, .account-user {
  color: #dedee1;
  background: #0d0d0f;
  border: 1px solid var(--line);
  box-shadow: none;
}

.toast {
  color: #f4f4f2;
  background: rgba(15,15,17,.94);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 11px;
  box-shadow: 0 18px 50px rgba(0,0,0,.48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.notification-bell { width: 34px; height: 34px; }
.notification-badge { background: var(--accent); box-shadow: 0 5px 12px rgba(110,0,20,.32); }

.import-dropzone,
.toa-live-session,
.monitor-csv-source,
.monitor-attention-stage,
.monitor-route-console,
.installer-move-summary,
.installer-move-orders,
.serial-owner-serial,
.serial-owner-loading,
.serial-owner-route,
.serial-owner-details,
.serialized-transfer-equipment {
  color: #d7d7da;
  background: #0a0a0b;
  border-color: var(--line);
  box-shadow: none;
}
.import-dropzone:hover { border-color: rgba(255,23,56,.34); background: rgba(255,23,56,.025); }
.automation-test-banner { background: #0b0d0f; border: 1px solid var(--line); border-left-width: 1px; }
.automation-readonly-badge { background: rgba(64,217,155,.08); border-color: rgba(64,217,155,.22); color: #7ff0bd; }
.automation-result-card { border-left-width: 1px !important; }
.history-audit-row { background: #0d0d0f; border: 1px solid var(--line); border-left-width: 1px; }

.history-audit-row.success { box-shadow: inset 2px 0 0 rgba(64,217,155,.55); }
.history-audit-row.warning { box-shadow: inset 2px 0 0 rgba(255,200,87,.55); }
.history-audit-row.error { box-shadow: inset 2px 0 0 rgba(255,56,84,.55); }
.history-audit-row-stats span { color: #8d8d96; background: #080809; border-color: var(--line); }
.history-audit-row-stats b { color: #f0f0ee; }

.dominium-transitioning { position: relative; overflow: clip; }
.dominium-transitioning::after {
  content: "";
  position: absolute;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(102deg, transparent 28%, rgba(255,23,56,.045) 44%, rgba(255,255,255,.035) 50%, rgba(255,23,56,.025) 57%, transparent 72%);
  transform: translateX(-72%);
  animation: dominium-scan .58s cubic-bezier(.16,1,.3,1) both;
}

@keyframes dominium-scan {
  from { transform: translateX(-72%); opacity: .7; }
  to { transform: translateX(72%); opacity: 0; }
}
@keyframes dominium-ambient {
  from { transform: translate3d(0,0,0) scale(.96); opacity: .34; }
  to { transform: translate3d(-42px,36px,0) scale(1.08); opacity: .62; }
}

:root[data-theme="light"] body { color: var(--ink); background: #030304; }
:root[data-theme="light"] .app-header {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(19,19,22,.96), rgba(5,5,6,.92));
  border-bottom-color: rgba(255,23,56,.24);
  box-shadow: 0 16px 38px rgba(0,0,0,.36);
}
:root[data-theme="light"] .side-nav,
:root[data-theme="light"] .side-nav-footer { background: #050506; border-color: var(--line); }
:root[data-theme="light"] th { color: #85858e; background: rgba(16,16,18,.96); }
:root[data-theme="light"] td { color: #d7d7da; border-color: rgba(255,255,255,.055); }
:root[data-theme="light"] tbody tr:hover { background: rgba(255,255,255,.025); }
:root[data-theme="light"] .auth-gate { background: rgba(2,2,3,.91); }
:root[data-theme="light"] .account-role-select { background: #0b0b0d; }
:root[data-theme="light"] .field input,
:root[data-theme="light"] .field select,
:root[data-theme="light"] .field textarea,
:root[data-theme="light"] .bulk-contracts-field textarea,
:root[data-theme="light"] .equipment-row input,
:root[data-theme="light"] .equipment-row select,
:root[data-theme="light"] .material-row input,
:root[data-theme="light"] .material-row select { color: #f2f2f0; background: #0b0b0d; border-color: #29292e; }

@media (max-width: 900px) {
  body::after { width: 420px; height: 420px; top: -180px; right: -180px; opacity: .38; }
  .workspace-heading { align-items: flex-start; }
  .dashboard-metrics, .summary, .stock-summary, .import-summary { border-radius: 12px; }
  .dashboard-metric, .metric, .fixed-code, .stock-summary .metric, .import-summary > div { border-radius: 0; }
  .dashboard-metric:nth-child(2n), .metric:nth-child(2n) { border-right: 0; }
  .dashboard-metric, .metric { border-bottom: 1px solid var(--line); }
  .dashboard-metric:nth-last-child(-n+2), .metric:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 560px) {
  .auth-card { padding: 26px 20px 22px; border-radius: 14px; }
  #authTitle { font-size: 1.42rem; }
  .dashboard-metric, .metric, .fixed-code, .stock-summary .metric, .import-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .dashboard-metric:last-child, .metric:last-child, .fixed-code:last-child,
  .stock-summary .metric:last-child, .import-summary > div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none !important; }
  .dominium-transitioning::after { display: none !important; }
}

.profile-tabs:empty { display: none; }

@media (max-width: 900px) {
  .app-header:has(.profile-tabs:empty) { min-height: 56px; height: 56px; }
  .app-header:has(.profile-tabs:empty) + .app-shell {
    min-height: calc(100vh - 56px);
    height: calc(100vh - 56px);
  }
}

/* Detector-driven legibility and finish pass */
:root,
:root[data-theme="dark"],
:root[data-theme="light"] {
  --info: #98aeb9;
  --dim: #85858d;
}

body::after {
  top: -18vh;
  right: -24vw;
  width: 72vw;
  height: 150vh;
  border-radius: 0;
  background: linear-gradient(126deg, transparent 34%, rgba(255,23,56,.018) 44%, rgba(255,255,255,.024) 50%, rgba(255,23,56,.032) 56%, transparent 66%);
  filter: blur(18px);
  opacity: .72;
  animation: dominium-ambient 14s cubic-bezier(.4,0,.2,1) infinite alternate;
}

.auth-ambient {
  background:
    linear-gradient(122deg, transparent 22%, rgba(255,23,56,.035) 43%, rgba(255,255,255,.022) 50%, rgba(255,23,56,.024) 58%, transparent 78%),
    #020203;
}

.profile-tab.active,
.button.primary,
.auth-register-submit,
.auth-submit-track button,
.notification-badge {
  box-shadow: 0 10px 24px rgba(0,0,0,.34);
}

.button.primary:hover:not(:disabled),
.auth-register-submit:hover:not(:disabled),
.auth-submit-track button:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgba(0,0,0,.38);
}

.button.primary:active:not(:disabled),
.auth-register-submit:active:not(:disabled),
.auth-submit-track button:active:not(:disabled) {
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
}

.auth-card {
  box-shadow: 0 34px 110px rgba(0,0,0,.72);
}

.connection.online .status-dot,
.status-dot,
.side-nav-item.active::before {
  box-shadow: none !important;
}

/* Functional text floor: dense, but never microscopic. */
small,
.auth-brand span,
.product-tagline,
.operator small,
.side-nav-label,
.side-nav-item small,
.side-nav-assurance,
.side-nav-legal,
.dashboard-metric small,
.dashboard-panel header span,
.intelligence-panel header span,
.field span,
.search-field span,
.compact-field span,
.auth-form label > span,
.auth-field-hint,
.history-import-audit > header span,
.history-audit-row > small,
.history-audit-row-top span,
.history-audit-row-stats span {
  font-size: 11px !important;
  line-height: 1.35;
}

.workspace-description,
.auth-form,
.dominium-dialog p,
.account-shell,
.empty-state,
.loading-state,
.intelligence-empty {
  font-size: 12px;
}

.profile-tab,
.side-nav-item strong,
.button,
.view-tab,
.code-option,
th,
td,
input,
select,
textarea {
  font-size: max(11px, .72rem);
}

.product-tagline,
.operator small,
.auth-brand span,
.auth-field-hint,
.side-nav-item small,
.side-nav-label,
.side-nav-assurance,
.side-nav-legal {
  color: #8b8b94 !important;
}

.dashboard-updated,
.technician-source,
#technicianSource,
#dashboardUpdated,
.dashboard-panel header span,
.intelligence-panel header span {
  color: #888891;
}

input::placeholder,
textarea::placeholder { color: #85858e; }

.progress-track span,
.city-track i,
.base-performance-track i {
  transition: none !important;
}

@keyframes dominium-ambient {
  from { transform: translate3d(5vw,-2vh,0); opacity: .46; }
  to { transform: translate3d(-7vw,4vh,0); opacity: .78; }
}

.health-base.online .health-pulse,
.health-base.offline .health-pulse { box-shadow: none !important; }

@media (max-width: 900px) {
  .monitor-workspace,
  .automation-test-workspace,
  .close-workspace,
  .intelligence-workspace,
  .database-workspace { min-width: 0; max-width: 100%; }

  .monitor-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; }
  .monitor-table { min-width: 720px; }

  .automation-test-layout { grid-template-columns: minmax(0, 1fr); }
  .automation-test-controls,
  .automation-test-review { width: 100%; min-width: 0; }
  .automation-test-results { min-height: 340px; max-height: 62vh; }

  .semi-auto-agenda { min-width: 0; padding: 16px; }
  .semi-auto-agenda-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intelligence-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intelligence-grid { grid-template-columns: minmax(0, 1fr); }
  .intelligence-panel,
  .health-panel,
  .base-performance-panel,
  .productivity-panel,
  .serial-audit-panel { min-width: 0; }
  .intelligence-panel .table-scroll,
  .serial-audit-panel .table-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
  }
  .intelligence-table,
  .serial-audit-table { min-width: 720px; }

  .database-panel { min-width: 0; }
  .database-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .database-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .database-toolbar > .button { width: 100%; }
  .database-layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .database-list {
    max-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .monitor-kpis { grid-template-columns: minmax(0, 1fr); }
  .monitor-toolbar { flex-wrap: wrap; }
  .monitor-search { flex: 1 1 100%; max-width: none; }
  .monitor-bucket-filter { flex: 1 1 150px; min-width: 0; }

  .automation-test-layout { gap: 10px; }
  .automation-test-controls,
  .automation-test-review { border-radius: 12px; }

  .close-workspace { padding-inline: 0; }
  .semi-auto-agenda { padding: 14px 12px; }
  .semi-auto-agenda-stats { grid-template-columns: minmax(0, 1fr); }
  .semi-auto-agenda-actions > * { max-width: 100%; }

  .intelligence-hero { grid-template-columns: minmax(0, 1fr); }
  .health-base-grid { grid-template-columns: minmax(0, 1fr); }
  .base-performance-row { grid-template-columns: minmax(0, 1fr) 48px; }
  .base-performance-track { grid-column: 1 / -1; grid-row: 2; }
  .database-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .database-toolbar { grid-template-columns: minmax(0, 1fr); }
  .database-layout { grid-template-columns: minmax(0, 1fr); }
  .database-contract-row { grid-template-columns: minmax(0, 1fr) auto; }
  .database-contract-row > :nth-child(2) { grid-column: 1; }
}


/* Auth hotfix: compact card + animated Technet identity background. */
.auth-gate {
  overflow: hidden;
  background: #020203;
}

.auth-ambient {
  overflow: hidden;
  background:
    linear-gradient(122deg, transparent 18%, rgba(255,23,56,.035) 42%, rgba(255,255,255,.018) 50%, rgba(255,23,56,.025) 59%, transparent 82%),
    #020203;
}

.auth-ambient::before,
.auth-ambient::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  background: url("/assets/brands/technet-rings.svg") center / contain no-repeat;
  transform-origin: 50% 50%;
  will-change: transform;
}

.auth-ambient::before {
  width: min(78vw, 860px);
  aspect-ratio: 1;
  opacity: .07;
  filter: grayscale(1) contrast(1.18);
  animation: dominium-technet-spin 34s linear infinite;
}

.auth-ambient::after {
  width: min(52vw, 560px);
  aspect-ratio: 1;
  opacity: .035;
  filter: grayscale(1) contrast(1.1);
  animation: dominium-technet-spin-reverse 52s linear infinite;
}

.auth-card {
  width: min(460px, calc(100vw - 28px));
  max-width: 460px;
  min-height: 0;
  padding: 28px;
  gap: 14px;
  z-index: 2;
}

.auth-card > .auth-mascots,
.auth-form.hidden,
.auth-message.hidden {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.auth-submit-track {
  min-height: 42px;
  max-height: 42px;
  align-items: center;
  background: transparent;
  border: 0;
  overflow: visible;
}

.auth-submit-lock {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  flex: 0 0 42px !important;
  border-radius: 8px;
  overflow: hidden;
}

.auth-submit-track button,
.auth-register-submit {
  min-height: 42px;
  max-height: 42px;
}

.auth-card footer {
  min-height: 0;
  margin-top: 2px;
  padding-top: 12px;
}

@keyframes dominium-technet-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes dominium-technet-spin-reverse {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

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

@media (max-width: 560px) {
  .auth-card {
    width: min(100%, calc(100vw - 20px));
    padding: 22px 18px 20px;
    gap: 12px;
  }

  .auth-ambient::before {
    width: 115vw;
  }

  .auth-ambient::after {
    width: 82vw;
  }
}


/* Production hotfix: header/sidebar brand geometry and compact order tabs. */
.brand-block {
  gap: 10px;
}

.header-partner-logo {
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px !important;
  padding: 2px;
  object-fit: contain;
  background: #f6f6f4;
  border-radius: 7px;
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}

.side-nav-footer {
  gap: 10px;
}

.side-brand-lockup {
  display: grid;
  grid-template-columns: 26px 1px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.side-brand-technet {
  width: 26px !important;
  height: 26px !important;
  padding: 2px;
  object-fit: contain;
  background: #f6f6f4;
  border-radius: 7px;
}

.side-brand-lockup > span[aria-hidden="true"] {
  width: 1px;
  height: 22px;
  background: rgba(255,255,255,.12);
}

.side-brand-claro {
  width: auto !important;
  height: 18px !important;
  max-width: 76px;
  object-fit: contain;
  object-position: left center;
}

.view-tabs {
  width: max-content;
  max-width: 100%;
  min-height: 42px;
  padding: 4px;
  gap: 4px;
  align-items: center;
  background: #09090a;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.view-tab {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.view-tab:hover {
  background: #111113;
  border-color: #242428;
}

.view-tab.active {
  color: #fff;
  background: #121214;
  border-color: #2d2d32;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.view-tab span {
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #1a1a1d;
  color: #d7d7dc;
}

@media (max-width: 560px) {
  .header-partner-logo {
    width: 26px !important;
    height: 26px !important;
    flex-basis: 26px !important;
  }

  .view-tabs {
    width: 100%;
  }

  .view-tab {
    flex: 1 1 auto;
  }
}
