/* ─── Obsidian Ledger — Premium Dark Finance Theme ─── */
:root {
  --bg-void: #04040a;
  --bg-base: #08080f;
  --bg-surface: #0e0e18;
  --bg-elevated: #14141f;
  --bg-hover: #1a1a28;
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --text-primary: #ededf0;
  --text-secondary: #7a7a8c;
  --text-muted: #4a4a5c;
  --accent: #c8a951;
  --accent-light: #e2cc7a;
  --accent-dim: rgba(200, 169, 81, 0.12);
  --accent-glow: rgba(200, 169, 81, 0.25);
  --income: #5eead4;
  --income-dim: rgba(94, 234, 212, 0.1);
  --expense: #fb7185;
  --expense-dim: rgba(251, 113, 133, 0.1);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 260px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 0.25s;
  --dur-normal: 0.5s;
  --dur-slow: 0.8s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ─── Typography ─── */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

/* ─── Layout: Sidebar App Shell ─── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-base);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  padding: 28px 24px 24px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.sidebar-brand .tagline {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent-light);
  border: 1px solid rgba(200, 169, 81, 0.15);
}

.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8b6914);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: var(--bg-void);
}

.user-card .name { font-size: 0.8rem; font-weight: 600; }
.user-card .role { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-void);
}

.page-header {
  padding: 32px 40px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.page-header .subtitle {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 4px;
}

.page-body { padding: 28px 40px 48px; }

/* ─── Cards ─── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--dur-fast), transform var(--dur-normal) var(--ease-out-expo), box-shadow var(--dur-normal);
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.card-elevated {
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-surface));
  border: 1px solid var(--border-light);
}

/* ─── Hero Balance ─── */
.hero-balance {
  position: relative;
  overflow: hidden;
  padding: 32px;
  border-radius: 18px;
  background: linear-gradient(135deg, #12121c 0%, #0a0a12 50%, #14101a 100%);
  border: 1px solid var(--border-light);
}

.hero-balance::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-balance .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 600;
}

.hero-balance .amount {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 8px 0 20px;
  line-height: 1.1;
}

.hero-balance .amount.positive { color: var(--text-primary); }
.hero-balance .amount.negative { color: var(--expense); }

.stat-pills {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 100px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}

.stat-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

.stat-pill .dot.income { background: var(--income); box-shadow: 0 0 8px var(--income); }
.stat-pill .dot.expense { background: var(--expense); box-shadow: 0 0 8px var(--expense); }

.stat-pill .val { font-weight: 600; font-family: var(--font-mono); font-size: 0.75rem; }

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: rgba(200, 169, 81, 0.4);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237a7a8c' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option { background: var(--bg-elevated); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #a88b2d);
  color: var(--bg-void);
  width: 100%;
}

.btn-primary:hover {
  box-shadow: 0 4px 24px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn-ghost:hover { border-color: var(--border-light); color: var(--text-primary); }

.btn-danger {
  background: transparent;
  color: var(--expense);
  border: none;
  padding: 6px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.btn-danger:hover { opacity: 1; }

/* ─── Filters ─── */
.filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.filter-pill:hover { color: var(--text-primary); border-color: var(--border-light); }

.filter-pill.active {
  background: var(--accent-dim);
  color: var(--accent-light);
  border-color: rgba(200, 169, 81, 0.25);
}

.filter-pill.active-income {
  background: var(--income-dim);
  color: var(--income);
  border-color: rgba(94, 234, 212, 0.2);
}

.filter-pill.active-expense {
  background: var(--expense-dim);
  color: var(--expense);
  border-color: rgba(251, 113, 133, 0.2);
}

/* ─── Transaction List (Card Style) ─── */
.tx-list { display: flex; flex-direction: column; gap: 2px; }

.tx-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, transform var(--dur-fast) var(--ease-out-expo);
}

.tx-item:hover {
  background: var(--bg-hover);
  transform: translateX(4px);
}

.tx-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}

.tx-icon.income { background: var(--income-dim); color: var(--income); }
.tx-icon.expense { background: var(--expense-dim); color: var(--expense); }

.tx-info .tx-title { font-size: 0.875rem; font-weight: 500; }
.tx-info .tx-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex; gap: 8px; align-items: center;
}

.tx-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
}

