/* ============================================================
   Aurora — glass + motion theme, layered on top of styles.css
   (load after styles.css; motion.js adds the moving parts)
   ============================================================ */

@property --pct   { syntax: '<number>'; inherits: true;  initial-value: 0; }
@property --angle { syntax: '<angle>';  inherits: false; initial-value: 0deg; }

:root {
  --primary: #0b57a8;
  --primary-dark: #062f63;
  --primary-mid: #1565c0;
  --primary-light: rgba(31, 143, 255, 0.10);
  --accent: #1f8fff;
  --accent-2: #7c5cff;
  --accent-3: #12c2e9;
  --pink: #ff5fa2;
  --success: #0e9f6e;
  --warning: #c27803;
  --danger: #e02d4f;
  --bg: #edf2fb;
  --card: rgba(255, 255, 255, 0.74);
  --card-solid: #ffffff;
  --card-border: rgba(255, 255, 255, 0.85);
  --text: #0b1830;
  --text-muted: #56677e;
  --border: rgba(16, 42, 84, 0.10);
  --row-alt: rgba(31, 143, 255, 0.045);
  --wk: rgba(16, 42, 84, 0.035);
  --hol: rgba(255, 176, 32, 0.14);
  --ok-bg: rgba(14, 159, 110, 0.10);
  --amber-bg: rgba(255, 176, 32, 0.13);
  --grad-brand: linear-gradient(120deg, #0a4d8c 0%, #1f8fff 48%, #7c5cff 100%);
  --grad-cool: linear-gradient(120deg, #12c2e9 0%, #1f8fff 55%, #7c5cff 100%);
  --grad-text: linear-gradient(100deg, #0a4d8c 0%, #1f8fff 45%, #7c5cff 100%);
  --shadow: 0 1px 1px rgba(10, 30, 70, 0.04), 0 10px 28px -10px rgba(10, 30, 70, 0.16), 0 28px 56px -32px rgba(31, 80, 200, 0.22);
  --shadow-lg: 0 2px 4px rgba(10, 30, 70, 0.05), 0 22px 60px -18px rgba(10, 30, 70, 0.30), 0 40px 90px -40px rgba(80, 60, 220, 0.30);
  --glow: 0 0 0 1px rgba(31, 143, 255, 0.28), 0 14px 40px -12px rgba(31, 143, 255, 0.55);
  --glass-blur: saturate(1.7) blur(18px);
  --radius: 20px;
  --radius-sm: 12px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --aurora-1: rgba(31, 143, 255, 0.30);
  --aurora-2: rgba(124, 92, 255, 0.24);
  --aurora-3: rgba(18, 194, 233, 0.24);
  --aurora-4: rgba(255, 95, 162, 0.14);
  color-scheme: light;
}
body.dark {
  --primary: #5aa9ff;
  --primary-dark: #9cc9ff;
  --primary-light: rgba(90, 169, 255, 0.14);
  --accent: #4da3ff;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #ff6b85;
  --bg: #050a17;
  --card: rgba(16, 26, 50, 0.62);
  --card-solid: #0f1830;
  --card-border: rgba(150, 180, 255, 0.12);
  --text: #e9eefc;
  --text-muted: #94a3c3;
  --border: rgba(150, 180, 255, 0.12);
  --row-alt: rgba(90, 169, 255, 0.06);
  --wk: rgba(150, 180, 255, 0.05);
  --hol: rgba(251, 191, 36, 0.12);
  --ok-bg: rgba(52, 211, 153, 0.12);
  --amber-bg: rgba(251, 191, 36, 0.12);
  --grad-text: linear-gradient(100deg, #9cd2ff 0%, #5aa9ff 40%, #a78bfa 100%);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 14px 34px -12px rgba(0, 0, 0, 0.6), 0 30px 60px -30px rgba(60, 90, 255, 0.25);
  --shadow-lg: 0 24px 70px -20px rgba(0, 0, 0, 0.75), 0 40px 90px -40px rgba(124, 92, 255, 0.35);
  --glow: 0 0 0 1px rgba(90, 169, 255, 0.35), 0 14px 44px -12px rgba(90, 169, 255, 0.55);
  --aurora-1: rgba(31, 143, 255, 0.30);
  --aurora-2: rgba(124, 92, 255, 0.30);
  --aurora-3: rgba(18, 194, 233, 0.18);
  --aurora-4: rgba(255, 95, 162, 0.14);
  color-scheme: dark;
}

/* ---------- Living background ---------- */
body { background: var(--bg); overflow-x: hidden; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i {
  position: absolute; display: block; border-radius: 50%;
  width: 62vmax; height: 62vmax; opacity: 1; will-change: transform;
}
.aurora i:nth-child(1) { background: radial-gradient(circle at center, var(--aurora-1), transparent 62%); top: -24vmax; left: -18vmax; animation: drift1 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { background: radial-gradient(circle at center, var(--aurora-2), transparent 62%); top: -12vmax; right: -22vmax; animation: drift2 32s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { background: radial-gradient(circle at center, var(--aurora-3), transparent 62%); bottom: -30vmax; left: 18vw; animation: drift3 38s ease-in-out infinite alternate; }
.aurora i:nth-child(4) { background: radial-gradient(circle at center, var(--aurora-4), transparent 60%); bottom: -24vmax; right: -12vmax; width: 44vmax; height: 44vmax; animation: drift1 30s ease-in-out infinite alternate-reverse; }
.aurora::after {   /* fine grain so the gradients don't band */
  content: ''; position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift1 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 6vh) scale(1.12); } 100% { transform: translate(-4vw, 12vh) scale(0.95); } }
@keyframes drift2 { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-10vw, 8vh) scale(1.08); } 100% { transform: translate(-2vw, -6vh) scale(1.15); } }
@keyframes drift3 { 0% { transform: translate(0, 0) scale(1.05); } 50% { transform: translate(-12vw, -8vh) scale(0.92); } 100% { transform: translate(10vw, -4vh) scale(1.1); } }
.app, .login-page { position: relative; z-index: 1; }

/* ---------- Header: glass bar ---------- */
.header {
  background: linear-gradient(110deg, rgba(4, 28, 66, 0.86) 0%, rgba(10, 77, 140, 0.80) 48%, rgba(70, 56, 190, 0.78) 100%);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 40px -14px rgba(4, 20, 60, 0.55);
  transition: padding 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.header::after {   /* light sweeping along the bottom edge */
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(18, 194, 233, 0.9), rgba(124, 92, 255, 0.9), transparent);
  background-size: 50% 100%; background-repeat: no-repeat;
  animation: edgeSweep 7s ease-in-out infinite;
}
@keyframes edgeSweep { 0% { background-position: -60% 0; } 100% { background-position: 160% 0; } }
.header.scrolled { padding-top: 8px; padding-bottom: 8px; box-shadow: 0 16px 50px -16px rgba(4, 20, 60, 0.7); }
body.dark .header { background: linear-gradient(110deg, rgba(5, 10, 26, 0.86) 0%, rgba(12, 28, 64, 0.84) 50%, rgba(40, 28, 110, 0.80) 100%); }
.header h1 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; letter-spacing: 0.01em; }
.header-logo { border-radius: 10px; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.45); transition: transform 0.4s var(--spring); }
.header-logo:hover { transform: rotate(-2deg) scale(1.04); }
.mode-badge { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); letter-spacing: 0.12em; }
.user-info, .live-chip, .lang-toggle, .dark-toggle, .btn-logout {
  background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lang-toggle, .dark-toggle, .btn-logout { transition: background 0.25s, transform 0.35s var(--spring), box-shadow 0.25s; }
.lang-toggle:hover, .dark-toggle:hover, .btn-logout:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-2px); box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.45); }
.dark-toggle { width: 38px; padding-left: 0; padding-right: 0; }
.live-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); animation: livePulse 2.2s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); } 80%, 100% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } }

