/* ============================================================
   COVANA STUDIO OS · v2 — Ultra-glossy frosted glass design
   Heavy frost, animated glass, hover lifts, gradient borders,
   shimmer effects, magnetic interactions
   ============================================================ */

:root {
  /* Color tokens */
  --bg-0: #040303;
  --bg-1: #0a0706;
  --bg-2: #100c0a;
  --bg-3: #181311;

  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-orange: rgba(255, 122, 26, 0.28);
  --line-orange-hi: rgba(255, 122, 26, 0.6);

  --orange: #ff7a1a;
  --orange-hi: #ffaa3a;
  --orange-warm: #ffd166;
  --orange-deep: #d9591a;
  --orange-glow: rgba(255, 122, 26, 0.55);

  --text-1: #f8f6f3;
  --text-2: rgba(248, 246, 243, 0.78);
  --text-3: rgba(248, 246, 243, 0.52);
  --text-4: rgba(248, 246, 243, 0.32);

  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.18);
  --red: #ff5560;
  --red-soft: rgba(255, 85, 96, 0.16);
  --yellow: #ffd166;
  --yellow-soft: rgba(255, 209, 102, 0.18);
  --blue: #6aa9ff;
  --blue-soft: rgba(106, 169, 255, 0.16);
  --purple: #b88dff;
  --purple-soft: rgba(184, 141, 255, 0.16);

  --font-ui: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  --shadow-glow: 0 0 0 1px rgba(255,122,26,0.25), 0 12px 40px -8px rgba(255,122,26,0.4);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.06) inset, 0 12px 32px -16px rgba(0,0,0,0.85), 0 2px 6px -2px rgba(0,0,0,0.5);
  --shadow-deep: 0 32px 80px -20px rgba(0,0,0,0.95), 0 0 0 1px rgba(255,122,26,0.1);
  --shadow-glass: inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.3), 0 8px 32px -10px rgba(0,0,0,0.6);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Theme specific backgrounds */
  --glass-bg: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.025) 50%, rgba(255,255,255,0.01) 100%), rgba(20,16,14,0.45);
  --glass-soft-bg: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%), rgba(15,12,10,0.5);
  --btn-bg: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.015) 100%);
  --btn-hover: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.03) 100%);
  --input-bg: rgba(0,0,0,0.45);
  --input-focus: rgba(0,0,0,0.6);
  --bg-gradient-1: radial-gradient(circle at center, rgba(255,122,26,0.32) 0%, rgba(255,122,26,0.06) 30%, transparent 60%);
  --bg-gradient-2: radial-gradient(circle at center, rgba(255,170,58,0.18) 0%, rgba(255,170,58,0.03) 35%, transparent 65%);
}

[data-theme="light"] {
  --bg-0: #f4f6f8;
  --bg-1: #ffffff;
  --bg-2: #edf0f3;
  --bg-3: #e2e6ea;

  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.15);

  --text-1: #1a1e23;
  --text-2: #4a5056;
  --text-3: #7b838c;
  --text-4: #a8b0b8;

  --shadow-glass: 0 4px 12px rgba(0,0,0,0.04);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.03);
  --shadow-deep: 0 12px 32px rgba(0,0,0,0.08);

  --glass-bg: #ffffff;
  --glass-soft-bg: rgba(255, 255, 255, 0.8);
  --btn-bg: #ffffff;
  --btn-hover: #f8f9fa;
  --input-bg: #ffffff;
  --input-focus: #ffffff;
  --input-backdrop: none;
  
  --bg-gradient-1: radial-gradient(circle at center, rgba(255,122,26,0.1) 0%, transparent 50%);
  --bg-gradient-2: radial-gradient(circle at center, rgba(255,170,58,0.05) 0%, transparent 50%);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 14px; line-height: 1.5;
  overflow: hidden;
}

#root { height: 100vh; width: 100vw; overflow: hidden; }

/* ============================================================
   AMBIENT BACKGROUND — animated multi-layer glow
   ============================================================ */