.tx-amount {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.tx-amount.income { color: var(--income); }
.tx-amount.expense { color: var(--expense); }

/* ─── Category Bars ─── */
.cat-bar { margin-bottom: 16px; }

.cat-bar-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.cat-bar-header .name { color: var(--text-secondary); }
.cat-bar-header .val { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-primary); }

.cat-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  width: 0;
  transition: width 1s var(--ease-out-expo);
}

.cat-bar-fill.is-animated { /* width set via inline style by JS */ }

/* ─── Section Headers ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}

.section-link {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.section-link:hover { color: var(--accent-light); }

/* ─── Alerts / Flash ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 8px;
  border: 1px solid;
}

.alert-success { background: var(--income-dim); color: var(--income); border-color: rgba(94,234,212,0.15); }
.alert-error { background: var(--expense-dim); color: var(--expense); border-color: rgba(251,113,133,0.15); }
.alert-warning { background: var(--accent-dim); color: var(--accent-light); border-color: rgba(200,169,81,0.15); }
.alert-info { background: rgba(129,140,248,0.08); color: #a5b4fc; border-color: rgba(129,140,248,0.15); }

.alerts-container { padding: 16px 40px 0; }

/* ─── Auth Split Layout ─── */
.auth-split {
  display: flex;
  min-height: 100vh;
}

.auth-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
  background: var(--bg-base);
  border-right: 1px solid var(--border);
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(94,234,212,0.06) 0%, transparent 40%);
  pointer-events: none;
}

.auth-brand .grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.auth-brand-content { position: relative; z-index: 1; max-width: 420px; }

