/* --- DESIGN SYSTEM --- Updated: 2026-04-22 18:24 */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #1e293b;
    --accent: #0ea5e9;
    --bg-main: #0b0f1a;
    --bg-card: #161e2d;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(22, 30, 45, 0.7);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
}

/* --- UTILITIES --- */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
    gap: 0.5rem;
    outline: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger-light {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-danger-light:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-primary-light {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.btn-primary-light:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* --- INPUTS --- */
.input-group {
    margin-bottom: 1.25rem;
}

.label {
    display: block;
    font-size: 0.813rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-control {
    width: 100%;
    height: 3.25rem;
    padding: 0 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 0.938rem;
    transition: all 0.2s;
    outline: none;
}

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

/* --- LAYOUT --- */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.main-content {
    flex: 1;
    padding: 2.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.75rem;
    margin-bottom: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

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

.nav-link i {
    width: 20px;
    margin-right: 0.875rem;
    font-size: 1.1rem;
}

/* --- CARDS & GRID --- */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.avatar-placeholder {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.user-title h4 {
    font-size: 1.063rem;
    font-weight: 700;
}

.user-title p {
    font-size: 0.813rem;
    color: var(--text-muted);
}

.user-stats {
    margin: 1.25rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-label { color: var(--text-muted); }
.stat-value { font-weight: 600; }

.badge-key {
    background: rgba(15, 23, 42, 0.4);
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-family: monospace;
    font-size: 0.813rem;
}

/* --- FILTER BAR --- */
.filter-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box .input-control {
    padding-left: 2.75rem;
}

.select-control {
    height: 3.25rem;
    padding: 0 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* --- LOGIN PAGE --- */
.login-page {
    background: radial-gradient(circle at top right, #1a1b2e, #0b0f1a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .filter-container { flex-direction: column; align-items: stretch; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { padding: 1.5rem; }
}