.app-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.app-bg::before {
  content: ''; position: absolute;
  top: -25%; left: -15%;
  width: 75vw; height: 75vw;
  background: var(--bg-gradient-1);
  filter: blur(60px);
  animation: drift 24s ease-in-out infinite;
}
.app-bg::after {
  content: ''; position: absolute;
  bottom: -35%; right: -15%;
  width: 80vw; height: 80vw;
  background: var(--bg-gradient-2);
  filter: blur(80px);
  animation: drift2 30s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8vw, 4vh) scale(1.05); }
  66% { transform: translate(-4vw, 8vh) scale(0.95); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6vw, -8vh) scale(1.08); }
}

.app-bg .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 80%);
}
.app-bg .noise {
  position: absolute; inset: 0;
  opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,122,26,0.4); background-clip: padding-box; border: 2px solid transparent; }

/* ============================================================
   GLASS — ULTRA GLOSSY VARIANT
   ============================================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
  box-shadow: var(--shadow-glass);
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--line);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
.glass::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%);
  pointer-events: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  z-index: 0;
}

.glass-soft {
  background: var(--glass-soft-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Animated shimmer overlay for premium cards */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  animation: shimmerSlide 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes shimmerSlide {
  0% { left: -100%; }
  100% { left: 200%; }
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.t-display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.t-mono { font-family: var(--font-mono); }
.t-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-3);
}
.t-num { font-family: var(--font-display); font-feature-settings: 'tnum'; font-variant-numeric: tabular-nums; }

.gradient-text {
  background: linear-gradient(135deg, #ff7a1a 0%, #ffaa3a 50%, #ffd166 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   BUTTONS — glossy with shine
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--btn-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.18s var(--ease-out-expo);
  user-select: none; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
  pointer-events: none; border-radius: inherit;
}
.btn:hover {
  background: var(--btn-hover);
  border-color: var(--line-orange);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px -8px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,122,26,0.15);
}
.btn:active { transform: translateY(0) scale(0.98); }

.btn.primary {
  background: linear-gradient(180deg, #ff9233 0%, #e9651b 100%);
  border: 1px solid rgba(255,255,255,0.22);
  color: #1a0e08;
  font-weight: 600;
  box-shadow:
    0 0 0 1px rgba(255,122,26,0.4),
    0 8px 24px -6px rgba(255,122,26,0.55),
    inset 0 1px 0 rgba(255,255,255,0.4),
    inset 0 -1px 0 rgba(0,0,0,0.15);
}
.btn.primary::before { background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%); }
.btn.primary:hover {
  background: linear-gradient(180deg, #ffaa44 0%, #ff7520 100%);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255,122,26,0.6),
    0 16px 40px -8px rgba(255,122,26,0.75),
    inset 0 1px 0 rgba(255,255,255,0.5),
    inset 0 -1px 0 rgba(0,0,0,0.15);
}

.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); backdrop-filter: none; }
.btn.ghost::before { display: none; }
.btn.ghost:hover { background: rgba(255,255,255,0.06); color: var(--text-1); transform: none; box-shadow: none; }

