/* Magna OS Design System */
:root {
    /* Primary – Purple / Magna Hire brand */
    --indigo-50: #f3e8ff;
    --indigo-100: #e9d5ff;
    --indigo-200: #d8b4fe;
    --indigo-400: #c084fc;
    --indigo-500: #a020f0;
    --indigo-600: #9333ea;
    --primary: #a020f0;
    --primary-dark: #8a1bcc;
    --primary-light: #f3e8ff;
    --accent: var(--indigo-500);

    /* Success – Green */
    --success: #22C55E;
    --success-dark: #16A34A;

    /* Warning – Amber */
    --warning: #F59E0B;
    --warning-dark: #D97706;

    /* Danger – Red */
    --danger: #EF4444;
    --error: #DC2626;

    /* Neutrals – Gray scale */
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-700: #334155;
    --gray-900: #0F172A;

    --background: #faf7ff;
    --card-bg: #FFFFFF;
    --border: #ede9fe;
    --text-main: #334155;
    --text-muted: #64748B;
    --text-heading: #0F172A;

    /* Spacing (only 4, 8, 12, 16, 24, 32) */
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    --text-h1: 24px;
    --text-h2: 18px;
    --text-body: 14px;
    --text-label: 12px;
    --text-small: 12px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Typography hierarchy – Magna OS */
h1, .text-h1 { font-size: var(--text-h1); font-weight: 600; color: var(--gray-900); }
h2, .text-h2 { font-size: var(--text-h2); font-weight: 600; color: var(--gray-900); }
.text-body { font-size: var(--text-body); color: var(--gray-700); }
.text-label { font-size: var(--text-label); font-weight: 500; color: var(--gray-500); }
.text-small { font-size: var(--text-small); color: var(--gray-500); }

/* ============================================
   GLOBAL ANIMATIONS
   ============================================ */

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(var(--space-12));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadePulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

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

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

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-body);
    color: var(--text-main);
    background: var(--background);
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.layout {
    display: flex;
    flex: 1;
    min-height: 0;
    background: var(--background);
}

/* ============================================
   DASHBOARD TABS
   ============================================ */

/* ── Top bar ─────────────────────────────────────────────── */
.dashboard-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 0 16px;
    height: 52px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
    z-index: 20;
    position: relative;
}

.dashboard-brand-inline {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    flex-shrink: 0;
    margin-right: 4px;
}
.dashboard-brand-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}
.dashboard-brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

/* Active section badge — pinned to the horizontal centre of the top bar */
.active-tab-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    background: var(--primary-light, #eef0fd);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
    pointer-events: none;   /* doesn't intercept clicks */
}
.active-tab-badge i { font-size: 11px; opacity: 0.8; }

/* Launchpad trigger button */
.launchpad-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px 6px 10px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.launchpad-trigger:hover,
.launchpad-trigger.lp-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.launchpad-trigger.lp-active .lp-grid-icon span { background: #fff; }

/* 3×3 dot grid icon */
.lp-grid-icon {
    display: grid;
    grid-template-columns: repeat(3, 4px);
    grid-template-rows: repeat(3, 4px);
    gap: 2.5px;
    flex-shrink: 0;
}
.lp-grid-icon span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gray-500);
    transition: background 0.2s;
}
.launchpad-trigger:hover .lp-grid-icon span { background: #fff; }

/* Hidden tab buttons (still receive programmatic .click()) */
.tab-button {
    display: none !important;
}

/* ── Launchpad Overlay ──────────────────────────────────── */
.launchpad-overlay {
    position: fixed;
    inset: 0;
    z-index: 9800;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.launchpad-overlay.lp-visible {
    pointer-events: all;
    opacity: 1;
}

/* Blurred dark backdrop */
.launchpad-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 18, 0.72);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

/* The centered panel */
.launchpad-panel {
    position: relative;
    z-index: 1;
    width: min(600px, 94vw);
    padding: 36px 32px 28px;
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.launchpad-overlay.lp-visible .launchpad-panel {
    transform: scale(1);
}

.launchpad-os-title {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin: 0 0 28px;
    letter-spacing: -0.02em;
    font-weight: 300;
}
.launchpad-os-title strong {
    font-weight: 700;
    color: #fff;
}

/* 4-column app grid */
.launchpad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px 12px;
    justify-items: center;
}

/* Individual app */
.lp-app {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    transition: background 0.15s ease, transform 0.15s ease;
    width: 100%;
}
.lp-app:hover {
    background: rgba(255,255,255,0.08);
    transform: scale(1.06);
}
.lp-app:active { transform: scale(0.96); }

/* App icon square */
.lp-app-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    flex-shrink: 0;
    transition: box-shadow 0.2s;
}
.lp-app:hover .lp-app-icon {
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

/* App label */
.lp-app-label {
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
}

/* Hint text */
.launchpad-hint {
    margin: 24px 0 0;
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0.02em;
}
.launchpad-hint kbd {
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: inherit;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

.subtab-button {
    padding: var(--space-8) var(--space-16);
    font-size: var(--text-body);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    background: var(--card-bg);
    color: var(--gray-500);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.subtab-button:hover {
    color: var(--text-main);
    background: var(--indigo-50);
    border-color: var(--indigo-200);
}
.subtab-button.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
}

.control-panel {
    width: 320px;
    background: var(--card-bg);
    padding: var(--space-16);
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
}

.panel-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: fadeSlideIn 0.4s ease-out;
}

.panel-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79, 80, 229, 0.12);
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.2px;
}

.field-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.range-value {
    font-size: 0.85rem;
    color: var(--primary-dark);
    font-weight: 600;
}

input[type="text"], textarea, input[type="number"] {
    width: 100%;
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: var(--text-body);
    font-size: 0.95rem;
    transition: border 0.2s ease;
    font-family: inherit;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 80, 229, 0.12);
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    height: 8px;
    border-radius: 5px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(79, 80, 229, 0.3);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(79, 80, 229, 0.3);
}

/* Search controls panel - enhanced slider UI */
.search-controls-panel .section-title {
    margin-bottom: var(--space-4);
}
.search-controls-panel {
    gap: var(--space-8);
    padding: var(--space-12);
}
.search-control-item {
    padding: var(--space-12);
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}
.search-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-control-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}
.search-control-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}
.search-control-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: -4px;
}
.search-control-slider {
    margin: 0;
    padding: 0;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gray-200);
    border-radius: 9999px;
    outline: none;
    accent-color: var(--primary);
}
.search-control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(79, 80, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.search-control-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(79, 80, 229, 0.4);
}
.search-control-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 9999px;
    background: var(--gray-200);
}
.search-control-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(79, 80, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.search-control-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(79, 80, 229, 0.4);
}
.search-control-slider::-moz-range-track {
    height: 6px;
    border-radius: 9999px;
    background: var(--gray-200);
}
.search-control-slider:focus {
    outline: none;
}
.search-control-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(79, 80, 229, 0.25);
}
.search-control-slider:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 3px rgba(79, 80, 229, 0.25);
}

.panel-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.primary-btn, .ghost-btn {
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-12) var(--space-16);
    font-size: var(--text-body);
    font-weight: 600;
    transition: background 0.2s, transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.primary-btn:disabled {
    background: var(--gray-400);
    color: var(--gray-100);
    cursor: not-allowed;
    transform: none;
}

.ghost-btn:active {
    transform: scale(0.98);
}

.ghost-btn {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--indigo-200);
}

.ghost-btn:hover {
    background: var(--indigo-50);
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--background);
    padding: 0;
    gap: 0;
    position: relative;
    min-height: 0;
}

/* ChatGPT-style: chat section fills space, input fixed at bottom */
.search-main-chat-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    position: relative;
}
.search-main-chat-layout .results-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.search-main-chat-layout .chat-messages-container {
    max-height: none;
}

/* My Candidates section: fill main area and scroll list only */
#myCandidatesMainSection {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#myCandidatesMainSection .results-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
#myCandidatesMainSection .results-header {
    flex-shrink: 0;
}
#myCandidatesMainSection #myCandidatesContent {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
#myCandidatesMainSection #myCandidatesPagination {
    flex-shrink: 0;
}

/* Shortlists: sidebar list and main (specific shortlist) scrollable */
#shortlistsSidebarSection {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#shortlistsSidebarSection .panel-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#shortlistsList {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#shortlistsMainSection {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#shortlistsMainSection .results-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
#shortlistsMainSection .results-header,
#shortlistsMainSection #shortlistJobUrlContainer {
    flex-shrink: 0;
}
#shortlistCandidates {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Search History: sidebar list and main content scrollable */
#historySidebarSection {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#historySidebarSection .panel-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#historyList {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

#historyMainSection {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#historyMainSection .results-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}
#historyMainSection .results-header {
    flex-shrink: 0;
}
#historyContent {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Interviews (Current-Interviews) */
#interviewsMainSection {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#interviewsMainSection .results-container {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
}
#interviewsMainSection .results-header {
    flex-shrink: 0;
    margin-bottom: 12px;
}
#interviewsMainSection .interviews-subtabs {
    flex-shrink: 0;
    margin-bottom: 12px;
}
#interviewsMainSection .interviews-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.interviews-panel {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.interviews-layout {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: grid;
    grid-template-columns: 340px 1fr 240px;
    gap: 16px;
}
.interviews-list-pane,
.interview-editor-pane {
    min-height: 0;
    min-width: 280px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.interviews-list-header,
.interview-editor-header {
    flex-shrink: 0;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--gray-100);
    background: #fff;
    flex-wrap: wrap;
}
.interviews-list-header {
    align-items: center;
}
.interview-editor-header {
    align-items: center;
}
.interviews-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.interviews-filters-row {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--gray-100);
    background: #fff;
}
.interviews-filter-buttons {
    display: flex;
    gap: 6px;
}
.interview-filter-btn {
    font-size: 0.8rem;
}
.interview-filter-btn.active {
    background: rgba(79, 80, 229, 0.12);
    color: var(--primary);
    border-color: rgba(79, 80, 229, 0.3);
}
.interview-search-input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 0.8rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
}
.interview-search-input::placeholder {
    color: var(--gray-400);
}
.interview-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 80, 229, 0.1);
}
.interviews-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-content: start;
}
/* ----- Interview card (list item) ----- */
.interview-list-item {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 14px 16px;
    padding-left: 18px;
    background: #fff;
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-width: 0;
}
.interview-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 4px 0 0 4px;
}
.interview-list-item:hover {
    box-shadow: 0 4px 16px rgba(79, 80, 229, 0.1);
    border-color: rgba(79, 80, 229, 0.25);
}
.interview-list-item.active {
    border-color: rgba(79, 80, 229, 0.35);
    box-shadow: 0 4px 16px rgba(79, 80, 229, 0.14);
    background: rgba(79, 80, 229, 0.02);
}

.interview-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}
.interview-card-top-row > div:first-child {
    min-width: 0;
    flex: 1;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.01em;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}

.interview-card-meta {
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}
.interview-card-datetime {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--gray-600);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--gray-50);
    border-radius: 8px;
    width: fit-content;
}

