/* ── EduPredict – Bootstrap 5 Custom Theme ─────────────────── */
/* Google Font: Inter loaded in base.html */

:root {
    --ep-sidebar: 260px;
    --ep-dark: #1e293b;
    --ep-dark-hover: #334155;
    --ep-primary: #4f46e5;
    --ep-success: #10b981;
    --ep-warning: #f59e0b;
    --ep-danger: #ef4444;
    --ep-info: #06b6d4;
}

/* ── Global ───────────────────────────────────────────────── */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    color: #334155;
}
a { color: var(--ep-primary); }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar,
.sidebar-offcanvas {
    background: var(--ep-dark);
    color: #fff;
    width: var(--ep-sidebar);
}
.sidebar-offcanvas { width: 280px; background: var(--ep-dark); }
.sidebar .sidebar-brand { font-size: 1.15rem; }

.sidebar-nav .nav-link {
    color: rgba(255,255,255,.65);
    padding: .65rem 1.25rem;
    font-size: .9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .65rem;
    border-radius: 0;
    transition: all .15s ease;
}
.sidebar-nav .nav-link:hover {
    color: #fff;
    background: var(--ep-dark-hover);
}
.sidebar-nav .nav-link.active {
    color: #fff;
    background: var(--ep-primary);
}
.sidebar-nav .nav-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; }

/* Main wrapper */
.main-wrapper { min-height: 100vh; }

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

/* ── Tables ───────────────────────────────────────────────── */
.table { font-size: .875rem; }
.table thead th {
    background: #f8fafc;
    font-weight: 600;
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .04em;
    color: #64748b;
    border-bottom-width: 2px;
    white-space: nowrap;
}
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #f1f5f9; }

/* ── Risk Badges ──────────────────────────────────────────── */
.badge-high   { background: #fef2f2 !important; color: var(--ep-danger) !important; }
.badge-medium { background: #fffbeb !important; color: #b45309 !important; }
.badge-low    { background: #ecfdf5 !important; color: #047857 !important; }

/* ── Cards override ───────────────────────────────────────── */
.card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-header {
    background: #fff;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

/* ── Recommendation items ─────────────────────────────────── */
.rec-item {
    padding: .75rem 1rem;
    border-left: 3px solid var(--ep-info);
    background: #f0f9ff;
    border-radius: 0 .5rem .5rem 0;
    margin-bottom: .5rem;
    font-size: .875rem;
}
.rec-item .strategy-label {
    font-size: .7rem;
    text-transform: uppercase;
    color: var(--ep-info);
    font-weight: 700;
    margin-bottom: .15rem;
}

/* ── Filter pills ─────────────────────────────────────────── */
.filter-pills .btn { border-radius: 50rem; font-size: .82rem; font-weight: 500; }

/* ── Feature importance bars ──────────────────────────────── */
.fi-bar-bg {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}
.fi-bar {
    height: 100%;
    background: var(--ep-primary);
    border-radius: 5px;
    transition: width .4s ease;
}

/* ── Range sliders ────────────────────────────────────────── */
input[type="range"] {
    width: 100%;
    accent-color: var(--ep-primary);
}

/* ── Login ────────────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--ep-primary) 0%, var(--ep-dark) 100%);
}

/* ── Chart container ──────────────────────────────────────── */
.chart-box {
    position: relative;
    width: 100%;
    max-height: 320px;
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
    .sidebar, .sidebar-offcanvas, .navbar, .btn, .filter-pills, .offcanvas-backdrop { display: none !important; }
    .main-wrapper { margin: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ── Accordion ────────────────────────────────────────────── */
.accordion-item {
    border: none;
    border-radius: .75rem !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    margin-bottom: .75rem;
}
.accordion-button {
    font-weight: 600;
    font-size: .9rem;
    border-radius: .75rem !important;
}
.accordion-button:not(.collapsed) {
    background: #f8fafc;
    color: var(--ep-primary);
    box-shadow: none;
}
.accordion-button:focus { box-shadow: none; }

/* ── Tabs ─────────────────────────────────────────────────── */
.nav-tabs .nav-link {
    font-weight: 500;
    font-size: .875rem;
    color: #64748b;
}
.nav-tabs .nav-link.active {
    font-weight: 600;
    color: var(--ep-primary);
    border-color: #dee2e6 #dee2e6 #fff;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination .page-link {
    font-size: .8rem;
    color: var(--ep-primary);
    border-color: #e2e8f0;
}
.pagination .page-item.active .page-link {
    background: var(--ep-primary);
    border-color: var(--ep-primary);
}
