/* assets/css/main.css */

:root {
    /* Dark Luxury Theme */
    --bg-primary: #050814;
    --bg-secondary: #0b1020;
    --bg-tertiary: #121828;

    /* Gold Accents */
    --gold-primary: #c9a44c;
    --gold-secondary: #e6c873;
    --gold-tertiary: #b8942b;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --text-disabled: #6b7280;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #c9a44c 0%, #e6c873 100%);
    --gradient-dark: linear-gradient(135deg, #0b1020 0%, #121828 100%);

    /* Shadows & Glows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glow-gold: 0 0 20px rgba(201, 164, 76, 0.3);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Header height */
    --header-height: 70px;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background:
        radial-gradient(circle at 80% 10%, rgba(201, 164, 76, 0.08), transparent 40%),
        radial-gradient(circle at 20% 90%, rgba(255, 255, 255, 0.04), transparent 40%),
        var(--bg-primary);
    color: var(--text-secondary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== HEADER STYLES ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(5, 8, 20, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    z-index: 100;
    height: var(--header-height);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* Left side logo */
.header-left-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 14px rgba(201, 164, 76, .35), 0 0 28px rgba(255, 255, 255, .08);
}

/* Right navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
    margin-left: auto;
    /* push to the right */
}

.desktop-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--gold-primary);
}

/* User info inside desktop-nav */
.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
    /* extra spacing before user section */
}

.user-name {
    color: var(--gold-primary);
    font-weight: 600;
    font-size: 14px;
}

.role-badge {
    background: rgba(201, 164, 76, 0.2);
    color: var(--gold-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(201, 164, 76, 0.3);
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(201, 164, 76, 0.1);
}

/* Minimal header (only back link) */
.minimal-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--gold-primary);
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    margin-left: 15px;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gold-primary);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(5, 8, 20, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 164, 76, 0.2);
    padding: 20px;
    z-index: 100;
    animation: slideDown 0.3s ease;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 15px 0;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu a:last-child {
    border-bottom: none;
}
option {
  color: var(--gold);
}
.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--gold-primary);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main content offset (because of fixed header) */
.container,
.main-container,
.dashboard-content {
    padding-top: var(--header-height);
}

/* ========== RESPONSIVE HEADER ADJUSTMENTS ========== */
@media (max-width: 1200px) {
    .user-info {
        gap: 10px;
    }

    .user-name {
        font-size: 12px;
    }

    .logout-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .role-badge {
        font-size: 10px;
        padding: 2px 8px;
    }
}

@media (max-width: 1024px) {
    .site-logo {
        width: 50px;
        height: 50px;
    }

    .desktop-nav {
        gap: 15px;
    }

    .user-info {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .desktop-nav {
        display: none;
    }

    .site-logo {
        width: 45px;
        height: 45px;
    }

    .container,
    .main-container,
    .dashboard-content {
        padding-top: calc(var(--header-height) + 5px);
    }
}

@media (max-width: 480px) {
    .site-logo {
        width: 40px;
        height: 40px;
    }

    .container,
    .main-container,
    .dashboard-content {
        padding-top: calc(var(--header-height) + 10px);
    }
}

/* ========== REMAINING STYLES (glass panels, cards, etc.) ========== */
/* Luxury Glass Effect */
.glass-panel {
    background: rgba(11, 16, 32, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(201, 164, 76, 0.05), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Luxury Cards */
.luxury-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    position: relative;
    transition: all var(--transition-normal);
}

.luxury-card:hover {
    border-color: rgba(201, 164, 76, 0.3);
    box-shadow: var(--glow-gold);
    transform: translateY(-2px);
}

.luxury-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: radial-gradient(circle at top right, rgba(201, 164, 76, 0.15), transparent 60%);
    border-radius: calc(var(--radius-lg) + 1px);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.luxury-card:hover::after {
    opacity: 1;
}

/* Gold Accent Elements */
.gold-accent {
    color: var(--gold-primary);
    position: relative;
    display: inline-block;
}

.gold-accent::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.gold-accent:hover::after {
    transform: scaleX(1);
}

/* Progress Bars */
.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-gold);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Streak Indicator */
.streak-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(201, 164, 76, 0.1);
    border: 1px solid rgba(201, 164, 76, 0.3);
    border-radius: var(--radius-md);
    color: var(--gold-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.streak-badge::before {
    content: '🔥';
    margin-right: var(--spacing-xs);
}

/* Habit Grid */
.habit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.habit-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
}

.habit-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: var(--glow-gold);
}

.habit-streak {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-primary);
    text-shadow: 0 0 10px rgba(201, 164, 76, 0.5);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.metric-widget {
    grid-column: span 3;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.metric-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-primary);
    line-height: 1;
}

/* Navigation (original .nav-luxury, .nav-brand) – kept for compatibility */
.nav-luxury {
    background: rgba(5, 8, 20, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-brand {
    font-weight: 900;
    letter-spacing: 0.2em;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.nav-brand .ancho {
    color: var(--text-primary);
}

.nav-brand .rage {
    color: var(--gold-primary);
    animation: ragePulse 3s ease-in-out infinite;
    margin: 0 2px;
}

.nav-brand .aged {
    color: var(--gold-secondary);
}

@keyframes ragePulse {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(201, 164, 76, 0.3);
    }

    50% {
        text-shadow:
            0 0 20px rgba(201, 164, 76, 0.8),
            0 0 30px rgba(201, 164, 76, 0.4);
    }
}

/* Buttons */
.btn-gold {
    background: var(--gradient-gold);
    color: #000;
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-gold);
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gold:hover::before {
    left: 100%;
}

/* Footer */
.dashboard-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, .05);
    margin-top: 50px;
}

/* Company specific */
.company-users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.company-user-progress {
    margin-top: 10px;
}

.company-user-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .metric-widget {
        grid-column: span 6;
    }

    .habit-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design (original) */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .metric-widget {
        grid-column: span 6;
    }

    .habit-grid {
        grid-template-columns: 1fr;
    }
}