/* ============================================
   DATUM — Design System v2
   ============================================ */

:root {
  --bg:        #070707;
  --bg-2:      #0d0d0d;
  --bg-3:      #131313;
  --bg-4:      #191919;
  --bg-5:      #1f1f1f;
  --border:    #1c1c1c;
  --border-2:  #282828;
  --border-3:  #353535;
  --text:      #f0f0f0;
  --text-2:    #8a8a8a;
  --text-3:    #474747;
  --accent:    #e8ff00;
  --accent-dim: rgba(232, 255, 0, 0.08);
  --accent-border: rgba(232, 255, 0, 0.2);
  --accent-2:  #00ffcc;
  --accent-2-dim: rgba(0, 255, 204, 0.07);
  --red:       #ff4444;
  --blue:      #4a8fff;
  --purple:    #a066ff;
  --orange:    #ff8844;
  --radius:    8px;
  --radius-lg: 12px;
  --font:      'Syne', sans-serif;
  --mono:      'JetBrains Mono', monospace;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 100% 60% at 50% 0%,
    rgba(232, 255, 0, 0.025) 0%, transparent 55%);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

/* ── HEADER ────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 7, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-mark {
  width: 26px;
  height: 26px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: #000;
  box-shadow: 0 0 16px rgba(232, 255, 0, 0.35);
  flex-shrink: 0;
  letter-spacing: 0;
}

.logo-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}

.nav-link {
  color: var(--text-3);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 6px;
  transition: all 0.18s var(--ease);
}

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

.nav-link.active {
  color: var(--text);
  background: var(--bg-5);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.45; transform: scale(0.8); }
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 7px 15px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.btn-primary:hover {
  background: #f0ff33;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(232, 255, 0, 0.28);
}

.btn-primary:active { transform: translateY(0); box-shadow: none; }

/* ── HERO ──────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.6;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black 25%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, black 25%, transparent 100%);
}

.glow { position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; }

.glow-1 {
  width: 900px; height: 500px;
  background: radial-gradient(ellipse, rgba(232, 255, 0, 0.055) 0%, transparent 70%);
  top: 5%; left: 50%;
  transform: translateX(-50%);
}

.glow-2 {
  width: 500px; height: 350px;
  background: radial-gradient(ellipse, rgba(0, 255, 204, 0.045) 0%, transparent 70%);
  bottom: 15%; right: 6%;
}

.glow-3 {
  width: 350px; height: 250px;
  background: radial-gradient(ellipse, rgba(74, 143, 255, 0.035) 0%, transparent 70%);
  top: 30%; left: 4%;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 5rem 2rem 4rem;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  border: 1px solid rgba(232, 255, 0, 0.22);
  background: rgba(232, 255, 0, 0.04);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 2rem;
  text-transform: uppercase;
  animation: fadeInDown 0.5s ease both;
}

.hero-badge::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  animation: fadeInDown 0.5s 0.08s ease both;
}

.hero-title .accent {
  background: linear-gradient(130deg, #e8ff00 0%, #c8ee00 50%, #a0cc00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.5s 0.15s ease both;
}

.hero-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.5s 0.2s ease both;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}

.feature-tag-sep { color: var(--border-3); font-size: 1rem; line-height: 1; }

/* ── DROPZONE ──────────────────────────────── */
.dropzone {
  background: linear-gradient(160deg, rgba(255,255,255,0.015) 0%, transparent 60%), var(--bg-2);
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2rem;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  animation: fadeInDown 0.5s 0.25s ease both;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.dropzone::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(232, 255, 0, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: rgba(232, 255, 0, 0.45);
  border-style: solid;
}

.dropzone:hover::after, .dropzone.drag-over::after { opacity: 1; }

.dropzone.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 50px rgba(232, 255, 0, 0.08), inset 0 0 50px rgba(232, 255, 0, 0.02);
  transform: scale(1.006);
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.drop-icon {
  width: 54px; height: 54px;
  background: rgba(232, 255, 0, 0.06);
  border: 1px solid rgba(232, 255, 0, 0.14);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  animation: float 3.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}

.drop-title { font-size: 1rem; font-weight: 700; color: var(--text); }

.drop-sub { font-size: 0.84rem; color: var(--text-3); }

.file-label {
  color: var(--accent);
  cursor: pointer;
  pointer-events: all;
  font-weight: 600;
  text-decoration-line: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(232, 255, 0, 0.4);
}

.drop-formats { display: flex; gap: 6px; margin-top: 4px; }

.format-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-3);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-3);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  animation: fadeInDown 0.5s 0.35s ease both;
}

.btn-ghost:hover {
  border-color: var(--border-3);
  color: var(--text-2);
  background: var(--bg-3);
}

/* ── DASHBOARD ─────────────────────────────── */
.dashboard {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 2rem 5rem;
  animation: dashIn 0.4s var(--ease) both;
}

@keyframes dashIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dashboard.hidden { display: none; }
.hero.hidden      { display: none; }

/* ── TOOLBAR ───────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  gap: 1rem;
  background: var(--bg-2);
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.file-info { display: flex; align-items: center; gap: 0.625rem; }

.file-icon {
  width: 28px; height: 28px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.file-name {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}

.file-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-3);
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-3);
  padding: 5px 11px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.73rem;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.tool-btn:hover {
  border-color: var(--border-2);
  color: var(--text-2);
  background: var(--bg-3);
  transform: translateY(-1px);
}

/* ── STATS BAR ─────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
}

.stat-item {
  background: var(--bg-2);
  padding: 1.125rem 1.25rem;
  transition: background 0.18s var(--ease);
  position: relative;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s var(--ease);
}

.stat-item:hover { background: var(--bg-3); }
.stat-item:hover::before { background: rgba(255,255,255,0.06); }

.stat-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-value.accent { color: var(--accent); text-shadow: 0 0 24px rgba(232,255,0,0.2); }
.stat-value.cyan   { color: var(--accent-2); text-shadow: 0 0 20px rgba(0,255,204,0.18); }
.stat-value.blue   { color: var(--blue); }
.stat-value.purple { color: var(--purple); }

/* ── CHART CONTROLS ────────────────────────── */
.chart-controls {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  margin-bottom: 1rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 1px;
  background: var(--border-3);
  flex-shrink: 0;
}

