/* ==========================================================================
   SIKKHALAY INSTITUTE PORTAL — DEDICATED RESULT & EXAMINATION CSS
   Modern, High-Precision NCTB 7-Tier Grading, Tabulation & Transcript Styles
   ========================================================================== */

/* --- Root Variables & Theme Tokens --- */
:root {
    --result-primary: #059669;
    --result-primary-hover: #047857;
    --result-primary-light: rgba(5, 150, 105, 0.08);
    --result-accent: #6366f1;
    --result-gold: #f59e0b;
    --result-gold-light: #fef3c7;
    --grade-aplus: #10b981;
    --grade-a: #059669;
    --grade-aminus: #0284c7;
    --grade-b: #3b82f6;
    --grade-c: #d97706;
    --grade-d: #ea580c;
    --grade-f: #dc2626;
}

/* --- Filter & Action Bar --- */
.result-toolbar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.result-filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.result-select-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-select-wrapper label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.result-select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    min-width: 140px;
    transition: all 0.2s ease;
}

.result-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--result-primary-light);
}

/* --- Telemetry KPI Cards --- */
.result-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.result-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}

.result-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.result-kpi-info h4 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: 4px;
}

.result-kpi-info p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Sub-Tab Navigation --- */
.result-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.result-tab-btn {
    background: none;
    border: none;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.result-tab-btn i {
    font-size: 15px;
}

.result-tab-btn:hover {
    color: var(--brand-primary);
}

.result-tab-btn.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

/* --- Grade Badges --- */
.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.grade-aplus { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.grade-a { background: rgba(5, 150, 105, 0.12); color: #047857; }
.grade-aminus { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.grade-b { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.grade-c { background: rgba(217, 119, 6, 0.12); color: #d97706; }
.grade-d { background: rgba(234, 88, 12, 0.12); color: #c2410c; }
.grade-f { background: rgba(220, 38, 38, 0.15); color: #dc2626; font-weight: 900; }

.status-passed { background: rgba(16, 185, 129, 0.12); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-failed { background: rgba(220, 38, 38, 0.12); color: #dc2626; border: 1px solid rgba(220, 38, 38, 0.3); }

/* --- Tabulation Sheet Grid --- */
.tabulation-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.tabulation-header-bar {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tabulation-table-container {
    overflow-x: auto;
    max-height: 650px;
    position: relative;
}

.tabulation-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    text-align: center;
}

.tabulation-table th, 
.tabulation-table td {
    padding: 8px 10px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.tabulation-table th {
    background: var(--bg-body, #f8fafc);
    color: var(--text-main);
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 2;
}

[data-theme="dark"] .tabulation-table th {
    background: #1e293b;
}

.tabulation-table thead tr:first-child th {
    font-size: 12px;
    background: var(--bg-card);
}

.tabulation-table thead tr:last-child th {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Sticky First Column for Student Info */
.tabulation-table .sticky-col-1 {
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--bg-card);
    text-align: left;
    min-width: 60px;
}

.tabulation-table .sticky-col-2 {
    position: sticky;
    left: 60px;
    z-index: 3;
    background: var(--bg-card);
    text-align: left;
    min-width: 180px;
    border-right: 2px solid var(--border-color);
}

.tabulation-table tr:hover td {
    background-color: var(--result-primary-light);
}

.tabulation-table tr:hover .sticky-col-1,
.tabulation-table tr:hover .sticky-col-2 {
    background-color: var(--bg-body, #f1f5f9);
}

[data-theme="dark"] .tabulation-table tr:hover .sticky-col-1,
[data-theme="dark"] .tabulation-table tr:hover .sticky-col-2 {
    background-color: #1e293b;
}

/* Subject Sub-header group */
.sub-group-header {
    background: rgba(5, 150, 105, 0.05) !important;
    border-bottom: 2px solid var(--brand-primary) !important;
}

.sub-cell-cq, .sub-cell-mcq, .sub-cell-pr {
    color: var(--text-muted);
    font-size: 11px;
}

.sub-cell-tot {
    font-weight: 700;
    color: var(--text-main);
}

.sub-cell-gp {
    font-weight: 800;
}

/* --- Marks Entry Fast Input Grid --- */
.marks-entry-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.marks-input {
    width: 65px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    background: var(--bg-body);
    outline: none;
    transition: border-color 0.2s ease;
}

.marks-input:focus {
    border-color: var(--brand-primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 2px var(--result-primary-light);
}

.marks-input.invalid-mark {
    border-color: var(--status-danger);
    background: rgba(220, 38, 38, 0.08);
}

/* --- Official Academic Transcript Layout --- */
.transcript-preview-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    position: relative;
    font-family: 'Inter', 'Hind Siliguri', sans-serif;
}

.transcript-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 70px;
    font-weight: 900;
    color: rgba(5, 150, 105, 0.03);
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.transcript-header {
    text-align: center;
    border-bottom: 2px solid #059669;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.transcript-inst-title {
    font-size: 24px;
    font-weight: 900;
    color: #064e3b;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

.transcript-inst-sub {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.transcript-title-badge {
    display: inline-block;
    background: #064e3b;
    color: white;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 10px;
}

.transcript-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    background: rgba(5, 150, 105, 0.04);
    border: 1px solid rgba(5, 150, 105, 0.15);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 13px;
}

.transcript-meta-grid div strong {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.transcript-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 12.5px;
}

.transcript-table th,
.transcript-table td {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    text-align: center;
}

.transcript-table th {
    background: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
}

.transcript-summary-box {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.transcript-gpa-card {
    background: linear-gradient(135deg, #064e3b, #059669);
    color: white;
    padding: 18px;
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.transcript-signature-row {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 10px;
}

.transcript-sig-box {
    text-align: center;
    width: 160px;
    border-top: 1px solid #94a3b8;
    padding-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

/* --- Merit Podium & List --- */
.merit-podium-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.merit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.merit-card.rank-1 {
    border-color: #f59e0b;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 60%);
}

.merit-card.rank-2 {
    border-color: #94a3b8;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, var(--bg-card) 60%);
}

.merit-card.rank-3 {
    border-color: #b45309;
    background: linear-gradient(180deg, rgba(180, 83, 9, 0.08) 0%, var(--bg-card) 60%);
}

.merit-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
}

.merit-badge.gold { background: #fef3c7; color: #b45309; }
.merit-badge.silver { background: #f1f5f9; color: #475569; }
.merit-badge.bronze { background: #ffedd5; color: #9a3412; }

/* --- Exam Governance & Status Badges --- */
.exam-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.status-pill-published {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-pill-draft {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-pill-locked {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-pill-unlocked {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.ssid-badge {
    font-family: monospace;
    font-weight: 700;
    font-size: 11px;
    color: var(--brand-primary);
    background: rgba(225, 29, 72, 0.08);
    border: 1px solid rgba(225, 29, 72, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* --- Marks Locked Alert Banner --- */
.marks-locked-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    color: #dc2626;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* --- Transcript Student Avatar & Media Layout --- */
.transcript-avatar-wrap {
    width: 68px;
    height: 78px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #cbd5e1;
    background: #f8fafc;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.transcript-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   ACTIVE EXAMS SHOWCASE & LIFECYCLE WORKFLOW PIPELINE
   ========================================================================== */

/* --- Showcase Container --- */
.exam-showcase-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.exam-showcase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.exam-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* --- Exam Card --- */
.exam-card {
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.exam-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.exam-card.is-active {
    border-color: var(--brand-primary);
    background: linear-gradient(to bottom right, var(--bg-elevated), rgba(5, 150, 105, 0.04));
    box-shadow: 0 0 0 2px var(--brand-light), var(--shadow-md);
}

.exam-card.is-active::before {
    content: 'CURRENTLY SELECTED';
    position: absolute;
    top: -10px;
    right: 14px;
    background: var(--brand-primary);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.exam-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.exam-card-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    margin: 0;
}

.exam-card-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Date Badges --- */
.date-badge-concluded {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.date-badge-ongoing {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.date-badge-upcoming {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* --- Date Timeline in Card --- */
.exam-card-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 11.5px;
    border: 1px solid var(--border-color);
}

.exam-card-dates .date-item-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.exam-card-dates .date-item-val {
    font-weight: 700;
    color: var(--text-main);
    margin-top: 2px;
}

/* --- Evaluation Progress Bar --- */
.exam-progress-wrap {
    margin: 10px 0 14px 0;
}

.exam-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.exam-progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.exam-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 6px;
    transition: width 0.4s ease;
}

/* --- Card Action Buttons --- */
.exam-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

/* --- Exam Lifecycle Stepper --- */
.exam-stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    gap: 10px;
}

.stepper-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 170px;
    cursor: pointer;
    opacity: 0.55;
    transition: all 0.2s ease;
}

.stepper-item:hover {
    opacity: 0.85;
}

.stepper-item.active {
    opacity: 1;
}

.stepper-item.completed {
    opacity: 0.9;
}

.stepper-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.stepper-item.active .stepper-icon {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #ffffff;
    box-shadow: 0 0 0 3px var(--brand-light);
}

.stepper-item.completed .stepper-icon {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.stepper-text {
    line-height: 1.2;
}

.stepper-title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-main);
}

.stepper-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.stepper-divider {
    height: 2px;
    background: var(--border-color);
    width: 28px;
    flex-shrink: 0;
}

/* --- Dynamic Status Banners in Tabs --- */
.date-over-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    color: #065f46;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.date-ongoing-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* --- Publish Modal Summary Cards --- */
.publish-modal-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.publish-modal-stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.publish-modal-stat-card .val {
    font-size: 22px;
    font-weight: 900;
    color: var(--brand-primary);
}

.publish-modal-stat-card .lbl {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .exam-showcase-grid {
        grid-template-columns: 1fr;
    }
    .exam-stepper-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
/* --- Fee Enrollment Status Badges --- */
.fee-badge-paid {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.fee-badge-due {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.fee-badge-na {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.2);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* --- Pending Evaluation Status --- */
.status-pending-eval {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 700;
}

.grade-pending {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.2);
    font-weight: 700;
}

/* --- Unpublished Draft Notification Banners --- */
.unpublished-result-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.unpublished-banner-card {
    background: var(--bg-card);
    border: 1px dashed #d97706;
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.05);
}

.unpublished-banner-card .unpublished-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
}

.unpublished-banner-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.unpublished-banner-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.5;
}

/* --- Transcripts & Merit Empty/Withheld Cards --- */
.marks-pending-card, .marks-withheld-fee-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    margin: 20px auto;
    max-width: 680px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.marks-withheld-fee-card {
    border-color: rgba(239, 68, 68, 0.3);
    background: #fffafa;
}

.transcript-unpublished-ribbon {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Production-Grade Print Styling --- */
@media print {
    @page {
        size: A4;
        margin: 8mm 10mm;
    }
    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #app, .workspace, .content-area, .page-view {
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }
    .sidebar, .header, .result-toolbar, .result-kpi-grid, .result-tabs,
    .tabulation-wrapper, .marks-entry-container, .merit-podium-grid,
    .no-print, .mobile-bottom-nav, #toastContainer, #modal-overlay {
        display: none !important;
    }
    #panel_transcript, #transcriptContainer {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .transcript-preview-panel {
        display: block !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        margin: 0 0 16px 0 !important;
        padding: 20px 24px !important;
        page-break-after: always !important;
        break-after: page !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .transcript-preview-panel:last-child {
        page-break-after: avoid !important;
        break-after: avoid !important;
    }
}
