:root {
  color-scheme: dark;
  --bg: #060708;
  --bg-deep: #0a0b0d;
  --bg-panel: rgba(17, 18, 21, 0.94);
  --bg-panel-strong: rgba(11, 12, 14, 0.98);
  --bg-panel-soft: rgba(24, 26, 30, 0.86);
  --panel-edge: rgba(148, 98, 74, 0.3);
  --panel-edge-strong: rgba(235, 118, 66, 0.44);
  --panel-divider: rgba(255, 255, 255, 0.07);
  --text: #f4efe7;
  --text-soft: #b9aea1;
  --text-muted: #9a9590;
  --steel: #b0a89e;
  --shadow: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-soft: 0 4px 16px rgba(0,0,0,0.2);
  --ember: #f06a3f;
  --ember-strong: #ff8953;
  --ember-soft: rgba(240, 106, 63, 0.18);
  --ember-glow: rgba(240, 106, 63, 0.28);
  --rust: #8a3d2b;
  --gold: #f0b063;
  --success: #5dbf8d;
  --warn: #e89154;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.28);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --heading: "Bebas Neue", sans-serif;
  --mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  font-family: var(--body);
  color: var(--text);
  line-height: 1.5;
  background: #0f1115;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[data-ui-theme="modern"] {
  --bg: #0a0d11;
  --bg-deep: #0f1419;
  --bg-panel: rgba(22, 25, 31, 0.95);
  --bg-panel-strong: rgba(14, 17, 21, 0.98);
  --bg-panel-soft: rgba(34, 38, 45, 0.88);
  --panel-edge: rgba(116, 127, 142, 0.24);
  --panel-edge-strong: rgba(255, 143, 58, 0.5);
  --panel-divider: rgba(255, 255, 255, 0.08);
  --text: #f3f5f8;
  --text-soft: #c0c7d0;
  --text-muted: #89939d;
  --steel: #c7cfd7;
  --ember: #ff8f3a;
  --ember-strong: #ffab5c;
  --ember-soft: rgba(255, 143, 58, 0.18);
  --ember-glow: rgba(255, 143, 58, 0.3);
  --rust: #9a4d2d;
  --gold: #ffb85c;
  --success: #65c39b;
  --warn: #f0a25c;
  background:
    radial-gradient(circle at top center, rgba(255, 143, 58, 0.08), transparent 26%),
    linear-gradient(180deg, #0d1014 0%, #090b0f 100%);
}

body[data-ui-theme="classic"] {
  --bg: #07090c;
  --bg-deep: #0b1117;
  --bg-panel: rgba(13, 17, 22, 0.97);
  --bg-panel-strong: rgba(9, 12, 16, 0.985);
  --bg-panel-soft: rgba(22, 28, 35, 0.9);
  --panel-edge: rgba(102, 123, 145, 0.34);
  --panel-edge-strong: rgba(132, 168, 214, 0.45);
  --panel-divider: rgba(168, 189, 214, 0.11);
  --text: #dde6ef;
  --text-soft: #aeb9c7;
  --text-muted: #7e8d9f;
  --steel: #b6c3d1;
  --ember: #7ca5d5;
  --ember-strong: #96bde6;
  --ember-soft: rgba(124, 165, 213, 0.15);
  --ember-glow: rgba(124, 165, 213, 0.22);
  --rust: #577698;
  --gold: #9fb8d6;
  --success: #72c7ab;
  --warn: #d1a36f;
  background:
    radial-gradient(circle at top center, rgba(124, 165, 213, 0.06), transparent 28%),
    linear-gradient(180deg, #0b1015 0%, #06080b 100%);
}

body[data-ui-theme="classic"] .shell-sparks {
  opacity: 0.16;
  filter: hue-rotate(180deg) saturate(0.55);
}

body[data-ui-theme="classic"] .shell-noise {
  opacity: 0.34;
}

body[data-ui-theme="classic"] .dashboard-hero-media,
body[data-ui-theme="classic"] .launch-splash-media {
  filter: saturate(0.66) brightness(0.82);
}

.topbar-theme-select {
  min-width: 168px;
}

.compact-field {
  min-height: 40px;
}



button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

input::placeholder {
  color: rgba(185, 174, 161, 0.75);
}

.mono,
.mono-line {
  font-family: var(--mono);
}

.eyebrow,
.label {
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.muted {
  color: var(--text-soft);
  font-size: 1rem;
}

.stack {
  display: grid;
  gap: 14px;
}

.tight {
  gap: 6px;
}

.section-gap {
  height: 8px;
}

.login-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

.login-screen {
  background: linear-gradient(160deg, #0f1115 0%, #0c0d10 50%, #0a0b0e 100%);
}

.login-screen.hidden {
  display: none;
}

.login-card,
.panel,
.stat,
.topbar {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(32, 34, 38, 0.95), rgba(10, 11, 13, 0.98));
  box-shadow: var(--shadow);
}



.login-card {
  width: min(1120px, 100%);
  padding: 16px;
  z-index: 1;
  display: grid;
  gap: 14px;
  border-radius: var(--radius-lg);
  border-color: rgba(164, 102, 73, 0.38);
  background:
    radial-gradient(circle at top right, rgba(240, 106, 63, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(31, 33, 37, 0.96), rgba(11, 12, 14, 0.98));
}

.login-card-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.brand-lockup {
  display: grid;
  gap: 8px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 132, 77, 0.36);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 162, 111, 0.2), transparent 58%),
    linear-gradient(180deg, rgba(50, 21, 15, 0.94), rgba(14, 11, 11, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 28px rgba(240, 106, 63, 0.18);
}

.brand-mark span {
  display: block;
  margin-top: 2px;
  font-family: var(--heading);
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: #fff4ea;
}

.brand-mark-image {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 0 12px rgba(240, 106, 63, 0.2));
}

.login-card h1,
.sidebar-title,
.topbar h1,
.panel h2,
.brief-card h2 {
  font-family: var(--heading);
  letter-spacing: 0.05em;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  line-height: 0.95;
}

.subtitle {
  max-width: 62ch;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.3;
}

.operations-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 136, 78, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 120, 61, 0.08), transparent 30%, transparent 70%, rgba(255, 120, 61, 0.08)),
    rgba(12, 12, 14, 0.88);
}

.operations-strip span {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: #f4e8dc;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 14px;
}

.mission-brief,
.access-stack {
  align-content: start;
}

.brief-card,
.brief-stat,
.demo-access,
.credential-item,
.tree-group,
.readiness-item,
.next-step,
.summary-item,
.summary-card,
.inspector-card,
.table-shell,
.user-pill {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(37, 38, 42, 0.72), rgba(18, 19, 22, 0.92));
  box-shadow: var(--shadow-soft);
}

.brief-card,
.brief-stat {
  padding: 12px;
}

.brief-card h2 {
  margin: 6px 0 4px;
  font-size: 1.3rem;
  line-height: 1.1;
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.brief-stat span,
.credential-item span {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.brief-stat strong {
  display: block;
  margin-top: 4px;
  font-family: var(--heading);
  font-size: 1.1rem;
  line-height: 1;
  color: #fff5e9;
}

.demo-access {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-color: rgba(255, 127, 72, 0.24);
  background:
    radial-gradient(circle at top right, rgba(255, 127, 72, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(47, 31, 24, 0.74), rgba(13, 13, 16, 0.96));
}

.demo-access-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.credential-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(5, 6, 7, 0.55);
}

.credential-item strong {
  font-size: 1rem;
  color: var(--text);
}

.field {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(31, 33, 37, 0.98), rgba(13, 14, 17, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.field:focus {
  outline: none;
  border-color: rgba(255, 136, 78, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 0 0 4px rgba(255, 126, 69, 0.12);
}

.btn {
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.btn:hover,
.nav-item:hover,
.tree-map:hover,
.data-cell:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff7ef;
  border-color: rgba(255, 147, 95, 0.28);
  background: linear-gradient(135deg, #8d3324, #f06a3f 62%, #ff9361);
  box-shadow: 0 14px 30px rgba(240, 106, 63, 0.22);
}

.btn-ghost {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.03);
}

.app-shell {
  display: none;
  height: 100vh;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 1fr;
  overflow: hidden;
}

.app-shell.active {
  display: grid;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(21, 22, 24, 0.98), rgba(9, 10, 12, 0.98));
  overflow-y: auto;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 143, 87, 0.32);
  background: linear-gradient(180deg, rgba(61, 26, 17, 0.96), rgba(13, 11, 12, 0.98));
}

.sidebar-brand-image {
  width: 28px;
  height: 28px;
  display: block;
}

.sidebar-brand-copy {
  display: grid;
  gap: 6px;
}

.sidebar-title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1;
}

.sidebar-seal {
  color: var(--text-soft);
  font-size: 0.7rem;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  text-align: left;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--text-soft);
  background: transparent;
  font-size: 0.85rem;
}

.nav-item.active {
  color: #fff4ea;
  border-color: rgba(255, 137, 82, 0.26);
  background:
    linear-gradient(90deg, rgba(240, 106, 63, 0.18), transparent 54%),
    rgba(255, 255, 255, 0.03);
}

.nav-icon {
  display: grid;
  place-items: center;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--steel);
}

