/* ==========================================================================
   Trust SL — Design System v4 "Linear"
   Deep neutral dark canvas (#0A0A0C -> #111114 -> #16161A), 1px hairline borders,
   subtle top inset specular highlight, tabular numerals everywhere, muted noble accents,
   crisp 150ms cubic-bezier micro-interactions, full light-mode parity.
   ========================================================================== */

:root {
  --bg: #0A0A0C;
  --sidebar-bg: #0C0C0F;
  --surface: #111114;
  --surface-2: #16161A;
  --surface-3: #1C1C22;
  --field: #0D0D10;
  --row-hover: #16161A;

  --text: #ECEEF2;
  --muted: #8A8F98;
  --faint: #5F6470;

  --line: rgba(255, 255, 255, 0.08);
  --line-subtle: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.13);
  --inset-top: inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  --hover: #16161A;

  /* Noble muted accents (Linear palette) */
  --accent: #5E6AD2;
  --accent-hi: #7C86E8;
  --accent-soft: rgba(94, 106, 210, 0.14);
  --accent-line: rgba(124, 134, 232, 0.38);
  --accent-text: #9EA6F2;

  --ok: #34B27B;
  --ok-text: #55C595;
  --ok-soft: rgba(52, 178, 123, 0.12);

  --warn: #D99B38;
  --warn-text: #E5B567;
  --warn-soft: rgba(217, 155, 56, 0.11);

  --bad: #DF5869;
  --bad-text: #EA808D;
  --bad-soft: rgba(223, 88, 105, 0.11);

  --shadow-pop: 0 20px 48px -16px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  --r-card: 10px;
  --r-ctl: 6px;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-ui: 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 7px;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

::selection {
  background: rgba(94, 106, 210, 0.38);
  color: #fff;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  font-size: 13.5px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.018em;
}

a {
  text-underline-offset: 3px;
}

/* Strict tabular numerals across every financial figure, table cell, badge, and counter */
.stat-num,
.num,
.tnum,
.tbl td,
.tbl th,
.delta,
.badge,
.kpi,
.mode-chip {
  font-variant-numeric: tabular-nums;
}

/* Volumetric 3D architectural horizon + dual ambient domes + micro-grain (zero JS, zero scroll repaint) */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora i {
  display: block;
  position: absolute;
  pointer-events: none;
}

/* 1. Perspective 3D coordinate horizon plane */
.aurora i:nth-child(1) {
  left: -30%;
  right: -30%;
  top: -30px;
  height: 420px;
  background-image:
    linear-gradient(to right, rgba(124, 134, 232, 0.095) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(124, 134, 232, 0.085) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(520px) rotateX(62deg);
  transform-origin: 50% 0%;
  mask-image: radial-gradient(ellipse 70% 88% at 54% 0%, #000 18%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 88% at 54% 0%, #000 18%, transparent 78%);
}

/* 2. Top & depth volumetric light cones */
.aurora i:nth-child(2) {
  inset: 0;
  background:
    radial-gradient(980px 380px at 54% -95px, rgba(94, 106, 210, 0.155), transparent 72%),
    radial-gradient(680px 300px at 16% -70px, rgba(52, 178, 123, 0.065), transparent 70%),
    radial-gradient(760px 420px at 88% 92%, rgba(94, 106, 210, 0.055), transparent 72%);
}

/* 3. Anti-banding layer disabled to avoid full-viewport SVG filter compositing overhead */
.aurora i:nth-child(3) {
  display: none;
}

html[data-theme="light"] .aurora i:nth-child(1) {
  background-image:
    linear-gradient(to right, rgba(78, 90, 192, 0.065) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(78, 90, 192, 0.065) 1px, transparent 1px);
}

html[data-theme="light"] .aurora i:nth-child(2) {
  background: radial-gradient(960px 340px at 54% -110px, rgba(94, 106, 210, 0.08), transparent 72%);
}

/* ---------- Z-Axis physical surface hierarchy (crisp 1:1 subpixel rendering at rest) ---------- */
.kpi-stage {
  position: relative;
}

/* Z-1: Sculpted elevated dashboard surface */
.glass {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(124, 134, 232, 0.06), transparent 55%),
    linear-gradient(175deg, #16171F 0%, #111217 58%, #0D0E13 100%);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--r-card);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.13),
    inset 1px 0 0 0 rgba(255, 255, 255, 0.03),
    inset -1px 0 0 0 rgba(255, 255, 255, 0.03),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.62),
    0 3px 8px -2px rgba(0, 0, 0, 0.58),
    0 16px 36px -10px rgba(0, 0, 0, 0.72);
  position: relative;
}

/* Z-2: Floating 3D KPI & Hero Cards (translateZ(14px) -> 22px on hover) */
.kpi,
.glass.kpi {
  background:
    radial-gradient(130% 95% at 0% 0%, var(--kpi-glow, rgba(124, 134, 232, 0.14)), transparent 58%),
    linear-gradient(168deg, #1C1E29 0%, #13141C 54%, #0E0F15 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
    inset 1px 0 0 0 rgba(255, 255, 255, 0.045),
    inset -1px 0 0 0 rgba(255, 255, 255, 0.04),
    inset 0 -2px 0 0 rgba(0, 0, 0, 0.72),
    0 6px 14px -3px rgba(0, 0, 0, 0.68),
    0 20px 42px -10px rgba(0, 0, 0, 0.84),
    0 28px 56px -18px var(--kpi-underglow, rgba(94, 106, 210, 0.18));
  position: relative;
}

.kpi::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  pointer-events: none;
  z-index: 3;
}

.kpi.kpi-emerald {
  --kpi-glow: rgba(52, 178, 123, 0.15);
  --kpi-underglow: rgba(52, 178, 123, 0.17);
}

.kpi.kpi-amber {
  --kpi-glow: rgba(217, 155, 56, 0.14);
  --kpi-underglow: rgba(217, 155, 56, 0.15);
}

.kpi.kpi-violet {
  --kpi-glow: rgba(139, 108, 232, 0.16);
  --kpi-underglow: rgba(124, 134, 232, 0.22);
}

/* Z-3: High-elevation panels & floating popovers */
.glass-strong {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(124, 134, 232, 0.11), transparent 55%),
    linear-gradient(172deg, rgba(28, 30, 42, 0.94) 0%, rgba(18, 19, 27, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.19),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.65),
    0 8px 20px -4px rgba(0, 0, 0, 0.65),
    0 28px 60px -12px rgba(0, 0, 0, 0.85);
  position: relative;
}

.glass-hover {
  transition: background var(--t-ui), border-color var(--t-ui), box-shadow var(--t-ui), transform 280ms var(--ease);
}

.glass-hover:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.team-tile {
  background:
    radial-gradient(110% 90% at 0% 0%, rgba(124, 134, 232, 0.08), transparent 60%),
    linear-gradient(172deg, #181A24 0%, #111218 100%);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 10px;
  padding: 0.82rem 0.95rem;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.55),
    0 8px 20px -8px rgba(0, 0, 0, 0.62);
  transition: background var(--t-ui), border-color var(--t-ui), box-shadow var(--t-ui), transform 280ms var(--ease);
}

.team-tile.clickable {
  cursor: pointer;
}

.team-tile.clickable:hover {
  background:
    radial-gradient(110% 90% at 0% 0%, rgba(124, 134, 232, 0.14), transparent 60%),
    linear-gradient(172deg, #1D202C 0%, #14151D 100%);
  border-color: rgba(158, 166, 242, 0.28);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card);
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--inset-top);
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}

.hero::after {
  display: none;
}

.hero>* {
  position: relative;
  z-index: 1;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.48rem 0.88rem;
  border-radius: var(--r-ctl);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background var(--t-ui), border-color var(--t-ui), color var(--t-ui), box-shadow var(--t-ui), transform var(--t-ui);
}

.btn svg {
  width: 0.95rem;
  height: 0.95rem;
}

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 2px;
}

