:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #eab308;
    --radius: 16px;
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --font-head: 'Segoe UI', system-ui, sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-head);
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Base Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    /* Slight hover effect for interactivity */
    transform: translateY(-2px);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    box-sizing: border-box;
    /* Fix sizing issues */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: var(--danger);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

/* Scroll wrapper */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Utils */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.badge-warning {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.text-wrap {
    word-break: break-all;
    max-width: 200px;
}

.text-nowrap {
    white-space: nowrap;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Hide for now, can implement toggle later or standard hamburger */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #1e1b4b;
        flex-direction: column;
        padding: 1rem;
        z-index: 100;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links a {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 1rem;
    }

    .nav-links a:hover::after {
        width: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.hero h1,
.hero p {
    animation: fadeIn 0.6s ease-out forwards;
}