/* ==========================================================
   COGNITO SOFT - RESULT PORTAL STYLES
   ========================================================== */

/* Hero Container */
.result-hero-section {
    position: relative;
    padding: 160px 0 60px;
    min-height: 100vh;
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(circle at 50% 10%, rgba(94, 252, 2, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 90% 80%, rgba(10, 88, 202, 0.08) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    overflow: hidden;
}

body:not(.dark-mode) .result-hero-section {
    background-image: 
        radial-gradient(circle at 50% 10%, rgba(10, 88, 202, 0.07) 0%, transparent 60%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px);
}

.hero-glow-orb {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}
.hero-glow-1 { top: -100px; left: 50%; transform: translateX(-50%); background: rgba(94, 252, 2, 0.12); }
.hero-glow-2 { bottom: 10%; right: -100px; background: rgba(10, 88, 202, 0.15); }

/* Badge */
.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: rgba(94, 252, 2, 0.08);
    border: 1px solid rgba(94, 252, 2, 0.25);
    border-radius: 50px;
    color: var(--flyer-neon);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(94, 252, 2, 0.1);
}
body:not(.dark-mode) .portal-badge {
    background: rgba(10, 88, 202, 0.08);
    border-color: rgba(10, 88, 202, 0.25);
    color: var(--brand-blue);
    box-shadow: 0 0 20px rgba(10, 88, 202, 0.1);
}

.portal-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.portal-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: rgba(248, 250, 252, 0.7);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}
body:not(.dark-mode) .portal-subtitle {
    color: #64748B;
}

/* Search Card */
.search-card-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}
body:not(.dark-mode) .search-card-wrapper {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 50px rgba(10, 88, 202, 0.08);
}
.search-card-wrapper:hover {
    border-color: rgba(94, 252, 2, 0.3);
}

.search-input-group {
    position: relative;
    display: flex;
    gap: 12px;
}
@media (max-width: 576px) {
    .search-input-group {
        flex-direction: column;
    }
}

.search-input-inner {
    position: relative;
    flex-grow: 1;
}

.search-input-inner i.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
    pointer-events: none;
    transition: var(--transition);
}
body:not(.dark-mode) .search-input-inner i.search-icon {
    color: #94A3B8;
}

.search-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 50px;
    padding: 1rem 1.2rem 1rem 3.2rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    transition: var(--transition);
    outline: none;
}
body:not(.dark-mode) .search-input {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #1E293B;
}

.search-input:focus {
    border-color: var(--flyer-neon);
    box-shadow: 0 0 0 4px rgba(94, 252, 2, 0.15);
    background: rgba(15, 23, 42, 0.95);
}
body:not(.dark-mode) .search-input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(10, 88, 202, 0.15);
    background: #ffffff;
}

.search-input-inner:focus-within i.search-icon {
    color: var(--flyer-neon);
}
body:not(.dark-mode) .search-input-inner:focus-within i.search-icon {
    color: var(--brand-blue);
}

.btn-search {
    background: var(--flyer-neon);
    color: var(--flyer-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 0 2rem;
    border-radius: 50px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-height: 54px;
}
body:not(.dark-mode) .btn-search {
    background: var(--brand-blue);
    color: #ffffff;
}
.btn-search:hover {
    background: #ffffff;
    color: var(--flyer-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(94, 252, 2, 0.35);
}
body:not(.dark-mode) .btn-search:hover {
    background: #2563EB;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(10, 88, 202, 0.3);
}

/* Quick test pills */
.quick-test-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}
body:not(.dark-mode) .quick-test-wrapper {
    color: #64748B;
}

.quick-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--flyer-neon);
    border-radius: 30px;
    padding: 3px 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
}
body:not(.dark-mode) .quick-pill {
    background: rgba(10, 88, 202, 0.06);
    border-color: rgba(10, 88, 202, 0.2);
    color: var(--brand-blue);
}
.quick-pill:hover {
    background: var(--flyer-neon);
    color: var(--flyer-dark);
    transform: translateY(-1px);
}
body:not(.dark-mode) .quick-pill:hover {
    background: var(--brand-blue);
    color: #ffffff;
}

/* Status Messages */
.status-container {
    max-width: 800px;
    margin: 2.5rem auto 0;
}

.alert-custom-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    animation: fadeIn 0.3s ease;
}
.alert-custom-error i {
    font-size: 1.4rem;
    color: #EF4444;
    margin-top: 2px;
}

/* Spinner */
.loading-box {
    text-align: center;
    padding: 3rem 0;
    animation: fadeIn 0.3s ease;
}
.spinner-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(94, 252, 2, 0.15);
    border-top-color: var(--flyer-neon);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}