.inp:focus-visible {
  outline: none;
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-primary {
  color: #F7F8FA;
  background: linear-gradient(180deg, #6875DF 0%, #5561C9 100%);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.42),
    0 6px 16px -4px rgba(94, 106, 210, 0.38);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #7480E8 0%, #5E6AD2 100%);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-0.5px);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--text);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.btn-danger {
  background: var(--bad-soft);
  border-color: rgba(223, 88, 105, 0.28);
  color: var(--bad-text);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(223, 88, 105, 0.18);
  border-color: rgba(223, 88, 105, 0.45);
}

.btn-sm {
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
  border-radius: 6px;
}

/* ---------- Z-0 recessed inputs & carved trays ---------- */
.inp {
  width: 100%;
  padding: 0.52rem 0.75rem;
  border-radius: var(--r-ctl);
  font-size: 0.84rem;
  color: var(--text);
  outline: none;
  background: linear-gradient(180deg, #08090D 0%, #0C0D12 100%);
  border: 1px solid rgba(255, 255, 255, 0.085);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.72),
    inset 0 1px 1px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.055);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--t-ui), box-shadow var(--t-ui), background var(--t-ui);
}

.recessed-well {
  background: linear-gradient(180deg, rgba(6, 7, 11, 0.72) 0%, rgba(11, 12, 17, 0.52) 100%);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.68),
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.055);
}

html[data-theme="light"] .inp {
  background: linear-gradient(180deg, #F3F5FA 0%, #FFFFFF 100%);
  box-shadow: inset 0 1.5px 3px rgba(20, 24, 40, 0.075), 0 1px 0 #FFFFFF;
}

html[data-theme="light"] .recessed-well {
  background: linear-gradient(180deg, #EEF1F7 0%, #F6F7FB 100%);
  border-color: rgba(20, 21, 26, 0.08);
  box-shadow: inset 0 2px 5px rgba(20, 24, 40, 0.06), 0 1px 0 #FFFFFF;
}

.inp:hover:not(:disabled) {
  border-color: var(--line-strong);
}

.inp:focus {
  border-color: var(--accent-hi);
  background: #0B0C12;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.6),
    0 0 0 3px rgba(94, 106, 210, 0.22),
    0 0 16px rgba(94, 106, 210, 0.14);
}

html[data-theme="light"] .inp:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(78, 90, 200, 0.16);
}

.inp::placeholder {
  color: var(--faint);
}

select.inp option {
  background: #141519;
}

input[type="date"].inp::-webkit-calendar-picker-indicator {
  filter: invert(.62);
  cursor: pointer;
}

input[type=number].inp::-webkit-inner-spin-button {
  opacity: .35;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

input[type="file"] {
  font-size: .82rem;
  color: var(--muted);
}

input[type="file"]::file-selector-button {
  padding: .36rem .78rem;
  margin-right: .7rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
  font-size: .78rem;
  cursor: pointer;
  transition: background var(--t-ui), border-color var(--t-ui);
}

input[type="file"]::file-selector-button:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
}

.lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.36rem;
  letter-spacing: 0.01em;
}

/* ---------- data tables ---------- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
}

.tbl th {
  text-align: left;
  padding: 0.62rem 1rem;
  font-size: 0.685rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.055em;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: 0.64rem 1rem;
  border-bottom: 1px solid var(--line-subtle);
  vertical-align: middle;
}

.tbl tbody tr {
  transition: background var(--t-ui);
}

.tbl tbody tr:hover {
  background: var(--row-hover);
}

.tbl tbody tr:last-child td {
  border-bottom: none;
}

.tbl .num,
.tbl th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.14rem 0.5rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.35;
  border: 1px solid transparent;
}

.badge-violet {
  background: var(--accent-soft);
  color: var(--accent-text);
  border-color: rgba(94, 106, 210, 0.2);
}

.badge-emerald {
  background: var(--ok-soft);
  color: var(--ok-text);
  border-color: rgba(52, 178, 123, 0.2);
}

.badge-amber {
  background: var(--warn-soft);
  color: var(--warn-text);
  border-color: rgba(217, 155, 56, 0.22);
}

.badge-rose {
  background: var(--bad-soft);
  color: var(--bad-text);
  border-color: rgba(223, 88, 105, 0.22);
}

.badge-zinc {
  background: rgba(255, 255, 255, 0.055);
  color: #A0A5B1;
  border-color: rgba(255, 255, 255, 0.07);
}

/* ---------- sculpted 3D progress grooves ---------- */
.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(5, 6, 10, 0.72);
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.progress>div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5E6AD2, #8B94F2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 10px rgba(110, 120, 229, 0.45);
  transition: width .65s var(--ease);
}

.progress.done>div {
  background: linear-gradient(90deg, #2A9D6B, #55C595);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 0 10px rgba(52, 178, 123, 0.42);
}

.progress.warn>div {
  background: linear-gradient(90deg, #C78928, #EAB865);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 10px rgba(217, 155, 56, 0.38);
}

.progress.max>div {
  background: linear-gradient(90deg, #C94657, #EA808D);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 10px rgba(223, 88, 105, 0.4);
}

/* ---------- headings & KPI tiles ---------- */
.card-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.015em;
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.015em;
}

.kpi-val {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-title {
  font-size: 0.845rem;
  font-weight: 600;
  letter-spacing: 0.012em;
  color: var(--text);
}

.stat-num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  font-weight: 600;
}

.text-gradient {
  color: var(--accent-text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.divider {
  height: 1px;
  background: var(--line);
}

.kpi {
  padding: 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-height: 6.4rem;
}

.kpi .stat-num {
  font-size: clamp(1.32rem, 4.4vw, 1.7rem);
  line-height: 1.15;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .kpi .stat-num {
  text-shadow: none;
}

.hl {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.spark {
  display: block;
  width: 100%;
  height: 32px;
  margin-top: 0.3rem;
  overflow: visible;
}

.kpi.kpi-emerald .spark path.line {
  stroke: #34B27B;
}

.kpi.kpi-emerald .spark path.glow {
  stroke: #34B27B;
}

.spark path.glow {
  fill: none;
  stroke: var(--accent-hi);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.18;
}

.spark path.line {
  fill: none;
  stroke: var(--accent-hi);
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spark path.area {
  fill: url(#sparkFill);
}

.pring {
  --p: 0;
  width: 128px;
  height: 128px;
  position: relative;
  flex-shrink: 0;
}

.pring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pring circle {
  fill: none;
  stroke-width: 8.5;
  stroke-linecap: round;
}

.pring .track {
  stroke: rgba(255, 255, 255, 0.07);
}

.pring .bar {
  stroke: var(--accent);
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p));
  transition: stroke-dashoffset 1s var(--ease);
}

.pring .label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* empty state + skeleton */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .55rem;
  padding: 2.4rem 1.4rem;
  color: var(--muted);
}

.empty .orb {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid rgba(94, 106, 210, 0.24);
}

.skeleton {
  border-radius: 6px;
  background: linear-gradient(100deg, rgba(255, 255, 255, .035) 30%, rgba(255, 255, 255, .075) 50%, rgba(255, 255, 255, .035) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- shell: Linear sidebar + top bar ---------- */
#sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.7rem;
  color: #F7F8FA;
  letter-spacing: -0.01em;
  background: #5E6AD2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

.nav-section {
  padding: 1rem 0.65rem 0.3rem;
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.38rem 0.62rem 0.38rem 0.72rem;
  margin: 1px 0;
  border-radius: 6px;
  font-size: 0.83rem;
  font-weight: 450;
  color: var(--muted);
  transition: color var(--t-ui), background var(--t-ui), box-shadow var(--t-ui);
}

.nav-link svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  padding: 0;
  background: none;
  opacity: 0.72;
  transition: color var(--t-ui), opacity var(--t-ui);
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link:hover svg {
  opacity: 0.95;
}

.nav-link.active {
  color: #F5F6F9;
  background: var(--surface-2);
  font-weight: 500;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.nav-link.active svg {
  color: var(--accent-hi);
  opacity: 1;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent-hi);
}

.user-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 999px;
  font-weight: 600;
  color: #F4F5F8;
  background: #272B44;
  border: 1px solid rgba(124, 134, 232, 0.3);
}

.top-bar {
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.34rem 0.55rem 0.34rem 0.68rem;
  border-radius: var(--r-ctl);
  color: var(--muted);
  font-size: 0.78rem;
  background: var(--field);
  border: 1px solid var(--line);
  transition: border-color var(--t-ui), color var(--t-ui), background var(--t-ui);
  cursor: pointer;
}

.search-pill:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface-2);
}

.kbd {
  font-size: 0.64rem;
  font-weight: 500;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
}

/* ---------- Floating Depth: Toasts, Modals, Popovers (Top Z-Layer + blur(16px)) ---------- */
#toasts {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  max-width: 23rem;
}

.toast {
  position: relative;
  overflow: hidden;
  padding: .72rem 1rem;
  border-radius: 10px;
  font-size: .82rem;
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  cursor: pointer;
  background: rgba(22, 24, 34, 0.9);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 42px -8px rgba(0, 0, 0, 0.85),
    0 6px 16px -4px rgba(0, 0, 0, 0.65);
  animation: toast-in .24s var(--ease);
}

.toast::before {
  display: none;
}

.toast .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 6px;
  background: var(--tc, var(--accent));
  box-shadow: 0 0 8px var(--tc, var(--accent));
  flex-shrink: 0;
}

.toast.out {
  animation: toast-out .16s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
}

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(4, 5, 10, 0.74);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  perspective: 1100px;
}

.modal-card {
  animation: pop3d .22s var(--ease);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.22),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.7),
    0 14px 32px -6px rgba(0, 0, 0, 0.75),
    0 36px 84px -12px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