.btn.danger { background: linear-gradient(180deg, rgba(255,85,96,0.22) 0%, rgba(255,85,96,0.1) 100%); border-color: rgba(255,85,96,0.4); color: #ffb3b8; }
.btn.danger:hover { background: linear-gradient(180deg, rgba(255,85,96,0.32) 0%, rgba(255,85,96,0.18) 100%); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn.icon { padding: 8px; }

/* ============================================================
   FORM FIELDS
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3);
  font-weight: 500;
}
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--input-bg);
  backdrop-filter: var(--input-backdrop, blur(8px));
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: 13px; outline: none;
  transition: all 0.18s var(--ease-out-expo);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--line-orange-hi);
  box-shadow: 0 0 0 3px rgba(255,122,26,0.15), inset 0 1px 0 rgba(255,255,255,0.04);
  background: var(--input-focus);
}
.textarea { resize: vertical; min-height: 70px; font-family: var(--font-ui); }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5L6 7.5L9 4.5' stroke='%23ff7a1a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.select option { background: var(--bg-1); color: var(--text-1); }

/* ============================================================
   PILLS / BADGES
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.05);
  color: var(--text-2);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.pill.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }

.pill.p-1 { background: var(--red-soft); color: #ff8088; border-color: rgba(255,85,96,0.3); }
.pill.p-2 { background: rgba(255,122,26,0.18); color: var(--orange-hi); border-color: rgba(255,122,26,0.35); }
.pill.p-3 { background: var(--yellow-soft); color: var(--yellow); border-color: rgba(255,209,102,0.3); }
.pill.p-4 { background: var(--blue-soft); color: var(--blue); border-color: rgba(106,169,255,0.3); }

.pill.s-tbs { background: rgba(255,255,255,0.06); color: var(--text-2); border-color: var(--line); }
.pill.s-wip { background: rgba(255,122,26,0.18); color: var(--orange-hi); border-color: rgba(255,122,26,0.35); }
.pill.s-wfa { background: var(--purple-soft); color: var(--purple); border-color: rgba(184,141,255,0.3); }
.pill.s-rev { background: var(--yellow-soft); color: var(--yellow); border-color: rgba(255,209,102,0.3); }
.pill.s-don { background: var(--green-soft); color: var(--green); border-color: rgba(74,222,128,0.3); }
.pill.s-hld { background: rgba(255,255,255,0.04); color: var(--text-3); border-color: var(--line); }
.pill.s-lev { background: var(--red-soft); color: #ff8088; border-color: rgba(255,85,96,0.3); }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600; font-size: 12px;
  color: #1a0e08; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 8px -2px rgba(0,0,0,0.5);
  transition: transform 0.2s var(--ease-spring);
}
.avatar:hover { transform: scale(1.06); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 72px; height: 72px; font-size: 22px; }
.avatar .status-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid #0a0706;
  box-shadow: 0 0 8px currentColor;
}
.avatar.sm .status-dot { width: 8px; height: 8px; border-width: 1.5px; }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-shell {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100vh; width: 100vw;
}
.app-main {
  display: flex; flex-direction: column; flex: 1;
  min-height: 0; min-width: 0;
}
.app-content {
  overflow-y: auto; overflow-x: hidden;
  padding: 24px 28px 40px;
  position: relative;
  animation: contentFadeIn 0.4s var(--ease-out-expo);
}
@keyframes contentFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Page header */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 20px;
}
.page-title {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: 28px; letter-spacing: -0.025em;
  display: inline-flex; gap: 12px; align-items: baseline;
}
.page-subtitle { margin: 4px 0 0; font-size: 13px; color: var(--text-3); }

/* ============================================================
   LIFT — universal hover lift for cards / list items
   ============================================================ */
.lift {
  transition: transform 0.22s var(--ease-out-expo), box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}
.lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,122,26,0.18);
  border-color: var(--line-orange) !important;
}
.lift.dragging { opacity: 0.5; transform: rotate(2deg) scale(0.97); }

.drop-target {
  background: rgba(255,122,26,0.06) !important;
  border-color: var(--line-orange-hi) !important;
  box-shadow: inset 0 0 0 1px rgba(255,122,26,0.4), 0 0 24px rgba(255,122,26,0.15);
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi { padding: 16px 18px; }
.kpi-label {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); display: block; margin-bottom: 8px;
}
.kpi-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: 30px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.kpi-delta {
  font-family: var(--font-mono); font-size: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px; padding: 2px 6px; border-radius: 4px;
}
.kpi-delta.up { color: var(--green); background: var(--green-soft); }
.kpi-delta.down { color: #ff8088; background: var(--red-soft); }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 14px; margin: 0;
  display: inline-flex; align-items: center; gap: 8px;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px; overflow: hidden;
  position: relative;
}
.progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-hi) 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255,122,26,0.55);
  transition: width 0.6s var(--ease-out-expo);
  position: relative;
}
.progress > div::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmerSlide 2s linear infinite;
}