body:not(.dark-mode) .spinner-ring {
    border-color: rgba(10, 88, 202, 0.15);
    border-top-color: var(--brand-blue);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================
   RESULT CARD STYLES
   ========================================================== */
.result-card-container {
    max-width: 920px;
    margin: 3rem auto 0;
    animation: fadeIn 0.4s ease forwards;
}

.result-sheet {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}
body:not(.dark-mode) .result-sheet {
    background: #ffffff;
    border-color: #E2E8F0;
    box-shadow: 0 25px 60px rgba(10, 88, 202, 0.08);
}

.result-sheet-header {
    background: linear-gradient(135deg, rgba(10, 88, 202, 0.25) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
body:not(.dark-mode) .result-sheet-header {
    background: linear-gradient(135deg, rgba(10, 88, 202, 0.08) 0%, #F8FAFC 100%);
    border-bottom-color: #E2E8F0;
}

.sheet-brand-col {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sheet-logo-img {
    height: 48px;
    width: auto;
}
.sheet-brand-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    margin: 0;
    line-height: 1.2;
    color: var(--text-dark);
}
.sheet-brand-sub {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}
body:not(.dark-mode) .sheet-brand-sub {
    color: #64748B;
}

.sheet-badge-status {
    padding: 8px 24px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.status-badge-pass {
    background: rgba(94, 252, 2, 0.15);
    border: 1.5px solid var(--flyer-neon);
    color: var(--flyer-neon);
    box-shadow: 0 0 25px rgba(94, 252, 2, 0.25);
}
body:not(.dark-mode) .status-badge-pass {
    background: rgba(22, 163, 74, 0.12);
    border-color: #16A34A;
    color: #16A34A;
    box-shadow: 0 0 25px rgba(22, 163, 74, 0.2);
}

.status-badge-fail {
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid #EF4444;
    color: #EF4444;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.25);
}

/* Student Bio Grid */
.student-bio-grid {
    padding: 2rem 2.5rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body:not(.dark-mode) .student-bio-grid {
    border-bottom-color: #E2E8F0;
}

.bio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1rem 1.2rem;
}
body:not(.dark-mode) .bio-card {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

.bio-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
    display: block;
    font-weight: 600;
}
body:not(.dark-mode) .bio-label {
    color: #64748B;
}

.bio-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}
.bio-val.highlight-roll {
    color: var(--flyer-neon);
}
body:not(.dark-mode) .bio-val.highlight-roll {
    color: var(--brand-blue);
}

/* Metrics Ribbon */
.metrics-ribbon {
    padding: 1.5rem 2.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 768px) {
    .metrics-ribbon {
        grid-template-columns: repeat(2, 1fr);
    }
}
body:not(.dark-mode) .metrics-ribbon {
    background: #F1F5F9;
    border-bottom-color: #E2E8F0;
}

.metric-item {
    text-align: center;
    padding: 0.5rem;
}
.metric-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--text-dark);
}
.metric-num.grade-val {
    color: var(--flyer-neon);
}
body:not(.dark-mode) .metric-num.grade-val {
    color: var(--brand-blue);
}

.metric-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}
body:not(.dark-mode) .metric-title {
    color: #64748B;
}

/* Subject Table */
.subject-table-wrapper {
    padding: 2rem 2.5rem;
}

.result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.result-table th {
    background: rgba(255, 255, 255, 0.04);
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
body:not(.dark-mode) .result-table th {
    background: #F8FAFC;
    color: #475569;
    border-bottom-color: #CBD5E1;
}

.result-table td {
    padding: 1.15rem 1.25rem;
    font-size: 0.98rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dark);
    vertical-align: middle;
}
body:not(.dark-mode) .result-table td {
    border-bottom-color: #F1F5F9;
}

.result-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}
body:not(.dark-mode) .result-table tr:hover td {
    background: #F8FAFC;
}

.sub-progress-bar {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 6px;
}
body:not(.dark-mode) .sub-progress-bar {
    background: #E2E8F0;
}