@keyframes pop3d {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, -24px) rotateX(4deg) scale(.98);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateX(0deg) scale(1);
  }
}

/* ---------- Sculpted 3D Statement Drop-Zone ---------- */
.drop-zone {
  border: 1px dashed rgba(158, 166, 242, 0.32);
  border-radius: 10px;
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(94, 106, 210, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(8, 9, 14, 0.78) 0%, rgba(14, 15, 22, 0.55) 100%);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.65),
    0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color var(--t-ui), background var(--t-ui), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.drop-zone.over,
.drop-zone:hover {
  border-color: var(--accent-hi);
  background:
    radial-gradient(90% 90% at 50% 0%, rgba(124, 134, 232, 0.20), transparent 75%),
    rgba(20, 22, 34, 0.75);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 24px -8px rgba(94, 106, 210, 0.32);
}

.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .45;
  }
}

.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

[x-cloak] {
  display: none !important;
}

.tbl-search {
  max-width: 260px;
}

main .grid>* {
  min-width: 0;
}

/* Harmonize Tailwind utility colors on dark canvas so status tones stay noble & muted */
html:not([data-theme="light"]) .text-emerald-300,
html:not([data-theme="light"]) .text-emerald-400 {
  color: var(--ok-text) !important;
}

html:not([data-theme="light"]) .text-amber-300,
html:not([data-theme="light"]) .text-amber-400 {
  color: var(--warn-text) !important;
}

html:not([data-theme="light"]) .text-rose-300,
html:not([data-theme="light"]) .text-rose-400 {
  color: var(--bad-text) !important;
}

html:not([data-theme="light"]) .text-neutral-400,
html:not([data-theme="light"]) .text-neutral-500 {
  color: var(--muted) !important;
}

@media (max-width: 1023px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform .24s var(--ease);
  }

  #sidebar.open {
    transform: none;
    box-shadow: 0 0 64px rgba(0, 0, 0, .82);
  }

  .hero {
    padding: 1.05rem;
  }
}

/* ---------- login / auth ---------- */
.auth-wrap {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1.05fr 1fr;
}

.auth-side {
  position: relative;
  overflow: hidden;
  padding: 3rem 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(760px 480px at 0% 0%, rgba(94, 106, 210, 0.14), transparent 62%), #0C0C0F;
  border-right: 1px solid var(--line);
}

.auth-side::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 20% 30%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 20% 30%, #000, transparent 70%);
}

.auth-side>* {
  position: relative;
  z-index: 1;
}

.auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.float-card {
  animation: none;
}

@media (max-width: 900px) {
  .auth-wrap {
    grid-template-columns: 1fr;
  }

  .auth-side {
    display: none;
  }
}

/* ==================== motion ==================== */
@keyframes rise {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  main>*:not(.modal-back) {
    animation: rise .24s var(--ease) backwards;
  }

  main>*:nth-child(2):not(.modal-back) {
    animation-delay: .03s;
  }

  main>*:nth-child(3):not(.modal-back) {
    animation-delay: .06s;
  }

  main>*:nth-child(4):not(.modal-back) {
    animation-delay: .09s;
  }

  .modal-back {
    animation: fade-in .16s var(--ease) backwards;
  }

  .btn:active:not(:disabled) {
    transform: scale(.985);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==================== LIGHT THEME ==================== */
html[data-theme="light"] {
  --bg: #F5F6F8;
  --sidebar-bg: #FAFAFC;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --surface-3: #EDEEF2;
  --field: #FFFFFF;
  --row-hover: #F6F7FA;

  --text: #14151A;
  --muted: #5C616E;
  --faint: #8A909E;

  --line: rgba(20, 21, 26, 0.085);
  --line-subtle: rgba(20, 21, 26, 0.055);
  --line-strong: rgba(20, 21, 26, 0.15);
  --inset-top: 0 1px 2px rgba(20, 21, 26, 0.04);
  --hover: #F4F5F8;

  --accent: #4E5AC8;
  --accent-hi: #4350BE;
  --accent-soft: rgba(78, 90, 200, 0.09);
  --accent-line: rgba(78, 90, 200, 0.35);
  --accent-text: #3F4BB5;

  --ok: #159964;
  --ok-text: #0E7A4E;
  --ok-soft: rgba(21, 153, 100, 0.1);

  --warn: #B87B1E;
  --warn-text: #946010;
  --warn-soft: rgba(184, 123, 30, 0.11);

  --bad: #CE374A;
  --bad-text: #B12839;
  --bad-soft: rgba(206, 55, 74, 0.09);

  --shadow-pop: 0 18px 46px -14px rgba(20, 24, 40, 0.22), 0 0 0 1px rgba(20, 21, 26, 0.07);
}

html[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] .aurora {
  background: radial-gradient(960px 300px at 50% -160px, rgba(78, 90, 200, 0.06), transparent 70%);
}

html[data-theme="light"] .glass,
html[data-theme="light"] .hero {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFD 100%);
  border-color: rgba(20, 21, 26, 0.085);
  box-shadow:
    inset 0 1px 0 0 #FFFFFF,
    0 2px 6px rgba(20, 24, 40, 0.05),
    0 14px 30px -12px rgba(20, 24, 40, 0.11);
}

html[data-theme="light"] .kpi,
html[data-theme="light"] .glass.kpi {
  background:
    radial-gradient(120% 95% at 0% 0%, rgba(94, 106, 210, 0.08), transparent 58%),
    linear-gradient(170deg, #FFFFFF 0%, #F7F9FE 100%);
  border-color: rgba(78, 90, 192, 0.14);
  box-shadow:
    inset 0 1px 0 0 #FFFFFF,
    inset 0 -1px 0 0 rgba(20, 24, 40, 0.05),
    0 6px 14px -4px rgba(20, 24, 40, 0.08),
    0 18px 36px -12px rgba(35, 42, 85, 0.14);
}

html[data-theme="light"] .glass-strong {
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 250, 254, 0.96) 100%);
  border-color: rgba(20, 21, 26, 0.11);
  box-shadow:
    inset 0 1px 0 0 #FFFFFF,
    0 16px 40px -10px rgba(20, 24, 40, 0.18);
}

html[data-theme="light"] .glass-hover:hover {
  background: #fff;
  border-color: rgba(78, 90, 200, 0.35);
  box-shadow: 0 10px 26px -10px rgba(20, 24, 40, 0.18);
}

html[data-theme="light"] .team-tile {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F9FC 100%);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 4px 12px -4px rgba(20, 24, 40, 0.08);
}

html[data-theme="light"] .team-tile.clickable:hover {
  background: #F4F6FC;
  border-color: rgba(78, 90, 200, 0.3);
}

html[data-theme="light"] .btn-ghost {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: 0 1px 2px rgba(20, 24, 40, 0.04);
}

html[data-theme="light"] .btn-ghost:hover:not(:disabled) {
  background: #F5F6FA;
  border-color: rgba(20, 21, 26, 0.24);
}

html[data-theme="light"] select.inp option {
  background: #fff;
  color: var(--text);
}

html[data-theme="light"] input[type="date"].inp::-webkit-calendar-picker-indicator {
  filter: none;
}

html[data-theme="light"] input[type="file"]::file-selector-button {
  background: #F1F2F6;
  color: var(--text);
}

html[data-theme="light"] #sidebar {
  background: var(--sidebar-bg);
}

html[data-theme="light"] .nav-link.active {
  color: var(--accent-text);
  background: var(--accent-soft);
  box-shadow: none;
}

