﻿@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    color-scheme: light;
    --bg: #f4f5fb;
    --surface: #ffffff;
    --surface-soft: #f0f0f8;
    --surface-strong: #e2e2f0;
    --text: #0f0d1e;
    --muted: #64648a;
    --primary: #4f46e5;
    --primary-strong: #4338ca;
    --primary-soft: #ede9fe;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar: #13111e;
    --border: #dbd9f0;
    --shadow: 0 14px 35px rgba(79, 70, 229, 0.09);
    --radius: 12px;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    --gradient-cta: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d0c1d;
    --surface: #13111e;
    --surface-soft: #1a1830;
    --surface-strong: #2d2b45;
    --text: #f0efff;
    --muted: #a8a4cc;
    --primary: #818cf8;
    --primary-strong: #a5b4fc;
    --primary-soft: #1e1b4b;
    --sidebar: #0a091a;
    --border: #2d2b45;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] option {
    background: var(--surface);
    color: var(--text);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.6; }
.oculto { display: none !important; }
.contenedor { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.contenedor-fluido { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); }
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.nav-izq, .nav-der { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.logo-nav { text-decoration: none; font-size: 1.55rem; font-weight: 800; color: var(--text); }
.logo-nav .destaque { color: var(--primary); }
.nav-link { text-decoration: none; color: var(--muted); font-weight: 600; }
.nav-link:hover, .nav-link.activo { color: var(--primary); }
.nav-link-borde, .btn-ingresar, .btn-publicar, .btn-publicar-dash, .btn-buscar-accion { border: 0; border-radius: var(--radius); font-weight: 700; text-decoration: none; transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease; }
.nav-link-borde { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; color: var(--primary); border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border)); background: transparent; }
.nav-link-borde:hover { background: var(--primary-soft); }
.nav-link-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.btn-ingresar, .btn-publicar, .btn-publicar-dash, .btn-buscar-accion { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 0 22px; background: var(--primary); color: #fff; }
.btn-ingresar { background: var(--text); color: var(--surface); }
.btn-publicar, .btn-publicar-dash { width: 100%; min-height: 48px; }
.btn-success { background: var(--success); }
.btn-icon { width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text); font-weight: 800; }
.btn-buscar-accion:hover, .btn-publicar:hover, .btn-publicar-dash:hover, .btn-ingresar:hover { transform: translateY(-1px); background: var(--primary-strong); }