.nav-item.active .nav-icon {
  border-color: rgba(255, 148, 95, 0.3);
  background: rgba(255, 129, 72, 0.12);
  color: #fff0e5;
}

.nav-copy {
  display: block;
}

.compact {
  padding: 10px;
}

.metric-line,
.status-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.metric-line span {
  color: var(--text-soft);
}

.status-line {
  margin-top: auto;
  justify-content: flex-start;
  align-items: center;
  color: var(--text-soft);
  padding: 8px 0 2px;
  font-size: 0.75rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 18px rgba(93, 191, 141, 0.4);
}

.main {
  padding: 14px;
  overflow-y: auto;
  height: 100vh;
}

.topbar,
.section-head,
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.topbar {
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-color: rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(28, 30, 33, 0.95), rgba(13, 14, 17, 0.98));
}

.topbar-lockup {
  display: flex;
  gap: 16px;
  align-items: center;
}

.topbar-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 147, 95, 0.34);
  background: linear-gradient(180deg, rgba(63, 25, 16, 0.96), rgba(13, 11, 12, 0.98));
}

.topbar-brand-image {
  width: 26px;
  height: 26px;
  display: block;
}

.topbar-subline {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.topbar h1,
.panel h2 {
  margin: 6px 0 0;
}

.topbar h1 {
  font-size: 1.6rem;
  line-height: 1.1;
  margin: 0;
}

.panel h2,
.brief-card h2 {
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.topbar-actions,
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.search {
  min-width: 270px;
}

.user-pill {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}

.badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff6ef;
  background: linear-gradient(180deg, #a43d2a, #f06a3f);
  font-family: var(--heading);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.stats-grid,
.dashboard-grid,
.editor-grid,
.work-grid,
.summary-grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

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

.editor-grid {
  grid-template-columns: 340px 1fr;
}

.work-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.92fr);
}

.panel {
  padding: 14px;
}

.dashboard-hero {
  margin-bottom: 12px;
  min-height: auto;
  border-color: rgba(255, 145, 91, 0.24);
  background: linear-gradient(180deg, rgba(26, 27, 30, 0.82), rgba(10, 11, 13, 0.98));
}

.dashboard-hero-media {
  display: none;
}

.dashboard-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.85fr);
  gap: 14px;
  align-items: stretch;
}

.dashboard-hero-copy,
.dashboard-hero-side {
  display: grid;
  gap: 10px;
}

.hero-brandline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hero-crest {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 149, 97, 0.36);
  background: linear-gradient(180deg, rgba(67, 23, 13, 0.94), rgba(14, 11, 11, 0.98));
}

.hero-crest-mark {
  position: relative;
  width: 32px;
  height: 38px;
  display: block;
  border-radius: 44% 44% 36% 36%;
  background: linear-gradient(180deg, #fff5eb, #dbc7b9);
}

.hero-crest-mark::before,
.hero-crest-mark::after {
  content: "";
  position: absolute;
  top: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #141516;
}

.hero-crest-mark::before {
  left: 5px;
}

.hero-crest-mark::after {
  right: 5px;
}

.hero-crest-image {
  width: 54px;
  height: 54px;
  display: block;
  filter: drop-shadow(0 0 12px rgba(240, 106, 63, 0.2));
}

.hero-title {
  margin: 0;
  font-family: var(--heading);
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.hero-lead {
  max-width: 58ch;
  margin: 0;
  font-size: 0.9rem;
  color: #dfd5ca;
  line-height: 1.5;
}

.hero-strip {
  justify-content: flex-start;
}

.hero-intel-card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at top right, rgba(240, 106, 63, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(29, 30, 34, 0.88), rgba(12, 13, 15, 0.96));
}

.hero-intel-card strong {
  display: block;
  margin: 10px 0 8px;
  font-family: var(--heading);
  font-size: 2rem;
  line-height: 0.92;
  letter-spacing: 0.05em;
}

.hero-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-signal {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 11, 12, 0.7);
}

.hero-signal strong {
  display: block;
  margin-top: 8px;
  font-family: var(--heading);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
}

.stat strong,
.summary-card strong {
  display: block;
  margin-top: 6px;
  font-family: var(--heading);
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0.05em;
}

.upload-zone,
.empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 120px;
  padding: 24px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px dashed rgba(255, 142, 84, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 127, 72, 0.08), transparent 48%),
    rgba(12, 13, 15, 0.92);
}

.upload-zone {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-style: solid;
  background:
    linear-gradient(180deg, rgba(255, 127, 72, 0.1), transparent 32%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.028) 0,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px,
      transparent 32px
    ),
    rgba(10, 11, 13, 0.94);
}

.upload-zone::before,
.upload-zone::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(255, 146, 92, 0.68);
  pointer-events: none;
}

.upload-zone::before {
  inset: 10px auto auto 10px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.upload-zone::after {
  inset: auto 10px 10px auto;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.table-shell .empty {
  min-height: 120px;
}

.upload-zone.dragover {
  border-color: rgba(255, 151, 103, 0.54);
  box-shadow: 0 0 0 4px rgba(240, 106, 63, 0.12);
}

.upload-zone.busy {
  opacity: 0.72;
  pointer-events: none;
}

.tree {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.tree-group,
.readiness-item,
.next-step,
.summary-item,
.summary-card,
.inspector-card {
  padding: 14px;
}

.terminal-card {
  position: relative;
  overflow: hidden;
  padding: 15px 16px 15px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid rgba(255, 133, 76, 0.54);
  background:
    linear-gradient(180deg, rgba(34, 35, 39, 0.9), rgba(10, 11, 13, 0.96));
}

.terminal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 133, 76, 0.08), transparent 18%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 10px
    );
  opacity: 0.34;
  pointer-events: none;
}

.terminal-card .label {
  position: relative;
  z-index: 1;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.terminal-card strong,
.terminal-card .muted {
  position: relative;
  z-index: 1;
}

.terminal-card strong {
  font-family: var(--mono);
  font-size: 0.94rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.tree-group {
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(30, 31, 34, 0.88), rgba(13, 14, 17, 0.98));
}

.tree-group h3 {
  margin: 0 0 8px;
  font-family: var(--heading);
  font-size: 1.22rem;
  line-height: 1;
  letter-spacing: 0.05em;
}

.summary-item strong,
.readiness-item strong,
.next-step strong,
.inspector-card strong {
  display: block;
  margin-top: 8px;
}

.tree-group-list {
  display: grid;
  gap: 8px;
}

.tree-map {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  text-align: left;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(42, 43, 47, 0.62), rgba(14, 15, 18, 0.96));
}

.tree-map small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.tree-map.unavailable {
  border-color: rgba(240, 176, 99, 0.25);
}

.tree-map.active {
  border-color: rgba(255, 142, 84, 0.38);
  background:
    linear-gradient(90deg, rgba(240, 106, 63, 0.16), transparent 56%),
    linear-gradient(180deg, rgba(43, 30, 25, 0.86), rgba(16, 17, 20, 0.98));
}

.tree-map.modified {
  box-shadow: inset 0 0 0 1px rgba(255, 161, 115, 0.25);
}

.data-grid {
  display: block;
  max-height: 680px;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 123, 67, 0.06), transparent 18%),
    rgba(8, 9, 11, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.editor-viewport {
  display: grid;
  gap: 12px;
}

.editor-mode-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-mode-tab {
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.editor-mode-tab.active {
  border-color: rgba(255, 145, 91, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 133, 76, 0.16), transparent 68%),
    rgba(22, 18, 16, 0.98);
  color: #fff0e3;
}

.editor-mode-stage {
  display: block;
}

.matrix-shell {
  display: grid;
  min-width: 0;
}

.matrix-scroll {
  overflow: auto;
  max-height: 400px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 126, 69, 0.08), transparent 12%),
    rgba(9, 10, 12, 0.96);
}

.matrix-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.matrix-table th,
.matrix-table td {
  padding: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.matrix-corner-cell {
  position: sticky;
  left: 0;
  z-index: 6;
  min-width: 122px;
  padding: 10px 12px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 138, 82, 0.18), transparent 55%),
    linear-gradient(90deg, rgba(255, 126, 69, 0.12), transparent 70%),
    rgba(18, 19, 22, 0.98);
}

