/* ========================================================================== */
/* CONTROL EMPLEADOS PAGE - Administración De Vacaciones                      */
/* ========================================================================== */

/* Eliminar padding del main-content para esta página */
.main-content:has(.controlempleados-page) {
    padding: 0 !important;
}

.controlempleados-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 95px);
    width: 100%;
    padding: 0;
    overflow: hidden;
    background: var(--bg-primary);
}

/* Ajuste del camara-panel para que ocupe todo el espacio */
.controlempleados-page .camara-panel {
    margin: 0;
    padding: 0.75rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Ajuste del camara-header */
.controlempleados-page .camara-header {
    margin: 0 0 0.5rem 0;
    padding: 0.25rem 0.5rem;
    flex-shrink: 0;
}

/* Override de camara-body para layout horizontal */
.controlempleados-page .camara-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding: 0.5rem;
    flex: 1;
    min-height: 0;
}

/* ========================================================================== */
/* GRID DE CONTROL EMPLEADOS - 2 Cards horizontales (igual que LogAccesos)    */
/* ========================================================================== */

.controlempleados-grid {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* ========================================================================== */
/* CONTROL CARD                                                               */
/* ========================================================================== */

.control-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    min-height: 0;
    height: 100%;
}

/* Card de Empleados - 15% del width */
.control-card.empleados-card {
    flex: 0 0 15%;
    min-width: 150px;
    max-width: 250px;
}

/* Card de Contenido - Resto del width */
.control-card.contenido-card {
    flex: 1;
    min-width: 0;
}

/* Modo claro - fondo gris para el card */
:root.light-mode .control-card,
.light-mode .control-card {
    background: #d9d9d9;
}

/* Card Header con gradiente */
.control-card-header {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    padding: 0.5rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-height: 38px;
    box-sizing: border-box;
}

.control-card-header h3 {
    color: white;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* Card Body */
.control-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0.65rem;
    gap: 0.5rem;
    overflow: hidden;
    min-height: 0;
}

/* Card Footer */
.control-card-footer {
    padding: 0.5rem 0.65rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.total-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.15), rgba(0, 180, 255, 0.15));
    border: 1px solid rgba(240, 116, 0, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.total-badge svg {
    width: 14px;
    height: 14px;
    stroke: var(--primary-color);
}

.total-badge strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* ========================================================================== */
/* LISTA DE EMPLEADOS                                                          */
/* ========================================================================== */

.empleados-search {
    padding: 0.5rem 0.25rem 0.75rem 0.25rem;
    flex-shrink: 0;
}

.empleados-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.empleados-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(240, 116, 0, 0.15);
}

.empleados-search-input::placeholder {
    color: var(--text-secondary);
}

:root.light-mode .empleados-search-input,
.light-mode .empleados-search-input {
    background-color: #ffffff;
    border-color: #d0d0d0;
}

.empleados-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 0.25rem;
}

/* Item de empleado */
.empleado-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    background: var(--input-bg);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Modo claro - fondo blanco para items */
:root.light-mode .empleado-item,
.light-mode .empleado-item {
    background: #ffffff;
    border-color: #e8e8e8;
}

.empleado-item:hover:not(.selected) {
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.1), rgba(0, 180, 255, 0.1));
    border-color: var(--primary-color);
}

:root.light-mode .empleado-item:hover:not(.selected),
.light-mode .empleado-item:hover:not(.selected) {
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.15), rgba(0, 180, 255, 0.15));
    border-color: var(--primary-color);
}

/* Item seleccionado */
.empleado-item.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.empleado-item.selected .empleado-nombre {
    font-weight: 600;
    color: white;
}

.empleado-item.selected:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    filter: brightness(1.1);
    box-shadow: 0 2px 6px rgba(240, 116, 0, 0.4);
}

