:root {
    --bg: #0a0e1a;
    --bg2: #0f1428;
    --bg3: #141830;
    --card: #131929;
    --card2: #1a2236;
    --border: #1e2d4a;
    --border2: #253356;
    --accent: #00d4ff;
    --accent2: #0099bb;
    --green: #00e5a0;
    --green2: #00b87d;
    --red: #ff4466;
    --yellow: #ffd700;
    --orange: #ff8c42;
    --text: #e8edf7;
    --text2: #8fa3c0;
    --text3: #4a6080;
    --font: 'DM Sans', sans-serif;
    --font-display: 'Playfair Display', serif;
    --font-mono: 'DM Mono', monospace;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --glow: 0 0 20px rgba(0,212,255,0.15);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* === NAVBAR === */
.navbar {
    background: rgba(10,14,26,0.95);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}

.nav-brand .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--green));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav-brand span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 0.5rem; }

.nav-link {
    color: var(--text2);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover { background: var(--card2); color: var(--text); }
.nav-link.active { background: rgba(0,212,255,0.1); color: var(--accent); }

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--green));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: var(--bg);
}

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page { padding: 2rem 0; min-height: calc(100vh - 64px); }

/* === CARDS === */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === FORMS === */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: var(--font);
    font-size: 0.9rem;
    transition: all 0.2s;
    outline: none;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.form-control::placeholder { color: var(--text3); }
.form-select option { background: var(--bg2); }
textarea.form-control { resize: vertical; min-height: 90px; }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: var(--bg);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,212,255,0.3); }

.btn-success {
    background: linear-gradient(135deg, var(--green), var(--green2));
    color: var(--bg);
}
.btn-success:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--text2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,0.05); }

.btn-danger {
    background: rgba(255,68,102,0.15);
    border: 1px solid rgba(255,68,102,0.3);
    color: var(--red);
}
.btn-danger:hover { background: rgba(255,68,102,0.25); }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }

/* === BADGES === */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
}
.badge-success { background: rgba(0,229,160,0.15); color: var(--green); border: 1px solid rgba(0,229,160,0.3); }
.badge-danger { background: rgba(255,68,102,0.15); color: var(--red); border: 1px solid rgba(255,68,102,0.3); }
.badge-warning { background: rgba(255,215,0,0.15); color: var(--yellow); border: 1px solid rgba(255,215,0,0.3); }
.badge-info { background: rgba(0,212,255,0.15); color: var(--accent); border: 1px solid rgba(0,212,255,0.3); }
.badge-secondary { background: rgba(143,163,192,0.15); color: var(--text2); border: 1px solid var(--border2); }

/* === ALERTS === */
.alert {
    padding: 12px 16px; border-radius: 8px;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.875rem; margin-bottom: 1rem;
}
.alert-success { background: rgba(0,229,160,0.1); border: 1px solid rgba(0,229,160,0.3); color: var(--green); }
.alert-danger { background: rgba(255,68,102,0.1); border: 1px solid rgba(255,68,102,0.3); color: var(--red); }
.alert-warning { background: rgba(255,215,0,0.1); border: 1px solid rgba(255,215,0,0.3); color: var(--yellow); }
.alert-info { background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.3); color: var(--accent); }

/* === STATS === */
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex; align-items: flex-start; gap: 14px;
}

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}

.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 0.78rem; color: var(--text2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* === GRID === */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-1-2 { grid-template-columns: 1fr 2fr; gap: 1.5rem; }
.grid-2-1 { grid-template-columns: 2fr 1fr; gap: 1.5rem; }

/* === TABLE === */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(30,45,74,0.5);
    color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* === PROGRESS === */
.progress {
    background: var(--bg2);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    border-radius: 20px;
    transition: width 1s ease;
}

/* === SECTION HEADER === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
}
.section-subtitle {
    font-size: 0.85rem;
    color: var(--text2);
    margin-top: 2px;
}

/* === DIVIDER === */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.empty-desc { color: var(--text2); font-size: 0.875rem; margin-bottom: 1.5rem; }

/* === UTILITY === */
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text2); }
.text-sm { font-size: 0.8rem; }
.text-lg { font-size: 1.1rem; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* === GLOW LINES === */
.glow-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
    margin: 1.5rem 0;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* === AUTH === */
.auth-page { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:2rem; }
.auth-card { background:var(--card); border:1px solid var(--border); border-radius:16px; padding:2.5rem; width:100%; max-width:420px; }
.auth-logo { text-align:center; margin-bottom:2rem; }
.auth-logo .logo { font-size:2.5rem; }
.auth-logo h1 { font-family:var(--font-display); font-size:1.75rem; font-weight:800; margin-top:8px; }
.auth-logo p { color:var(--text2); font-size:0.875rem; margin-top:4px; }
.auth-footer { text-align:center; margin-top:1.5rem; font-size:0.85rem; color:var(--text2); }
.auth-footer a { color:var(--accent); text-decoration:none; font-weight:600; }
.error-list { color:var(--red); font-size:0.8rem; margin-top:4px; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-1-2, .grid-2-1 { grid-template-columns: 1fr; }
    .nav-links { display: none; }
}

@keyframes slideIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