html[data-theme="light"] .user-card {
  background: #fff;
  box-shadow: none;
}

html[data-theme="light"] .avatar {
  background: #E9ECFA;
  color: #3F4BB5;
  border-color: rgba(78, 90, 200, 0.24);
}

html[data-theme="light"] .top-bar {
  background: rgba(245, 246, 248, 0.86);
}

html[data-theme="light"] .kbd {
  background: rgba(20, 21, 26, 0.045);
}

html[data-theme="light"] .progress {
  background: rgba(20, 21, 26, 0.085);
  box-shadow: inset 0 1px 2px rgba(20, 24, 40, 0.08);
}

html[data-theme="light"] .modal-back {
  background: rgba(20, 24, 45, 0.36);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-pop);
}

html[data-theme="light"] .pring .track {
  stroke: rgba(20, 21, 26, 0.085);
}

html[data-theme="light"] .skeleton {
  background: linear-gradient(100deg, rgba(20, 21, 26, .045) 30%, rgba(20, 21, 26, .09) 50%, rgba(20, 21, 26, .045) 70%);
  background-size: 200% 100%;
}

html[data-theme="light"] .auth-side {
  background: radial-gradient(760px 480px at 0% 0%, rgba(94, 106, 210, 0.3), transparent 62%), #111322;
  color: #ECEEF2;
}

html[data-theme="light"] .badge-zinc {
  background: rgba(20, 21, 26, 0.06);
  color: #4A4F5E;
  border-color: rgba(20, 21, 26, 0.08);
}

html[data-theme="light"] .text-neutral-400,
html[data-theme="light"] .text-neutral-500 {
  color: #5C616E !important;
}

html[data-theme="light"] .text-neutral-300,
html[data-theme="light"] .text-neutral-200 {
  color: #262934 !important;
}

html[data-theme="light"] .text-neutral-600 {
  color: #8A909E !important;
}

html[data-theme="light"] .border-white\/5 {
  border-color: rgba(20, 21, 26, .07) !important;
}

html[data-theme="light"] .border-white\/10 {
  border-color: rgba(20, 21, 26, .11) !important;
}

html[data-theme="light"] .bg-black\/60 {
  background: rgba(20, 24, 45, .3) !important;
}

html[data-theme="light"] .hover\:text-white:hover {
  color: #3F4BB5 !important;
}

html[data-theme="light"] .text-violet-300,
html[data-theme="light"] .text-violet-400,
html[data-theme="light"] .text-violet-200 {
  color: #3F4BB5 !important;
}

html[data-theme="light"] .hover\:text-violet-300:hover {
  color: #313CA0 !important;
}

html[data-theme="light"] .text-emerald-300,
html[data-theme="light"] .text-emerald-400 {
  color: #0E7A4E !important;
}

html[data-theme="light"] .text-rose-300,
html[data-theme="light"] .text-rose-400 {
  color: #B12839 !important;
}

html[data-theme="light"] .text-rose-200\/80 {
  color: #B12839 !important;
}

html[data-theme="light"] .hover\:text-rose-400:hover {
  color: #961F2E !important;
}

html[data-theme="light"] .text-amber-300,
html[data-theme="light"] .text-amber-400 {
  color: #946010 !important;
}

html[data-theme="light"] .bg-white\/5 {
  background: rgba(20, 21, 26, .045) !important;
}

html[data-theme="light"] .hover\:bg-white\/5:hover {
  background: rgba(20, 21, 26, .06) !important;
}

html[data-theme="light"] .drop-zone {
  border-color: rgba(78, 90, 200, 0.34);
  background:
    radial-gradient(90% 85% at 50% 0%, rgba(94, 106, 210, 0.08), transparent 72%),
    linear-gradient(180deg, #F5F7FD 0%, #EEF2FA 100%);
  box-shadow:
    inset 0 1px 0 #FFFFFF,
    0 1px 3px rgba(20, 24, 40, 0.05);
}

html[data-theme="light"] .drop-zone.over,
html[data-theme="light"] .drop-zone:hover {
  border-color: var(--accent);
  background:
    radial-gradient(90% 90% at 50% 0%, rgba(94, 106, 210, 0.15), transparent 76%),
    #EAEFFD;
  box-shadow:
    inset 0 1px 0 #FFFFFF,
    0 8px 20px -8px rgba(78, 90, 200, 0.22);
}

html[data-theme="light"] .bg-white\/\[\.03\],
html[data-theme="light"] .bg-white\/\[\.04\],
html[data-theme="light"] .bg-white\/\[\.05\] {
  background: rgba(20, 24, 40, 0.04) !important;
}

html[data-theme="light"] .border-white\/\[\.05\],
html[data-theme="light"] .border-white\/\[\.06\],
html[data-theme="light"] .border-white\/\[\.08\],
html[data-theme="light"] .border-white\/\[\.12\] {
  border-color: rgba(20, 24, 40, 0.09) !important;
}

html[data-theme="light"] .divide-white\/\[\.05\] > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(20, 24, 40, 0.07) !important;
}

html[data-theme="light"] .text-violet-300\/80 {
  color: #3F4BB5 !important;
}

html[data-theme="light"] .text-emerald-300\/90,
html[data-theme="light"] .text-emerald-300\/80 {
  color: #0E7A4E !important;
}

html[data-theme="light"] .text-rose-300\/90 {
  color: #B12839 !important;
}

/* ==================== components: deltas, segmented tabs, attention rows, inline bars ==================== */
.delta {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.69rem;
  font-weight: 500;
  padding: 0.08rem 0.42rem;
  border-radius: 5px;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}

.delta.up {
  background: var(--ok-soft);
  color: var(--ok-text);
  border-color: rgba(52, 178, 123, 0.18);
}

.delta.down {
  background: var(--bad-soft);
  color: var(--bad-text);
  border-color: rgba(223, 88, 105, 0.18);
}

.delta.flat {
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

html[data-theme="light"] .delta.flat {
  background: rgba(20, 21, 26, 0.055);
}

.seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 7px;
  background: var(--field);
  border: 1px solid var(--line);
}

.seg button,
.seg a {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.68rem;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: background var(--t-ui), color var(--t-ui), box-shadow var(--t-ui);
}

.seg button:hover,
.seg a:hover {
  color: var(--text);
}

.seg button.on,
.seg a.on {
  background: var(--surface-3);
  color: #F4F5F8;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .seg button.on,
html[data-theme="light"] .seg a.on {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(20, 24, 40, 0.12);
}

.attn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.68rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  background: linear-gradient(175deg, rgba(28, 30, 42, 0.68) 0%, rgba(16, 17, 24, 0.82) 100%);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.55),
    0 8px 18px -8px rgba(0, 0, 0, 0.65);
  transition: border-color var(--t-ui), background var(--t-ui), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

a.attn:hover,
div.attn:hover {
  border-color: rgba(158, 166, 242, 0.28);
  background: linear-gradient(175deg, rgba(34, 37, 52, 0.82) 0%, rgba(20, 22, 31, 0.9) 100%);
  transform: translateY(-1.5px);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.16),
    0 12px 24px -8px rgba(0, 0, 0, 0.75);
}

.attn .ico {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 10px -3px rgba(0, 0, 0, 0.5);
}

.attn .ico svg {
  width: 0.95rem;
  height: 0.95rem;
}

.attn .ico.bad {
  background: var(--bad-soft);
  color: var(--bad-text);
  border-color: rgba(223, 88, 105, 0.28);
}

.attn .ico.warn {
  background: var(--warn-soft);
  color: var(--warn-text);
  border-color: rgba(217, 155, 56, 0.28);
}

.attn .ico.info {
  background: var(--accent-soft);
  color: var(--accent-hi);
  border-color: rgba(94, 106, 210, 0.28);
}

html[data-theme="light"] .attn {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F9FC 100%);
  border-color: rgba(20, 21, 26, 0.09);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 4px 12px -4px rgba(20, 24, 40, 0.07);
}

html[data-theme="light"] a.attn:hover,
html[data-theme="light"] div.attn:hover {
  background: #F2F5FC;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot.ok {
  background: var(--ok);
}

.dot.bad {
  background: var(--bad);
}

.dot.idle {
  background: var(--faint);
}

.bar-inline {
  position: relative;
  height: 4px;
  width: 4.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.55rem;
}