.interview-card-confirmation-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}
.interview-card-confirmation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}
.interview-card-confirmation-label {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.8rem;
}
.interview-card-confirmation-value {
    font-weight: 600;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.interview-card-confirmation-row.interview-card-available .interview-card-confirmation-value {
    color: #059669;
}
.interview-card-confirmation-row.interview-card-available .interview-card-confirmation-value i {
    color: #059669;
}
.interview-card-confirmation-row.interview-card-not-available .interview-card-confirmation-value {
    color: #dc2626;
}
.interview-card-confirmation-row.interview-card-not-available .interview-card-confirmation-value i {
    color: #dc2626;
}
.interview-card-confirmation-row.interview-card-reschedule .interview-card-confirmation-value {
    color: #d97706;
}
.interview-card-confirmation-row.interview-card-reschedule .interview-card-confirmation-value i {
    color: #d97706;
}
.interview-card-confirmation-row.interview-card-confirmation-pending .interview-card-confirmation-label,
.interview-card-confirmation-row.interview-card-confirmation-pending .interview-card-confirmation-value {
    color: var(--gray-500);
    font-weight: 500;
}
.interview-card-confirmation-value i {
    margin-right: 5px;
    opacity: 0.9;
}

.interview-card-last-notified {
    margin-top: 10px;
    font-size: 0.72rem;
    color: var(--gray-500);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: var(--gray-50);
    border-radius: 6px;
    width: fit-content;
}
.interview-card-last-notified i {
    margin-right: 0;
    opacity: 0.8;
}

.interview-card-outcome {
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(79, 80, 229, 0.08);
    border-radius: 16px;
    width: fit-content;
    border: 1px solid rgba(79, 80, 229, 0.15);
}
.interview-card-outcome.outcome-selected {
    color: #047857;
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.25);
}
.interview-card-outcome.outcome-rejected {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
}
.interview-card-outcome.outcome-awaiting-feedback {
    color: #d97706;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.interview-list-item .interview-card-meta:has(.fa-user-check) {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(79, 80, 229, 0.06);
    border-radius: 8px;
    width: fit-content;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.78rem;
    border: 1px solid rgba(79, 80, 229, 0.12);
}
.interview-list-item .interview-card-meta:has(.fa-user-check) i {
    color: var(--primary);
}

.interview-card-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.interview-card-actions button {
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Interview journey timeline */
.interview-journey {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    margin: 0;
}
.interview-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 12px 0;
}
.interview-journey-timeline {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 12px;
    margin: 0;
    -webkit-overflow-scrolling: touch;
}
.interview-journey-node {
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.interview-journey-label-top {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gray-700);
    line-height: 1.3;
    min-height: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 4px 6px;
    word-break: break-word;
}
.interview-journey-dot-wrap {
    height: 24px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.interview-journey-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2.5px solid var(--gray-300);
    background: #fff;
    z-index: 2;
    flex-shrink: 0;
    position: relative;
    transition: transform 0.15s ease;
}
.interview-journey-dot.ij-milestone {
    width: 18px;
    height: 18px;
    border-width: 3px;
}
.interview-journey-label-bottom {
    text-align: center;
    font-size: 0.68rem;
    color: var(--gray-400);
    padding: 4px 2px 0;
}
/* Dot colors */
.interview-journey-dot.ij-created { border-color: var(--primary); background: rgba(79, 80, 229, 0.15); }
.interview-journey-dot.ij-notify { border-color: var(--primary); background: rgba(79, 80, 229, 0.1); }
.interview-journey-dot.ij-available { border-color: var(--success); background: rgba(22, 163, 74, 0.15); }
.interview-journey-dot.ij-not-available { border-color: var(--danger); background: rgba(220, 38, 38, 0.1); }
.interview-journey-dot.ij-reschedule { border-color: var(--warning); background: rgba(245, 158, 11, 0.15); }
.interview-journey-dot.ij-attended { border-color: var(--success); background: rgba(22, 163, 74, 0.25); }
.interview-journey-dot.ij-not-attended { border-color: var(--danger); background: rgba(220, 38, 38, 0.2); }
.interview-journey-dot.ij-round-scheduled { border-color: var(--success); background: rgba(22, 163, 74, 0.15); }
.interview-journey-dot.ij-round-selected { border-color: var(--success); background: var(--success); }
.interview-journey-dot.ij-round-rescheduled { border-color: var(--warning); background: rgba(245, 158, 11, 0.2); }
.interview-journey-dot.ij-round-rejected { border-color: var(--danger); background: rgba(220, 38, 38, 0.25); }

.interview-confirmation-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    margin: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
}
.interview-confirmation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}
.interview-confirmation-label {
    font-weight: 600;
    color: var(--gray-700);
}
.interview-confirmation-value {
    font-weight: 500;
    color: var(--gray-600);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
/* Status badge (Attended / Scheduled / Pending / Rejected) */
.interview-card-status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.interview-card-status-badge.status-attended {
    color: #047857;
    background: rgba(5, 150, 105, 0.12);
    border: 1px solid rgba(5, 150, 105, 0.25);
}
.interview-card-status-badge.status-not-attended {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
    border: 1px solid rgba(185, 28, 28, 0.2);
}
.interview-card-status-badge.status-scheduled {
    color: var(--primary);
    background: rgba(79, 80, 229, 0.08);
    border: 1px solid rgba(79, 80, 229, 0.2);
}
.interview-card-status-badge.status-rescheduled {
    color: #d97706;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.interview-card-status-badge.status-pending {
    color: #d97706;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.interview-card-status-badge.status-rejected {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
}
.interview-card-status-badge.status-dropped {
    color: var(--gray-500);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}
.interview-editor-pane {
    padding: 0;
}
.interview-editor-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.interview-editor-form {
    padding: 16px;
}
.interview-editor-empty {
    flex: 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
}
.iv-empty-icon {
    font-size: 2.2rem;
    color: var(--gray-200);
    display: block;
    margin-bottom: 12px;
}

/* ── Interview Panel Redesign ────────────────────────── */

/* Header */
.iv-header-redesign {
    padding: 14px 18px;
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.iv-header-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.iv-header-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
}
.iv-header-id {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}
.iv-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.iv-action-btn {
    padding: 5px 11px !important;
    font-size: 0.78rem !important;
}
.iv-btn-danger {
    border-color: rgba(220, 38, 38, 0.3) !important;
    color: var(--danger) !important;
}
.iv-btn-danger:hover {
    background: rgba(220, 38, 38, 0.06) !important;
    border-color: var(--danger) !important;
}
.iv-assigned-chip {
    font-size: 0.78rem;
    color: var(--gray-600);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 4px 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.iv-assigned-chip i { color: var(--success); }
.iv-unassign-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0 0 0 4px;
    font-size: 0.75rem;
    line-height: 1;
    transition: color 0.15s;
}
.iv-unassign-btn:hover { color: var(--danger); }

/* Confirmation status pills */
.iv-status-row {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}
.iv-status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 140px;
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    padding: 9px 13px;
}
.iv-status-icon {
    font-size: 0.85rem;
    color: var(--primary);
    width: 28px;
    height: 28px;
    background: rgba(79, 80, 229, 0.07);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.iv-status-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.iv-status-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-500);
    white-space: nowrap;
}
.iv-status-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Form divider label */
.iv-form-divider {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    padding: 10px 16px 8px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--gray-100);
    border-top: 1px solid var(--gray-100);
}

/* Form body */
.iv-form-redesign {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Section cards */
.iv-card {
    border: 1px solid var(--gray-100);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.iv-card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    padding: 8px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--gray-100);
}
.iv-card-header i { color: var(--primary); opacity: 0.7; }
.iv-card-body {
    padding: 12px 14px 10px;
}
.iv-span-2 { grid-column: span 2; }
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 1100px) {
    .interviews-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .interviews-list-pane {
        min-height: 280px;
    }
    .interview-editor-pane {
        min-height: 320px;
    }
}

.search-bar-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--background);
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(80, 48, 165, 0.08);
}
.search-bar-container.search-bar-bottom {
    top: auto;
    bottom: 0;
    border-bottom: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 12px rgba(80, 48, 165, 0.06);
    flex-shrink: 0;
}

