/* ═══════════════════════════════════════════════
   Essay Grader - Custom Styles
   Extends learnify.css design system
   ═══════════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --eg-primary: #1f3a6b;
    --eg-primary-light: #2a4d8f;
    --eg-bg: #f4f7fb;
    --eg-card-radius: 24px;
    --eg-btn-radius: 40px;
    --eg-critical: #dc3545;
    --eg-critical-bg: rgba(220,53,69,0.12);
    --eg-warning: #ffc107;
    --eg-warning-bg: rgba(255,193,7,0.18);
    --eg-success: #28a745;
}

/* ── Body ── */
.eg-body-public { background: var(--eg-bg); }
.eg-body-app { background: var(--eg-bg); }

/* ── Public Header ── */
/* ═══════════════════════════════════════════════════
   PUBLIC HEADER  —  redesigned 2025
   ═══════════════════════════════════════════════════ */
.eg-header-public {
    /* deep mesh-gradient base */
    background: linear-gradient(118deg, #060f1e 0%, #0d1e3b 40%, #0a1929 70%, #071220 100%);
    padding: 0.6rem 2rem;
    position: sticky;
    top: 0;
    z-index: 200;
    overflow: hidden;
    /* hair-line glow border at bottom */
    border-bottom: 1px solid rgba(79, 142, 247, 0.18);
    box-shadow: 0 1px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03);
}

/* Ambient glow orbs — pure CSS, zero JS */
.eg-nav-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.28;
}
.eg-nav-orb--left {
    width: 320px; height: 180px;
    background: radial-gradient(circle, #4f8ef7 0%, transparent 70%);
    top: -60px; left: -40px;
}
.eg-nav-orb--right {
    width: 260px; height: 160px;
    background: radial-gradient(circle, #38d9c0 0%, transparent 70%);
    top: -50px; right: -20px;
    opacity: 0.18;
}

.eg-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative; /* above orbs */
    z-index: 1;
    padding: 0.35rem 0;
}
.eg-header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Logo ── */
.eg-logo-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none !important;
}
.eg-logo-mark svg {
    display: block;
    transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), filter 0.2s;
    filter: drop-shadow(0 2px 8px rgba(79,142,247,0.4));
}
.eg-logo-link:hover .eg-logo-mark svg {
    transform: rotate(-4deg) scale(1.07);
    filter: drop-shadow(0 4px 14px rgba(56,217,192,0.55));
}
.eg-logo-wordmark {
    font-weight: 800;
    font-size: 1.18rem;
    letter-spacing: -0.03em;
    color: #ffffff;
    line-height: 1;
}
.eg-logo-accent {
    /* subtle gradient on "Grader" */
    background: linear-gradient(90deg, #7eb8ff, #38d9c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Ghost nav link (Pricing, Admin) ── */
.eg-nav-ghost {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    color: rgba(255,255,255,0.72) !important;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
}
.eg-nav-ghost::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 0.9rem; right: 0.9rem;
    height: 1.5px;
    background: linear-gradient(90deg, #4f8ef7, #38d9c0);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s cubic-bezier(.4,0,.2,1);
}
.eg-nav-ghost:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.06);
}
.eg-nav-ghost:hover::after { transform: scaleX(1); }