/* ---------- Tabs: floating glass pill bar with a sliding indicator ---------- */
.tabs {
  position: relative; margin: 16px auto 0; padding: 6px; gap: 2px;
  width: max-content; max-width: calc(100% - 32px);
  background: var(--card); border: 1px solid var(--card-border); border-radius: 18px;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow); scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab, button.tab {
  position: relative; z-index: 1; border: 0 !important; border-radius: 13px; overflow: hidden; flex-shrink: 0;
  padding: 9px 15px; background: transparent; color: var(--text-muted);
  transition: color 0.3s var(--ease), background 0.25s;
}
.tab:hover { background: rgba(31, 143, 255, 0.08); color: var(--text); }
.tab.active { color: #fff; background: transparent; }
.tabs:not(.has-ink) .tab.active { background: var(--grad-brand); }
.tab-ink {
  position: absolute; z-index: 0; top: 6px; left: 0; height: calc(100% - 12px); width: 0;
  border-radius: 13px; background: var(--grad-brand); background-size: 200% 100%;
  box-shadow: 0 8px 22px -8px rgba(31, 100, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.55s var(--spring), width 0.55s var(--spring);
  animation: inkShift 8s ease-in-out infinite alternate;
}
@keyframes inkShift { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.tab-badge { box-shadow: 0 0 0 2px var(--card-solid); animation: badgePop 0.6s var(--spring) both; }
@keyframes badgePop { from { transform: scale(0); } to { transform: scale(1); } }
.tab-search kbd { background: rgba(127, 140, 170, 0.14); border-color: transparent; }

/* ---------- Page & entrance motion ---------- */
.main { position: relative; z-index: 1; animation: none; }
.view-enter > *:not(.reveal) { animation: riseIn 0.7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
body.theme-switching, body.theme-switching * { transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease) !important; }
@keyframes riseIn { from { opacity: 0; transform: translateY(22px) scale(0.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Glass surfaces ---------- */
.stat-card, .table-card, .year-card, .hero-card, .suggest-box, .req-summary, .notif-list, .modal, .palette {
  background: var(--card); border: 1px solid var(--card-border);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
}
.table-card { border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease); }
.table-card:hover { box-shadow: var(--shadow-lg); }
.table-header { background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0)); border-bottom: 1px solid var(--border); }
body.dark .table-header, body.dark .modal-header, body.dark .modal-footer { background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)); }
.table-header h2, .section-title { letter-spacing: -0.01em; }
.table-header h2 { font-weight: 700; }

/* Stat cards: tilt + spotlight (motion.js sets --rx/--ry/--mx/--my) */
.stat-card {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 20px 22px 18px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0));
  transition: transform 0.5s var(--ease), box-shadow 0.4s var(--ease);
}
.stat-card::before {   /* gradient accent stripe */
  content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--grad-cool);
}
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, #f59e0b, #ff5fa2); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, #10b981, #12c2e9); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, #7c5cff, #ff5fa2); }
.stat-card::after, .year-card::after, .hero-card::after, .suggest-card::after {   /* cursor spotlight */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(31, 143, 255, 0.14), transparent 45%);
}
.stat-card:hover, .year-card:hover, .hero-card:hover, .suggest-card:hover { --lift: -4px; box-shadow: var(--shadow-lg); }
.stat-card:hover::after, .year-card:hover::after, .hero-card:hover::after, .suggest-card:hover::after { opacity: 1; }
.stat-card .label { letter-spacing: 0.09em; font-weight: 700; font-size: 0.7rem; }
.stat-card .value {
  font-size: 2.15rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-card .value span, .stat-card .value small { -webkit-text-fill-color: var(--text-muted); color: var(--text-muted); }
.stat-card .value.warning { background: linear-gradient(100deg, #f59e0b, #ff5fa2); -webkit-background-clip: text; background-clip: text; }
.stat-card .value.danger { background: linear-gradient(100deg, #e02d4f, #ff5fa2); -webkit-background-clip: text; background-clip: text; }

/* ---------- Greeting banner: moving mesh + orbs + sheen ---------- */
.greet-banner {
  border-radius: 24px; padding: 26px 30px; isolation: isolate;
  background:
    radial-gradient(90% 130% at 0% 0%, rgba(18, 194, 233, 0.70) 0%, transparent 50%),
    radial-gradient(90% 150% at 100% 100%, rgba(150, 90, 255, 0.85) 0%, transparent 55%),
    radial-gradient(60% 90% at 70% 0%, rgba(255, 95, 162, 0.35) 0%, transparent 60%),
    linear-gradient(120deg, #052a63 0%, #0b4fb0 40%, #1f6fff 68%, #5b3df0 100%);
  background-size: 160% 160%, 160% 160%, 160% 160%, 220% 220%;
  animation: meshShift 16s ease-in-out infinite alternate;
  box-shadow: 0 24px 60px -22px rgba(31, 80, 200, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
@keyframes meshShift { 0% { background-position: 0% 0%, 100% 100%, 60% 0%, 0% 50%; } 100% { background-position: 30% 20%, 70% 80%, 90% 30%, 100% 50%; } }
.greet-banner::before {
  width: 280px; height: 280px; top: -110px; right: 6%; z-index: -1;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, transparent 65%);
  animation: orbit 14s ease-in-out infinite;
}
.greet-banner::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%);
  background-size: 250% 100%; animation: sheen 6.5s ease-in-out infinite;
}
@keyframes orbit { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(-40px, 30px) scale(1.15); } 66% { transform: translate(30px, 50px) scale(0.9); } }
@keyframes sheen { 0%, 20% { background-position: 150% 0; } 70%, 100% { background-position: -60% 0; } }
.greet-banner h2 { font-size: 1.85rem; letter-spacing: -0.01em; text-shadow: 0 2px 18px rgba(0, 0, 30, 0.35); }
.greet-banner div[style*="1.8rem"], .greet-banner div[style*="1.6rem"] { font-size: 2.3rem !important; letter-spacing: -0.03em; text-shadow: 0 4px 24px rgba(0, 0, 30, 0.35); }
body.dark .greet-banner {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(18, 194, 233, 0.35) 0%, transparent 46%),
    radial-gradient(120% 160% at 100% 100%, rgba(124, 92, 255, 0.55) 0%, transparent 50%),
    linear-gradient(120deg, #040b1f 0%, #0b2452 45%, #1b2f7a 75%, #3a237a 100%);
  background-size: 160% 160%, 160% 160%, 220% 220%;
}

/* ---------- Buttons: gradient, shine, ripple ---------- */
.btn { position: relative; overflow: hidden; border-radius: 12px; font-weight: 700; letter-spacing: 0.005em; isolation: isolate;
  transition: transform 0.35s var(--spring), box-shadow 0.3s var(--ease), background-position 0.6s var(--ease), filter 0.2s; }
.btn-primary { background: var(--grad-brand); background-size: 160% 100%; box-shadow: 0 10px 24px -10px rgba(31, 100, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25); border: 0; }
.btn-primary:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(31, 100, 255, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn-success { background: linear-gradient(120deg, #0e9f6e, #12c2a0); border: 0; box-shadow: 0 10px 24px -10px rgba(14, 159, 110, 0.7); }
.btn-danger { background: linear-gradient(120deg, #e02d4f, #ff5f7e); border: 0; box-shadow: 0 10px 24px -10px rgba(224, 45, 79, 0.6); }
.btn-success:hover, .btn-danger:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-outline { background: var(--card); border: 1px solid var(--border); color: var(--text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-outline:hover { border-color: rgba(31, 143, 255, 0.45); color: var(--primary); box-shadow: var(--glow); transform: translateY(-2px); background: var(--card); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary::after, .btn-success::after, .btn-danger::after {   /* light sweep on hover */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease);
}
.btn-primary:hover::after, .btn-success:hover::after, .btn-danger:hover::after { transform: translateX(120%); }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); background: currentColor; opacity: 0.25; animation: ripple 0.65s var(--ease) forwards; }
.btn-primary .ripple, .btn-success .ripple, .btn-danger .ripple, .tab .ripple { background: #fff; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ---------- Forms ---------- */
.form-group input, .form-group select, .form-group textarea, .search-input, .bulk-bal-area {
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color 0.25s, box-shadow 0.3s var(--ease), background 0.25s;
}
body.dark .form-group input, body.dark .form-group select, body.dark .form-group textarea, body.dark .search-input, body.dark .bulk-bal-area { background: rgba(10, 18, 40, 0.6); color: var(--text); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .search-input:focus, .bulk-bal-area:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(31, 143, 255, 0.16), 0 8px 24px -12px rgba(31, 143, 255, 0.5); outline: none;
}
.form-group label { font-weight: 600; letter-spacing: 0.01em; }
.file-upload { border-radius: 16px; border: 1.5px dashed rgba(31, 143, 255, 0.35); background: rgba(31, 143, 255, 0.04); transition: all 0.35s var(--ease); }
.file-upload:hover, .file-upload.dragover { border-color: var(--accent); background: rgba(31, 143, 255, 0.09); transform: scale(1.01); box-shadow: var(--glow); }

/* ---------- Tables ---------- */
th { background: transparent; color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.08em; }
body.dark th { background: transparent; color: var(--text-muted); }
td { border-bottom: 1px solid var(--border); }
body.dark td { border-bottom-color: var(--border); }
tbody tr { transition: background 0.25s; }
tbody tr:hover td { background: linear-gradient(90deg, rgba(31, 143, 255, 0.08), rgba(124, 92, 255, 0.04) 60%, transparent); }
tbody tr td:first-child { position: relative; }
tbody tr:hover td:first-child::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: var(--grad-cool); }
.view-enter tbody tr { animation: rowIn 0.55s var(--ease) both; }
.view-enter tbody tr:nth-child(1) { animation-delay: 0.12s; } .view-enter tbody tr:nth-child(2) { animation-delay: 0.16s; }
.view-enter tbody tr:nth-child(3) { animation-delay: 0.20s; } .view-enter tbody tr:nth-child(4) { animation-delay: 0.24s; }
.view-enter tbody tr:nth-child(5) { animation-delay: 0.28s; } .view-enter tbody tr:nth-child(6) { animation-delay: 0.32s; }
.view-enter tbody tr:nth-child(7) { animation-delay: 0.36s; } .view-enter tbody tr:nth-child(8) { animation-delay: 0.40s; }
.view-enter tbody tr:nth-child(n+9) { animation-delay: 0.44s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Badges & pills ---------- */
.badge { border-radius: 999px; padding: 4px 10px 4px 9px; font-weight: 700; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 6px; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.badge-pending::before { animation: livePulseAmber 2.4s ease-out infinite; }
@keyframes livePulseAmber { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); } 80%, 100% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); } }
.pill { border-radius: 999px; }

/* ---------- Rings: animated fill with a gradient arc ---------- */
.ring {
  background: conic-gradient(from -90deg, var(--accent-3), var(--accent) calc(var(--pct) * 0.5%), var(--accent-2) calc(var(--pct) * 1%), rgba(127, 140, 170, 0.16) 0);
  box-shadow: 0 0 0 7px rgba(31, 143, 255, 0.06), 0 12px 30px -12px rgba(31, 100, 255, 0.55);
  animation: ringFill 1.6s var(--ease) both, scaleIn 0.6s var(--spring) both;
}
@keyframes ringFill { from { --pct: 0; } }
.ring::before { background: var(--card-solid); box-shadow: inset 0 2px 10px rgba(10, 30, 70, 0.08); }
body.dark .ring::before { background: var(--card-solid); }
.ring-inner strong { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }

/* ---------- Hero, year cards, request summary ---------- */
.hero-card, .year-card { position: relative; overflow: hidden; border-radius: var(--radius);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0));
  transition: transform 0.5s var(--ease), box-shadow 0.4s var(--ease); }
.hero-card.ok { background: linear-gradient(120deg, rgba(14, 159, 110, 0.14), var(--card) 60%); }
.hero-card.info { background: linear-gradient(120deg, rgba(31, 143, 255, 0.16), var(--card) 60%); }
.hero-card.warn { background: linear-gradient(120deg, rgba(245, 158, 11, 0.16), var(--card) 60%); }
.hero-icon { font-size: 2.2rem; filter: drop-shadow(0 8px 14px rgba(10, 30, 70, 0.25)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-4deg); } }
.year-card.current { border-color: transparent; box-shadow: 0 0 0 1.5px rgba(31, 143, 255, 0.55), var(--shadow-lg); }
.year-card.current::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-cool); }
.accrual-note { display: block; width: fit-content; max-width: 100%; padding: 8px 12px; border-radius: 12px; margin: 0 0 16px; background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--shadow); }
.req-summary { border-radius: var(--radius); }
.sum-big strong { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sum-bar i { background: var(--grad-cool); transition: width 0.9s var(--ease); }
.suggest-card { position: relative; overflow: hidden; border-radius: 16px; transition: transform 0.45s var(--spring), box-shadow 0.35s var(--ease), border-color 0.3s; }
.suggest-card:hover { transform: translateY(-4px); }
.rule-box { border-radius: 14px; backdrop-filter: blur(6px); }
.check-row { border-radius: 12px; }

/* ---------- Timeline: bars grow in ---------- */
.tl-bar.approved { background: var(--grad-brand); box-shadow: 0 6px 16px -6px rgba(31, 100, 255, 0.65); }
.tl-bar { transform-origin: left center; animation: barGrow 0.8s var(--ease) both; }
.tl-row:nth-child(2) .tl-bar { animation-delay: 0.10s; } .tl-row:nth-child(3) .tl-bar { animation-delay: 0.15s; }
.tl-row:nth-child(4) .tl-bar { animation-delay: 0.20s; } .tl-row:nth-child(5) .tl-bar { animation-delay: 0.25s; }
.tl-row:nth-child(n+6) .tl-bar { animation-delay: 0.30s; }
@keyframes barGrow { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
.tl-cell.today, .tl-day.today { background: rgba(31, 143, 255, 0.10); }
.tl-day.today strong { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(31, 100, 255, 0.8); }
.seg { border-radius: 12px; background: rgba(127, 140, 170, 0.12); }
.seg button { border-radius: 9px; transition: all 0.35s var(--spring); }
.seg button.on { background: var(--card-solid); box-shadow: var(--shadow); color: var(--primary); }

/* ---------- Calendar grid ---------- */
.cal-day { border-radius: 12px; transition: transform 0.35s var(--spring), box-shadow 0.3s; }
.cal-day:not(.empty):hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow-lg); z-index: 1; }
.cal-day.today { box-shadow: 0 0 0 2px var(--accent), var(--glow); }

/* ---------- Modals: spring in, blurred backdrop ---------- */
.modal-overlay { background: rgba(4, 12, 32, 0.42); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); }
.modal { border-radius: 24px; background: var(--card); box-shadow: var(--shadow-lg), 0 0 0 1px var(--card-border); animation: modalIn 0.55s var(--spring) both; }
body:not(.dark) .modal { background: rgba(255, 255, 255, 0.86); }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(0.94); } to { opacity: 1; transform: none; } }
.modal-header { background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)); }
.modal-header h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.modal-footer { background: transparent; }
.modal-close { border-radius: 50%; width: 36px; height: 36px; padding: 0; transition: transform 0.4s var(--spring), background 0.2s; }
.modal-close:hover { transform: rotate(90deg); background: rgba(127, 140, 170, 0.15); }
.modal-body > * { animation: riseIn 0.6s var(--ease) both; }
.modal-body > *:nth-child(2) { animation-delay: 0.05s; } .modal-body > *:nth-child(3) { animation-delay: 0.1s; }
.modal-body > *:nth-child(4) { animation-delay: 0.15s; } .modal-body > *:nth-child(n+5) { animation-delay: 0.2s; }