/* Sent animation: query text flies from input into chat */
.sent-bubble-fly {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 88px;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.25s ease-out, transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.sent-bubble-fly-active {
    opacity: 1;
    transform: translateY(-100px) scale(1);
}
.sent-bubble-fly-inner {
    max-width: 85%;
    margin-left: auto;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(79, 80, 229, 0.35);
}
/* Send button "sent" state */
.send-button.send-btn-sent {
    background: var(--success, #22c55e);
    color: #fff;
    transform: scale(1.05);
}
.send-button.send-btn-sent i {
    animation: sendCheckPop 0.35s ease-out;
}
@keyframes sendCheckPop {
    0% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    padding: 10px 12px;
    transition: box-shadow 0.25s ease;
    border-radius: 16px;
}

.chat-input-wrapper:focus-within {
    box-shadow: 0 0 0 3px rgba(79, 80, 229, 0.2);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    resize: none;
    color: var(--text-main);
    font-size: 1rem;
    min-height: 28px;
    max-height: 140px;
    outline: none;
    font-family: inherit;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(79, 80, 229, 0.25);
    transition: all 0.2s ease;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(79, 80, 229, 0.35);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.web-search-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.web-search-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}
.web-search-toggle .toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.web-search-toggle:hover .toggle-label {
    color: var(--text-main);
}

.attach-jd-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.attach-jd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--primary);
    background: rgba(79, 80, 229, 0.1);
    border: 1px solid rgba(79, 80, 229, 0.3);
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}
.attach-jd-btn:hover {
    background: rgba(79, 80, 229, 0.18);
    color: var(--primary-dark);
}
.attach-jd-filename {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-messages-container {
    margin-bottom: 20px;
    overflow-y: visible;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border);
}
.chat-messages-list {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.chat-messages-list .message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
}
.chat-messages-list .message.user-message {
    align-items: flex-end;
}
.chat-messages-list .message-bubble-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 85%;
}
.chat-messages-list .message.user-message .message-bubble-row {
    flex-direction: row-reverse;
}
.chat-messages-list .message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.chat-messages-list .message.user-message .message-avatar {
    background: var(--primary);
    color: #fff;
}
.chat-messages-list .message-content {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.55;
    word-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.chat-messages-list .message.user-message .message-content {
    align-items: flex-end;
}
.chat-messages-list .message-body {
    width: 100%;
}
.chat-messages-list .message-meta-time {
    font-size: 10px;
    line-height: 1.2;
    color: var(--gray-500);
    opacity: 0.9;
    margin-top: 2px;
    margin-bottom: 0;
}
.chat-messages-list .message.user-message .message-meta-time {
    align-self: flex-end;
    margin-right: 46px;
}
.chat-messages-list .message.assistant .message-meta-time {
    align-self: flex-start;
    margin-left: 46px;
}
.chat-messages-list .message.assistant .message-content {
    background: rgba(79, 80, 229, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(79, 80, 229, 0.12);
    border-bottom-left-radius: 4px;
}
.chat-messages-list .message.user-message .message-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Profiles attached to NEW_SEARCH assistant messages (Intent → UI contract) */
.chat-messages-list .message-profiles {
    margin-top: 14px;
    margin-left: 46px; /* align with text after avatar */
    width: calc(100% - 46px);
    clear: both;
}
.chat-messages-list .message.user-message .message-profiles {
    margin-left: 0;
    margin-right: 0;
}
.message-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.message-profiles-grid .candidate-card {
    margin: 0;
}

.results-container {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeSlideIn 0.4s ease-out;
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(79, 80, 229, 0.12) 0%, rgba(255, 255, 255, 0.65) 100%);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(79, 80, 229, 0.15);
    margin-bottom: 18px;
}

.chat-header h2 {
    font-size: 1.4rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.chat-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

#exportCsvBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.welcome-section {
    margin-top: 20px;
    animation: fadeSlideIn 0.6s ease-out;
}

.message {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 6px 12px rgba(79, 80, 229, 0.25);
    flex-shrink: 0;
}

.message-content {
    background: rgba(79, 80, 229, 0.08);
    padding: 16px;
    border-radius: 16px;
    border-top-left-radius: 6px;
    color: var(--text-main);
    line-height: 1.6;
    flex: 1;
    box-shadow: 0 18px 36px rgba(79, 80, 229, 0.08);
}

.suggestion-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.suggestion-chip {
    background: rgba(79, 80, 229, 0.15);
    color: var(--primary-dark);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.suggestion-chip:hover {
    transform: translateY(-2px);
    background: rgba(79, 80, 229, 0.25);
}

.candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.candidate-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: var(--space-16);
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    box-shadow: var(--shadow-card);
    transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    animation: fadeSlideIn 0.4s ease-out;
    min-height: 0;
    overflow: hidden;
}

/* Premium badge: diagonal gold ribbon over card corner (symmetric on all cards) */
.candidate-card .candidate-card-premium-badge,
.candidate-card .premium-badge.candidate-card-premium-badge {
    position: absolute;
    top: 18px;
    right: -32px;
    width: 110px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 50%, #D97706 100%);
    color: #1a1a1a;
    font-size: var(--text-label);
    font-weight: 700;
    text-align: center;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    letter-spacing: 0.03em;
    border: 1px solid rgba(255, 220, 100, 0.5);
}
.candidate-card .candidate-card-premium-badge i,
.candidate-card .premium-badge.candidate-card-premium-badge i {
    color: #1a1a1a;
    font-size: 0.7rem;
}

/* Top row: avatar + name */
.candidate-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.candidate-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.candidate-card-head {
    flex: 1;
    min-width: 0;
}
.candidate-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px 0;
    line-height: 1.25;
}
.candidate-card-match-pill {
    display: inline-block;
    padding: var(--space-4) var(--space-12);
    border-radius: var(--radius-full);
    background: var(--indigo-50);
    color: var(--primary);
    font-size: var(--text-label);
    font-weight: 600;
}
.candidate-card-pill-shortlist {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success-dark);
}
.candidate-card-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.candidate-card-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.candidate-card-contact-item i {
    color: var(--primary);
    opacity: 0.9;
    font-size: 0.8rem;
}
.candidate-card-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.candidate-card-skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.candidate-card-skill-tag {
    padding: var(--space-4) var(--space-12);
    border-radius: var(--radius-full);
    background: var(--gray-100);
    color: var(--text-main);
    font-size: var(--text-label);
    font-weight: 500;
}
.candidate-card-resume {
    font-size: 0.82rem;
}
.candidate-card-resume-link {
    color: var(--primary);
    text-decoration: none;
}
.candidate-card-resume-link:hover {
    text-decoration: underline;
}
/* Icon-only action bar */
.candidate-card-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    margin-top: var(--space-8);
    padding-top: var(--space-12);
    border-top: 1px solid var(--gray-200);
}
.candidate-card-action-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--indigo-200);
    background: var(--card-bg);
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.candidate-card-action-btn:hover {
    background: var(--indigo-50);
    border-color: var(--indigo-400);
}
.candidate-card-action-btn-remove:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
    color: var(--error);
}
.candidate-card-more-wrap {
    position: relative;
}
.candidate-card-more-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: var(--space-8);
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-card);
    padding: 6px;
    display: none;
    flex-direction: column;
    min-width: 180px;
    z-index: 15;
}
.candidate-card-more-menu.open {
    display: flex;
}

/* When dropdown is open, card stacks above neighbors and doesn't clip the menu */
.candidate-card:has(.candidate-card-more-menu.open) {
    z-index: 50;
    overflow: visible;
}

.candidate-card-more-menu button {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-main);
    font-size: 0.88rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.candidate-card-more-menu button:hover {
    background: var(--indigo-50);
}

.candidate-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--indigo-200);
}

.candidate-card:active {
    transform: scale(0.98);
}

.candidate-card.dragging {
    opacity: 0.7;
    transform: rotate(2deg) scale(1.02);
}

/* Best Match Card - Gold Outline with Animation */
.candidate-card.best-match {
    border: 2px solid var(--warning);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(245, 158, 11, 0.2);
    position: relative;
    overflow: visible;
}

.candidate-card.best-match:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(245, 158, 11, 0.25);
}

/* Best Match Banner */
.best-match-banner {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
    z-index: 10;
    animation: bannerPulse 2s ease-in-out infinite;
    letter-spacing: 0.5px;
}

.best-match-banner i {
    font-size: 0.9rem;
    animation: starSpin 3s linear infinite;
}

@keyframes bannerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(255, 215, 0, 0.7);
    }
}

@keyframes starSpin {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(90deg) scale(1.2);
    }
    50% {
        transform: rotate(180deg);
    }
    75% {
        transform: rotate(270deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg);
    }
}

.candidate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.candidate-header h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
    margin: 0;
}

.match-score {
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--success) 0%, #1FC28C 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.candidate-card .info-item {
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.candidate-card .info-item strong {
    color: var(--text-main);
    margin-right: 5px;
}

/* Symmetric action row: equal-width buttons */
.candidate-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.candidate-card-actions > * {
    flex: 1;
    min-width: 0;
}

.candidate-card-actions-stack {
    flex-direction: column;
    gap: 8px;
}

.candidate-card-actions-stack > * {
    width: 100%;
    flex: none;
}

/* Shortlist candidate card: bookmark icon (no WhatsApp on card) */
.shortlist-candidate-card {
    position: relative;
}
.shortlist-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--primary);
    font-size: 1rem;
    opacity: 0.9;
}
.shortlist-card-badge i {
    font-size: 1.1rem;
}

.reach-out-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12) 0%, rgba(34, 180, 88, 0.08) 100%);
    color: #1a7a3a;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.reach-out-btn:hover {
    background: linear-gradient(135deg, #25D366 0%, #1da851 100%);
    color: #fff;
    border-color: #25D366;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.schedule-interview-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(79, 80, 229, 0.3);
}

.schedule-interview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(79, 80, 229, 0.4);
}

.remove-from-shortlist-btn {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
}

.view-details-btn {
    width: 100%;
    padding: 12px 20px;
    margin-top: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(79, 80, 229, 0.25);
}

.candidate-card-actions .view-details-btn {
    margin-top: 0;
    padding: 10px 14px;
    font-size: 0.88rem;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(79, 80, 229, 0.35);
}

/* Full Screen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    overflow: hidden;
}

.fullscreen-modal[style*="display: flex"] {
    display: flex !important;
}

.fullscreen-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
}

.fullscreen-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.35s ease-out;
    background: #ffffff;
}

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

.fullscreen-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: none;
    background: var(--primary-light);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.fullscreen-modal-close:hover {
    background: var(--primary);
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

.fullscreen-updated-timestamp {
    /* Scroll with content instead of staying fixed */
    position: relative;
    z-index: 1;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.fullscreen-updated-timestamp i {
    font-size: 0.75rem;
    opacity: 0.9;
}

.fullscreen-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    padding-top: 80px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background: #ffffff;
}

.fullscreen-modal-body::-webkit-scrollbar {
    width: 10px;
}

.fullscreen-modal-body::-webkit-scrollbar-track {
    background: var(--primary-light);
    border-radius: 10px;
}

.fullscreen-modal-body::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.fullscreen-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Full Screen Modal Content Styles */
.fullscreen-candidate-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 32px;
}

.fullscreen-candidate-avatar {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    border: 4px solid var(--primary-light);
    box-shadow: 0 12px 24px rgba(79, 80, 229, 0.2);
}

.fullscreen-candidate-info h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.fullscreen-candidate-info .candidate-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.fullscreen-candidate-info .candidate-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.fullscreen-section {
    margin-bottom: 40px;
}

.fullscreen-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.fullscreen-section-content {
    background: var(--primary-light);
    border-radius: 16px;
    padding: 24px;
    border-left: 4px solid var(--primary);
}

.fullscreen-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.fullscreen-contact-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.fullscreen-contact-item strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.fullscreen-contact-item span {
    color: var(--text-main);
    font-size: 1rem;
}

.fullscreen-skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fullscreen-skill-pill {
    background: var(--success);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.25);
    transition: all 0.3s ease;
}

.fullscreen-skill-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(16, 163, 127, 0.4);
    background: #0d8a6b;
}

.fullscreen-experience-item {
    background: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.1);
    transition: all 0.2s ease;
}

.fullscreen-experience-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(79, 80, 229, 0.15);
    border-left: 4px solid var(--primary);
}

