/* assets/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&family=Roboto:wght@400;500;700&family=Playfair+Display:wght@400;700&family=Montserrat:wght@400;500;700&family=Open+Sans:wght@400;600;700&family=Lato:wght@400;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-soft: rgba(79, 70, 229, 0.08);
    --bg-main: #ffffff;
    --bg-surface: #f9fafb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #f1f1f1;
    --radius: 12px;
    --shadow-minimal: 0 4px 12px rgba(0, 0, 0, 0.03);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--text-main);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

input:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

/* Layout Components */
.card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-minimal);
}

/* Sidebar & Navigation (Mobile Default) */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    z-index: 100;
    transition: left 0.3s ease;
    padding: 2rem 1.5rem;
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 90;
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 80;
}

.sidebar nav ul {
    list-style: none;
    margin-top: 2rem;
}

.sidebar nav ul a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.sidebar nav ul a:hover,
.sidebar nav ul a.active {
    background: white;
    color: var(--text-main);
    box-shadow: var(--shadow-minimal);
}

/* Desktop Overrides */
@media (min-width: 1024px) {
    .container {
        padding: 0 3rem;
    }

    .sidebar {
        left: 0;
        padding: 3rem 1.5rem;
    }

    .mobile-header {
        display: none;
    }

    .main-content {
        margin-left: 280px;
        padding: 3rem;
    }

    .card {
        padding: 2rem;
    }
}

/* Utils */
.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.text-muted {
    color: var(--text-muted);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Analytics Grid Override for Desktop */
@media (min-width: 1024px) {
    #analytics .stats-grid {
        grid-template-columns: 1fr 2fr;
    }
}

/* =========================================
   NAVIGATION (Migrated from index.php)
   ========================================= */
header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: none;
}

.mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-surface);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-main);
}

.close-nav {
    position: absolute;
    top: 1.5rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

@media (min-width: 968px) {
    .nav-links {
        display: flex;
        list-style: none;
        gap: 2rem;
        align-items: center;
    }

    .nav-links li a {
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.95rem;
        font-weight: 500;
        transition: color 0.2s;
        position: relative;
    }

    .nav-links li a:hover,
    .nav-links li a.active {
        color: var(--text-main);
        font-weight: 600;
    }

    .nav-links li a.active::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--primary);
        border-radius: 2px;
    }

    .mobile-nav-toggle {
        display: none;
    }
}