/* ============================================================
   HUNT IT — Design System
   Premium dark theme with teal/cyan accents
   ============================================================ */

:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #0f1419;
    --bg-card: #141a22;
    --bg-card-hover: #1a2230;
    --bg-input: #111820;
    --border: #1e2a38;
    --border-hover: #2a3a4e;

    --text-primary: #e6edf5;
    --text-secondary: #8899aa;
    --text-muted: #556677;

    --accent: #00d4aa;
    --accent-glow: rgba(0, 212, 170, 0.15);
    --accent-dark: #00a88a;
    --accent-gradient: linear-gradient(135deg, #00d4aa, #00b4d8);

    --match-full: #00d4aa;
    --match-full-bg: rgba(0, 212, 170, 0.12);
    --match-partial: #f0b429;
    --match-partial-bg: rgba(240, 180, 41, 0.12);
    --match-low: #8899aa;
    --match-low-bg: rgba(136, 153, 170, 0.08);

    --danger: #ff5577;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;

    --sidebar-width: 230px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 212, 170, 0.1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html,
body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

body {
    display: flex;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo svg {
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.credits-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.credits-badge svg {
    color: var(--accent);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
    flex: 1;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.view {
    display: none;
    height: 100%;
}

.view.active {
    display: flex;
    flex-direction: column;
}

/* ============================================================
   SEARCH VIEW (HOME)
   ============================================================ */

.search-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.search-hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 36px;
}

.search-box {
    width: 100%;
    max-width: 700px;
    position: relative;
}

.search-box textarea {
    width: 100%;
    padding: 20px;
    padding-right: 170px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box textarea:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.search-box textarea::placeholder {
    color: var(--text-muted);
}

.btn-search {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius);
    color: var(--bg-primary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-search:hover {
    opacity: 0.9;
}

.btn-search:active {
    transform: scale(0.97);
}

.btn-search:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.suggestions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.suggestion-label {
    font-size: 12px;
    color: var(--text-muted);
}

.chip {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

/* ============================================================
   RESULTS VIEW
   ============================================================ */

.results-header {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.results-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.results-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-back:hover {
    color: var(--accent);
}

.breadcrumb-sep {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
}

.results-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Rematch bar */
.rematch-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.rematch-bar input {
    flex: 1;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 12px;
    font-family: var(--font);
    outline: none;
}

.rematch-bar input:focus {
    border-color: var(--accent);
}

.rematch-bar button {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.rematch-bar button:first-of-type {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.rematch-bar button:hover {
    opacity: 0.85;
}

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

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-item input,
.filter-item select {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s;
}

.filter-item input:focus,
.filter-item select:focus {
    border-color: var(--accent);
}

.btn-clear-filters {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(255, 85, 119, 0.2);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-clear-filters:hover {
    background: rgba(255, 85, 119, 0.1);
    border-color: var(--danger);
}

/* Keyword Highlighting */
mark.search-highlight {
    background: rgba(240, 180, 41, 0.25);
    color: #ffd050;
    border-bottom: 1px solid #ffd050;
    padding: 0 2px;
    border-radius: 2px;
}

/* Split Layout */
.results-split {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Resizable divider */
.split-divider {
    width: 6px;
    flex-shrink: 0;
    background: var(--border);
    cursor: col-resize;
    position: relative;
    transition: background 0.15s;
}

.split-divider:hover,
.split-divider:active {
    background: var(--accent);
}

.split-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 32px;
    border-radius: 2px;
    background: var(--text-muted);
    opacity: 0.5;
}

/* Checkbox in table */
.chk-row,
.chk-group {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* Chat Panel */
.chat-panel {
    width: 38%;
    display: flex;
    flex-direction: column;
    border-right: none;
    background: var(--bg-secondary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-msg {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
}

.chat-avatar.ai {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.chat-bubble {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-primary);
    max-width: 100%;
}

.chat-bubble strong {
    color: var(--accent);
}

.chat-bubble ul {
    padding-left: 16px;
    margin-top: 8px;
}

.chat-bubble li {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.chat-bubble .stat {
    color: var(--accent);
    font-weight: 600;
}

.chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.chat-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--accent);
}

/* Table Panel — single horizontal scrollbar at bottom */
.table-panel {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    background: var(--bg-primary);
}

.table-container {
    min-width: 1200px;
}

.group-body {
    overflow-x: visible;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 2;
}

.group-header .arrow {
    transition: transform 0.2s;
    font-size: 10px;
}

.group-header .arrow.collapsed {
    transform: rotate(-90deg);
}

.group-header .count {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.group-full .group-header {
    color: var(--match-full);
}

.group-partial .group-header {
    color: var(--match-partial);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}

.results-table td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.results-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.results-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.candidate-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.candidate-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
}

.candidate-name-text {
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-primary);
}

.candidate-name-text.fallback-name {
    font-weight: 500;
    font-style: italic;
    color: var(--text-secondary);
}

.candidate-avatar.fallback-avatar {
    background: rgba(124, 58, 237, 0.08);
    border-color: rgba(124, 58, 237, 0.2);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 6px;
}

.social-link {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    transition: opacity 0.2s;
}

.social-link:hover {
    opacity: 0.8;
}

.social-link.linkedin {
    background: #0a66c2;
    color: white;
}

.social-link.github {
    background: #333;
    color: white;
}

.match-badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.match-badge.full {
    background: var(--match-full-bg);
    color: var(--match-full);
}

.match-badge.partial {
    background: var(--match-partial-bg);
    color: var(--match-partial);
}

.match-badge.low {
    background: var(--match-low-bg);
    color: var(--match-low);
}

/* ── Score Bar (table cell) ──────────────────────────── */

.match-score-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-bar-container {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: help;
}

.score-bar-container .score-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    transition: width 0.4s ease;
    max-width: 60px;
}

.score-bar-container::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
}

.score-bar-container {
    position: relative;
}

.score-bar-container .score-bar {
    position: relative;
    z-index: 1;
}

.score-num {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 22px;
    text-align: right;
}

/* ── Score Breakdown (profile panel) ─────────────────── */

.score-breakdown {
    margin-top: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: left;
}

.score-total {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    margin-bottom: 10px;
}

.score-unit {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.score-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-label {
    font-size: 11px;
    color: var(--text-secondary);
    width: 72px;
    flex-shrink: 0;
}

.score-bar-bg {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.score-val {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 24px;
    text-align: right;
}

.score-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
    align-items: center;
}

.score-tag-label {
    font-size: 12px;
    flex-shrink: 0;
}

.score-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 100px;
    white-space: nowrap;
}

.score-tag.strength {
    background: rgba(0, 212, 170, 0.12);
    color: var(--match-full);
}

.score-tag.gap {
    background: rgba(240, 180, 41, 0.12);
    color: var(--match-partial);
}

.chk-val {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.chk-icon {
    color: #22c55e;
    font-size: 10px;
    flex-shrink: 0;
}

.company-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.btn-pesquisar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.btn-pesquisar:hover {
    background: var(--bg-card-hover);
    color: var(--text);
}

.social-link.cv-link {
    background: #6366f1;
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    width: auto;
}

/* Search history */
.history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
    color: var(--text);
}

.history-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.history-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.history-prompt {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.action-btns {
    display: flex;
    gap: 4px;
}

.btn-action-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 1;
}

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

.btn-action-remove:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.match-badge {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: 100px;
}

.td-summary {
    max-width: 260px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    line-height: 1.45;
    color: var(--text-secondary);
    font-size: 12px;
}

.btn-save-candidate {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-save-candidate:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================================
   PROFILE PANEL
   ============================================================ */

.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.profile-overlay.open {
    display: flex;
    animation: fadeIn 0.15s ease;
}

.profile-panel {
    width: min(920px, 94vw);
    height: 92vh;
    max-height: 92vh;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    padding: 24px;
    position: relative;
    margin: auto;
}

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

.profile-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.profile-close:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Profile header navigation controls */
.profile-header-nav {
    position: sticky;
    top: -24px;
    margin-top: -24px;
    margin-left: -24px;
    margin-right: -24px;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(15, 20, 25, 0.98) 0%, rgba(15, 20, 25, 0.92) 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 212, 170, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.profile-nav-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.12) 0%, rgba(0, 180, 216, 0.08) 100%);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 8px;
    color: var(--accent);
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.02em;
}

.profile-nav-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.profile-nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.25) 0%, rgba(0, 180, 216, 0.18) 100%);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 16px rgba(0, 212, 170, 0.2);
    transform: translateY(-1px);
}

.profile-nav-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.15);
}

.profile-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border);
    color: var(--text-muted);
}

.profile-nav-info {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 70px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    letter-spacing: 0.03em;
}

.profile-close-btn {
    background: rgba(255, 85, 119, 0.08);
    border: 1px solid rgba(255, 85, 119, 0.2);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.profile-close-btn:hover {
    border-color: var(--danger);
    color: #fff;
    background: rgba(255, 85, 119, 0.2);
    box-shadow: 0 0 12px rgba(255, 85, 119, 0.15);
    transform: translateY(-1px);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--bg-primary);
    margin: 0 auto 16px;
}

.profile-name {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-meta {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
}

.profile-socials {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.profile-socials a {
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.profile-socials a:hover {
    opacity: 0.85;
}

.profile-socials .linkedin {
    background: #0a66c2;
    color: white;
}

.profile-socials .github {
    background: #333;
    color: white;
}

.profile-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.profile-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 12px;
}

.profile-summary {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.profile-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tag {
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-match-details {
    margin-top: 16px;
}

.match-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0;
    font-size: 13px;
}

.match-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.match-met {
    color: var(--match-full);
}

.match-uncertain {
    color: var(--match-partial);
}

.match-missing {
    color: var(--danger);
}

.btn-cv-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    margin-top: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.btn-cv-preview:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-enrich {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius);
    color: var(--bg-primary);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-enrich:hover {
    opacity: 0.9;
}

.btn-enrich:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 20, 0.92);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    max-width: 400px;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.loading-step {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 12px;
}

.empty-state h2 {
    font-size: 20px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ============================================================
   SETTINGS
   ============================================================ */

.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.settings-heading {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px;
    letter-spacing: .02em;
}

.settings-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
    display: block;
}

.settings-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-primary);
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color .15s;
}

.settings-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============================================================
   CANDIDATE STATUS DROPDOWN
   ============================================================ */

.status-select {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    min-width: 120px;
}

.status-select:focus {
    outline: none;
    border-color: var(--accent);
}

.status-select.status-novo {
    border-color: #556677;
    color: #8899aa;
}

.status-select.status-contatado {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, .08);
}

