/* ==========================================================================
   AI Based Resume Screening System - Modern Recruiter Design System
   ========================================================================== */

:root {
    /* Color Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;

    --purple: #7c3aed;
    --purple-light: #f5f3ff;
    --purple-border: #ddd6fe;

    --emerald: #059669;
    --emerald-light: #ecfdf5;
    --emerald-border: #a7f3d0;

    --amber: #d97706;
    --amber-light: #fffbeb;
    --amber-border: #fde68a;

    --rose: #dc2626;
    --rose-light: #fef2f2;
    --rose-border: #fecaca;

    /* Neutrals */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-sub: #475569;

    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Elevation */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
}

p {
    color: var(--text-sub);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
}

.text-primary { color: var(--primary) !important; }
.text-purple { color: var(--purple) !important; }
.text-emerald { color: var(--emerald) !important; }
.text-amber { color: var(--amber) !important; }
.text-danger { color: var(--rose) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.font-semibold { font-weight: 600 !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.main-content {
    flex: 1;
    padding: 2rem 0 3rem;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    display: block;
    line-height: 1;
}

.logo-sub {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    display: block;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    color: var(--text-sub);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-link:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border-color);
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--bg-main);
    border-color: var(--text-muted);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary-border);
}
.btn-outline-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--text-sub);
    border-color: var(--border-color);
}
.btn-outline-secondary:hover {
    background-color: var(--bg-main);
    color: var(--text-main);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-sub);
    border: none;
    padding: 0.4rem 0.6rem;
}
.btn-ghost:hover {
    background-color: var(--border-light);
    color: var(--text-main);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    line-height: 1;
    border: 1px solid transparent;
}

.badge-primary { background: var(--primary-light); color: var(--primary); border-color: var(--primary-border); }
.badge-secondary { background: var(--border-light); color: var(--text-sub); border-color: var(--border-color); }
.badge-purple { background: var(--purple-light); color: var(--purple); border-color: var(--purple-border); }
.badge-excellent { background: var(--emerald-light); color: var(--emerald); border-color: var(--emerald-border); }
.badge-strong { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.badge-moderate { background: var(--amber-light); color: var(--amber); border-color: var(--amber-border); }
.badge-low { background: var(--rose-light); color: var(--rose); border-color: var(--rose-border); }

/* Alerts */
.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
}

