/* CSS Variables - Apple-Inspired Professional Theme */
:root {
    /* Primary Colors - Apple Blue */
    --primary-color: #0071e3;
    --primary-hover: #0077ed;
    --primary-light: rgba(0, 113, 227, 0.1);
    --primary-50: rgba(0, 113, 227, 0.1);
    --success-light: rgba(52, 199, 89, 0.1);
    --warning-light: rgba(255, 159, 10, 0.1);
    --danger-light: rgba(255, 59, 48, 0.1);
    --info-light: rgba(90, 200, 250, 0.1);
    
    /* Semantic Colors */
    --secondary-color: #86868b;
    --success-color: #34c759;
    --info-color: #5ac8fa;
    --warning-color: #ff9f0a;
    --danger-color: #ff3b30;
    
    /* Dark Theme Colors */
    --dark-color: #f1f5f9;
    --light-color: #e2e8f0;
    --border-color: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    
    /* Backgrounds */
    --background: #f5f7fb;
    --bg-color: var(--background);
    --background-elevated: #ffffff;
    --card-bg: #ffffff;
    --card-bg-hover: #f8fafc;
    
    /* Glass Morphism */
    --glass-bg: rgba(28, 28, 30, 0.72);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.6);
    
    /* Border Radius - Apple uses generous radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-fast: all 0.15s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    
    /* Typography Scale */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 2rem;
    --font-4xl: 2.5rem;
    --font-5xl: 3.5rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    background: var(--background);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

/* Subtle animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 113, 227, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(94, 92, 230, 0.1), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(52, 199, 89, 0.08), transparent);
    pointer-events: none;
    z-index: -1;
}

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
}

.container.narrow {
    max-width: 960px;
}

.hero {
    margin-bottom: 2rem;
}

.hero-content {
    text-align: left;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(255, 255, 255, 0.88));
    padding: 2.1rem;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    max-width: 820px;
}

.hero-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 0.4rem;
}

.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.4rem;
}

.hero-lede {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 560px;
}

.hero-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.hero-actions .btn {
    margin-right: 0.5rem;
}

.layout-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .layout-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* Header - Apple-Inspired */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: var(--font-3xl);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    /* background: linear-gradient(135deg, #f5f5f7 0%, #86868b 100%); */
    /* -webkit-background-clip: text; */
    /* -webkit-text-fill-color: transparent; */
    /* background-clip: text; */
}