.bar-inline>i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent-hi);
  border-radius: 999px;
  transition: width .5s var(--ease);
}

html[data-theme="light"] .bar-inline {
  background: rgba(20, 21, 26, 0.085);
}

.list-row {
  transition: background var(--t-ui);
}

.list-row:hover {
  background: var(--row-hover);
}

.avatar-sm {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.7rem;
}

.muted-zero {
  color: var(--faint);
}

/* ==================== limit mode (regular -> IBAN) ==================== */
.mode {
  border-radius: 8px;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
}

.mode-ico {
  font-size: 1.1rem;
  line-height: 1.3;
}

.mode-title {
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

.mode-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.14rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.mode-sub b {
  color: var(--text);
  font-weight: 600;
}

.mode.mode-regular {
  background: rgba(52, 178, 123, 0.06);
  border-color: rgba(52, 178, 123, 0.24);
}

.mode.mode-regular .mode-title {
  color: var(--ok-text);
}

.mode.mode-soon {
  background: rgba(217, 155, 56, 0.08);
  border-color: rgba(217, 155, 56, 0.38);
}

.mode.mode-soon .mode-title {
  color: var(--warn-text);
}

.mode.mode-iban {
  background: rgba(94, 106, 210, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(94, 106, 210, 0.14);
}

.mode.mode-iban .mode-title {
  color: var(--accent-text);
  font-size: 0.94rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.mode.mode-full {
  background: rgba(223, 88, 105, 0.09);
  border-color: rgba(223, 88, 105, 0.42);
}

.mode.mode-full .mode-title {
  color: var(--bad-text);
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.5rem;
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.mode-chip.mode-regular {
  background: var(--ok-soft);
  color: var(--ok-text);
}

.mode-chip.mode-soon {
  background: var(--warn-soft);
  color: var(--warn-text);
}

.mode-chip.mode-iban {
  background: var(--accent);
  color: #fff;
}

.mode-chip.mode-full {
  background: var(--bad-soft);
  color: var(--bad-text);
}

html[data-theme="light"] .mode {
  background: #FAFAFC;
}

/* ==================== Linear v6: brand mark, avatars, ranks, burn-rate, heatmap, drawer, bulk, auth ==================== */
.tsl-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ECEEF2;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(94, 106, 210, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Tinted Linear avatars + photo avatars */
.u-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: -0.02em;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(94, 106, 210, 0.16);
  color: #B8C0FF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.u-avatar.av-indigo {
  background: rgba(94, 106, 210, 0.18);
  color: #B8C0FF;
  border-color: rgba(110, 120, 229, 0.28);
}

.u-avatar.av-emerald {
  background: rgba(52, 178, 123, 0.16);
  color: #7EE0B5;
  border-color: rgba(52, 178, 123, 0.28);
}

.u-avatar.av-amber {
  background: rgba(217, 155, 56, 0.16);
  color: #F2CB82;
  border-color: rgba(217, 155, 56, 0.28);
}

.u-avatar.av-sky {
  background: rgba(56, 163, 217, 0.16);
  color: #8CD6FB;
  border-color: rgba(56, 163, 217, 0.28);
}

.u-avatar.av-rose {
  background: rgba(223, 88, 105, 0.16);
  color: #F69BA6;
  border-color: rgba(223, 88, 105, 0.28);
}

.u-avatar.av-violet {
  background: rgba(139, 108, 232, 0.18);
  color: #CEBEFA;
  border-color: rgba(139, 108, 232, 0.28);
}

html[data-theme="light"] .u-avatar {
  box-shadow: none;
  border-color: rgba(20, 21, 26, 0.10);
}

html[data-theme="light"] .u-avatar.av-indigo {
  background: #EEF0FD;
  color: #3D48B2;
}

html[data-theme="light"] .u-avatar.av-emerald {
  background: #E9F8F1;
  color: #197A52;
}

html[data-theme="light"] .u-avatar.av-amber {
  background: #FDF4E6;
  color: #966114;
}

html[data-theme="light"] .u-avatar.av-sky {
  background: #E8F5FC;
  color: #186894;
}

html[data-theme="light"] .u-avatar.av-rose {
  background: #FCECEE;
  color: #A62B39;
}

html[data-theme="light"] .u-avatar.av-violet {
  background: #F2EEFD;
  color: #5B3BB2;
}

/* Metallic leaderboard rank pills */
.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid var(--line);
}

.rank-1 {
  background: linear-gradient(180deg, rgba(235, 188, 86, 0.24), rgba(217, 155, 56, 0.10));
  color: #F5CF7E;
  border-color: rgba(235, 188, 86, 0.38);
}

.rank-2 {
  background: linear-gradient(180deg, rgba(208, 214, 226, 0.20), rgba(160, 168, 184, 0.08));
  color: #DCE1EB;
  border-color: rgba(208, 214, 226, 0.32);
}

.rank-3 {
  background: linear-gradient(180deg, rgba(205, 138, 92, 0.22), rgba(176, 110, 68, 0.09));
  color: #E8AE84;
  border-color: rgba(205, 138, 92, 0.34);
}

.rank-n {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

html[data-theme="light"] .rank-1 {
  color: #8F5C0E;
  background: #FDF3DF;
  border-color: #EBC87F;
}

html[data-theme="light"] .rank-2 {
  color: #3D4352;
  background: #EEF0F5;
  border-color: #CFD5E2;
}

html[data-theme="light"] .rank-3 {
  color: #82441C;
  background: #FBECE2;
  border-color: #E4B89B;
}

html[data-theme="light"] .rank-n {
  color: #5C616E;
  background: #F3F4F8;
  border-color: #E2E5EE;
}

/* Burn-rate forecast pill */
.burn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.burn-pill.burn-warm {
  background: rgba(217, 155, 56, 0.13);
  color: var(--warn-text);
  border-color: rgba(217, 155, 56, 0.28);
}

.burn-pill.burn-hot {
  background: rgba(223, 88, 105, 0.15);
  color: var(--bad-text);
  border-color: rgba(223, 88, 105, 0.32);
}

html[data-theme="light"] .burn-pill {
  background: #F2F4F8;
  border-color: #DCE0EA;
  color: #4A4F5C;
}

html[data-theme="light"] .burn-pill.burn-warm {
  background: #FDF3DF;
  border-color: #EBC87F;
  color: #8F5C0E;
}

html[data-theme="light"] .burn-pill.burn-hot {
  background: #FCECEE;
  border-color: #F0B6BE;
  color: #A62B39;
}

/* 12-week GitHub/Linear activity heatmap */
.hm-cell {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 120ms var(--ease), border-color 120ms var(--ease);
}

.hm-cell:hover {
  transform: scale(1.22);
  border-color: rgba(255, 255, 255, 0.38);
  z-index: 2;
}

.hm-l-1 {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}

.hm-l0 {
  background: rgba(255, 255, 255, 0.04);
}

.hm-l1 {
  background: rgba(52, 178, 123, 0.22);
  border-color: rgba(52, 178, 123, 0.25);
}

.hm-l2 {
  background: rgba(52, 178, 123, 0.42);
  border-color: rgba(52, 178, 123, 0.38);
}

.hm-l3 {
  background: rgba(52, 178, 123, 0.68);
  border-color: rgba(52, 178, 123, 0.55);
}

.hm-l4 {
  background: #34B27B;
  border-color: #55C595;
  box-shadow: 0 0 8px rgba(52, 178, 123, 0.28);
}

.hm-nw {
  background: rgba(217, 155, 56, 0.14);
  border-color: rgba(217, 155, 56, 0.26);
}

html[data-theme="light"] .hm-l0 {
  background: #ECEEF4;
  border-color: rgba(20, 21, 26, 0.05);
}

html[data-theme="light"] .hm-l1 {
  background: #C5EEDB;
  border-color: #A6E3C6;
}

html[data-theme="light"] .hm-l2 {
  background: #8ADBB6;
  border-color: #6DCE9F;
}

html[data-theme="light"] .hm-l3 {
  background: #4AC38D;
  border-color: #35AE78;
}

html[data-theme="light"] .hm-l4 {
  background: #229A65;
  border-color: #1A7F52;
  box-shadow: none;
}

html[data-theme="light"] .hm-nw {
  background: #FBE9C6;
  border-color: #E8C584;
}

/* Privacy / Streamer mode (Alt+H or topbar eye button) */
html.privacy-mode .stat-num,
html.privacy-mode .priv-blur,
html.privacy-mode .tbl td.num,
html.privacy-mode .sensitive {
  filter: blur(6px);
  transition: filter 160ms var(--ease);
  user-select: none;
}

html.privacy-mode .stat-num:hover,
html.privacy-mode .priv-blur:hover,
html.privacy-mode .tbl td.num:hover,
html.privacy-mode .sensitive:hover {
  filter: blur(0);
}

/* Slide-over Quick-Drawer (Top Z-Layer + blur(16px)) */
.drawer-back {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(4, 5, 10, 0.72);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  display: flex;
  justify-content: flex-end;
}

.drawer-panel {
  width: 100%;
  max-width: 28.5rem;
  height: 100%;
  background: linear-gradient(180deg, rgba(22, 24, 34, 0.95) 0%, rgba(14, 15, 22, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.12),
    -28px 0 72px rgba(0, 0, 0, 0.85),
    -8px 0 24px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawerIn 220ms var(--ease);
}

@keyframes drawerIn {
  from {
    transform: translate3d(100%, 0, 0);
    opacity: 0.75;
  }

  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

html[data-theme="light"] .drawer-back {
  background: rgba(20, 24, 45, 0.34);
}

html[data-theme="light"] .drawer-panel {
  background: rgba(255, 255, 255, 0.96);
  border-left-color: rgba(20, 21, 26, 0.12);
  box-shadow: -24px 0 60px rgba(20, 21, 26, 0.18);
}

/* Floating Linear Bulk Action Bar (Top Z-Layer + blur(16px)) */
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 1.35rem;
  transform: translateX(-50%);
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.7rem 0.5rem 0.95rem;
  border-radius: 12px;
  background: rgba(22, 24, 35, 0.9);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 56px -8px rgba(0, 0, 0, 0.85),
    0 8px 20px -4px rgba(0, 0, 0, 0.65);
  animation: bulkUp 180ms var(--ease);
}

@keyframes bulkUp {
  from {
    transform: translate(-50%, 14px);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

html[data-theme="light"] .bulk-bar {
  background: rgba(24, 26, 38, 0.92);
  color: #ECEEF2;
  border-color: rgba(255, 255, 255, 0.18);
}

/* Floating topbar popovers */
.floating-pop {
  z-index: 75;
  background: linear-gradient(172deg, rgba(26, 28, 40, 0.94) 0%, rgba(16, 17, 25, 0.97) 100%) !important;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 28px 64px -10px rgba(0, 0, 0, 0.88),
    0 10px 24px -6px rgba(0, 0, 0, 0.7) !important;
}

html[data-theme="light"] .floating-pop {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(20, 21, 26, 0.12) !important;
  box-shadow: inset 0 1px 0 #FFFFFF, 0 24px 54px -12px rgba(20, 24, 40, 0.22) !important;
}

/* 6-box OTP input & password meter */
.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.otp-cell {
  height: 3.35rem;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  outline: none;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease), background 140ms var(--ease);
}

.otp-cell:focus {
  border-color: var(--accent-hi);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.22);
}

.pw-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 6px;
}

.pw-bars>i {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 150ms var(--ease);
}

html[data-theme="light"] .pw-bars>i {
  background: rgba(20, 21, 26, 0.10);
}

/* Auth left showcase coordinate grid & floating preview cards */
.auth-side {
  position: relative;
  overflow: hidden;
}

.auth-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 22% 18%, rgba(94, 106, 210, 0.16), transparent 52%),
    radial-gradient(circle at 80% 82%, rgba(52, 178, 123, 0.09), transparent 48%),
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 22px 22px;
  mask-image: radial-gradient(ellipse at 45% 45%, #000 55%, transparent 95%);
}

.auth-mock {
  border-radius: 10px;
  background: rgba(17, 17, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
}

/* KPI mini-sparkline */
.kpi-spark {
  width: 76px;
  height: 26px;
  overflow: visible;
  flex-shrink: 0;
}

.kpi-spark polyline {
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Subtle toast countdown bar */
.toast {
  position: relative;
  overflow: hidden;
}

.toast::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--tc, var(--accent));
  opacity: 0.55;
  transform-origin: left center;
  animation: toastBar var(--ms, 4500ms) linear forwards;
}

@keyframes toastBar {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

/* ==================== Linear v8: 3D Tilt, Specular Glare, Auth Isometric Rig, Metallic Brand & Digital Pass ==================== */

/* 1. Volumetric Brand Mark with Diagonal Shimmer */
.tsl-mark {
  position: relative;
  overflow: hidden;
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.tsl-mark::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.34) 50%, transparent 64%);
  transform: translateX(-120%) rotate(12deg);
  transition: transform 520ms var(--ease);
  pointer-events: none;
}

a:hover .tsl-mark,
.tsl-mark:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 18px rgba(94, 106, 210, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

a:hover .tsl-mark::after,
.tsl-mark:hover::after {
  transform: translateX(120%) rotate(12deg);
}

/* 2. Hardware-accelerated Z-Elevation + .tilt-card 3D Tilt & Specular Cursor Glare
      (transform: none at rest -> 100% crisp ClearType text & zero idle GPU layer overhead;
       zero-latency transform updates during pointermove -> butter-smooth 60/120 FPS) */
.tilt-card,
.kpi,
.anketa-card,
.anketa-plate,
.step-plate,
.team-tile {
  position: relative;
  transform: none;
  transition: transform 240ms var(--ease), border-color var(--t-ui), background var(--t-ui), box-shadow var(--t-ui);
}

.kpi:hover {
  border-color: rgba(168, 176, 250, 0.28);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 0 rgba(0, 0, 0, 0.72),
    0 10px 22px -4px rgba(0, 0, 0, 0.68),
    0 24px 48px -12px rgba(0, 0, 0, 0.82);
}

.kpi.is-tilting {
  transition: border-color var(--t-ui), background var(--t-ui), box-shadow var(--t-ui);
  transform: perspective(1050px) translateY(-2px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: rgba(168, 176, 250, 0.28);
}

.tilt-card:not(.kpi).is-tilting,
.anketa-card.is-tilting,
.anketa-plate.is-tilting,
.step-plate.is-tilting,
.team-tile.is-tilting {
  transition: border-color var(--t-ui), background var(--t-ui), box-shadow var(--t-ui);
  transform: perspective(1000px) translateY(-1.5px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: rgba(168, 176, 250, 0.26);
}

html[data-theme="light"] .kpi.is-tilting,
html[data-theme="light"] .kpi:hover,
html[data-theme="light"] .tilt-card.is-tilting,
html[data-theme="light"] .anketa-card.is-tilting,
html[data-theme="light"] .anketa-plate.is-tilting,
html[data-theme="light"] .step-plate.is-tilting,
html[data-theme="light"] .team-tile.is-tilting {
  border-color: rgba(78, 90, 200, 0.32);
}

html[data-theme="light"] .kpi.is-tilting,
html[data-theme="light"] .kpi:hover {
  box-shadow:
    inset 0 1px 0 0 #FFFFFF,
    0 8px 18px -6px rgba(20, 24, 40, 0.09),
    0 18px 34px -12px rgba(45, 55, 115, 0.14);
}

/* Cursor-tracked Specular Glare Overlay (clipped to card radius without flattening preserve-3d) */
.tilt-card::before,
.kpi::before,
.anketa-card::before,
.anketa-plate::before,
.step-plate::before,
.team-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 220ms var(--ease);
  background: radial-gradient(290px circle at var(--gx, 50%) var(--gy, 15%),
      rgba(255, 255, 255, 0.135),
      rgba(130, 140, 242, 0.065) 38%,
      transparent 72%);
}

html[data-theme="light"] .tilt-card::before,
html[data-theme="light"] .kpi::before,
html[data-theme="light"] .anketa-card::before,
html[data-theme="light"] .anketa-plate::before,
html[data-theme="light"] .step-plate::before,
html[data-theme="light"] .team-tile::before {
  background: radial-gradient(280px circle at var(--gx, 50%) var(--gy, 15%),
      rgba(94, 106, 210, 0.11),
      transparent 70%);
}

.tilt-card.is-tilting::before,
.kpi.is-tilting::before,
.anketa-card.is-tilting::before,
.anketa-plate.is-tilting::before,
.step-plate.is-tilting::before,
.team-tile.is-tilting::before {
  opacity: 1;
}

/* Sculpted 3D Glass Checklist Plates (.step-plate) */
.step-plate {
  border-radius: 11px;
  padding: 0.72rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background:
    radial-gradient(115% 100% at 0% 0%, var(--sp-glow, rgba(124, 134, 232, 0.13)), transparent 62%),
    linear-gradient(172deg, rgba(28, 30, 42, 0.88) 0%, rgba(16, 17, 24, 0.94) 100%);
  border: 1px solid var(--sp-line, rgba(124, 134, 232, 0.28));
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.16),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.65),
    0 8px 20px -6px rgba(0, 0, 0, 0.68);
}

.step-plate.sp-ok {
  --sp-glow: rgba(52, 178, 123, 0.14);
  --sp-line: rgba(52, 178, 123, 0.28);
}

.step-plate.sp-warn {
  --sp-glow: rgba(217, 155, 56, 0.15);
  --sp-line: rgba(217, 155, 56, 0.34);
}

.step-plate.sp-act {
  --sp-glow: rgba(124, 134, 232, 0.18);
  --sp-line: rgba(124, 134, 232, 0.38);
}

.step-plate.clickable {
  cursor: pointer;
}

.step-plate.clickable:active {
  transform: translateY(1px) scale(0.992);
}

.step-plate .orb-3d {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 10px -2px rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] .step-plate {
  background: linear-gradient(180deg, #FFFFFF 0%, #F6F8FD 100%);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 6px 16px -6px rgba(20, 24, 40, 0.1);
}

/* Sculpted 3D Glass Anketa Plates (.anketa-plate & .anketa-card) */
.anketa-plate,
.anketa-card {
  border-radius: 11px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(124, 134, 232, 0.085), transparent 58%),
    linear-gradient(172deg, #191B26 0%, #12131A 60%, #0E0F15 100%);
  border: 1px solid rgba(255, 255, 255, 0.105);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.65),
    0 6px 14px -4px rgba(0, 0, 0, 0.6),
    0 16px 32px -12px rgba(0, 0, 0, 0.72);
}

.anketa-plate:hover,
.anketa-card:hover {
  border-color: rgba(158, 166, 242, 0.26);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    inset 0 -1.5px 0 0 rgba(0, 0, 0, 0.7),
    0 12px 28px -6px rgba(0, 0, 0, 0.78);
}

.anketa-plate .bank-emblem {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 14px -4px rgba(0, 0, 0, 0.65);
}

html[data-theme="light"] .anketa-plate,
html[data-theme="light"] .anketa-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFE 100%);
  border-color: rgba(20, 21, 26, 0.095);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 8px 20px -8px rgba(20, 24, 40, 0.11);
}