.fullscreen-exp-title {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.fullscreen-exp-company {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.fullscreen-exp-duration {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.fullscreen-exp-desc {
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1rem;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.fullscreen-education-item {
    background: white;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.1);
    transition: all 0.2s ease;
}

.fullscreen-education-item:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 20px rgba(79, 80, 229, 0.15);
    border-left: 4px solid var(--danger);
}

.fullscreen-edu-degree {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.fullscreen-edu-institution {
    color: var(--text-muted);
    font-size: 1rem;
}

.fullscreen-summary-text {
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.05rem;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.fullscreen-websites {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fullscreen-website-link {
    background: white;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fullscreen-website-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.3);
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--primary-dark);
    z-index: 200;
    background: rgba(255, 255, 255, 0.98);
    padding: 24px 48px;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(80, 48, 165, 0.25);
    border: 1px solid rgba(79, 80, 229, 0.2);
    font-weight: 600;
    font-size: 1rem;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 4px solid rgba(79, 80, 229, 0.25);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading span {
    animation: fadePulse 1.4s infinite;
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 1rem;
}

/* ============================================
   UPLOAD RESUME STYLES
   ============================================ */

.upload-area {
    margin-bottom: 12px;
}

.upload-dropzone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    background: var(--card-bg);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-dropzone.upload-disabled {
    pointer-events: none;
    opacity: 0.7;
}

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

.upload-dropzone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.2);
}

.upload-dropzone i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.upload-dropzone p {
    color: var(--text-main);
    font-size: 0.9rem;
    margin: 0;
}

.upload-link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.upload-link:hover {
    color: var(--primary-dark);
}

.upload-dropzone small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.new-interview-dropzone {
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius);
    padding: var(--space-24);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: var(--gray-50);
}
.new-interview-dropzone:hover {
    border-color: var(--primary);
    background: var(--gray-100);
}
.new-interview-dropzone.drag-over {
    border-color: var(--primary);
    background: var(--gray-100);
}

.upload-progress {
    margin-top: 12px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.progress-status {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.progress-percentage {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 4px 10px;
    border-radius: 6px;
    min-width: 50px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 6px;
    transition: width 0.4s ease;
    width: 0%;
    box-shadow: 0 2px 4px rgba(79, 80, 229, 0.3);
}

.progress-details {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* ============================================
   UPLOAD LOGS
   ============================================ */

.upload-job-status-panel {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.upload-job-status-panel h5 {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.upload-job-status-panel h5 i {
    color: var(--primary);
}
.upload-job-status-content {
    font-size: 0.85rem;
}
.upload-job-status-empty {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.85rem;
}
/* Remaining-work progress UI */
.upload-job-status-active {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.upload-job-status-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}
.upload-job-status-bar-wrap {
    width: 100%;
}
.upload-job-status-segmented-bar {
    display: flex;
    width: 100%;
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
    background: var(--gray-200);
}
.upload-job-seg {
    height: 100%;
    min-width: 2px;
    transition: width 0.25s ease;
}
.upload-job-seg.processing-seg {
    background: var(--primary);
}
.upload-job-seg.pending-seg {
    background: var(--gray-300);
}
.upload-job-status-counts {
    font-size: 12px;
    color: var(--gray-600);
}

/* Complete state */
.upload-job-status-complete {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}
.upload-job-complete-icon {
    font-size: 2rem;
    color: var(--success);
}
.upload-job-complete-icon i {
    color: inherit;
}
.upload-job-complete-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}
.upload-job-complete-desc {
    font-size: 12px;
    color: var(--gray-600);
}

.upload-logs-container {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.upload-logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.upload-logs-header h5 {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-logs-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.clear-logs-btn:hover {
    background: rgba(239, 71, 111, 0.1);
    color: var(--danger);
}

.upload-logs {
    max-height: 200px;
    overflow-y: auto;
    background: #1e1e1e;
    border-radius: 6px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
}

.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    padding: 4px 0;
    word-wrap: break-word;
}

.log-entry:last-child {
    margin-bottom: 0;
}

.log-time {
    color: #888;
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.log-entry i {
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

.log-message {
    flex: 1;
    word-break: break-word;
}

.log-entry.log-info {
    color: #d4d4d4;
}

.log-entry.log-info i {
    color: #4ec9b0;
}

.log-entry.log-success {
    color: #89d185;
}

.log-entry.log-success i {
    color: #89d185;
}

.log-entry.log-error {
    color: #f48771;
}

.log-entry.log-error i {
    color: #f48771;
}

.log-entry.log-warning {
    color: #dcdcaa;
}

.log-entry.log-warning i {
    color: #dcdcaa;
}

/* Scrollbar styling for logs */
.upload-logs::-webkit-scrollbar {
    width: 6px;
}

.upload-logs::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 3px;
}

.upload-logs::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.upload-logs::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.upload-results {
    margin-top: 16px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
}

.upload-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.upload-results-header h4 {
    color: var(--primary-dark);
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(239, 71, 111, 0.1);
    color: var(--danger);
}

.upload-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.summary-item {
    flex: 1;
    min-width: 80px;
    padding: 12px;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
}

.summary-item.success {
    background: rgba(16, 163, 127, 0.1);
    color: var(--success);
}

.summary-item.error {
    background: rgba(239, 71, 111, 0.1);
    color: var(--danger);
}

.summary-item i {
    font-size: 1.2rem;
}

.upload-success-list,
.upload-error-list {
    margin-bottom: 16px;
}

.upload-success-list h5,
.upload-error-list h5 {
    color: var(--text-main);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-file-item {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.upload-file-item.success {
    border-left: 3px solid var(--success);
}

.upload-file-item.error {
    border-left: 3px solid var(--danger);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.file-info i {
    color: var(--primary);
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 24px;
}

.file-error {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--danger);
    font-size: 0.85rem;
    margin-left: 24px;
}

#processUploadBtn:disabled,
#processUrlsBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   UPLOAD METHOD TABS
   ============================================ */

.upload-method-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.upload-method-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: -2px;
}

.upload-method-tab:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.upload-method-tab.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    background: var(--primary-light);
}

.upload-method-tab i {
    font-size: 1rem;
}

.upload-method-content {
    /* Content sections for each method */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   UPLOAD MAIN PAGE LAYOUT
   ============================================ */

.upload-main-content {
    max-width: 900px;
    margin: 0 auto;
}

.upload-controls-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Upload job-in-progress notification banner */
.upload-job-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text);
}
.upload-job-banner i {
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.upload-control-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.upload-control-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.upload-control-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.upload-control-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

/* ============================================
   ANIMATION CONTAINER
   ============================================ */

.upload-animation-container {
    margin-top: 40px;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 16px;
    border: 2px solid var(--border);
}

.animation-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.character-container {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(79, 80, 229, 0.15);
    overflow: hidden;
}

.character-sprite {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: characterBounce 2s ease-in-out infinite;
}

@keyframes characterBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Character animations for different stages */
.character-sprite.upload-stage {
    animation: characterRun 1s steps(8) infinite;
}

@keyframes characterRun {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.character-sprite.parsing-stage {
    animation: characterHammer 0.8s steps(6) infinite;
}

@keyframes characterHammer {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(-5deg);
    }
}

.character-sprite.embedding-stage {
    animation: characterCut 1s steps(8) infinite;
}

@keyframes characterCut {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.character-sprite.done-stage {
    animation: characterJump 0.6s ease-in-out infinite;
}

@keyframes characterJump {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

/* Progress Container */
.progress-container {
    width: 100%;
    max-width: 600px;
}

.progress-bar-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.1);
}

.progress-bar-bg {
    width: 100%;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-main);
}

.progress-text span:first-child {
    font-weight: 600;
    color: var(--primary-dark);
}

.progress-text span:last-child {
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   URL INPUT AREA
   ============================================ */

.url-input-area {
    margin-bottom: 12px;
}

.url-input-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s ease;
}

.url-input-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 80, 229, 0.1);
}

.url-input-textarea::placeholder {
    color: var(--text-muted);
}

@media (max-width: 1100px) {
    .layout {
        flex-direction: column;
    }
    .control-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    .panel-section {
        flex: 1 1 300px;
    }
}

@media (max-width: 768px) {
    .candidate-grid {
        grid-template-columns: 1fr;
    }
    .fullscreen-modal-body {
        padding: 20px;
        padding-top: 60px;
    }
    .fullscreen-candidate-header {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   SHORTLISTS & HISTORY STYLES
   ============================================ */

.add-to-shortlist-btn {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-to-shortlist-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

.shortlist-item,
.history-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.shortlist-item:hover,
.history-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateX(4px);
}

.shortlist-item strong,
.history-item strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 4px;
}

.shortlist-item .ghost-btn,
.history-item .ghost-btn {
    opacity: 0.6;
}

.shortlist-item:hover .ghost-btn,
.history-item:hover .ghost-btn {
    opacity: 1;
}

/* ============================================
   SIDEBAR PROFILE & TOKEN CARD
   ============================================ */

/* Sidebar item (New Chat) - similar to sidebar nav items */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-align: left;
    width: 100%;
}
.sidebar-item:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--primary);
}
.sidebar-item i {
    font-size: 1rem;
    opacity: 0.9;
}
.sidebar-new-chat {
    margin-bottom: var(--space-4);
}

/* Profile header: [ Avatar ] [ Name + Role ] ... [ Logout ] */
.sidebar-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--gray-200);
}
.sidebar-profile-avatar {
    flex-shrink: 0;
}
.sidebar-profile-header .avatar-circle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(79, 80, 229, 0.25);
}
.sidebar-profile-name-role {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-profile-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
    word-break: break-word;
}
.sidebar-profile-role {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}
.sidebar-profile-contact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 3px;
}
.sidebar-profile-contact span {
    font-size: 11px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-profile-contact i {
    font-size: 10px;
    flex-shrink: 0;
    color: var(--gray-500);
}
.sidebar-logout-btn {
    flex-shrink: 0;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid #E5E7EB;
    color: var(--gray-600);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sidebar-logout-btn:hover {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

/* Token card */
.sidebar-token-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.sidebar-token-card-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}
.sidebar-token-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.sidebar-token-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #D97706;
    font-size: 1.25rem;
}
.sidebar-token-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    flex: 1;
}
.sidebar-token-topup-btn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-token-topup-btn:hover {
    background: rgba(79, 80, 229, 0.08);
    color: var(--primary-dark);
}
.sidebar-token-progress-wrap {
    width: 100%;
}
.sidebar-token-progress-track {
    height: 5px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}
.sidebar-token-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #6366F1 100%);
    border-radius: 9999px;
    transition: width 0.25s ease;
}

/* Logout confirm button in modal */
.sidebar-logout-confirm-btn {
    background: #DC2626 !important;
    border-color: #DC2626 !important;
}
.sidebar-logout-confirm-btn:hover {
    background: #B91C1C !important;
    border-color: #B91C1C !important;
}

/* Pool card (same layout as token card) */
.sidebar-pool-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.sidebar-pool-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--gray-300);
}
.sidebar-pool-card-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}
.sidebar-pool-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.sidebar-pool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}
.sidebar-pool-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    flex: 1;
}
.sidebar-pool-view-btn {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}
.sidebar-pool-view-btn:hover {
    background: rgba(79, 80, 229, 0.08);
    color: var(--primary-dark);
}
.sidebar-pool-sublabel {
    margin: 0;
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.4;
}
#searchSidebarSection {
    margin-top: 0;
}

/* Legacy avatar circle (used in sidebar profile) */
.avatar-circle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        #6C3EFF 0%, 
        #8B5CF6 50%,
        #A78BFA 100%);
    border-radius: 14px;
    color: #ffffff;
    font-size: 1.4rem;
    box-shadow: 
        0 4px 12px rgba(79, 80, 229, 0.35),
        0 2px 4px rgba(79, 80, 229, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}
.avatar-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 70%);
    animation: shine 3s infinite;
}
@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, 
        rgba(79, 80, 229, 0.08) 0%, 
        rgba(79, 80, 229, 0.04) 100%);
    border-radius: 12px;
    border: 1px solid rgba(79, 80, 229, 0.15);
    transition: all 0.2s ease;
}