/* Sparkline */
.spark { display: block; }

/* ============================================================
   TABLE
   ============================================================ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  text-align: left; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 10px;
  font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  position: sticky; top: 0; z-index: 1;
  backdrop-filter: blur(12px);
}
.table tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background 0.18s ease; }
.table tbody tr:hover { background: rgba(255,122,26,0.04); }

/* ============================================================
   MODAL — heavy frost
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s var(--ease-out-expo);
}
.modal {
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-deep);
  position: relative;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  animation: scaleIn 0.3s var(--ease-out-expo);
  overflow: hidden;
}
.modal::before {
  content: ''; position: absolute; inset: 0;
  border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(255,122,26,0.4), transparent 35%, transparent 65%, rgba(255,122,26,0.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,122,26,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255,122,26,0); }
}

.pulse-dot { animation: pulse 2s ease-in-out infinite; }
.pulse-glow { animation: pulseGlow 2s ease-out infinite; }

/* Drawer */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  z-index: 90;
  animation: fadeIn 0.25s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  background: var(--glass-bg);
  backdrop-filter: blur(40px) saturate(180%);
  border-left: 1px solid var(--line-2);
  z-index: 91;
  box-shadow: -32px 0 80px -20px rgba(0,0,0,0.95);
  animation: slideInRight 0.32s var(--ease-out-expo);
  display: flex; flex-direction: column; overflow: hidden;
}

/* Toast */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 200; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line-orange);
  border-radius: var(--r-md);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; min-width: 280px;
  box-shadow: var(--shadow-deep);
  animation: slideInRight 0.3s var(--ease-spring);
}

/* Empty state */
.empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; color: var(--text-3);
}

/* kbd */
.kbd {
  display: inline-flex; align-items: center;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px; color: var(--text-2);
}

/* Tabs */
.tabs {
  display: flex; gap: 2px;
  background: var(--bg-2);
  backdrop-filter: blur(8px);
  padding: 4px; border-radius: var(--r-sm);
  border: 1px solid var(--line); width: fit-content;
}
.tabs button {
  background: transparent; border: none;
  color: var(--text-3);
  font-family: var(--font-ui); font-size: 12px; font-weight: 500;
  padding: 6px 14px; border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s var(--ease-out-expo);
}
.tabs button:hover { color: var(--text-1); }
.tabs button.active {
  background: linear-gradient(180deg, rgba(255,122,26,0.22) 0%, rgba(255,122,26,0.12) 100%);
  color: var(--orange-hi);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 12px rgba(255,122,26,0.2);
}

/* Divider */
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.divider-v { width: 1px; background: var(--line); }
.spacer { flex: 1; }

/* Magnetic glow ring */
.glow-ring {
  position: relative;
}
.glow-ring::after {
  content: '';
  position: absolute; inset: -1px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 0%, rgba(255,122,26,0.4), transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

/* Stagger animation for list items */
.stagger-in > * {
  opacity: 0;
  animation: slideInUp 0.4s var(--ease-out-expo) forwards;
}
.stagger-in > *:nth-child(1) { animation-delay: 0.02s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.06s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.1s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.14s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.18s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.22s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.26s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.3s; }
.stagger-in > *:nth-child(n+9) { animation-delay: 0.32s; }

/* Magnetic button glow */
.btn.primary { animation: pulseGlow 3s ease-out infinite; }

/* Selectable rows */
.selectable {
  cursor: pointer;
  transition: all 0.18s var(--ease-out-expo);
}
.selectable:hover {
  background: rgba(255,122,26,0.06);
  border-color: var(--line-orange) !important;
}

/* Login screen sparkles */
.spark-particle {
  position: absolute; width: 2px; height: 2px;
  border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
  animation: floatUp 8s linear infinite;
  opacity: 0;
}
@keyframes floatUp {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}
