/* =====================================================================
   SISTEMA DE DISEÑO - RRHH
   Versión organizada y limpia

   ÍNDICE:
   01. VARIABLES GLOBALES & RESET
   02. LOGIN
   03. LAYOUT (Sidebar, Navbar, Footer)
   04. SIDEBAR (Normal y Colapsado)
   05. NAVBAR & USER DROPDOWN
   06. CONTENIDO PRINCIPAL & SCROLLBARS
   07. TIPOGRAFÍA & UTILIDADES GENERALES
   08. FORMULARIOS (Inputs, Labels, Select2)
   09. BOTONES
   10. TABLAS PRINCIPALES
   11. COMPONENTES DE TABLA (Badges, Status, Acciones)
   12. ESTADÍSTICAS (Stat Cards)
   13. MODALES (Base, Tamaños, Headers, Footers)
   14. SWEETALERT2
   15. PAGINACIÓN & BUSCADOR
   16. WIZARD / STEPPER
   17. PERFIL DE EMPLEADO (Banner, Avatar, Módulos)
   18. CURRICULUM VITAE (Modal Listado)
   19. MÓDULOS ESPECÍFICOS (Horarios, Permisos, Roles)
   20. RESPONSIVE
   21. ANIMACIONES & KEYFRAMES
   ===================================================================== */


/* =====================================================================
   01. VARIABLES GLOBALES & RESET
   ===================================================================== */
:root {
    /* Paleta Corporativa */
    --primary-color: #0f172a;
    --secondary-color: #475569;
    --accent-color: #059669;
    --accent-hover: #047857;
    --bg-light: #f1f5f9;
    --white: #ffffff;
    --text-color: #334155;
    --error: #e11d48;
    --card-bg: #ffffff;

    /* Dimensiones Layout (ajustadas para UI más compacta) */
    --sidebar-width: 220px;
    --sidebar-collapsed-width: 64px;
    --header-height: 56px;
    --border-radius: 10px;

    /* Sombras */
    --shadow-soft: 0 1px 4px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.1), 0 4px 10px rgba(15, 23, 42, 0.06);
    --shadow-input: 0 0 0 3px rgba(5, 150, 105, 0.12);

    /* Botones de tabla */
    --table-btn-size: 40px;
    --table-btn-icon-size: 1.15rem;
    --table-btn-radius: 50%;
    --table-btn-shadow: 0 6px 14px rgba(2, 6, 23, 0.06);
    --table-btn-transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 0.9rem; /* reducción global de escala */
    line-height: 1.5;
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

body.modal-open,
body.no-scroll {
    overflow: hidden !important;
    height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

[v-cloak] {
    display: none !important;
}


/* =====================================================================
   02. LOGIN
   ===================================================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 20px;
}

.login-card {
    background-color: var(--white);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    animation: slideUp 0.6s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    max-width: 260px;
    height: auto;
    margin-bottom: 1rem;
    display: inline-block;
}

.login-header h2 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
    font-size: 1.5rem;
}

.login-header p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}


/* =====================================================================
   03. LAYOUT
   ===================================================================== */
.layout-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    transition: grid-template-columns 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.layout-wrapper.is-collapsed {
    grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

.main-content {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-light);
    min-height: 100vh;
    width: 100%;
    transition: all 0.3s ease;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
}

#app-content {
    padding: 1rem;
    padding-bottom: 3rem;
    flex: 1 1 auto;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: auto;
    scroll-behavior: smooth;
}

.footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    padding: 0.75rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    background-color: var(--white);
    border-top: 1px solid #e2e8f0;
}

.layout-wrapper.is-collapsed .footer {
    left: var(--sidebar-collapsed-width);
}


/* =====================================================================
   04. SIDEBAR
   ===================================================================== */
.sidebar {
    background-color: var(--primary-color);
    color: #fff;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width 0.3s ease;
    overflow-y: auto;
    overflow-x: auto;
}