/* Avatar del empleado */
.empleado-avatar {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.2), rgba(0, 180, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.empleado-avatar svg {
    width: 14px;
    height: 14px;
    stroke: var(--primary-color);
}

.empleado-item.selected .empleado-avatar {
    background: rgba(255, 255, 255, 0.2);
}

.empleado-item.selected .empleado-avatar svg {
    stroke: white;
}

/* Nombre del empleado */
.empleado-nombre {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

/* Mensaje cuando no hay empleados */
.empleados-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem 0.5rem;
}

/* ========================================================================== */
/* CONTENIDO PRINCIPAL - DASHBOARD + CALENDARIO                               */
/* ========================================================================== */

.contenido-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Estado vacío cuando no hay empleado seleccionado */
.contenido-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
    gap: 1rem;
}

.contenido-empty svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-secondary);
    opacity: 0.4;
}

/* ========================================================================== */
/* DASHBOARD DEL EMPLEADO                                                      */
/* ========================================================================== */

.dashboard-empleado {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

:root.light-mode .dashboard-empleado,
.light-mode .dashboard-empleado {
    background: #e8e8e8;
}

/* Info del empleado */
.empleado-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.empleado-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.empleado-info-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
}

.empleado-info-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Stats cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

/* Grid de 8 columnas para incluir cards del año anterior + tomadas actual */
.dashboard-stats.stats-7-cols {
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

:root.light-mode .stat-card,
.light-mode .stat-card {
    background: #ffffff;
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.stat-icon.vacaciones {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.stat-icon.ausencias {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.stat-icon.retardos {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-icon.tomadas {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.stat-icon.restantes {
    background: linear-gradient(135deg, #F07400, #00b4ff);
}

/* Icono para cards del año anterior (rojo suave - período cerrado) */
.stat-icon.anterior {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(220, 38, 38, 0.8));
}

.stat-icon.anterior.perdidos {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(185, 28, 28, 0.9));
}

/* === CARDS DEL AÑO ANTERIOR (estilo retardo - período cerrado) === */
.stat-card.stat-card-anterior {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.04));
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.stat-card.stat-card-anterior:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.08));
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.15);
}

.stat-card.stat-card-anterior .stat-value {
    color: #ef4444;
    font-size: 1.25rem;
}

.stat-card.stat-card-anterior .stat-label {
    font-size: 0.65rem;
    color: rgba(239, 68, 68, 0.85);
}