.status-select.status-em_processo {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245, 158, 11, .08);
}

.status-select.status-nao_adequado {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, .08);
}

.status-select.status-contratado {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, .08);
}

.status-select.status-convidado_wpp {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, .08);
}

.status-select.status-email_invalido {
    border-color: #f59e0b;
    color: #ef4444;
    background: rgba(239, 68, 68, .08);
}

/* ============================================================
   HISTORY DELETE BUTTON
   ============================================================ */

.history-item-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-history-delete {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 5px;
    opacity: .5;
    flex-shrink: 0;
    transition: opacity .15s, color .15s;
}

.btn-history-delete:hover {
    opacity: 1;
    color: #ef4444;
}

/* ============================================================
   SEARCH MODE SELECTOR
   ============================================================ */

.search-mode-group {
    display: inline-flex;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
}

.search-mode-opt {
    cursor: pointer;
}

.search-mode-opt input[type="radio"] {
    display: none;
}

.search-mode-opt span {
    display: block;
    padding: 5px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: background .15s, color .15s;
    white-space: nowrap;
    user-select: none;
}

.search-mode-opt input[type="radio"]:checked+span {
    background: var(--primary, #7c3aed);
    color: #fff;
}

.search-mode-opt:hover span {
    color: var(--text-primary);
}

/* ============================================================
   Pagination — Load More
   ============================================================ */

.load-more-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0 16px;
    flex-direction: column;
}

