/* style.css - Design do JobHunter AI (Tema Executivo / Enterprise SaaS) */
:root {
    --bg-primary: #090d16;
    --bg-secondary: #0f1422;
    --bg-card: #121827;
    --bg-card-hover: #161e31;
    --border-color: #1e293b;
    --border-subtle: #172033;
    --border-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-blue-subtle: rgba(37, 99, 235, 0.12);
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: #161f30;
    border: 1px solid #28354d;
    color: #38bdf8;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.container {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.stat-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.stat-card.pending .stat-value { color: var(--accent-yellow); }
.stat-card.applied .stat-value { color: var(--accent-green); }
.stat-card.gupy .stat-value { color: #38bdf8; }

/* Filters */
.filters-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    width: 100%;
    box-sizing: border-box;
}

.filters-grid-wrapper {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(140px, 1.1fr) minmax(190px, 1.6fr) minmax(150px, 1.2fr) minmax(130px, 1.1fr) auto;
    gap: 0.85rem;
    align-items: flex-end;
    width: 100%;
    box-sizing: border-box;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.filter-group label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

.filter-group select {
    width: 100%;
    height: 38px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.84rem;
    padding: 0.45rem 0.65rem;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px var(--accent-blue-subtle);
}

.filter-btn-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.filter-btn-group .btn {
    height: 38px;
    padding: 0 1.25rem;
    white-space: nowrap;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

/* Tablet view (769px to 1120px) */
@media (min-width: 769px) and (max-width: 1120px) {
    .filters-grid-wrapper {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .filter-cv-group {
        grid-column: span 1;
    }
    .filter-btn-group {
        grid-column: span 1;
    }
    .filter-btn-group .btn {
        width: 100%;
    }
}

select, input[type="text"] {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
}

select:focus, input[type="text"]:focus {
    border-color: var(--accent-blue);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-primary { 
    background: var(--accent-blue); 
    border: 1px solid var(--accent-blue);
    color: white; 
}
.btn-primary:hover { 
    background: var(--accent-blue-hover); 
    border-color: var(--accent-blue-hover);
    transform: translateY(-1px); 
}

.btn-secondary { 
    background-color: #161f30; 
    border: 1px solid #28354d; 
    color: #e2e8f0; 
}
.btn-secondary:hover { 
    background-color: #1d283d; 
    border-color: #3b4d6e; 
    color: #ffffff;
}

.btn-outline { 
    background: #111726; 
    border: 1px solid var(--border-color); 
    color: #cbd5e1; 
}
.btn-outline:hover { 
    background: #182238; 
    border-color: #3b4d6e; 
    color: #ffffff;
}

.btn-success { 
    background-color: #059669; 
    border: 1px solid #059669; 
    color: white; 
}
.btn-success:hover { 
    background-color: #047857; 
    border-color: #047857; 
}

.btn-warning { 
    background-color: #d97706; 
    border: 1px solid #d97706; 
    color: white; 
}
.btn-warning:hover { 
    background-color: #b45309; 
    border-color: #b45309; 
}

/* Job Cards */
.jobs-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.job-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: transform 0.15s, border-color 0.15s;
    box-shadow: var(--shadow-sm);
}

.job-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.job-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.job-company {
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.match-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.match-high { background-color: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.28); }
.match-med { background-color: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.28); }
.match-low { background-color: rgba(148, 163, 184, 0.1); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }

.job-details-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-location { background: #161f30; color: #94a3b8; border: 1px solid #28354d; }
.badge-remote { background: rgba(16, 185, 129, 0.1); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }
.badge-cv { background: #161f30; color: #cbd5e1; border: 1px solid #28354d; }
.badge-gupy { background: rgba(99, 102, 241, 0.1); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.25); }
.badge-nerdin { background: rgba(249, 115, 22, 0.1); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.25); }
.badge-jobspy { background: rgba(14, 165, 233, 0.1); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.25); }
.badge-easy-apply { background: rgba(10, 102, 194, 0.12); color: #60a5fa; border: 1px solid rgba(10, 102, 194, 0.28); }

.job-snippet {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.skill-tag {
    background: #101625;
    border: 1px solid #1f2b42;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(51, 65, 85, 0.6);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.actions-group {
    display: flex;
    gap: 0.5rem;
}

/* Cover Letter Section */
.cover-letter-section {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cover-letter-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cover-letter-box textarea {
    width: 100%;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.cover-letter-box textarea:focus {
    border-color: var(--accent-blue);
}

.cover-letter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-feedback {
    font-size: 0.8rem;
    color: var(--accent-green);
    font-weight: 600;
    display: none;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 50000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-content.large { max-width: 850px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.75rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.progress-box {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--accent-blue);
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: #60a5fa;
    font-size: 0.9rem;
    text-align: center;
}

.desc-text {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    white-space: pre-line;
    max-height: 350px;
    overflow-y: auto;
    font-size: 0.875rem;
    color: #cbd5e1;
}

.badge-easy-apply { background: rgba(245, 158, 11, 0.25); color: #fde68a; border: 1px solid #f59e0b; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.btn-warning:hover { opacity: 0.9; transform: translateY(-1px); }

.guide-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
}
.guide-box code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    color: #38bdf8;
    font-family: monospace;
}

/* Gestao de Curriculos */
.resumes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.resume-item-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
}
.resume-item-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(15, 23, 42, 0.85);
}
.resume-meta h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}
.resume-filename {
    font-size: 0.8rem;
    color: #38bdf8;
    font-family: monospace;
    word-break: break-all;
}
.resume-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}
.resume-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}
.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}
.upload-btn-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* ==============================================================================
   MÓDULO: MAPA GEOGRÁFICO DO BRASIL & ILHAS REMOTAS (WOW AESTHETICS)
   ============================================================================== */