.matrix-x-header,
.matrix-y-header {
  min-width: 68px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 48%),
    rgba(15, 16, 19, 0.98);
}

.matrix-x-header span,
.matrix-y-header span {
  display: block;
  padding: 10px 8px;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--steel);
  text-align: center;
}

.matrix-y-header {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 122px;
}

.matrix-y-header span {
  padding: 14px 12px;
  text-align: right;
}

.matrix-x-header.active,
.matrix-y-header.active {
  background:
    linear-gradient(180deg, rgba(255, 133, 76, 0.16), transparent 58%),
    rgba(20, 16, 14, 0.98);
}

.matrix-x-header.active span,
.matrix-y-header.active span {
  color: #fff2e4;
}

.matrix-value {
  min-width: 72px;
  background: rgba(12, 13, 15, 0.82);
}

.matrix-value.row-active {
  background: rgba(22, 18, 16, 0.92);
}

.matrix-value.col-active {
  box-shadow: inset 0 0 0 1px rgba(255, 154, 107, 0.08);
}

.matrix-cell-button {
  width: 100%;
  min-height: 54px;
  padding: 7px 8px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--cell-color, rgba(255, 255, 255, 0.04));
  color: var(--cell-text, #fff2e5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.matrix-corner-cell strong {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: #fff2e6;
  line-height: 1.2;
}

.matrix-corner-tag {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.matrix-cell-button span,
.matrix-cell-button strong {
  font-family: var(--mono);
}

.matrix-cell-button span {
  font-size: 0.66rem;
  opacity: 0.82;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
}

.matrix-cell-button strong,
.diff-table,
.mono-line {
  font-family: var(--mono);
}

.matrix-cell-button strong {
  font-size: 0.79rem;
}

.matrix-cell-button.row-active,
.matrix-cell-button.col-active {
  box-shadow: inset 0 0 0 1px rgba(255, 151, 102, 0.12);
}

.matrix-cell-button.row-active {
  background:
    linear-gradient(180deg, rgba(255, 168, 117, 0.06), transparent 42%),
    var(--cell-color, rgba(255, 255, 255, 0.04));
}

.matrix-cell-button.col-active {
  filter: saturate(1.08);
}

.matrix-cell-button.selected {
  border-color: rgba(255, 154, 107, 0.44);
  box-shadow: 0 0 0 2px rgba(255, 135, 77, 0.18);
}

.matrix-cell-button.changed {
  border-color: rgba(255, 178, 120, 0.38);
}

.hex-shell,
.chart-shell,
.surface-shell {
  display: grid;
  gap: 12px;
}

.hex-meta,
.chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.hex-grid {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 126, 69, 0.08), transparent 12%),
    rgba(9, 10, 12, 0.96);
}

.hex-line {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 180px;
  gap: 14px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.hex-address {
  color: var(--gold);
}

.hex-bytes,
.hex-ascii {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hex-byte,
.hex-char {
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
}

.hex-byte.active,
.hex-char.active {
  background: rgba(255, 121, 62, 0.14);
  color: #fff0e3;
}

.chart2d {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 126, 69, 0.08), transparent 18%),
    rgba(10, 11, 13, 0.96);
}

.chart-gridlines line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.chart-traces .trace {
  fill: none;
  stroke: rgba(205, 189, 175, 0.28);
  stroke-width: 2;
}

.chart-traces .trace.active {
  stroke: rgba(255, 137, 82, 0.92);
  stroke-width: 3;
}

.surface-shell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 16px;
}

.surface-plot {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns, 8), minmax(14px, 1fr));
  gap: 10px 4px;
  align-items: end;
  min-height: 220px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 126, 69, 0.08), transparent 18%),
    rgba(10, 11, 13, 0.96);
}

.surface-column {
  height: var(--surface-height, 48px);
  border-radius: 10px 10px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 223, 190, 0.18), var(--surface-color, rgba(240, 106, 63, 0.7)));
}

.surface-column.active {
  box-shadow: 0 0 0 2px rgba(255, 141, 84, 0.24);
}

.surface-slices {
  display: grid;
  gap: 12px;
}

.inspector-grid,
.meta-grid,
.step-row {
  display: grid;
  gap: 12px;
}

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

.step-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-shell {
  overflow: auto;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 126, 69, 0.07), transparent 18%),
    rgba(10, 11, 13, 0.94);
}

.diff-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.diff-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.diff-table th,
.diff-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--panel-divider);
}

.diff-table th {
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(16, 17, 19, 0.98);
}

.diff-table tbody tr {
  position: relative;
}

.compare-ledger-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 6px 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(90deg, rgba(255, 127, 72, 0.12), transparent 54%),
    rgba(17, 18, 21, 0.9);
}

.compare-ledger-copy strong {
  display: block;
  margin-top: 6px;
  font-size: 1.08rem;
  color: var(--text);
}

.compare-ledger-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-ledger-icons span {
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 0.74rem;
}

.compare-row td {
  position: relative;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--row-accent, rgba(255, 255, 255, 0.05)) 14%, transparent), transparent 52%),
    rgba(12, 13, 15, 0.24);
}

.compare-row td:first-child {
  border-left: 3px solid var(--row-accent, rgba(255, 255, 255, 0.08));
}

.compare-row:hover td {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--row-accent, rgba(255, 255, 255, 0.05)) 22%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.03);
}

.compare-row-map {
  --row-accent: rgba(255, 131, 74, 0.84);
}

.compare-row-range {
  --row-accent: rgba(196, 177, 157, 0.34);
}

.compare-row-trace {
  --row-accent: rgba(214, 189, 166, 0.3);
}

.compare-row-warm {
  --row-accent: rgba(232, 145, 84, 0.56);
}

.compare-row-hot {
  --row-accent: rgba(240, 106, 63, 0.74);
}

.compare-row-critical {
  --row-accent: rgba(255, 126, 69, 0.94);
}

.compare-cell-head {
  display: grid;
  gap: 6px;
}

.compare-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.compare-row-map .compare-chip {
  border-color: rgba(255, 145, 91, 0.28);
  background: rgba(255, 121, 62, 0.12);
  color: #fff0e3;
}

.compare-chip-secondary {
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: var(--steel);
}

.compare-metric,
.compare-delta,
.compare-address {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.86rem;
}

.compare-item-note {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.15;
}

.compare-delta {
  color: #ffd0b5;
}

.compare-address {
  color: var(--gold);
}

.summary-card {
  position: relative;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(34, 35, 39, 0.9), rgba(12, 13, 15, 0.96));
}

.summary-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 133, 76, 0.76), transparent);
}

.summary-card-changed-bytes::after,
.summary-card-changed-ranges::after,
.summary-card-changed-maps::after {
  background: linear-gradient(90deg, rgba(255, 133, 76, 0.2), rgba(255, 133, 76, 0.92), rgba(255, 133, 76, 0.2));
}

.summary-card-unmapped-ranges::after {
  background: linear-gradient(90deg, rgba(240, 176, 99, 0.2), rgba(240, 176, 99, 0.92), rgba(240, 176, 99, 0.2));
}

.surface-chart {
  display: grid;
  grid-template-columns: repeat(var(--surface-columns, 16), minmax(10px, 1fr));
  gap: 10px 4px;
  align-items: end;
  min-height: 200px;
  padding: 12px 8px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(48, 28, 22, 0.44), transparent 34%),
    rgba(12, 13, 15, 0.94);
  transform: perspective(980px) rotateX(48deg) rotateZ(-30deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.surface-bar {
  height: var(--h, 24px);
  border-radius: 10px 10px 2px 2px;
  background: linear-gradient(180deg, rgba(255, 223, 190, 0.2), var(--bar-color, rgba(240, 106, 63, 0.7)));
}

.scope-frame {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(31, 32, 35, 0.94), rgba(10, 11, 13, 0.98));
}

.scope-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.slice-row {
  display: grid;
  grid-template-columns: 56px 1fr 64px;
  gap: 12px;
  align-items: center;
}

.track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.fill {
  width: var(--w, 0%);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a33b29, var(--ember), #ff9a68);
}

.grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.grid-toolbar span {
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 0.72rem;
}

.workbench-grid-panel,
.map-browser-panel,
.editor-command-panel,
.inspector-panel,
.compare-panel,
.visualize-panel,
.slice-panel {
  background:
    linear-gradient(180deg, rgba(35, 36, 40, 0.94), rgba(11, 12, 14, 0.98));
}

.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-row:last-of-type {
  border-bottom: 0;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ember);
}

.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 50;
}

.toast {
  min-width: 280px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(39, 40, 44, 0.96), rgba(12, 13, 15, 0.98));
  box-shadow: var(--shadow);
}