.load-more-info {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-load-more {
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 28px;
    cursor: pointer;
    transition: background .2s, border-color .2s, box-shadow .2s;
    letter-spacing: 0.02em;
}

.btn-load-more:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* ============================================================
   TABLE COLUMN WIDTHS (Fix 2026-04-24)
   ============================================================ */

/* Allow text wrapping in cells */
.results-table td {
    white-space: normal;
    word-wrap: break-word;
    vertical-align: top;
    padding: 12px 8px;
}

/* Name column */
.results-table th:nth-child(2),
.results-table td:nth-child(2) {
    min-width: 180px;
    max-width: 250px;
}

/* Role column - wider for better visibility */
.results-table th:nth-child(3),
.results-table td:nth-child(3) {
    min-width: 280px;
    max-width: 450px;
}

/* Company column */
.results-table th:nth-child(4),
.results-table td:nth-child(4) {
    min-width: 220px;
    max-width: 350px;
}

/* Location column */
.results-table th:nth-child(5),
.results-table td:nth-child(5) {
    min-width: 150px;
    max-width: 200px;
}

/* Summary column */
.results-table th:nth-child(7),
.results-table td:nth-child(7) {
    min-width: 300px;
    max-width: 500px;
}

/* Make sure role text doesn't get cut off */
.td-role {
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Company cell improvement */
.td-company {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Search Source Mode Badges */
.search-mode-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}
.search-mode-badge.local {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.search-mode-badge.web {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.search-mode-badge.both {
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* ============================================================
   SOURCING AUTÔNOMO DASHBOARD STYLES
   ============================================================ */

.sourcing-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.sourcing-badge.pending {
    background: rgba(136, 153, 170, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(136, 153, 170, 0.2);
}

.sourcing-badge.running {
    background: rgba(240, 180, 41, 0.1);
    color: #f0b429;
    border: 1px solid rgba(240, 180, 41, 0.2);
    animation: pulse-orange 1.5s infinite ease-in-out;
}

.sourcing-badge.done {
    background: var(--match-full-bg);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.sourcing-badge.failed {
    background: rgba(255, 85, 119, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 85, 119, 0.2);
}

@keyframes pulse-orange {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.sourcing-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sourcing-tab:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.sourcing-tab.active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    font-weight: 600;
}

/* Stepper Steps Statuses */
.pipeline-step.success .step-circle {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--bg-primary) !important;
    box-shadow: 0 0 12px rgba(0, 212, 170, 0.3);
}

.pipeline-step.failed .step-circle {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(255, 85, 119, 0.3);
}

.pipeline-step.running .step-circle {
    background: #f0b429 !important;
    border-color: #f0b429 !important;
    color: var(--bg-primary) !important;
    animation: pulse-orange-shadow 1.5s infinite ease-in-out;
}

.pipeline-step.skipped .step-circle {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-muted) !important;
    border-style: dashed !important;
}

@keyframes pulse-orange-shadow {
    0% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(240, 180, 41, 0); }
    100% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0); }
}

/* Pipeline Connector Completed Line styling */
.pipeline-connector-progress {
    position: absolute;
    top: 20px;
    left: 40px;
    height: 4px;
    background: var(--accent);
    z-index: 1;
    transition: width 0.5s ease-in-out;
}