/* =========================================
   ATS RESUME AUDIT — DEDICATED STYLESHEET
   Clean, Minimalist, Enterprise-Grade Design
========================================= */

:root {
    --bg-color: #090d16;
    --card-bg: #0f1420;
    --card-hover-bg: #141b2a;
    --header-bg: #0d121c;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --primary-blue: #2563eb;
    --primary-blue-hover: #1d4ed8;
    --success-green: #10b981;
    --warning-amber: #f59e0b;
    --danger-rose: #ef4444;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-primary);
    min-height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Header */
.screening-header {
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
    z-index: 50;
    position: relative;
}

.screening-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.btn-back-hub {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 6px 11px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.btn-back-hub:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: translateX(-1px);
}

.title-group {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.title-group h1 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.badge-screening {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success-green);
}

.screening-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Common Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
    border: none;
    text-decoration: none;
}

.btn-maker-nav {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: #f1f5f9;
    white-space: nowrap;
}

.header-nav-arrow {
    font-size: 0.72rem;
    opacity: 0.7;
    transition: transform 0.18s ease;
}

.btn-maker-nav:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    border-color: var(--border-hover);
}

.btn-maker-nav:hover .header-nav-arrow {
    transform: translateX(2px);
    opacity: 1;
}

.btn-secondary-clean {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-secondary-clean:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: var(--border-hover);
}

.btn-primary-clean {
    background: var(--primary-blue);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 500;
    padding: 9px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.18s ease;
}

.btn-primary-clean:hover {
    background: var(--primary-blue-hover);
}

.btn-run-screening {
    width: 100%;
    padding: 11px 18px;
    background: var(--primary-blue);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1.25rem;
    cursor: pointer;
    transition: background 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-run-screening:hover {
    background: var(--primary-blue-hover);
}

/* App Body Layout */
.screening-app-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Left Panel: Inputs */
.screening-input-pane {
    width: 44%;
    padding: 1.5rem;
    overflow-y: auto;
    border-right: 1px solid var(--border-subtle);
    background: var(--card-bg);
}

.input-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.15rem;
    margin-bottom: 1.25rem;
}

.input-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.input-card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-card-header h3 i {
    color: #60a5fa;
    font-size: 0.9rem;
}

.input-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    line-height: 1.45;
}

.screening-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 9px 11px;
    color: #fff;
    font-family: inherit;
    font-size: 0.86rem;
    line-height: 1.5;
    transition: border-color 0.18s ease;
}

.screening-textarea:focus {
    border-color: #3b82f6;
    outline: none;
}

select.screening-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1em;
    padding-right: 2.2rem !important;
}

select.screening-select option,
select.screening-select optgroup {
    background: #0f1420;
    color: #f1f5f9;
}

/* Dedicated PDF Dropzone */
.pdf-dropzone {
    margin-top: 0.5rem;
    border: 1.5px dashed rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.015);
    transition: all 0.18s ease;
}

.pdf-dropzone:hover,
.pdf-dropzone.drag-active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.04);
}

.pdf-drop-icon {
    font-size: 1.8rem;
    color: #64748b;
    margin-bottom: 0.6rem;
    display: block;
}

.pdf-prompt-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #f1f5f9;
    margin-bottom: 0.3rem;
}

.pdf-dropzone-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
    line-height: 1.4;
}

.btn-pdf-select {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-pdf-select:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
}

/* Uploaded PDF File Card */
.cv-file-loaded-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.cv-file-info-row {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    flex: 1;
}

.file-pdf-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ef4444;
    flex-shrink: 0;
}

.file-pdf-meta {
    min-width: 0;
    flex: 1;
}

.file-name-text {
    display: block;
    font-size: 0.86rem;
    font-weight: 500;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.file-meta-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.meta-dot {
    opacity: 0.4;
}

.file-verified-chip {
    color: var(--success-green);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-change-pdf {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 5px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}

.btn-change-pdf:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: var(--border-hover);
}

.cv-upload-status {
    font-size: 0.76rem;
    color: #60a5fa;
    margin-top: 0.65rem;
    line-height: 1.4;
}

.file-dropzone {
    margin-top: 0.7rem;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 0.9rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    transition: all 0.18s ease;
}

.file-dropzone:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.02);
}