.toast strong {
  display: block;
  margin-bottom: 4px;
}

.toast.success {
  border-color: rgba(93, 191, 141, 0.34);
}

.toast.warn {
  border-color: rgba(255, 145, 87, 0.26);
}

.hidden-file-input {
  display: none;
}

@media (max-width: 1340px) {
  .stats-grid,
  .dashboard-grid,
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .app-shell.active,
  .editor-grid,
  .work-grid,
  .dashboard-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}

@media (max-width: 860px) {
  .login-card {
    padding: 20px;
  }

  .login-card-head,
  .demo-access-head {
    flex-direction: column;
  }

  .brief-grid,
  .credential-grid,
  .hero-signal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .sidebar-brand {
    grid-template-columns: 1fr;
  }

  .topbar-brand-mark,
  .sidebar-brand-mark {
    width: 56px;
    height: 56px;
  }

  .topbar-brand-image,
  .sidebar-brand-image {
    width: 36px;
    height: 36px;
  }

  .topbar,
  .section-head,
  .toolbar {
    flex-direction: column;
  }

  .topbar-actions,
  .toolbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-actions > *,
  .toolbar-actions > * {
    width: 100%;
  }

  .search {
    min-width: 0;
  }

  .surface-shell-grid {
    grid-template-columns: 1fr;
  }

  .hex-line {
    grid-template-columns: 1fr;
  }

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

  .surface-chart {
    transform: none;
  }

  .compare-ledger-head,
  .hero-brandline {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* minimal terminal login */
.login-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255,59,59,0.06), transparent 18%),
    linear-gradient(180deg, rgba(3,4,5,0.98), rgba(3,4,5,1));
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.012) 0, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px),
    radial-gradient(circle at 50% 30%, rgba(255,255,255,0.03), transparent 42%);
  opacity: 0.28;
  pointer-events: none;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0, transparent 58%, rgba(0,0,0,0.48) 100%);
  pointer-events: none;
}

.login-screen.hidden { display: none; }
.hex-canvas { display: none !important; }

.login-terminal-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  min-height: calc(100vh - 90px);
  display: grid;
  align-content: start;
  justify-items: center;
  padding-top: clamp(42px, 8vh, 78px);
}

.login-terminal-head {
  display: none;
}

.login-terminal-prompt,
.login-danger,
.login-danger-inline {
  color: #ff3b3b;
}

.login-ok { color: #76ff8a; }

.login-terminal-card {
  width: min(100%, 360px);
  padding: 0;
  text-align: center;
}

.login-kicker {
  margin: 0 0 10px;
  color: #b96a6a;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
}

.login-terminal-card h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: 0.1em;
  color: #f0f0f1;
  text-transform: uppercase;
}

