/* public/css/main.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --bg-dark: #020617;
    --bg-sidebar: rgba(15, 23, 42, 0.82);
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --sidebar-width: 280px;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Main Layout - Standard Desktop First */
.app-container {
    display: block;
}

/* Sidebar Styling - Default (Desktop) */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    padding: 0;
    display: flex;
    flex-direction: column;
    /* Ensure it's always visible by default on desktop */
    transform: none;
}

.sidebar-header {
    padding: 2.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #818cf8, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    padding: 0 1rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.nav-links::-webkit-scrollbar {
    width: 4px;
}

.nav-links::-webkit-scrollbar-track {
    background: transparent;
}

.nav-links::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 20px;
}

.nav-item {
    margin-bottom: 0.4rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.25rem;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link i {
    margin-right: 1rem;
    font-size: 1.25rem;
    opacity: 0.8;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.nav-link.active i {
    opacity: 1;
}

/* Top Bar Styling - Default (Desktop) */
.top-bar {
    height: 70px;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 900;
    /* Force Margin on Desktop */
    margin-left: var(--sidebar-width);
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Main Content Styling - Default (Desktop) */
.main-content {
    /* Force Margin on Desktop */
    margin-left: var(--sidebar-width);
    padding: 2.5rem 3rem;
    min-height: calc(100vh - 70px);
    transition: all 0.4s ease;
}

/* Modern Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    color: white;
    outline: none;
    transition: all 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.3);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1.2rem;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-active,
.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-banned,
.status-failed,
.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 1.8rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-right: 1.25rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.stat-info h4 {
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.stat-info p {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Mobile Nav & Sidebar Toggles */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border);
    z-index: 1001;
    padding: 0 1.5rem;
    align-items: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.stat-card {
    animation: fadeIn 0.5s ease-out;
}

/* =========================================
   RESPONSIVE OVERRIDES (MOBILE/TABLET)
   ========================================= */
@media (max-width: 992px) {

    /* Hide sidebar by default on mobile */
    .sidebar {
        transform: translateX(-100%);
    }

    /* Show when toggled */
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.8);
    }

    /* Reset Margins for Mobile */
    .top-bar {
        margin-left: 0;
        padding: 0 1.5rem;
        position: static;
        height: auto !important;
        padding-top: 1rem;
        padding-bottom: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .mobile-nav {
        display: flex;
    }

    body {
        padding-top: 70px;
    }
}