.stat-card.stat-card-anterior .stat-detail {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

:root.light-mode .stat-card.stat-card-anterior,
.light-mode .stat-card.stat-card-anterior {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

/* === CARDS DEL AÑO ACTUAL (resaltados) === */
.stat-card.stat-card-actual {
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(240, 116, 0, 0.1);
}

.stat-card.stat-card-actual:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(240, 116, 0, 0.2);
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-detail {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Barra de progreso de vacaciones */
.vacaciones-progress {
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.vacaciones-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Acciones rápidas */
.dashboard-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-accion {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-accion svg {
    width: 16px;
    height: 16px;
}

.btn-accion.vacacion {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.15));
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.btn-accion.vacacion:hover {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-accion.ausencia {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(202, 138, 4, 0.15));
    border-color: rgba(234, 179, 8, 0.4);
    color: #eab308;
}

.btn-accion.ausencia:hover {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: white;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.btn-accion.retardo {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.btn-accion.retardo:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-accion.baja {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(75, 85, 99, 0.15));
    border-color: rgba(107, 114, 128, 0.4);
    color: #6b7280;
}

.btn-accion.baja:hover {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* ========================================================================== */
/* ÁREA DEL CALENDARIO Y HISTORIAL                                            */
/* ========================================================================== */

.calendario-historial-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Tabs para cambiar entre calendario e historial */
.tabs-container {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(240, 116, 0, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn svg {
    width: 16px;
    height: 16px;
}

.tab-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ========================================================================== */
/* HISTORIAL DE REGISTROS                                                     */
/* ========================================================================== */

.historial-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 0.75rem;
}

.historial-table-container {
    flex: 1;
    overflow: auto;
    border-radius: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}

:root.light-mode .historial-table-container,
.light-mode .historial-table-container {
    background: #ffffff;
}

.historial-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.historial-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.historial-table thead tr {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

:root.light-mode .historial-table thead tr,
.light-mode .historial-table thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.historial-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(240, 116, 0, 0.5);
}

.historial-table th:first-child {
    border-radius: 8px 0 0 0;
}

.historial-table th:last-child {
    border-radius: 0 8px 0 0;
}

.historial-table tbody tr {
    transition: all 0.2s ease;
}

.historial-table tbody tr:nth-child(even) {
    background: var(--bg-primary);
}

.historial-table tbody tr:nth-child(odd) {
    background: rgba(240, 116, 0, 0.03);
}

:root.light-mode .historial-table tbody tr:nth-child(even),
.light-mode .historial-table tbody tr:nth-child(even) {
    background: #ffffff;
}

:root.light-mode .historial-table tbody tr:nth-child(odd),
.light-mode .historial-table tbody tr:nth-child(odd) {
    background: rgba(102, 126, 234, 0.05);
}

.historial-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(240, 116, 0, 0.1), rgba(0, 180, 255, 0.1));
}

.historial-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

/* Badges de tipo */
.tipo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.tipo-badge svg {
    width: 12px;
    height: 12px;
}

.tipo-badge.vacacion {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1));
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.tipo-badge.ausencia {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(202, 138, 4, 0.1));
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.tipo-badge.retardo {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.historial-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 0.75rem;
    padding: 2rem;
}

.historial-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

/* ========================================================================== */
/* MODAL DE REGISTRO                                                          */
/* ========================================================================== */

.registro-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.registro-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    animation: slideIn 0.3s ease-out;
}

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

.registro-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.registro-modal-header h3 svg {
    width: 20px;
    height: 20px;
}

.registro-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.registro-modal-close svg {
    width: 16px;
    height: 16px;
}

.registro-modal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(240, 116, 0, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.dias-calculados {
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.1), rgba(0, 180, 255, 0.1));
    border: 1px solid rgba(240, 116, 0, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.dias-calculados-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dias-calculados-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dias-calculados-detail {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Mensaje de error para fecha inválida */
.mensaje-error-fecha {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 500;
    animation: shakeError 0.4s ease-out;
}

.mensaje-error-fecha svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    stroke: #ef4444;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.registro-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.btn-modal {
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal.cancelar {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-modal.cancelar:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.btn-modal.confirmar {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    border: none;
    color: white;
}

.btn-modal.confirmar:hover {
    box-shadow: 0 4px 12px rgba(240, 116, 0, 0.4);
    transform: translateY(-1px);
}

.btn-modal.confirmar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-modal.confirmar.baja {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-modal.confirmar.baja:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Warning de baja */
.baja-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.baja-warning svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    stroke: #ef4444;
}

.baja-warning strong {
    color: #ef4444;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* ========================================================================== */
/* SPINNER DE CARGA                                                           */
/* ========================================================================== */

.control-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================================================== */
/* RESPONSIVE                                                                 */
/* ========================================================================== */

@media (max-width: 1600px) {
    .dashboard-stats.stats-7-cols {
        grid-template-columns: repeat(4, 1fr);
    }

    .dashboard-stats.stats-7-cols .stat-card {
        padding: 0.6rem;
    }

    .dashboard-stats.stats-7-cols .stat-icon {
        width: 26px;
        height: 26px;
    }

    .dashboard-stats.stats-7-cols .stat-icon svg {
        width: 14px;
        height: 14px;
    }

    .dashboard-stats.stats-7-cols .stat-value {
        font-size: 1.15rem;
    }

    .dashboard-stats.stats-7-cols .stat-label {
        font-size: 0.62rem;
    }
}

@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-stats.stats-7-cols {
        grid-template-columns: repeat(4, 1fr);
    }

    .control-card.empleados-card {
        flex: 0 0 18%;
        min-width: 140px;
        max-width: 200px;
    }
}

@media (max-width: 1024px) {
    .control-card.empleados-card {
        flex: 0 0 20%;
        min-width: 130px;
        max-width: 180px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-stats.stats-7-cols {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .dashboard-stats.stats-7-cols .stat-value {
        font-size: 1.1rem;
    }

    .dashboard-stats.stats-7-cols .stat-label {
        font-size: 0.6rem;
    }
}

@media (max-width: 768px) {
    .controlempleados-page {
        height: calc(100vh - 95px);
    }

    .controlempleados-page .camara-panel {
        padding: 0.5rem;
    }

    .controlempleados-page .camara-body {
        padding: 0.35rem;
    }

    /* Layout vertical en tablet/móvil */
    .controlempleados-grid {
        flex-direction: column;
        gap: 0.5rem;
        overflow-y: auto;
    }

    .control-card.empleados-card {
        flex: 0 0 auto;
        min-width: 100%;
        max-width: 100%;
        max-height: 35%;
    }

    .control-card.contenido-card {
        flex: 1;
        min-height: 200px;
    }

    .control-card-header {
        padding: 0.4rem 0.65rem;
    }

    .control-card-header h3 {
        font-size: 0.8rem;
    }

    .control-card-body {
        padding: 0.5rem;
    }

    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .dashboard-stats.stats-7-cols {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.35rem;
    }

    .stat-card {
        padding: 0.5rem;
    }

    .stat-icon {
        width: 26px;
        height: 26px;
    }

    .stat-icon svg {
        width: 14px;
        height: 14px;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .dashboard-stats.stats-7-cols .stat-value {
        font-size: 0.9rem;
    }

    .dashboard-stats.stats-7-cols .stat-card-anterior .stat-value {
        font-size: 0.85rem;
    }

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

    .btn-accion {
        padding: 0.4rem 0.65rem;
        font-size: 0.75rem;
    }

    .empleado-info-row {
        justify-content: center;
    }

    .empleado-info-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .controlempleados-page {
        height: calc(100vh - 95px);
    }

    .controlempleados-page .camara-panel {
        padding: 0.35rem;
    }

    .control-card.empleados-card {
        max-height: 30%;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .dashboard-stats.stats-7-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.35rem;
    }

    .dashboard-stats.stats-7-cols .stat-card-anterior {
        padding: 0.4rem;
    }

    .dashboard-stats.stats-7-cols .stat-card-anterior .stat-icon {
        width: 22px;
        height: 22px;
    }

    .dashboard-stats.stats-7-cols .stat-card-anterior .stat-icon svg {
        width: 12px;
        height: 12px;
    }

    .dashboard-stats.stats-7-cols .stat-card-anterior .stat-value {
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 0.45rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .dashboard-empleado {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .dashboard-actions {
        gap: 0.35rem;
    }

    .btn-accion {
        flex: 1;
        justify-content: center;
        padding: 0.45rem 0.5rem;
        font-size: 0.7rem;
    }

    .btn-accion svg {
        width: 14px;
        height: 14px;
    }

    .tabs-container {
        overflow-x: auto;
    }

    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .registro-modal {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .registro-modal-body {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ========================================================================== */
/* SELECTOR DE FECHA PERSONALIZADO (fecha-picker)                              */
/* ========================================================================== */

.fecha-picker {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

:root.light-mode .fecha-picker,
.light-mode .fecha-picker {
    background: #ffffff;
}

.fecha-picker.compact {
    padding: 0.5rem;
    gap: 0.35rem;
}

.fecha-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.25rem;
}

.fecha-picker-nav {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fecha-picker-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.fecha-picker-nav svg {
    width: 14px;
    height: 14px;
}

.fecha-picker-month {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fecha-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border-color);
}

.fecha-picker-weekdays span {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.fecha-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.fecha-picker-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--text-primary);
}

.fecha-picker-day:hover:not(.empty):not(.selected) {
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.15), rgba(0, 180, 255, 0.15));
}

.fecha-picker-day.empty {
    cursor: default;
}

.fecha-picker-day.today {
    border: 1px solid var(--primary-color);
}

.fecha-picker-day.selected {
    background: linear-gradient(135deg, #F07400, #00b4ff);
    color: white;
    font-weight: 600;
}

.fecha-picker-day.sunday {
    color: var(--primary-color);
}

.fecha-picker-day.sunday.selected {
    color: white;
}

/* Día "D" (Domingo) en el header de los días de la semana */
.fecha-picker-weekdays span:last-child {
    color: var(--primary-color);
}

.fecha-picker-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.1), rgba(0, 180, 255, 0.1));
    border-radius: 6px;
    margin-top: 0.25rem;
}

.fecha-picker-selected svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
}

.fecha-picker-selected span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Row de fechas con dos pickers lado a lado */
.fechas-row {
    gap: 1rem;
}

.fechas-row .form-group {
    flex: 1;
}

/* Ajustes para modal más ancho cuando tiene dos pickers */
.registro-modal:has(.fechas-row) {
    max-width: 650px;
}

/* Responsive para fecha picker */
@media (max-width: 600px) {
    .fechas-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .fecha-picker-day {
        font-size: 0.7rem;
    }

    .fecha-picker-nav {
        width: 24px;
        height: 24px;
    }

    .fecha-picker-month {
        font-size: 0.8rem;
    }
}

/* ========================================================================== */
/* MODAL DE SELECCIÓN DE TIPO DE EVENTO                                       */
/* ========================================================================== */

.tipo-evento-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.tipo-evento-modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    animation: slideIn 0.3s ease-out;
    overflow: hidden;
}

.tipo-evento-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.1), rgba(0, 180, 255, 0.1));
    border-bottom: 1px solid var(--border-color);
}

.tipo-evento-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tipo-evento-modal-header h3 svg {
    width: 22px;
    height: 22px;
    stroke: var(--primary-color);
}

.tipo-evento-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tipo-evento-modal-close:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: rotate(90deg);
}

.tipo-evento-modal-close svg {
    width: 16px;
    height: 16px;
}

.tipo-evento-modal-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tipo-evento-fecha-seleccionada {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

:root.light-mode .tipo-evento-fecha-seleccionada,
.light-mode .tipo-evento-fecha-seleccionada {
    background: #ffffff;
}

.tipo-evento-fecha-seleccionada svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary-color);
    flex-shrink: 0;
}

.tipo-evento-fecha-seleccionada strong {
    color: var(--text-primary);
    text-transform: capitalize;
}

.tipo-evento-opciones {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tipo-evento-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
}

:root.light-mode .tipo-evento-btn,
.light-mode .tipo-evento-btn {
    background: #ffffff;
}

.tipo-evento-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tipo-evento-btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.tipo-evento-btn-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.tipo-evento-btn-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.tipo-evento-btn-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tipo-evento-btn-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Vacaciones */
.tipo-evento-btn.vacacion {
    border-color: rgba(34, 197, 94, 0.3);
}

.tipo-evento-btn.vacacion .tipo-evento-btn-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.tipo-evento-btn.vacacion:hover {
    border-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(22, 163, 74, 0.05));
}

/* Ausencia */
.tipo-evento-btn.ausencia {
    border-color: rgba(234, 179, 8, 0.3);
}

.tipo-evento-btn.ausencia .tipo-evento-btn-icon {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.tipo-evento-btn.ausencia:hover {
    border-color: #eab308;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(202, 138, 4, 0.05));
}

/* Retardo */
.tipo-evento-btn.retardo {
    border-color: rgba(239, 68, 68, 0.3);
}

.tipo-evento-btn.retardo .tipo-evento-btn-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.tipo-evento-btn.retardo:hover {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
}

/* ========================================================================== */
/* MODAL DE CONFIRMACIÓN                                                       */
/* ========================================================================== */

.confirmacion-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease-out;
}

.confirmacion-modal {
    background: var(--bg-secondary);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    animation: scaleIn 0.3s ease-out;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

.confirmacion-modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.confirmacion-modal-icon svg {
    width: 36px;
    height: 36px;
    stroke: white;
}

.confirmacion-modal-icon.vacacion {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
}

.confirmacion-modal-icon.ausencia {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.4);
}

.confirmacion-modal-icon.retardo {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.confirmacion-modal-title {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.confirmacion-modal-subtitle {
    margin: 0 0 1.25rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.confirmacion-datos {
    width: 100%;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

:root.light-mode .confirmacion-datos,
.light-mode .confirmacion-datos {
    background: #f5f5f5;
}

.confirmacion-dato {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border-color);
}

.confirmacion-dato:last-child {
    border-bottom: none;
}

.confirmacion-dato.destacado {
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.1), rgba(0, 180, 255, 0.1));
    margin: 0.25rem -0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    border-bottom: none;
}

.confirmacion-dato-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.confirmacion-dato-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.confirmacion-dato-value.tipo-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

.confirmacion-dato-value.comentario {
    font-weight: 400;
    font-style: italic;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.confirmacion-modal-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.confirmacion-btn {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.confirmacion-btn svg {
    width: 18px;
    height: 18px;
}

.confirmacion-btn.cancelar {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.confirmacion-btn.cancelar:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.confirmacion-btn.confirmar {
    border: none;
    color: white;
}

.confirmacion-btn.confirmar.vacacion {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.confirmacion-btn.confirmar.vacacion:hover {
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
}

.confirmacion-btn.confirmar.ausencia {
    background: linear-gradient(135deg, #eab308, #ca8a04);
}

.confirmacion-btn.confirmar.ausencia:hover {
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.5);
    transform: translateY(-2px);
}

.confirmacion-btn.confirmar.retardo {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.confirmacion-btn.confirmar.retardo:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

/* Responsive para modales nuevos */
@media (max-width: 480px) {
    .tipo-evento-modal {
        width: 95%;
        max-width: none;
    }

    .tipo-evento-btn {
        padding: 0.85rem 1rem;
    }

    .tipo-evento-btn-icon {
        width: 42px;
        height: 42px;
    }

    .tipo-evento-btn-icon svg {
        width: 20px;
        height: 20px;
    }

    .confirmacion-modal {
        width: 95%;
        padding: 1.5rem 1.25rem;
    }

    .confirmacion-modal-icon {
        width: 60px;
        height: 60px;
    }

    .confirmacion-modal-icon svg {
        width: 30px;
        height: 30px;
    }

    .confirmacion-modal-title {
        font-size: 1.1rem;
    }

    .confirmacion-modal-buttons {
        flex-direction: column;
    }
}

/* ========================================================================== */
/* BOTONES DE ACCIÓN EN TABLA HISTORIAL                                        */
/* ========================================================================== */

.th-acciones {
    width: 90px;
    text-align: center;
}

.td-acciones {
    text-align: center;
    white-space: nowrap;
}

.btn-accion-tabla {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 0 2px;
}

.btn-accion-tabla svg {
    width: 16px;
    height: 16px;
    transition: stroke 0.2s ease;
}

/* Botón Editar - Color azul por defecto */
.btn-accion-tabla.editar {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    border-color: rgba(59, 130, 246, 0.4);
}

.btn-accion-tabla.editar svg {
    stroke: #3b82f6;
}

.btn-accion-tabla.editar:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-accion-tabla.editar:hover svg {
    stroke: white;
}

/* Botón Eliminar - Color rojo por defecto */
.btn-accion-tabla.eliminar {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-accion-tabla.eliminar svg {
    stroke: #ef4444;
}

.btn-accion-tabla.eliminar:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Estilo del icono de eliminar en modal de confirmación */
.confirmacion-modal-icon.eliminar {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    border: 2px solid rgba(239, 68, 68, 0.5);
}

.confirmacion-modal-icon.eliminar svg {
    stroke: #ef4444;
}

/* Botón de confirmar eliminación */
.confirmacion-btn.confirmar.eliminar {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.confirmacion-btn.confirmar.eliminar:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Responsive para botones de acción */
@media (max-width: 768px) {
    .th-acciones {
        width: 70px;
    }

    .btn-accion-tabla {
        width: 28px;
        height: 28px;
    }

    .btn-accion-tabla svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .th-acciones {
        width: 60px;
    }

    .btn-accion-tabla {
        width: 26px;
        height: 26px;
        margin: 0 1px;
    }

    .btn-accion-tabla svg {
        width: 12px;
        height: 12px;
    }
}
