/* Black White Theme - Braun-Inspired Minimalism */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    /* Color Palette - Monochrome */
    --bg-deep: #000000;
    --bg-subtle: #0a0a0a;
    --bg-card: rgba(20, 20, 20, 0.7);
    --bg-glass: rgba(15, 15, 15, 0.8);
    --bg-elevated: #1a1a1a;

    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --text-inverse: #000000;

    /* Monochrome Accents */
    --accent-white: #FFFFFF;
    --accent-light-gray: #E5E5E5;
    --accent-mid-gray: #999999;
    --accent-dark-gray: #333333;

    /* Borders & Shadows */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-strong: rgba(255, 255, 255, 0.25);
    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 16px 48px rgba(0, 0, 0, 0.6);

    /* Layout */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Fonts - Clean, Modern, Functional */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography - Braun's Precision */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--accent-white);
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Minimalist Card Design */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-subtle);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-medium);
}

/* Buttons - Functional & Clear */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    position: relative;
}

.btn-primary {
    background: var(--accent-white);
    color: var(--text-inverse);
    border: 2px solid var(--accent-white);
}

.btn-primary:hover {
    background: var(--accent-light-gray);
    transform: translateY(-1px);
    box-shadow: var(--shadow-subtle);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-medium);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-strong);
}

/* Inputs - Clean & Precise */
input,
textarea,
select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    width: 100%;
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Utilities */
.text-white {
    color: var(--accent-white);
}

.text-muted {
    color: var(--text-secondary);
}

.text-subtle {
    color: var(--text-muted);
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Minimalist Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.f-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Hover Effect - Subtle */
.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 2rem 0;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1.5rem;
    }
}

/* Minimalist Loading State */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--accent-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Mobile Navigation (Global)
   ========================================= */
.sidebar-nav {
    display: none;
}

.mobile-top-nav {
    display: none;
    /* Hidden on desktop */
}

/* Mobile Top Nav Bar & Drawer */
@media (max-width: 1024px) {
    .mobile-top-nav {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #000000;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        backdrop-filter: blur(10px);
    }

    .mobile-logo {
        font-family: 'Outfit', sans-serif;
        font-size: 1.5rem;
        font-weight: 800;
        color: #fff;
        text-decoration: none;
    }

    .mobile-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .mobile-icon-btn {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 1.2rem;
        cursor: pointer;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-icon-btn .badge {
        position: absolute;
        top: -5px;
        right: -8px;
        background: #fff;
        color: #000;
        font-size: 0.6rem;
        font-weight: bold;
        padding: 2px 4px;
        border-radius: 50%;
    }

    /* Off-Canvas Sidebar Drawer */
    .sidebar-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 250px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        background: #000;
        flex-direction: column;
        display: flex !important;
        padding-top: 0;
    }

    .sidebar-nav.active {
        left: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar-header,
    .logo,
    .sidebar-footer {
        display: block !important;
    }

    .sidebar-header {
        padding: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-header .logo {
        font-size: 1.5rem;
        font-weight: 800;
        color: var(--accent-white);
        text-decoration: none;
        font-family: 'Outfit', sans-serif;
    }

    .sidebar-menu {
        flex-direction: column !important;
        overflow-y: auto;
        width: 100%;
        display: flex !important;
        flex: 1;
        justify-content: flex-start;
    }

    .sidebar-menu .nav-item {
        width: 100%;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1rem 1.5rem;
        justify-content: flex-start;
        display: flex !important;
        align-items: center;
        gap: 1rem;
        color: var(--text-secondary);
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s;
    }

    .sidebar-menu .nav-item:hover,
    .sidebar-menu .nav-item.active {
        color: var(--accent-white);
        background: rgba(255, 255, 255, 0.05);
        border-right: 3px solid var(--accent-white) !important;
    }

    .sidebar-menu .nav-item i {
        width: 20px;
        text-align: center;
        font-size: 1.1rem;
    }

    .sidebar-footer {
        padding: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: auto;
    }

    .btn-logout {
        width: 100%;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-secondary);
        padding: 0.8rem;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        font-size: 0.9rem;
    }

    .btn-logout:hover {
        border-color: #ef4444;
        color: #ef4444;
    }

    /* Overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        display: none;
        opacity: 0;
        transition: opacity 0.3s;
        backdrop-filter: blur(2px);
    }

    .nav-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Layout Adjustments */
    .app-container,
    .main-container,
    body {
        /* Ensure there's space for fixed header if wrapper usage varies */
    }

    /* Ensure dashboard specific fixes don't conflict, 
       but here we set defaults for other pages */
    .container {
        padding-top: 60px;
        /* For Pages like Index/Shop */
    }
}