.geo-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.geo-summary-grid {
    margin-bottom: 1.5rem;
}

.stat-card .stat-hint {
    font-size: 0.76rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

.stat-island-br {
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.3), rgba(30, 41, 59, 0.8)) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-island-br:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
    border-color: #10b981 !important;
}

.stat-island-intl {
    border-color: rgba(168, 85, 247, 0.4) !important;
    background: linear-gradient(135deg, rgba(59, 7, 100, 0.3), rgba(30, 41, 59, 0.8)) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-island-intl:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.25);
    border-color: #a855f7 !important;
}

.geo-filters-bar {
    margin-bottom: 1.5rem;
}

/* Layout Principal do Workspace Geográfico */
.geo-workspace {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1080px) {
    .geo-workspace {
        grid-template-columns: 1fr;
    }
}

/* Card do Mapa */
.geo-map-card {
    background: radial-gradient(circle at 60% 40%, #0d1933 0%, #070e1e 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.geo-map-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.map-legend {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.legend-dot.dot-empty { background: #1e293b; border: 1px solid rgba(255, 255, 255, 0.2); }
.legend-dot.dot-low { background: #0284c7; }
.legend-dot.dot-med { background: #6366f1; }
.legend-dot.dot-high { background: #10b981; }

.map-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.svg-map-wrapper {
    width: 100%;
    position: relative;
    user-select: none;
}

#brazilMapSvg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
}

/* Estilização dos Estados (SVG) */
.geo-state {
    fill: #1e293b;
    stroke: rgba(255, 255, 255, 0.14);
    stroke-width: 0.75px;
    stroke-linejoin: round;
    stroke-linecap: round;
    cursor: pointer;
    transition: fill 0.25s ease, stroke 0.2s ease, filter 0.25s ease;
}

.geo-state:hover {
    fill: #38bdf8 !important;
    stroke: #ffffff !important;
    stroke-width: 1.75px;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.9));
}

.geo-state.active {
    fill: #818cf8 !important;
    stroke: #ffffff !important;
    stroke-width: 2.2px;
    filter: drop-shadow(0 0 14px rgba(129, 140, 248, 0.95));
}

/* Fills baseados na densidade de vagas */
.geo-state.has-jobs-low {
    fill: #0c4a6e;
    stroke: rgba(56, 189, 248, 0.4);
}

.geo-state.has-jobs-med {
    fill: #3730a3;
    stroke: rgba(165, 180, 252, 0.5);
}

.geo-state.has-jobs-high {
    fill: #047857;
    stroke: rgba(52, 211, 153, 0.6);
}

.state-label {
    font-size: 8px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    fill: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
    pointer-events: none;
    transition: opacity 0.2s;
}

/* ==============================================================================
   ESTILIZAÇÃO DAS ILHAS REMOTAS NO OCEANO
   ============================================================================== */
.island-group {
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
    outline: none;
}

.island-group:hover {
    transform: translateY(-3px) scale(1.02);
}

.island-wave {
    fill: none;
    pointer-events: none;
}

@keyframes islandRipplePulse {
    0% { opacity: 0.2; transform: scale(0.98); }
    50% { opacity: 0.65; transform: scale(1.02); }
    100% { opacity: 0.2; transform: scale(0.98); }
}

.wave-br {
    stroke: rgba(16, 185, 129, 0.35);
    stroke-width: 1.2px;
    animation: islandRipplePulse 3.5s infinite ease-in-out;
    transform-origin: 560px 100px;
}
.wave-br.wave-2 {
    animation-delay: 1.75s;
    stroke: rgba(16, 185, 129, 0.2);
}

.wave-intl {
    stroke: rgba(168, 85, 247, 0.35);
    stroke-width: 1.2px;
    animation: islandRipplePulse 3.5s infinite ease-in-out 1s;
    transform-origin: 560px 270px;
}
.wave-intl.wave-2 {
    animation-delay: 2.75s;
    stroke: rgba(168, 85, 247, 0.2);
}

.island-body {
    stroke-linejoin: round;
    transition: filter 0.25s ease;
}

.island-br {
    fill: url(#gradIslandBR);
    stroke: #10b981;
    stroke-width: 1.5px;
}

.island-intl {
    fill: url(#gradIslandIntl);
    stroke: #a855f7;
    stroke-width: 1.5px;
}

.island-islet {
    stroke-width: 1px;
}

.island-glass-br {
    fill: rgba(6, 78, 59, 0.88);
    stroke: rgba(16, 185, 129, 0.55);
    stroke-width: 1.2px;
}

.island-glass-intl {
    fill: rgba(59, 7, 100, 0.88);
    stroke: rgba(168, 85, 247, 0.55);
    stroke-width: 1.2px;
}

@keyframes radarPingAnim {
    0% { r: 5; opacity: 1; }
    100% { r: 18; opacity: 0; }
}

.radar-ping {
    animation: radarPingAnim 2.2s infinite cubic-bezier(0, 0.2, 0.8, 1);
}

.island-header {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.island-header-br { fill: #6ee7b7; }
.island-header-intl { fill: #c4b5fd; }

.island-sub {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 8px;
    fill: rgba(226, 232, 240, 0.8);
}

.island-badge-bg {
    fill: rgba(15, 23, 42, 0.75);
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 0.75px;
}

.island-badge-val {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 10px;
    font-weight: 700;
    fill: #ffffff;
}
.badge-val-match { fill: #38bdf8; }

.island-group.active .island-glass-br {
    stroke: #ffffff;
    stroke-width: 2px;
    filter: drop-shadow(0 0 12px rgba(16, 185, 129, 0.9));
}

.island-group.active .island-glass-intl {
    stroke: #ffffff;
    stroke-width: 2px;
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.9));
}

/* ==============================================================================
   TOOLTIP FLUTUANTE
   ============================================================================== */
.geo-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.1rem;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.65);
    color: var(--text-primary);
    font-size: 0.82rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    max-width: 280px;
}
.geo-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
.geo-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.4rem;
    margin-bottom: 0.5rem;
}
.geo-tooltip-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f8fafc;
}
.geo-tooltip-badge {
    background: rgba(99, 102, 241, 0.25);
    color: #a5b4fc;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}
.geo-tooltip-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #cbd5e1;
    margin-bottom: 0.3rem;
}
.geo-tooltip-row b {
    color: #f8fafc;
}
.geo-tooltip-hint {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: #38bdf8;
    text-align: right;
}

/* ==============================================================================
   DRAWER / INSPECTOR LATERAL DE VAGAS DA REGIÃO
   ============================================================================== */
.geo-inspector {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    max-height: 640px;
}

.inspector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.inspector-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 6px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.inspector-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}
.inspector-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.inspector-summary h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.inspector-summary p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.inspector-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
}