.sidebar::-webkit-scrollbar {
    width: 0;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.sidebar-logo-img {
    width: 32px;
    height: auto;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-weight: 700;
    font-size: 1.2rem;
    transition: opacity 0.2s;
}

/* Menu Items */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.sidebar-menu li {
    position: relative;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.2rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left-color: var(--accent-color);
}

.sidebar-menu li a i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-menu .chevron-icon {
    margin-left: auto;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.sidebar-menu li.open .chevron-icon {
    transform: rotate(90deg);
}

.sidebar-menu li.open .submenu {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Submenu acordeón */
.sidebar-menu .submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    background-color: rgba(0, 0, 0, 0.2);
    display: none;
}

.sidebar-menu .submenu .submenu-title {
    display: none;
}

.sidebar-menu .submenu li a {
    padding-left: 50px;
    font-size: 0.9em;
    color: #cbd5e1;
}

.sidebar-menu .submenu li a i {
    width: 22px;
    margin-right: 8px;
}

.sidebar-menu .submenu li a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-menu .submenu li a.active-child {
    color: #fff;
    font-weight: bold;
    background-color: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #10b981;
}

/* Submenu interno (Administración en Manual de Funciones) */
.has-inner-submenu {
    position: relative;
}

.has-inner-submenu > a {
    cursor: pointer;
}

.inner-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: transparent;
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-left: 2px solid rgba(40, 175, 35, 0.3);
    margin-left: 15px;
}

.has-inner-submenu.is-open .inner-submenu {
    display: block;
    max-height: 500px;
    overflow: visible;
}

.inner-submenu li {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.inner-submenu li a {
    padding-left: 48px;
    font-size: 0.85em;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.inner-submenu li a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(40, 175, 35, 0.5);
}

.inner-submenu li a.active-child {
    color: #fff;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: #10b981;
}

.inner-chevron {
    transition: transform 0.3s ease;
    margin-left: auto;
    font-size: 0.75em;
}

.has-inner-submenu.is-open .inner-chevron {
    transform: rotate(180deg);
}

/* Sidebar colapsado */
.sidebar.collapsed,
.layout-wrapper.is-collapsed .sidebar {
    overflow: visible !important;
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .menu-text,
.sidebar.collapsed .chevron-icon,
.layout-wrapper.is-collapsed .sidebar-brand-text,
.layout-wrapper.is-collapsed .menu-text,
.layout-wrapper.is-collapsed .chevron-icon {
    display: none !important;
}

.sidebar.collapsed .sidebar-menu li a,
.layout-wrapper.is-collapsed .sidebar-menu li a {
    justify-content: center;
    padding: 0.9rem 0;
}

.sidebar.collapsed .sidebar-menu li a i,
.layout-wrapper.is-collapsed .sidebar-menu li a i {
    margin-right: 0;
    font-size: 1.3rem;
    width: 100%;
    min-width: 100%;
    text-align: center;
}

/* Submenú flotante en modo colapsado */
.sidebar.collapsed .submenu {
    display: none !important;
}

.sidebar.collapsed .has-submenu.collapsed-open .submenu {
    display: block !important;
    position: fixed;
    min-width: 220px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: var(--white);
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 99999;
    border: 1px solid #e2e8f0;
    border-left: none;
    padding: 5px 0;
}

.sidebar.collapsed .has-submenu.collapsed-floating .submenu {
    position: fixed;
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed .has-submenu.collapsed-open > a {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar.collapsed .has-submenu.collapsed-open > a i:first-child,
.sidebar.collapsed .has-submenu.collapsed-open > a i:first-child {
    color: #fff;
}

.sidebar.collapsed .has-submenu.collapsed-open .submenu .submenu-title {
    display: none !important;
}

.sidebar.collapsed .has-submenu.collapsed-open .submenu li a {
    color: var(--text-color) !important;
    padding: 10px 20px;
    justify-content: flex-start;
    border-left: none;
}

.sidebar.collapsed .has-submenu.collapsed-open .submenu li a .menu-text {
    display: inline-block !important;
    margin-left: 0;
    font-size: 0.9rem;
}

.sidebar.collapsed .has-submenu.collapsed-open .submenu li a i {
    color: #94a3b8;
    margin-right: 12px;
    font-size: 1rem;
    width: auto;
}

.sidebar.collapsed .has-submenu.collapsed-open .submenu li a:hover {
    background: #f8fafc;
    color: var(--accent-color) !important;
}

.sidebar.collapsed .has-submenu.collapsed-open .submenu li a:hover i {
    color: var(--accent-color);
}

/* Flechita decorativa del submenú flotante */
.sidebar.collapsed .has-submenu.collapsed-open .submenu::before {
    content: "";
    position: absolute;
    top: 18px;
    left: -6px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    border-left: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    z-index: 100000;
}

.sidebar.collapsed .has-submenu.collapsed-open .submenu::after {
    content: "";
    position: absolute;
    top: 0;
    left: -10px;
    width: 10px;
    height: 100%;
    background: transparent;
    z-index: -1;
}


/* =====================================================================
   05. NAVBAR & USER DROPDOWN
   ===================================================================== */
.navbar {
    flex-shrink: 0;
    height: var(--header-height);
    background-color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 6px;
    border-radius: 8px;
    background: transparent;
    color: var(--primary-color);
    margin-left: -10px;
    margin-right: 8px;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease;
    z-index: 60;
}

.navbar .sidebar-toggle i {
    font-size: 1.1rem;
    line-height: 1;
    display: inline-block;
}

.navbar .sidebar-toggle:hover {
    transform: translateX(-3px);
    background: rgba(0, 0, 0, 0.03);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-wrapper {
    position: relative;
    cursor: pointer;
    color: var(--secondary-color);
    margin-right: 15px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.notification-wrapper:hover {
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--error);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 5px;
    min-width: 18px;
    text-align: center;
    border-radius: 10px;
    border: 2px solid var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.user-dropdown-container {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-trigger:hover {
    background-color: #f8fafc;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    object-fit: cover;
    object-position: center;
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    width: 220px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0;
    z-index: 100;
    transform-origin: top right;
    animation: scaleIn 0.2s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: var(--accent-color);
}

.dropdown-divider {
    border-top: 1px solid #e2e8f0;
    margin: 0.5rem 0;
}


/* =====================================================================
   06. SCROLLBARS PERSONALIZADOS
   ===================================================================== */
#app-content::-webkit-scrollbar {
    width: 14px;
}

#app-content::-webkit-scrollbar-track {
    background: #e2e8f0;
}

#app-content::-webkit-scrollbar-thumb {
    background-color: #94a3b8;
    border-radius: 6px;
    border: 3px solid #e2e8f0;
}

#app-content::-webkit-scrollbar-thumb:hover {
    background-color: #64748b;
}

.table-container::-webkit-scrollbar {
    height: 8px;
    background: #f1f1f1;
}

.table-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
    border-radius: 10px;
}

.modal-body-content::-webkit-scrollbar,
.modal-body-custom::-webkit-scrollbar,
.modal-body-scrolled::-webkit-scrollbar {
    width: 8px;
}

.modal-body-content::-webkit-scrollbar-track,
.modal-body-custom::-webkit-scrollbar-track,
.modal-body-scrolled::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.modal-body-content::-webkit-scrollbar-thumb,
.modal-body-custom::-webkit-scrollbar-thumb,
.modal-body-scrolled::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

.modal-body-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.modal-body-custom::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.modal-body-scrolled::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* =====================================================================
   07. TIPOGRAFÍA & UTILIDADES GENERALES
   ===================================================================== */

/* Display */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

.italic {
    font-style: italic;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed !important;
}

.flex-grow-1 {
    flex-grow: 1;
    min-width: 0;
}

.w-100 {
    width: 100% !important;
}

.me-1 {
    margin-right: 0.25rem;
}

.mt-3 {
    margin-top: 1rem !important;
}

.gap-4 {
    gap: 1.5rem !important;
}

/* Texto */
.text-white {
    color: #ffffff !important;
}

.text-white-opacity {
    color: rgba(255, 255, 255, 0.8) !important;
}

.text-white-opacity:hover {
    color: #ffffff !important;
    opacity: 1;
}

.text-danger {
    color: #ef4444;
    margin-left: 2px;
}

.text-error {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.text-primary-bold {
    color: var(--primary-color);
    font-weight: 800;
}

.small {
    font-size: 0.85rem;
    line-height: 1.2;
}

.font-weight-500 {
    font-weight: 500;
    color: #334155;
}

.font-weight-700 {
    font-weight: 700;
}

.font-weight-800 {
    font-weight: 800;
}

.search-term-highlight {
    color: var(--error);
}

/* Label y valor */
.label-muted, .info-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.value-bold, .info-value {
    display: block;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.text-highlight-large {
    color: var(--accent-color);
    font-size: 1.4rem;
    font-weight: 800;
    display: block;
    margin-bottom: 1rem;
}

.text-highlight {
    color: var(--accent-color);
    font-size: 1.3rem;
    font-weight: 800;
}

/* Fondo sutiles */
.bg-success-subtle {
    background-color: #dcfce7;
}

.bg-primary-subtle {
    background-color: #dbeafe;
}

.bg-secondary-subtle {
    background-color: #f1f5f9;
}

.bg-readonly {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    font-weight: 700 !important;
    cursor: not-allowed !important;
    border-color: #e2e8f0 !important;
}

/* Sombra */
.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: calc(-0.5 * 1rem);
    margin-left: calc(-0.5 * 1rem);
}

.row > * {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(1rem * 0.5);
    padding-left: calc(1rem * 0.5);
}

.row.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
    margin-right: calc(-0.5 * var(--bs-gutter-x));
    margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.row.g-3 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

.col-md-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
}

.col-md-6 {
    flex: 0 0 auto;
    width: 50%;
}

.col-md-8 {
    flex: 0 0 auto;
    width: 66.66666666%;
}

.col-md-12 {
    flex: 0 0 auto;
    width: 100%;
}

.grid-2-cols {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 2rem !important;
    width: 100%;
    align-items: start;
}

.grid-3-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.grid-4-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.grid-2-cols, .grid-3-cols {
    align-items: flex-start;
}

.grid-compact {
    gap: 10px !important;
}

/* Alinear form-groups en grids */
.grid-2-cols .form-group,
.grid-3-cols .form-group,
.grid-4-cols .form-group {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
}

.form-group input,
.form-group select,
.form-group textarea,
.input-field {
    width: 100% !important;
    box-sizing: border-box;
    max-width: 100%;
}

/* Cabecera de página */
.header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1a3a5c 100%);
    color: white;
    border-radius: 16px;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25), 0 4px 10px rgba(15, 23, 42, 0.15);
    position: relative;
    overflow: hidden;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.header-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 150, 105, 0.1) 0%, transparent 65%);
    pointer-events: none;
}

.header-card h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}

.header-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 400;
}

/* Sección de títulos */
.section-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 1.1rem;
    padding-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0;
}

.section-title i {
    color: #059669;
    font-size: 0.85rem;
}

/* Cards de sección */
.form-section-card {
    background: #ffffff;
    border: 1px solid #e8edf4;
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    transition: box-shadow 0.2s ease;
}

.form-section-card:hover {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
}

.form-section-card:last-child {
    margin-bottom: 0;
}

.form-section-card .form-group {
    margin-bottom: 0.75rem;
}

.section-card-standard {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Avatares */
.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-radius: 50%;
}

