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

:root {
    --primary: #2563EB;
    --primary-dark: #1d4ed8;
    --accent: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;

    /* Dark palette */
    --bg:        #060918;
    --bg-2:      #0d1117;
    --card-bg:   rgba(255,255,255,0.04);
    --card-border: rgba(255,255,255,0.1);
    --text:      #f1f5f9;
    --text-muted: rgba(255,255,255,0.45);
    --text-dim:  rgba(255,255,255,0.25);
    --input-bg:  rgba(255,255,255,0.06);
    --input-border: rgba(255,255,255,0.12);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 15px;
}

/* ── NAVBAR ────────────────────────────── */
.navbar {
    background: rgba(6,9,24,0.92) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 12px 0;
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: #fff !important;
}
.navbar-brand i { color: #2563EB !important; }

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65) !important;
    transition: color 0.2s;
    padding: 6px 12px !important;
    border-radius: 8px;
}
.nav-link:hover { color: #fff !important; background: rgba(255,255,255,0.07); }

.navbar .btn-primary {
    background: var(--primary);
    border: none;
    font-size: 0.85rem;
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 600;
}
.navbar .form-control {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 0.85rem;
    border-radius: 8px 0 0 8px;
}
.navbar .form-control::placeholder { color: rgba(255,255,255,0.35); }
.navbar .form-control:focus {
    background: rgba(255,255,255,0.11);
    box-shadow: none;
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}
.navbar .btn-outline-primary {
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.65);
    border-radius: 0 8px 8px 0;
}
.navbar .btn-outline-primary:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ── DROPDOWN ──────────────────────────── */
.dropdown-menu {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    padding: 6px;
}
.dropdown-item {
    color: rgba(255,255,255,0.75);
    border-radius: 8px;
    font-size: 0.88rem;
    padding: 9px 14px;
    transition: background 0.15s;
}
.dropdown-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.dropdown-item.text-danger { color: #f87171 !important; }
.dropdown-divider { border-color: rgba(255,255,255,0.08); }

/* ── FLASH ALERTS ──────────────────────── */
.alert {
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    border: none;
}
.alert-success  { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-danger   { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-warning  { background: rgba(245,158,11,0.1);  border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info     { background: rgba(37,99,235,0.1);   border: 1px solid rgba(37,99,235,0.3);  color: #93c5fd; }
.btn-close { filter: invert(1); }

/* ── CARDS ─────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    color: var(--text);
}
.card-header {
    background: rgba(255,255,255,0.03) !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    color: var(--text);
}
.card-body { color: var(--text); }

/* ── FORMS ─────────────────────────────── */
.form-control, .form-select {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: var(--radius-sm) !important;
    color: #fff !important;
    padding: 11px 14px !important;
    font-size: 0.9rem !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    background: rgba(255,255,255,0.09) !important;
    border-color: rgba(37,99,235,0.6) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15) !important;
    color: #fff !important;
    outline: none !important;
}
.form-control::placeholder { color: var(--text-dim) !important; }
.form-select option { background: #0d1117; color: #fff; }

.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
.form-text { color: var(--text-dim) !important; font-size: 0.78rem; }

/* ── BUTTONS ───────────────────────────── */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(37,99,235,0.45);
    transform: translateY(-1px);
}
.btn-outline-secondary {
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
}
.btn-outline-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
    color: #fff;
}

/* ── TABLES ────────────────────────────── */
.table {
    color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(255,255,255,0.04);
}
.table thead th {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 16px;
}
.table td {
    border-color: rgba(255,255,255,0.06);
    padding: 12px 16px;
    vertical-align: middle;
}
.table-hover tbody tr:hover td { background: rgba(255,255,255,0.04); }

/* ── NAV PILLS / TABS ──────────────────── */
.nav-pills .nav-link {
    color: var(--text-muted) !important;
    background: transparent;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 7px 16px !important;
}
.nav-pills .nav-link.active {
    background: rgba(37,99,235,0.2) !important;
    color: #93c5fd !important;
}
.nav-pills .nav-link:hover:not(.active) {
    background: rgba(255,255,255,0.06) !important;
    color: #fff !important;
}

/* ── BADGES ────────────────────────────── */
.badge { border-radius: 6px; font-weight: 600; }

/* ── SCROLLBAR ─────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── FOOTER ────────────────────────────── */
footer {
    background: rgba(255,255,255,0.02) !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
}

/* ── INPUT GROUP ───────────────────────── */
.input-group-text {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: var(--text-muted) !important;
}

/* ── MODAL ─────────────────────────────── */
.modal-content {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    color: var(--text);
}
.modal-header {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.modal-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── TEXT UTILITIES ────────────────────── */
.text-muted { color: var(--text-muted) !important; }
.fw-600 { font-weight: 600; }