.mini-stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}
.mini-stat-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mini-stat-val {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f8fafc;
    margin-top: 0.1rem;
}

.inspector-jobs-list {
    margin-top: 1rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.35rem;
}

.inspector-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.inspector-job-card {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.inspector-job-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-1px);
}

.inspector-job-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.inspector-job-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.35;
    flex: 1;
}

.inspector-job-company {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.inspector-job-badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: center;
}

.inspector-job-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}
.inspector-job-actions .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.74rem;
}

/* ========================================================== */
/* OTIMIZAÇÕES MOBILE & SMARTPHONES (JobHunter Mobile UI)     */
/* ========================================================== */

/* Elementos exclusivos para Mobile/Desktop */
.desktop-nav-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.mobile-drawer {
    display: none;
}
.navbar-mobile-controls {
    display: none;
}
.mobile-drawer-header {
    display: none;
}
.mobile-bottom-nav {
    display: none;
}
.mobile-drawer-backdrop {
    display: none;
}
.mobile-filters-trigger {
    display: none;
}

/* Botão de Menu Hamburguer Móvel */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 9px 8px;
    cursor: pointer;
    z-index: 101;
}
.mobile-menu-toggle .bar {
    width: 100%;
    height: 2.5px;
    background: #f8fafc;
    border-radius: 2px;
    transition: all 0.25s ease;
}