.stat-badge:hover {
    background: linear-gradient(135deg, 
        rgba(79, 80, 229, 0.12) 0%, 
        rgba(79, 80, 229, 0.06) 100%);
    border-color: rgba(79, 80, 229, 0.25);
    transform: translateX(2px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        #6C3EFF 0%, 
        #8B5CF6 100%);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: 
        0 2px 8px rgba(79, 80, 229, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.stat-badge-pool {
    align-items: flex-start;
}

.stat-badge-pool .stat-icon {
    margin-top: 3px;
}

.stat-badge-pool .stat-content {
    gap: 1px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, 
        var(--primary-dark) 0%, 
        var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.3;
    letter-spacing: 0.01em;
    margin: 0;
}

.stat-sublabel {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.85;
    line-height: 1.35;
    margin: 0;
    letter-spacing: 0.02em;
}

/* ============================================
   PREMIUM CANDIDATE STYLES
   ============================================ */

.locked-candidate {
    position: relative;
    opacity: 0.95;
}

.premium-banner {
    background: linear-gradient(135deg, #FFC857 0%, #FFB020 100%);
    color: #2D2353;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(255, 200, 87, 0.3);
}

.premium-banner i {
    font-size: 0.8rem;
}

/* Premium Badge - Always visible for admin candidates */
.premium-badge {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    color: #1a1a1a;
    padding: var(--space-4) var(--space-12);
    border-radius: var(--radius-full);
    font-size: var(--text-label);
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 5;
}

.premium-badge i {
    font-size: 0.75rem;
    color: #1a1a1a;
}

.info-item.blurred {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
    position: relative;
}

/* Horizontal Candidate Card for My Candidates Page */
.horizontal-candidate-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(79, 80, 229, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.25s ease;
    animation: fadeSlideIn 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.08);
    margin-bottom: 12px;
    cursor: pointer;
}

.horizontal-candidate-card:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(79, 80, 229, 0.12);
    border-color: var(--primary);
}

.horizontal-candidate-card .candidate-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    flex-shrink: 0;
}

.horizontal-candidate-card .candidate-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.horizontal-candidate-card .candidate-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    min-width: 150px;
}

.horizontal-candidate-card .candidate-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    min-width: 120px;
}

.horizontal-candidate-card .candidate-detail i {
    color: var(--primary);
    font-size: 0.85rem;
    width: 16px;
}

.horizontal-candidate-card .candidate-detail strong {
    color: var(--text-main);
    margin-right: 4px;
}

.horizontal-candidate-card .candidate-pool-actions {
    flex-shrink: 0;
    margin-left: auto;
}

.horizontal-candidate-card .candidate-pool-actions .schedule-interview-btn {
    white-space: nowrap;
}

.horizontal-candidate-card .premium-badge {
    margin-left: 8px;
    flex-shrink: 0;
}

.info-item.blurred::after {
    content: '🔒';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    filter: none;
    font-size: 1rem;
}

.locked-candidate-message {
    border: 1px solid rgba(79, 80, 229, 0.2);
}

.unlock-candidate-btn {
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 80, 229, 0.3);
}

.unlock-candidate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.4);
}

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

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--primary);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 8px rgba(79, 80, 229, 0.3);
}

/* ============================================
   MODAL STYLES (for WhatsApp Outreach)
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    backdrop-filter: blur(6px);
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.35s ease-out;
    animation: modalSlideIn 0.3s ease-out;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(79, 80, 229, 0.05) 0%, rgba(79, 80, 229, 0.02) 100%);
}

.message-preview-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: var(--space-12);
    margin-bottom: var(--space-16);
}
.message-preview-title {
    margin: 0 0 var(--space-8) 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: var(--space-8);
}
.message-preview-title i {
    color: var(--primary);
}
.message-preview-content {
    font-size: 13px;
    line-height: 1.6;
    color: var(--gray-700);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 180px;
    overflow-y: auto;
}
.message-preview-content .placeholder {
    color: var(--gray-400);
    font-style: italic;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i {
    color: #25D366;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: var(--space-12) var(--space-16);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: var(--text-body);
    font-family: var(--font-family);
    background: var(--card-bg);
    color: var(--text-main);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 80, 229, 0.12);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

/* ============================================
   CUSTOM MODAL SYSTEM (Alert, Confirm, Prompt)
   ============================================ */

.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.custom-modal-overlay.show {
    display: flex;
}

.custom-modal-dialog {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: scaleIn 0.25s ease-out;
    transform-origin: center;
}

.custom-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-modal-header i {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.custom-modal-header.info i {
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(79, 80, 229, 0.1) 100%);
    color: var(--primary);
}

.custom-modal-header.success i {
    background: linear-gradient(135deg, rgba(16, 163, 127, 0.1) 0%, rgba(16, 163, 127, 0.05) 100%);
    color: var(--success);
}

.custom-modal-header.warning i {
    background: linear-gradient(135deg, rgba(255, 200, 87, 0.2) 0%, rgba(255, 200, 87, 0.1) 100%);
    color: #D97706;
}

.custom-modal-header.error i {
    background: linear-gradient(135deg, rgba(239, 71, 111, 0.1) 0%, rgba(239, 71, 111, 0.05) 100%);
    color: var(--danger);
}

.custom-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    flex: 1;
}

.custom-modal-body {
    padding: 24px;
    color: var(--text-main);
    line-height: 1.6;
    font-size: 0.95rem;
}

.custom-modal-body p {
    margin: 0 0 16px 0;
}

.custom-modal-body p:last-child {
    margin-bottom: 0;
}

.custom-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--card-bg);
    transition: all 0.2s;
    margin-top: 12px;
}

.custom-modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 80, 229, 0.1);
}

.custom-modal-actions {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}

.custom-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.custom-modal-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.3);
}

.custom-modal-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 80, 229, 0.4);
}

.custom-modal-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.custom-modal-btn-secondary:hover {
    background: var(--border);
}

.custom-modal-btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #D91E4A 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 71, 111, 0.3);
}

.custom-modal-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 71, 111, 0.4);
}

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

/* Horizontal Candidate Card for My Candidates Page */
.horizontal-candidate-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(79, 80, 229, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.25s ease;
    animation: fadeSlideIn 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.08);
    margin-bottom: 12px;
    cursor: pointer;
}

.horizontal-candidate-card:hover {
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(79, 80, 229, 0.12);
    border-color: var(--primary);
}

.horizontal-candidate-card .candidate-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    flex-shrink: 0;
}

.horizontal-candidate-card .candidate-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.horizontal-candidate-card .candidate-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    min-width: 150px;
}

.horizontal-candidate-card .candidate-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
    min-width: 120px;
}

.horizontal-candidate-card .candidate-detail i {
    color: var(--primary);
    font-size: 0.85rem;
    width: 16px;
}

.horizontal-candidate-card .candidate-detail strong {
    color: var(--text-main);
    margin-right: 4px;
}

.horizontal-candidate-card .premium-badge {
    margin-left: auto;
    flex-shrink: 0;
}

/* Make stat badge clickable */
.stat-badge {
    transition: all 0.2s ease;
    position: relative;
}

.stat-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 80, 229, 0.15);
}

/* Recharge Button */
.recharge-btn {
    background: linear-gradient(135deg, #10a37f 0%, #0a8a6a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.recharge-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3);
    opacity: 0.9;
}

.recharge-btn i {
    font-size: 0.85rem;
}

/* Credit Package Cards */
.credit-package-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.credit-package-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(79, 80, 229, 0.2);
}

.credit-package-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(79, 80, 229, 0.1) 0%, rgba(79, 80, 229, 0.05) 100%);
}

.credit-package-card .package-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.credit-package-card .package-credits {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.credit-package-card .package-credits-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.credit-package-card .package-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.credit-package-card .package-price-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.credit-package-card .package-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #FFC857 0%, #FFB020 100%);
    color: #2D2353;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ============================================
   WEB SEARCH ROBOT POPUP (bottom-right)
   ============================================ */

.web-search-popup-icon {
    position: fixed;
    bottom: 106px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 20px rgba(79, 80, 229, 0.45);
    cursor: pointer;
    z-index: 9998;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.web-search-popup-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(79, 80, 229, 0.55);
}

.web-search-popup-icon .web-search-popup-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.web-search-popup-icon .web-search-popup-searching-label {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%) translateY(-10px);
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 12px;
    border-radius: 20px;
    pointer-events: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.web-search-popup-icon.web-search-popup-icon--searching .web-search-popup-badge {
    display: none;
}

.web-search-robot-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 48px);
    max-height: 70vh;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    overflow: hidden;
    animation: webSearchPanelIn 0.25s ease-out;
}

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

.web-search-robot-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(79, 80, 229, 0.12) 100%);
    border-bottom: 1px solid var(--border);
}

.web-search-robot-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
}

.web-search-robot-panel-title i {
    font-size: 1.2rem;
    color: var(--primary);
}

.web-search-robot-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.web-search-robot-panel-close:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.06);
}

.web-search-robot-panel-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.web-search-robot-summary {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.web-search-robot-profiles {
    margin-bottom: 16px;
}

.web-search-robot-profiles h4,
.web-search-robot-links h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.web-search-robot-profile-item {
    padding: 10px 12px;
    background: rgba(79, 80, 229, 0.06);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.web-search-robot-profile-item .profile-name {
    font-weight: 600;
    color: var(--primary-dark);
}

.web-search-robot-profile-item .profile-role {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.web-search-robot-profile-item .profile-source {
    font-size: 0.8rem;
    margin-top: 4px;
}

.web-search-robot-profile-item a {
    color: var(--primary);
    text-decoration: none;
}

.web-search-robot-profile-item a:hover {
    text-decoration: underline;
}

.web-search-robot-links {
    margin-top: 12px;
}

.web-search-robot-link-item {
    display: block;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    word-break: break-all;
    border-bottom: 1px solid var(--border);
}

.web-search-robot-link-item:last-child {
    border-bottom: none;
}

.web-search-robot-link-item:hover {
    text-decoration: underline;
}

.web-search-robot-link-item .link-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 6px;
}

.web-search-robot-loading,
.web-search-robot-error {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
}

.web-search-robot-error {
    color: var(--danger);
}

/* ============================================
   MY CHATS — Premium chat layout
   ============================================ */

/* WhatsApp policy banner */
.wa-policy-banner {
    flex-shrink: 0;
    background: #e7f8ee;
    border-bottom: 1px solid #b2dfca;
    padding: 0;
}
.wa-policy-banner-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    max-width: 100%;
}
.wa-policy-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.wa-policy-text {
    flex: 1;
    font-size: 0.8rem;
    color: #1a5c35;
    line-height: 1.45;
}
.wa-policy-text strong {
    font-weight: 700;
}
.wa-policy-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #3a8a5c;
    font-size: 0.8rem;
    padding: 4px 6px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.wa-policy-close:hover { opacity: 1; }

/* =====================================================
   JOBS SECTION
   ===================================================== */
#jobsMainSection {
    flex: 1;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}
#jobsMainSection .jobs-section-container {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.jobs-section-container { display: flex; flex-direction: column; gap: 0; }

.jobs-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.jobs-header-left { flex: 1; }
.jobs-section-title { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin: 0 0 4px; }
.jobs-section-subtitle { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* Empty / loading states */
.jobs-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.jobs-empty-icon { font-size: 3rem; opacity: 0.25; margin-bottom: 16px; display: block; }
.jobs-empty-state h3 { font-size: 1.1rem; color: var(--text-main); margin: 0 0 8px; }
.jobs-empty-state p  { font-size: 0.88rem; margin: 0; }
.jobs-loading, .jobs-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.jobs-error { color: var(--danger); }

/* Jobs list */
.jobs-list { display: flex; flex-direction: column; gap: 12px; }

.job-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.job-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); border-color: var(--indigo-200); }