/* Recessed 3D Chart Viewport (.chart-stage-3d) */
.chart-stage-3d {
  position: relative;
  border-radius: 11px;
  padding: 0.75rem 0.75rem 0.45rem;
  background:
    radial-gradient(85% 95% at 50% 0%, rgba(94, 106, 210, 0.11), transparent 72%),
    linear-gradient(180deg, rgba(7, 8, 12, 0.78) 0%, rgba(12, 13, 19, 0.48) 100%);
  border: 1px solid rgba(255, 255, 255, 0.065);
  box-shadow:
    inset 0 3px 10px rgba(0, 0, 0, 0.68),
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.chart-stage-3d::before {
  content: "";
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -18px;
  height: 92px;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(124, 134, 232, 0.085) 1px, transparent 1px),
    linear-gradient(to top, rgba(124, 134, 232, 0.085) 1px, transparent 1px);
  background-size: 32px 22px;
  transform: perspective(260px) rotateX(62deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 92%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 92%);
}

.chart-stage-3d>canvas {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .chart-stage-3d {
  background:
    radial-gradient(85% 95% at 50% 0%, rgba(94, 106, 210, 0.07), transparent 72%),
    linear-gradient(180deg, #F2F4FA 0%, #FAFBFD 100%);
  border-color: rgba(20, 21, 26, 0.075);
  box-shadow: inset 0 2px 6px rgba(20, 24, 40, 0.06), 0 1px 0 #FFFFFF;
}

@media (max-width: 767px) {
  .kpi-stage {
    perspective: none;
  }

  .kpi,
  .kpi-stage>.kpi,
  .kpi:hover,
  .kpi-stage>.kpi:hover {
    transform: none;
  }
}

/* 3. Isometric 3D Auth Showcase Stage + Canvas Mesh */
.auth-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.78;
}

.auth-stage-3d {
  perspective: 1150px;
  perspective-origin: 50% 45%;
}

.auth-rig {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--stage-rx, 4deg)) rotateY(var(--stage-ry, -6deg));
  transition: transform 120ms linear;
}