/* Botão de busca rápida no topo mobile */
.btn-mobile-search-trigger {
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: var(--radius-sm);
}

/* Indicador de Arraste (Bottom Sheet Handle) para Modais em Mobile */
.modal-sheet-handle {
    display: none;
    width: 44px;
    height: 5px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    margin: 0.5rem auto 0.25rem auto;
}

/* Media Query: Tablets e Dispositivos Móveis (<= 992px) */
@media (max-width: 992px) {
    .navbar {
        padding: 0.85rem 1.25rem;
    }
    .desktop-nav-actions {
        display: none !important;
    }
    .navbar-mobile-controls {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Gaveta Lateral Deslizante para Smartphones (Direct Child do Body) */
    .mobile-drawer {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 320px !important;
        max-width: 86vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #090d16 !important; /* Fundo sóbrio de alto contraste */
        border-left: 1px solid var(--border-color) !important;
        z-index: 100000 !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -15px 0 35px rgba(0, 0, 0, 0.85);
    }
    .mobile-drawer.open {
        transform: translateX(0) !important;
    }
    .mobile-drawer-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 1.15rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        background: #0f1422;
    }
    .mobile-drawer-user {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    .user-avatar-circle {
        width: 36px;
        height: 36px;
        background: #161f30;
        border: 1px solid #28354d;
        color: #38bdf8;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
        font-weight: 700;
    }
    .mobile-drawer-close {
        font-size: 1.8rem;
        line-height: 1;
        color: var(--text-secondary);
        background: none;
        border: none;
        padding: 0.35rem;
        cursor: pointer;
        transition: color 0.15s;
    }
    .mobile-drawer-close:hover {
        color: #fff;
    }
    .mobile-drawer-items {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem 0.85rem;
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }
    .mobile-drawer-btn {
        display: flex;
        align-items: center;
        gap: 0.85rem;
        background: #111726;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 0.8rem 1rem;
        color: var(--text-primary);
        text-align: left;
        cursor: pointer;
        font-family: inherit;
        width: 100%;
        transition: background 0.15s, border-color 0.15s;
        text-decoration: none;
    }
    .mobile-drawer-btn:active {
        background: #162035;
        border-color: #334155;
    }
    .mobile-drawer-btn .btn-icon {
        font-size: 1.15rem;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        color: #94a3b8;
    }
    .mobile-drawer-btn .btn-text {
        display: flex;
        flex-direction: column;
    }
    .mobile-drawer-btn .btn-text strong {
        font-size: 0.88rem;
        font-weight: 600;
        color: #f8fafc;
    }
    .mobile-drawer-btn .btn-text span {
        font-size: 0.72rem;
        color: #94a3b8;
    }
    .mobile-drawer-btn.primary {
        background: rgba(37, 99, 235, 0.15);
        border-color: rgba(37, 99, 235, 0.5);
    }
    .mobile-drawer-btn.primary .btn-icon {
        color: #60a5fa;
    }
    .mobile-drawer-btn.primary .btn-text strong {
        color: #93c5fd;
    }
    .mobile-drawer-btn.admin {
        border-color: rgba(245, 158, 11, 0.3);
        background: rgba(245, 158, 11, 0.06);
    }
    .mobile-drawer-btn.admin .btn-icon {
        color: #fbbf24;
    }
    .mobile-drawer-btn.logout {
        margin-top: auto;
        border-color: rgba(239, 68, 68, 0.25);
        background: rgba(239, 68, 68, 0.06);
    }
    .mobile-drawer-btn.logout .btn-icon {
        color: #f87171;
    }

    /* Backdrop da gaveta móvel */
    .mobile-drawer-backdrop {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.7) !important;
        z-index: 99999 !important;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .mobile-drawer-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }
    body.mobile-drawer-open {
        overflow: hidden;
    }
}