.auth-brand h1 {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.auth-brand h1 em {
  font-style: italic;
  color: var(--accent);
}

.auth-brand p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 40px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-feature-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(200,169,81,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.auth-form-panel {
  width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  background: var(--bg-void);
}

.auth-form-panel h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.auth-form-panel .auth-sub {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover { color: var(--accent-light); }

.form-error { color: var(--expense); font-size: 0.72rem; margin-top: 4px; }

/* ─── Period Selector ─── */
.period-select {
  display: flex;
  gap: 8px;
}

.period-select .form-select {
  width: auto;
  padding: 8px 32px 8px 14px;
  font-size: 0.78rem;
  background-color: var(--bg-surface);
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.3; }
.empty-state p { font-size: 0.85rem; }

/* ─── Grid Layouts ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-main-side { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
.grid-chart-side { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }

.gap-section { margin-bottom: 28px; }

/* ─── Mobile ─── */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.menu-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  color: var(--text-primary);
  cursor: pointer;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 35;
  opacity: 0;
  transition: opacity var(--dur-normal);
}

.sidebar-overlay.open {
  display: block;
  opacity: 1;
}

@media (max-width: 1024px) {
  .grid-main-side, .grid-chart-side { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; opacity: 1; }
  .main-content { margin-left: 0; padding-top: 56px; }
  .mobile-topbar { display: flex; }
  .page-header, .page-body, .alerts-container { padding-left: 20px; padding-right: 20px; }
  .auth-split { flex-direction: column; }
  .auth-brand { padding: 40px 28px; min-height: auto; }
  .auth-brand h1 { font-size: 2rem; }
  .auth-form-panel { width: 100%; padding: 32px 28px; }
  .hero-balance .amount { font-size: 2rem; }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

/* Page load gate */
body:not(.page-loaded) .animate-in,
body:not(.page-loaded) .animate-in-left,
body:not(.page-loaded) .animate-in-right,
body:not(.page-loaded) .stagger-item {
  opacity: 0;
}

body.page-loaded .animate-in {
  animation: fadeUp var(--dur-slow) var(--ease-out-expo) forwards;
  animation-delay: var(--delay, 0ms);
}

body.page-loaded .animate-in-left {
  animation: fadeLeft var(--dur-slow) var(--ease-out-expo) forwards;
  animation-delay: var(--delay, 0ms);
}

body.page-loaded .animate-in-right {
  animation: fadeRight var(--dur-slow) var(--ease-out-expo) forwards;
  animation-delay: var(--delay, 0ms);
}

body.page-loaded .animate-scale {
  animation: scaleIn var(--dur-slow) var(--ease-out-back) forwards;
  animation-delay: var(--delay, 0ms);
}

body.page-loaded .stagger-item {
  animation: fadeUp var(--dur-normal) var(--ease-out-expo) forwards;
  animation-delay: var(--stagger-delay, 0ms);
}

/* Scroll-triggered */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
  transition-delay: var(--delay, 0ms);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.05); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  50%      { box-shadow: 0 0 10px 2px currentColor; opacity: 0.8; }
}

/* Delay utilities */
.delay-1 { --delay: 80ms; }
.delay-2 { --delay: 160ms; }
.delay-3 { --delay: 240ms; }
.delay-4 { --delay: 320ms; }
.delay-5 { --delay: 400ms; }
.delay-6 { --delay: 480ms; }

/* Sidebar entrance */
body.page-loaded .sidebar-brand { animation: fadeLeft 0.6s var(--ease-out-expo) forwards; }
body.page-loaded .sidebar-nav .nav-item:nth-child(1) { animation: fadeLeft 0.5s var(--ease-out-expo) 0.1s forwards; opacity: 0; }
body.page-loaded .sidebar-nav .nav-item:nth-child(2) { animation: fadeLeft 0.5s var(--ease-out-expo) 0.18s forwards; opacity: 0; }
body.page-loaded .sidebar-footer { animation: fadeUp 0.5s var(--ease-out-expo) 0.3s forwards; opacity: 0; }

/* Hero balance effects */
.hero-balance::after {
  content: '';
  position: absolute;
  bottom: -30%; right: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: pulseGlow 4s ease-in-out infinite;
  pointer-events: none;
}

.hero-balance .amount.counting {
  background: linear-gradient(90deg, var(--text-primary) 0%, var(--accent-light) 50%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s linear infinite;
}

.stat-pill .dot.income { animation: dotPulse 2.5s ease-in-out infinite; }
.stat-pill .dot.expense { animation: dotPulse 2.5s ease-in-out 0.5s infinite; }

/* Auth page */
.auth-brand-content { animation: none; }
body.page-loaded .auth-brand h1 { animation: fadeUp 0.8s var(--ease-out-expo) 0.1s forwards; opacity: 0; }
body.page-loaded .auth-brand p { animation: fadeUp 0.7s var(--ease-out-expo) 0.25s forwards; opacity: 0; }
body.page-loaded .auth-feature:nth-child(1) { animation: fadeUp 0.6s var(--ease-out-expo) 0.4s forwards; opacity: 0; }
body.page-loaded .auth-feature:nth-child(2) { animation: fadeUp 0.6s var(--ease-out-expo) 0.52s forwards; opacity: 0; }
body.page-loaded .auth-feature:nth-child(3) { animation: fadeUp 0.6s var(--ease-out-expo) 0.64s forwards; opacity: 0; }

.auth-form-panel > * {
  opacity: 0;
}
body.page-loaded .auth-form-panel h2 { animation: fadeRight 0.7s var(--ease-out-expo) 0.15s forwards; }
body.page-loaded .auth-form-panel .auth-sub { animation: fadeRight 0.7s var(--ease-out-expo) 0.25s forwards; }
body.page-loaded .auth-form-panel form { animation: fadeRight 0.8s var(--ease-out-expo) 0.35s forwards; }
body.page-loaded .auth-form-panel .auth-footer { animation: fadeUp 0.6s var(--ease-out-expo) 0.55s forwards; }

/* Alerts */
.alert { animation: slideDown 0.45s var(--ease-out-expo) forwards; }

/* Filter pills */
.filter-pill { transition: all var(--dur-fast) var(--ease-out-expo); }
.filter-pill:hover { transform: translateY(-2px); }
.filter-pill.active { animation: scaleIn 0.35s var(--ease-out-back); }

/* Buttons */
.btn-primary:active { transform: scale(0.97) translateY(0); }
.nav-item { transition: all var(--dur-fast) var(--ease-out-expo); }
.nav-item:hover { transform: translateX(4px); }

/* Form focus ripple */
.form-input:focus, .form-select:focus {
  animation: inputFocus 0.4s var(--ease-out-expo);
}

@keyframes inputFocus {
  0%   { box-shadow: 0 0 0 0 var(--accent-dim); }
  50%  { box-shadow: 0 0 0 6px var(--accent-dim); }
  100% { box-shadow: 0 0 0 3px var(--accent-dim); }
}

/* Page content fade between navigations */
.main-content {
  animation: contentFadeIn 0.4s var(--ease-out-expo);
}

@keyframes contentFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll { opacity: 1; transform: none; }
  .card:hover, .tx-item:hover, .filter-pill:hover { transform: none; }
}