.alert-success { background: var(--emerald-light); color: #065f46; border-color: var(--emerald-border); }
.alert-danger { background: var(--rose-light); color: #991b1b; border-color: var(--rose-border); }
.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}
.alert-close:hover { opacity: 1; }

/* ==========================================================================
   Cards & Layout Components
   ========================================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-body {
    padding: 1.5rem;
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.icon-blue { background: var(--primary-light); color: var(--primary); }
.icon-purple { background: var(--purple-light); color: var(--purple); }
.icon-green { background: var(--emerald-light); color: var(--emerald); }
.icon-amber { background: var(--amber-light); color: var(--amber); }

/* ==========================================================================
   Hero Section (Landing Page)
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 3rem 0 2.5rem;
    max-width: 850px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    text-align: left;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Workflow Steps & Scoring Sections
   ========================================================================== */
.workflow-section, .scoring-section, .about-section {
    padding: 3rem 0;
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1.85rem;
    margin-bottom: 0.5rem;
}

.section-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.workflow-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.workflow-step {
    flex: 1;
    min-width: 200px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.25rem;
    position: relative;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0.5rem 0 0.75rem;
}

.workflow-step h4 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.workflow-step p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.workflow-arrow {
    color: var(--border-color);
    font-size: 1.25rem;
}

.scoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.weight-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.weight-percentage {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.weight-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.weight-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.about-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.about-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.about-header i {
    font-size: 1.75rem;
    color: var(--primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.about-item h4 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-item ul {
    list-style: none;
}

.about-item li {
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 0.6rem;
    position: relative;
    padding-left: 1rem;
}

.about-item li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

code {
    background: var(--border-light);
    color: var(--purple);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
}

/* ==========================================================================
   Recruiter Dashboard & Upload Form
   ========================================================================== */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.65rem;
    margin-bottom: 0.2rem;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.dashboard-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.screening-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.form-control, .form-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: white;
    color: var(--text-main);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.form-control {
    resize: vertical;
    line-height: 1.5;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2.25rem 1.5rem;
    text-align: center;
    cursor: pointer;
    background: var(--bg-main);
    transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.dropzone-icon {
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.dropzone h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.dropzone p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.file-limits {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.selected-files-list {
    margin-top: 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
}

.files-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.file-items-scroll {
    max-height: 140px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.file-item-chip {
    background: white;
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upload-action-area {
    margin-top: 1.5rem;
}

.demo-callout {
    margin-top: 1.25rem;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.callout-icon {
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 2px;
}

.callout-text {
    font-size: 0.75rem;
    color: var(--text-sub);
    line-height: 1.4;
}

/* ==========================================================================
   Results Page & Leaderboard
   ========================================================================== */
.results-header-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.results-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.results-badge-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.results-job-title {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
}

.results-job-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.results-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.required-skills-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.req-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.skill-chips-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    line-height: 1.2;
}

.skill-req { background: #f1f5f9; color: var(--text-main); border: 1px solid var(--border-color); }
.skill-matched { background: var(--emerald-light); color: var(--emerald); border: 1px solid var(--emerald-border); }
.skill-missing { background: var(--rose-light); color: var(--rose); border: 1px solid var(--rose-border); }
.skill-bonus { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }

.skill-chip-more {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-number {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Toolbar */
.toolbar-card {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.toolbar-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input {
    padding-left: 2.25rem;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-sub);
}

.filter-item select {
    width: auto;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

.quick-skill-filters {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tag-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.skill-filter-list {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.btn-filter-pill {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-sub);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-filter-pill:hover, .btn-filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Leaderboard Table */
.table-card-header {
    background: white;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.table th {
    background: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.8);
}

.rank-badge {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.rank-1 { color: #b45309; }
.rank-2 { color: #475569; }
.rank-3 { color: #b45309; }
.rank-other { color: var(--text-muted); }

.candidate-info-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.candidate-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-border);
    flex-shrink: 0;
}

.candidate-name a {
    font-weight: 700;
    color: var(--text-main);
}
.candidate-name a:hover {
    color: var(--primary);
}

.candidate-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-sep { opacity: 0.5; }

.skill-chips-cell {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    max-width: 250px;
}

.score-cell-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.score-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.score-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.95rem;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: var(--border-light);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s ease;
}

.fill-excellent { background: linear-gradient(90deg, #10b981, #059669); }
.fill-strong { background: linear-gradient(90deg, #38bdf8, #2563eb); }
.fill-moderate { background: linear-gradient(90deg, #fbbf24, #d97706); }
.fill-low { background: linear-gradient(90deg, #f87171, #dc2626); }
.fill-primary { background: var(--primary); }
.fill-purple { background: var(--purple); }
.fill-emerald { background: var(--emerald); }
.fill-amber { background: var(--amber); }

.action-buttons-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.score-formula-card {
    margin-top: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.formula-icon {
    color: var(--primary);
    font-size: 1.25rem;
}

.formula-text {
    font-size: 0.8rem;
    color: var(--text-sub);
}

/* ==========================================================================
   Candidate Details Page
   ========================================================================== */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

.breadcrumb-back {
    font-weight: 600;
}

.candidate-hero-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem;
}

.candidate-hero-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.candidate-hero-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.hero-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.candidate-hero-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.candidate-hero-name {
    font-size: 1.85rem;
}

.rank-pill {
    background: var(--amber-light);
    color: var(--amber);
    border: 1px solid var(--amber-border);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.candidate-contact-chips {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.contact-chip {
    font-size: 0.8rem;
    color: var(--text-sub);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hero-score-box {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hero-score-val {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.hero-score-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.candidate-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 1.5rem;
}

.candidate-main-col, .candidate-side-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Explainability */
.explanation-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.explanation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: var(--text-main);
    background: var(--bg-main);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--emerald);
}

.skill-category-group {
    margin-bottom: 1.25rem;
}
.skill-category-group:last-child { margin-bottom: 0; }

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.extracted-section {
    margin-bottom: 1.25rem;
}

.extracted-section h4 {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.extracted-text {
    font-size: 0.85rem;
    color: var(--text-sub);
    background: var(--bg-main);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.whitespace-pre {
    white-space: pre-line;
}

.raw-text-details {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.raw-text-summary {
    padding: 0.65rem 0.85rem;
    background: var(--bg-main);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.raw-text-box {
    padding: 0.85rem;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.75rem;
    font-family: monospace;
    max-height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Scoring Breakdown Sidecard */
.score-breakdown-item {
    margin-bottom: 1.25rem;
}

.breakdown-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.breakdown-val {
    font-weight: 700;
    font-size: 0.85rem;
}

.breakdown-subtext {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.final-score-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.95rem;
}

.final-score-big {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    color: var(--primary);
}

.job-context-title {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.job-context-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   History Page
   ========================================================================== */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.history-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
}

.history-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.history-badge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.history-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-job-title {
    font-size: 1.2rem;
}

.history-stats-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.history-stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.history-skills-preview {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

/* Empty State */
.empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.footer-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 500px;
}

.footer-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-sub);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ==========================================================================
   Loading Overlay Modal
   ========================================================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    animation: spin 0.8s linear infinite;
}

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

.loading-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.loading-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
    .screening-grid, .candidate-grid, .about-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.15rem;
    }
    .results-header-content {
        flex-direction: column;
    }
}
