/* ==========================================================================
   JOBLOO RESUME GRADER STYLESHEET
   ========================================================================== */

:root {
    --primary-glow: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    --card-bg: rgba(255, 255, 255, 0.7);
    --border-color: rgba(99, 102, 241, 0.08);
    --shadow-soft: 0 10px 30px -10px rgba(79, 70, 229, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
}

body {
    background: radial-gradient(circle at 10% 20%, rgba(243, 244, 255, 0.5) 0%, rgba(255, 255, 255, 0.8) 90%);
    color: #374151;
    overflow-x: hidden;
}

/* Grader Layout & Grid */
.grader-sandbox {
    margin-top: 20px;
    position: relative;
}

.grader-sandbox::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: var(--primary-glow);
    z-index: -1;
    pointer-events: none;
}

.grader-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

@media (max-width: 968px) {
    .grader-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .grader-upload-card {
        position: static !important;
        min-height: 250px !important;
        padding: 30px 20px !important;
    }
}

/* Upload Card Style */
.grader-upload-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px dashed rgba(99, 102, 241, 0.25);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    position: sticky;
    top: 100px;
    align-self: start;
}

.grader-upload-card:hover, .grader-upload-card.dragover {
    border-color: #4f46e5;
    box-shadow: var(--shadow-soft), var(--shadow-glow);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    color: #4f46e5;
    transition: all 0.3s ease;
}

.grader-upload-card:hover .upload-icon-wrapper {
    background: #4f46e5;
    color: white;
    transform: scale(1.05);
}

.upload-icon {
    width: 32px;
    height: 32px;
    display: block;
    margin: 0;
    padding: 0;
}

.grader-upload-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1f2937;
}

.grader-upload-card p {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 16px;
}

.file-rules {
    font-size: 0.8rem;
    color: #9ca3af;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px 12px;
    border-radius: 50px;
}

/* Results Card Style */
.grader-results-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
    transition: all 0.3s ease;
}

/* Placeholder state */
.initial-placeholder {
    text-align: center;
    padding: 20px;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    color: #9ca3af;
    margin: 0 auto 20px auto;
    opacity: 0.6;
}

.initial-placeholder h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #4b5563;
}

.initial-placeholder p {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 440px;
    margin: 0 auto;
}