.login-copy {
  display: grid;
  gap: 3px;
  margin: 18px 0 0;
  color: #d2d4d8;
  font-size: 0.84rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.login-copy p { margin: 0; }
.login-copy-gap { margin-top: 8px !important; }
.login-danger { margin-top: 14px !important; }

.login-stamp {
  margin: 18px 0 0;
  color: #666c73;
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.login-terminal-form {
  margin-top: 22px;
  display: grid;
  gap: 12px;
  text-align: left;
}

.terminal-field {
  min-height: 42px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid #2a2d32;
  background: transparent;
  color: #e8e8ea;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  box-shadow: none;
  padding: 8px 2px;
}

.terminal-field::placeholder { color: #5f6770; }

.terminal-field:focus {
  border-color: rgba(255,59,59,0.72);
  box-shadow: inset 0 -1px 0 rgba(255,59,59,0.25);
}

.terminal-btn {
  min-height: 44px;
  margin-top: 8px;
  border-radius: 0;
  border: 1px solid rgba(255,59,59,0.82);
  background: transparent;
  color: #ff5656;
  box-shadow: none;
  letter-spacing: 0.22em;
  padding: 0.65rem 1rem;
}

.terminal-btn:hover {
  transform: none;
  background: rgba(255,59,59,0.08);
  box-shadow: none;
}

.login-corner {
  position: absolute;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #737980;
  text-transform: uppercase;
}

.login-corner p { margin: 0 0 6px; }
.login-corner-top { display: none; }
.login-corner-bottom { left: 0; bottom: 14px; }
.login-corner-right { right: 0; bottom: 14px; text-align: right; }

@media (max-width: 900px) {
  .login-terminal-shell {
    width: min(100%, 400px);
    min-height: auto;
    padding: 34px 18px 90px;
  }
  .login-terminal-card {
    width: min(100%, 340px);
  }
  .login-corner-bottom,
  .login-corner-right {
    position: static;
    width: 100%;
    text-align: center;
    margin-top: 18px;
  }
}



@media (max-width: 1100px) { .app-shell.active { grid-template-columns: 1fr; } .sidebar{display:none;} .dashboard-hero-grid, .dashboard-grid, .stats-grid, .editor-grid, .work-grid { grid-template-columns: 1fr; } }


.library-shell { min-height: 45vh; }
.library-header-row { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:1rem; }
.library-actions { display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }
.library-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:1rem; margin-bottom:1rem; }
.library-grid-main { grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr); }
.library-list { display:flex; flex-direction:column; gap:.65rem; }
.library-detail-grid { display:flex; flex-direction:column; gap:1rem; }
.library-chip-list { display:flex; flex-wrap:wrap; gap:.5rem; }
.library-definition-sample { display:flex; flex-direction:column; gap:.5rem; max-height:420px; overflow:auto; }
.metric-card { display:flex; flex-direction:column; gap:.2rem; min-width:110px; }
.metric-card strong { font-size:1.2rem; }
.stack-row { display:flex; justify-content:space-between; gap:1rem; align-items:center; margin-bottom:1rem; }
@media (max-width: 1100px) { .library-grid, .library-grid-main, .library-header-row { grid-template-columns: 1fr; display:grid; } .library-actions { justify-content:start; } }


.quick-filter-row { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 12px; align-items:center; }
.quick-filter-chip { border:1px solid #20262c; background:#090b0e; color:var(--text-soft); padding:6px 10px; font:600 .72rem/1 var(--mono); letter-spacing:.08em; text-transform:uppercase; cursor:pointer; }
.quick-filter-chip:hover { border-color:#5a2b2b; color:var(--text-main); }
.quick-filter-chip.active { border-color:#ff3b3b; color:#fff; background:rgba(255,59,59,.08); }
.quick-filter-meta { margin-left:auto; color:var(--text-muted); font-size:.72rem; }
.tree-map { text-align:left; }
.tree-map small { display:flex; justify-content:space-between; gap:8px; }


.core-map-strip{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end;max-width:58%;}
.core-map-chip{border:1px solid #262b31;background:#0b0f13;color:#cfd4da;padding:6px 10px;font:600 11px/1.1 var(--font-mono, monospace);letter-spacing:.08em;text-transform:uppercase;cursor:pointer;}
.core-map-chip.active{border-color:#ff6a3b;color:#fff;box-shadow:0 0 0 1px rgba(255,106,59,.14) inset;}
.workbench-side-stack{display:grid;gap:16px;margin-top:18px;padding-top:16px;border-top:1px solid #1a1f24;}
.related-map-list,.quick-compare-card{display:grid;gap:8px;}
.related-map-item{border:1px solid #1f252b;background:#090c10;padding:8px 10px;text-align:left;color:inherit;cursor:pointer;}
.related-map-item strong{display:block;font-size:12px;}
.related-map-item small{display:block;color:#8d98a3;font-size:11px;margin-top:4px;}
.quick-compare-card .compare-stat-row{display:flex;justify-content:space-between;gap:12px;font-size:12px;border-bottom:1px solid #15191d;padding:6px 0;}
.quick-compare-card .compare-stat-row:last-child{border-bottom:0;}
.quick-filter-row{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 12px;}
.quick-filter-chip{border:1px solid #222930;background:#090c10;color:#98a2ad;padding:5px 8px;font:600 11px/1 var(--font-mono, monospace);text-transform:uppercase;letter-spacing:.08em;cursor:pointer;}
.quick-filter-chip.active{border-color:#ff6a3b;color:#fff;}
@media (max-width: 1200px){.core-map-strip{max-width:none;justify-content:flex-start;width:100%;margin-top:12px;}}


.workbench-command-panel{padding-bottom:10px;}
.toolbar-workbench{align-items:flex-start;gap:12px;}
.workbench-title-block{display:grid;gap:3px;min-width:240px;}
.workbench-terminal-bar{display:flex;flex-wrap:wrap;gap:8px;padding-top:10px;margin-top:10px;border-top:1px solid var(--panel-divider);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--text-muted);}
.workbench-terminal-bar span{padding:4px 8px;border:1px solid #1d2328;background:#06080a;}
.workbench-feed-panel{margin-top:10px;}
.workbench-feed{display:grid;gap:8px;min-height:92px;padding:4px 0;}
.workbench-feed-line{display:flex;gap:10px;align-items:flex-start;padding:6px 0;border-bottom:1px solid #13181d;}
.workbench-feed-line:last-child{border-bottom:0;}
.workbench-feed-tag{color:#ff3b3b;min-width:56px;}
.workbench-feed-copy{display:grid;gap:3px;}
.workbench-feed-copy strong{font-size:12px;color:var(--text-main);letter-spacing:.06em;}
.workbench-feed-copy span{font-size:11px;color:var(--text-muted);}
.workbench-layout-note{display:flex;justify-content:space-between;gap:12px;font-size:11px;padding-top:10px;margin-top:10px;border-top:1px solid var(--panel-divider);color:var(--text-muted);}
.quick-compare-card .compare-stat-row strong,.related-map-item strong,.core-map-chip{font-family:var(--mono);}
.core-map-strip{justify-content:flex-start;max-width:none;}
.editor-mode-bar{border-bottom:1px solid #161b1f;padding-bottom:10px;margin-bottom:10px;}
.editor-mode-tab{font-family:var(--mono);letter-spacing:.12em;text-transform:uppercase;}
.compare-stat-row{align-items:center;}
.matrix-cell-button span{opacity:.72;}
.matrix-cell-button strong{font-family:var(--mono);letter-spacing:.03em;}
@media (max-width: 1200px){
  .toolbar-workbench{flex-direction:column;}
  .workbench-terminal-bar{width:100%;}
}


.inspector-section {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
}

/* 2026 tuner workflow pass */
.launch-splash {
  background:
    radial-gradient(circle at top center, rgba(255, 72, 0, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(3, 4, 5, 0.92), rgba(3, 4, 5, 0.98));
}

.launch-splash-media {
  opacity: 0.56;
  filter: saturate(0.88) brightness(0.62);
}

.launch-splash-overlay {
  background:
    linear-gradient(180deg, rgba(4, 5, 6, 0.32), rgba(4, 5, 6, 0.86)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 4px);
}

.launch-splash-card {
  width: min(940px, calc(100% - 40px));
  padding: 28px;
  border: 1px solid rgba(255, 126, 69, 0.28);
  background:
    radial-gradient(circle at top right, rgba(255, 118, 55, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(16, 18, 22, 0.88), rgba(6, 7, 9, 0.94));
}

.launch-splash-kicker {
  color: #ff8750;
  letter-spacing: 0.34em;
}

.launch-splash-copy {
  max-width: 58ch;
}

.launch-splash-terminal {
  display: grid;
  gap: 8px;
  margin: 20px 0 8px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(13, 15, 18, 0.96), rgba(6, 7, 9, 0.94));
}

.launch-splash-terminal span {
  color: #d6ded6;
  opacity: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  animation: splash-flicker 2.8s steps(2, end) infinite;
}

.launch-splash-terminal span:nth-child(2) {
  animation-delay: 0.35s;
}

.launch-splash-terminal span:nth-child(3) {
  animation-delay: 0.7s;
}

.launch-splash-progress {
  margin-top: 18px;
}

.launch-splash-skip[disabled] {
  opacity: 0.46;
  cursor: wait;
  pointer-events: none;
}

.launch-splash.armed .launch-splash-skip {
  box-shadow: 0 0 0 1px rgba(255, 146, 92, 0.24) inset, 0 0 32px rgba(255, 110, 61, 0.2);
}

.main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.view {
  min-height: 0;
}

.view.active {
  overflow: auto;
  padding-right: 4px;
}

#dashboardView.view.active,
#settingsView.view.active {
  height: calc(100vh - 128px);
}

#editorView.view.active,
#compareView.view.active,
#libraryView.view.active,
#visualizeView.view.active,
#adminView.view.active {
  height: calc(100vh - 128px);
  overflow: hidden;
}

.editor-grid,
.work-grid,
.dashboard-grid {
  min-height: 0;
}

.map-browser-panel,
.workbench-grid-panel,
.inspector-panel,
.workbench-feed-panel,
.visualize-panel,
.slice-panel,
.compare-panel,
.library-shell,
#adminView .panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.map-browser-panel .tree,
.data-grid,
#inspectorContent,
.workbench-feed,
#sliceBars,
.table-shell,
#libraryProjects,
#librarySelectedProject,
#adminUserTable,
#adminSupportTable,
#adminBackupTable,
#adminJobTable {
  min-height: 0;
  overflow: auto;
}

.map-browser-panel .tree {
  flex: 1;
  padding-right: 4px;
}

.workbench-feed-panel {
  max-height: 260px;
}

.support-panel {
  margin-top: 12px;
}

.support-form,
.admin-create-form {
  display: grid;
  gap: 12px;
}

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

.support-form-wide,
.admin-create-actions {
  grid-column: 1 / -1;
}

.support-form-actions,
.admin-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.support-form textarea {
  min-height: 132px;
  resize: vertical;
}

.admin-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.surface-chart.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: none;
  min-height: 260px;
  padding: 20px;
}

.surface-empty {
  display: grid;
  gap: 8px;
  max-width: 380px;
  text-align: center;
  color: var(--text-soft);
}

.surface-empty strong {
  color: var(--text);
  font-family: var(--heading);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

@keyframes splash-flicker {
  0%, 100% { opacity: 0.94; }
  50% { opacity: 0.56; }
}

@media (max-width: 1200px) {
  .support-form,
  .admin-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .main {
    overflow: auto;
  }

  #dashboardView.view.active,
  #settingsView.view.active,
  #editorView.view.active,
  #compareView.view.active,
  #libraryView.view.active,
  #visualizeView.view.active,
  #adminView.view.active {
    height: auto;
    overflow: auto;
  }

  .support-form,
  .admin-create-form {
    grid-template-columns: 1fr;
  }
}

.intel-stack {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.intel-row {
  display: grid;
  gap: 0.15rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.intel-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.intel-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.intel-chip {
  border: 1px solid rgba(255,255,255,0.14);
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.intel-chip.warn {
  border-color: rgba(255, 76, 76, 0.45);
  color: #ff7b7b;
}

.intel-chip.ok {
  border-color: rgba(255,255,255,0.16);
  color: #d7dce2;
}

.intel-inline {
  margin-top: 0.55rem;
  font-size: 0.76rem;
}

.empty.mini {
  padding: 0.4rem 0;
  font-size: 0.8rem;
}


.step-row.compact {
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

textarea.field {
  resize: vertical;
  min-height: 72px;
}


.tree-group-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:8px;}
.tree-group-meta{font-size:.68rem;color:var(--text-muted);letter-spacing:.06em;text-transform:uppercase;}
.tree-map-topline{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;}
.tree-map-badges{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;}
.tree-badge{display:inline-flex;align-items:center;padding:2px 6px;border:1px solid rgba(255,255,255,.08);font:600 .62rem/1 var(--mono);letter-spacing:.08em;text-transform:uppercase;color:var(--text-soft);background:rgba(255,255,255,.02);}
.tree-badge-priority{border-color:rgba(255,140,83,.32);color:#ffd4b6;}
.tree-badge-mod{border-color:rgba(255,59,59,.36);color:#ff9d9d;background:rgba(255,59,59,.08);}
.tree-badge-meta{border-color:rgba(130,144,162,.24);color:#98a2ad;}
.tree-badge-risk{border-color:rgba(255,160,90,.32);color:#ffbf8d;}
.library-chip-list{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 6px;}


/* Day 3 workbench density pass */
.matrix-info-strip{display:flex;flex-wrap:wrap;gap:8px;padding:8px 10px;margin-bottom:10px;border:1px solid #161b1f;background:#07090b;font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);}
.matrix-info-strip .delta-up{color:#ff8c2a;}
.matrix-info-strip .delta-down{color:#ff3b3b;}
.matrix-cell-tag{font-size:10px;letter-spacing:.08em;text-transform:uppercase;opacity:.68;}
.matrix-cell-compare{font-family:var(--mono);font-size:10px;line-height:1.35;opacity:.86;}
.matrix-cell-compare.delta-up{color:#ff8c2a;}
.matrix-cell-compare.delta-down{color:#ff5f5f;}
.matrix-cell-button{align-items:flex-start;gap:6px;min-height:88px;padding:8px 8px 10px;}
.matrix-cell-button strong{font-size:13px;}
.matrix-value.active-edit .matrix-cell-button,.matrix-value.active-edit .matrix-cell-button.selected{box-shadow:0 0 0 1px rgba(255,59,59,.28), inset 0 0 0 1px rgba(255,140,42,.18);}
.inline-cell-input{width:100%;border:1px solid #2a3138;background:#050607;color:#f3f6f8;padding:6px 7px;font-size:12px;}
.inline-cell-input:focus{outline:none;border-color:#ff3b3b;box-shadow:0 0 0 1px rgba(255,59,59,.18);}
.hex-byte.changed,.hex-char.changed{color:#ff8c2a;}
.meta-grid-hero .inspector-card{min-height:68px;}
.axis-card-stack{display:grid;gap:10px;}
.axis-summary strong{font-size:13px;}
.inline-edit-card{display:grid;gap:8px;}
.inspector-grid-day3{gap:12px;}
.grid-toolbar{display:flex;justify-content:space-between;gap:12px;padding:8px 0 12px;border-bottom:1px solid #15191d;margin-bottom:12px;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-muted);}
.quick-compare-card .compare-stat-row strong{font-size:12px;}
.related-map-item:hover{border-color:#ff3b3b;}

/* ── Job Toast Panel ── */
.job-toast-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  pointer-events: none;
}

.job-toast {
  background: var(--bg-panel-strong);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
  pointer-events: auto;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.job-toast-label {
  font-family: var(--heading);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-toast-id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

.job-toast-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}

.job-toast-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ember), var(--gold));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.job-toast-msg {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Admin Table ── */
.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--panel-divider);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-soft);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.badge.admin { background: rgba(240, 106, 63, 0.18); color: var(--ember); }
.badge.tuner { background: rgba(93, 191, 141, 0.14); color: var(--success); }
.badge.ok { background: rgba(93, 191, 141, 0.14); color: var(--success); }
.badge.warn { background: rgba(232, 145, 84, 0.16); color: var(--warn); }
.badge.pending { background: rgba(240, 176, 99, 0.14); color: var(--gold); }
.badge.running { background: rgba(93, 176, 232, 0.14); color: #5db0e8; }
.badge.completed { background: rgba(93, 191, 141, 0.14); color: var(--success); }
.badge.failed { background: rgba(232, 84, 84, 0.16); color: #e85454; }
.badge.cancelled { background: rgba(148, 148, 148, 0.14); color: var(--text-muted); }

.mini-bar {
  width: 60px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}

.mini-fill {
  height: 100%;
  background: var(--ember);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-danger {
  background: rgba(232, 84, 84, 0.18);
  color: #e85454;
  border: 1px solid rgba(232, 84, 84, 0.3);
}

.btn-danger:hover {
  background: rgba(232, 84, 84, 0.28);
}

/* === Usability Fixes === */

/* Better button styling */
.btn {
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  font-family: var(--body);
  transition: background 0.15s, transform 0.1s;
}

.btn-primary {
  background: var(--ember);
  border: 1px solid var(--ember);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ember-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-edge);
  color: var(--text-soft);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--panel-edge-strong);
}

/* Better inputs */
.field, .search, .terminal-field {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: var(--body);
  transition: border-color 0.15s;
}

.field:focus, .search:focus {
  outline: none;
  border-color: var(--ember);
}

/* Better nav items */
.nav-item {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--body);
}

.nav-icon {
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
}

/* Better panels */
.panel, .topbar, .stat, .login-card {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(24,26,30,0.95), rgba(14,15,18,0.98));
}

/* Better sidebar */
.sidebar {
  padding: 14px;
  gap: 10px;
}

.sidebar-brand-mark, .topbar-brand-mark, .hero-crest {
  border-radius: 10px;
}

.sidebar-title {
  font-family: var(--heading);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
}

.sidebar-seal, .topbar-subline, .muted, .eyebrow, .label {
  font-family: var(--body);
  font-size: 0.78rem;
}

/* Better badges */
.badge {
  border-radius: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.8rem;
}

/* Better headings */
.panel h2, .brief-card h2, .hero-title {
  font-family: var(--heading);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar h1 {
  font-family: var(--heading);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}

/* Better tables */
.table-shell, .scope-frame, .data-grid {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Upload zone */
.upload-zone {
  border-radius: var(--radius);
  border: 2px dashed rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.2);
}

.upload-zone:hover {
  border-color: var(--ember);
  background: rgba(240,106,63,0.04);
}

/* Tree items */
.tree-item, #mapTree .tree-item {
  border-radius: 6px !important;
}

/* Hero cards */
.hero-intel-card, .hero-signal {
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.25);
}

/* Login screen cleanup */
.login-screen {
  background: linear-gradient(145deg, #0d0f14 0%, #0a0c10 50%, #08090c 100%);
}

.login-terminal-card {
  background: linear-gradient(180deg, rgba(24,26,32,0.96), rgba(12,14,18,0.98));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Operations strip */
.operations-strip, .grid-toolbar, .scope-header {
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.06);
}

/* Setting rows */
.setting-row {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Fix login corners */
.login-corner {
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

/* === DIY Tuner Refresh === */

.launch-splash {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top center, rgba(255, 103, 48, 0.07), transparent 18%),
    linear-gradient(180deg, rgba(4, 5, 7, 0.97), rgba(1, 2, 4, 0.985));
  backdrop-filter: blur(3px);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.launch-splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dashboard-hero-media {
  background-image:
    linear-gradient(180deg, rgba(6, 8, 10, 0.14), rgba(6, 8, 10, 0.62)),
    linear-gradient(90deg, rgba(6, 8, 10, 0.5), rgba(6, 8, 10, 0.04), rgba(6, 8, 10, 0.5)),
    url("./assets/blackbox-bmw-splash.jpg");
  background-position: center 42%;
  background-repeat: no-repeat;
  background-size: cover;
}

.launch-splash-media,
.launch-splash-overlay {
  position: absolute;
  inset: 0;
}

.launch-splash-media {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 130, 80, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(8, 10, 12, 0.98), rgba(2, 3, 5, 0.99));
}

.launch-splash-media::before,
.launch-splash-media::after {
  content: "";
  position: absolute;
}

.launch-splash-media::before {
  inset: 0;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 116, 64, 0.032) 0 1px, transparent 1px 116px),
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.018) 48%, transparent 50%, rgba(255, 116, 64, 0.03) 72%, transparent 74%);
  opacity: 0.46;
}

.launch-splash-media::after {
  inset: 7% 6%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 108, 58, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 11%),
    linear-gradient(90deg, rgba(255, 122, 69, 0.06), transparent 14%, transparent 86%, rgba(255, 122, 69, 0.06));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012);
  opacity: 0.84;
}

.launch-splash-overlay {
  background:
    radial-gradient(circle at top center, rgba(255, 118, 72, 0.08), transparent 18%),
    radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0), rgba(4, 5, 7, 0.2) 54%, rgba(4, 5, 7, 0.72) 100%);
}

.launch-splash-card {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  padding: clamp(20px, 3.2vw, 28px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(11, 12, 15, 0.94), rgba(4, 5, 7, 0.97));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.54);
  overflow: hidden;
}

.launch-splash-card::before,
.launch-splash-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.launch-splash-card::before {
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 5px);
  opacity: 0.38;
}

.launch-splash-card::after {
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #ff9b63 0%, #ff6a3b 42%, rgba(255, 106, 59, 0.22) 100%);
  box-shadow: 0 0 20px rgba(255, 106, 59, 0.3);
}

.launch-splash-card > * {
  position: relative;
  z-index: 1;
}

.launch-splash-kicker {
  margin: 0;
  color: #f0b063;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
}

.launch-splash-card h1 {
  margin: 10px 0 0;
  font-family: var(--heading);
  font-size: clamp(1.95rem, 5vw, 3.25rem);
  line-height: 0.94;
  letter-spacing: 0.055em;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.04);
}

.launch-splash-copy {
  max-width: 60ch;
  margin: 14px 0 0;
  color: #cfd7d2;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.75;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.launch-splash-terminal {
  display: grid;
  gap: 10px;
  margin: 18px 0 8px;
  padding: 15px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(6, 7, 9, 0.94), rgba(1, 2, 4, 0.97));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.launch-splash-terminal span {
  color: #dce5de;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.04);
}

.launch-splash-progress {
  width: 100%;
  height: 6px;
  margin-top: 18px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.03);
}

.launch-splash-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff8a58, #ffb26b);
  transition: width 120ms linear;
}

.launch-splash-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.launch-splash-skip {
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.launch-splash.armed .launch-splash-skip {
  box-shadow: 0 0 0 1px rgba(255, 146, 92, 0.22) inset, 0 0 22px rgba(255, 110, 61, 0.16);
}

.launch-splash:not(.hidden) ~ .login-screen {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
}

.dashboard-hero-media {
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0.38;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 10, 12, 0.92), rgba(8, 10, 12, 0.66), rgba(8, 10, 12, 0.92));
  pointer-events: none;
}

.project-source-lane {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-source-chip,
.hero-action-card {
  position: relative;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 9, 11, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.project-source-chip strong,
.hero-action-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--heading);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: #fff4e8;
}

.project-source-chip small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.35;
}

.project-source-chip.ready {
  border-color: rgba(93, 191, 141, 0.28);
  background:
    linear-gradient(180deg, rgba(93, 191, 141, 0.12), transparent 75%),
    rgba(7, 9, 11, 0.78);
}

.project-source-chip.waiting {
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.hero-action-card {
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.hero-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 146, 92, 0.42);
  background:
    linear-gradient(180deg, rgba(240, 106, 63, 0.12), transparent 78%),
    rgba(7, 9, 11, 0.84);
}

.hero-action-card .label {
  color: #f0b063;
}

.hero-action-card strong {
  font-size: 0.96rem;
}

@media (max-width: 1200px) {
  .project-source-lane,
  .hero-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .launch-splash-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .project-source-lane,
  .hero-quick-actions {
    grid-template-columns: 1fr;
  }
}

/* === Access Refresh === */

.sidebar-version {
  display: inline-flex;
  margin-top: 6px;
  color: #f0b063;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-screen {
  background:
    radial-gradient(circle at top center, rgba(255, 110, 61, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(4, 5, 7, 0.98), rgba(2, 3, 4, 1));
}

.login-screen::before {
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 116, 64, 0.028) 0 1px, transparent 1px 120px),
    radial-gradient(circle at 50% 20%, rgba(255, 110, 61, 0.06), transparent 40%);
  opacity: 0.5;
}

.login-screen::after {
  background: radial-gradient(circle at center, transparent 0, transparent 56%, rgba(0, 0, 0, 0.56) 100%);
}

.login-terminal-shell {
  width: min(100%, 560px);
  min-height: calc(100vh - 96px);
  align-content: center;
  justify-items: stretch;
  gap: 16px;
  padding: 40px 18px 96px;
}

.login-terminal-card {
  position: relative;
  width: min(100%, 540px);
  padding: 28px 28px 24px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(11, 12, 15, 0.94), rgba(4, 5, 7, 0.97));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.54);
  overflow: hidden;
}

.login-terminal-card::before,
.login-terminal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-terminal-card::before {
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 5px);
  opacity: 0.34;
}

.login-terminal-card::after {
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #ff9b63 0%, #ff6a3b 42%, rgba(255, 106, 59, 0.22) 100%);
  box-shadow: 0 0 20px rgba(255, 106, 59, 0.3);
}

.login-terminal-card > * {
  position: relative;
  z-index: 1;
}

.login-kicker {
  margin: 0 0 10px;
  color: #f0b063;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
}

.login-terminal-card h1 {
  font-family: var(--heading);
  font-size: clamp(1.95rem, 5vw, 3.15rem);
  line-height: 0.94;
  letter-spacing: 0.055em;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.04);
}

.login-copy {
  gap: 6px;
  margin: 16px 0 0;
  color: #cfd7d2;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  line-height: 1.7;
}

.login-copy-gap {
  margin-top: 8px !important;
}

.login-stamp {
  margin: 18px 0 0;
  color: #88918f;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
}

.login-terminal-form {
  margin-top: 20px;
  gap: 14px;
}

.terminal-field {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(7, 8, 10, 0.92), rgba(2, 3, 5, 0.96));
  padding: 11px 14px;
  letter-spacing: 0.14em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.016);
}

.terminal-field::placeholder {
  color: #6f777d;
}

.terminal-field:focus {
  border-color: rgba(255, 122, 69, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 122, 69, 0.14),
    0 0 0 1px rgba(255, 122, 69, 0.12);
}

.terminal-btn {
  min-height: 46px;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 146, 92, 0.28);
  background: linear-gradient(180deg, #ff8a58, #f56d43);
  color: #fff7f0;
  box-shadow: 0 10px 26px rgba(245, 109, 67, 0.2);
  letter-spacing: 0.2em;
}

.terminal-btn:hover {
  background: linear-gradient(180deg, #ff9567, #f7784f);
  box-shadow: 0 12px 30px rgba(245, 109, 67, 0.24);
}

.login-corner {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: #878f96;
}

.login-corner-bottom {
  left: 18px;
  bottom: 20px;
}

.login-corner-right {
  right: 18px;
  bottom: 20px;
}

.admin-table td .compare-chip {
  display: inline-flex;
  margin: 0 6px 6px 0;
}

.admin-table td small.muted {
  display: block;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .login-terminal-shell {
    min-height: auto;
    padding-bottom: 28px;
  }

  .login-corner {
    position: static;
    text-align: left;
  }
}

/* === Theme Pass: StageX Modern / TunerPro Classic === */

body[data-ui-theme="modern"] {
  --radius: 10px;
  --radius-sm: 6px;
}

body[data-ui-theme="classic"] {
  --radius: 6px;
  --radius-sm: 4px;
}

body[data-ui-theme="modern"] .sidebar,
body[data-ui-theme="modern"] .topbar,
body[data-ui-theme="modern"] .panel,
body[data-ui-theme="modern"] .stat {
  border-color: rgba(90, 96, 107, 0.34);
  background:
    linear-gradient(180deg, rgba(25, 27, 31, 0.98), rgba(13, 15, 18, 0.995)),
    linear-gradient(90deg, rgba(255, 101, 59, 0.03), transparent 26%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

body[data-ui-theme="modern"] .sidebar {
  background:
    linear-gradient(180deg, rgba(16, 17, 20, 0.995), rgba(10, 11, 14, 1)),
    linear-gradient(180deg, rgba(255, 101, 59, 0.06), transparent 22%);
}

body[data-ui-theme="modern"] .topbar {
  min-height: 78px;
}

body[data-ui-theme="modern"] .nav-item,
body[data-ui-theme="modern"] .quick-filter-chip,
body[data-ui-theme="modern"] .core-map-chip,
body[data-ui-theme="modern"] .editor-mode-tab,
body[data-ui-theme="modern"] .workbench-terminal-bar span {
  border-radius: 6px;
  box-shadow: none;
}

body[data-ui-theme="modern"] .nav-item {
  min-height: 42px;
  padding: 8px 10px;
  border-color: rgba(79, 87, 97, 0.28);
  background: linear-gradient(180deg, rgba(19, 22, 26, 0.96), rgba(12, 14, 18, 0.98));
}

body[data-ui-theme="modern"] .nav-item.active {
  border-color: rgba(255, 110, 64, 0.34);
  background:
    linear-gradient(90deg, rgba(255, 110, 64, 0.2), rgba(255, 150, 74, 0.04) 42%, transparent 72%),
    linear-gradient(180deg, rgba(25, 27, 31, 0.98), rgba(14, 16, 20, 1));
}

body[data-ui-theme="modern"] .topbar h1,
body[data-ui-theme="modern"] .sidebar-title,
body[data-ui-theme="modern"] .panel h2 {
  letter-spacing: 0.07em;
}

body[data-ui-theme="modern"] .quick-filter-row {
  gap: 6px;
}

body[data-ui-theme="modern"] .quick-filter-chip {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(69, 78, 88, 0.46);
  background: linear-gradient(180deg, rgba(20, 23, 28, 0.98), rgba(11, 13, 16, 1));
  color: #d1d8e0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

body[data-ui-theme="modern"] .quick-filter-chip.active {
  border-color: rgba(255, 102, 58, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 102, 58, 0.18), rgba(255, 102, 58, 0.04)),
    rgba(13, 15, 18, 1);
  color: #fff6ee;
}

body[data-ui-theme="modern"] .tree-group {
  border-radius: 8px;
  border-color: rgba(68, 75, 84, 0.42);
  background: linear-gradient(180deg, rgba(21, 23, 27, 0.98), rgba(13, 15, 18, 1));
}

body[data-ui-theme="modern"] .tree-group h3 {
  font-size: 1.04rem;
  letter-spacing: 0.05em;
}

body[data-ui-theme="modern"] .tree-map {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(61, 69, 78, 0.4);
  background:
    linear-gradient(180deg, rgba(16, 18, 22, 0.98), rgba(12, 14, 17, 1)),
    linear-gradient(90deg, rgba(255, 102, 58, 0.02), transparent 24%);
}

body[data-ui-theme="modern"] .tree-map:hover {
  transform: none;
  border-color: rgba(255, 112, 68, 0.34);
}

body[data-ui-theme="modern"] .tree-map.active {
  border-color: rgba(255, 112, 68, 0.42);
  background:
    linear-gradient(90deg, rgba(255, 112, 68, 0.16), rgba(255, 153, 84, 0.05) 40%, transparent 70%),
    linear-gradient(180deg, rgba(18, 20, 24, 0.99), rgba(12, 14, 18, 1));
  box-shadow: inset 0 0 0 1px rgba(255, 112, 68, 0.08);
}

body[data-ui-theme="modern"] .editor-mode-bar {
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(73, 80, 90, 0.38);
}

body[data-ui-theme="modern"] .editor-mode-tab {
  min-width: 54px;
  padding: 6px 10px;
  border: 1px solid rgba(73, 80, 90, 0.42);
  background: linear-gradient(180deg, rgba(19, 22, 26, 0.98), rgba(11, 13, 16, 1));
  color: #cad2db;
}

body[data-ui-theme="modern"] .editor-mode-tab.active {
  border-color: rgba(255, 112, 68, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 112, 68, 0.16), rgba(255, 112, 68, 0.04)),
    rgba(13, 15, 18, 1);
}

body[data-ui-theme="modern"] .matrix-scroll {
  border-radius: 8px;
  border: 1px solid rgba(73, 80, 90, 0.44);
  background: rgba(13, 15, 19, 0.98);
}

body[data-ui-theme="modern"] .matrix-table th,
body[data-ui-theme="modern"] .matrix-table td {
  border-right-color: rgba(76, 83, 92, 0.46);
  border-bottom-color: rgba(76, 83, 92, 0.46);
}

body[data-ui-theme="modern"] .matrix-corner-cell,
body[data-ui-theme="modern"] .matrix-x-header,
body[data-ui-theme="modern"] .matrix-y-header {
  background: linear-gradient(180deg, rgba(41, 43, 48, 0.99), rgba(29, 32, 36, 1));
}

body[data-ui-theme="modern"] .matrix-x-header.active,
body[data-ui-theme="modern"] .matrix-y-header.active {
  background:
    linear-gradient(180deg, rgba(255, 112, 68, 0.14), transparent 52%),
    rgba(34, 37, 42, 1);
}

body[data-ui-theme="modern"] .matrix-value {
  background: rgba(13, 16, 20, 1);
}

body[data-ui-theme="modern"] .matrix-cell-button {
  min-height: 48px;
  padding: 6px 7px;
  border: 1px solid rgba(55, 63, 73, 0.55);
  background:
    linear-gradient(180deg, rgba(40, 50, 64, 0.18), transparent 32%),
    var(--cell-color, rgba(16, 18, 22, 1));
}

body[data-ui-theme="modern"] .matrix-cell-button.selected,
body[data-ui-theme="modern"] .matrix-value.active-edit .matrix-cell-button {
  border-color: rgba(255, 112, 68, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 112, 68, 0.18), 0 0 0 1px rgba(255, 112, 68, 0.12);
}

body[data-ui-theme="classic"] .sidebar,
body[data-ui-theme="classic"] .topbar,
body[data-ui-theme="classic"] .panel,
body[data-ui-theme="classic"] .stat {
  border-color: rgba(86, 101, 118, 0.56);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(24, 28, 33, 0.995), rgba(15, 18, 23, 1));
  box-shadow: none;
}

body[data-ui-theme="classic"] .sidebar,
body[data-ui-theme="classic"] .topbar-brand-mark,
body[data-ui-theme="classic"] .sidebar-brand-mark,
body[data-ui-theme="classic"] .hero-crest {
  box-shadow: none;
}

body[data-ui-theme="classic"] .nav-item,
body[data-ui-theme="classic"] .quick-filter-chip,
body[data-ui-theme="classic"] .core-map-chip,
body[data-ui-theme="classic"] .editor-mode-tab,
body[data-ui-theme="classic"] .workbench-terminal-bar span {
  border-radius: 3px;
  box-shadow: none;
}

body[data-ui-theme="classic"] .nav-item {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(86, 101, 118, 0.46);
  background: linear-gradient(180deg, rgba(18, 22, 27, 0.99), rgba(14, 17, 21, 1));
  color: #d7e0ea;
}

body[data-ui-theme="classic"] .nav-item.active {
  border-color: rgba(143, 177, 215, 0.58);
  background: linear-gradient(180deg, rgba(50, 60, 73, 0.98), rgba(31, 38, 47, 1));
  color: #ffffff;
}

body[data-ui-theme="classic"] .nav-item:hover,
body[data-ui-theme="classic"] .tree-map:hover {
  transform: none;
}

body[data-ui-theme="classic"] .quick-filter-chip {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(86, 101, 118, 0.52);
  background: linear-gradient(180deg, rgba(18, 22, 27, 0.99), rgba(13, 16, 20, 1));
  color: #d2dbe5;
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

body[data-ui-theme="classic"] .quick-filter-chip.active {
  border-color: rgba(143, 177, 215, 0.66);
  background: linear-gradient(180deg, rgba(55, 65, 79, 0.98), rgba(31, 38, 47, 1));
  color: #fff;
}

body[data-ui-theme="classic"] .tree-group {
  border-radius: 4px;
  border-color: rgba(86, 101, 118, 0.48);
  background: linear-gradient(180deg, rgba(20, 24, 29, 0.995), rgba(13, 16, 20, 1));
}

body[data-ui-theme="classic"] .tree-group h3 {
  font-size: 0.98rem;
  letter-spacing: 0.03em;
}

body[data-ui-theme="classic"] .tree-map {
  padding: 7px 9px;
  border-radius: 3px;
  border: 1px solid rgba(75, 88, 102, 0.52);
  background: linear-gradient(180deg, rgba(17, 21, 26, 0.99), rgba(12, 15, 19, 1));
}

body[data-ui-theme="classic"] .tree-map.active {
  border-color: rgba(143, 177, 215, 0.62);
  background: linear-gradient(180deg, rgba(52, 61, 74, 0.99), rgba(31, 38, 47, 1));
}

body[data-ui-theme="classic"] .editor-mode-bar {
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(86, 101, 118, 0.44);
}

body[data-ui-theme="classic"] .editor-mode-tab {
  min-width: 52px;
  padding: 6px 9px;
  border: 1px solid rgba(86, 101, 118, 0.52);
  background: linear-gradient(180deg, rgba(17, 21, 26, 0.99), rgba(13, 16, 20, 1));
  color: #d5deea;
}

body[data-ui-theme="classic"] .editor-mode-tab.active {
  border-color: rgba(143, 177, 215, 0.66);
  background: linear-gradient(180deg, rgba(54, 64, 78, 0.99), rgba(31, 38, 47, 1));
  color: #fff;
}

body[data-ui-theme="classic"] .matrix-scroll {
  border-radius: 4px;
  border: 1px solid rgba(86, 101, 118, 0.54);
  background: rgba(14, 18, 22, 1);
}

body[data-ui-theme="classic"] .matrix-table th,
body[data-ui-theme="classic"] .matrix-table td {
  border-right-color: rgba(86, 101, 118, 0.54);
  border-bottom-color: rgba(86, 101, 118, 0.54);
}

body[data-ui-theme="classic"] .matrix-corner-cell,
body[data-ui-theme="classic"] .matrix-x-header,
body[data-ui-theme="classic"] .matrix-y-header {
  background: linear-gradient(180deg, rgba(44, 51, 59, 1), rgba(34, 40, 47, 1));
}

body[data-ui-theme="classic"] .matrix-x-header.active,
body[data-ui-theme="classic"] .matrix-y-header.active {
  background: linear-gradient(180deg, rgba(66, 77, 91, 1), rgba(44, 51, 59, 1));
}

body[data-ui-theme="classic"] .matrix-value {
  background: rgba(16, 20, 25, 1);
}

body[data-ui-theme="classic"] .matrix-cell-button {
  min-height: 44px;
  padding: 5px 6px;
  border: 1px solid rgba(86, 101, 118, 0.54);
  background:
    linear-gradient(180deg, rgba(39, 47, 56, 0.26), transparent 34%),
    var(--cell-color, rgba(18, 22, 27, 1));
}

body[data-ui-theme="classic"] .matrix-cell-button.selected,
body[data-ui-theme="classic"] .matrix-value.active-edit .matrix-cell-button {
  border-color: rgba(143, 177, 215, 0.74);
  box-shadow: inset 0 0 0 1px rgba(143, 177, 215, 0.34);
}

body[data-ui-theme="classic"] .inline-cell-input {
  border-color: rgba(86, 101, 118, 0.76);
  border-radius: 3px;
  background: rgba(10, 13, 16, 1);
  box-shadow: none;
}

body[data-ui-theme="classic"] .inline-cell-input:focus {
  border-color: rgba(143, 177, 215, 0.78);
  box-shadow: inset 0 0 0 1px rgba(143, 177, 215, 0.22);
}