/* Right Panel: Analysis Workbench */
.screening-results-pane {
    width: 56%;
    background: var(--bg-color);
    overflow-y: auto;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
}

/* Placeholder State */
.results-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-muted);
}

.placeholder-icon {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.15rem;
}

.results-placeholder h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.35rem;
}

.results-placeholder p {
    font-size: 0.84rem;
    max-width: 440px;
    line-height: 1.55;
    margin-bottom: 1.35rem;
    color: var(--text-muted);
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    max-width: 480px;
}

.pill-item {
    font-size: 0.74rem;
    padding: 4px 11px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-subtle);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pill-item i {
    color: var(--success-green);
    font-size: 0.7rem;
}

/* Loading State — Clean Minimalist */
.screening-loading-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1.5rem;
}

.clean-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--primary-blue);
    animation: cleanSpin 0.75s linear infinite;
    margin: 0 auto 1.25rem;
}

@keyframes cleanSpin {
    to { transform: rotate(360deg); }
}

#screening-status-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 0.3rem;
}

.screening-status-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Deep Audit Pipeline (Loading State) */
.audit-pipeline-container {
    width: 100%;
    max-width: 460px;
    margin-top: 1.5rem;
    text-align: left;
}

.pipeline-progress-wrapper {
    margin-bottom: 1.15rem;
}

.pipeline-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.pipeline-progress-header strong {
    color: #60a5fa;
    font-family: var(--font-mono);
}

.pipeline-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.pipeline-fill {
    height: 100%;
    width: 20%;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: width 0.35s ease;
}

.pipeline-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pipeline-step-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 9px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-muted);
    transition: all 0.18s ease;
}

.pipeline-step-item.active {
    background: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.3);
    color: #f8fafc;
}

.pipeline-step-item.done {
    background: rgba(255, 255, 255, 0.015);
    border-color: var(--border-subtle);
    color: #cbd5e1;
}

.pipeline-step-item .step-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.64rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.pipeline-step-item.active .step-icon {
    background: var(--primary-blue);
    color: #fff;
}

.pipeline-step-item.done .step-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-green);
}

/* Report Top Action Bar */
.audit-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.85rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.audit-meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.audit-meta-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: #cbd5e1;
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.audit-action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action-small {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-subtle);
    color: #cbd5e1;
    font-size: 0.74rem;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.18s ease;
}

.btn-action-small:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: var(--border-hover);
}

/* Results State — Executive Score Banner */
.screening-score-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.15rem;
}

.score-circle-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.score-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 6;
}

.score-ring-bar {
    fill: none;
    stroke: var(--primary-blue);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 314.16;
    stroke-dashoffset: 314.16;
    transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.25s;
}

.score-number-box {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#screening-score-num {
    font-size: 1.85rem;
    font-weight: 700;
    color: #fff;
}

.score-number-box small {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.score-info-box {
    flex: 1;
}

.score-pill-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.45rem;
    flex-wrap: wrap;
}

.score-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border: 1px solid var(--border-subtle);
}

.score-badge.badge-success {
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

.score-badge.badge-warning {
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.score-badge.badge-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.tier-badge {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    color: #cbd5e1;
    border: 1px solid var(--border-subtle);
}

.pass-chance-chip {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    border: 1px solid var(--border-subtle);
}

#screening-verdict-title {
    font-size: 1.08rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.score-summary-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Recruiter First-Scan Review */
.recruiter-glance-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--primary-blue);
    border-radius: 6px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.15rem;
    display: flex;
    gap: 11px;
    align-items: flex-start;
}

.recruiter-glance-card .glance-icon {
    font-size: 1rem;
    color: #60a5fa;
    margin-top: 2px;
    flex-shrink: 0;
}

.recruiter-glance-card h4 {
    font-size: 0.84rem;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.2rem;
}