.hero-empleoplus { padding: 82px 0 72px; text-align: center; background: linear-gradient(180deg, var(--surface), var(--bg)); min-height: calc(100vh - 72px); display: flex; align-items: center; transition: min-height 0.3s ease; }
.hero-empleoplus.resultados-visibles { min-height: auto; padding: 40px 0 32px; }
.hero-contenido { display: grid; gap: 22px; justify-items: center; width: 100%; }
.hero-contenido.centrado { margin: 0 auto; }
.hero-titulo { max-width: 840px; font-size: clamp(2.25rem, 6vw, 4.25rem); line-height: 1.04; font-weight: 850; letter-spacing: 0; }
.texto-gradiente { background: linear-gradient(90deg, var(--primary), #14b8a6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitulo { color: var(--muted); font-size: 1.15rem; }
.buscador-caja { width: min(920px, 100%); display: grid; grid-template-columns: 1fr 1px 1fr 1px minmax(145px, 0.75fr) auto; align-items: center; gap: 0; margin-top: 12px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.input-seccion { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; }
.input-seccion input, .control-transparente { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.input-seccion input::placeholder { color: var(--muted); }
.separador { width: 1px; height: 32px; background: var(--border); }

.contenido-publico { padding: 38px 0 56px; }
.contenido-busqueda { padding: 40px 0 60px; }

/* Header de búsqueda */
.busqueda-header { margin-bottom: 32px; }
.busqueda-header h1 { font-size: 2rem; margin-bottom: 8px; }
.busqueda-header p { color: var(--muted); font-size: 1.1rem; }

/* Layout de búsqueda */
.busqueda-layout { display: grid; grid-template-columns: 240px 1fr 420px; gap: 16px; }
.busqueda-filtros { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; height: fit-content; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.busqueda-filtros h3 { margin-bottom: 16px; font-size: 0.95rem; color: #1f2937; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.filtro-grupo { margin-bottom: 16px; }
.filtro-label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.85rem; color: #6b7280; }
.filtro-grupo .form-control { width: 100%; padding: 8px 10px; font-size: 0.9rem; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; }
.filtro-grupo .form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); }
.btn-aplicar-filtros { width: 100%; margin-top: 12px; padding: 10px; font-size: 0.9rem; background: var(--primary); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; }
.btn-aplicar-filtros:hover { background: var(--primary-strong); }

.busqueda-resultados { display: flex; flex-direction: column; }
.lista-vacantes-busqueda { display: flex; flex-direction: column; gap: 6px; }
.vacante-item-busqueda { background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; padding: 14px 16px; cursor: pointer; transition: all 0.15s; border-left: 4px solid transparent; }
.vacante-item-busqueda:hover { border-color: #d1d5db; border-left-color: var(--primary); background: #f9fafb; }
.vacante-item-busqueda.seleccionado { border-color: var(--primary); border-left-color: var(--primary); background: #eff6ff; }
.vacante-item-busqueda h4 { color: #1f2937; margin-bottom: 4px; font-size: 0.95rem; font-weight: 600; }
.vacante-item-busqueda .empresa { color: #6b7280; font-size: 0.85rem; margin-bottom: 3px; }
.vacante-item-busqueda .ubicacion { color: #9ca3af; font-size: 0.8rem; }
.vacante-item-busqueda .sueldo { color: #059669; font-weight: 600; font-size: 0.85rem; margin-top: 6px; }

.busqueda-detalle { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 24px; height: fit-content; position: sticky; top: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.detalle-vacio { text-align: center; color: #9ca3af; padding: 80px 20px; }
.detalle-contenido h3 { color: #1f2937; font-size: 1.25rem; margin-bottom: 8px; font-weight: 600; }
.detalle-contenido .empresa-badge { display: inline-block; background: #eff6ff; color: var(--primary); padding: 4px 12px; border-radius: 16px; font-size: 0.8rem; font-weight: 500; margin-bottom: 12px; }
.detalle-contenido .detalle-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; padding: 16px; background: #f9fafb; border-radius: 8px; border: 1px solid #e5e7eb; }
.detalle-contenido .info-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #6b7280; }
.detalle-contenido .descripcion { color: #4b5563; line-height: 1.7; margin-bottom: 20px; font-size: 0.9rem; }
.detalle-contenido .descripcion h4 { color: #1f2937; font-size: 0.95rem; font-weight: 600; margin-bottom: 8px; }
.detalle-contenido .btn-aplicar-detalle { width: 100%; padding: 12px; font-size: 0.95rem; background: var(--primary); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; }
.detalle-contenido .btn-aplicar-detalle:hover { background: var(--primary-strong); }
.btn-cerrar-detalle { display: none; }

@media (max-width: 1024px) {
    .busqueda-layout { grid-template-columns: 1fr; }
    .busqueda-detalle { display: none; }
    .busqueda-detalle.visible { display: block; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000; overflow-y: auto; }
}
.section-heading, .dash-header { margin-bottom: 22px; }
.section-heading h2, .dash-header h2 { font-size: 1.8rem; margin-bottom: 6px; }
.section-heading p, .dash-header p, .modal-subtitulo { color: var(--muted); }
.grid-vacantes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.tarjeta-vacante, .tarjeta-resumen, .tarjeta-candidato-dash, .tarjeta-entrevista, .empty-state, .panel-lista, .tabla-empleos { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05); }
.tarjeta-vacante { padding: 20px; border-left: 5px solid var(--primary); display: grid; gap: 12px; }
.tarjeta-vacante:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-top h3 { color: var(--primary); font-size: 1.12rem; }
.card-meta { display: grid; gap: 5px; color: var(--muted); font-size: 0.92rem; }
.card-description { color: var(--muted); line-height: 1.5; border-top: 1px dashed var(--border); padding-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badge, .badge-estado { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 4px 10px; font-size: 0.78rem; font-weight: 800; }
.badge { color: var(--primary); background: var(--primary-soft); border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border)); }
.badge-success { color: #047857; background: #d1fae5; }
.badge-danger { color: #b91c1c; background: #fee2e2; }
.badge-warning { color: #92400e; background: #fef3c7; }
.btn-aplicar { width: fit-content; margin-top: 4px; padding: 10px 16px; border-radius: var(--radius); background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; }

.dashboard-contenedor { display: flex; min-height: calc(100vh - 72px); }
.dashboard-sidebar { flex: 0 0 280px; background: var(--sidebar); color: #f8fafc; padding: 28px 22px; }
.menu-lateral { list-style: none; display: grid; gap: 8px; margin-top: 24px; }
.tab-btn { width: 100%; text-align: left; border: 0; border-radius: var(--radius); padding: 12px 14px; background: transparent; color: #cbd5e1; font-weight: 700; }
.tab-btn:hover, .tab-btn.activo { background: rgba(255, 255, 255, 0.1); color: #fff; }
.dashboard-main { flex: 1; min-width: 0; padding: clamp(24px, 5vw, 58px); }
.dashboard-resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.tarjeta-resumen { padding: 20px; }
.tarjeta-resumen h4 { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; }
.tarjeta-resumen p { margin-top: 8px; font-size: 2rem; font-weight: 850; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--radius); }
.tabla-empleos { width: 100%; border-collapse: collapse; min-width: 760px; overflow: hidden; }
.tabla-empleos th, .tabla-empleos td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabla-empleos th { background: var(--surface-soft); color: var(--muted); font-size: 0.9rem; }
.estado-linea { display: inline-flex; align-items: center; gap: 8px; }
.estado-punto { width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.acciones { display: flex; align-items: center; gap: 4px; }
.action-icon-btn {
    width: 30px; height: 30px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}
.action-icon-btn:hover { background: var(--surface-soft); color: var(--text); }
.action-icon-btn.warning { color: #d97706; }
.action-icon-btn.warning:hover { background: #fef3c7; border-color: #fbbf24; color: #b45309; }
.action-icon-btn.danger { color: #dc2626; }
.action-icon-btn.danger:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.action-icon-btn.info { color: #6366f1; }
.action-icon-btn.info:hover { background: #ede9fe; border-color: #a5b4fc; color: #4f46e5; }
html[data-theme="dark"] .action-icon-btn.warning:hover { background: rgba(245,158,11,0.15); border-color: #b45309; }
html[data-theme="dark"] .action-icon-btn.danger:hover  { background: rgba(220,38,38,0.15);  border-color: #b91c1c; }
html[data-theme="dark"] .action-icon-btn.info:hover    { background: rgba(99,102,241,0.15); border-color: #6366f1; }
.btn-text { border: 0; background: transparent; color: var(--primary); font-weight: 800; }
.btn-text.warning { color: var(--warning); }
.btn-text.danger { color: var(--danger); }
.stack-list { display: grid; gap: 14px; }
.tarjeta-candidato-dash, .tarjeta-entrevista { padding: 18px; display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.card-title { font-size: 1.08rem; margin-bottom: 4px; }
.card-subtitle { color: var(--primary); font-weight: 750; margin-bottom: 6px; }
.card-muted { color: var(--muted); font-size: 0.92rem; }
.candidate-actions { display: grid; gap: 8px; justify-items: end; }
.select-compact { min-width: 150px; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.entrevistas-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.filtro-panel { display: grid; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.filtro-item { text-align: left; padding: 13px 15px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--muted); font-weight: 700; }
.filtro-item.activo { color: var(--text); border-left: 3px solid var(--primary); background: var(--surface-soft); }
.panel-lista { padding: 18px; }
.empty-state { padding: 34px 20px; color: var(--muted); text-align: center; display:flex; flex-direction:column; align-items:center; }
.empty-state p { font-size:0.92rem; max-width:320px; line-height:1.6; }

.modal-fondo { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(2, 6, 23, 0.62); backdrop-filter: blur(8px); }
.modal-contenido { position: relative; width: min(470px, 100%); max-height: min(92vh, 760px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 34px; box-shadow: var(--shadow); }
.cerrar-modal { position: absolute; right: 16px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.8rem; line-height: 1; }
.form-stack { display: grid; gap: 14px; margin-top: 18px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-control { width: 100%; min-height: 46px; padding: 12px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); outline: 0; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
textarea.form-control { resize: vertical; line-height: 1.45; }
.form-label { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 700; margin-bottom: 6px; }
.seccion-titulo { font-size: 1.4rem; font-weight: 800; margin: 0; }
.separador-texto { margin: 18px 0; color: var(--muted); text-align: center; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-weight: 700; }
.icono-google { width: 20px; height: 20px; }
.auth-switch { margin-top: 18px; text-align: center; color: var(--muted); }
.auth-switch a { margin-left: 5px; color: var(--primary); font-weight: 800; text-decoration: none; }

.app-loader { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }
.spinner { width: 18px; height: 18px; border: 3px solid var(--surface-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
.toast-container { position: fixed; right: 18px; top: 88px; z-index: 130; display: grid; gap: 10px; width: min(360px, calc(100% - 36px)); }
.toast { padding: 13px 15px; border-radius: var(--radius); color: #fff; box-shadow: var(--shadow); animation: toastIn 0.18s ease-out; }
.toast.info { background: var(--primary); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: #111827; }
.loading-row, .loading-card { color: var(--muted); text-align: center; padding: 28px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
    .navbar { align-items: flex-start; flex-direction: column; padding: 14px 0; }
    .nav-izq, .nav-der { width: 100%; gap: 12px; }
    .nav-der { justify-content: flex-start; }
    .buscador-caja { grid-template-columns: 1fr; gap: 8px; }
    .separador { display: none; }
    .input-seccion { border: 1px solid var(--border); border-radius: var(--radius); }
    .btn-buscar-accion { width: 100%; }
    .dashboard-contenedor { flex-direction: column; }
    .dashboard-sidebar { flex: none; width: 100%; }
    .menu-lateral { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-resumen { grid-template-columns: 1fr; }
    .entrevistas-layout { grid-template-columns: 1fr; }
    .filtro-panel { grid-template-columns: repeat(3, 1fr); }
    .filtro-item { text-align: center; border-bottom: 0; border-right: 1px solid var(--border); }
    .tarjeta-candidato-dash, .tarjeta-entrevista { align-items: flex-start; flex-direction: column; }
    .candidate-actions { justify-items: start; width: 100%; }
}

@media (max-width: 560px) {
    .hero-empleoplus { padding: 52px 0 44px; }
    .nav-link-borde, .btn-ingresar { padding: 0 13px; }
    .modal-contenido { padding: 28px 20px; }
    .form-grid-2, .menu-lateral, .filtro-panel { grid-template-columns: 1fr; }
    .card-top { flex-direction: column; }
}

/* Nuevos estilos para funcionalidades avanzadas */
.acciones-rapidas { display: flex; gap: 10px; margin-bottom: 16px; }
.btn-secondary { min-height: 38px; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-weight: 600; }
.btn-secondary:hover { background: var(--surface-soft); }

.filtros-candidatos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }
.filtro-input, .filtro-select { min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }

.modal-grande { max-width: 900px; width: 90%; max-height: 90vh; overflow-y: auto; }

/* Plantillas */
.plantillas-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.plantillas-lista { border-right: 1px solid var(--border); padding-right: 20px; }
.plantilla-item { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; cursor: pointer; transition: all 0.2s; }
.plantilla-item:hover { border-color: var(--primary); background: var(--surface-soft); }
.plantilla-item h4 { margin-bottom: 5px; }
.plantilla-item p { color: var(--muted); font-size: 0.9rem; }
.plantilla-acciones { display: flex; gap: 8px; margin-top: 10px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* Estadísticas */
.estadisticas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.estadistica-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-soft); text-align: center; }
.estadistica-valor { font-size: 2rem; font-weight: 800; color: var(--primary); margin: 8px 0; }
.estadistica-sub { color: var(--muted); font-size: 0.9rem; }
.estadisticas-grafico { margin: 24px 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); }
.grafico-barras { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding-top: 20px; }
.grafico-barra { flex: 1; background: var(--primary); border-radius: 4px 4px 0 0; transition: height 0.3s; position: relative; min-height: 4px; }
.grafico-barra:hover { background: var(--primary-strong); }
.grafico-barra span { position: absolute; bottom: -25px; left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.grafico-barra .valor { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 0.8rem; font-weight: 700; }
.estadisticas-exportar { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* Pipeline Kanban */
.pipeline-container { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; min-height: 400px; }
.pipeline-column { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-soft); }
.pipeline-column h3 { text-align: center; margin-bottom: 12px; font-size: 0.9rem; color: var(--muted); }
.pipeline-cards { min-height: 300px; }
.pipeline-card { padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; cursor: grab; transition: all 0.2s; }
.pipeline-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.pipeline-card:active { cursor: grabbing; }
.pipeline-card h4 { font-size: 0.9rem; margin-bottom: 4px; }
.pipeline-card p { font-size: 0.8rem; color: var(--muted); }
.pipeline-card.dragging { opacity: 0.5; }

/* Calendario */
.calendario-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.calendario-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 8px; }
.cal-dia-header { text-align: center; font-weight: 700; color: var(--muted); font-size: 0.85rem; padding: 8px; }
.calendario-dias { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dia { min-height: 80px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cal-dia.hoy { border-color: var(--primary); background: var(--primary-soft); }
.cal-dia.otro-mes { opacity: 0.3; }
.cal-dia-numero { font-weight: 700; margin-bottom: 4px; }
.cal-evento { padding: 4px 6px; background: var(--primary); color: #fff; border-radius: 4px; font-size: 0.75rem; margin-bottom: 2px; cursor: pointer; }
.cal-evento:hover { background: var(--primary-strong); }

/* Comunicación */
.btn-comunicar { padding: 6px 12px; font-size: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.btn-comunicar:hover { background: var(--surface-soft); border-color: var(--primary); }

/* Etiquetas de candidato */
.etiqueta { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; margin-right: 4px; }
.etiqueta-senior { background: var(--success); color: #fff; }
.etiqueta-promedio { background: var(--warning); color: #111827; }
.etiqueta-junior { background: var(--primary); color: #fff; }

/* Calificación de estrellas */
.calificacion { color: var(--warning); font-size: 1rem; }
.calificacion .vacia { color: var(--surface-strong); }

/* Responsive para nuevos componentes */
@media (max-width: 900px) {
    .plantillas-layout { grid-template-columns: 1fr; }
    .plantillas-lista { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 20px; }
    .pipeline-container { grid-template-columns: repeat(3, 1fr); }
    .estadisticas-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .pipeline-container { grid-template-columns: 1fr; }
    .estadisticas-grid { grid-template-columns: 1fr; }
    .filtros-candidatos { grid-template-columns: 1fr; }
    .acciones-rapidas { flex-direction: column; }
    .calendario-grid, .calendario-dias { gap: 2px; }
    .cal-dia { min-height: 60px; padding: 4px; }
}

/* ── Modal de confirmación ───────────────────────────────── */
.modal-confirmar-caja { max-width: 380px; text-align: center; padding: 40px 32px; }
.confirmar-icono { margin-bottom: 16px; }
.confirmar-acciones { display: flex; gap: 10px; justify-content: center; }
.btn-confirmar-danger { min-height: 42px; padding: 0 22px; background: var(--danger); color: #fff; border: 0; border-radius: var(--radius); font-weight: 700; cursor: pointer; transition: opacity 0.15s; }
.btn-confirmar-danger:hover { opacity: 0.88; }

/* ── Badges de candidatos en tabla ───────────────────────── */
.count-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.count-badge-primary { background: var(--primary-soft); color: var(--primary); }
.count-badge-empty { background: var(--surface-soft); color: var(--muted); font-weight: 400; }

/* ── Estado badges en tabla ──────────────────────────────── */
.estado-badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.estado-activa { background: #d1fae5; color: #047857; }
.estado-inactiva { background: var(--surface-soft); color: var(--muted); }
html[data-theme="dark"] .estado-activa { background: #064e3b; color: #6ee7b7; }

/* ── Badge experiencia/tipo en tabla ─────────────────────── */
.badge-exp { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 3px 8px; font-size: 0.72rem; font-weight: 700; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--border); }

/* ── btn-text variantes ──────────────────────────────────── */
.btn-text.info { color: var(--primary); }

/* ── Fecha de cierre en formulario ───────────────────────── */
#pub-fecha-cierre { min-height: 46px; }

/* ── Filtros de estado en tabla de vacantes ──────────────── */
.filtro-estado-btn {
    padding: 5px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
    border: 1px solid var(--border); background: var(--surface); color: var(--muted);
    cursor: pointer; transition: all 0.15s;
}
.filtro-estado-btn:hover { border-color: var(--primary); color: var(--primary); }
.filtro-estado-btn.activo { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Módulo empresa: banner portada ─────────────────────── */
.preview-banner-wrap {
    height: 110px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #7c3aed 100%);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    flex-shrink: 0;
}
.preview-banner-wrap img {
    width: 100%; height: 100%; object-fit: cover;
    position: absolute; inset: 0;
}
.portada-thumb {
    width: 140px; height: 60px;
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #7c3aed 100%);
    position: relative; overflow: hidden;
    cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: border-color 0.15s;
}
.portada-thumb:hover { border-color: var(--primary); }
.portada-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.portada-thumb-label {
    font-size: 0.7rem; color: rgba(255,255,255,0.85); font-weight: 500;
    position: relative; z-index: 1; text-align: center; line-height: 1.3;
}

/* ── Módulo empresa: encabezados de sección ─────────────── */
.form-section-header {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px; margin-bottom: 14px; margin-top: 4px;
}

/* ── Módulo empresa: inputs redes sociales ──────────────── */
.social-input-wrap {
    display: flex; align-items: stretch;
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: var(--surface);
    transition: border-color 0.15s;
}
.social-input-wrap:focus-within { border-color: var(--primary); }
.social-input-icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; flex-shrink: 0;
    border-right: 1px solid var(--border);
    background: var(--surface-soft);
}
.social-input {
    flex: 1; border: none; outline: none;
    padding: 0 12px; background: transparent;
    color: var(--text); font-size: 0.9rem; min-height: 42px;
}

/* ── Módulo empresa: chips de beneficios ────────────────── */
.beneficios-grid {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.beneficio-chip {
    padding: 6px 14px; border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface); color: var(--muted);
    font-size: 0.82rem; cursor: pointer;
    transition: all 0.15s;
}
.beneficio-chip:hover {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-soft);
}
.beneficio-chip.activo {
    background: var(--primary); color: #fff;
    border-color: var(--primary); font-weight: 600;
}
html[data-theme="dark"] .beneficio-chip.activo {
    background: var(--primary-strong); border-color: var(--primary-strong);
}

/* ── Módulo empresa: barra completitud ──────────────────── */
.completitud-track {
    height: 6px; border-radius: 3px;
    background: var(--surface-strong); overflow: hidden;
}
.completitud-fill {
    height: 100%; border-radius: 3px;
    transition: width 0.4s ease, background 0.4s ease;
}

/* ── Módulo empresa: preview meta ───────────────────────── */
#preview-meta {
    display: flex; flex-wrap: wrap; gap: 6px 12px;
    font-size: 0.75rem; color: var(--muted);
}
#preview-meta span { white-space: nowrap; }

/* ── Skeleton loaders ───────────────────────────────────── */
@keyframes skeleton-pulse {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.skeleton-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 20px; margin-bottom: 12px;
}
.skeleton-line {
    height: 13px; border-radius: 7px; margin-bottom: 10px;
    background: linear-gradient(90deg, var(--surface-soft) 25%, var(--surface-strong) 50%, var(--surface-soft) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-circle {
    border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(90deg, var(--surface-soft) 25%, var(--surface-strong) 50%, var(--surface-soft) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.sk-w-30 { width: 30%; }
.sk-w-40 { width: 40%; }
.sk-w-60 { width: 60%; }
.sk-w-80 { width: 80%; }
.sk-w-100 { width: 100%; }

/* ── Badge de notificaciones ─────────────────────────────── */
.notif-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: var(--danger); color: #fff;
    border-radius: 999px; font-size: 0.68rem; font-weight: 700;
    margin-left: 5px; vertical-align: middle;
}

/* ── Skills chips en formulario de vacante ───────────────── */
.skill-chip-form {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary);
    border: 1px solid var(--primary); font-size: 0.78rem; font-weight: 600;
}
.skill-chip-form button {
    background: none; border: none; padding: 0; line-height: 1;
    color: var(--primary); font-size: 1rem; cursor: pointer; display: flex;
}

/* ── Avatar de candidato ─────────────────────────────────── */
.candidato-avatar {
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; flex-shrink: 0;
}

/* ── Mobile responsiveness global ───────────────────────── */
@media (max-width: 768px) {
    /* Header nav */
    .nav-der { gap: 10px; }
    .nav-izq { gap: 12px; }
    .logo-nav { font-size: 1.25rem; }

    /* Dashboard sidebar collapse */
    .dashboard-layout { grid-template-columns: 1fr !important; }
    .sidebar-nav { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 14px !important; border-right: none !important; border-bottom: 1px solid var(--border); }
    .sidebar-link { padding: 8px 14px !important; font-size: 0.82rem !important; }
    .main-content { padding: clamp(16px, 4vw, 32px) !important; }

    /* Modals full-width on mobile */
    .modal-contenido { max-width: 100% !important; margin: 0 !important; border-radius: 16px 16px 0 0 !important; position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; max-height: 92vh !important; overflow-y: auto !important; }
    .modal-fondo { align-items: flex-end !important; }

    /* Candidate cards */
    .tarjeta-candidato-dash { flex-direction: column !important; }
    .candidate-actions { flex-wrap: wrap !important; gap: 8px !important; }

    /* Dashboard resumen */
    .dashboard-resumen { grid-template-columns: 1fr 1fr !important; }

    /* Buscador search bar */
    .buscador-caja { grid-template-columns: 1fr !important; border-radius: 12px !important; }
    .separador-buscador { display: none !important; }

    /* Entrevistas layout */
    .entrevistas-layout { flex-direction: column !important; }
    .filtro-panel { flex-direction: row !important; flex-wrap: wrap !important; border-right: none !important; border-bottom: 1px solid var(--border) !important; padding-bottom: 12px !important; margin-bottom: 16px !important; }

    /* CV builder */
    #modal-cv-builder .modal-contenido-builder { flex-direction: column !important; }
    #cv-edit-panel { width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--border); }

    /* Actions bar */
    .acciones-rapidas { flex-wrap: wrap; }

    /* Tables scroll */
    .tabla-vacantes-wrap, [class*="tabla-"] { overflow-x: auto; }
}

@media (max-width: 480px) {
    /* Stack dashboard stats to single column */
    .dashboard-resumen { grid-template-columns: 1fr !important; }

    /* Smaller headings */
    .dash-header h2 { font-size: 1.3rem !important; }

    /* Hide less important nav items */
    .nav-link { display: none; }

    /* Bulk action bar */
    #candidatos-bulk-bar { flex-direction: column; align-items: stretch; }
    #candidatos-bulk-bar button { width: 100%; }
}

/* ── Vista compacta de tarjetas en busqueda.html ── */
#lista-vacantes.compact-mode { gap: 6px !important; }
#lista-vacantes.compact-mode .job-card-new {
    padding: 12px 14px !important;
    margin-bottom: 0 !important;
}
#lista-vacantes.compact-mode .job-card-new h4 {
    font-size: 0.92rem !important;
    margin-bottom: 4px !important;
}
#lista-vacantes.compact-mode [data-compact-hide] { display: none !important; }

/* ═══════════════════════════════════════════════════════
   IDENTIDAD DE MARCA EMPLEOPLUS
   ═══════════════════════════════════════════════════════ */

/* ── Tipografía ──────────────────────────────────────── */
h1, h2, h3, h4, h5 { letter-spacing: -0.02em; }
body { font-feature-settings: "cv02","cv03","cv04","cv11"; }

/* ── Logo ────────────────────────────────────────────── */
.logo-nav {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}
.logo-nav img {
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
}
.logo-nav .destaque {
    background: var(--gradient-cta);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Botones CTA con gradiente ───────────────────────── */
.btn-publicar, .btn-publicar-dash {
    background: var(--gradient-cta) !important;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 35%, transparent);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease !important;
}
.btn-publicar:hover, .btn-publicar-dash:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 45%, transparent) !important;
    background: var(--gradient-cta) !important;
    opacity: 0.93;
}
.btn-buscar-accion {
    background: var(--gradient-cta) !important;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--primary) 30%, transparent);
}
.btn-buscar-accion:hover {
    background: var(--gradient-cta) !important;
    opacity: 0.9;
    transform: translateY(-1px) !important;
}

/* ── Navbar ──────────────────────────────────────────── */
.site-header {
    border-bottom-color: color-mix(in srgb, var(--border) 80%, var(--primary)) !important;
}

/* ── Form focus con color de marca ───────────────────── */
.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent) !important;
}

/* ── Sidebar oscuro con tinte marca ──────────────────── */
.dashboard-sidebar {
    background: linear-gradient(180deg, var(--sidebar) 0%, color-mix(in srgb, var(--sidebar) 92%, var(--primary)) 100%) !important;
}
.tab-btn.activo {
    background: color-mix(in srgb, var(--primary) 20%, transparent) !important;
    color: var(--primary-strong) !important;
    border-left: 3px solid var(--primary);
}
html[data-theme="dark"] .tab-btn.activo {
    color: var(--primary) !important;
}

/* ── Cards con borde más sutil y distintivo ──────────── */
.tarjeta-resumen, .tarjeta-candidato-dash, .tarjeta-entrevista {
    border-color: color-mix(in srgb, var(--border) 70%, var(--primary)) !important;
}
.tarjeta-resumen p {
    background: var(--gradient-cta);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Badge colores actualizados ──────────────────────── */
.badge { background: var(--primary-soft) !important; color: var(--primary) !important; }

/* ── Scrollbar personalizada ─────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary) 40%, var(--border));
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Gradient text helper ────────────────────────────── */
.texto-gradiente {
    background: var(--gradient-cta) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

/* ── Action icon btn con tinte marca ─────────────────── */
.action-icon-btn.info { color: var(--primary) !important; }
.action-icon-btn.info:hover { background: var(--primary-soft) !important; border-color: var(--primary) !important; }