.sub-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}
.fill-pass {
    background: linear-gradient(90deg, #10B981, var(--flyer-neon));
}
body:not(.dark-mode) .fill-pass {
    background: linear-gradient(90deg, #10B981, #2563EB);
}
.fill-fail {
    background: #EF4444;
}

.status-badge-mini {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mini-pass {
    background: rgba(94, 252, 2, 0.1);
    color: var(--flyer-neon);
    border: 1px solid rgba(94, 252, 2, 0.3);
}
body:not(.dark-mode) .mini-pass {
    background: rgba(22, 163, 74, 0.1);
    color: #16A34A;
    border-color: rgba(22, 163, 74, 0.3);
}
.mini-fail {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Card Actions */
.result-card-actions {
    padding: 1.5rem 2.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 1rem;
}
body:not(.dark-mode) .result-card-actions {
    border-top-color: #E2E8F0;
}

.btn-action-print {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.6rem;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
body:not(.dark-mode) .btn-action-print {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #1E293B;
}
.btn-action-print:hover {
    background: var(--flyer-neon);
    color: var(--flyer-dark);
    border-color: var(--flyer-neon);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(94, 252, 2, 0.25);
}
body:not(.dark-mode) .btn-action-print:hover {
    background: var(--brand-blue);
    color: #ffffff;
    border-color: var(--brand-blue);
    box-shadow: 0 8px 20px rgba(10, 88, 202, 0.2);
}

.btn-action-reset {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
body:not(.dark-mode) .btn-action-reset {
    color: #64748B;
}
.btn-action-reset:hover {
    color: var(--flyer-neon);
}
/* ==========================================================
   MOBILE RESPONSIVENESS OVERRIDES
   ========================================================== */
@media (max-width: 768px) {
    .result-hero-section { padding: 120px 0 40px; }
    .portal-title { font-size: 2.2rem; }
    .portal-subtitle { font-size: 1rem; margin-bottom: 1.75rem; }
    .search-card-wrapper { padding: 1.25rem 1rem; border-radius: 18px; margin: 0 10px; }
    .result-card-container { margin: 2rem 10px 0; }
    .result-sheet { border-radius: 20px; }
    .result-sheet-header { padding: 1.25rem 1rem; flex-direction: column; text-align: center; }
    .sheet-brand-col { flex-direction: column; text-align: center; }
    .student-bio-grid { padding: 1.25rem 1rem; gap: 0.75rem; grid-template-columns: 1fr; }
    .bio-card { padding: 0.85rem 1rem; }
    .metrics-ribbon { padding: 1rem 0.75rem; gap: 0.75rem; }
    .metric-num { font-size: 1.6rem; }
    .result-card-actions { padding: 1.25rem 1rem; flex-direction: column; width: 100%; gap: 12px; }
    .btn-action-print, .btn-action-reset { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .search-input { font-size: 0.95rem; padding: 0.85rem 1rem 0.85rem 2.8rem; }
    .btn-search { min-height: 48px; padding: 0 1.5rem; font-size: 0.95rem; }
    .metrics-ribbon { grid-template-columns: 1fr; }
}

/* ==========================================================
   PRINT MEDIA STYLES (Clean Official Mark Sheet)
   ========================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .custom-floating-nav,
    .studio-footer,
    .search-card-wrapper,
    .result-hero-section .portal-badge,
    .result-hero-section .portal-title,
    .result-hero-section .portal-subtitle,
    .result-card-actions,
    .hero-glow-orb,
    .quick-test-wrapper {
        display: none !important;
    }
    .result-hero-section {
        padding: 0 !important;
        min-height: auto !important;
        background: #ffffff !important;
    }
    .result-card-container {
        margin: 0 !important;
        max-width: 100% !important;
    }
    .result-sheet {
        border: 2px solid #000000 !important;
        box-shadow: none !important;
        background: #ffffff !important;
        border-radius: 0 !important;
    }
    .result-sheet-header {
        background: #F8FAFC !important;
        border-bottom: 2px solid #000000 !important;
        color: #000000 !important;
        padding: 1.5rem !important;
    }
    .sheet-brand-title {
        color: #000000 !important;
        font-size: 1.5rem !important;
    }
    .sheet-brand-sub {
        color: #475569 !important;
    }
    .status-badge-pass {
        border: 2px solid #16A34A !important;
        color: #16A34A !important;
        background: #F0FDF4 !important;
    }
    .status-badge-fail {
        border: 2px solid #DC2626 !important;
        color: #DC2626 !important;
        background: #FEF2F2 !important;
    }
    .student-bio-grid {
        border-bottom: 1.5px solid #000000 !important;
        padding: 1rem 1.5rem !important;
    }
    .bio-card {
        border: 1px solid #CBD5E1 !important;
        background: #FFFFFF !important;
    }
    .bio-label {
        color: #475569 !important;
    }
    .bio-val {
        color: #000000 !important;
    }
    .metrics-ribbon {
        background: #F8FAFC !important;
        border-bottom: 1.5px solid #000000 !important;
        padding: 1rem !important;
    }
    .metric-num {
        color: #000000 !important;
    }
    .metric-title {
        color: #475569 !important;
    }
    .result-table th {
        background: #F1F5F9 !important;
        color: #000000 !important;
        border-bottom: 2px solid #000000 !important;
    }
    .result-table td {
        border-bottom: 1px solid #E2E8F0 !important;
        color: #000000 !important;
    }
    .print-watermark-signatures {
        display: flex !important;
        justify-content: space-between;
        margin-top: 50px;
        padding: 0 2rem 2rem;
    }
    .sig-block {
        text-align: center;
        width: 200px;
        border-top: 1px solid #000000;
        padding-top: 8px;
        font-size: 0.85rem;
        font-weight: 600;
    }
}

.print-watermark-signatures {
    display: none;
}