.recruiter-glance-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* 6 Diagnostic Metrics */
.screening-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.metric-header span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.metric-header strong {
    font-size: 0.82rem;
    color: #fff;
    font-weight: 600;
    font-family: var(--font-mono);
}

.progress-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Section-by-Section Health Audit */
.section-audit-section,
.rewrite-suggestions-section,
.keywords-analysis-section,
.red-flags-section {
    margin-bottom: 1.5rem;
}

.section-audit-section h4,
.rewrite-suggestions-section h4,
.keywords-analysis-section h4,
.red-flags-section h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 7px;
}

.section-audit-section h4 i,
.rewrite-suggestions-section h4 i,
.keywords-analysis-section h4 i,
.red-flags-section h4 i {
    color: #94a3b8;
    font-size: 0.85rem;
}

.section-audit-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.65rem;
}

.section-audit-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.section-audit-card.status-pass {
    border-left: 3px solid var(--success-green);
}

.section-audit-card.status-warning {
    border-left: 3px solid var(--warning-amber);
}

.section-audit-card.status-danger {
    border-left: 3px solid var(--danger-rose);
}

.section-audit-info h5 {
    font-size: 0.84rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 7px;
}

.section-audit-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.section-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

.section-status-badge.badge-pass {
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.section-status-badge.badge-warning {
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.section-status-badge.badge-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Before & After Rewrite Suggestions */
.rewrite-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.rewrite-row {
    margin-bottom: 0.65rem;
}

.rewrite-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.rewrite-label.before { color: #f87171; }
.rewrite-label.after { color: #34d399; }

.rewrite-text-box {
    font-size: 0.82rem;
    padding: 7px 10px;
    border-radius: 5px;
    line-height: 1.45;
}

.rewrite-text-box.before {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    text-decoration: line-through;
}

.rewrite-text-box.after {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: #a7f3d0;
}

.rewrite-why {
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.rewrite-why i { color: #60a5fa; }

/* Keywords Matrix */
.keywords-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.keyword-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.9rem;
    min-height: 96px;
}

.keyword-card.matched {
    border-top: 2.5px solid var(--success-green);
}

.keyword-card.missing {
    border-top: 2.5px solid var(--warning-amber);
}

.keyword-card h5 {
    font-size: 0.8rem;
    color: #fff;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.keyword-card.matched h5 i { color: var(--success-green); }
.keyword-card.missing h5 i { color: var(--warning-amber); }

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.keyword-tag {
    font-size: 0.72rem;
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 500;
}

.keyword-tag.tag-matched {
    background: rgba(16, 185, 129, 0.08);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.keyword-tag.tag-missing {
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.keyword-tag small {
    opacity: 0.75;
    font-size: 0.66rem;
    margin-left: 3px;
}

/* Red Flags & Pitfalls */
.red-flags-card {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.16);
    border-radius: 6px;
    padding: 0.85rem 1.1rem;
}

.red-flags-card.clean {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.18);
}

.red-flags-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.red-flags-list li {
    font-size: 0.8rem;
    color: #fca5a5;
    line-height: 1.45;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.red-flags-list li:last-child {
    margin-bottom: 0;
}

.red-flags-card.clean .red-flags-list li {
    color: #a7f3d0;
}

/* Feedback Grid (Strengths vs Improvements) */
.feedback-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.feedback-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.95rem;
}

.feedback-card.strengths {
    border-left: 3px solid var(--success-green);
}

.feedback-card.improvements {
    border-left: 3px solid #3b82f6;
}

.feedback-card h4 {
    font-size: 0.86rem;
    color: #fff;
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 7px;
}

.feedback-card.strengths h4 i { color: var(--success-green); }
.feedback-card.improvements h4 i { color: #60a5fa; }

.feedback-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feedback-list li {
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 14px;
}

.feedback-list li:last-child {
    margin-bottom: 0;
}

.feedback-list li::before {
    content: '•';
    position: absolute;
    left: 2px;
    top: -1px;
    font-size: 1rem;
    color: var(--text-subtle);
}

.feedback-card.strengths .feedback-list li::before { color: var(--success-green); }
.feedback-card.improvements .feedback-list li::before { color: #60a5fa; }

/* Action Footer */
.screening-action-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* Mobile Pane Switcher (hidden on desktop) */
.mobile-pane-switcher {
    display: none;
}

/* =========================================
   RESPONSIVE DESIGN (<= 900px)
   ========================================= */
@media screen and (max-width: 900px) {
    body {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .screening-header {
        height: auto;
        min-height: 52px;
        padding: 8px 12px;
    }

    .screening-header-left {
        gap: 8px;
    }

    .title-group h1 {
        font-size: 0.96rem;
    }

    .screening-app-body {
        flex-direction: column;
        overflow: visible;
        height: auto;
    }

    /* Mobile Segmented Control */
    .mobile-pane-switcher {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 8px 12px;
        background: #0f1420;
        border-bottom: 1px solid var(--border-subtle);
        position: sticky;
        top: 0;
        z-index: 45;
    }

    .mobile-tab-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 8px 10px;
        border-radius: 6px;
        font-family: inherit;
        font-size: 0.8rem;
        font-weight: 500;
        cursor: pointer;
        border: 1px solid var(--border-subtle);
        background: rgba(255, 255, 255, 0.03);
        color: var(--text-muted);
        transition: all 0.18s ease;
    }

    .mobile-tab-btn.active {
        background: var(--primary-blue);
        color: #ffffff;
        border-color: var(--primary-blue);
    }

    .mobile-tab-badge {
        font-size: 0.68rem;
        padding: 1px 5px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }

    .mobile-tab-btn.active .mobile-tab-badge {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

    /* Panels full width toggle */
    .screening-input-pane,
    .screening-results-pane {
        width: 100% !important;
        max-width: 100% !important;
        border-right: none;
        overflow-y: visible;
        height: auto;
        padding: 1rem 1rem 2.5rem 1rem;
    }

    .screening-input-pane {
        display: none;
    }

    .screening-input-pane.mobile-active {
        display: block !important;
    }

    .screening-results-pane {
        display: none;
        min-height: 65vh;
    }

    .screening-results-pane.mobile-active {
        display: flex !important;
    }

    /* Grids to 1 col on mobile */
    .screening-metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .keywords-grid,
    .feedback-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .screening-score-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.15rem 1rem;
    }

    .score-circle-wrapper {
        margin: 0 auto;
    }

    .score-pill-row {
        justify-content: center;
    }

    .audit-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .audit-action-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    #btn-rescan-top {
        grid-column: span 2;
    }
}

/* Extra small devices (<= 480px) */
@media screen and (max-width: 480px) {
    .btn-back-hub .btn-back-label {
        display: none;
    }

    .badge-screening {
        display: none;
    }

    .btn-maker-nav .header-nav-arrow {
        display: none;
    }

    .btn-maker-nav {
        padding: 5px 8px;
        font-size: 0.76rem;
    }

    .input-card {
        padding: 0.85rem;
    }
}

/* =========================================
   PRINT STYLESHEET
   Clean White Paper Print Optimization
========================================= */
@media print {
    body {
        background: #ffffff !important;
        color: #111827 !important;
        height: auto !important;
        overflow: visible !important;
    }

    .screening-header,
    .screening-input-pane,
    .mobile-pane-switcher,
    .audit-action-btns,
    .screening-action-footer,
    #btn-run-screening {
        display: none !important;
    }

    .screening-results-pane {
        width: 100% !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #111827 !important;
    }

    .screening-score-banner,
    .metric-card,
    .section-audit-card,
    .rewrite-card,
    .keyword-card,
    .red-flags-card,
    .feedback-card {
        background: #f9fafb !important;
        border: 1px solid #e5e7eb !important;
        color: #111827 !important;
        break-inside: avoid;
    }

    #screening-score-num,
    #screening-verdict-title,
    .section-audit-info h5,
    .metric-header strong,
    .keyword-card h5,
    .feedback-card h4 {
        color: #111827 !important;
    }

    .score-summary-text,
    .section-audit-info p,
    .feedback-list li,
    .audit-meta-info {
        color: #4b5563 !important;
    }
}