.job-card-main { flex: 1; min-width: 0; }

.job-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.job-card-role    { font-size: 1rem; font-weight: 700; color: var(--text-main); margin: 0 0 2px; }
.job-card-company { font-size: 0.85rem; color: var(--text-muted); }

.job-card-badges { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* Type badges */
.job-type-badge {
    font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: 0.03em;
}
.jt-blue   { background: #EEF2FF; color: #4F50E5; }
.jt-purple { background: #F3E8FF; color: #7C3AED; }
.jt-green  { background: #DCFCE7; color: #16A34A; }
.jt-orange { background: #FFF7ED; color: #C2410C; }

/* Status badges */
.job-status-badge {
    font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
    border-radius: 20px; text-transform: capitalize;
}
.js-green  { background: #DCFCE7; color: #15803D; }
.js-yellow { background: #FEF9C3; color: #92400E; }
.js-red    { background: #FEE2E2; color: #B91C1C; }

.job-card-meta {
    display: flex; flex-wrap: wrap; gap: 12px;
    font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px;
}
.job-card-meta i { margin-right: 4px; }

.job-card-skills { font-size: 0.8rem; color: var(--text-muted); }
.job-skills-label { font-weight: 600; color: var(--text-main); }

/* Actions column */
.job-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.job-status-select-wrap select.job-status-select {
    font-size: 0.78rem;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text-main);
    cursor: pointer;
}
.job-action-btn {
    width: 30px; height: 30px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.job-action-btn:hover         { background: var(--indigo-50); color: var(--primary); border-color: var(--indigo-200); }
.job-action-btn.danger:hover  { background: #FEE2E2; color: var(--danger); border-color: #FECACA; }
a.job-action-btn              { text-decoration: none; }

/* Create/Edit Job Form Modal */
.job-form-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.job-form-section-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.job-form-section-title i { color: var(--primary); }
.job-form-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: none;
    letter-spacing: 0;
}
.job-form-badge.mandatory    { background: #FEE2E2; color: #B91C1C; }
.job-form-badge.good-to-have { background: #FEF9C3; color: #92400E; }
.job-form-badge.optional     { background: var(--gray-100); color: var(--text-muted); }

.job-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}
@media (max-width: 520px) { .job-form-grid { grid-template-columns: 1fr; } }

.field-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; display: block; }
.req { color: var(--danger); }

/* =====================================================
   Outreach Progress Popup */
.outreach-progress-popup {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 360px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
    z-index: 9999;
    overflow: hidden;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.opp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 12px;
    background: linear-gradient(90deg, #4F50E5 0%, #6366F1 100%);
    color: #fff;
}
.opp-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.opp-header-title {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
}
.opp-header-sub {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}
.opp-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.opp-close-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.opp-body {
    padding: 16px;
    max-height: 320px;
    overflow-y: auto;
}
/* Sending state */
.opp-sending {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}
.opp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--indigo-100);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: opp-spin 0.8s linear infinite;
}
@keyframes opp-spin { to { transform: rotate(360deg); } }
.opp-sending-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    text-align: center;
}
/* Stats row */
.opp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.opp-stat-card {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    border: 1px solid var(--border);
}
.opp-stat-num {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
}
.opp-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.opp-stat-card.sent .opp-stat-num  { color: var(--success); }
.opp-stat-card.failed .opp-stat-num { color: var(--danger); }
.opp-stat-card.skipped .opp-stat-num { color: var(--warning); }
/* Detail lists */
.opp-detail-block {
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 0.8rem;
}
.opp-detail-block.failed-block  { background: rgba(239,68,68,0.07);  border-left: 3px solid var(--danger); }
.opp-detail-block.skipped-block { background: rgba(245,158,11,0.07); border-left: 3px solid var(--warning); }
.opp-detail-block strong { display: block; margin-bottom: 6px; }
.opp-detail-block ul { margin: 0; padding-left: 16px; color: var(--text-muted); }
.opp-detail-block li { margin-bottom: 3px; }
/* Error state */
.opp-error {
    background: rgba(239,68,68,0.07);
    border-left: 3px solid var(--danger);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
}
.opp-footer {
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    justify-content: flex-end;
}
.opp-footer button {
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.15s;
}
.opp-footer button:hover { background: var(--gray-50); }

.chat-layout-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #F5F6F8;
}

#candidateChatSection {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #F5F6F8;
}

.candidate-chat-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.candidate-chat-layout {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    background: #F5F6F8;
}

/* ——— Left panel: Chat list (280–340px) ——— */
.candidate-chat-list-pane {
    width: 300px;
    min-width: 300px;
    min-height: 0;
    overflow: hidden;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.06);
}

.candidate-chat-list-header {
    padding: 16px 12px 12px;
    border-bottom: 1px solid #E9ECEF;
    flex-shrink: 0;
}

.chat-sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.chat-sidebar-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.chat-refresh-btn {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    color: var(--gray-600, #6c757d);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 0.8rem;
    line-height: 1;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.chat-refresh-btn:hover {
    color: var(--primary, #007bff);
    border-color: var(--primary, #007bff);
    background: rgba(0, 123, 255, 0.05);
}

.chat-refresh-btn .fa-sync-alt.spinning,
.chat-refresh-btn.spinning .fa-sync-alt {
    animation: spin 0.7s linear infinite;
}

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

.chat-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #E9ECEF;
    border-radius: 10px;
    font-size: 14px;
    background: #F5F6F8;
    color: var(--text-main);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.chat-search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}

.chat-search-filter-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #E9ECEF;
    border-radius: 10px;
    background: #fff;
    color: var(--gray-500);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.chat-search-filter-btn:hover {
    background: #F5F6F8;
    color: var(--primary);
}

.chat-filters-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid #E9ECEF;
    border-radius: 999px;
    font-size: 12px;
    color: var(--gray-600);
    background: #fff;
}

.chat-filter-chip input {
    margin: 0;
}

.chat-filter-query {
    flex: 1;
    min-width: 160px;
    padding: 7px 10px;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    font-size: 12px;
    background: #fff;
    color: var(--text-main);
}

.chat-filter-query:focus {
    outline: none;
    border-color: var(--primary);
}

.candidate-chat-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 0;
}

.candidate-chat-list-empty {
    padding: 20px 16px;
    text-align: center;
    font-size: 14px;
    color: var(--gray-500);
}

/* Chat list item: [Avatar] [Name + Status] [Time] / [Preview] */
.candidate-chat-list-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    padding: 12px 16px;
    margin: 0 8px 4px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    align-items: center;
}

.candidate-chat-list-item:hover {
    background: #F5F6F8;
}

.candidate-chat-list-item.active {
    background: #E8ECFF;
    box-shadow: none;
}

.candidate-chat-list-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    min-height: 24px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.chat-list-item-avatar {
    grid-row: 1 / -1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #E9ECEF;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.candidate-chat-list-item.active .chat-list-item-avatar {
    background: var(--indigo-100);
    color: var(--primary);
}

.candidate-chat-list-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
}

.candidate-chat-list-item .chat-list-item-time {
    font-size: 11px;
    color: var(--gray-500);
    flex-shrink: 0;
}

.candidate-chat-list-item.unread .candidate-chat-list-title {
    font-weight: 700;
}

.candidate-chat-list-snippet {
    font-size: 13px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.candidate-chat-list-item.unread .candidate-chat-list-snippet {
    color: var(--gray-700);
}

.chat-list-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ——— Right panel: Active chat ——— */
.candidate-chat-main-pane {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: 12px 0 0 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.candidate-chat-main-header {
    padding: 12px 20px;
    border-bottom: 1px solid #E9ECEF;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.candidate-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #E9ECEF;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
}

.chat-header-name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.chat-header-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

.chat-header-contact-details {
    margin-top: 2px;
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.3;
    word-break: break-word;
}

.chat-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22C55E;
    flex-shrink: 0;
}

.candidate-chat-timeline {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    background: #F5F6F8;
}

.candidate-chat-empty,
.candidate-chat-loading,
.candidate-chat-error {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    margin: 0;
}

.candidate-chat-msg {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.candidate-chat-msg-inbound {
    align-self: flex-start;
    align-items: flex-start;
}

.candidate-chat-msg-outbound {
    align-self: flex-end;
    align-items: flex-end;
}

.candidate-chat-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    word-break: break-word;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 85%;
}
.candidate-chat-msg .candidate-chat-time {
    font-size: 10px;
    line-height: 1.2;
    color: var(--gray-500);
    opacity: 0.9;
    margin-top: 2px;
    margin-bottom: 0;
}
.candidate-chat-msg-inbound .candidate-chat-time {
    margin-left: 0;
    text-align: left;
}
.candidate-chat-msg-system .candidate-chat-time {
    text-align: center;
}
.candidate-chat-msg-outbound .candidate-chat-time {
    margin-right: 0;
    text-align: right;
}

/* Date divider (centered pill) */
.chat-date-divider {
    align-self: center;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.06);
    font-size: 12px;
    color: var(--gray-600);
    margin: 8px 0;
}

.candidate-chat-msg-inbound .candidate-chat-bubble {
    background: #E9ECEF;
    color: var(--gray-900);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.candidate-chat-msg-outbound .candidate-chat-bubble {
    align-items: flex-end;
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    color: #fff;
    border: none;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25);
}


.candidate-chat-text {
    font-size: 14px;
    line-height: 1.45;
}

.candidate-chat-media-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--primary);
}


.candidate-chat-msg-system {
    align-self: center;
    text-align: center;
}

.candidate-chat-system-content {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 8px 12px;
    background: rgba(79, 80, 229, 0.08);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.candidate-chat-system-text {
    width: 100%;
}

.candidate-chat-send {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 20px 20px;
    border-top: 1px solid #E9ECEF;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04);
}

.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-input-actions-wrap {
    position: relative;
    margin-bottom: 0;
}

.chat-input-action-btn {
    height: 44px;
    padding: 0 14px;
    border: 1px solid #E9ECEF;
    border-radius: 12px;
    background: #fff;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chat-input-action-btn:hover {
    background: #F5F6F8;
    border-color: var(--indigo-200);
    color: var(--primary);
}

.chat-input-field {
    flex: 1;
    min-height: 44px;
    padding: 12px 16px;
    border: 1px solid #E9ECEF;
    border-radius: 12px;
    font-size: 14px;
    font-family: var(--font-family);
    resize: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 80, 229, 0.12);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-send-btn:hover {
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.candidate-chat-send .form-input {
    flex: 1;
    min-height: 44px;
    resize: none;
}

.candidate-chat-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    position: relative;
}

.candidate-chat-action-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.candidate-chat-action-menu {
    position: absolute;
    bottom: 110%;
    left: 0;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(79, 80, 229, 0.18);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
    padding: 6px;
    display: none;
    flex-direction: column;
    min-width: 220px;
    z-index: 20;
}

.candidate-chat-action-menu button {
    width: 100%;
    justify-content: flex-start;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .candidate-chat-layout {
        grid-template-columns: 1fr;
    }
    .candidate-chat-list-pane {
        width: 100%;
        min-width: 0;
        max-height: 40vh;
    }
}

.candidate-whatsapp-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12) 0%, rgba(34, 180, 88, 0.08) 100%);
    color: #1a7a3a;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.candidate-whatsapp-chat-btn:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.2) 0%, rgba(34, 180, 88, 0.15) 100%);
    border-color: rgba(37, 211, 102, 0.7);
}