/* Elegant fade-in animation */
.animate-3d {
    animation: elegantFadeIn 1s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes elegantFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.company-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.company-logo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.tagline {
    font-size: var(--font-lg);
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.5rem;
}

/* Cards - Glass Morphism */
.card {
    background: var(--surface-100);
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
}

.job-card .vertical-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.input,
.textarea,
.input-chip select {
    width: 100%;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: #fff;
    color: var(--text-primary);
    padding: 0.75rem 0.85rem;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.textarea {
    min-height: 160px;
    resize: vertical;
}

.input:focus,
.textarea:focus,
.input-chip select:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

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

.help-text {
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

.card-eyebrow {
    font-size: var(--font-xs);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 0.35rem;
}

.card-subtitle {
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

.guide-list {
    list-style: decimal;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}
.guide-list code {
    word-break: break-all;
    font-size: 0.85rem;
}

.test-meta {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.log-snippet {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--surface-200);
    padding: 4px 8px;
    border-radius: 6px;
}

.candidate-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px;
    background: var(--surface-200);
    border-radius: 8px;
    padding: 6px 10px;
}

.candidate-stats div {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.candidate-stats strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.answers-preview {
    margin-top: 6px;
    border: 1px dashed var(--border-soft);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.answers-preview .fact-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 0;
}

.answers-preview .fact-row span {
    font-weight: 500;
}

.debug-block {
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.debug-block summary {
    cursor: pointer;
    padding: 2px 0;
}

.debug-block pre {
    max-height: 100px;
    font-size: 0.7rem;
    margin-top: 4px;
}

/* ========================================
   Compact View Mode
   ======================================== */
.compact-view .candidate-card {
    padding: 0.6rem 1rem;
    margin-bottom: 0.35rem;
}

.compact-view .candidate-header {
    margin-bottom: 0;
    align-items: center;
}

/* Main content area - make horizontal */
.compact-view .candidate-header > div:first-child {
    align-items: center;
    flex: 1;
}

/* Name and contact info container */
.compact-view .candidate-header > div:first-child > div {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.compact-view .candidate-header h4 {
    margin: 0 !important;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Contact info inline */
.compact-view .candidate-header > div:first-child > div > div[style*="font-size"] {
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
}

/* Links row inline */
.compact-view .candidate-header > div:first-child > div > div[style*="margin-top: 6px"] {
    margin: 0 !important;
}

/* Action buttons row - horizontal */
.compact-view .candidate-header > div:last-child {
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
}

/* Smaller score badge */
.compact-view .score-badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

/* Smaller action buttons */
.compact-view .candidate-header .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* Hide detailed sections */
.compact-view .candidate-stats,
.compact-view .ai-feedback,
.compact-view .answers-preview,
.compact-view .debug-block,
.compact-view .log-snippet,
.compact-view .test-meta {
    display: none !important;
}

/* Hide click to view text */
.compact-view .candidate-card > div[style*="text-align: center"] {
    display: none !important;
}

/* Smaller checkbox */
.compact-view .candidate-checkbox {
    width: 16px !important;
    height: 16px !important;
    margin-top: 0 !important;
}

/* Compact test badge - always visible */
.compact-test-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--primary-50);
    color: var(--primary-600);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.compact-test-badge i {
    font-size: 0.7rem;
}

/* Hide reject button in expanded view, show in compact */
.compact-reject-btn {
    display: none;
}

.compact-view .compact-reject-btn {
    display: inline-flex !important;
}

/* ========================================
   Job Workspace Dense Layout
   ======================================== */

/* Reduce page-level padding */
#job-info-section.surface-card {
    padding: 14px 18px;
}

#job-info-section .job-info {
    margin-bottom: 10px;
}

#job-info-section .eyebrow {
    margin-bottom: 2px;
    font-size: 0.7rem;
}

#job-info-section h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

#job-info-section .meta {
    font-size: 0.8rem;
}

/* Compact job meta grid (Status/Created/Job ID) */
#job-info-section .job-meta-grid {
    gap: 10px;
    margin-top: 8px;
}

#job-info-section .description-list {
    padding: 8px 12px;
    gap: 6px;
    font-size: 0.8rem;
}

#job-info-section .description-list li {
    padding: 4px 0;
}

#job-info-section .description-list strong {
    font-size: 0.95rem;
}

#job-info-section .job-id-card {
    padding: 8px 12px;
}

#job-info-section .job-id-card .eyebrow {
    margin-bottom: 4px;
}

#job-info-section .job-id-row {
    margin-bottom: 0;
}

#job-info-section .job-id-row code {
    font-size: 0.75rem;
    padding: 3px 6px;
}

/* Compact job description section */
#job-info-section #job-description {
    padding: 10px 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

#job-info-section #job-description h3,
#job-info-section #job-description h4 {
    font-size: 0.95rem;
    margin: 8px 0 4px;
}

/* Compact test info */
#job-info-section #job-test-info {
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
}

/* Compact action buttons row */
#job-info-section > div:last-of-type {
    margin-top: 8px;
    gap: 8px;
}

#job-info-section .btn-ghost {
    padding: 6px 10px;
    font-size: 0.8rem;
}

/* Pipeline section compact */
.section-intro {
    padding-bottom: 10px;
}

.section-intro .eyebrow {
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.section-intro h3 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.section-intro p {
    font-size: 0.8rem;
    margin: 0;
}

/* Compact filter panel */
.filter-panel {
    gap: 10px !important;
    padding: 8px 0;
}

.filter-panel .form-field {
    margin-bottom: 0;
}

.filter-panel .form-field label {
    font-size: 0.75rem;
    margin-bottom: 3px;
}

.filter-panel input,
.filter-panel select {
    padding: 6px 10px;
    font-size: 0.85rem;
    min-height: auto;
}

.filter-panel #search-input {
    min-width: 180px;
}

.filter-panel #score-min,
.filter-panel #score-max {
    width: 70px;
}

.filter-meta {
    margin-top: 6px !important;
    font-size: 0.75rem;
}

/* Compact card body */
.card-body {
    padding: 12px 0;
}

/* Compact bulk actions bar */
#bulk-actions-bar {
    margin: 10px 0 !important;
    padding: 10px 14px !important;
}