.chart-type-tabs {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-bottom: 1.125rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
}

.chart-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-3);
  padding: 7px 14px;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.chart-tab:hover { color: var(--text-2); background: var(--bg-3); }

.chart-tab.active {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(232, 255, 0, 0.22), 0 1px 3px rgba(0,0,0,0.4);
}

.axis-config {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.axis-select-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 160px;
  flex: 1;
  max-width: 250px;
}

.axis-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.axis-select {
  background: var(--bg);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 8px 32px 8px 11px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.78rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23474747' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.18s var(--ease);
}

.axis-select:focus { border-color: rgba(232, 255, 0, 0.38); outline: none; }

.btn-apply {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  height: 37px;
  box-shadow: 0 2px 10px rgba(232, 255, 0, 0.12);
}

.btn-apply:hover {
  background: #f0ff33;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(232, 255, 0, 0.28);
}

/* ── CHARTS GRID ───────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.chart-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.22s var(--ease);
}

.chart-card:hover { border-color: var(--border-2); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.125rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

.card-actions { display: flex; gap: 5px; }

.icon-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-3);
  width: 26px; height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s var(--ease);
}

.icon-btn:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-dim);
}

.chart-wrapper {
  padding: 1.25rem;
  height: 295px;
  position: relative;
}

.chart-wrapper canvas { max-height: 100%; }

/* ── DATA TABLE ────────────────────────────── */
.table-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.125rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 9px;
  color: var(--text-3);
  pointer-events: none;
  display: flex;
}

.search-input {
  background: var(--bg);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 6px 12px 6px 30px;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.74rem;
  outline: none;
  width: 190px;
  transition: all 0.2s var(--ease);
}

.search-input:focus {
  border-color: rgba(232, 255, 0, 0.32);
  width: 230px;
}

.search-input::placeholder { color: var(--text-3); }

.row-count {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-3);
  white-space: nowrap;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 4px;
}

.table-wrapper {
  overflow-x: auto;
  max-height: 370px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.data-table th {
  background: var(--bg-3);
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.6rem;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s var(--ease);
}

.data-table th:hover { color: var(--text-2); }
.data-table th.sorted { color: var(--accent); }

.data-table td {
  padding: 7.5px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.022);
  color: var(--text-2);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s, color 0.12s;
}

.data-table td.numeric {
  color: var(--accent-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.01);
}

.data-table tr:hover td {
  background: rgba(255,255,255,0.038) !important;
  color: var(--text);
}

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

/* ── PAGINATION ────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.page-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-3);
  min-width: 30px;
  height: 30px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  transition: all 0.15s var(--ease);
}

.page-btn:hover {
  color: var(--text);
  background: var(--bg-4);
  border-color: var(--border);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(232, 255, 0, 0.22);
}

/* ── STATS CARDS ───────────────────────────── */
.stats-section { margin-bottom: 2rem; }

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.875rem;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.125rem;
  transition: all 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,255,0,0.28), transparent);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}

.stat-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.stat-card:hover::before { opacity: 1; }

.stat-card-col {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.875rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid rgba(232, 255, 0, 0.1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  padding: 1px 0;
}

.stat-row-label { color: var(--text-3); font-family: var(--mono); }
.stat-row-value { color: var(--text); font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }

.stat-progress {
  margin-top: 0.875rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.stat-progress-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--text-3);
  margin-bottom: 5px;
  letter-spacing: 0.04em;
}

.stat-progress-track {
  height: 3px;
  background: var(--bg-4);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.stat-progress-mean {
  position: absolute;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2) 0%, var(--accent) 100%);
  border-radius: 2px;
  transition: width 0.7s var(--ease);
}

/* ── TOAST ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(25, 25, 25, 0.95);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-family: var(--mono);
  z-index: 9999;
  transform: translateY(10px) scale(0.97);
  opacity: 0;
  transition: all 0.22s var(--ease);
  pointer-events: none;
  max-width: 300px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.toast.show  { transform: translateY(0) scale(1); opacity: 1; }
.toast.success { border-color: rgba(0, 255, 204, 0.22); }
.toast.error   { border-color: rgba(255, 68, 68, 0.22); }

/* ── ANIMATIONS ────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── LOADING ───────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 7, 7, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.loader-ring {
  width: 38px; height: 38px;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.loader-text {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.12em;
}

/* ── EMPTY STATE ───────────────────────────── */
.empty-state {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.78rem;
}

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 768px) {
  .header-inner    { padding: 0 1rem; gap: 0.75rem; }
  .nav             { display: none; }
  .status-pill     { display: none; }
  .dashboard       { padding: 1rem 1rem 4rem; }
  .toolbar         { flex-wrap: wrap; }
  .axis-config     { flex-direction: column; align-items: stretch; }
  .axis-select-group { max-width: 100%; }
  .chart-type-tabs { width: 100%; }
  .hero-content    { padding: 3rem 1.25rem; }
  .hero-features   { display: none; }
}

@media (max-width: 480px) {
  .search-input { width: 150px; }
  .search-input:focus { width: 160px; }
  .file-meta { display: none; }
}