/* ---------- Toast: glass pill with a timer line ---------- */
.toast {
  left: 50%; right: auto; bottom: 26px; transform: translate(-50%, 24px) scale(0.96);
  background: rgba(10, 20, 44, 0.86); color: #fff; border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 999px; padding: 13px 24px; overflow: hidden;
  box-shadow: 0 20px 50px -16px rgba(0, 10, 40, 0.6);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--spring);
}
.toast.show { transform: translate(-50%, 0) scale(1); }
.toast::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--grad-cool); transform-origin: left; transform: scaleX(0); }
.toast.show::after { animation: toastTimer 3.2s linear forwards; }
@keyframes toastTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- Notifications, palette, misc ---------- */
.notif { transition: background 0.25s, transform 0.35s var(--spring); }
.notif:hover { transform: translateX(4px); }
.notif.unread { background: linear-gradient(90deg, rgba(31, 143, 255, 0.10), transparent 70%); }
.notif-icon { filter: drop-shadow(0 4px 8px rgba(10, 30, 70, 0.2)); }
.palette-overlay { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.palette { border-radius: 22px; animation: modalIn 0.45s var(--spring) both; }
.palette-item.sel { background: linear-gradient(90deg, rgba(31, 143, 255, 0.14), rgba(124, 92, 255, 0.08)); }
.avatar { background: var(--grad-brand); color: #fff; box-shadow: 0 6px 14px -6px rgba(31, 100, 255, 0.7); }
.warning-item { border-radius: 12px; background: var(--row-alt); border-left: 3px solid transparent; border-image: linear-gradient(#f59e0b, #ff5fa2) 1; }
.mood-note { border-radius: 14px; }
.chart-box { position: relative; }
.radar-bar i { background: var(--grad-cool); }
.radar-bar i.warm { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.radar-bar i.hot { background: linear-gradient(90deg, #e02d4f, #ff5fa2); }
.empty-state div { animation: bob 3.5s ease-in-out infinite; }
code { background: rgba(31, 143, 255, 0.10); }
::-webkit-scrollbar-thumb { background: linear-gradient(#1f8fff88, #7c5cff88); border-radius: 10px; }

/* ---------- Login: aurora night + particles + rotating border ---------- */
.login-page {
  background: radial-gradient(ellipse at 20% 10%, #12306b 0%, transparent 55%), radial-gradient(ellipse at 90% 90%, #3b1f8a 0%, transparent 55%), #040a1c;
  animation: none;
}
.login-page::before { width: 60vmax; height: 60vmax; top: -24vmax; right: -16vmax; background: radial-gradient(circle, rgba(31, 143, 255, 0.45), transparent 62%); animation: drift2 24s ease-in-out infinite alternate; }
.login-page::after { width: 54vmax; height: 54vmax; bottom: -22vmax; left: -14vmax; background: radial-gradient(circle, rgba(124, 92, 255, 0.42), transparent 62%); animation: drift1 28s ease-in-out infinite alternate; }
.login-glow { position: absolute; width: 40vmax; height: 40vmax; left: 30%; top: 40%; border-radius: 50%; background: radial-gradient(circle, rgba(18, 194, 233, 0.30), transparent 62%); animation: drift3 30s ease-in-out infinite alternate; pointer-events: none; }
#loginParticles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.login-card {
  z-index: 2; border-radius: 28px; padding: 42px 44px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 246, 255, 0.90) 100%); border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.75), 0 0 80px -20px rgba(31, 143, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: cardIn 1s var(--spring) both;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.6s var(--ease);
}
.login-card::before {   /* rotating gradient rim */
  content: ''; position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--angle), #12c2e9, #1f8fff, #7c5cff, #ff5fa2, #12c2e9);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinAngle 6s linear infinite; opacity: 0.9;
}
@keyframes spinAngle { to { --angle: 360deg; } }
@keyframes cardIn { from { opacity: 0; transform: perspective(1000px) translateY(40px) rotateX(10deg) scale(0.94); } to { opacity: 1; } }
body.dark .login-card { background: rgba(12, 20, 44, 0.78); border-color: rgba(150, 180, 255, 0.14); }
.login-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.3rem; letter-spacing: -0.01em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card > * { animation: riseIn 0.8s var(--ease) both; }
.login-card > *:nth-child(2) { animation-delay: 0.15s; } .login-card > *:nth-child(3) { animation-delay: 0.22s; }
.login-card > *:nth-child(4) { animation-delay: 0.29s; } .login-card > *:nth-child(5) { animation-delay: 0.36s; }
.login-card > *:nth-child(n+6) { animation-delay: 0.43s; }
.logo-img { filter: drop-shadow(0 10px 18px rgba(10, 30, 70, 0.18)); animation: bob 6s ease-in-out infinite; }
.login-card .btn-primary { padding: 13px; font-size: 1rem; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .tabs { margin: 10px 12px 0; max-width: calc(100% - 24px); width: auto; border-radius: 16px; }
  .greet-banner { padding: 20px; border-radius: 20px; }
  .greet-banner h2 { font-size: 1.45rem; }
  .greet-banner > div[style*="text-align:right"] { text-align: left !important; }
  .stat-card .value { font-size: 1.8rem; }
  .login-card { padding: 30px 22px; border-radius: 22px; }
  .toast { max-width: calc(100% - 32px); border-radius: 18px; }
}

/* ---------- Reduced motion: keep the look, drop the movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .aurora i, .login-page::before, .login-page::after, .login-glow, .greet-banner, .greet-banner::before, .greet-banner::after,
  .header::after, .tab-ink, .hero-icon, .logo-img, .login-card::before, .empty-state div { animation: none !important; }
  .stat-card, .hero-card, .year-card, .login-card { transform: none !important; }
  #loginParticles { display: none; }
  .reveal { opacity: 1; transform: none; }
}
@media print { .aurora, #loginParticles { display: none !important; } }

/* ---------- Month grid heat levels (both themes) ---------- */
.cal-day { background: var(--card); border: 1px solid var(--card-border); }
.cal-day.empty { background: transparent; border-color: transparent; }
.cal-day.holiday { background: var(--hol); }
.cal-day.today { border: 2px solid var(--accent); background: var(--primary-light); }
.cal-day.heat1, body.dark .cal-day.heat1 { color: var(--text); background: linear-gradient(160deg, rgba(31, 143, 255, 0.16), rgba(124, 92, 255, 0.10)) !important; border-color: rgba(31, 143, 255, 0.25); }
.cal-day.heat2, body.dark .cal-day.heat2 { color: var(--text); background: linear-gradient(160deg, rgba(31, 143, 255, 0.32), rgba(124, 92, 255, 0.22)) !important; border-color: rgba(31, 143, 255, 0.4); }
.cal-day.heat3, body.dark .cal-day.heat3 { background: var(--grad-brand) !important; border-color: transparent; box-shadow: 0 10px 24px -12px rgba(31, 100, 255, 0.8); }
.cal-day.heat3 .cal-num, .cal-day.heat3 .cal-leave { color: #fff; }

/* ============================================================
   Cinematic layer — hero landscape, login night scene,
   morphing page transitions, cursor light, magnetic buttons
   ============================================================ */

/* ---------- Greeting banner landscape ---------- */
.greet-banner > *:not(.hero-scene) { position: relative; z-index: 1; }
.hero-scene {
  position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: min(72%, 680px); pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 50%, transparent 98%); mask-image: linear-gradient(to left, #000 50%, transparent 98%);
  --orb-halo: rgba(255, 236, 190, 0.55); --orb-core: #fff3cf;
}
.hero-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-scene.morning { --orb-halo: rgba(255, 186, 120, 0.6); --orb-core: #ffd9a3; }
.hero-scene.day     { --orb-halo: rgba(255, 255, 240, 0.5); --orb-core: #fffbe8; }
.hero-scene.evening { --orb-halo: rgba(255, 120, 96, 0.65); --orb-core: #ffb57a; }
.hero-scene.night   { --orb-halo: rgba(170, 196, 255, 0.4); --orb-core: #eef3ff; }
.hero-scene .core { fill: var(--orb-core); filter: drop-shadow(0 0 12px var(--orb-halo)); }
.hero-scene .orb { animation: orbFloat 9s ease-in-out infinite; }
.hero-scene .halo { transform-box: fill-box; transform-origin: center; animation: haloPulse 6s ease-in-out infinite; }
.hero-scene .cloud { fill: rgba(255, 255, 255, 0.22); }
.hero-scene .cloud.c1 { animation: cloudDrift 26s ease-in-out infinite alternate; }
.hero-scene .cloud.c2 { animation: cloudDrift 34s ease-in-out infinite alternate-reverse; }
.hero-scene .cloud.c3 { animation: cloudDrift 22s ease-in-out infinite alternate; opacity: 0.8; }
.hero-scene .l-back path { fill: rgba(255, 255, 255, 0.10); }
.hero-scene .l-back .snow { fill: rgba(255, 255, 255, 0.42); }
.hero-scene .l-mid path { fill: rgba(255, 255, 255, 0.14); }
.hero-scene .l-front path { fill: rgba(6, 16, 50, 0.26); }
.hero-scene .star { fill: #fff; animation: twinkle 3.2s ease-in-out infinite; }
/* 3D parallax: motion.js sets --px / --py on the banner from the pointer position */
.hero-scene .l-cloud { transform: translate(calc(var(--px, 0) * -4px), calc(var(--py, 0) * -2px)); transition: transform 1s var(--ease); }
.hero-scene .l-back  { transform: translate(calc(var(--px, 0) * -8px), calc(var(--py, 0) * -3px)); transition: transform 1s var(--ease); }
.hero-scene .l-mid   { transform: translate(calc(var(--px, 0) * -16px), calc(var(--py, 0) * -5px)); transition: transform 1s var(--ease); }
.hero-scene .l-front { transform: translate(calc(var(--px, 0) * -26px), calc(var(--py, 0) * -7px)); transition: transform 1s var(--ease); }
.hero-plane { position: absolute; top: 18%; left: -10%; width: 22px; height: 22px; animation: planeFly 19s linear 1.5s infinite; opacity: 0; }
.hero-plane svg { width: 100%; height: 100%; fill: rgba(255, 255, 255, 0.92); transform: rotate(8deg); filter: drop-shadow(0 2px 4px rgba(0, 0, 40, 0.35)); }
.hero-plane .fold { fill: none; stroke: rgba(10, 40, 110, 0.35); stroke-width: 1; }
.hero-plane::before {   /* vapour trail */
  content: ''; position: absolute; right: 18px; top: 11px; width: 120px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55)); transform-origin: right;
}
@keyframes orbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes haloPulse { 0%, 100% { transform: scale(1); opacity: 0.9; } 50% { transform: scale(1.14); opacity: 1; } }
@keyframes cloudDrift { from { transform: translateX(-34px); } to { transform: translateX(34px); } }
@keyframes twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes planeFly {
  0% { left: -10%; top: 30%; opacity: 0; } 6% { opacity: 1; }
  50% { top: 14%; } 92% { opacity: 1; } 100% { left: 108%; top: 22%; opacity: 0; }
}

/* ---------- Login: Pamir night scene ---------- */
.login-scene { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.login-scene .ranges { position: absolute; left: -3%; right: -3%; bottom: 0; width: 106%; height: 46vh; min-height: 220px; }
.login-scene .l-back path { fill: #142c63; } .login-scene .l-mid path { fill: #0c1d48; } .login-scene .l-front path { fill: #060f2c; }
.login-scene .snow { fill: rgba(220, 235, 255, 0.55); }
.login-scene .l-back  { transform: translate(calc(var(--px, 0) * -10px), 0); transition: transform 1.2s var(--ease); }
.login-scene .l-mid   { transform: translate(calc(var(--px, 0) * -22px), 0); transition: transform 1.2s var(--ease); }
.login-scene .l-front { transform: translate(calc(var(--px, 0) * -38px), 0); transition: transform 1.2s var(--ease); }
.login-scene .moon {
  position: absolute; top: 9vh; right: 12vw; width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fdfdff 0%, #dfe7ff 55%, #b9c7f0 100%);
  box-shadow: 0 0 40px 8px rgba(190, 210, 255, 0.35), 0 0 140px 40px rgba(120, 150, 255, 0.18);
  transform: translate(calc(var(--px, 0) * 12px), calc(var(--py, 0) * 8px)); transition: transform 1.4s var(--ease);
  animation: moonGlow 7s ease-in-out infinite;
}
.login-scene .moon::after {   /* craters */
  content: ''; position: absolute; inset: 0; border-radius: 50%; opacity: 0.35;
  background: radial-gradient(circle at 62% 58%, #aab7e0 0 7%, transparent 8%), radial-gradient(circle at 40% 66%, #b8c4ea 0 5%, transparent 6%), radial-gradient(circle at 58% 30%, #c2cdf0 0 4%, transparent 5%);
}
@keyframes moonGlow { 0%, 100% { box-shadow: 0 0 40px 8px rgba(190, 210, 255, 0.35), 0 0 140px 40px rgba(120, 150, 255, 0.18); } 50% { box-shadow: 0 0 54px 12px rgba(190, 210, 255, 0.45), 0 0 170px 54px rgba(120, 150, 255, 0.24); } }
.login-scene .shoot {
  position: absolute; width: 160px; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(160, 200, 255, 0));
  transform: rotate(-24deg);
}
.login-scene .shoot.s1 { top: 14%; left: 62%; animation: shoot 9s ease-in 2s infinite; }
.login-scene .shoot.s2 { top: 26%; left: 28%; animation: shoot 13s ease-in 6s infinite; }
.login-scene .shoot.s3 { top: 8%;  left: 44%; animation: shoot 17s ease-in 10s infinite; }
@keyframes shoot {
  0% { opacity: 0; transform: rotate(-24deg) translateX(0) scaleX(0.2); }
  2% { opacity: 1; }
  8% { opacity: 0; transform: rotate(-24deg) translateX(-340px) scaleX(1); }
  100% { opacity: 0; transform: rotate(-24deg) translateX(-340px) scaleX(1); }
}
.login-page::before, .login-page::after, .login-glow { z-index: 0; }
#loginParticles { z-index: 0; }
.login-scene { z-index: 1; }                     /* ridges in front of the sky glow and the stars */
.login-card { z-index: 3; }

/* ---------- Morphing page transitions (View Transitions API) ---------- */
#mainContent { view-transition-name: page; }
.greet-banner { view-transition-name: hero; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(page) { animation: vtOutLeft 0.38s var(--ease) both; }
::view-transition-new(page) { animation: vtInRight 0.6s var(--ease) both; }
html[data-vt="back"]::view-transition-old(page) { animation-name: vtOutRight; }
html[data-vt="back"]::view-transition-new(page) { animation-name: vtInLeft; }
::view-transition-group(hero) { animation-duration: 0.65s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
::view-transition-old(hero), ::view-transition-new(hero) { animation-duration: 0.45s; }
@keyframes vtOutLeft  { to { opacity: 0; transform: translateX(-60px) scale(0.98); filter: blur(6px); } }
@keyframes vtOutRight { to { opacity: 0; transform: translateX(60px) scale(0.98); filter: blur(6px); } }
@keyframes vtInRight  { from { opacity: 0; transform: translateX(70px) scale(0.985); filter: blur(6px); } }
@keyframes vtInLeft   { from { opacity: 0; transform: translateX(-70px) scale(0.985); filter: blur(6px); } }

/* ---------- Cursor light, magnetic buttons, scroll progress ---------- */
.cursor-glow {
  position: fixed; left: 0; top: 0; z-index: 0; width: 520px; height: 520px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(31, 143, 255, 0.13) 0%, rgba(124, 92, 255, 0.07) 35%, transparent 65%);
  will-change: transform;
}
body.dark .cursor-glow { background: radial-gradient(circle, rgba(90, 169, 255, 0.16) 0%, rgba(124, 92, 255, 0.09) 35%, transparent 65%); }
.btn-primary, .btn-success, .tab-search { translate: var(--bx, 0) var(--by, 0); transition: translate 0.45s var(--spring), transform 0.35s var(--spring), box-shadow 0.3s var(--ease), background-position 0.6s var(--ease), filter 0.2s; }
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 300; pointer-events: none;
  background: linear-gradient(90deg, #12c2e9, #1f8fff, #7c5cff, #ff5fa2); transform-origin: left; transform: scaleX(0);
  box-shadow: 0 0 12px rgba(31, 143, 255, 0.6);
}
.aurora { transform: translate3d(0, calc(var(--sy, 0) * -0.06px), 0); }

@media (max-width: 640px) {
  .hero-scene { width: 100%; opacity: 0.75; }
  .hero-plane { display: none; }
  .login-scene .moon { width: 52px; height: 52px; right: 8vw; top: 5vh; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scene .orb, .hero-scene .halo, .hero-scene .cloud, .hero-scene .star, .hero-plane,
  .login-scene .moon, .login-scene .shoot { animation: none !important; }
  .hero-plane, .login-scene .shoot, .cursor-glow { display: none; }
  #mainContent, .greet-banner { view-transition-name: none; }
}
@media print { .hero-scene, .login-scene, .cursor-glow, .scroll-progress { display: none !important; } }
