/* ========================================================
   DESIGN SYSTEM - ATS FKR CONSULTORIA
   Estilo Corporativo Premium: Moderno, Responsivo e Limpo
   ======================================================== */

:root {
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: #ecfdf5;
    
    --secondary: #0d9488;
    --secondary-hover: #0f766e;

    --success: #10b981;
    --success-light: #ecfdf5;

    --warning: #f59e0b;
    --warning-light: #fffbeb;

    --danger: #ef4444;
    --danger-light: #fef2f2;

    --dark: #0a192f;
    --dark-surface: #112240;
    --text-primary: #0a192f;
    --text-muted: #334e68;
    --text-light: #64748b;

    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
}

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

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

/* ========================================================
   ADMIN LAYOUT (SIDEBAR + MAIN CONTENT + HEADER)
   ======================================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark);
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-badge {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.4);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.nav-section-title {
    color: var(--text-light);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 12px 12px 6px;
    opacity: 0.8;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #94a3b8;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 13.5px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary) 0%, #10b981 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: white;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 11px;
    color: var(--text-light);
}

/* App Main Body */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    max-width: calc(100vw - var(--sidebar-width));
    width: calc(100% - var(--sidebar-width));
    overflow-x: hidden;
}

.app-header {
    height: var(--header-height);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title-box h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.header-title-box p {
    font-size: 12.5px;
    color: var(--text-muted);
}

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

.app-content {
    flex: 1;
    padding: 28px 32px 40px;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* ========================================================
   COMPONENTS: CARDS, BUTTONS, BADGES, TABLES
   ======================================================== */

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px 24px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* KPI Stat Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.kpi-icon.indigo { background: #e0e7ff; color: #4338ca; }
.kpi-icon.emerald { background: #d1fae5; color: #059669; }
.kpi-icon.amber { background: #fef3c7; color: #d97706; }
.kpi-icon.rose { background: #ffe4e6; color: #e11d48; }
.kpi-icon.cyan { background: #cffafe; color: #0891b2; }

.kpi-info .kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-info .kpi-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.1;
    margin-top: 4px;
}

.kpi-info .kpi-subtext {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-secondary:hover {
    background-color: #e2e8f0;
    color: var(--dark);
}

.btn-success {
    background-color: var(--success);
    color: white;
}
.btn-success:hover {
    background-color: #059669;
    color: white;
}

.btn-emerald {
    background-color: #059669;
    color: white !important;
    border: 1px solid #047857;
}
.btn-emerald:hover {
    background-color: #047857;
    color: white !important;
    border-color: #065f46;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.35);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
}

.badge-success { background: var(--success-light); color: #047857; }
.badge-warning { background: var(--warning-light); color: #b45309; }
.badge-danger  { background: var(--danger-light); color: #b91c1c; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-neutral { background: #f1f5f9; color: #475569; }
.badge-indigo  { background: #eef2ff; color: #4338ca; }
.badge-cyan    { background: #ecfeff; color: #0e7490; }
.badge-amber   { background: #fffbeb; color: #b45309; }

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

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13.5px;
    vertical-align: middle;
}

.custom-table tr:hover td {
    background-color: #f8fafc;
}

/* Formulários */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 13.5px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* Autocomplete de Cidades & Estados */
.city-suggestions-dropdown {
    position: absolute;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    margin-top: 4px;
}

.city-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease, color 0.15s ease;
}

.city-suggestion-item:last-child {
    border-bottom: none;
}

.city-suggestion-item:hover,
.city-suggestion-item.active {
    background-color: #f8fafc;
    color: var(--primary);
    font-weight: 500;
}

.state-tag {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    background: #e2e8f0;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

/* Alertas */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger  { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }

/* ========================================================
   KANBAN BOARD ESPECÍFICO
   ======================================================== */

.kanban-board-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    box-sizing: border-box;
    overflow: visible;
}

.kanban-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 24px;
    padding-top: 4px;
    min-height: calc(100vh - 220px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Suporte Firefox para barra de rolagem horizontal */
    scrollbar-width: thin;
    scrollbar-color: #059669 #e2e8f0;
}

/* Barra de Rolagem Horizontal Destacada e Ergonômica (Chrome, Edge, Safari, Opera) */
.kanban-container::-webkit-scrollbar {
    height: 14px;
    display: block;
}

.kanban-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 99px;
    border: 1px solid #cbd5e1;
    margin: 0 4px;
}

.kanban-container::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
    border-radius: 99px;
    border: 3px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.kanban-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #047857 0%, #059669 100%);
}

.kanban-container::-webkit-scrollbar-thumb:active {
    background: #065f46;
}

.kanban-column {
    flex: 0 0 320px;
    background-color: #f1f5f9;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 210px);
    border: 1px solid #e2e8f0;
}

.kanban-column-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.kanban-column-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-column-tag {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.kanban-count-badge {
    background-color: #e2e8f0;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.kanban-cards-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
}

.kanban-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: all 0.2s ease;
    user-select: none;
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.kanban-card:active {
    cursor: grabbing;
}

.card-candidate-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.candidate-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669, #0d9488);
    color: white;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.candidate-name-box h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.candidate-seniority {
    font-size: 11px;
    color: var(--text-muted);
}

.card-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
    color: var(--text-muted);
}

.card-score-badge {
    background: #ecfdf5;
    color: #059669;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-days-badge {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-days-badge.warning {
    color: #d97706;
    font-weight: 700;
}

/* Dragging Sortable state */
.sortable-ghost {
    opacity: 0.4;
    background-color: #ecfdf5 !important;
    border: 2px dashed #059669 !important;
}

.sortable-chosen {
    box-shadow: var(--shadow-lg);
}

/* ========================================================
   MODAL DE DETALHES & AÇÕES RÁPIDAS
   ======================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 24px;
}

/* ========================================================
   COMPONENTES E UTILITÁRIOS RESPONSIVOS
   ======================================================== */

.mobile-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--dark);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s;
}

.sidebar-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

body.sidebar-open {
    overflow: hidden;
}

/* Menus Públicos e de Candidatos */
.public-nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Grids e Cabeçalhos Adaptativos */
.responsive-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.dashboard-grid-sidebar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

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

.candidate-profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.hero-search-form {
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

/* Kanban Mobile Enhancements */
.kanban-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

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

.kanban-vaga-select {
    min-width: 240px;
    max-width: 420px;
}

.kanban-sla-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.kanban-nav-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.kanban-stage-selector {
    display: flex;
    align-items: center;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
}

.kanban-stage-selector::-webkit-scrollbar {
    display: none;
}

.kanban-stage-pill {
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.kanban-stage-pill:hover, .kanban-stage-pill:active, .kanban-stage-pill.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 2px 5px rgba(5, 150, 105, 0.2);
}

.kanban-scroll-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-kanban-scroll {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-kanban-scroll:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.btn-kanban-scroll:active {
    transform: scale(0.95);
}

.responsive-container {
    width: 100%;
    box-sizing: border-box;
}

/* ========================================================
   BREAKPOINTS DE RESPONSIVIDADE
   ======================================================== */

/* Dispositivos Médios / Tablets e Laptops Menores (<= 1200px) */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets e Telas Menores (<= 992px) */
@media (max-width: 992px) {
    .mobile-toggle-btn {
        display: inline-flex;
    }

    .sidebar-close-btn {
        display: inline-flex;
    }

    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
        width: 100%;
    }

    .app-header {
        padding: 10px 16px;
        min-height: var(--header-height);
        height: auto;
    }

    .app-content {
        padding: 16px;
    }

    .dashboard-grid-sidebar,
    .dashboard-grid-2,
    .job-details-grid,
    .candidate-profile-grid {
        grid-template-columns: 1fr;
    }

    .form-grid-2, 
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .form-grid-2 > *,
    .form-grid-3 > * {
        grid-column: span 1 !important;
    }

    .kanban-stage-selector {
        display: flex;
    }

    .kanban-vaga-select {
        max-width: 100%;
        width: 100%;
    }

    .kanban-filter-controls {
        width: 100%;
    }

    .kanban-sla-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Dispositivos Móveis e Smartphones Maiores (<= 768px) */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    /* Menu de Navegação Superior em Mobile */
    .public-nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 16px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        display: none;
        z-index: 99;
    }

    .public-nav-menu.show {
        display: flex;
        animation: navSlideDown 0.2s ease-out;
    }

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

    .public-nav-menu a, 
    .public-nav-menu .btn {
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    /* Formulário de Busca da Hero */
    .hero-search-form {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .hero-search-form > div {
        width: 100%;
    }

    .hero-search-form .form-control {
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-sm);
    }

    .hero-search-form .form-select {
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-sm);
    }

    .hero-search-form .btn {
        width: 100%;
    }

    /* Cabeçalho da Vaga */
    .job-header-action-box {
        text-align: left !important;
        width: 100%;
        margin-top: 14px;
    }

    .job-header-action-box .btn {
        width: 100%;
        justify-content: center;
    }

    /* Vitrine de Vagas */
    .jobs-grid {
        grid-template-columns: 1fr;
    }

    /* Filtros Administrativos */
    .filter-bar-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar-form > div,
    .filter-bar-form .form-control,
    .filter-bar-form .form-select,
    .filter-bar-form .btn {
        width: 100% !important;
        min-width: 100% !important;
        flex: none !important;
    }

    /* KPIs em coluna única */
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Kanban Horizontal Snap Scroll */
    .kanban-container {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 24px;
        padding-left: 2px;
        padding-right: 2px;
    }

    .kanban-column {
        flex: 0 0 85vw;
        min-width: 85vw;
        max-width: 85vw;
        scroll-snap-align: center;
        max-height: calc(100vh - 240px);
    }

    /* Modal Mobile */
    .modal-content {
        width: 95%;
        max-height: 92vh;
        margin: 10px;
    }

    .modal-header {
        padding: 16px 18px;
    }

    .modal-body {
        padding: 16px 18px;
    }

    /* Ajustes Gerais de Tipografia e Cartões */
    .card {
        padding: 18px !important;
    }

    .responsive-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .responsive-page-header > div:last-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .responsive-page-header .btn {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}

/* Smartphones Compactos (<= 480px) */
@media (max-width: 480px) {
    body {
        font-size: 13.5px;
    }

    .app-header {
        height: 60px;
    }

    .header-title-box h1 {
        font-size: 16px;
    }

    .header-title-box p {
        display: none;
    }

    .kanban-column {
        flex: 0 0 88vw;
        min-width: 88vw;
        max-width: 88vw;
    }

    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .btn-lg {
        padding: 10px 16px;
        font-size: 14px;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
}


/* ========================================================
   ASSISTENTE DE INTELIGÊNCIA ARTIFICIAL - SOFIA (FKR ATS)
   ======================================================== */

.sofia-fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1040;
}

.sofia-fab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px 8px 10px;
    background: linear-gradient(135deg, var(--primary, #059669) 0%, #10b981 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 25px -4px rgba(5, 150, 105, 0.45), 0 4px 6px -2px rgba(5, 150, 105, 0.2);
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.sofia-fab-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px -4px rgba(5, 150, 105, 0.55), 0 6px 12px -2px rgba(5, 150, 105, 0.3);
}

.sofia-fab-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: #ffffff;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.sofia-fab-online-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 11px;
    height: 11px;
    background-color: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 6px #22c55e;
}

.sofia-fab-label {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.sofia-fab-name {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.sofia-fab-desc {
    font-size: 11px;
    opacity: 0.92;
    font-weight: 500;
}

/* Janela do Chat / Drawer */
.sofia-drawer {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 610px;
    max-height: calc(100vh - 110px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.sofia-drawer.sofia-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Header */
.sofia-header {
    background: linear-gradient(135deg, #0a192f 0%, #1e293b 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--primary, #059669);
}

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

.sofia-avatar-wrapper {
    position: relative;
}

.sofia-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary, #059669) 0%, #10b981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.35);
}

.sofia-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border: 2px solid #0a192f;
    border-radius: 50%;
}

.sofia-header-info {
    display: flex;
    flex-direction: column;
}

.sofia-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sofia-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.sofia-badge-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.3px;
}

.sofia-status-text {
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

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

.sofia-btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sofia-btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Pílulas de Ações Rápidas (Chips) */
.sofia-chips-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

.sofia-chips-bar::-webkit-scrollbar {
    height: 4px;
}

.sofia-chips-bar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.sofia-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334e68;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sofia-chip:hover {
    background: var(--primary-light, #ecfdf5);
    border-color: var(--primary, #059669);
    color: var(--primary, #059669);
    transform: translateY(-1px);
}

/* Área de Mensagens */
.sofia-messages-area {
    flex: 1;
    padding: 18px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #ffffff;
    scrollbar-width: thin;
}

.sofia-messages-area::-webkit-scrollbar {
    width: 6px;
}

.sofia-messages-area::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.sofia-msg {
    display: flex;
    gap: 10px;
    max-width: 92%;
    animation: sofiaFadeIn 0.25s ease-out;
}

@keyframes sofiaFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.sofia-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.sofia-msg-assistant {
    align-self: flex-start;
}

.sofia-bubble-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #059669) 0%, #10b981 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.sofia-bubble-content {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.55;
    position: relative;
    word-break: break-word;
}

.sofia-msg-assistant .sofia-bubble-content {
    background: #f1f5f9;
    color: #0f172a;
    border-top-left-radius: 4px;
    border: 1px solid #e2e8f0;
}

.sofia-msg-user .sofia-bubble-content {
    background: var(--primary, #059669);
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.sofia-bubble-content p {
    margin: 0 0 8px 0;
}

.sofia-bubble-content p:last-of-type {
    margin-bottom: 0;
}

.sofia-list {
    margin: 6px 0 8px 18px;
    padding: 0;
}

.sofia-list li {
    margin-bottom: 4px;
}

.sofia-line-gap {
    height: 8px;
}

.sofia-inline-code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
}

.sofia-semaphore-dot {
    display: inline-block;
    margin-right: 2px;
}

.sofia-msg-time {
    font-size: 10.5px;
    margin-top: 6px;
    opacity: 0.7;
    text-align: right;
}

.sofia-msg-user .sofia-msg-time {
    color: rgba(255, 255, 255, 0.85);
}

/* Indicador de Digitação */
.sofia-typing-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sofia-typing-bubble {
    background: #f1f5f9;
    padding: 12px 18px;
    border-radius: 14px;
    border-top-left-radius: 4px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sofia-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--primary, #059669);
    animation: sofiaBounce 1.4s infinite ease-in-out both;
}

.sofia-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.sofia-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes sofiaBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Footer / Input */
.sofia-footer {
    padding: 12px 16px 14px 16px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.sofia-input-container {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 6px 8px 6px 14px;
    transition: all 0.2s ease;
}

.sofia-input-container:focus-within {
    border-color: var(--primary, #059669);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.sofia-textarea {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    color: #0f172a;
    resize: none;
    max-height: 120px;
    line-height: 1.45;
    padding: 6px 0;
    font-family: inherit;
}

.sofia-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary, #059669);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sofia-send-btn:hover:not(:disabled) {
    background: var(--primary-hover, #047857);
    transform: scale(1.05);
}

.sofia-send-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.sofia-disclaimer {
    margin-top: 6px;
    text-align: center;
    font-size: 10.5px;
    color: #94a3b8;
}

.sofia-disclaimer kbd {
    background: #e2e8f0;
    color: #475569;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 9.5px;
}

/* Responsividade para telas mobile */
@media (max-width: 576px) {
    .sofia-fab-container {
        bottom: 16px;
        right: 16px;
    }

    .sofia-drawer {
        bottom: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        height: calc(100vh - 24px);
        max-height: none;
        border-radius: 16px;
    }

    .sofia-fab-btn {
        padding: 8px 14px 8px 8px;
    }

    .sofia-fab-desc {
        display: none;
    }
}