/* ============================================================
   OUTREACH TAB SECTION
   ============================================================ */

#outreachMainSection {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.outreach-section-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px 32px;
    gap: 0;
}

.outreach-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.outreach-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.outreach-section-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.outreach-section-title i { color: var(--primary, #4361ee); }

.outreach-section-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ---- History wrapper ---- */
.outreach-history-wrapper {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: visible;
    flex: 1;
}

.outreach-history-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.outreach-history-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.outreach-refresh-btn {
    font-size: 0.8rem;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.outreach-history-loading,
.outreach-history-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---- Groups ---- */
.outreach-group { padding: 20px; border-bottom: 1px solid #f0f0f0; }
.outreach-group:last-child { border-bottom: none; }

.outreach-group-title {
    margin: 0 0 14px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* ---- Table ---- */
.outreach-table-wrap { overflow-x: auto; overflow-y: visible; }

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

.outreach-table thead tr {
    background: #f8f9fa;
}

.outreach-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700, #495057);
    font-size: 0.8rem;
    white-space: nowrap;
    border-bottom: 1px solid #dee2e6;
}

.outreach-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--gray-800, #343a40);
    vertical-align: middle;
}

.outreach-table tbody tr:last-child td { border-bottom: none; }
.outreach-table tbody tr:hover td { background: #fafafa; }

.outreach-col-session { font-weight: 500; min-width: 130px; }
.outreach-col-url     { max-width: 220px; }
.outreach-col-date    { white-space: nowrap; color: var(--text-muted); font-size: 0.82rem; }
.outreach-col-num     { text-align: center; font-weight: 600; }
.outreach-col-rate    { min-width: 130px; }

.outreach-url-link {
    color: var(--primary, #4361ee);
    text-decoration: none;
    font-size: 0.82rem;
    word-break: break-all;
}
.outreach-url-link:hover { text-decoration: underline; }

/* ---- Success rate badge + bar ---- */
.outreach-rate-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.rate-good  { background: #d1fae5; color: #065f46; }
.rate-mid   { background: #fef3c7; color: #92400e; }
.rate-low   { background: #fee2e2; color: #991b1b; }

.outreach-rate-bar-bg {
    height: 5px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
}

.outreach-rate-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.outreach-rate-bar-fill.rate-good { background: #10b981; }
.outreach-rate-bar-fill.rate-mid  { background: #f59e0b; }
.outreach-rate-bar-fill.rate-low  { background: #ef4444; }

/* ── Candidate card — job preference chips ───────────────────── */
.cand-pref-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 6px 0 2px;
}
.cand-pref-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.cand-pref-chip i { font-size: 0.65rem; opacity: 0.8; }
.cand-pref-ctc-curr  { background: #ede9fe; color: #5b21b6; }   /* purple – current CTC  */
.cand-pref-ctc-exp   { background: #d1fae5; color: #065f46; }   /* green  – expected CTC  */
.cand-pref-notice    { background: #fef3c7; color: #92400e; }   /* amber  – notice period */
.cand-pref-location  { background: #e0f2fe; color: #0369a1; }   /* blue   – location      */

.cand-pref-relocate  { background: #fce7f3; color: #9d174d; }   /* pink  – open to relocate       */
.cand-pref-workloc   { background: #f0fdf4; color: #166534; }   /* green – preferred work location */

.cand-pref-section { margin: 6px 0 2px; }

.cand-pref-reason {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 5px;
    line-height: 1.4;
}
.cand-pref-reason i { color: #9ca3af; font-size: 0.65rem; margin-top: 2px; flex-shrink: 0; }
.cand-pref-reason span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ── Blacklisted candidate card ─────────────────────────────── */
.cand-blacklisted {
    opacity: 0.72;
    border-color: #fca5a5 !important;
    background: #fff5f5 !important;
}
.cand-blacklist-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    pointer-events: none;
}
.cand-blacklist-badge i { font-size: 0.65rem; }

/* ── Flag menu buttons ───────────────────────────────────────── */
.cand-flag-menu-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 7px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
}
.cand-flag-blacklist { color: #b91c1c; }
.cand-flag-blacklist:hover { background: #fee2e2; }
.cand-flag-unflag { color: #059669; }
.cand-flag-unflag:hover { background: #d1fae5; }


/* ============================================================
   MIRA AI — Component Styles (v2 — clean full-width)
   ============================================================ */

/* ── Outer layout ─────────────────────────────────────────── */
.mira-main-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg, #f9fafb);
}

/* ── Header ───────────────────────────────────────────────── */
.mira-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 12px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    background: var(--surface, #fff);
    flex-shrink: 0;
    gap: 12px;
}
.mira-header-left { display: flex; align-items: center; gap: 14px; }
.mira-header-right { display: flex; align-items: center; gap: 8px; }

.mira-avatar-lg {
    width: 44px; height: 44px;
    border-radius: 14px;
    overflow: hidden; flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124,58,237,.25);
}
.mira-avatar-lg img { width: 44px; height: 44px; object-fit: cover; display: block; }
.mira-name-lg {
    font-size: 17px; font-weight: 800;
    color: var(--text-primary, #1a202c);
    display: flex; align-items: center; gap: 8px;
}
.mira-ai-badge {
    font-size: 10px; font-weight: 700;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff; padding: 2px 7px; border-radius: 8px;
    letter-spacing: .5px; vertical-align: middle;
}
.mira-subtitle-lg {
    font-size: 12px; color: var(--text-secondary, #718096); margin-top: 2px;
}

.mira-actions-counter {
    font-size: 12px; color: var(--text-secondary, #718096);
    background: var(--surface-alt, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px; padding: 4px 10px;
    display: flex; align-items: center; gap: 5px;
}
.mira-actions-counter i { color: #7c3aed; }

.mira-activity-toggle-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--surface, #fff);
    color: var(--text-secondary, #718096);
    transition: background .15s, color .15s, border-color .15s;
}
.mira-activity-toggle-btn:hover,
.mira-activity-toggle-btn--active {
    background: rgba(124,58,237,.08);
    color: #7c3aed; border-color: rgba(124,58,237,.3);
}

.mira-clear-btn {
    background: none;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px; padding: 6px 10px;
    font-size: 13px; cursor: pointer;
    color: var(--text-secondary, #718096);
    transition: background .15s;
}
.mira-clear-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* ── Body (chat + optional activity panel side-by-side) ───── */
.mira-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ── Chat area ────────────────────────────────────────────── */
.mira-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ── Messages ─────────────────────────────────────────────── */
.mira-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scroll-behavior: smooth;
}
.mira-messages::-webkit-scrollbar { width: 4px; }
.mira-messages::-webkit-scrollbar-track { background: transparent; }
.mira-messages::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 4px; }

.mira-msg {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 4px 20px;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.mira-msg--user { justify-content: flex-end; }
.mira-msg--assistant { justify-content: flex-start; }

/* Small avatar on assistant messages */
.mira-avatar-sm {
    width: 28px; height: 28px; border-radius: 8px;
    overflow: hidden; flex-shrink: 0;
    margin-bottom: 2px;
}
.mira-avatar-sm img { width: 28px; height: 28px; object-fit: cover; display: block; }

.mira-msg-bubble {
    max-width: 72%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}
.mira-msg--user .mira-msg-bubble {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(124,58,237,.25);
}
.mira-msg--assistant .mira-msg-bubble {
    background: var(--surface, #fff);
    color: var(--text-primary, #1a202c);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* Action chips */
.mira-action-chips {
    display: flex; flex-wrap: wrap; gap: 5px;
    padding: 3px 20px 10px 58px;
    max-width: 860px; margin: 0 auto; width: 100%; box-sizing: border-box;
}
.mira-action-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px; font-size: 11px;
    background: var(--surface, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #718096);
    max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mira-action-chip .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.mira-action-chip .dot--success { background: #22c55e; }
.mira-action-chip .dot--failed  { background: #ef4444; }

/* Typing dots */
.mira-typing-bubble {
    display: flex; align-items: center; gap: 5px;
    padding: 14px 16px !important; min-width: 60px;
}
.mira-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #a78bfa;
    animation: mira-bounce 1.2s infinite;
}
.mira-dot:nth-child(2) { animation-delay: .2s; }
.mira-dot:nth-child(3) { animation-delay: .4s; }
@keyframes mira-bounce {
    0%,80%,100% { transform: translateY(0); opacity: .5; }
    40%          { transform: translateY(-6px); opacity: 1; }
}

/* ── Input wrap ───────────────────────────────────────────── */
.mira-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: var(--surface, #fff);
    flex-shrink: 0;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.mira-textarea {
    flex: 1; resize: none;
    border-radius: 14px; padding: 11px 16px;
    font-size: 14px; line-height: 1.5;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--surface-alt, #f8fafc);
    color: var(--text-primary, #1a202c);
    font-family: inherit;
    min-height: 46px; max-height: 140px;
    outline: none;
    transition: border-color .15s, background .15s;
}
.mira-textarea:focus {
    border-color: #7c3aed;
    background: var(--surface, #fff);
    box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.mira-send-btn {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff; border: none; cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s, transform .1s;
    box-shadow: 0 3px 10px rgba(124,58,237,.3);
}
.mira-send-btn:hover  { opacity: .9; transform: scale(1.04); }
.mira-send-btn:active { transform: scale(.96); }
.mira-send-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ── Quick tasks drop-up ──────────────────────────────────── */
.mira-quick-wrap { position: relative; flex-shrink: 0; }

.mira-quick-btn {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: var(--surface-alt, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    color: #7c3aed; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.mira-quick-btn:hover {
    background: rgba(124,58,237,.08);
    border-color: rgba(124,58,237,.35);
    box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.mira-quick-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 300px;
    background: var(--surface, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
    z-index: 999;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    animation: mira-menu-in .15s ease;
}
.mira-quick-menu--open { display: flex; }

@keyframes mira-menu-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mira-quick-menu-header {
    font-size: 11px; font-weight: 700;
    color: var(--text-secondary, #718096);
    text-transform: uppercase; letter-spacing: .6px;
    padding: 6px 8px 4px;
}

.mira-quick-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    padding: 9px 10px; border-radius: 10px;
    background: none; border: none; cursor: pointer;
    font-size: 13px; color: var(--text-primary, #1a202c);
    font-family: inherit;
    transition: background .12s;
}
.mira-quick-item:hover { background: var(--surface-alt, #f8fafc); }

.mira-quick-item-icon {
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; flex-shrink: 0;
}

/* ── Activity panel (collapsible, right side) ─────────────── */
.mira-activity-panel {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color, #e2e8f0);
    background: var(--surface-alt, #f8fafc);
    overflow: hidden;
}

.mira-activity-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600; font-size: 13px;
    color: var(--text-primary, #1a202c);
    flex-shrink: 0;
    background: var(--surface, #fff);
}

.mira-close-activity-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary, #718096); font-size: 14px; padding: 2px 4px;
}
.mira-close-activity-btn:hover { color: var(--text-primary, #1a202c); }

.mira-activity-list {
    flex: 1; overflow-y: auto; padding: 4px 0;
}
.mira-activity-list::-webkit-scrollbar { width: 4px; }
.mira-activity-list::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 4px; }

.mira-activity-empty {
    text-align: center; padding: 40px 16px;
    font-size: 13px; color: var(--text-secondary, #718096);
}
.mira-activity-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    transition: background .1s;
}
.mira-activity-item:hover { background: rgba(124,58,237,.04); }

.mira-activity-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.mira-activity-icon--success { background: #dcfce7; color: #16a34a; }
.mira-activity-icon--failed  { background: #fee2e2; color: #dc2626; }

.mira-activity-body { flex: 1; min-width: 0; }
.mira-activity-tool {
    font-size: 10px; font-weight: 700;
    color: var(--text-secondary, #718096);
    text-transform: uppercase; letter-spacing: .5px;
}
.mira-activity-summary {
    font-size: 12px; color: var(--text-primary, #1a202c);
    margin-top: 2px; word-break: break-word; line-height: 1.4;
}
.mira-activity-time { font-size: 10px; color: var(--text-secondary, #718096); margin-top: 3px; }

.mira-activity-badge {
    font-size: 10px; padding: 2px 7px; border-radius: 10px;
    font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.mira-activity-badge--success { background: #dcfce7; color: #16a34a; }
.mira-activity-badge--failed  { background: #fee2e2; color: #dc2626; }

/* ── Mira Voice Controls ─────────────────────────────────────────────────── */

/* Voice Mode toggle button (in header) */
.mira-voice-mode-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px;
    background: var(--surface-3, #f7fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #718096);
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.mira-voice-mode-btn:hover { border-color: #7c3aed; color: #7c3aed; }
.mira-voice-mode-btn--active {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border-color: transparent; color: #fff;
    box-shadow: 0 2px 10px rgba(124,58,237,.35);
    animation: mira-voice-mode-glow 2.5s ease-in-out infinite;
}
@keyframes mira-voice-mode-glow {
    0%, 100% { box-shadow: 0 2px 10px rgba(124,58,237,.35); }
    50%       { box-shadow: 0 2px 20px rgba(124,58,237,.65); }
}

/* Mic button (in input bar) */
.mira-mic-btn {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--surface-3, #f7fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #718096);
    font-size: 15px; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.mira-mic-btn:hover { border-color: #7c3aed; color: #7c3aed; }
.mira-mic-btn--active {
    background: #ef4444; border-color: transparent; color: #fff;
    animation: mira-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mira-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
    60%       { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}

/* Voice status bar (between messages and input) */
.mira-voice-status {
    display: none; align-items: center; gap: 10px;
    margin: 0 auto 10px auto; max-width: 860px; width: 100%;
    padding: 10px 18px; border-radius: 24px;
    background: var(--surface-3, #f7fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    font-size: 13px; color: var(--text-secondary, #718096);
}

/* Animated waveform inside voice status */
.mira-voice-wave {
    display: flex; align-items: center; gap: 3px; flex-shrink: 0;
}
.mira-voice-wave span {
    display: inline-block; width: 3px; border-radius: 3px;
    background: linear-gradient(to top, #7c3aed, #4f46e5);
    animation: mira-wave-bar 1.1s ease-in-out infinite;
}
.mira-voice-wave span:nth-child(1) { height:  8px; animation-delay: 0s;    }
.mira-voice-wave span:nth-child(2) { height: 18px; animation-delay: .15s;  }
.mira-voice-wave span:nth-child(3) { height: 26px; animation-delay: .30s;  }
.mira-voice-wave span:nth-child(4) { height: 18px; animation-delay: .45s;  }
.mira-voice-wave span:nth-child(5) { height:  8px; animation-delay: .60s;  }
@keyframes mira-wave-bar {
    0%, 100% { transform: scaleY(.45); opacity: .5; }
    50%       { transform: scaleY(1);  opacity: 1;   }
}


/* ── Mira launchpad icon ─────────────────────────────────────────────────── */
.mira-lp-icon {
    padding: 0 !important;
    overflow: hidden;
}
.mira-lp-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Mira mute button ────────────────────────────────────────────────────── */
.mira-mute-btn {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--surface-3, #f7fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #718096);
    font-size: 13px; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.mira-mute-btn:hover { border-color: #7c3aed; color: #7c3aed; }
.mira-mute-active {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

/* ── Mira interview sidebar column ──────────────────────────────────────── */
.iv-mira-pane {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color, #e2e8f0);
    padding-left: 14px;
    overflow-y: auto;
    min-height: 0;
    transition: width .25s ease, padding .25s ease, border-color .25s ease;
    width: 240px;
}

/* ── Collapsed state ── */
.iv-mira-pane.collapsed {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    padding-left: 4px;
    overflow: hidden;
    border-left-color: var(--border-color, #e2e8f0);
}
.iv-mira-pane.collapsed .iv-mira-expanded { display: none; }
.iv-mira-pane.collapsed .iv-mira-collapsed-stub { display: flex; }

/* Collapsed grid column */
.interviews-layout.mira-collapsed {
    grid-template-columns: 340px 1fr 42px;
}

/* Collapsed stub */
.iv-mira-collapsed-stub {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
}
.iv-mira-collapsed-stub:hover .iv-mira-avatar { box-shadow: 0 0 0 2px #7c3aed60; }
.iv-mira-collapsed-stub i { color: #7c3aed; font-size: 11px; }

/* Toggle button in header */
.iv-mira-toggle-btn {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    background: var(--surface-2, #f8fafc);
    color: var(--text-secondary, #718096);
    cursor: pointer;
    font-size: 11px;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
}
.iv-mira-toggle-btn:hover { background: #f5f3ff; border-color: #7c3aed; color: #7c3aed; }

/* Expanded wrapper */
.iv-mira-expanded { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }

.iv-mira-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 12px;
    flex-shrink: 0;
}
.iv-mira-avatar {
    width: 34px; height: 34px;
    border-radius: 10px;
    overflow: hidden; flex-shrink: 0;
    transition: box-shadow .15s;
}
.iv-mira-avatar img { width: 34px; height: 34px; object-fit: cover; display: block; }
.iv-mira-title { font-size: 13px; font-weight: 700; color: var(--text-primary, #1a202c); }
.iv-mira-sub   { font-size: 11px; color: var(--text-secondary, #718096); margin-top: 1px; }
.iv-mira-open-btn {
    width: 100%;
    padding: 9px 0;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 14px;
    transition: opacity .2s;
    flex-shrink: 0;
}
.iv-mira-open-btn:hover { opacity: .88; }
.iv-mira-divider { font-size: 11px; font-weight: 700; color: var(--text-secondary, #718096); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; flex-shrink: 0; }
.iv-mira-chips { display: flex; flex-direction: column; gap: 6px; }
.iv-mira-chip {
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    background: var(--surface-2, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-primary, #1a202c);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    transition: border-color .15s, background .15s;
}
.iv-mira-chip:hover { border-color: #7c3aed; background: #f5f3ff; color: #5b21b6; }
.iv-mira-chip i { color: #7c3aed; flex-shrink: 0; margin-top: 2px; font-size: 11px; }
@media (max-width: 1100px) {
    .iv-mira-pane { border-left: none; border-top: 1px solid var(--border-color, #e2e8f0); padding-left: 0; padding-top: 14px; width: auto; }
    .iv-mira-pane.collapsed { width: auto; max-width: none; min-width: 0; height: 42px; overflow: hidden; }
    .interviews-layout.mira-collapsed { grid-template-columns: 340px 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   RECRUITER NOTIFICATION BELL + PANEL
   ═══════════════════════════════════════════════════════════════ */
.notif-bell-wrap {
    position: relative;
    margin-right: 2px;
}
.notif-bell-btn {
    position: relative;
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--gray-200, #e5e7eb);
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-700, #374151);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    transition: background .15s, border-color .15s;
}
.notif-bell-btn:hover {
    background: var(--primary-light, #eef0fd);
    border-color: var(--primary, #4361ee);
    color: var(--primary, #4361ee);
}
.notif-badge {
    position: absolute;
    top: -5px; right: -5px;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--card-bg, #fff);
    line-height: 1;
}

/* Panel */
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 520px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.14);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    flex-shrink: 0;
}
.notif-panel-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main, #1a1a2e);
    display: flex; align-items: center; gap: 7px;
}
.notif-panel-title i { color: #7c3aed; }
.notif-mark-all-btn {
    font-size: 12px; font-weight: 600;
    color: #7c3aed; background: none; border: none; cursor: pointer;
    padding: 4px 8px; border-radius: 6px;
    transition: background .15s;
}
.notif-mark-all-btn:hover { background: #f5f3ff; }

/* List */
.notif-list {
    overflow-y: auto;
    flex: 1;
}
.notif-empty {
    text-align: center;
    padding: 40px 16px;
    font-size: 13px;
    color: var(--text-muted, #9ca3af);
}

/* Notification item */
.notif-item {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color, #f3f4f6);
    transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2, #f8fafc); }
.notif-item--unread { background: #f5f3ff; }
.notif-item--unread:hover { background: #ede9fe; }

.notif-item-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}
.notif-item-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.notif-item-info { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 700; color: var(--text-main, #1a1a2e); }
.notif-item-sub   { font-size: 12px; color: var(--text-muted, #6b7280); margin-top: 1px; }
.notif-item-skills { font-size: 11px; color: var(--text-muted, #9ca3af); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.notif-dismiss-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted, #9ca3af); font-size: 16px; line-height: 1;
    padding: 0 2px; flex-shrink: 0;
    transition: color .15s;
}
.notif-dismiss-btn:hover { color: #ef4444; }

.notif-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.notif-accept-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border: none; border-radius: 7px;
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}
.notif-accept-btn:hover { opacity: .88; }
.notif-resume-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    background: var(--surface-2, #f3f4f6);
    color: var(--text-main, #374151);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 7px;
    font-size: 12px; font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.notif-resume-btn:hover { background: #e5e7eb; }
.notif-time {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    margin-left: auto;
}

/* ── Mira Voice Phone Registration Row ── */
.mira-voice-phone-row {
    margin: 8px 0 4px;
    padding: 10px 12px;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    font-size: 12px;
}
.mira-voice-phone-label {
    font-size: 11px;
    font-weight: 700;
    color: #7c3aed;
    letter-spacing: .3px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
}
.mira-voice-phone-input-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
}
.mira-voice-phone-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #c4b5fd;
    border-radius: 7px;
    font-size: 12px;
    background: #fff;
    color: var(--text-main, #1a1a2e);
    outline: none;
    transition: border-color .15s;
}
.mira-voice-phone-input:focus { border-color: #7c3aed; }
.mira-voice-phone-save {
    padding: 6px 12px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.mira-voice-phone-save:hover { background: #6d28d9; }
.mira-voice-phone-hint {
    margin-top: 6px;
    font-size: 10px;
    color: #7c3aed;
    opacity: .8;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.4;
}
