/* =====================================================================
   MÓDULO: ASISTENCIA Y RECURSOS HUMANOS (RRHH) - ESTILOS COMPLETOS
======================================================================== */

/* Contenedor general */
.rrhh-app-container {
    padding-bottom: 50px;
}

/* Encabezado del módulo */
.rrhh-header-toolbar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 18px !important;
    padding: 20px 24px !important;
    margin-bottom: 22px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .rrhh-header-toolbar {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.rrhh-icon-badge {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    background: rgba(var(--primary-rgb, 242,129,24), 0.12) !important;
    border: 1px solid rgba(var(--primary-rgb, 242,129,24), 0.25) !important;
    color: var(--primary, #f28118) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    flex-shrink: 0 !important;
}

.rrhh-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.live-clock-pill {
    background: rgba(0, 0, 0, 0.25) !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* Tabs */
.rrhh-tab-content {
    display: none;
    animation: fadeInRRHHTab 0.2s ease;
}

.rrhh-tab-content.active {
    display: block;
}

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

/* KPI Cards */
.rrhh-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
    gap: 16px !important;
    margin-bottom: 22px !important;
}

.rrhh-kpi-card {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .rrhh-kpi-card {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-kpi-card .rrhh-kpi-label {
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: var(--text-muted, #64748b) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
}

.rrhh-kpi-card .rrhh-kpi-value {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: var(--text-main, #0f172a) !important;
    line-height: 1.1 !important;
}

body.dark-mode .rrhh-kpi-card .rrhh-kpi-value {
    color: #f8fafc !important;
}

.rrhh-kpi-card .rrhh-kpi-sub {
    font-size: 12px !important;
    color: var(--text-muted, #64748b) !important;
    margin-top: 6px !important;
}

.rrhh-kpi-card.info .rrhh-kpi-value { color: #2563eb !important; }
.rrhh-kpi-card.success .rrhh-kpi-value { color: #16a34a !important; }
.rrhh-kpi-card.warning .rrhh-kpi-value { color: #d97706 !important; }
.rrhh-kpi-card.danger .rrhh-kpi-value { color: #dc2626 !important; }

body.dark-mode .rrhh-kpi-card.info .rrhh-kpi-value { color: #60a5fa !important; }
body.dark-mode .rrhh-kpi-card.success .rrhh-kpi-value { color: #34d399 !important; }
body.dark-mode .rrhh-kpi-card.warning .rrhh-kpi-value { color: #fbbf24 !important; }
body.dark-mode .rrhh-kpi-card.danger .rrhh-kpi-value { color: #f87171 !important; }

/* Contenedores de Tarjetas y Tablas */
.rrhh-card,
.rrhh-app-container .table-responsive {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 18px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    overflow-x: auto !important;
    margin-bottom: 22px !important;
}

body.dark-mode .rrhh-card,
body.dark-mode .rrhh-app-container .table-responsive {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 22px !important;
    border-bottom: 1px solid var(--border-color, #e2e8f0) !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

body.dark-mode .rrhh-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.rrhh-card-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-main, #0f172a) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
}

body.dark-mode .rrhh-card-title {
    color: #f8fafc !important;
}

/* =====================================================================
   TABLAS ESTILIZADAS PARA RRHH (LIGHT & DARK MODE)
======================================================================== */
.rrhh-mobile-row-summary-badge {
    display: none !important;
}

.rrhh-app-container table,
.rrhh-app-container .rrhh-table,
.rrhh-app-container .modern-table,
.rrhh-app-container .data-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    text-align: left !important;
    margin: 0 !important;
}

@media (min-width: 769px) {
    .rrhh-app-container table thead,
    .rrhh-app-container .rrhh-table thead,
    .rrhh-app-container .modern-table thead,
    .rrhh-app-container .data-table thead {
        display: table-header-group !important;
        background: #f8fafc !important;
        border-bottom: 2px solid #e2e8f0 !important;
    }

    body.dark-mode .rrhh-app-container table thead,
    body.dark-mode .rrhh-app-container .rrhh-table thead,
    body.dark-mode .rrhh-app-container .modern-table thead,
    body.dark-mode .rrhh-app-container .data-table thead {
        background: #131b2e !important;
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }

    .rrhh-app-container table th,
    .rrhh-app-container .rrhh-table th,
    .rrhh-app-container .modern-table th,
    .rrhh-app-container .data-table th {
        padding: 13px 16px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.6px !important;
        color: #64748b !important;
        background: #f8fafc !important;
        border: none !important;
        vertical-align: middle !important;
        white-space: nowrap !important;
        display: table-cell !important;
    }

    body.dark-mode .rrhh-app-container table th,
    body.dark-mode .rrhh-app-container .rrhh-table th,
    body.dark-mode .rrhh-app-container .modern-table th,
    body.dark-mode .rrhh-app-container .data-table th {
        background: #131b2e !important;
        color: #94a3b8 !important;
    }

    .rrhh-app-container table td,
    .rrhh-app-container .rrhh-table td,
    .rrhh-app-container .modern-table td,
    .rrhh-app-container .data-table td {
        padding: 13px 16px !important;
        font-size: 13.5px !important;
        color: #1e293b !important;
        border-bottom: 1px solid #f1f5f9 !important;
        vertical-align: middle !important;
        background: transparent !important;
        display: table-cell !important;
    }

    body.dark-mode .rrhh-app-container table td,
    body.dark-mode .rrhh-app-container .rrhh-table td,
    body.dark-mode .rrhh-app-container .modern-table td,
    body.dark-mode .rrhh-app-container .data-table td {
        color: #f1f5f9 !important;
        border-bottom-color: rgba(255, 255, 255, 0.05) !important;
    }

    .rrhh-app-container table tbody tr,
    .rrhh-app-container .rrhh-table tbody tr,
    .rrhh-app-container .modern-table tbody tr,
    .rrhh-app-container .data-table tbody tr {
        display: table-row !important;
        transition: background 0.15s ease !important;
    }

    .rrhh-app-container table tbody tr::after,
    .rrhh-app-container .rrhh-table tbody tr::after,
    .rrhh-app-container .modern-table tbody tr::after,
    .rrhh-app-container .data-table tbody tr::after {
        display: none !important;
        content: none !important;
    }

    .rrhh-app-container table tbody tr:hover td,
    .rrhh-app-container .rrhh-table tbody tr:hover td,
    .rrhh-app-container .modern-table tbody tr:hover td,
    .rrhh-app-container .data-table tbody tr:hover td {
        background: rgba(248, 250, 252, 0.85) !important;
    }

    body.dark-mode .rrhh-app-container table tbody tr:hover td,
    body.dark-mode .rrhh-app-container .rrhh-table tbody tr:hover td,
    body.dark-mode .rrhh-app-container .modern-table tbody tr:hover td,
    body.dark-mode .rrhh-app-container .data-table tbody tr:hover td {
        background: rgba(255, 255, 255, 0.025) !important;
    }
        background: rgba(255, 255, 255, 0.025) !important;
    }
}

/* =====================================================================
   FILAS DESPLEGABLES (ACORDEÓN) EN VISTA RESPONSIVE (<= 768px)
======================================================================== */
@media (max-width: 768px) {
    .rrhh-app-container .table-responsive {
        overflow-x: hidden !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .rrhh-app-container table,
    .rrhh-app-container .rrhh-table {
        display: block !important;
        width: 100% !important;
        background: transparent !important;
    }

    .rrhh-app-container table thead,
    .rrhh-app-container .rrhh-table thead {
        display: none !important;
    }

    .rrhh-app-container table tbody,
    .rrhh-app-container .rrhh-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .rrhh-app-container table tbody tr,
    .rrhh-app-container .rrhh-table tbody tr {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: var(--card-bg, #ffffff) !important;
        border: 1px solid var(--border-color, #e2e8f0) !important;
        border-radius: 16px !important;
        padding: 13px 44px 13px 14px !important;
        margin: 0 !important;
        position: relative !important;
        cursor: pointer !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
        transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    }

    body.dark-mode .rrhh-app-container table tbody tr,
    body.dark-mode .rrhh-app-container .rrhh-table tbody tr {
        background: #18181b !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
    }

    .rrhh-app-container table tbody tr.expanded,
    .rrhh-app-container .rrhh-table tbody tr.expanded {
        padding: 14px 15px !important;
        border-color: rgba(var(--primary-rgb, 242,129,24), 0.45) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07) !important;
    }

    /* Ícono Chevron de despliegue en la esquina derecha */
    .rrhh-app-container table tbody tr::after,
    .rrhh-app-container .rrhh-table tbody tr::after {
        content: '\f107' !important;
        font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free' !important;
        font-weight: 900 !important;
        position: absolute !important;
        top: 50% !important;
        right: 12px !important;
        transform: translateY(-50%) !important;
        width: 26px !important;
        height: 26px !important;
        border-radius: 8px !important;
        background: rgba(var(--primary-rgb, 242,129,24), 0.12) !important;
        color: var(--primary, #f28118) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        transition: transform 0.25s ease, background 0.2s ease !important;
        pointer-events: none !important;
    }

    .rrhh-app-container table tbody tr.expanded::after,
    .rrhh-app-container .rrhh-table tbody tr.expanded::after {
        top: 16px !important;
        transform: rotate(180deg) !important;
        background: var(--primary, #f28118) !important;
        color: #ffffff !important;
    }

    /* Primera celda (Resumen principal siempre visible tanto colapsado como expandido) */
    .rrhh-app-container table tbody tr td:first-child,
    .rrhh-app-container .rrhh-table tbody tr td:first-child,
    .rrhh-table tbody tr td:first-child,
    tr.rrhh-expandable-row td:first-child {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
        color: var(--text-main, #0f172a) !important;
        background: transparent !important;
    }

    body.dark-mode .rrhh-app-container table tbody tr td:first-child,
    body.dark-mode .rrhh-app-container .rrhh-table tbody tr td:first-child,
    body.dark-mode .rrhh-table tbody tr td:first-child,
    body.dark-mode tr.rrhh-expandable-row td:first-child {
        color: #f8fafc !important;
    }

    .rrhh-app-container table tbody tr td:first-child::before,
    .rrhh-app-container .rrhh-table tbody tr td:first-child::before,
    .rrhh-table tbody tr td:first-child::before,
    tr.rrhh-expandable-row td:first-child::before {
        display: none !important;
        content: none !important;
    }

    .rrhh-app-container table tbody tr:not(.expanded) .rrhh-mobile-row-summary-badge,
    .rrhh-table tbody tr:not(.expanded) .rrhh-mobile-row-summary-badge,
    tr.rrhh-expandable-row:not(.expanded) .rrhh-mobile-row-summary-badge {
        display: inline-flex !important;
        align-items: center !important;
    }

    .rrhh-app-container table tbody tr.expanded td:first-child,
    .rrhh-app-container .rrhh-table tbody tr.expanded td:first-child,
    .rrhh-table tbody tr.expanded td:first-child,
    tr.rrhh-expandable-row.expanded td:first-child {
        padding: 0 34px 12px 0 !important;
        margin-bottom: 4px !important;
        border-bottom: 1px solid var(--border-color, #e2e8f0) !important;
    }

    body.dark-mode .rrhh-app-container table tbody tr.expanded td:first-child,
    body.dark-mode .rrhh-app-container .rrhh-table tbody tr.expanded td:first-child,
    body.dark-mode .rrhh-table tbody tr.expanded td:first-child,
    body.dark-mode tr.rrhh-expandable-row.expanded td:first-child {
        border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Ocultar celdas secundarias cuando la fila está colapsada */
    .rrhh-app-container table tbody tr:not(.expanded) td:not(:first-child),
    .rrhh-app-container .rrhh-table tbody tr:not(.expanded) td:not(:first-child),
    .rrhh-table tbody tr:not(.expanded) td:not(:first-child),
    tr.rrhh-expandable-row:not(.expanded) td:not(:first-child) {
        display: none !important;
    }

    /* Mostrar celdas secundarias desplegadas verticalmente cuando tr.expanded */
    .rrhh-app-container table tbody tr.expanded td:not(:first-child),
    .rrhh-app-container .rrhh-table tbody tr.expanded td:not(:first-child),
    .rrhh-table tbody tr.expanded td:not(:first-child),
    tr.rrhh-expandable-row.expanded td:not(:first-child) {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 9px 0 !important;
        border-bottom: 1px dashed rgba(148, 163, 184, 0.25) !important;
        font-size: 13px !important;
        color: var(--text-main, #1e293b) !important;
        text-align: right !important;
        box-sizing: border-box !important;
    }

    body.dark-mode .rrhh-app-container table tbody tr.expanded td:not(:first-child),
    body.dark-mode .rrhh-app-container .rrhh-table tbody tr.expanded td:not(:first-child),
    body.dark-mode .rrhh-table tbody tr.expanded td:not(:first-child),
    body.dark-mode tr.rrhh-expandable-row.expanded td:not(:first-child) {
        color: #f1f5f9 !important;
        border-bottom-color: rgba(255, 255, 255, 0.07) !important;
    }

    .rrhh-app-container table tbody tr.expanded td:not(:first-child)::before,
    .rrhh-app-container .rrhh-table tbody tr.expanded td:not(:first-child)::before,
    .rrhh-table tbody tr.expanded td:not(:first-child)::before,
    tr.rrhh-expandable-row.expanded td:not(:first-child)::before {
        content: attr(data-label) !important;
        display: inline-block !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.4px !important;
        color: var(--text-muted, #64748b) !important;
        text-align: left !important;
        flex-shrink: 0 !important;
    }

    .rrhh-app-container table tbody tr.expanded td:last-child,
    .rrhh-app-container .rrhh-table tbody tr.expanded td:last-child,
    .rrhh-table tbody tr.expanded td:last-child,
    tr.rrhh-expandable-row.expanded td:last-child {
        border-bottom: none !important;
        padding-top: 12px !important;
        padding-bottom: 2px !important;
    }

    /* Filas vacías o de estado de carga (con colspan) */
    .rrhh-app-container table tbody tr.rrhh-empty-row,
    .rrhh-app-container table tbody tr:has(td[colspan]) {
        padding: 22px 16px !important;
        cursor: default !important;
    }

    .rrhh-app-container table tbody tr.rrhh-empty-row::after,
    .rrhh-app-container table tbody tr:has(td[colspan])::after {
        display: none !important;
        content: none !important;
    }

    .rrhh-app-container table tbody tr.rrhh-empty-row td,
    .rrhh-app-container table tbody tr:has(td[colspan]) td {
        justify-content: center !important;
        text-align: center !important;
    }
}

/* Avatar circular de usuario */
.rrhh-avatar-circle {
    width: 38px !important;
    height: 38px !important;
    border-radius: 11px !important;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25) !important;
    text-transform: uppercase !important;
}

/* Botones de acción en tabla */
.btn-action-round {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    cursor: pointer !important;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    text-decoration: none !important;
    font-size: 12.5px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    flex-shrink: 0 !important;
}

.btn-action-round:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.btn-action-round.rrhh-btn-edit:hover {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
    color: #2563eb !important;
}

.btn-action-round.rrhh-btn-sheet:hover {
    background: #f5f3ff !important;
    border-color: #c4b5fd !important;
    color: #7c3aed !important;
}

.btn-action-round.rrhh-btn-link:hover {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #059669 !important;
}

.btn-action-round.rrhh-btn-ext:hover {
    background: #fff7ed !important;
    border-color: #fed7aa !important;
    color: #ea580c !important;
}

body.dark-mode .btn-action-round {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

body.dark-mode .btn-action-round.rrhh-btn-edit:hover {
    background: rgba(37, 99, 235, 0.2) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

body.dark-mode .btn-action-round.rrhh-btn-sheet:hover {
    background: rgba(124, 58, 237, 0.2) !important;
    border-color: #8b5cf6 !important;
    color: #a78bfa !important;
}

body.dark-mode .btn-action-round.rrhh-btn-link:hover {
    background: rgba(5, 150, 105, 0.2) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
}

body.dark-mode .btn-action-round.rrhh-btn-ext:hover {
    background: rgba(234, 88, 12, 0.2) !important;
    border-color: #f97316 !important;
    color: #fb923c !important;
}

/* Status Pills */
.rrhh-status-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
}

.rrhh-status-pill.success {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.rrhh-status-pill.danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.rrhh-status-pill.warning {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.rrhh-status-pill.secondary {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.rrhh-status-pill.dark {
    background: #e2e8f0 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

body.dark-mode .rrhh-status-pill.success {
    background: rgba(16, 185, 129, 0.18) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

body.dark-mode .rrhh-status-pill.danger {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

body.dark-mode .rrhh-status-pill.warning {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

body.dark-mode .rrhh-status-pill.secondary {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

/* Time Badges */
.rrhh-time-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

body.dark-mode .rrhh-time-badge {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
}

/* Miniatura de fotos selfies */
.photo-thumb {
    width: 38px !important;
    height: 38px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    border: 1.5px solid #cbd5e1 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.photo-thumb:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body.dark-mode .photo-thumb {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Ficha de Personal - Banner Superior */
.rrhh-sheet-profile-card {
    background: var(--card-bg, #ffffff) !important;
    border: 1px solid var(--border-color, #e2e8f0) !important;
    border-radius: 18px !important;
    padding: 22px 26px !important;
    margin-bottom: 22px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .rrhh-sheet-profile-card {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Botonera de tipo de marcación en el Widget */
.punch-action-selector-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
}

.punch-action-selector-btn {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 2px solid #e2e8f0 !important;
    color: #64748b !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
}

body.dark-mode .punch-action-selector-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}

.punch-action-selector-btn:hover {
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

body.dark-mode .punch-action-selector-btn:hover {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.punch-action-selector-btn.active[data-type="entrada"] {
    background: #dcfce7 !important;
    border-color: #16a34a !important;
    color: #15803d !important;
}

.punch-action-selector-btn.active[data-type="inicio_refrigerio"] {
    background: #fef3c7 !important;
    border-color: #d97706 !important;
    color: #b45309 !important;
}

.punch-action-selector-btn.active[data-type="fin_refrigerio"] {
    background: #dbeafe !important;
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
}

.punch-action-selector-btn.active[data-type="salida"] {
    background: #fee2e2 !important;
    border-color: #dc2626 !important;
    color: #b91c1c !important;
}

body.dark-mode .punch-action-selector-btn.active[data-type="entrada"] {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #34d399 !important;
}

body.dark-mode .punch-action-selector-btn.active[data-type="inicio_refrigerio"] {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fbbf24 !important;
}

body.dark-mode .punch-action-selector-btn.active[data-type="fin_refrigerio"] {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

body.dark-mode .punch-action-selector-btn.active[data-type="salida"] {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}

/* Inputs de configuración y formularios */
#cfgHRDefaultTolerance, #cfgHRRateMinute, #cfgHRAbsenceDay,
#editEmployeeHRForm input, #editEmployeeHRForm select,
#addHRPaymentForm input, #addHRPaymentForm select, #addHRPaymentForm textarea,
#addHRDeductionForm input, #addHRDeductionForm select, #addHRDeductionForm textarea {
    padding: 10px 14px !important;
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13.5px !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

body.dark-mode #cfgHRDefaultTolerance, body.dark-mode #cfgHRRateMinute, body.dark-mode #cfgHRAbsenceDay,
body.dark-mode #editEmployeeHRForm input, body.dark-mode #editEmployeeHRForm select,
body.dark-mode #addHRPaymentForm input, body.dark-mode #addHRPaymentForm select, body.dark-mode #addHRPaymentForm textarea,
body.dark-mode #addHRDeductionForm input, body.dark-mode #addHRDeductionForm select, body.dark-mode #addHRDeductionForm textarea {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
}


/* Filtros y Buscadores de RRHH */
#rrhhWorkersSearchInput, #rrhhWorkersRoleFilter, #rrhhWorkersStatusFilter, #rrhhSheetWorkerSelect, #rrhhSheetMonthSelect, #hrApplicantsSearch, #hrApplicantsStatusFilter {
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    padding: 10px 14px !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
}

#rrhhWorkersSearchInput, #hrApplicantsSearch {
    padding-left: 38px !important;
}

body.dark-mode #rrhhWorkersSearchInput, 
body.dark-mode #rrhhWorkersRoleFilter, 
body.dark-mode #rrhhWorkersStatusFilter, 
body.dark-mode #rrhhSheetWorkerSelect, 
body.dark-mode #rrhhSheetMonthSelect,
body.dark-mode #hrApplicantsSearch,
body.dark-mode #hrApplicantsStatusFilter {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
}

/* =====================================================================
   POLÍTICAS DE ASISTENCIA (CARDS CON CONTRASTE MODO CLARO / OSCURO)
======================================================================== */
.policy-switch-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.policy-switch-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.policy-switch-card.danger-policy {
    background: #fffafb;
    border-color: #fecaca;
}

.policy-switch-card.danger-policy:hover {
    border-color: #fca5a5;
}

.hr-config-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13.5px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.hr-config-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

body.dark-mode .hr-config-input {
    background: #18181b !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

body.dark-mode .hr-config-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

body.dark-mode .policy-switch-card {
    background: #18181b;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode .policy-switch-card.danger-policy {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.25);
}

.policy-switch-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .policy-switch-title {
    color: #f8fafc;
}

.policy-switch-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

body.dark-mode .policy-switch-desc {
    color: #94a3b8;
}

/* =====================================================================
   GOOGLE AUTHENTICATOR ADMIN TOTP CARD (MODO CLARO Y MODO OSCURO)
======================================================================== */
.admin-totp-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

body.dark-mode .admin-totp-card {
    background: #18181b;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.totp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

body.dark-mode .totp-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

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

.totp-shield-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.28);
    flex-shrink: 0;
}

.totp-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.2px;
}

body.dark-mode .totp-card-title {
    color: #f8fafc;
}

.totp-card-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    display: block;
}

body.dark-mode .totp-card-subtitle {
    color: #94a3b8;
}

.btn-totp-regen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-totp-regen:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

body.dark-mode .btn-totp-regen {
    background: #27272a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

body.dark-mode .btn-totp-regen:hover {
    background: #3f3f46;
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.totp-card-content {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.totp-qr-box {
    background: #ffffff;
    padding: 10px;
    border-radius: 14px;
    border: 1.5px solid #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.dark-mode .totp-qr-box {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.totp-qr-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.totp-instructions-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.totp-steps-text {
    font-size: 12.5px;
    line-height: 1.55;
    color: #334155;
}

body.dark-mode .totp-steps-text {
    color: #cbd5e1;
}

.totp-steps-text strong {
    color: #0f172a;
    font-weight: 700;
}

body.dark-mode .totp-steps-text strong {
    color: #ffffff;
}

.totp-secret-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.totp-secret-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

body.dark-mode .totp-secret-label {
    color: #94a3b8;
}

.totp-secret-code {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0284c7;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    padding: 5px 12px;
    border-radius: 8px;
    user-select: all;
}

body.dark-mode .totp-secret-code {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #38bdf8;
}

.btn-totp-copy {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-totp-copy:hover {
    background: #e2e8f0;
    color: #0f172a;
}

body.dark-mode .btn-totp-copy {
    background: #27272a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

body.dark-mode .btn-totp-copy:hover {
    background: #3f3f46;
    color: #ffffff;
}

.totp-live-test-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.totp-test-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

body.dark-mode .totp-test-label {
    color: #94a3b8;
}

.totp-live-badge {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 17px;
    font-weight: 800;
    color: #059669;
    background: #ecfdf5;
    border: 1.5px solid #a7f3d0;
    padding: 3px 12px;
    border-radius: 8px;
    letter-spacing: 3px;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

body.dark-mode .totp-live-badge {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

/* =====================================================================
   PESTAÑAS HORIZONTALES DESLIZABLES (1 SOLA FILA SIN CORTE DE TEXTO)
======================================================================== */
.rrhh-tabs-scroll-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    display: block !important;
}

.rrhh-nav-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: max-content !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-behavior: smooth !important;
    touch-action: pan-x !important;
    overscroll-behavior-x: contain !important;
    gap: 6px !important;
    padding: 5px !important;
    border-radius: 14px !important;
}

.rrhh-nav-pills::-webkit-scrollbar {
    display: none !important;
}

.rrhh-nav-pills .inventory-tab-btn {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    min-height: 40px !important;
    line-height: 1.2 !important;
    border-radius: 10px !important;
}

.rrhh-nav-pills .inventory-tab-btn i,
.rrhh-nav-pills .inventory-tab-btn span {
    white-space: nowrap !important;
    display: inline-block !important;
}

/* =====================================================================
   BOLSA DE TRABAJO: BARRA SEGMENTADA BANDEJA VS CONSTRUCTOR
======================================================================== */
.rrhh-jobs-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    background: var(--card-bg, #ffffff);
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

body.dark-mode .rrhh-jobs-nav-bar {
    background: #18181b;
    border-color: rgba(255, 255, 255, 0.08);
}

.rrhh-jobs-segmented-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

body.dark-mode .rrhh-jobs-segmented-switch {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.rrhh-subtab-btn {
    border-radius: 9px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 9px 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.rrhh-subtab-btn:not(.btn-primary) {
    background: transparent !important;
    color: var(--text-muted, #64748b) !important;
    box-shadow: none !important;
}

.rrhh-subtab-btn .subtab-text-short {
    display: none;
}

.rrhh-jobs-quick-links {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.rrhh-job-link-btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    padding: 8px 14px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

/* =====================================================================
   BOTÓN FLOTANTE Y DRAWER (DERECHA A IZQUIERDA) - SOLO RESPONSIVE
======================================================================== */
.rrhh-mobile-only-drawer-btn,
.rrhh-mobile-fab,
.rrhh-mobile-drawer-backdrop,
.rrhh-mobile-drawer {
    display: none;
}

@media (max-width: 768px) {
    /* Contenedor con espacio para barra inferior y FAB */
    .rrhh-app-container {
        padding-bottom: 105px !important;
    }

    /* Cabecera RRHH limpia estilo App */
    .rrhh-header-toolbar {
        padding: 14px 16px !important;
        border-radius: 16px !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
    }

    .rrhh-title-wrap {
        gap: 12px !important;
        align-items: flex-start !important;
    }

    .rrhh-icon-badge {
        width: 42px !important;
        height: 42px !important;
        border-radius: 12px !important;
        font-size: 18px !important;
    }

    .rrhh-title-texts h2 {
        font-size: 1.1rem !important;
        line-height: 1.25 !important;
    }

    .rrhh-title-texts p {
        font-size: 11.5px !important;
        line-height: 1.35 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* En móvil ocultamos botones secundarios redundantes de la cabecera porque están en el Drawer */
    .rrhh-desktop-only-action {
        display: none !important;
    }

    .rrhh-header-actions {
        width: 100% !important;
        display: flex !important;
    }

    .rrhh-punch-main-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 11px 16px !important;
        font-size: 13.5px !important;
        border-radius: 12px !important;
    }

    /* Pestañas Horizontales Deslizables en 1 sola fila */
    .rrhh-tabs-scroll-wrap {
        margin-bottom: 14px !important;
    }

    .rrhh-nav-pills {
        width: 100% !important;
        padding: 4px !important;
        border-radius: 12px !important;
    }

    .rrhh-nav-pills .inventory-tab-btn {
        padding: 8px 13px !important;
        font-size: 12.5px !important;
        min-height: 36px !important;
        border-radius: 9px !important;
    }

    /* Cards informativos (KPIs) SIEMPRE en 2 columnas en modo móvil/app */
    .rrhh-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }

    .rrhh-kpi-card {
        padding: 12px 13px !important;
        border-radius: 14px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    .rrhh-kpi-card .rrhh-kpi-label {
        font-size: 10px !important;
        gap: 5px !important;
        margin-bottom: 6px !important;
        letter-spacing: 0.2px !important;
        line-height: 1.2 !important;
    }

    .rrhh-kpi-card .rrhh-kpi-value {
        font-size: 21px !important;
        line-height: 1.1 !important;
    }

    .rrhh-kpi-card .rrhh-kpi-sub {
        font-size: 10.5px !important;
        margin-top: 4px !important;
        line-height: 1.25 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Bandeja de Postulantes y Constructor en modo App */
    .rrhh-jobs-nav-bar {
        padding: 8px !important;
        border-radius: 14px !important;
        margin-bottom: 14px !important;
        gap: 8px !important;
    }

    .rrhh-jobs-segmented-switch {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 4px !important;
        padding: 4px !important;
    }

    .rrhh-subtab-btn {
        width: 100% !important;
        padding: 9px 10px !important;
        font-size: 12px !important;
    }

    .rrhh-subtab-btn .subtab-text-full {
        display: none !important;
    }

    .rrhh-subtab-btn .subtab-text-short {
        display: inline !important;
    }

    /* Ocultar enlaces secundarios de vista pública/QR en la barra porque están en el Drawer flotante */
    .rrhh-jobs-quick-links {
        display: none !important;
    }

    /* Filtros de Bandeja de Postulantes y Trabajadores en modo App */
    .rrhh-applicants-toolbar,
    #tabRRHHWorkers .table-toolbar {
        padding: 12px !important;
        border-radius: 14px !important;
        margin-bottom: 14px !important;
    }

    .rrhh-applicants-toolbar > div,
    #tabRRHHWorkers .table-toolbar > div {
        min-width: 0 !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .rrhh-applicants-search-wrap,
    #tabRRHHWorkers .table-toolbar > div > div:first-child {
        min-width: 100% !important;
        width: 100% !important;
    }

    .rrhh-applicants-status-select {
        width: 100% !important;
        min-width: 0 !important;
    }

    #tabRRHHWorkers .table-toolbar > div > div:nth-child(2),
    #tabRRHHWorkers .table-toolbar > div > div:nth-child(3) {
        flex: 1 1 calc(50% - 4px) !important;
        min-width: 0 !important;
    }

    /* Constructor de Formulario & Vacantes limpio en 1 columna sin desborde */
    .rrhh-builder-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .rrhh-card {
        padding: 14px !important;
        border-radius: 16px !important;
    }

    .rrhh-card-header {
        padding: 0 0 12px 0 !important;
        margin-bottom: 12px !important;
    }

    #btnSaveJobFormBuilder {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Botón Flotante (FAB) FIJO abajo en vista responsive (solo visible cuando #view-rrhh está activo) */
    .rrhh-mobile-fab {
        display: none !important;
    }

    body:has(#view-rrhh.active) .rrhh-mobile-fab,
    body.rrhh-view-active .rrhh-mobile-fab {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        position: fixed !important;
        right: 16px !important;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        top: auto !important;
        left: auto !important;
        z-index: 9995 !important;
        height: 48px !important;
        padding: 0 20px !important;
        border-radius: 999px !important;
        background: linear-gradient(135deg, var(--primary, #f28118) 0%, #ea580c 100%) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        box-shadow: 0 10px 26px rgba(234, 88, 12, 0.45), 0 4px 12px rgba(0, 0, 0, 0.28) !important;
        font-size: 13.5px !important;
        font-weight: 800 !important;
        cursor: pointer !important;
        transform: translateZ(0) !important;
        transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
    }

    body:has(#view-rrhh.active) .rrhh-mobile-fab:active,
    body.rrhh-view-active .rrhh-mobile-fab:active {
        transform: scale(0.94) translateZ(0) !important;
    }

    .rrhh-fab-badge {
        display: none !important;
        background: #ffffff !important;
        color: #ea580c !important;
        font-size: 11px !important;
        font-weight: 900 !important;
        min-width: 20px !important;
        height: 20px !important;
        padding: 0 6px !important;
        border-radius: 999px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .rrhh-fab-badge.has-count {
        display: inline-flex !important;
    }

    /* Backdrop del Drawer */
    .rrhh-mobile-drawer-backdrop {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        background: rgba(15, 23, 42, 0.55) !important;
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
        z-index: 10040 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s !important;
    }

    .rrhh-mobile-drawer-backdrop.open {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Panel Drawer Deslizable de Derecha a Izquierda */
    .rrhh-mobile-drawer {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: min(350px, 88vw) !important;
        height: 100svh !important;
        background: var(--card-bg, #ffffff) !important;
        border-left: 1px solid var(--border-color, #e2e8f0) !important;
        box-shadow: -16px 0 45px rgba(0, 0, 0, 0.28) !important;
        z-index: 10045 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateX(105%) !important;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s !important;
        overflow: hidden !important;
        outline: none !important;
    }

    body.dark-mode .rrhh-mobile-drawer {
        background: #121318 !important;
        border-left-color: rgba(255, 255, 255, 0.08) !important;
        box-shadow: -16px 0 50px rgba(0, 0, 0, 0.75) !important;
    }

    .rrhh-mobile-drawer.open {
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
    }

    .rrhh-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 18px 18px 14px;
        border-bottom: 1px solid var(--border-color, #e2e8f0);
        flex-shrink: 0;
    }

    body.dark-mode .rrhh-drawer-header {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .rrhh-drawer-brand {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .rrhh-drawer-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: rgba(var(--primary-rgb, 242,129,24), 0.14);
        color: var(--primary, #f28118);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex-shrink: 0;
    }

    .rrhh-drawer-title {
        margin: 0;
        font-size: 15px;
        font-weight: 800;
        color: var(--text-main, #0f172a);
    }

    body.dark-mode .rrhh-drawer-title {
        color: #f8fafc;
    }

    .rrhh-drawer-subtitle {
        font-size: 11.5px;
        color: var(--text-muted, #64748b);
        display: block;
    }

    .rrhh-drawer-close {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        border: 1px solid var(--border-color, #cbd5e1);
        background: var(--card-alt-bg, #f8fafc);
        color: var(--text-muted, #64748b);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        cursor: pointer;
    }

    body.dark-mode .rrhh-drawer-close {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.1);
        color: #cbd5e1;
    }

    .rrhh-drawer-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        overscroll-behavior: contain;
    }

    .rrhh-drawer-section-title {
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted, #64748b);
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .rrhh-drawer-quick-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .rrhh-drawer-quick-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 10px;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: #1e293b;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        text-align: center;
        transition: all 0.18s ease;
    }

    body.dark-mode .rrhh-drawer-quick-card {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(255, 255, 255, 0.08);
        color: #f1f5f9;
    }

    .rrhh-drawer-quick-card i {
        font-size: 18px;
        color: var(--primary, #f28118);
    }

    .rrhh-drawer-quick-card.primary-green {
        background: rgba(16, 185, 129, 0.12);
        border-color: rgba(16, 185, 129, 0.3);
        color: #059669;
    }

    body.dark-mode .rrhh-drawer-quick-card.primary-green {
        background: rgba(16, 185, 129, 0.16);
        border-color: rgba(16, 185, 129, 0.35);
        color: #34d399;
    }

    .rrhh-drawer-quick-card.primary-green i {
        color: #10b981;
    }

    .rrhh-drawer-nav-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .rrhh-drawer-nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 11px 12px;
        border-radius: 13px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        color: #0f172a;
        text-align: left;
        cursor: pointer;
        transition: all 0.18s ease;
    }

    body.dark-mode .rrhh-drawer-nav-item {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.07);
        color: #f8fafc;
    }

    .rrhh-drawer-nav-item.active {
        background: rgba(var(--primary-rgb, 242,129,24), 0.12);
        border-color: var(--primary, #f28118);
    }

    .rrhh-drawer-nav-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: rgba(var(--primary-rgb, 242,129,24), 0.12);
        color: var(--primary, #f28118);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        flex-shrink: 0;
    }

    .rrhh-drawer-nav-item.active .rrhh-drawer-nav-icon {
        background: var(--primary, #f28118);
        color: #ffffff;
    }

    .rrhh-drawer-nav-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .rrhh-drawer-nav-info strong {
        font-size: 13px;
        font-weight: 700;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .rrhh-drawer-nav-info small {
        font-size: 11px;
        color: var(--text-muted, #64748b);
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .rrhh-drawer-badge {
        font-size: 10.5px;
        font-weight: 800;
        padding: 2px 7px;
        border-radius: 999px;
        color: #ffffff;
    }

    .rrhh-drawer-badge.danger { background: #ef4444; }
    .rrhh-drawer-badge.success { background: #10b981; }

    .rrhh-drawer-arrow {
        font-size: 12px;
        color: var(--text-muted, #94a3b8);
    }
}


