/* =====================================================
   ESTILOS MODERNOS PARA DASHBOARD PROFESIONAL
   ===================================================== */

/* Variables de colores profesionales */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --success-green: #059669;
    --success-green-light: #10b981;
    --warning-orange: #d97706;
    --warning-orange-light: #f59e0b;
    --danger-red: #dc2626;
    --danger-red-light: #ef4444;
    --purple-primary: #7c3aed;
    --purple-light: #8b5cf6;
    --gray-dark: #1f2937;
    --gray-medium: #6b7280;
    --gray-light: #f3f4f6;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-danger: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* =====================================================
   HEADER MODERNO
   ===================================================== */

/* Estilos para los enlaces de navegación del header */
.nav-menu-item {
    @apply px-3 py-2 text-white hover:text-blue-200 transition-colors rounded-lg hover:bg-white hover:bg-opacity-10;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

.nav-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.nav-menu-item i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-content {
    position: relative;
    z-index: 2;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 4px;
}

.header-left p {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* =====================================================
   TÍTULO DE PÁGINA (NUEVO)
   ===================================================== */

.page-title-header {
    background: var(--white);
    color: var(--gray-dark);
    padding: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 10;
    margin-top: 0;
}

.page-title-header .container {
    position: relative;
    z-index: 2;
}

.page-title-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-dark);
    margin-bottom: 8px;
}

.page-title-header p {
    font-size: 1rem;
    color: var(--gray-medium);
    font-weight: 500;
}

/* =====================================================
   ESTADÍSTICAS MEJORADAS
   ===================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stats-card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stats-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.stats-card .flex {
    align-items: center;
    gap: 20px;
}

.stats-card .p-3 {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.stats-card .p-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0.9;
}

.stats-card .p-3 i {
    position: relative;
    z-index: 2;
}

.stats-card:nth-child(1) .p-3::before {
    background: var(--gradient-primary);
}

.stats-card:nth-child(2) .p-3::before {
    background: var(--gradient-success);
}

.stats-card:nth-child(3) .p-3::before {
    background: var(--gradient-purple);
}

.stats-card .text-2xl {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-dark);
    margin-bottom: 8px;
    line-height: 1;
}

.stats-card .text-sm {
    color: var(--gray-medium);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* =====================================================
   TARJETAS MEJORADAS
   ===================================================== */

.card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.card-header h2 {
    position: relative;
    z-index: 2;
    font-size: 1.75rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 32px;
}

/* =====================================================
   PESTAÑAS MEJORADAS
   ===================================================== */

.tab-button {
    background: var(--gray-light);
    color: var(--gray-medium);
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.tab-button.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

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

/* =====================================================
   TABLAS MEJORADAS
   ===================================================== */

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.table th {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 20px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-light);
    transition: background-color 0.3s ease;
    vertical-align: top;
}

/* Tabla compacta para detalles */
.table.table-compact td {
    padding: 8px 16px;
}

.table.table-compact .btn-sm {
    padding: 4px 8px;
    font-size: 0.7rem;
    margin: 1px;
}

/* Optimizaciones adicionales para tabla compacta */
.table.table-compact th {
    padding: 12px 16px;
    font-size: 0.8rem;
}

.table.table-compact .badge {
    font-size: 0.7rem;
    padding: 2px 6px;
}

.table.table-compact .text-xs {
    font-size: 0.7rem;
    line-height: 1.2;
}

/* Botones apilados verticalmente en tabla compacta */
.table.table-compact .flex.flex-col {
    gap: 2px;
}

.table.table-compact .flex.flex-col .btn-sm {
    width: 100%;
    justify-content: center;
    min-height: 24px;
}

/* Optimizaciones de texto para tabla compacta */
.table.table-compact .leading-tight {
    line-height: 1.1;
}

.table.table-compact .mb-1 {
    margin-bottom: 2px;
}

/* Centrado de contenido en celdas específicas */
.table.table-compact td:nth-child(3) {
    text-align: center;
}

/* Reducir espacio entre elementos en badges */
.table.table-compact .badge i {
    margin-right: 3px;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* =====================================================
   BOTONES MEJORADOS
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(17, 153, 142, 0.6);
}

.btn-danger {
    background: var(--gradient-danger);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 65, 108, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 65, 108, 0.6);
}

.btn-warning {
    background: var(--gradient-warning);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(240, 147, 251, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.6);
    color: var(--white);
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-info:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.6);
}

.btn-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-indigo:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.6);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* =====================================================
   BOTONES EN HEADER MEJORADOS
   ===================================================== */

.header .btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.header .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.header .btn:hover::before {
    left: 100%;
}

.header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.header .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.header .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.header .btn-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--white);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.header .btn-success:hover {
    background: rgba(16, 185, 129, 0.3);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.header .btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--white);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.header .btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

/* =====================================================
   BADGES MEJORADOS
   ===================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background: currentColor;
}

.badge-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--primary-blue-dark);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: var(--success-green);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-yellow {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: var(--warning-orange);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.badge-purple {
    background: linear-gradient(135deg, #e9d5ff 0%, #c4b5fd 100%);
    color: var(--purple-primary);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.badge-pink {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #be185d;
    border: 1px solid rgba(190, 24, 93, 0.2);
}

.badge-gray {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: var(--gray-medium);
    border: 1px solid rgba(107, 114, 128, 0.2);
}

/* =====================================================
   ESTADOS MEJORADOS
   ===================================================== */