.avatar-placeholder-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.avatar-md, .avatar-placeholder-md {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.avatar-md {
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.avatar-placeholder-md {
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.avatar-xl, .avatar-placeholder-xl {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
}

.avatar-xl {
    object-fit: cover;
}

.avatar-placeholder-xl {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
}

/* Vacío / No resultados */
.empty-table-message {
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.1em;
    width: 100%;
    pointer-events: none;
}

.empty-table-message i {
    font-size: 2.5em;
    color: #d1d5db;
    margin-bottom: 10px;
}

.no-results-content {
    width: 100%;
    text-align: center;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.no-results-content.hidden {
    display: none !important;
}

.no-results-icon {
    font-size: 2.5rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.no-results-text {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

.no-results-message {
    text-align: center;
    padding: 4rem;
    font-weight: 500;
    color: #6b7280;
}

.no-results-overlay {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 5;
}

.no-results-overlay[aria-hidden="true"] {
    display: none;
}

.no-results-overlay .no-results-content {
    text-align: center;
    color: #64748b;
    background: transparent;
}

.no-results-overlay .no-results-icon {
    font-size: 56px;
    color: rgba(99, 102, 241, 0.12);
    display: block;
    margin: 0 auto 1rem auto;
}

.no-results-overlay .no-results-text {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin: 0;
}

.empty-state-container {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    color: #94a3b8;
    font-size: 3.5rem;
    display: block;
    margin: 0 auto 1.5rem;
}

.empty-state-text {
    margin-top: 1rem;
    font-weight: 700;
    color: #64748b;
}

/* Enlace */
.link {
    color: #004dba;
    text-decoration: none;
    font-weight: 600;
}


/* =====================================================================
   08. FORMULARIOS
   ===================================================================== */

/* Base unificada para todos los inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="tel"],
input[type="url"],
textarea {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 0.95rem;
    color: #1e293b;
    background-color: #fcfcfc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    transition: all 0.15s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus {
    border-color: #3b82f6;
    background-color: #fff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Input con icono */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 1rem !important;
    pointer-events: none;
    z-index: 5;
    width: 20px;
    text-align: center;
}

.input-icon-wrapper:focus-within .input-icon-left {
    color: var(--accent-color);
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--accent-color);
}

/* Form Control (estilo Bootstrap-compatible) */
.form-control {
    width: 100%;
    padding: 0.6rem 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    background-color: #ffffff;
    font-size: 0.9rem;
    color: #0f172a;
    font-family: inherit;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-control.with-icon {
    padding-left: 42px !important;
    height: 42px;
}

.form-control:focus {
    outline: none;
    border-color: #059669;
    background-color: #fafffe;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

/* Input field alternativo */
.input-field,
select.input-field {
    display: block;
    width: 100%;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #0f172a;
    background-color: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    outline: none;
}

.input-field:focus,
select.input-field:focus {
    border-color: #059669;
    background-color: #fafffe;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Readonly */
.readonly-styled {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    font-weight: 700;
    cursor: not-allowed;
    letter-spacing: 0.05em;
}

/* Deshabilitados */
input:disabled,
select:disabled,
textarea:disabled,
.input-field:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Validación */
input.is-invalid, select.is-invalid, textarea.is-invalid, .input-field.is-invalid {
    border-color: #ef4444;
}

input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus, .input-field.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}

input.is-valid, select.is-valid, textarea.is-valid, .input-field.is-valid {
    border-color: #10b981;
}

input.is-valid:focus, select.is-valid:focus, textarea.is-valid:focus, .input-field.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

/* Form groups */
.form-group {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 1rem;
}

.form-group-compact {
    margin-bottom: 8px !important;
}

.form-group-compact .form-label {
    margin-bottom: 4px;
    font-size: 0.75rem;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    min-height: 20px;
}

.form-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
}

.error-message-container {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
}

/* Checkboxes y radios */
.custom-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

.custom-radio {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: #2563eb;
}

.custom-radio.perm-admin {
    accent-color: #16a34a;
}

.custom-radio.perm-view {
    accent-color: #6b7280;
}

.custom-radio.perm-add {
    accent-color: #3b82f6;
}

.custom-radio.perm-change {
    accent-color: #f59e0b;
}

.custom-radio.perm-delete {
    accent-color: #ef4444;
}

.delete-check {
    accent-color: #ef4444;
}

/* Toggle iOS */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

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

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

input:checked + .toggle-slider {
    background-color: #10b981;
}

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

/* Ajustes para switches dentro de modales y contenedores responsivos */
.toggle-switch {
    min-width: 44px;
    flex-shrink: 0;
}

.toggle-slider {
    overflow: visible;
}

.toggle-slider:before {
    /* Usar un desplazamiento relativo para evitar desbordes si se cambia el tamaño */
    transform: translateX(calc(100% - 21px));
}

/* Photo uploader */
.photo-uploader-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    align-self: center;
    margin-right: 2rem !important;
    margin-bottom: 0;
}

.photo-uploader-wrapper-lg {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    margin-right: 2rem !important;
}

.photo-upload-label {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.photo-preview-box {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    background: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.2s, background-color 0.2s;
}

.photo-preview-box-lg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    overflow: hidden;
    position: relative;
}

.photo-upload-label:hover .photo-preview-box {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.photo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-icon {
    text-align: center;
    color: #94a3b8;
    transition: color 0.2s;
}

.placeholder-icon i {
    font-size: 2rem;
    display: block;
    margin-bottom: 5px;
}

.placeholder-icon span {
    font-size: 0.75rem;
    font-weight: 600;
}

.photo-upload-label:hover .placeholder-icon {
    color: #3b82f6;
}

.photo-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    font-size: 1.5rem;
}

.photo-upload-label:hover .photo-hover-overlay {
    opacity: 1;
}

.btn-upload-trigger {
    position: absolute;
    bottom: -10px;
    right: -10px;
    background-color: #3b82f6;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
    transition: transform 0.2s;
}

.btn-upload-trigger:hover {
    transform: scale(1.1);
    background-color: #2563eb;
}

/* Alert info */
.alert-info {
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e40af;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.alert-info i {
    font-size: 2rem;
    color: #3b82f6;
}

/* SELECT2 */
.select2-container {
    z-index: 99999;
}

.select2-dropdown {
    z-index: 10000000 !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.select2-container--default .select2-selection--single {
    height: 42px !important;
    min-height: 42px;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #fcfcfc;
    display: flex !important;
    align-items: center !important;
    transition: border-color 0.15s ease-in-out;
}

.select2-container--default .select2-selection--multiple {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #fcfcfc;
    min-height: 42px;
    padding: 0.35rem 0.5rem;
    transition: border-color 0.15s ease-in-out;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b;
    padding: 0.5rem 0.75rem;
    line-height: 1.5;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.2rem 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none;
}

.select2-container--default .select2-selection--single .select2-selection__arrow::before {
    content: "▼";
    color: #64748b;
    font-size: 0.75rem;
    font-family: sans-serif;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow::before {
    content: "▲";
    color: #475569;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    color: #94a3b8;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: #1e40af;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #1e40af;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc2626;
}

.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    background-color: transparent;
    border: none;
    outline: none;
    padding: 0.4rem 0.2rem;
    font-size: 0.95rem;
    color: #1e293b;
}

.select2-container--default .select2-dropdown {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-top: 0.25rem;
}

.select2-container--default .select2-dropdown.select2-dropdown--below {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.select2-container--default .select2-dropdown.select2-dropdown--above {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.select2-container--default .select2-results__option {
    padding: 0.65rem 0.75rem;
    color: #334155;
    font-size: 0.95rem;
    transition: background-color 0.15s;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #eff6ff;
    color: #1e40af;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #dbeafe;
    color: #1e40af;
}

.select2-container--default .select2-results__option:hover {
    background-color: #f1f5f9;
}

.select2-container--default .select2-results__group {
    color: #64748b;
    padding: 0.65rem 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.select2-container--default .select2-results__message {
    color: #64748b;
    padding: 1rem 0.75rem;
    text-align: center;
}

.select2-container--default .select2-results__option.loading-results {
    padding: 1rem;
    text-align: center;
    color: #94a3b8;
}

.modal-body-custom .select2-container {
    width: 100% !important;
}


/* =====================================================================
   09. BOTONES
   ===================================================================== */

/* Base */
.btn {
    padding: 0.5rem 1rem;
    font-weight: bold;
    border-radius: 0.375rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* Botón primario de login */
.btn-primary {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
}

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

/* Crear */
.btn-create {
    font-family: 'Inter', 'Roboto', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    transition: var(--table-btn-transition);
    border: none;
    white-space: nowrap;
}

.btn-create:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.2);
}

.btn-create:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Buscar */
.btn-search {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    background-color: #088dbf;
    color: white;
    border: none;
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.07);
}

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

/* Cancelar & Guardar */
.btn-cancel,
.btn-save {
    font-family: 'Inter', 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    min-width: 160px;
}

.btn-cancel {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-cancel:hover {
    background-color: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.btn-save {
    background: linear-gradient(135deg, #0f4c81 0%, #0a355c 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(15, 76, 129, 0.3);
}

.btn-save:hover {
    background: linear-gradient(135deg, #0a355c 0%, #082847 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(15, 76, 129, 0.4);
}

.btn-save:active, .btn-cancel:active {
    transform: translateY(0);
}

.btn-cancel i, .btn-save i {
    font-size: 1rem;
}

/* Botón compacto */
.btn-compact {
    min-width: auto;
    padding: 0.65rem 1.25rem;
}

.btn-secondary-search {
    background-color: #64748b;
}

.btn-secondary-search:hover {
    background-color: #475569;
}

/* Olvidé contraseña */
.forgot-password-link {
    font-size: 0.85rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Regresar */
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-back:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    transform: translateX(-4px);
    color: var(--white);
}

.btn-back i {
    font-size: 0.8rem;
}

/* Header actions */
.header-actions, .header-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-header-premium {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.1;
}

/* Ensure header action buttons (anchor + button) look identical */
.header-actions-wrapper .btn-header-premium {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
}

.header-actions-wrapper .btn-header-premium i {
    font-size: 1rem;
}

.btn-header-back {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-header-back:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.btn-header-edit {
    color: white;
    box-shadow: 0 4px 6px -1px rgba(15, 76, 129, 0.3);
    background: linear-gradient(to right, #fbbf24, #f59e0b);
}

.btn-header-edit:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-header-edit i {
    font-size: 1rem;
}

/* Botón cerrar modal */
.btn-close-modal {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.btn-close-modal:hover {
    background: var(--error);
    transform: rotate(90deg);
    color: white;
}

.btn-close-modal:focus {
    outline: none;
    box-shadow: none;
}

.btn-close-modal i {
    font-size: 1.1rem;
}

.btn-close-modal-refined {
    position: absolute !important;
    top: 1.2rem !important;
    right: 1.5rem !important;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.2s ease;
}

.btn-close-modal-refined:hover {
    background: #ef4444 !important;
    transform: scale(1.1) rotate(90deg);
}

/* Botón cerrar icon pequeño */
.btn-close-icon {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-close-icon:hover {
    color: #64748b;
}

/* Pill action */
.btn-pill-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background-color: #0f4c81;
    color: white !important;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.25);
    border: 2px solid transparent;
}

.btn-pill-action:hover {
    background-color: #0a355c;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(15, 76, 129, 0.35);
}

/* Botones de acción en tabla (redondos grandes) */
.btn-create-action,
.btn-success-action,
.btn-views-action,
.btn-detail-action,
.btn-delete-action,
.btn-restore-action,
.btn-list-action,
.btn-info-action {
    display: inline-flex;
    width: var(--table-btn-size);
    height: var(--table-btn-size);
    border-radius: var(--table-btn-radius);
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: none;
    box-shadow: var(--table-btn-shadow);
    cursor: pointer;
    font-size: 1.05rem;
    transition: var(--table-btn-transition);
    padding: 0;
}

.btn-create-action i, .btn-success-action i, .btn-views-action i,
.btn-delete-action i, .btn-restore-action i, .btn-list-action i, .btn-info-action i,
.btn-create-action svg, .btn-success-action svg, .btn-views-action svg,
.btn-restore-action svg, .btn-delete-action svg, .btn-list-action svg, .btn-info-action svg {
    color: #ffffff;
    font-size: var(--table-btn-icon-size);
    line-height: 1;
}

.btn-create-action {
    background: linear-gradient(to right, #0ba542, #009e36);
}

.btn-success-action {
    background: linear-gradient(to right, #10b981, #059669);
}

.btn-views-action {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
}

.btn-detail-action {
    background: linear-gradient(to right, #7dc1df, #1378dd);
}

.btn-delete-action {
    background: linear-gradient(to right, #c64939, #6c051d);
}

.btn-restore-action {
    background: linear-gradient(to right, #3ac5d1, #0ecad6);
}

.btn-list-action {
    background: linear-gradient(to right, rgba(46, 149, 230, 0.78), #082d7c);
}

.btn-info-action {
    background: linear-gradient(to right, #6366f1, #4f46e5);
}

.btn-create-action:hover, .btn-success-action:hover, .btn-views-action:hover,
.btn-restore-action:hover, .btn-delete-action:hover, .btn-list-action:hover, .btn-info-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.1);
}

.btn-create-action:active, .btn-success-action:active, .btn-views-action:active,
.btn-detail-action:active, .btn-delete-action:active, .btn-restore-action:active,
.btn-list-action:active, .btn-info-action:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.08);
}

/* Botones de editar/eliminar pequeños (modales CV) */
.btn-action-edit,
.btn-action-delete {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-action-edit {
    background: #fef3c7;
    color: #92400e;
}

.btn-action-edit:hover {
    background: #fde68a;
    transform: scale(1.05);
}

.btn-action-delete {
    background: #fee2e2;
    color: #991b1b;
}

.btn-action-delete:hover {
    background: #fecaca;
    transform: scale(1.05);
}

.btn-action-label {
    min-width: 84px;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.875rem;
    gap: 0.5rem;
    display: inline-flex !important;
    align-items: center;
}

.btn-action-label .btn-label-text {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    color: inherit;
}

/* Toggle all */
.btn-toggle-all {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-toggle-all:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* =====================================================================
   10. TABLAS PRINCIPALES
   ===================================================================== */

/* Tabla global */
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

/* Contenedor tabla */
.table-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: var(--white);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    border: 1px solid #e8edf4;
    position: relative;
    -webkit-overflow-scrolling: touch;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.table-container-has-scroll-helper {
    padding-right: 3.15rem;
}

.table-scroll-helper-group {
    position: absolute;
    right: 0.45rem;
    top: 3.15rem;
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    z-index: 30;
}

.table-scroll-nav-button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.24);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.table-scroll-nav-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.28);
}

.table-scroll-nav-button i {
    font-size: 0.9rem;
    line-height: 1;
    margin: 0;
    display: block;
}

.table-scroll-nav-start,
.table-scroll-nav-end {
    display: none;
}

.table-container table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.table-container thead {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1a3a5c 100%);
    position: sticky;
    top: 0;
    z-index: 20;
}

.table-container thead tr {
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
}

.table-container thead th {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
    border-bottom: none;
    white-space: nowrap;
    text-align: left;
    vertical-align: middle;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.table-container thead th i {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
    font-size: 0.95rem;
}

.table-container thead th.actions i,
.table-container thead th:last-child i {
    margin-right: 0;
}

.table-container td {
    padding: 0.32rem 0.75rem;
    vertical-align: middle;
    text-align: left;
    border-bottom: 1px solid #eef2f5;
    color: #374151;
    font-size: 0.88rem;
    transition: background 0.18s ease;
}

.table-container table tr,
.table-container table td,
.table-container table th {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 0 10px !important;
    vertical-align: middle;
    font-size: 14px;
    font-family: 'Inter', 'Roboto', sans-serif;
    box-sizing: border-box;
}

.table-container tbody tr:last-child td {
    border-bottom: none;
}

.table-container tbody tr:hover {
    background-color: #f9fafb;
}

/* Columna acciones */
.table-container thead th.actions,
.table-container thead th:last-child {
    text-align: center;
}

.table-container th:last-child,
.table-container td.actions {
    position: static;
    background-color: transparent !important;
    box-shadow: none !important;
}

.table-container th:last-child {
    z-index: 11;
    background: linear-gradient(180deg, #046f9f 0%, #034d75 100%);
}

.table-container tbody td.actions,
.table-container tbody td:last-child {
    display: table-cell !important;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    width: 1%;
    min-width: 78px;
    padding: 0.25rem 0.3rem;
}

.table-container tbody td.actions .actions-wrapper,
.table-container tbody td:last-child .actions-wrapper,
.table-container tbody td.actions > .actions-wrapper,
.table-container tbody td:last-child > .actions-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

/* Tabla de controles */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    width: 100%;
}

.table-controls .search-box {
    margin-left: auto;
}

/* Encabezados ordenables */
th a {
    text-decoration: none;
    color: inherit;
    display: flex;
    gap: 0.75rem;
}

th a:hover {
    color: #cdd1d3;
}

.sort-icon {
    margin-left: auto;
    color: #9ca3af;
}

th a.active .sort-icon {
    color: #1f2937;
}

.sort-arrow {
    font-size: 1.4em;
    color: #b0b7c3;
    margin-left: 8px;
    vertical-align: middle;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

th.sorted-asc .sort-arrow {
    color: #28af23;
    transform: rotate(180deg);
}

th.sorted-desc .sort-arrow {
    color: #ef4444;
    transform: rotate(0deg);
}

/* Actions wrapper en tabla general */
.actions-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.actions-wrapper .btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 52px;
    font-size: 0.82rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.actions-wrapper .btn-icon i,
.actions-wrapper .btn-icon svg {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    display: block;
    margin: 0;
}

.actions-wrapper .btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(2, 6, 23, 0.06);
}

.actions-wrapper a.btn-icon {
    text-decoration: none !important;
    outline: none;
}

.actions-wrapper a.btn-icon:hover {
    text-decoration: none !important;
}

/* Tabla de permisos */
.table-permissions {
    table-layout: fixed;
    width: 100%;
}

.table-permissions th {
    background-color: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    font-size: 0.72rem;
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.table-permissions td {
    padding: 0.6rem 0.4rem !important;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    text-align: center;
    position: relative;
}

.table-permissions td:first-child {
    text-align: left;
    padding-left: 0.75rem !important;
}

.table-permissions td .form-check-input {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.table-permissions tr:last-child td {
    border-bottom: none;
}

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

/* Tabla compacta wizard */
.table-compact-wizard {
    width: 100% !important;
    table-layout: fixed;
}

.table-compact-wizard thead th {
    background-color: #034d75 !important;
    color: #ffffff !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 12px !important;
    text-align: left;
    border: none !important;
}

.table-compact-wizard tbody td,
.table-compact-wizard td {
    padding: 12px !important;
    font-size: 0.85rem !important;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.table-compact-wizard th.text-center,
.table-compact-wizard td.text-center {
    text-align: center !important;
}

/* Columnas helper */
.col-mini {
    width: 80px;
}

.col-sm {
    width: 150px;
}

.col-actions, .col-width-actions {
    width: 92px;
    text-align: center;
}

.col-width-status {
    width: 120px;
}

.actions-wrapper-center {
    display: flex;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

@media (max-width: 1440px) {
    .table-container table {
        min-width: 860px;
    }

    .table-container thead th {
        padding: 0.4rem 0.65rem;
    }

    .table-container td {
        padding: 0.28rem 0.65rem;
        font-size: 0.84rem;
    }

    .table-container tbody td.actions,
    .table-container tbody td:last-child {
        min-width: 72px;
        padding: 0.2rem 0.25rem;
    }

    .actions-wrapper .btn-icon {
        width: 30px;
        height: 30px;
    }

    .actions-wrapper .btn-icon i,
    .actions-wrapper .btn-icon svg {
        font-size: 0.9rem;
    }

    .table-container-has-scroll-helper {
        padding-right: 3.35rem;
    }

    .table-scroll-helper-group {
        top: 3rem;
    }

    .table-scroll-nav-button {
        width: 32px;
        height: 32px;
    }

    .table-scroll-nav-button i {
        font-size: 0.82rem;
    }
}

.loader-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #28af23;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
}


/* =====================================================================
   11. BADGES & STATUS
   ===================================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 25px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.status-badge.active {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge.neutral {
    background-color: #f1f5f9;
    color: #475569;
}

.status-badge.general {
    background-color: #8ddde3;
    color: #0547e4;
}

.status-badge.libre {
    background-color: #bbf7d0;
    color: #166534;
    border-color: #bbf7d0;
}

.status-badge.ocupada {
    background-color: #fde68a;
    color: #92400e;
    border-color: #fde68a;
}

.status-badge.concurso {
    background-color: #f3e8ff;
    color: #7e22ce;
    border-color: #e9d5ff;
}

.status-badge.litigio {
    background-color: #0ecad6;
    color: #0a355c;
    border-color: #0ecad6;
}

.status-badge.inactiva {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.status-badge.sin-firmar {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

.status-badge.firmado {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

.badge-code {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #e0e7ff;
    color: #4f46e5;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.badge-value {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #ecfdf5;
    color: #065f46;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #d1fae5;
}

.text-muted {
    color: #9ca3af;
}

.badge-status-active {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.status-badge-mini {
    font-size: 0.65rem;
    padding: 2px 10px;
    border-radius: 50px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.status-pill-large {
    display: inline-flex;
    align-items: center;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: fit-content;
}

.budget-code-badge {
    margin-left: 15px;
    padding: 6px 16px;
    background-color: #0f172a;
    color: #38bdf8;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 8px;
    border: 1px solid #1e293b;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1.5px;
}

.budget-code-badge-small {
    padding: 3px 10px;
    background-color: #0f172a;
    color: #38bdf8;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #1e293b;
    display: inline-block;
    margin-right: 15px;
}


/* =====================================================================
   12. ESTADÍSTICAS
   ===================================================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    border-radius: 14px;
    background-color: white;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    border-left: 4px solid;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1), 0 3px 8px rgba(15, 23, 42, 0.06);
}

.stat-card.opacity-low {
    opacity: 0.4;
    transform: scale(0.98);
    filter: grayscale(20%);
}

.stat-card .stat-icon {
    font-size: 2rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.8;
}

.stat-card:hover .stat-icon {
    transform: translateY(-2px) scale(1.05);
}

.stat-card .number {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary-color);
    letter-spacing: -0.03em;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.stat-card h3 {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    margin: 0 0 5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.stat-card.stat-readonly,
.stat-card.readonly {
    cursor: default;
    transform: none;
    box-shadow: var(--shadow-soft);
}

.stat-card.stat-readonly:hover {
    transform: none;
    box-shadow: var(--shadow-soft);
}

.stat-card.color-one {
    border-left-color: #3b82f6;
}

.stat-card.color-one .number, .stat-card.color-one .stat-icon {
    color: #3b82f6;
}

.stat-card.color-two {
    border-left-color: #22c55e;
}

.stat-card.color-two .number, .stat-card.color-two .stat-icon {
    color: #22c55e;
}

.stat-card.color-three {
    border-left-color: #f97316;
}

.stat-card.color-three .number, .stat-card.color-three .stat-icon {
    color: #f97316;
}

.stat-card.color-four {
    border-left-color: #9333ea;
}

.stat-card.color-four .number, .stat-card.color-four .stat-icon {
    color: #9333ea;
}

.stat-card.color-five {
    border-left-color: #3ac5d1;
}

.stat-card.color-five .number, .stat-card.color-five .stat-icon {
    color: #3ac5d1;
}

.stat-card.color-six {
    border-left-color: #605f5f;
}

.stat-card.color-six .number, .stat-card.color-six .stat-icon {
    color: #605f5f;
}


/* =====================================================================
   13. MODALES
   ===================================================================== */

/* Overlay base */
.modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Asegurar que la clase 'hidden' oculte overlays aunque exista regla global
   que fuerce visibilidad. Esto corrige que modales queden siempre visibles
   después de reorganizaciones de CSS. */
.modal-overlay.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Contenedores de modal */
.modal-container,
.modal-container-medium,
.modal-container-xl {
    position: relative;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    animation: slideUp 0.3s ease-out;
    padding: 0 !important;
}

.modal-container {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    min-height: 200px;
}

.modal-container-medium {
    width: 100%;
    max-width: 1050px;
    max-height: 90vh;
    min-height: 200px;
}

.modal-container-xl {
    width: 200%;
    max-width: 850px;
    max-height: 100vh;
}


.modal-container-wide {
    width: 100%;
    max-width: 950px;
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}

/* Header de modal */
.modal-header,
.modal-header-medium {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1.25rem 2rem;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.modal-header-gradient {
    background: linear-gradient(to right, #1e293b, #334155);
    border-bottom: none;
    color: white;
}

.modal-header-refined {
    padding: 1rem 2rem;
    background: linear-gradient(to right, #1e293b, #334155);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.modal-title-clean {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.header-content-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.header-icon-circle {
    background: rgba(255, 255, 255, 0.15);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-icon-circle i {
    font-size: 1.1rem;
    color: white;
}

.header-title-main {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1;
}

/* Cuerpos de modal */
.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-body-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
    overscroll-behavior: contain;
}

.modal-body-custom {
    background-color: #f8fafc;
    padding: 1.5rem;
    flex: 1;
    overflow-y: scroll !important;
    overflow-x: hidden;
    padding-right: 1.5rem;
    max-height: calc(90vh - 180px);
}

.modal-body-scrolled {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 15px;
    padding: 1.25rem 2rem !important;
}

.modal-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(85vh - 180px);
}

#modal-body-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(85vh - 180px);
}

/* Footers de modal */
.modal-footer,
.modal-footer-medium,
.modal-footer-spaced {
    background-color: #ffffff;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.modal-footer-fixed {
    flex: 0 0 auto;
    background-color: white;
    border-top: 1px solid #edf2f7;
    padding: 1.25rem 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.modal-footer-fixed .btn-cancel,
.modal-footer-fixed .btn-save {
    height: 46px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.modal-footer .btn,
.modal-footer .btn-save,
.modal-footer .btn-cancel {
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.7rem 1rem;
    border-radius: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

/* Cierre */
.modal-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

/* Modal body custom placeholder */
.modal-body-custom input[type="text"]::placeholder {
    text-transform: none;
}

/* Modal de búsqueda */
.search-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(15, 23, 42, 0.85) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(6px) !important;
}

.search-modal-container {
    position: relative !important;
    background: white !important;
    width: 850px;
    max-width: 95%;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Modal período */
#period-app .modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.75) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(5px) !important;
}

#period-app .modal-container-medium {
    min-height: 400px;
    min-width: 800px;
    background: white !important;
    border-radius: 12px;
    visibility: visible !important;
    opacity: 1 !important;
}

#item-modal-overlay {
    z-index: 1100;
    background-color: rgba(0, 0, 0, 0.6);
}

/* Forms dentro de modal */
.modal-container-medium form,
#scheduleForm {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    flex: 1;
    max-height: 90vh;
}

/* Card footer */
.card-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

/* Modal CV genérico - Header limpio */
.modal-header-clean {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

/* Buscador del modal CV */
.modal-search-bar {
    padding: 1rem 2rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.search-input-wrapper {
    position: relative;
    max-width: 300px;
}

.search-icon-left {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.875rem;
}

.search-input-clean {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.search-input-clean:focus {
    outline: none;
    border-color: #cbd5e1;
}

.search-input-clean::placeholder {
    color: #cbd5e1;
}

/* Modal CV lista - contenedor grande */
.modal-cv-list-large {
    width: 1100px !important;
    max-width: 95% !important;
    max-height: 85vh !important;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
}

.modal-cv-list-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    padding: 0.75rem 0.75rem !important;
    background-color: #f8fafc;
    min-height: 0;
}

/* Footer del modal CV */
.modal-footer-clean {
    padding: 1rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    background: white;
}

.btn-close-clean {
    padding: 0.5rem 1.5rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close-clean:hover {
    background: #e2e8f0;
}

/* Tabla CV clean */
.table-wrapper-clean {
    padding: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.table-clean-cv {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
}

.table-clean-cv thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.75rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-clean-cv tbody td {
    padding: 0.75rem 0.75rem;
    font-size: 0.875rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    vertical-align: middle;
}

/* Anchos proporcionales columnas CV */
.table-clean-cv thead th:nth-child(1),
.table-clean-cv tbody td:nth-child(1) {
    min-width: 0;
    width: 35%;
    word-break: break-word;
}

.table-clean-cv thead th:nth-child(2),
.table-clean-cv tbody td:nth-child(2) {
    min-width: 0;
    width: 15%;
    white-space: nowrap;
}

.table-clean-cv thead th:nth-child(3),
.table-clean-cv tbody td:nth-child(3) {
    min-width: 0;
    width: 15%;
    white-space: nowrap;
}

.table-clean-cv thead th:nth-child(4),
.table-clean-cv tbody td:nth-child(4) {
    min-width: 0;
    width: 15%;
    text-align: center;
    white-space: nowrap;
}

.table-clean-cv thead th:nth-child(5),
.table-clean-cv tbody td:nth-child(5) {
    min-width: 0;
    width: 20%;
    text-align: center;
    padding-right: 8px;
    overflow: visible;
    white-space: nowrap;
}

.table-clean-cv tbody tr:hover {
    background: #f8fafc;
}

/* Grupo de botones de acción */
.action-buttons-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

/* Modal CV lista pequeño (legacy) */
.modal-cv-list-container {
    width: 800px !important;
    max-height: 70vh !important;
    border-radius: 12px;
}

#modalCVListOverlay .modal-container-xl {
    max-width: 850px !important;
    height: 75vh !important;
}


/* =====================================================================
   14. SWEETALERT2
   ===================================================================== */
.swal2-container {
    z-index: 9999999 !important;
}

body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-column) {
    overflow: hidden !important;
}

.swal2-actions {
    gap: 0.5rem !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 1.5rem !important;
}

.swal2-styled:focus {
    box-shadow: none !important;
}

.swal2-confirm, .swal2-cancel {
    font-family: 'Inter', 'Roboto', sans-serif !important;
    letter-spacing: 0.01em !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 12px 28px !important;
    min-width: 140px !important;
    border: none !important;
    outline: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.swal2-confirm:hover, .swal2-cancel:hover {
    transform: translateY(-2px);
}

.swal2-confirm.btn-swal-success {
    background: linear-gradient(to right, #0ba542, #009e36) !important;
    color: white !important;
}

.swal2-confirm.btn-swal-success:hover {
    box-shadow: 0 8px 15px rgba(11, 165, 66, 0.3) !important;
}

.swal2-confirm.btn-swal-danger {
    background: linear-gradient(to right, #c64939, #6c051d) !important;
    color: white !important;
}

.swal2-confirm.btn-swal-danger:hover {
    box-shadow: 0 8px 15px rgba(198, 73, 57, 0.3) !important;
}

.swal2-cancel.btn-swal-cancel {
    background: #64748b !important;
    color: white !important;
    margin: 0 !important;
}

.swal2-cancel.btn-swal-cancel:hover {
    background: #475569 !important;
    box-shadow: 0 8px 15px rgba(100, 116, 139, 0.3) !important;
}

.swal2-popup {
    border-radius: 16px !important;
    padding: 1.5rem !important;
    font-family: 'Inter', sans-serif !important;
    width: 28em !important;
}

.swal2-title {
    font-size: 1.35rem !important;
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
}

.swal2-html-container {
    font-size: 0.95rem !important;
    color: var(--secondary-color) !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
}

.swal2-icon {
    font-size: 0.8rem !important;
    margin-bottom: 1rem !important;
}

.swal2-actions:has(.btn-swal-confirm-green-centered) .swal2-cancel,
.swal2-actions:has(.btn-swal-confirm-red-centered) .swal2-cancel {
    display: none !important;
}

.swal2-actions:has(.btn-swal-confirm-green-centered),
.swal2-actions:has(.btn-swal-confirm-red-centered) {
    justify-content: center !important;
}


/* =====================================================================
   15. PAGINACIÓN & BUSCADOR
   ===================================================================== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 5px;
}

.page-btn {
    border: 1px solid #e2e8f0;
    background: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0f172a;
}

.page-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

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

.page-current-display {
    font-weight: 800;
    padding: 0 1.25rem;
    color: var(--primary-color);
}

/* Buscador */
.search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 520px;
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.search-box input,
.search-box .form-control {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0.62rem 1rem 0.62rem 3rem;
    border-radius: 999px;
    border: 1px solid #e6eef5;
    background-color: var(--white);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
    font-size: 0.95rem;
    color: var(--text-color);
    transition: box-shadow 0.22s ease, border-color 0.18s ease;
}

.search-box input::placeholder,
.search-box .form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-weight: 500;
}

.search-box input:focus,
.search-box .form-control:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1), 0 4px 14px rgba(15, 23, 42, 0.06);
}


/* =====================================================================
   16. WIZARD / STEPPER
   ===================================================================== */
.wizard-stepper-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 0.5rem 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.wizard-step.active {
    opacity: 1;
    transform: scale(1.1);
}

.wizard-step.completed {
    opacity: 0.8;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.wizard-step.active .step-number {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.wizard-step.completed .step-number {
    background: white;
    color: var(--primary-color);
}

.step-label {
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Wizard steps indicator (bullets) */
.wizard-steps-indicator {
    display: flex;
    gap: 10px;
}

.step-bullet {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    border: 2px solid transparent;
}

.step-bullet.active {
    background: var(--accent-color);
    border-color: white;
}

.step-bullet.completed {
    background: white;
    color: var(--primary-color);
}

/* Selección de modalidad */
.contract-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    padding: 1rem 0;
}

.contract-type-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contract-type-card i {
    font-size: 2.5rem;
    color: #94a3b8;
    transition: color 0.3s;
}

.contract-type-card span {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.contract-type-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.contract-type-card:hover i {
    color: var(--accent-color);
}

.regime-group-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--secondary-color);
    padding: 1rem 0 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1rem;
}

/* Info heredada */
.inherited-info-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    padding: 1.25rem 2rem;
    color: white;
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
}

.employee-main-data {
    margin-left: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.budget-inherited-box {
    text-align: right;
    padding: 5px 0 5px 20px;
    border-left: 3px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 200px;
    margin-left: auto;
}

.budget-inherited-box strong {
    font-size: 1.4rem;
    color: var(--accent-color);
    line-height: 1.2;
    font-family: 'Courier New', monospace;
}

.budget-inherited-box small {
    display: block;
    font-size: 0.65rem;
    opacity: 0.7;
}

.budget-inherited-box span {
    font-size: 0.75rem;
}

.wizard-body-content {
    margin-top: 10px;
}

/* Vigencia */
.vigencia-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
    color: #475569;
}

.vigencia-box strong {
    color: var(--primary-color);
}


/* =====================================================================
   17. PERFIL DE EMPLEADO
   ===================================================================== */

/* Banner principal */
.banner-employee-detail {
    background: linear-gradient(135deg, #05246c 0%, #354260 100%);
    border-radius: 16px;
    padding: 1.5rem 2.5rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 140px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.banner-employee-detail h1 {
    color: #f8fafc;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.banner-label-top {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
    display: block;
}

.banner-info-employee-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.banner-info-employee-detail h1 {
    margin: 0;
    line-height: 1.1;
    font-size: 2rem;
}

.banner-badges-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.banner-badge-info {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.banner-badge-info:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.banner-badge-info i {
    font-size: 1rem;
    color: #38bdf8;
    opacity: 0.9;
}

/* Foto de perfil */
.profile-avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #1e3a8a;
    box-shadow: var(--shadow-card);
}

.profile-avatar-wrapper-small {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.profile-avatar-img-small {
    width: 100%;
    height: 100%;
    border-radius: 20%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    outline: 2px solid #3b82f6;
}

/* Texto de perfil */
.profile-header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 30px 0;
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: 12px;
}

.profile-text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.profile-name-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.profile-id-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-main-display {
    text-align: center;
    padding: 40px 0 20px;
}

/* Módulos de navegación */
.module-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 0;
    margin-bottom: 0;
}

.module-card-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-card-item i {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #94a3b8;
    transition: color 0.3s;
}

.module-card-item span {
    font-size: 0.68rem;
    font-weight: 800;
    color: #475569;
    text-align: center;
    letter-spacing: 0.02em;
    padding: 0 5px;
    line-height: 1.2;
}

.module-card-item:hover {
    transform: translateY(-4px);
    border-color: #3b82f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.module-card-item:hover i {
    color: #3b82f6;
}

.module-card-item.active {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-bottom: 5px solid #3b82f6 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.module-card-item.active i {
    color: #3b82f6;
}

.module-card-item.active span {
    color: #1e3a8a;
}

.active-personal {
    border-bottom: 4px solid #3b82f6 !important;
    background: #eff6ff !important;
}

.active-cv {
    border-bottom: 4px solid #10b981 !important;
    background: #ecfdf5 !important;
}

.active-econ {
    border-bottom: 4px solid #0ea5e9 !important;
    background: #f0f9ff !important;
}

/* Botones detalle empleado */
.employee-detail-buttons-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px 10px;
    margin-top: 20px;
    margin-bottom: 25px;
    display: block;
    width: 100%;
}

.buttons-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.buttons-section-title i {
    color: #667eea;
}

.employee-detail-button {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.employee-detail-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--button-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.employee-detail-button.active::before,
.employee-detail-button:hover::before {
    transform: scaleX(1);
}

.employee-detail-button.active {
    border-color: var(--button-color);
    background: rgba(var(--button-color-rgb), 0.05);
}

.employee-detail-button:hover {
    border-color: var(--button-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.employee-detail-button-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--button-color);
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.employee-detail-button-label {
    color: #2c3e50;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.employee-detail-button-personal {
    --button-color: #2e4cd1;
    --button-color-rgb: 102, 126, 234;
}

.employee-detail-button-curriculum {
    --button-color: #dfbd0e;
    --button-color-rgb: 40, 167, 69;
}

.employee-detail-button-economic {
    --button-color: #17a2b8;
    --button-color-rgb: 23, 162, 184;
}

.employee-detail-button-budget {
    --button-color: #20c997;
    --button-color-rgb: 32, 201, 151;
}

.employee-detail-button-institutional {
    --button-color: #fd7e14;
    --button-color-rgb: 253, 126, 20;
}

.employee-detail-button-schedule {
    --button-color: #6610f2;
    --button-color-rgb: 102, 16, 242;
}

.employee-detail-button-history {
    --button-color: #795548;
    --button-color-rgb: 121, 85, 72;
}

.employee-detail-button-permissions {
    --button-color: #e91e63;
    --button-color-rgb: 233, 30, 99;
}

.employee-detail-button-actions {
    --button-color: #9c27b0;
    --button-color-rgb: 156, 39, 176;
}

.employee-detail-button-vacations {
    --button-color: #ff9800;
    --button-color-rgb: 255, 152, 0;
}

.employee-detail-button-sanctions {
    --button-color: #7c8597;
    --button-color-rgb: 255, 152, 0;
}

.employee-detail-button-payments {
    --button-color: #44a641;
    --button-color-rgb: 255, 152, 0;
}

/* Layout detalle */
.container-custom {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}

.detail-top-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 2rem;
}

.detail-bottom-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    margin-top: 2rem;
}

.detail-top-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 1.5rem;
}

.card-static-short {
    height: 240px;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1.5rem !important;
    overflow: hidden;
}

/* Wrapper card genérico para contenido + tabla */
.card {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid #e8edf4;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.03);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.occupant-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Grid info personal */
.grid-info-personal {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

body.employee-dashboard-page .grid-info-personal {
    grid-template-columns: repeat(2, 1fr);
}

body.employee-dashboard-page .grid-info-personal > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    body:not(.employee-dashboard-page) .grid-info-personal {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 992px) {
    body:not(.employee-dashboard-page) .grid-info-personal {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-info-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-box-styled {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #cbd5e1;
}

/* Colores de borde info */
.personal-border {
    border-left-color: #2e4cd1;
}

.contact-border {
    border-left-color: #17a2b8;
}

.additional-border {
    border-left-color: #06630f;
}

.location-border {
    border-left-color: #fd7e14;
}

.medical-border {
    border-left-color: #069800;
}

.emergency-border {
    border-left-color: #ffb673;
}

.border-left-primary {
    border-left: 5px solid var(--primary-color) !important;
}

.info-data-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.info-data-row:last-child {
    border-bottom: none;
}

.info-data-row label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.info-data-row span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

/* Person info en tabla */
.person-info {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-direction: row !important;
}

.person-avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #e5e7eb !important;
    flex-shrink: 0 !important;
}

.person-avatar-placeholder {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background-color: #f3f4f6 !important;
    color: #6b7280 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    border: 2px solid #e5e7eb !important;
    flex-shrink: 0 !important;
}

.person-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.125rem !important;
}

.person-details h4 {
    margin: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    line-height: 1.2 !important;
}

.person-details p {
    margin: 0 !important;
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    line-height: 1.2 !important;
}

/* Salario */
.salary-detail-card {
    background-color: #f0fdf4;
    border-left: 4px solid var(--accent-color);
    padding: 1.2rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.salary-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: #166534;
}

.rmu-detail-box {
    background-color: #f0fdf4;
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.rmu-detail-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #166534;
}

/* Historial */
.history-log-box, .log-scroll-box, .detail-log-area {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'ui-monospace', monospace;
    font-size: 0.85rem;
    color: var(--text-color);
    white-space: pre-line;
    overflow-y: auto;
}

.history-log-box {
    max-height: 250px;
    color: var(--text-color);
}

.log-scroll-box {
    min-height: 120px;
    color: #475569;
}

.detail-log-area {
    max-height: 200px;
    color: #475569;
}

.audit-data-row, .audit-row-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}

.audit-row-item {
    padding: 8px 0;
}

.history-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    background: white;
    box-shadow: var(--shadow-soft);
}

.history-footer-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding-left: 2rem;
    margin: 1rem 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -31px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--accent-color);
    z-index: 2;
}

.timeline-marker.status-finalizado {
    border-color: #cbd5e1;
}

.timeline-marker.status-actual {
    border-color: #22c55e;
}

/* Diff */
.diff-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
}

.diff-old {
    background: #fee2e2;
    color: #991b1b;
    padding: 5px 10px;
    border-radius: 4px;
}

.diff-new {
    background: #dcfce7;
    color: #166534;
    padding: 5px 10px;
    border-radius: 4px;
}


/* =====================================================================
   18. CURRICULUM VITAE
   ===================================================================== */
.cv-action-banner {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.cv-action-title {
    color: #166534;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.grid-cv-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.cv-buttons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.btn-cv-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-cv-new {
    background-color: #ecfdf5;
    color: #059669;
    border-color: #10b98133;
}

.btn-cv-new:hover {
    background-color: #10b981;
    color: white;
    transform: translateY(-2px);
}

.btn-cv-list {
    background-color: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.btn-cv-list:hover {
    background-color: #1e293b;
    color: white;
    transform: translateY(-2px);
}

.cv-stat-inner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    margin: 10px 0;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
}

.cv-stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.cv-stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 5px;
}

.cv-buttons-centered {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

.btn-cv-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    width: 120px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-cv-pill.new {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.btn-cv-pill.list {
    background-color: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.btn-cv-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-cv-pill.new:hover {
    background-color: #16a34a;
    color: white;
}

.btn-cv-pill.list:hover {
    background-color: #1e293b;
    color: white;
}

/* Tabla CV mini */
.table-cv-mini {
    font-size: 0.82rem !important;
}

.table-cv-mini th {
    padding: 8px 12px !important;
    background: #f8fafc !important;
    color: #475569 !important;
}

.table-cv-mini td {
    padding: 6px 12px !important;
    border-bottom: 1px solid #f1f5f9;
}

.table-cv-compact {
    font-size: 0.85rem;
}

.table-cv-compact th, .table-cv-compact td {
    padding: 10px 8px !important;
    font-size: 0.85rem !important;
}

.table-cv-compact th {
    background: #f8fafc;
    padding: 12px 8px !important;
}


/* =====================================================================
   19. MÓDULOS ESPECÍFICOS
   ===================================================================== */

/* Horarios - Shift Cards */
.shift-card {
    border: 1px solid #eef2f6;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.shift-card.disabled {
    background: #f8fafc;
    opacity: 0.7;
    border-style: dashed;
}

.shift-header {
    padding: 10px 15px;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.05em;
}

.shift-card.morning .shift-header {
    background: #3b82f6;
}

.shift-card.afternoon .shift-header {
    background: #10b981;
}

.shift-body {
    padding: 15px;
    min-height: 100px;
    flex: 1;
}

/* Matriz de Días */
.days-matrix {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.day-item {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    user-select: none;
}

.day-item:hover {
    border-color: var(--accent-color);
    background: #f0fdf4;
}

.day-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.day-label {
    font-weight: 800;
    font-size: 0.85rem;
}

/* Permisos - Toggles */
.permissions-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.toggle-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.2;
}

.toggle-hint {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.2;
}

/* Toggle header accordeon */
.toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toggle-header:hover {
    background-color: #f1f5f9;
}

.toggle-header.active-header {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.toggle-content {
    background-color: #fff;
    border: 1px solid #bbf7d0;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease-out;
}

.expandable-container {
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

/* Roles - Template Chips */
.template-selector-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 2.5rem !important;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}

.template-label {
    font-size: 0.9rem;
    font-weight: 800;
    color: #475569;
    letter-spacing: 0.05em;
    width: 100%;
}

.template-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.template-chip {
    cursor: pointer;
    position: relative;
}

.template-chip input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.template-chip span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.template-chip:hover span {
    background-color: #f1f5f9;
}

.template-chip input:checked + span {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.template-chip.admin input:checked + span {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

.template-chip.manager input:checked + span {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.1);
}

.template-chip.creator input:checked + span {
    background-color: #fef9c3;
    color: #ca8a04;
    border-color: #ca8a04;
    box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.1);
}

.template-chip.editor input:checked + span {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.template-chip.read input:checked + span {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.1);
}

/* Permisos - Module cards */
.permissions-scroll-area {
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.module-permission-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.module-body {
    overflow-x: auto;
}

.module-header {
    background-color: #334155;
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.empty-permissions-state {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    color: #94a3b8;
}

.empty-permissions-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #f59e0b;
}

#role-modal-app .form-group {
    margin-bottom: 2rem !important;
}

/* Module nav button */
.module-nav-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.module-btn {
    flex: 0 0 110px;
    height: 100px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 10px;
    text-align: center;
}

.module-btn .module-icon {
    width: 40px;
    height: 40px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: #475569;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.module-btn span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1.1;
    text-transform: capitalize;
}

.module-btn:hover {
    border-color: #3b82f6;
    background-color: #f0f7ff;
    transform: translateY(-3px);
}

.module-btn.active {
    border-color: #2563eb;
    background-color: #eff6ff;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
}

.module-btn.active .module-icon {
    background: #2563eb;
    color: #fff;
}

.module-btn.active span {
    color: #1e40af;
}

/* Unit grid */
.unit-dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.25rem;
    align-items: end;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.unit-level-box {
    animation: fadeInDown 0.3s ease-out;
}

.unit-level-box label {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* Quick view */
.quick-view-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.quick-view-banner {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2.5rem 1rem;
    border-bottom: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.quick-view-body-padding {
    padding: 2rem;
}

/* Dropdowns z-index */
.select2-container--default .select2-selection--single:focus {
    border-color: #3b82f6;
    background-color: #fff;
}

.select2-container--default .select2-selection--multiple:focus {
    border-color: #3b82f6;
    background-color: #fff;
}

/* FIX Select2 en modales */
.select2-container--default.select2-field .select2-selection--single,
.select2-container--default.select2-field .select2-selection--multiple {
    border-color: #cbd5e1;
    background-color: #fcfcfc;
}

.select2-container--default.select2-field.select2-container--focus .select2-selection--single,
.select2-container--default.select2-field.select2-container--focus .select2-selection--multiple {
    border-color: #3b82f6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Número transitorio */
.number {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}


/* =====================================================================
   20. RESPONSIVE
   ===================================================================== */
@media (max-width: 1200px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .detail-top-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .detail-top-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-row {
        flex-direction: column;
    }

    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .grid-2-cols, .grid-3-cols, .grid-4-cols {
        grid-template-columns: 1fr;
        gap: 1rem !important;
    }

    .grid-info-secondary {
        grid-template-columns: 1fr;
    }

    .modal-footer-medium, .modal-footer-spaced {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-cancel, .btn-save {
        width: 100%;
        min-width: auto;
    }
}

@media (min-width: 768px) {
    body.employee-dashboard-page .grid-info-personal {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .permissions-toggle-grid {
        grid-template-columns: 1fr;
    }

    .quick-view-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .photo-uploader-wrapper {
        margin-right: 0 !important;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .btn-create-action, .btn-success-action, .btn-views-action,
    .btn-detail-action, .btn-delete-action, .btn-restore-action,
    .btn-list-action, .btn-info-action {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .search-box input, .search-box .form-control {
        font-size: 0.9rem;
        padding-left: 2.4rem;
    }

    .btn-search {
        padding: 0.45rem 0.7rem;
        font-size: 0.9rem;
    }

    .stat-card:hover {
        transform: translateY(-2px) scale(1.002);
        box-shadow: 0 6px 12px rgba(16, 24, 40, 0.07);
    }

    .stat-card:hover .stat-icon {
        transform: translateY(-1px) scale(1.02);
    }

    .select2-container--default .select2-selection--single,
    .select2-container--default .select2-selection--multiple {
        min-height: 38px;
    }
}

@media (min-width: 1200px) {
    .grid-cv-sections {
        grid-template-columns: 1.2fr 0.8fr;
    }
}


/* =====================================================================
   21. ANIMACIONES & KEYFRAMES
   ===================================================================== */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

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

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

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

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

.header-card-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.header-card-info h2 {
    color: white;
    margin: 0;
    font-size: 1.4rem;
}

.header-card-info p {
    color: var(--text-muted);
    margin: 5px 0 0 0;
    font-size: 0.9rem;
}