.auth-plane-back {
  position: absolute;
  inset: -10px -12px -12px -10px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(94, 106, 210, 0.14), rgba(52, 178, 123, 0.05) 60%, transparent);
  border: 1px solid rgba(140, 149, 238, 0.14);
  transform: translateZ(-20px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.auth-plane-main {
  transform: translateZ(18px);
  background: linear-gradient(180deg, rgba(22, 23, 31, 0.92), rgba(14, 15, 21, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 22px 48px -10px rgba(0, 0, 0, 0.72);
}

.auth-plane-mid {
  transform: translateZ(34px);
  background: linear-gradient(180deg, rgba(24, 25, 35, 0.94), rgba(16, 17, 24, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 24px 48px -8px rgba(0, 0, 0, 0.75);
}

.auth-plane-front {
  transform: translateZ(50px);
  background: linear-gradient(180deg, rgba(26, 29, 39, 0.95), rgba(16, 18, 26, 0.96));
  border: 1px solid rgba(110, 231, 183, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 28px 54px -8px rgba(0, 0, 0, 0.8);
}

/* 4. Interactive 3D Digital Member Pass in /profile */
.digital-pass {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(94, 106, 210, 0.18), transparent 55%),
    radial-gradient(100% 90% at 100% 100%, rgba(52, 178, 123, 0.10), transparent 55%),
    linear-gradient(165deg, #1A1C26 0%, #111218 55%, #0D0E13 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 18px 44px -12px rgba(0, 0, 0, 0.72);
  transform: none;
  transition: transform 260ms var(--ease), border-color 200ms var(--ease), box-shadow 260ms var(--ease);
}

.digital-pass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: linear-gradient(135deg, #000 10%, transparent 70%);
  -webkit-mask-image: linear-gradient(135deg, #000 10%, transparent 70%);
}

.digital-pass.is-tilting {
  transition: border-color 200ms var(--ease);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: rgba(158, 166, 242, 0.36);
}

.digital-pass .pass-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 220ms var(--ease);
  background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 20%),
      rgba(255, 255, 255, 0.14),
      rgba(124, 134, 232, 0.08) 38%,
      rgba(52, 178, 123, 0.04) 60%,
      transparent 78%);
}

.digital-pass.is-tilting .pass-glare {
  opacity: 1;
}

html[data-theme="light"] .digital-pass {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(94, 106, 210, 0.12), transparent 55%),
    linear-gradient(165deg, #FFFFFF 0%, #F4F6FC 100%);
  border-color: rgba(78, 90, 192, 0.22);
  box-shadow:
    inset 0 1px 0 #FFFFFF,
    0 14px 34px -12px rgba(20, 24, 40, 0.14);
}

/* ==================== Linear v10 Flagship: View Transitions, 3D Bank Card, 3D Podium, Margin Funnel ==================== */

/* 1. Native View Transitions API + Top Laser Navigation Beam */
@view-transition {
  navigation: auto;
}

@media (min-width: 1024px) {
  #sidebar {
    view-transition-name: tsl-sidebar;
  }

  .top-bar {
    view-transition-name: tsl-topbar;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 135ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link.active::before {
  box-shadow: 0 0 10px rgba(124, 134, 232, 0.85);
}

.nav-laser {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 120;
  pointer-events: none;
  background: linear-gradient(90deg, #5E6AD2 0%, #8C96FA 55%, #38C288 100%);
  box-shadow: 0 0 12px rgba(124, 134, 232, 0.85), 0 0 4px rgba(56, 194, 136, 0.6);
  opacity: 0;
  transition: width 360ms var(--ease), opacity 180ms ease;
}

.nav-laser.active {
  width: 78%;
  opacity: 1;
}

.nav-laser.done {
  width: 100%;
  opacity: 0;
  transition: width 120ms ease, opacity 220ms ease 80ms;
}

/* 2. Topbar Live Rate & Spread Pulse Capsule */
.rate-pulse-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(24, 26, 38, 0.85) 0%, rgba(14, 15, 22, 0.92) 100%);
  border: 1px solid rgba(124, 134, 232, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px -4px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: border-color var(--t-ui), transform var(--t-ui), box-shadow var(--t-ui);
}

.rate-pulse-pill:hover {
  border-color: rgba(158, 166, 242, 0.48);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px -6px rgba(94, 106, 210, 0.35);
}

html[data-theme="light"] .rate-pulse-pill {
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F6FC 100%);
  border-color: rgba(78, 90, 200, 0.22);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 3px 10px -4px rgba(20, 24, 40, 0.1);
}

/* 3. Physical 3D Metal Bank Card (.bank-card-3d) for /anketa/{id} */
.bank-card-3d {
  position: relative;
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  min-height: 12.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #F4F6FB;
  background:
    radial-gradient(125% 100% at 0% 0%, var(--bc-glow, rgba(124, 134, 232, 0.32)), transparent 58%),
    radial-gradient(95% 95% at 100% 100%, var(--bc-glow2, rgba(52, 178, 123, 0.14)), transparent 58%),
    linear-gradient(155deg, var(--bc-top, #1D2030) 0%, var(--bc-mid, #12141E) 55%, var(--bc-bot, #0B0C12) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.26),
    inset 0 -2px 0 0 rgba(0, 0, 0, 0.72),
    0 12px 26px -6px rgba(0, 0, 0, 0.72),
    0 28px 60px -14px rgba(0, 0, 0, 0.88);
  transform: none;
  transition: transform 260ms var(--ease), border-color 200ms var(--ease), box-shadow 260ms var(--ease);
}

.bank-card-3d.skin-mono {
  --bc-glow: rgba(255, 255, 255, 0.16);
  --bc-glow2: rgba(124, 134, 232, 0.14);
  --bc-top: #23252C;
  --bc-mid: #131418;
  --bc-bot: #090A0D;
}

.bank-card-3d.skin-emerald {
  --bc-glow: rgba(52, 178, 123, 0.34);
  --bc-glow2: rgba(16, 185, 129, 0.14);
  --bc-top: #152922;
  --bc-mid: #0E1B17;
  --bc-bot: #09110E;
}

.bank-card-3d.skin-sapphire {
  --bc-glow: rgba(66, 135, 245, 0.34);
  --bc-glow2: rgba(94, 106, 210, 0.18);
  --bc-top: #162338;
  --bc-mid: #0F1726;
  --bc-bot: #090E18;
}

.bank-card-3d.skin-ruby {
  --bc-glow: rgba(223, 88, 105, 0.32);
  --bc-glow2: rgba(217, 155, 56, 0.14);
  --bc-top: #2B1720;
  --bc-mid: #1A1016;
  --bc-bot: #0E090C;
}

.bank-card-3d.skin-amber {
  --bc-glow: rgba(235, 180, 72, 0.30);
  --bc-glow2: rgba(94, 106, 210, 0.12);
  --bc-top: #292215;
  --bc-mid: #19150E;
  --bc-bot: #0E0C08;
}

.bank-card-3d::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.28;
  background-image: repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 5px);
}

.bank-card-3d.is-tilting {
  transition: border-color 200ms var(--ease);
  transform: perspective(950px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: rgba(255, 255, 255, 0.32);
}

.bank-card-3d .card-foil {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 220ms var(--ease);
  background: radial-gradient(310px circle at var(--gx, 50%) var(--gy, 25%),
      rgba(255, 255, 255, 0.2),
      rgba(140, 155, 255, 0.10) 36%,
      rgba(52, 178, 123, 0.06) 58%,
      transparent 76%);
}

.bank-card-3d.is-tilting .card-foil {
  opacity: 1;
}

.bank-card-3d .z-layer-1 {
  position: relative;
  z-index: 3;
}

.bank-card-3d .z-layer-2 {
  position: relative;
  z-index: 3;
}

.emv-chip {
  width: 2.35rem;
  height: 1.75rem;
  border-radius: 6px;
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(135deg, #E8CFA0 0%, #B89658 48%, #F2DFB6 100%);
  border: 1px solid rgba(255, 245, 215, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 8px rgba(0, 0, 0, 0.5);
}

.emv-chip::before {
  content: "";
  position: absolute;
  inset: 4px 6px;
  border-radius: 3px;
  border: 1px solid rgba(85, 60, 20, 0.38);
  background: linear-gradient(90deg, transparent 46%, rgba(85, 60, 20, 0.35) 48%, transparent 52%);
}

/* 4. Stepped 3D Top-3 Leaderboard Podium (.podium-stage) */
.podium-stage {
  position: relative;
}

.podium-card {
  position: relative;
  border-radius: 13px;
  padding: 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(170deg, #1B1D28 0%, #12131A 60%, #0D0E14 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.7),
    0 16px 36px -10px rgba(0, 0, 0, 0.8);
}

.podium-card.podium-1 {
  background:
    radial-gradient(125% 95% at 50% 0%, rgba(235, 188, 86, 0.20), transparent 60%),
    linear-gradient(170deg, #221F1A 0%, #14141B 58%, #0E0F15 100%);
  border-color: rgba(235, 188, 86, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 175, 0.32),
    inset 0 -2px 0 rgba(0, 0, 0, 0.75),
    0 24px 54px -10px rgba(0, 0, 0, 0.88),
    0 20px 48px -16px rgba(217, 155, 56, 0.25);
}

.podium-card.podium-2 {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(208, 216, 232, 0.15), transparent 58%),
    linear-gradient(170deg, #1C1E28 0%, #12141B 100%);
  border-color: rgba(208, 216, 232, 0.26);
}

.podium-card.podium-3 {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(205, 138, 92, 0.16), transparent 58%),
    linear-gradient(170deg, #201A19 0%, #12131A 100%);
  border-color: rgba(205, 138, 92, 0.28);
}

@media (min-width: 640px) {
  .podium-stage .podium-2 {
    order: 1;
    min-height: 9.8rem;
  }

  .podium-stage .podium-1 {
    order: 2;
    min-height: 11.4rem;
    transform: translateY(-6px);
  }

  .podium-stage .podium-1.is-tilting {
    transform: perspective(1000px) translateY(-8px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  }

  .podium-stage .podium-3 {
    order: 3;
    min-height: 9.2rem;
  }
}

html[data-theme="light"] .podium-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F9FD 100%);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 12px 28px -10px rgba(20, 24, 40, 0.12);
}

html[data-theme="light"] .podium-card.podium-1 {
  background: radial-gradient(120% 90% at 50% 0%, rgba(235, 188, 86, 0.16), transparent 60%), #FFFFFF;
  border-color: rgba(217, 155, 56, 0.45);
}

/* 5. Sculpted 3D Unit-Economics & Margin Funnel Bar (.margin-bar-3d) */
.margin-bar-3d {
  height: 11px;
  border-radius: 999px;
  padding: 1.5px;
  display: flex;
  gap: 2px;
  overflow: hidden;
  background: rgba(5, 6, 10, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.065);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.05);
}

.margin-bar-3d>i {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 4px;
  transition: width 600ms var(--ease);
}

.margin-bar-3d>i.seg-net {
  background: linear-gradient(90deg, #269B68, #55C595);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 0 10px rgba(52, 178, 123, 0.42);
}

.margin-bar-3d>i.seg-sal {
  background: linear-gradient(90deg, #5662CC, #8690F0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 0 10px rgba(110, 120, 229, 0.4);
}

.margin-bar-3d>i.seg-exp {
  background: linear-gradient(90deg, #C75162, #EA808D);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 8px rgba(223, 88, 105, 0.35);
}

html[data-theme="light"] .margin-bar-3d {
  background: #E8ECF4;
  border-color: rgba(20, 21, 26, 0.08);
  box-shadow: inset 0 1.5px 3px rgba(20, 24, 40, 0.09);
}

@media (prefers-reduced-motion: reduce) {

  .tilt-card,
  .kpi,
  .anketa-card,
  .anketa-plate,
  .step-plate,
  .team-tile,
  .digital-pass,
  .bank-card-3d,
  .podium-card,
  .auth-rig {
    transform: none !important;
    transition: none !important;
  }
}