/* Media Query: Smartphones e Telas Pequenas (<= 768px) */
@media (max-width: 768px) {
    /* Oculta recursos que são exclusivos para computador */
    .desktop-only {
        display: none !important;
    }

    /* Espaçamento inferior no corpo da página para acomodar a barra nativa */
    body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 12px));
    }

    .container {
        margin: 1rem auto;
        padding: 0 0.85rem;
    }

    .logo-area {
        gap: 0.65rem;
    }
    .logo-icon {
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: var(--radius-sm);
    }
    .navbar h1 {
        font-size: 1.12rem;
    }
    .subtitle {
        display: none;
    }
    .badge-user-tag {
        font-size: 0.72rem !important;
        padding: 0.15rem 0.45rem !important;
    }

    /* Barra de Navegação Inferior Nativa (Padrão Mobile App) */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(58px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #090d16;
        border-top: 1px solid var(--border-color);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    }
    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        background: none;
        border: none;
        color: #64748b;
        font-family: inherit;
        font-size: 0.68rem;
        font-weight: 600;
        cursor: pointer;
        padding: 0.3rem 0;
        transition: color 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-nav-item .nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0.15rem;
        transition: transform 0.15s ease;
    }
    .mobile-nav-item.active {
        color: #38bdf8;
    }
    .mobile-nav-item.active .nav-icon {
        transform: translateY(-2px);
    }
    /* Botão Central de Destaque (Buscar) */
    .mobile-nav-item.primary-action .nav-icon-circle {
        width: 44px;
        height: 44px;
        background: var(--accent-blue);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.15rem;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
        margin-top: -16px;
        border: 2px solid #090d16;
    }
    .mobile-nav-item.primary-action .nav-label {
        margin-top: 0.15rem;
        font-weight: 700;
        color: #93c5fd;
    }

    /* Cards de Estatísticas em Grade 2x2 no Smartphone */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
        margin-bottom: 1.15rem;
    }
    .stat-card {
        padding: 0.85rem 1rem;
        border-radius: var(--radius-sm);
    }
    .stat-title {
        font-size: 0.74rem;
        margin-bottom: 0.25rem;
    }
    .stat-value {
        font-size: 1.45rem;
    }

    /* Filtros e Segmentação Recolhíveis no Mobile */
    .filters-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.85rem !important;
        gap: 0.75rem !important;
        margin-bottom: 1.25rem !important;
        border-radius: var(--radius-sm) !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .mobile-filters-trigger {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.25rem 0.15rem 0.6rem 0.15rem !important;
        cursor: pointer !important;
        font-size: 0.88rem !important;
        font-weight: 600 !important;
        color: #f8fafc !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .filters-grid-wrapper {
        display: grid !important;
        grid-template-columns: 1fr !important; /* 1 coluna em celulares para nunca quebrar ou vazar texto */
        gap: 0.65rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    @media (min-width: 520px) and (max-width: 768px) {
        .filters-grid-wrapper {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }
    }
    .filters-grid-wrapper.collapsed {
        display: none !important;
    }
    .filter-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.3rem !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .filter-cv-group {
        grid-column: 1 / -1 !important;
    }
    .filter-btn-group {
        grid-column: 1 / -1 !important;
        margin-top: 0.25rem !important;
    }
    .filter-group label {
        font-size: 0.76rem !important;
        color: var(--text-secondary) !important;
        font-weight: 600 !important;
    }
    select, input[type="text"] {
        font-size: 16px !important; /* Previne auto-zoom indesejado no iOS Safari */
        min-height: 44px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding: 0.55rem 0.65rem !important;
        border-radius: 8px !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        background-color: var(--bg-primary) !important;
        border: 1px solid var(--border-color) !important;
        color: var(--text-primary) !important;
    }
    .filter-btn-group .btn {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    /* Cards de Vagas no Smartphone */
    .job-card {
        padding: 0.95rem;
        border-radius: 12px;
        gap: 0.75rem;
        margin-bottom: 0.85rem;
    }
    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }
    .job-title {
        font-size: 1.05rem;
        line-height: 1.35;
    }
    .job-company {
        font-size: 0.82rem;
    }
    .match-badge {
        align-self: flex-start;
        padding: 0.25rem 0.65rem;
        font-size: 0.78rem;
    }
    .job-details-row {
        gap: 0.4rem;
    }
    .badge {
        font-size: 0.74rem;
        padding: 0.25rem 0.55rem;
    }
    .job-snippet {
        font-size: 0.82rem;
        line-height: 1.5;
    }
    .tags-container {
        gap: 0.35rem;
    }
    .skill-tag {
        font-size: 0.72rem;
        padding: 0.15rem 0.45rem;
    }

    /* Rodapé do Card com Ações em Grid no Mobile */
    .job-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
        padding-top: 0.75rem;
        margin-top: 0.35rem;
    }
    .job-footer-actions-left {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }
    .job-footer-actions-left .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        min-height: 42px;
        font-size: 0.82rem;
    }
    .actions-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }
    .actions-group .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        min-height: 42px;
        font-size: 0.82rem;
        padding: 0.55rem 0.65rem;
    }
    .actions-group > a.btn-primary {
        grid-column: span 2;
    }

    /* Modais como Bottom Sheets Nativas */
    .modal {
        align-items: flex-end;
        padding: 0;
    }
    .modal-sheet-handle {
        display: block;
    }
    .modal-content, .modal-content.large {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 92vh !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        border-bottom: none;
    }
    .modal-header {
        position: sticky;
        top: 0;
        background: var(--bg-card);
        z-index: 10;
        padding: 0.85rem 1.15rem;
        border-bottom: 1px solid var(--border-color);
    }
    .modal-header h2 {
        font-size: 1.15rem;
    }
    .modal-body {
        padding: 1rem 1.15rem;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
    }
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: var(--bg-card);
        z-index: 10;
        padding: 0.85rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border-color);
        flex-direction: column-reverse;
        gap: 0.5rem;
    }
    .modal-footer .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
    .modal-footer div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Presets de Perfil no Modal de Currículos */
    #presetsButtonsContainer {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.45rem;
    }
    #presetsButtonsContainer .btn {
        width: 100%;
        font-size: 0.78rem;
        padding: 0.5rem 0.35rem;
        text-align: center;
        justify-content: center;
    }

    /* Radar Geográfico no Mobile */
    .geo-header-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.95rem;
    }
    .geo-summary-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.65rem;
    }
    .geo-map-card {
        padding: 0.85rem;
    }
    .geo-map-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .map-legend {
        flex-wrap: wrap;
        gap: 0.5rem;
        font-size: 0.72rem;
    }
    #svgMapWrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }
    #svgMapWrapper svg {
        min-width: 320px;
        max-width: 100%;
        height: auto;
    }
    .geo-inspector {
        position: static;
        width: 100%;
        margin-top: 1rem;
        max-height: none;
    }
}

