@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.1) 0, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, .brand-font {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Glassmorphism Classes */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Layout */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(15, 23, 42, 0.9);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    z-index: 100;
}

.main-content {
    margin-left: 280px;
    padding: 2rem 3rem;
    min-height: 100vh;
}

/* Components */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Navigation */
.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.75rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.nav-link i {
    font-size: 1.25rem;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 1.25rem;
    border: 1px solid var(--glass-border);
}

.stat-val {
    font-size: 2rem;
    font-weight: 800;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border-radius: 1.25rem;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: rgba(15, 23, 42, 0.5);
    padding: 1.25rem 1.5rem;
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 1.5rem 0.5rem; }
    .sidebar .nav-text, .sidebar h2 { display: none; }
    .main-content { margin-left: 80px; padding: 1.5rem; }
}

@media (max-width: 768px) {
    .sidebar { 
        width: 100%; 
        height: auto; 
        top: auto; 
        bottom: 0; 
        flex-direction: row; 
        padding: 0.5rem;
        display: flex;
        justify-content: space-around;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        border-radius: 20px 20px 0 0;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
    }
    .sidebar div:first-child { display: none; }
    .sidebar nav { 
        display: flex; 
        width: 100%; 
        justify-content: space-around;
        margin-top: 0 !important;
        padding-top: 0 !important;
        border-top: none !important;
    }
    .sidebar .nav-link { 
        margin-bottom: 0; 
        flex-direction: column; 
        gap: 0.25rem; 
        font-size: 0.65rem;
        padding: 0.5rem;
    }
    .sidebar .nav-link i { font-size: 1.25rem; }
    .main-content { margin-left: 0; margin-bottom: 70px; padding: 1rem; }
    .main-content header { flex-direction: column; gap: 1.5rem; align-items: flex-start !important; }
    
    .stats-grid { grid-template-columns: 1fr; }
    .glass-card { padding: 1.25rem; }
    .table-container { overflow-x: auto; }
}

@media (max-width: 480px) {
    .main-content header h1 { font-size: 1.5rem; }
    .stat-val { font-size: 1.5rem; }
}