.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: var(--success-green);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(5, 150, 105, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-inactive {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: var(--danger-red);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================
   ALERTAS MEJORADAS
   ===================================================== */

.alert {
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: var(--success-green);
    border-color: rgba(5, 150, 105, 0.2);
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: var(--danger-red);
    border-color: rgba(220, 38, 38, 0.2);
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: var(--warning-orange);
    border-color: rgba(217, 119, 6, 0.2);
}

/* =====================================================
   ANIMACIONES
   ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stats-card {
        padding: 20px;
    }

    .stats-card .p-3 {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .stats-card .text-2xl {
        font-size: 2rem;
    }

    .card-content {
        padding: 20px;
    }

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 12px 8px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
}

/* =====================================================
   EFECTOS ESPECIALES
   ===================================================== */

.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Efecto de brillo en botones */
.btn:hover i {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* Efecto de pulso en badges */
.badge:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Efecto de sombra en tablas */
.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   ESTILOS ADICIONALES PARA COMPLETAR EL DISEÑO
   ===================================================== */

/* Estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--gray-dark);
    line-height: 1.6;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Header content */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Botones de logout */
.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    color: var(--white);
}

.papelera-btn {
    background: var(--gradient-purple) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: var(--white) !important;
}

.papelera-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.4);
}

/* Utilidades de texto */
.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

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

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.text-white {
    color: var(--white);
}

.text-gray-500 {
    color: var(--gray-medium);
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: var(--gray-dark);
}

.text-blue-100 {
    color: #dbeafe;
}

.text-red-600 {
    color: var(--danger-red);
}

.text-green-600 {
    color: var(--success-green);
}

/* Utilidades de espaciado */
.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-8 {
    margin-top: 32px;
}

.py-8 {
    padding-top: 32px;
    padding-bottom: 32px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.px-6 {
    padding-left: 24px;
    padding-right: 24px;
}

/* Utilidades de flexbox */
.flex {
    display: flex;
}

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

.justify-between {
    justify-content: space-between;
}

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

.space-x-2>*+* {
    margin-left: 8px;
}

.space-x-4>*+* {
    margin-left: 16px;
}

.gap-1 {
    gap: 4px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.whitespace-nowrap {
    white-space: nowrap;
}

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

/* Tabla container */
.table-container {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Botones en tabla */
.table .btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    margin: 2px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.table .flex.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-start;
}

.table td:last-child {
    text-align: center;
    white-space: nowrap;
}

.table .flex.flex-wrap .btn-sm {
    margin: 0;
    flex-shrink: 0;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 1rem;
    min-height: 120px;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Footer */
.footer {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 32px 0;
    margin-top: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.footer p {
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* Responsive adicional */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header-left h1 {
        font-size: 1.5rem;
    }

    .header-left p {
        font-size: 0.875rem;
    }

    .container {
        padding: 16px;
    }

    .card-content {
        padding: 16px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .table-container {
        margin: 0 -16px;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-card {
        padding: 16px;
    }

    .stats-card .p-3 {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .stats-card .text-2xl {
        font-size: 1.75rem;
    }

    .card-header {
        padding: 16px;
    }

    .card-header h2 {
        font-size: 1.25rem;
    }

    .tab-button {
        padding: 12px 16px;
        font-size: 0.8rem;
    }
}

/* Efectos de hover mejorados */
.hover\:bg-gray-50:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Animaciones adicionales */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Efectos de glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Sombras personalizadas */
.shadow-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.shadow-glow:hover {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

/* =====================================================
   ESTILOS ESPECÍFICOS PARA CREAR DETALLE
   ===================================================== */

.bloque-contenido {
    margin-bottom: 24px;
    animation: slideIn 0.5s ease-in-out;
}

.bloque-contenido .card {
    border: 2px solid var(--gray-light);
    transition: all 0.3s ease;
}

.bloque-contenido .card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.1);
}

#agregar-bloque {
    background: var(--gradient-success);
    color: var(--white);
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(17, 153, 142, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#agregar-bloque::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#agregar-bloque:hover::before {
    left: 100%;
}

#agregar-bloque:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(17, 153, 142, 0.5);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

#agregar-bloque:active {
    transform: translateY(-2px) scale(1.02);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

/* =====================================================
   BOTONES DE ESTADO ACTIVO/INACTIVO
   ===================================================== */

.btn-toggle-active {
    background: var(--gradient-success);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
    border: 1px solid rgba(5, 150, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-toggle-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-toggle-active:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(17, 153, 142, 0.6);
    color: var(--white);
}

.btn-toggle-active:hover::before {
    opacity: 1;
}

.btn-toggle-inactive {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4);
    border: 1px solid rgba(75, 85, 99, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-toggle-inactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(75, 85, 99, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-toggle-inactive:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.6);
    color: var(--white);
}

.btn-toggle-inactive:hover::before {
    opacity: 1;
}

/* Efectos especiales para iconos de toggle */
.btn-toggle-active i,
.btn-toggle-inactive i {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.btn-toggle-active:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--white);
}

.btn-toggle-inactive:hover i {
    transform: scale(1.2) rotate(-5deg);
    color: var(--white);
}

/* Animación de pulso para botones activos */
@keyframes pulseActive {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
    }

    50% {
        box-shadow: 0 4px 12px rgba(17, 153, 142, 0.6), 0 0 0 4px rgba(17, 153, 142, 0.1);
    }
}

.btn-toggle-active {
    animation: pulseActive 2s infinite;
}

/* Indicadores visuales adicionales */
.btn-toggle-active::after {
    content: 'ACTIVO';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--success-green);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-toggle-active:hover::after {
    opacity: 1;
}

.btn-toggle-inactive::after {
    content: 'INACTIVO';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--gray-medium);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-toggle-inactive:hover::after {
    opacity: 1;
}