/* ============================================================
   Brandlevate CBT – Staff Portal Styles
   Author: Brandlevate Technologies | v1.0.0
   ============================================================ */

/* ── Portal wrapper ─────────────────────────────────────────── */
.blv-sp-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1f2937;
    min-height: 100vh;
    background: #f3f4f6;
}

/* ── Header ─────────────────────────────────────────────────── */
.blv-sp-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.blv-sp-header-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* ── Stats bar ──────────────────────────────────────────────── */
.blv-sp-stats {
    display: flex;
    gap: 0;
    background: #2563eb;
    color: #fff;
}

.blv-sp-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    border-right: 1px solid rgba(255,255,255,.15);
}
.blv-sp-stat:last-child { border-right: none; }

.blv-sp-stat-num {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
}

.blv-sp-stat-lbl {
    font-size: .72rem;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: 3px;
    text-align: center;
}

/* ── Body / Tabs ─────────────────────────────────────────────── */
.blv-sp-body {
    padding: 0 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.blv-sp-tabs {
    margin-top: 20px;
    margin-bottom: 0;
    border-bottom: 2px solid #e5e7eb;
}

.blv-sp-tab-pane { display: none; padding-top: 20px; }
.blv-sp-tab-pane.active { display: block; }

/* ── Toolbar ─────────────────────────────────────────────────── */
.blv-sp-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ── Exam Grid ──────────────────────────────────────────────── */
.blv-sp-exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
    gap: 16px;
}

.blv-sp-exam-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    transition: box-shadow .18s;
    position: relative;
}
.blv-sp-exam-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.10); }
.blv-sp-exam-card.draft-card { border-left: 4px solid #d97706; }
.blv-sp-exam-card.published-card { border-left: 4px solid #16a34a; }
.blv-sp-exam-card.archived-card { border-left: 4px solid #9ca3af; opacity:.7; }

.blv-sp-exam-subject {
    font-size: .72rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 4px;
    display: block;
}

.blv-sp-exam-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1f2937;
}

.blv-sp-exam-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: .76rem;
    color: #6b7280;
    margin-bottom: 14px;
}

.blv-sp-exam-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── Class Grid ─────────────────────────────────────────────── */
.blv-sp-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
    gap: 16px;
}

.blv-class-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    transition: box-shadow .18s;
}
.blv-class-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.10); }

.blv-class-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.blv-class-badge {
    background: #eff6ff;
    color: #2563eb;
    font-size: .8rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: .04em;
}

.blv-class-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.blv-class-teacher {
    font-size: .8rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.blv-class-meta {
    font-size: .76rem;
    color: #9ca3af;
    margin-bottom: 14px;
}

.blv-class-card-footer {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── Questions Table ─────────────────────────────────────────── */
.blv-sp-q-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.blv-sp-q-table th {
    background: #f9fafb;
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #e5e7eb;
}

.blv-sp-q-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.blv-sp-q-table tr:last-child td { border-bottom: none; }
.blv-sp-q-table tr:hover td { background: #f9fafb; }

/* ── Results Table ───────────────────────────────────────────── */
.blv-sp-results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.blv-sp-result-stat {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.blv-sp-result-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #2563eb;
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.blv-sp-result-stat-lbl {
    font-size: .74rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Portal login card accent ────────────────────────────────── */
.blv-portal-card { border-top: 4px solid #2563eb; }

.blv-portal-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}

.blv-portal-badge-sm {
    display: inline-block;
    background: rgba(37,99,235,.12);
    color: #2563eb;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}

/* ── Admin class grid ────────────────────────────────────────── */
.blv-class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px,1fr));
    gap: 16px;
    margin-top: 16px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .blv-sp-stats   { flex-wrap: wrap; }
    .blv-sp-stat    { min-width: 45%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
    .blv-sp-body    { padding: 0 12px 32px; }
    .blv-sp-exam-grid, .blv-sp-class-grid { grid-template-columns: 1fr; }
    .blv-sp-toolbar { flex-direction: column; align-items: stretch; }
    .blv-sp-results-summary { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 480px) {
    .blv-sp-header  { padding: 10px 12px; }
    .blv-sp-stat-num { font-size: 1.3rem; }
    .blv-class-grid  { grid-template-columns: 1fr; }
}