/* ── CTA button (Login / Dashboard) ── */
.eg-nav-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.48rem 1.3rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    color: #ffffff !important;
    text-decoration: none !important;
    overflow: hidden;
    /* gradient background */
    background: linear-gradient(135deg, #3b72e8 0%, #1e4fc2 50%, #166ec0 100%);
    box-shadow: 0 2px 12px rgba(59,114,232,0.45), inset 0 1px 0 rgba(255,255,255,0.18);
    transition: transform 0.18s, box-shadow 0.18s;
}
/* Animated shimmer sweep */
.eg-nav-cta-shine {
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.45s ease;
    pointer-events: none;
}
.eg-nav-cta:hover .eg-nav-cta-shine { left: 130%; }
.eg-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(59,114,232,0.55), inset 0 1px 0 rgba(255,255,255,0.22);
}
.eg-nav-cta:active { transform: translateY(0); }
.eg-nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.eg-nav-link:hover { color: #fff; }

/* ── Badges ── */
.eg-badge {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-left: 0.5rem;
}
.eg-plan-badge {
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}
.eg-plan-basic { background: #e9ecef; color: #666; }
.eg-plan-pro { background: #e3f2fd; color: #1976d2; }
.eg-plan-premium { background: #fff3e0; color: #e65100; }

/* ── Buttons ── */
.eg-btn-primary {
    background: linear-gradient(135deg, var(--eg-primary) 0%, var(--eg-primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: var(--eg-btn-radius);
    padding: 0.6rem 2rem;
    font-weight: 600;
    transition: all 0.2s;
}
.eg-btn-primary:hover {
    background: linear-gradient(135deg, var(--eg-primary-light) 0%, var(--eg-primary) 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(31,58,107,0.3);
}
.eg-btn-outline {
    background: transparent;
    color: var(--eg-primary);
    border: 2px solid var(--eg-primary);
    border-radius: var(--eg-btn-radius);
    padding: 0.55rem 2rem;
    font-weight: 600;
    transition: all 0.2s;
}
.eg-btn-outline:hover {
    background: var(--eg-primary);
    color: #fff;
}

/* ── Inputs ── */
.eg-input {
    border-radius: 12px;
    border: 2px solid #e0e5ec;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.eg-input:focus {
    border-color: var(--eg-primary);
    box-shadow: 0 0 0 3px rgba(31,58,107,0.1);
}

/* ── Auth Pages ── */
.eg-auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.eg-auth-card {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}
.eg-auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.eg-auth-header h2 {
    font-weight: 700;
    color: var(--eg-primary);
    margin-bottom: 0.3rem;
}
.eg-auth-header p {
    color: #6c757d;
    font-size: 0.95rem;
}
.eg-auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #6c757d;
}
.eg-auth-footer a {
    color: var(--eg-primary);
    font-weight: 600;
}

/* ── Hero ── */
.eg-hero {
    background: linear-gradient(135deg, var(--eg-primary) 0%, #16294d 60%, #0d1b2e 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    overflow: hidden;
}
.eg-hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.eg-hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 500px;
}
.eg-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.eg-hero .eg-btn-outline {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}
.eg-hero .eg-btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
}

/* Hero demo */
.eg-hero-demo {
    padding: 1.5rem;
}
.eg-demo-card {
    background: rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}
.eg-demo-essay-line {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}
.eg-error-critical-demo {
    background: rgba(220,53,69,0.3);
    border-bottom: 2px solid #dc3545;
    padding: 0 2px;
    border-radius: 2px;
}
.eg-error-warning-demo {
    background: rgba(255,193,7,0.3);
    border-bottom: 2px solid #ffc107;
    padding: 0 2px;
    border-radius: 2px;
}
.eg-demo-tooltip {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    border-left: 3px solid #dc3545;
}
.eg-demo-tooltip strong {
    display: block;
    margin: 0.3rem 0;
    font-style: italic;
}
.eg-demo-tooltip p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

/* ── Sections ── */
.eg-section {
    padding: 4rem 0;
}
.eg-section-alt {
    background: #fff;
}
.eg-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--eg-primary);
    margin-bottom: 0.5rem;
}
.eg-section-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
}

/* How it works cards */
.eg-step-card {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    height: 100%;
    position: relative;
    transition: transform 0.2s;
}
.eg-step-card:hover { transform: translateY(-4px); }
.eg-step-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--eg-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.eg-step-icon {
    font-size: 2rem;
    color: var(--eg-primary);
    margin-bottom: 1rem;
}
.eg-step-card h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}
.eg-step-card p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* ── Plan Cards ── */
.eg-plan-card {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.eg-plan-card:hover { transform: translateY(-4px); }
.eg-plan-featured {
    border: 2px solid var(--eg-primary);
    box-shadow: 0 8px 30px rgba(31,58,107,0.15);
}
.eg-plan-ribbon {
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--eg-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 2.5rem;
    transform: rotate(45deg);
    letter-spacing: 0.5px;
}
.eg-plan-header h3 {
    font-weight: 700;
    color: var(--eg-primary);
    margin-bottom: 0.5rem;
}
.eg-plan-price {
    margin-bottom: 1.5rem;
}
.eg-price-currency {
    font-size: 1.2rem;
    font-weight: 600;
    vertical-align: top;
    color: #333;
}
.eg-price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--eg-primary);
}
.eg-price-period {
    font-size: 0.95rem;
    color: #6c757d;
}
.eg-plan-features {
    list-style: none;
    padding: 0;
    text-align: left;
    flex: 1;
    margin-bottom: 1.5rem;
}
.eg-plan-features li {
    padding: 0.4rem 0;
    font-size: 0.92rem;
    color: #333;
}
.eg-plan-features li i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}
.eg-plan-features li i.fa-check { color: var(--eg-success); }
.eg-plan-features li i.fa-times { color: #ccc; }
.eg-feature-disabled { color: #aaa !important; }

/* ── Complexity Cards ── */
.eg-complexity-card {
    background: #fff;
    border: 2px solid transparent;
    border-radius: var(--eg-card-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
}
.eg-complexity-card:hover:not(.eg-locked) {
    border-color: var(--eg-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(31,58,107,0.12);
}
.eg-complexity-card.eg-locked {
    opacity: 0.5;
    cursor: not-allowed;
}
.eg-complexity-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.eg-complexity-card h4 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}
.eg-complexity-card p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}
.eg-lock-badge {
    display: inline-block;
    margin-top: 0.5rem;
    background: #e9ecef;
    color: #666;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Exam Page ── */
.eg-exam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

/* Prominent essay-prompt card shown above the writing area */
.eg-prompt-card {
    background: linear-gradient(135deg, #eef3fb 0%, #ffffff 100%);
    border: 2px solid var(--eg-primary, #1f3a6b);
    border-left-width: 6px;
    border-radius: 18px;
    padding: 1.1rem 1.4rem 1.25rem;
    box-shadow: 0 4px 18px rgba(31, 58, 107, 0.08);
}
.eg-prompt-card-label {
    display: inline-block;
    background: var(--eg-primary, #1f3a6b);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}
.eg-prompt-card-text {
    color: var(--eg-primary, #1f3a6b);
    font-weight: 800;
    font-size: 1.45rem;
    line-height: 1.45;
    margin: 0;
    letter-spacing: -0.01em;
}
@media (max-width: 576px) {
    .eg-prompt-card-text { font-size: 1.2rem; }
}
.eg-timer {
    background: var(--eg-primary);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.eg-timer-caution { background: #e67e22; }
.eg-timer-warning { background: #dc3545; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.eg-prompt-box {
    background: #fff;
    border-radius: 16px;
    padding: 1rem 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.eg-input-tabs .nav-link {
    border-radius: 12px;
    font-weight: 600;
    color: #6c757d;
}
.eg-input-tabs .nav-link.active {
    background: var(--eg-primary);
    color: #fff;
}

.eg-essay-area {
    position: relative;
}
.eg-essay-textarea {
    border-radius: 16px;
    border: 2px solid #e0e5ec;
    padding: 1.2rem;
    font-size: 1rem;
    line-height: 1.7;
    resize: vertical;
    min-height: 350px;
}
.eg-essay-textarea:focus {
    border-color: var(--eg-primary);
    box-shadow: 0 0 0 3px rgba(31,58,107,0.1);
}
.eg-word-count {
    position: absolute;
    bottom: 12px;
    right: 16px;
    color: #aaa;
    font-size: 0.85rem;
}

/* Dropzone */
.eg-dropzone {
    border: 2px dashed #c4cdd5;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.eg-dropzone:hover,
.eg-dropzone-active {
    border-color: var(--eg-primary);
    background: rgba(31,58,107,0.03);
}
.eg-dropzone-icon { font-size: 2.5rem; color: var(--eg-primary); margin-bottom: 0.5rem; }
.eg-dropzone-text { font-weight: 600; color: #333; margin-bottom: 0.3rem; }
.eg-dropzone-hint { color: #999; font-size: 0.85rem; margin: 0; }

.eg-file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 2px solid #e0e5ec;
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
}
.eg-file-info { display: flex; align-items: center; gap: 0.8rem; }
.eg-file-info i { font-size: 1.5rem; color: var(--eg-primary); }

.eg-submit-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Grading overlay */
.eg-grading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.eg-grading-spinner { text-align: center; }

/* ── Scorecard ──
   Hero is now a vertically stacked card (Score / Feedback / Essay Details
   rows). All layout rules live inline inside scorecard/index.blade.php.
   The previous `display: flex` rule was removed so the inline rules apply. */
.eg-scorecard-hero {
    background: #fff;
    border-radius: var(--eg-card-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}
.eg-grade-ring-container {
    flex-shrink: 0;
}
.eg-grade-ring {
    width: 140px;
    height: 140px;
}
.eg-ring-progress {
    transition: stroke-dashoffset 1.5s ease-out;
}
.eg-grade-letter {
    font-size: 1.8rem;
    font-weight: 800;
    fill: var(--eg-primary);
}
.eg-grade-pct {
    font-size: 0.9rem;
    font-weight: 600;
    fill: #6c757d;
}
.eg-scorecard-summary h2 {
    font-weight: 700;
    color: var(--eg-primary);
    margin-bottom: 0.5rem;
}
.eg-summary-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}
.eg-meta-row {
    display: flex;
    gap: 1.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Category scores */
.eg-categories-section {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}
.eg-categories-section h3 {
    color: var(--eg-primary);
    font-weight: 700;
}
.eg-category-bar {
    margin-bottom: 0.5rem;
}
.eg-category-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}
.eg-category-score {
    margin-left: auto;
    font-weight: 700;
    color: var(--eg-primary);
}

/* ── Annotations ── */
.eg-annotated-section {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
}
.eg-annotated-section h3 {
    color: var(--eg-primary);
    font-weight: 700;
}
.eg-legend {
    display: flex;
    gap: 1.5rem;
}
.eg-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #6c757d;
}
.eg-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}
.eg-dot-critical { background: var(--eg-critical-bg); border: 2px solid var(--eg-critical); }
.eg-dot-warning { background: var(--eg-warning-bg); border: 2px solid var(--eg-warning); }

.eg-annotated-essay {
    line-height: 1.9;
    font-size: 1rem;
    color: #333;
    padding: 1rem 0;
}

/* Highlight styles */
.eg-error-critical {
    background: var(--eg-critical-bg);
    border-bottom: 2px solid var(--eg-critical);
    padding: 1px 2px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}
.eg-error-critical:hover {
    background: rgba(220,53,69,0.25);
}
.eg-error-warning {
    background: var(--eg-warning-bg);
    border-bottom: 2px solid var(--eg-warning);
    padding: 1px 2px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}
.eg-error-warning:hover {
    background: rgba(255,193,7,0.35);
}

/* Annotation Modal */
.eg-annotation-modal .modal-header {
    background: var(--eg-critical);
    color: #fff;
    border-radius: var(--eg-card-radius) var(--eg-card-radius) 0 0;
    padding: 1rem 1.5rem;
}
.eg-annotation-modal .modal-content {
    border-radius: var(--eg-card-radius);
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.eg-severity-badge {
    background: #fff;
    color: var(--eg-critical);
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}
.eg-category-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    text-transform: capitalize;
}
.eg-modal-quote {
    background: #f8f9fa;
    border-left: 3px solid var(--eg-primary);
    padding: 0.8rem 1rem;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
}
.eg-modal-explanation {
    color: #333;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Premium gate */
.eg-premium-gate {
    position: relative;
}
.eg-premium-gate-content {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
    color: var(--eg-primary);
}
.eg-premium-gate-content h4 { font-weight: 700; margin-bottom: 0.3rem; }
.eg-premium-gate-content p { color: #6c757d; margin-bottom: 1rem; }
.eg-blurred {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

/* ── Plans Page ── */
.eg-plans-page {
    padding: 4rem 0;
}

/* ── Footer ── */
.eg-footer {
    background: linear-gradient(135deg, var(--eg-primary) 0%, #16294d 100%);
    color: rgba(255,255,255,0.7);
    padding: 1.5rem 2rem;
    font-size: 0.85rem;
}
.eg-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Toast ── */
.eg-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.eg-toast-show {
    opacity: 1;
    transform: translateY(0);
}

/* ── Timer Toggle ── */
.eg-timer-toggle {
    display: flex;
    justify-content: center;
}
.eg-toggle-card {
    display: flex;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 2px solid #e0e5ec;
}
.eg-toggle-option {
    padding: 1rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
}
.eg-toggle-option i {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    color: #999;
}
.eg-toggle-option span {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #555;
}
.eg-toggle-option small {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.2rem;
}
.eg-toggle-option:hover {
    background: rgba(31,58,107,0.04);
}
.eg-toggle-option.active {
    background: var(--eg-primary);
}
.eg-toggle-option.active i,
.eg-toggle-option.active span {
    color: #fff;
}
.eg-toggle-option.active small {
    color: rgba(255,255,255,0.7);
}
.eg-toggle-option + .eg-toggle-option {
    border-left: 2px solid #e0e5ec;
}

/* Time hint on complexity cards */
.eg-time-hint {
    display: inline-block;
    margin-top: 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--eg-primary);
    background: rgba(31,58,107,0.08);
    padding: 0.2rem 0.7rem;
    border-radius: 10px;
}

/* Untimed timer style */
.eg-timer-untimed {
    background: #6c757d;
}

/* ── Progress Page ── */
.eg-stat-card {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: 100%;
}
.eg-stat-icon {
    font-size: 1.5rem;
    color: var(--eg-primary);
    margin-bottom: 0.5rem;
}
.eg-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--eg-primary);
    line-height: 1.2;
}
.eg-stat-label {
    font-size: 0.82rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.2rem;
}

.eg-usage-bar {
    background: #fff;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.eg-progress-card {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.eg-progress-card h3 {
    color: var(--eg-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

/* History table */
.eg-history-table {
    font-size: 0.9rem;
}
.eg-history-table th {
    border-top: none;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 0.8rem;
}
.eg-history-table td {
    padding: 0.7rem 0.8rem;
    vertical-align: middle;
}
.eg-grade-pill {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
}

/* Upgrade banner */
.eg-upgrade-banner {
    background: linear-gradient(135deg, rgba(31,58,107,0.05) 0%, rgba(31,58,107,0.12) 100%);
    border: 2px dashed rgba(31,58,107,0.2);
    border-radius: var(--eg-card-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}
.eg-upgrade-banner h3 {
    color: var(--eg-primary);
    font-weight: 700;
}
.eg-upgrade-banner p {
    color: #6c757d;
    max-width: 500px;
    margin: 0.5rem auto 1rem;
}

/* ── OTP Login ── */
.eg-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.5rem 0;
}
.eg-otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #e0e5ec;
    border-radius: 12px;
    color: var(--eg-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.eg-otp-digit:focus {
    border-color: var(--eg-primary);
    box-shadow: 0 0 0 3px rgba(31,58,107,0.1);
    outline: none;
}
.eg-otp-digit.filled {
    border-color: var(--eg-primary);
    background: rgba(31,58,107,0.03);
}
.eg-otp-sent-msg {
    text-align: center;
    color: var(--eg-success);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.eg-otp-sent-msg i { margin-right: 0.3rem; }
.eg-otp-resend {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: #6c757d;
}
.eg-otp-resend a {
    color: var(--eg-primary);
    font-weight: 600;
    text-decoration: none;
}
.eg-otp-resend a:hover { text-decoration: underline; }
.eg-otp-resend .disabled { color: #aaa; pointer-events: none; }
.eg-step-hidden { display: none; }
.eg-change-email {
    color: var(--eg-primary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}
.eg-change-email:hover { text-decoration: underline; }

/* ── Admin Dashboard ── */
.eg-admin-sidebar {
    background: linear-gradient(180deg, var(--eg-primary) 0%, #16294d 100%);
    min-height: 100vh;
    padding: 1.5rem;
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}
.eg-admin-sidebar .lfy-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.eg-admin-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.eg-admin-nav li { margin-bottom: 0.3rem; }
.eg-admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s;
}
.eg-admin-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.eg-admin-nav a.active { background: rgba(255,255,255,0.15); color: #fff; font-weight: 600; }
.eg-admin-nav a i { width: 20px; text-align: center; }
.eg-admin-main {
    margin-left: 250px;
    padding: 2rem;
    background: var(--eg-bg);
    min-height: 100vh;
}
.eg-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.eg-admin-header h1 {
    font-weight: 700;
    color: var(--eg-primary);
    font-size: 1.6rem;
    margin: 0;
}
.eg-admin-card {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}
.eg-admin-card h3 {
    font-weight: 700;
    color: var(--eg-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.eg-admin-table { font-size: 0.88rem; width: 100%; }
.eg-admin-table th {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 0.8rem;
    border-bottom: 2px solid #e9ecef;
}
.eg-admin-table td {
    padding: 0.6rem 0.8rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}
.eg-admin-stat { text-align: center; }
.eg-admin-stat .value { font-size: 2rem; font-weight: 800; color: var(--eg-primary); line-height: 1.2; }
.eg-admin-stat .label { font-size: 0.82rem; color: #6c757d; font-weight: 500; }
.eg-status-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}
.eg-status-active { background: #d4edda; color: #155724; }
.eg-status-completed { background: #d4edda; color: #155724; }
.eg-status-cancelled { background: #f8d7da; color: #721c24; }
.eg-status-pending { background: #fff3cd; color: #856404; }
.eg-status-graded { background: #d1ecf1; color: #0c5460; }
.eg-status-failed { background: #f8d7da; color: #721c24; }

/* ── Topup Modal ── */
.eg-topup-card {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.eg-topup-card:hover { transform: translateY(-3px); }
.eg-topup-amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--eg-primary);
}
.eg-topup-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0.5rem 0;
}
.eg-topup-per {
    font-size: 0.82rem;
    color: #6c757d;
}

/* ── Post-Exam Feedback ── */
.eg-feedback-section {
    background: #fff;
    border-radius: var(--eg-card-radius);
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 2rem;
    margin-top: 2rem;
    border-top: 4px solid var(--eg-primary);
}
.eg-feedback-header {
    text-align: center;
    margin-bottom: 2rem;
}
.eg-feedback-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--eg-primary) 0%, var(--eg-primary-light) 100%);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.eg-feedback-header h3 {
    font-weight: 700;
    color: var(--eg-primary);
    margin-bottom: 0.3rem;
}
.eg-feedback-header p {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}
.eg-feedback-question {
    padding: 1.2rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.eg-feedback-question:last-of-type {
    border-bottom: none;
}
.eg-feedback-q-text {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0.8rem;
}
.eg-feedback-q-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--eg-bg);
    color: var(--eg-primary);
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    flex-shrink: 0;
}

/* Star rating row */
.eg-star-row {
    display: flex;
    gap: 0.5rem;
    padding-left: 3rem;
}
.eg-star-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: 2px solid #e0e5ec;
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 72px;
    color: #c4cdd5;
}
.eg-star-btn i {
    font-size: 1.3rem;
    transition: all 0.2s;
}
.eg-star-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.eg-star-btn:hover,
.eg-star-btn.hover {
    border-color: #ffc107;
    background: rgba(255,193,7,0.05);
}
.eg-star-btn:hover i,
.eg-star-btn.hover i {
    color: #ffc107;
}
.eg-star-btn.active {
    border-color: #ffc107;
    background: rgba(255,193,7,0.08);
    color: #ffc107;
}
.eg-star-btn.active i {
    color: #ffc107;
}
.eg-star-btn.active .eg-star-label {
    color: #b38600;
}

/* Open-ended feedback */
.eg-feedback-textarea {
    border-radius: 12px;
    border: 2px solid #e0e5ec;
    padding: 0.8rem 1rem;
    font-size: 0.92rem;
    margin-left: 3rem;
    width: calc(100% - 3rem);
    resize: vertical;
    transition: border-color 0.2s;
}
.eg-feedback-textarea:focus {
    border-color: var(--eg-primary);
    box-shadow: 0 0 0 3px rgba(31,58,107,0.1);
}
.eg-feedback-textarea::placeholder {
    color: #bbb;
}
.eg-feedback-submit {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
}
.eg-feedback-status {
    font-size: 0.88rem;
    font-weight: 600;
}

/* Thank you state */
.eg-feedback-thankyou {
    text-align: center;
    padding: 1.5rem 0;
}
.eg-feedback-thankyou-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    animation: heartPulse 1.5s ease-in-out infinite;
}
@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.eg-feedback-thankyou h4 {
    font-weight: 700;
    color: var(--eg-primary);
    margin-bottom: 0.3rem;
}

/* ── Fuel Gauge ── */
.eg-fuel-gauge-wrapper {
    display: flex;
    justify-content: center;
}
.eg-fuel-gauge-card {
    background: radial-gradient(120% 120% at 50% 100%, #1b2a47 0%, #122038 45%, #0d1729 100%);
    border: 1px solid rgba(155, 181, 221, 0.24);
    border-radius: var(--eg-card-radius);
    padding: 2rem 2.5rem 1.5rem;
    box-shadow: 0 10px 26px rgba(3, 11, 26, 0.45), inset 0 0 0 1px rgba(255,255,255,0.03);
    text-align: center;
    max-width: 320px;
    width: 100%;
}
.eg-fuel-gauge-title {
    font-weight: 700;
    color: #dbe8ff;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}
.eg-fuel-gauge-container {
    position: relative;
    width: 220px;
    margin: 0 auto;
}
.eg-fuel-gauge-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
}
.eg-fuel-needle {
    transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 6px rgba(219, 232, 255, 0.45));
}
.eg-fuel-readout {
    margin-top: -10px;
    padding-bottom: 0.5rem;
}
.eg-fuel-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #f4f8ff;
    line-height: 1.1;
}
.eg-fuel-label {
    display: block;
    font-size: 0.82rem;
    color: #9fb2cf;
    font-weight: 600;
}
.eg-fuel-low-warning {
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    background: rgba(220,53,69,0.08);
    border-radius: 12px;
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: 600;
}
.eg-fuel-low-warning a {
    color: var(--eg-primary);
    text-decoration: underline;
}
.eg-fuel-bonus {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: #7ee2a6;
    font-weight: 600;
}

/* Gauge in progress page (smaller variant) */
.eg-fuel-gauge-mini .eg-fuel-gauge-card {
    max-width: 260px;
    padding: 1.5rem 2rem 1rem;
}
.eg-fuel-gauge-mini .eg-fuel-gauge-container {
    width: 180px;
}
.eg-fuel-gauge-mini .eg-fuel-number {
    font-size: 1.8rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .eg-hero-title { font-size: 2rem; }
    /* .eg-scorecard-hero is now block-stacked at every width — no flex override needed */
    .eg-meta-row { justify-content: center; }
    .eg-header-nav { gap: 0.6rem; }
    .eg-plan-ribbon { font-size: 0.6rem; }
    .eg-toggle-option { min-width: 120px; padding: 0.8rem 1rem; }
    .eg-stat-value { font-size: 1.4rem; }
    .eg-fuel-gauge-container { width: 180px; }
    .eg-fuel-number { font-size: 1.8rem; }
    .eg-admin-sidebar { width: 60px; padding: 1rem 0.5rem; }
    .eg-admin-sidebar .lfy-logo-text,
    .eg-admin-sidebar .eg-badge,
    .eg-admin-nav a span { display: none; }
    .eg-admin-main { margin-left: 60px; }
    .eg-star-row { padding-left: 0; flex-wrap: wrap; gap: 0.4rem; }
    .eg-star-btn { min-width: 56px; padding: 0.5rem 0.4rem; }
    .eg-star-label { font-size: 0.55rem; }
    .eg-feedback-textarea { margin-left: 0; width: 100%; }
    .eg-feedback-q-text { font-size: 0.88rem; }
}