/* Loader state */
.scanner-loader {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(79, 70, 229, 0.1);
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scanner-loader h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.scanner-loader p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Real Results Header */
.results-summary {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 30px;
}

@media (max-width: 480px) {
    .results-summary {
        flex-direction: column;
        text-align: center;
    }
}

.score-radial {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke-linecap: round;
    transition: stroke 0.3s ease, stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.score-display {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.score-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-details h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 6px;
}

.summary-details p {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.5;
}

/* Grader Tabs */
.grader-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.grader-tabs::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: #1f2937;
    background: rgba(0,0,0,0.03);
}

.tab-btn.active {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.05);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Findings Checklists */
.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insights-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.insights-list li.success {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.insights-list li.warning {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.insights-list li.danger {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.insight-icon {
    font-size: 1.1rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* Raw Code Pre block */
.ats-raw-pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 400px;
    max-height: 650px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Gated Tab Lock Screen Styles */
.tab-panel-gated {
    position: relative;
}

.tab-panel-gated.is-locked {
    max-height: 420px;
    overflow: hidden;
}

.tab-panel-gated.is-locked .lock-blur-container {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

.tab-panel-gated.is-locked .lock-overlay {
    display: flex !important;
}

/* Teaser Tab Gated (Overview & Findings) */
.tab-panel-teaser {
    position: relative;
}

.tab-panel-teaser.is-locked .lock-blur-container {
    filter: none !important;
    pointer-events: auto !important;
    user-select: auto !important;
}

.tab-panel-teaser.is-locked#overview .teaser-gated-section {
    max-height: 175px;
    overflow: hidden;
    position: relative;
}

.tab-panel-teaser.is-locked .teaser-fade-overlay {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.98) 75%, rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
    z-index: 2;
}

.teaser-fade-overlay {
    display: none;
}

.tab-panel-teaser.is-locked .lock-overlay {
    display: flex !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin-top: -45px;
    z-index: 10;
    justify-content: center;
    align-items: center;
}

.tab-panel-teaser.is-locked .teaser-cta-card {
    border: 1px solid rgba(79, 70, 229, 0.15) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

@keyframes lockOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes lockCardScaleIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.lock-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

/* Trigger smooth fade-in and springy scale animations when tab is active and locked */
.tab-panel.active.is-locked .lock-overlay {
    animation: lockOverlayFadeIn 0.35s ease-out forwards;
}

.tab-panel.active.is-locked .lock-card {
    animation: lockCardScaleIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lock-card {
    background: white;
    padding: 32px 24px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 420px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0; /* Default invisible, animated to 1 on active tab panel */
}

.lock-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
}

.lock-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.lock-desc {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.lock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
    width: 100%;
}

.lock-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.panel-meta-note {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* FAQ Accordion Styling */
.faq-item {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item:hover {
    border-color: #4f46e5 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.04);
}

.faq-item h3 span {
    transition: transform 0.25s ease;
}

.faq-item.active h3 span {
    transform: rotate(45deg);
}

/* FAQ Smooth height grid transition wrapper */
.faq-answer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.faq-item.active .faq-answer-wrapper {
    grid-template-rows: 1fr;
}

.faq-answer-wrapper p {
    min-height: 0;
}

/* General Layout helpers */
.grader-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   V2 UPGRADE COMPONENTS (Breakdowns, Bullet Analyzer, JD Matcher)
   ========================================================================== */

/* Breakdown Bars */
.breakdown-bars {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(99, 102, 241, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
}

.bar-outer {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.bar-inner {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Bullet Analyzer */
.bullet-analyzer-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
}

.analyzed-bullet-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.analyzed-bullet-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.06);
}

.bullet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bullet-text-content {
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.5;
    word-break: break-word;
}

.bullet-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bullet-badge.pass {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.bullet-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.bullet-badge.danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.15);
}

.bullet-card-details {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}

.bullet-card-details span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bullet-advice-box {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4b5563;
    background: #f9fafb;
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid #6b7280;
}

.bullet-advice-box.pass { border-left-color: #10b981; }
.bullet-advice-box.warning { border-left-color: #f59e0b; }
.bullet-advice-box.danger { border-left-color: #ef4444; }

/* JD Matcher */
.jd-matcher-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.jd-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.6);
}

.jd-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.keyword-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    transition: all 0.2s ease;
}

.keyword-badge.matched {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.keyword-badge.missing {
    background: rgba(239, 68, 68, 0.08);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   V3 UPGRADE COMPONENTS (Cap Warnings & Metric Optimizer)
   ========================================================================== */

/* Cap Warning Banner */
.cap-warning-banner {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-out;
}

.cap-warning-title {
    font-weight: 700;
    color: #b91c1c;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.cap-warning-desc {
    font-size: 0.85rem;
    color: #7f1d1d;
    line-height: 1.5;
}

.capped-subscore-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    border: 1px solid rgba(239, 68, 68, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    vertical-align: middle;
}

/* Language Warning & Success Banners */
.lang-warning-banner {
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-out;
}

.lang-success-banner {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeIn 0.3s ease-out;
}

/* Metric Optimizer Generator */
.metric-generator-card {
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.02), rgba(99, 102, 241, 0.05));
    border: 1px dashed rgba(99, 102, 241, 0.25);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: fadeIn 0.3s ease-out;
}

.generator-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4f46e5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.generator-template-box {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.generator-input {
    border-bottom: 2px solid #6366f1;
    font-weight: 600;
    color: #4f46e5;
    padding: 0 4px;
    background: rgba(99, 102, 241, 0.04);
    border-radius: 4px;
    display: inline-block;
    min-width: 40px;
    outline: none;
    transition: all 0.2s ease;
}

.generator-input:focus {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.15);
    border-bottom-color: #4f46e5;
}

.generator-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.generator-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generator-copy-btn:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.generator-copy-btn.copied {
    background: #10b981;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   V4 UPGRADE COMPONENTS (Interactive CV Viewer & Bounding Boxes)
   ========================================================================== */

/* State transition for upload card when showing CV viewer - Full Bleed Sheet look */
.grader-upload-card.has-viewer {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: auto !important;
    cursor: default !important;
    position: sticky;
    top: 100px;
}

.grader-upload-card.has-viewer:hover {
    transform: none;
    box-shadow: none !important;
}

.viewer-nav-btn, .viewer-zoom-btn {
    transition: all 0.2s ease;
}
.viewer-nav-btn:hover:not(:disabled), .viewer-zoom-btn:hover:not(:disabled) {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    color: #111827;
}
.viewer-nav-btn:disabled, .viewer-zoom-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.viewer-reset-btn:hover {
    background: rgba(79, 70, 229, 0.1) !important;
    color: #4338ca !important;
    transform: translateY(-0.5px);
}

/* PDF Canvas Wrapper styling */
.pdf-canvas-wrapper {
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: white;
    margin: 0 auto;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: var(--page-aspect-ratio, 0.707);
}

.pdf-canvas-wrapper canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

#cvOverlayLayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Interactive CV Highlights */
.cv-highlight {
    position: absolute;
    border-radius: 3px;
    pointer-events: auto; /* Enable hover & cursor pointer/help */
    cursor: help;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
}

.cv-highlight:hover {
    box-shadow: 0 0 6px currentColor;
    background: rgba(255, 255, 255, 0.25);
    z-index: 8;
}

.cv-highlight.highlight-verb {
    background: rgba(16, 185, 129, 0.06);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.cv-highlight.highlight-verb:hover {
    background: rgba(16, 185, 129, 0.18);
}

.cv-highlight.highlight-metric {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.cv-highlight.highlight-metric:hover {
    background: rgba(59, 130, 246, 0.18);
}

.cv-highlight.highlight-weak {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.cv-highlight.highlight-weak:hover {
    background: rgba(245, 158, 11, 0.18);
}

/* Active bullet click glow annotation overlay */
@keyframes pulse-highlight {
    0% {
        transform: scale(0.99);
        opacity: 0.4;
        box-shadow: 0 0 0 0px rgba(79, 70, 229, 0.5);
    }
    50% {
        transform: scale(1.01);
        opacity: 1;
        box-shadow: 0 0 15px 5px rgba(79, 70, 229, 0.3);
    }
    100% {
        transform: scale(1);
        opacity: 0.85;
        box-shadow: 0 0 0 0px rgba(79, 70, 229, 0);
    }
}

.analyzed-bullet-card {
    cursor: pointer;
}

/* Custom premium scrollbar for CV Viewer body */
.cv-viewer-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.cv-viewer-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.01);
    border-radius: 8px;
}
.cv-viewer-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    transition: background 0.2s ease;
}
.cv-viewer-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Vertical Sidebar Results Grid - Transitioned to Horizontal Tab navigation globally */
.grader-results-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 20px;
    width: 100%;
}

/* Sidebar Navigation Buttons - Row layout globally */
.grader-sidebar-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 8px;
    scrollbar-width: none; /* Hide scrollbar */
}
.grader-sidebar-nav::-webkit-scrollbar {
    display: none;
}

.grader-sidebar-nav .tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    text-align: center;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.grader-sidebar-nav .tab-btn:hover {
    color: #1f2937;
    background: rgba(0, 0, 0, 0.03);
}

.grader-sidebar-nav .tab-btn.active {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.06);
    border-color: rgba(99, 102, 241, 0.08);
}

/* Crimson Pastel Badge for Nav Alerts */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #b91c1c;
    background: #fee2e2;
    border-radius: 9999px;
    margin-left: 6px;
    transition: all 0.2s ease;
}

.tab-btn.active .nav-badge {
    background: #fee2e2;
    color: #b91c1c;
}

/* ATS Badges */
.ats-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    margin-top: 2px;
}

.ats-badge.excel {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.ats-badge.good {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.ats-badge.fair {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.ats-badge.crit {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   2026 HIGH-FIDELITY PREMIUM SCANNER LOADER DESIGN SYSTEM
   ========================================================================== */
.scanner-loader {
    text-align: left;
    padding: 10px 6px;
    animation: loaderLayoutFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loaderLayoutFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader-main-title {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1f2937, #4b5563);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px !important;
}

/* Upgraded progress container using a premium gradient flow animation */
.loader-progress-container {
    width: 100%;
    height: 8px !important;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 9999px !important;
    overflow: hidden;
    margin: 16px 0 32px 0 !important;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #8b5cf6, #ec4899) !important;
    background-size: 200% auto !important;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
    border-radius: 9999px !important;
    transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
    animation: gradientShift 2.5s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Checklist Layout using interactive Card style steps */
.loader-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px !important;
}

.checklist-step {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 1rem;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 14px;
    padding: 16px 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.01);
}

.checklist-step .step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    background: #ffffff;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Step - Pending State styling */
.checklist-step.pending {
    opacity: 0.5;
}

.checklist-step.pending .step-icon::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
}

/* Step - Active/Analyzing State styling */
.checklist-step.active {
    color: #1f2937;
    font-weight: 700;
    background: #ffffff;
    border-color: rgba(79, 70, 229, 0.15);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.06), 0 4px 6px -2px rgba(79, 70, 229, 0.02);
    transform: translateX(4px);
    opacity: 1;
}

.checklist-step.active .step-icon {
    border-color: #4f46e5;
    background: rgba(79, 70, 229, 0.03);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checklist-step.active .step-icon::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4f46e5;
    animation: activeStepPulse 1.8s infinite ease-in-out;
}

@keyframes activeStepPulse {
    0% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 6px rgba(79, 70, 229, 0.4); }
    100% { transform: scale(0.8); opacity: 0.6; }
}

/* Step - Completed/Done State styling */
.checklist-step.done {
    color: #10b981;
    background: rgba(16, 185, 129, 0.02);
    border-color: rgba(16, 185, 129, 0.12);
    opacity: 0.9;
}

.checklist-step.done .step-icon {
    border-color: #10b981;
    background: #10b981;
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.checklist-step.done .step-icon::before {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    font-weight: 900;
}



/* ==========================================================================
   RESPONSIVE POLISH — Trust Badges, Sample Preview, Educational Hub
   ========================================================================== */

/* ---- Tablet (≤ 768px) ---- */
@media (max-width: 768px) {
    /* Results card: reduce padding to prevent text clipping */
    .grader-results-card {
        padding: 24px 20px;
    }

    /* Trust badges: stack vertically on smaller screens */
    .eeat-trust-badges {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 12px 0 !important;
    }

    /* Static sample preview: tighter padding */
    .static-sample-preview {
        padding-top: 16px !important;
        margin-top: 20px !important;
    }

    /* Educational hub: reduce heading sizes */
    .grader-educational-hub h2 {
        font-size: 1.7rem !important;
    }
    .grader-educational-hub h3 {
        font-size: 1.15rem !important;
    }

    /* ATS comparison table: ensure horizontal scroll works */
    .grader-educational-hub table {
        min-width: 650px;
    }

    /* CTA section: reduce padding */
    .grader-cta {
        padding: 40px 24px !important;
    }
    .grader-cta h2 {
        font-size: 1.7rem !important;
    }

    /* FAQ section */
    .grader-faq h2 {
        font-size: 1.6rem !important;
    }

    /* Main h1 */
    .grader-header h1 {
        font-size: 2.1rem !important;
    }
}

/* ---- Phone (≤ 480px) ---- */
@media (max-width: 480px) {
    .grader-results-card {
        padding: 18px 14px;
        border-radius: 14px;
    }

    /* Header */
    .grader-header h1 {
        font-size: 1.7rem !important;
    }
    .grader-header p {
        font-size: 1rem !important;
    }

    /* Trust badges: smaller font */
    .eeat-trust-badges span {
        font-size: 0.75rem !important;
    }

    /* Static sample preview: prevent overflow */
    .static-sample-preview > div {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* Score radial shrink */
    .score-radial {
        width: 120px;
        height: 120px;
    }
    .progress-ring {
        width: 120px;
        height: 120px;
    }
    .progress-ring__circle-bg,
    .progress-ring__circle {
        r: 52;
        cx: 60;
        cy: 60;
    }
    .score-value {
        font-size: 1.8rem;
    }

    /* Educational hub */
    .grader-educational-hub {
        margin: 40px auto !important;
    }
    .grader-educational-hub h2 {
        font-size: 1.4rem !important;
    }
    .grader-educational-hub p,
    .grader-educational-hub li {
        font-size: 0.92rem !important;
    }

    /* CTA */
    .grader-cta {
        padding: 32px 16px !important;
        margin: 40px 0 !important;
        border-radius: 16px !important;
    }
    .grader-cta h2 {
        font-size: 1.4rem !important;
    }
    .grader-cta-btn {
        padding: 14px 24px !important;
        font-size: 0.9rem !important;
    }

    /* Lock card */
    .lock-card {
        padding: 24px 16px;
    }
    .lock-title {
        font-size: 1.1rem;
    }

    /* Tab navigation: smaller tabs */
    .grader-sidebar-nav .tab-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    /* FAQ */
    .faq-item {
        padding: 18px !important;
    }
    .faq-item h3 {
        font-size: 1rem !important;
    }
}

/* ---- Ultra-narrow (≤ 360px) ---- */
@media (max-width: 360px) {
    .grader-results-card {
        padding: 14px 10px;
    }
    .grader-header h1 {
        font-size: 1.45rem !important;
    }
    .grader-educational-hub h2 {
        font-size: 1.25rem !important;
    }
    .grader-cta h2 {
        font-size: 1.2rem !important;
    }
}

