:root {
    /* Obsidian Palette */
    --primary: #a855f7;
    --primary-hover: #9333ea;
    --accent: #d946ef;
    --bg-dark: #0b0f1a;
    --surface: rgba(30, 41, 59, 0.4);
    --surface-hover: rgba(30, 41, 59, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(217, 70, 239, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: #fff; margin-bottom: 1rem; line-height: 1.2; }
a { color: inherit; text-decoration: none; transition: var(--transition); cursor: pointer; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* Structural Components */
.app-shell { display: flex; min-height: 100vh; width: 100%; position: relative; }
.admin-shell { display: flex; min-height: 100vh; }
.app-stage, .admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 2rem; position: relative; }

/* Dashboard Components */
.dash-container { max-width: 1280px; margin: 0 auto; padding-bottom: 5rem; width: 100%; }
.glass-box {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.welcome-hero { padding: 2.5rem; }
.hero-bg-blob { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: 0.15; z-index: 0; }
.hero-bg-1 { top: -5%; right: -5%; width: 300px; height: 300px; background: var(--primary); animation: pulse 6s infinite; }
.hero-bg-2 { bottom: -10%; left: -5%; width: 400px; height: 400px; background: var(--accent); animation: pulse 6s infinite 3s; }

/* LEGACY UTILITY LAYER (PURE CSS REPLACEMENTS FOR TAILWIND) */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }

.p-4 { padding: 1rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; } .p-10 { padding: 2.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; } .mb-10 { margin-bottom: 2.5rem; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.uppercase { text-transform: uppercase; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-tight { letter-spacing: -0.025em; }

.text-white { color: #fff; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-accent { color: var(--accent); }
.bg-primary { background-color: var(--primary); }
.bg-surface { background-color: var(--surface); }

/* Dashboard Specific Components */
.status-badge-green { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); padding: 2px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.dot-green { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; }
.dot-amber { width: 8px; height: 8px; background: #f59e0b; border-radius: 50%; }

.stat-icon-primary { width: 3rem; height: 3rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; background: rgba(168, 85, 247, 0.1); border: 1px solid rgba(168, 85, 247, 0.2); color: var(--primary); }
.stat-icon-amber { width: 3rem; height: 3rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); color: #f59e0b; }
.stat-icon-accent { width: 3rem; height: 3rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; background: rgba(217, 70, 239, 0.1); border: 1px solid rgba(217, 70, 239, 0.2); color: var(--accent); }
.border-primary-dim { border-color: rgba(168, 85, 247, 0.1) !important; }

.rounded-xl { border-radius: 0.75rem; }

.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border); }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.hidden { display: none; }

/* Universal Table Styles */
.admin-table, .universal-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.admin-table th, .universal-table th { 
    background: rgba(255,255,255,0.01); padding: 1.25rem 1.5rem; text-align: left; 
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase; color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}
.admin-table td, .universal-table td { padding: 1.25rem 1.5rem; font-size: 0.825rem; border-bottom: 1px solid rgba(255,255,255,0.02); }
.admin-table tr:hover td, .universal-table tr:hover td { background: rgba(255,255,255,0.01); }

/* Responsive Grid Adjustments */
@media (max-width: 1024px) {
    .lg-hidden { display: none; }
    .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .md-flex { display: none; }
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .app-stage, .admin-main { padding: 1rem; }
}

/* Animations */
@keyframes pulse { 0%, 100% { opacity: 0.15; transform: scale(1); } 50% { opacity: 0.25; transform: scale(1.1); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.6s ease-out forwards; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Ambient Orbs */
.ambient-orb { position: absolute; border-radius: 50%; filter: blur(100px); z-index: -1; pointer-events: none; opacity: 0.6; }
.orb-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, rgba(0,0,0,0) 70%); animation: float-orb 20s infinite alternate ease-in-out; }
.orb-2 { top: 40%; right: -20%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(0,0,0,0) 70%); animation: float-orb 25s infinite alternate-reverse ease-in-out; }
.orb-3 { bottom: -20%; left: 20%; width: 40vw; height: 40vw; background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%); animation: float-orb 22s infinite alternate ease-in-out; }
@keyframes float-orb { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(10%, 10%) scale(1.1); } }

/* Text & Graphics */
.text-gradient { background: linear-gradient(to right, var(--primary), #fff, var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-graphics { perspective: 1000px; position: relative; }
.floating-element { animation: float-y 6s infinite ease-in-out; }
.floating-element-delayed { animation: float-y 7s infinite ease-in-out; animation-delay: -3s; }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.pulse-ring { border: 1px solid rgba(168, 85, 247, 0.3); border-radius: 50%; position: absolute; inset: 0; animation: ping 3s cubic-bezier(0, 0, 0.2, 1) infinite; }

/* Buttons Extra */
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-muted); padding: 0.75rem 1.5rem; border-radius: 0.75rem; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); color: #fff; border-color: rgba(255, 255, 255, 0.2); }

/* Section Overrides */
.section-hero { min-height: 100vh; display: flex; align-items: center; padding: 5rem 0; overflow: hidden; position: relative; }
.section-stats { padding: 5rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(30, 41, 59, 0.2); }
.section-padding { padding: 5rem 0; }

/* Avatar Groups */
.avatar-group { display: flex; align-items: center; }
.avatar-group img { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--bg-dark); margin-left: -0.75rem; }
.avatar-group img:first-child { margin-left: 0; }
.avatar-placeholder { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 2px solid var(--bg-dark); background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: #fff; margin-left: -0.75rem; }

/* Home Reveal States (GSAP) */
.reveal-up { opacity: 0; transform: translateY(50px); visibility: hidden; }
.reveal-scale { opacity: 0; transform: scale(0.9); visibility: hidden; }

/* Ticker Fix */
.ticker-highlight { color: var(--primary); font-weight: 700; margin: 0 0.25rem; }

/* Extra Utilities */
.max-w-7xl { max-width: 80rem; margin-left: auto; margin-right: auto; }
.pt-10 { padding-top: 2.5rem; } .pt-20 { padding-top: 5rem; } .pt-8 { padding-top: 2rem; }
.pb-20 { padding-bottom: 5rem; } .pb-32 { padding-bottom: 8rem; }
.mb-8 { margin-bottom: 2rem; } .mb-12 { margin-bottom: 3rem; } .mb-16 { margin-bottom: 4rem; } .mb-3 { margin-bottom: 0.75rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; }
.border-t { border-top: 1px solid var(--border); } .border-y { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bg-dark { background-color: var(--bg-dark); }
.text-4xl { font-size: 2.25rem; } .text-5xl { font-size: 3rem; } .text-7xl { font-size: 4.5rem; }
.tracking-tighter { letter-spacing: -0.05em; }
.z-10 { z-index: 10; } .z-20 { z-index: 20; } .z-30 { z-index: 30; }
.inset-0 { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.rotate-4 { transform: rotate(4deg); } .rotate--6 { transform: rotate(-6deg); }
.opacity-30 { opacity: 0.3; } .opacity-50 { opacity: 0.5; } .opacity-60 { opacity: 0.6; } .opacity-90 { opacity: 0.9; }
.w-16 { width: 4rem; } .h-16 { height: 4rem; } .w-20 { width: 5rem; } .h-20 { height: 5rem; } .w-24 { width: 6rem; } .h-24 { height: 6rem; } .w-32 { width: 8rem; } .h-32 { height: 8rem; } .w-48 { width: 12rem; } .w-56 { width: 14rem; }
.rounded-3xl { border-radius: 1.5rem; }
