/* * AURA HEALTH OS - DESIGN SYSTEM V2.0 
 * Inspired by Aerospace Interfaces & Glassmorphism
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Orbital Theme Palette (Dark Default) */
    --bg-deep: #050505;
    --bg-surface: #0a0a0a;
    --primary-neon: #00f0ff; /* Cyber Blue */
    --primary-dim: rgba(0, 240, 255, 0.1);
    --secondary-neon: #7000ff; /* Deep Plasma */
    --text-main: #ffffff;
    --text-muted: #8892b0;
    --success: #00ff9d;
    --danger: #ff0055;
    
    /* Navigation Colors (Dark) */
    --nav-bg: rgba(5, 5, 5, 0.7);
    --nav-scrolled-bg: rgba(5, 5, 5, 0.95);
    
    /* Glass Physics */
    --glass-surface: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-highlight: 1px solid rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 20px 50px rgba(0,0,0,0.5);
    --blur-strength: blur(40px);
}

[data-theme="light"] {
    --bg-deep: #f4f7f6;
    --bg-surface: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #5a6a85;
    --glass-surface: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 20px 50px rgba(0,0,0,0.1);
    
    /* Navigation Colors (Light) */
    --nav-bg: rgba(255, 255, 255, 0.7);
    --nav-scrolled-bg: rgba(255, 255, 255, 0.95);
}

/* Global Reset & Typography */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* * COMPONENT: ULTRA-GLASS CARD */
.glass {
    background: var(--glass-surface);
    backdrop-filter: var(--blur-strength);
    -webkit-backdrop-filter: var(--blur-strength);
    border: var(--glass-border);
    border-top: var(--glass-highlight);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    border-color: var(--primary-neon);
}

/* Background Atmosphere */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}
.orb-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--secondary-neon); }
.orb-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; background: var(--primary-neon); animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

/* Navigation System */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: none; /* Line removed */
    transition: background 0.3s, padding 0.3s, box-shadow 0.3s, top 0.1s;
}

.glass-nav.scrolled {
    background: var(--nav-scrolled-bg) !important;
    box-shadow: var(--glass-shadow);
}

.glass-nav .container { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i, .logo img { -webkit-text-fill-color: initial; }

.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-main); text-shadow: 0 0 20px rgba(255,255,255,0.3); }

/* Buttons */
.btn {
    padding: 14px 32px;
    background: var(--text-main);
    color: var(--bg-deep);
    border: none;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    transition: 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn:hover { transform: scale(1.05); box-shadow: 0 0 30px var(--primary-dim); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary-neon), var(--secondary-neon));
    color: white;
}

/* Layout & Grid - RESPONSIVE FIXES START HERE */
.container { 
    max-width: 1300px; 
    margin: 0 auto; 
    padding: 0 20px; /* Reduced from 40px for mobile friendliness */
}

/* Smart Grid: Drops to single column at 280px width to prevent overflow */
.grid-3 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}

/* Dashboard Specifics */
.admin-layout { padding-top: 100px; display: flex; gap: 30px; min-height: 100vh; }

.sidebar {
    width: 280px;
    height: calc(100vh - 120px);
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-neon) rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--primary-neon); border-radius: 4px; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 5px;
    transition: 0.3s;
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-neon);
}
.sidebar-link i { width: 20px; text-align: center; }

/* Forms */
input, textarea, select {
    width: 100%;
    padding: 18px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    transition: 0.3s;
    margin-bottom: 20px;
}
[data-theme="light"] input, [data-theme="light"] textarea, [data-theme="light"] select {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.1);
    color: #333;
}
input:focus, textarea:focus {
    border-color: var(--primary-neon);
    box-shadow: 0 0 20px var(--primary-dim);
    background: rgba(0,0,0,0.4);
}
[data-theme="light"] input:focus, [data-theme="light"] textarea:focus { background: white; }

label { display: block; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

/* Stats Numbers */
.stat-value { font-size: 3rem; font-weight: 700; background: linear-gradient(to bottom, #fff, #888); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
[data-theme="light"] .stat-value { background: linear-gradient(to bottom, #333, #666); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { color: var(--text-muted); font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; }

/* Typography Scale */
h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 20px; letter-spacing: -2px; }
h2 { font-size: 2.5rem; margin-bottom: 20px; letter-spacing: -1px; }

/* Table Styling */
table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
th { text-align: left; padding: 20px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; }
td { padding: 20px; background: rgba(255,255,255,0.02); }
[data-theme="light"] td { background: rgba(0,0,0,0.02); }
tr:hover td { background: rgba(255,255,255,0.05); }
[data-theme="light"] tr:hover td { background: rgba(0,0,0,0.05); }

/* --- RESPONSIVE MEDIA QUERIES --- */

/* Tablet (Landscape) & Small Laptops */
@media (max-width: 1024px) {
    .sidebar { display: none; } /* Mobile Menu would go here */
    .admin-layout { flex-direction: column; }
    h1 { font-size: 3rem; }
    .container { padding: 0 30px; }
}

/* Tablet (Portrait) & Mobile */
@media (max-width: 768px) {
    /* Force inline grids (Hero, About, Contact) to stack */
    #hero .container > div,
    .container > div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        display: grid !important;
    }

    h1 { font-size: 2.8rem !important; }
    h2 { font-size: 2rem !important; }
    
    .glass { padding: 25px !important; }
    
    /* Ensure Hero content order: Text first, Visual second */
    #hero .container > div > div:first-child { order: 1; }
    #hero .container > div > div:last-child { order: 2; margin-top: 20px; }

    /* Admin Tables scrollable */
    .glass { overflow-x: auto; }
    table { min-width: 600px; }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .container { padding: 0 15px; }
    
    /* Force single column grid */
    .grid-3 { grid-template-columns: 1fr; }
    
    .btn { width: 100%; justify-content: center; margin-bottom: 10px; }
    
    h1 { font-size: 2.2rem !important; word-wrap: break-word; }
    
    /* Navigation adjustments */
    .logo { font-size: 1.2rem; }
}