/* View toggle buttons smaller */
.section-intro + div .btn,
.section-intro ~ div .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Pipeline section surface card */
section.surface-card:not(#job-info-section) {
    padding: 14px 18px;
}

.job-meta-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.job-id-card {
    border: 1px dashed var(--border-soft);
    border-radius: 12px;
    padding: 12px 16px;
    background: var(--surface-200);
}

.job-id-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.job-id-row code {
    background: white;
    border-radius: 8px;
    padding: 4px 8px;
}

.status-text {
    margin-top: 0.75rem;
    color: var(--text-secondary);
}

.guide-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    border-color: var(--border-strong);
}

.card-header {
    padding: 1.5rem 2rem;
    border-bottom: var(--glass-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.02);
}

.card-header h2 {
    flex: 1;
    font-size: var(--font-xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.card-body {
    padding: 2rem;
}

/* Gradient Text Utility */
.text-gradient {
    background: linear-gradient(135deg, #f5f5f7 0%, #86868b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Step Badge - Apple Pill Style */
.step-badge {
    background: linear-gradient(135deg, var(--primary-color), #5856d6);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Form Inputs - Apple Style */
.form-group input[type="text"],
.form-group textarea,
.form-group select,
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: var(--font-base);
    font-family: inherit;
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386868b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Dropdown/Select option styling - Fix white on white issue */
select,
.form-control[type="select"],
select.form-control {
    background-color: #1e293b;
    color: #f8fafc;
}

select option {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 10px;
}

select option:hover,
select option:focus,
select option:checked {
    background-color: #3b82f6;
    color: white;
}

/* Fix for webkit browsers */
select::-webkit-scrollbar {
    width: 8px;
}

select::-webkit-scrollbar-track {
    background: #1e293b;
}

select::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

/* Modal form controls */
.modal select,
.modal .form-control,
.modal-content select,
.modal-content .form-control {
    background-color: var(--surface-100);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
}

.modal select option,
.modal-content select option {
    background-color: var(--surface-100);
    color: var(--text-primary);
}

.modal input,
.modal-content input {
    background-color: var(--surface-100);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
}

.modal input::placeholder,
.modal-content input::placeholder {
    color: var(--text-tertiary);
}

/* Options Row */
.options-row {
    display: flex;
    gap: 1rem;
}

.options-row .half {
    flex: 1;
}

@media (max-width: 600px) {
    .options-row {
        flex-direction: column;
    }
}

/* File Upload - Apple Style */
.file-upload-wrapper {
    position: relative;
}

.file-upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 113, 227, 0.05);
    transform: scale(1.01);
}

.file-upload-area i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.file-upload-area p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

.file-upload-area .browse-link {
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.file-upload-area small {
    color: var(--text-tertiary);
    font-size: var(--font-xs);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
}

.file-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.file-info span {
    flex: 1;
    font-weight: 500;
}

.remove-file {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Buttons - Apple Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 4px 14px rgba(52, 199, 89, 0.4);
}

.btn-success:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.02);
}

.btn-outline-danger {
    background: transparent;
    border: 1.5px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    filter: brightness(1.1);
}

.btn-lg {
    width: 100%;
    padding: 1rem 2rem;
    font-size: var(--font-base);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--font-xs);
    border-radius: var(--radius-md);
}

/* Loading Section */
.loading-section {
    text-align: center;
}

.loading-content {
    padding: 3rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin: 0 auto 1.5rem;
}

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

.loading-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.loading-content p {
    color: var(--text-secondary);
}

/* Questions List */
.questions-list {
    margin-bottom: 1.5rem;
}

.question-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.question-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.question-number {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.question-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.5;
}

.question-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: 38px;
}

.question-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-category {
    background: rgba(37, 99, 235, 0.2);
    color: var(--primary-color);
}

.tag-difficulty {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.tag-difficulty.easy {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.tag-difficulty.hard {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 150px;
}

@media (max-width: 600px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* Integration Links */
.integration-links {
    margin-bottom: 1.5rem;
}

.integration-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.integration-link:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.integration-link i {
    font-size: 2rem;
}

.integration-link .google-forms {
    color: #7c3aed;
}

.integration-link .google-sheets {
    color: #22c55e;
}

.integration-link .link-content {
    flex: 1;
}

.integration-link .link-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.integration-link .link-url {
    font-size: 0.875rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.integration-link .link-arrow {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

.footer i.fa-heart {
    color: #ef4444;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-100);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-primary);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    max-width: 600px; /* Reduced from 1200px for better default */
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface-200);
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body ol,
.modal-body ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.75rem;
}

.modal-body code {
    background: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.modal-body h4 {
    margin: 1.5rem 0 0.75rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1001;
}

.toast {
    background: var(--dark-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header .btn {
        margin-top: 0.5rem;
    }
}

/* Export Section */
.export-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 12px;
}

.export-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.export-section h3 i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Zapier Section */
.zapier-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid #ff4a00;
    border-radius: 12px;
    color: var(--text-primary);
}

.zapier-section h3 {
    margin-bottom: 0.5rem;
    color: #ff4a00;
}

.zapier-section h3 i {
    margin-right: 0.5rem;
}

.zapier-info {
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.zapier-section .form-group {
    margin-bottom: 1rem;
}

.zapier-section input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--light-color);
    color: var(--text-primary);
}

.zapier-section input::placeholder {
    color: var(--text-secondary);
}

.zapier-section input:focus {
    outline: none;
    border-color: #ff4a00;
    box-shadow: 0 0 0 3px rgba(255, 74, 0, 0.2);
}

.zapier-section small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.zapier-section small a {
    color: #ff4a00;
    font-weight: 600;
}

.btn-zapier {
    background: #ff4a00;
    color: white;
    font-weight: 600;
}

.btn-zapier:hover:not(:disabled) {
    background: #e64300;
    transform: translateY(-2px);
}

/* AI Settings Section */
.ai-settings-wrapper {
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.ai-settings-toggle {
    width: 100%;
    padding: 1rem;
    background: var(--light-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.ai-settings-toggle:hover {
    background: rgba(37, 99, 235, 0.1);
}

.ai-settings-toggle i:first-child {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.ai-settings-toggle .toggle-indicator {
    transition: transform 0.3s ease;
}

.ai-settings-toggle.active .toggle-indicator {
    transform: rotate(180deg);
}

.ai-settings-content {
    padding: 1rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.ai-settings-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--info-color);
}

.ai-settings-info i {
    color: var(--info-color);
}

.ai-settings-content .form-group input[type="password"] {
    font-family: inherit;
}

.api-key-help {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.api-key-help small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.api-key-help a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.api-key-help a:hover {
    text-decoration: underline;
}

/* Start Over Section */
.start-over-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Success Section */
.success-section .card-body {
    padding: 3rem 1.5rem;
}

.success-content {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-content h2 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.success-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.success-content .btn {
    margin: 0.5rem;
}

/* Modal Large */
.modal-lg {
    max-width: 1200px;
}

/* Setup Steps */
.setup-steps {
    margin-bottom: 1.5rem;
}

.setup-steps h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.step {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.step-num {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.step-content code {
    background: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Tip Box */
.tip-box {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--warning-color);
    margin-bottom: 1rem;
}

.tip-box i {
    color: var(--warning-color);
    font-size: 1.25rem;
}

.tip-box strong {
    color: var(--warning-color);
}

.tip-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
}

.tip-box.success i {
    color: var(--success-color);
}

.tip-box.success strong {
    color: var(--success-color);
}

/* Question Skills */
.question-skills {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Application Form Section */
.application-form-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid #22c55e;
    border-radius: 12px;
    color: var(--text-primary);
}

.application-form-section h3 {
    margin-bottom: 0.5rem;
    color: #22c55e;
}

.application-form-section h3 i {
    margin-right: 0.5rem;
}

.application-form-section .section-info {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.application-form-section .form-group {
    margin-bottom: 1rem;
}

.application-form-section .form-group label {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.application-form-section .form-group label i {
    color: #22c55e;
}

.application-form-section input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--light-color);
    color: var(--text-primary);
}

.application-form-section input::placeholder {
    color: var(--text-secondary);
}

.application-form-section input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.application-form-section small {
    display: block;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.application-form-section small a {
    color: #22c55e;
    font-weight: 600;
}

/* Form Preview */
.form-preview {
    background: var(--light-color);
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
}

.form-preview h4 {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.form-fields-preview {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.form-fields-preview li {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.form-fields-preview li i {
    width: 16px;
    opacity: 0.8;
    color: #22c55e;
}

.form-fields-preview li:last-child {
    grid-column: span 2;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 600px) {
    .form-fields-preview {
        grid-template-columns: 1fr;
    }
    
    .form-fields-preview li:last-child {
        grid-column: span 1;
    }
}

/* Step content list */
.step-content ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

/* ========== CANDIDATE SCORING STYLES ========== */

.candidate-scoring-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.candidate-scoring-section h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.scoring-info {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.candidate-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--light-color);
}

.candidate-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.candidate-upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.candidate-upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.candidate-upload-area p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.candidates-list {
    margin-top: 1.5rem;
}

.candidates-list h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

#candidates-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.candidate-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--light-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.candidate-info i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.candidate-info strong {
    display: block;
    color: var(--text-primary);
}

.candidate-info small {
    display: block;
    color: var(--text-secondary);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.candidates-results {
    margin-top: 2rem;
}

.candidates-results h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

#ranked-candidates-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.candidate-score-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.candidate-score-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rank-badge {
    background: var(--secondary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
}

.rank-badge.top-rank {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.candidate-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.candidate-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 4px solid;
    position: relative;
}

.score-circle.grade-a {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.score-circle.grade-b {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.score-circle.grade-c {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.score-circle.grade-d {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.score-grade {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.7;
}

.score-breakdown {
    grid-column: 1 / -1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.score-breakdown h5 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.breakdown-grid {
    display: grid;
    gap: 1rem;
}

.breakdown-item {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    gap: 1rem;
    align-items: center;
}

.breakdown-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--light-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.breakdown-value {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    color: var(--text-primary);
}

.feedback-section {
    margin-top: 1.5rem;
}

.feedback-section h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

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

.feedback-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feedback-list li::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .candidate-score-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .rank-badge {
        margin: 0 auto;
    }
    
    .score-circle {
        margin: 0 auto;
    }
    
    .breakdown-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .breakdown-value {
        text-align: left;
    }
}

.step-content ul li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

/* AI Analysis Section */
.ai-analysis-section {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--dark-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.ai-analysis-section h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-summary {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.ai-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1rem;
}

.ai-pros h6, .ai-cons h6 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-pros ul, .ai-cons ul {
    list-style: none;
    padding: 0;
}

.ai-pros li, .ai-cons li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
}

.ai-pros li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.ai-cons li::before {
    content: '\2715';
    position: absolute;
    left: 0;
    color: var(--danger-color);
    font-weight: bold;
}

.ai-adjustment {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    text-align: right;
}

@media (max-width: 600px) {
    .ai-pros-cons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ========================================
   Quick Tag Buttons & Tag Styling
   ======================================== */
.quick-tag-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-tag-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.candidate-tag {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ========================================
   Filter Bar Styling
   ======================================== */
.filter-bar {
    background: rgba(255, 255, 255, 0.02);
}

.filter-bar .form-control {
    background: #1e293b;
    border: 1px solid var(--border-color);
    color: #f8fafc;
    transition: all 0.2s ease;
}

.filter-bar select.form-control {
    background-color: #1e293b;
    color: #f8fafc;
}

.filter-bar select option {
    background-color: #1e293b;
    color: #f8fafc;
}

.filter-bar .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    outline: none;
}

.filter-bar .form-control::placeholder {
    color: #94a3b8;
}

.filter-bar input[type="number"] {
    background-color: #1e293b;
    color: #f8fafc;
}

/* ========================================
   Enhanced Mobile Responsive Styles
   ======================================== */
@media (max-width: 992px) {
    .container {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 1.5rem;
    }
    
    .modal-content.modal-lg {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header nav {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .company-logo {
        height: 45px;
    }
    
    /* Filter bar mobile */
    .filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-bar .filter-group {
        width: 100%;
        min-width: unset !important;
    }
    
    .filter-bar .filter-group input[type="number"] {
        width: 100% !important;
        min-width: 0;
    }
    
    .filter-bar .filter-group:has(input[type="number"]) {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 0.5rem;
        align-items: center;
    }
    
    /* Card header mobile */
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start !important;
    }
    
    .card-header h2 {
        font-size: 1.25rem;
    }
    
    .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .header-actions .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    /* Job info card mobile */
    .job-info-card {
        padding: 1rem;
    }
    
    .job-info-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .job-info-title {
        font-size: 1.25rem;
    }
    
    .job-actions {
        flex-direction: column;
    }
    
    .job-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Candidate cards mobile */
    .candidate-card {
        padding: 1rem;
    }
    
    .candidate-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .candidate-header > div:last-child {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .candidate-details {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    /* Modal content mobile */
    .modal-body {
        padding: 1rem;
    }
    
    .modal-body > div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Kanban mobile - horizontal scroll with hint */
    .kanban-board {
        min-width: 800px;
        padding-bottom: 10px;
    }
    
    #kanban-section {
        position: relative;
    }
    
    #kanban-section::after {
        content: 'Scroll →';
        position: absolute;
        right: 10px;
        top: 10px;
        background: rgba(59, 130, 246, 0.2);
        color: var(--primary-color);
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 0.75rem;
        animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
    }
    
    .kanban-column {
        min-width: 250px;
    }
    
    /* Buttons mobile */
    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Score grid in modal */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }
    
    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    /* Stack score boxes vertically on very small screens */
    div[style*="grid-template-columns: repeat(3, 1fr)"],
    div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    .candidate-details {
        grid-template-columns: 1fr;
    }
    
    /* Modal full screen on mobile */
    .modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .modal-header {
        position: sticky;
        top: 0;
        background: var(--card-bg);
        z-index: 10;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Filter bar very small screens */
    .filter-bar .filter-group:has(input[type="number"]) {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .filter-bar .filter-group:has(input[type="number"]) span {
        display: none;
    }
    
    .filter-bar .filter-group:has(input[type="number"]) input {
        width: 100%;
    }
    
    /* Quick tag buttons wrap */
    div[style*="Quick add"] {
        flex-wrap: wrap;
    }
    
    .quick-tag-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn, .quick-tag-btn, .form-control, select {
        min-height: 44px;
    }
    
    .candidate-card {
        cursor: pointer;
    }
    
    .modal-close {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .filter-bar, .header-actions, .job-actions, .modal, #scheduleModal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .candidate-card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }
}

/* ========================================
   Apple-Style Candidate Cards
   ======================================== */
.candidate-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.candidate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.candidate-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.15);
    background: var(--card-bg-hover);
}

.candidate-card:active {
    transform: translateY(0);
}

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

.candidate-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.candidate-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
}

.detail-item {
    text-align: center;
}

.detail-item label {
    display: block;
    font-size: var(--font-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.detail-item span {
    font-size: var(--font-lg);
    font-weight: 600;
    color: var(--primary-color);
}

/* Score Badges - Apple Style */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    backdrop-filter: blur(10px);
}

.score-high {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.2), rgba(52, 199, 89, 0.1));
    color: var(--success-color);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.score-medium {
    background: linear-gradient(135deg, rgba(255, 159, 10, 0.2), rgba(255, 159, 10, 0.1));
    color: var(--warning-color);
    border: 1px solid rgba(255, 159, 10, 0.3);
}

.score-low {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.2), rgba(255, 59, 48, 0.1));
    color: var(--danger-color);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

/* AI Feedback Section */
.ai-feedback {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 500;
    text-transform: capitalize;
}

.status-active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success-color);
}

.status-closed {
    background: rgba(255, 59, 48, 0.15);
    color: var(--danger-color);
}

.status-pending {
    background: rgba(255, 159, 10, 0.15);
    color: var(--warning-color);
}

/* Job Group Section */
.job-group-section {
    margin-bottom: 2.5rem;
}

.job-group-header {
    background: linear-gradient(135deg, var(--primary-color), #5856d6);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.3);
}

.job-group-header h3 {
    font-size: var(--font-lg);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Modal - Apple Style */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

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

.modal-content {
    background: var(--background-elevated);
    margin: 2rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content.modal-lg {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    font-size: var(--font-xl);
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: var(--font-lg);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Selection */
::selection {
    background: rgba(0, 113, 227, 0.3);
    color: var(--text-primary);
}

/* Focus Ring */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth Transitions for Theme */
*, *::before, *::after {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}
.create-job {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.create-job::before {
    opacity: 0.8;
}

.background-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 20% 20%, rgba(0, 113, 227, 0.25), transparent 40%),
                radial-gradient(circle at 80% 0%, rgba(255, 45, 85, 0.2), transparent 35%),
                radial-gradient(circle at 50% 80%, rgba(52, 199, 89, 0.18), transparent 45%);
    filter: blur(40px);
}
