:root {
    --primary-dark: #040a34;
    --primary-gold: #e0a810;
    --primary-gold-dark: #c4950a;
    --primary-gold-light: #f5c542;
    --gray-50: #f8f9fa;
    --gray-100: #f4f6fb;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fed7aa;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
}

/* Layout Principal */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, #020624 100%);
    position: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gold);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.logo-text h2 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.logo-text p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

.sidebar-nav {
    padding: 0 1rem;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-md);
    margin-bottom: 0.15rem;
    transition: all 0.2s ease;
}

.nav-item i {
    width: 1.25rem;
    font-size: 1.125rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: var(--primary-gold);
    color: var(--primary-dark);
    font-weight: 500;
}

.sidebar-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gold);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-dark);
}

.user-details {
    flex: 1;
}

.user-name {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

/* Top Header */
.top-header {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 40;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Content Container */
.content-container {
    padding: 2rem;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-gold-light) 0%, var(--primary-gold) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.card-trend {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Formularios */
.form-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.form-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(224, 168, 16, 0.1);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gold);
    color: var(--primary-dark);
}

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

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Tablas */
.table-container {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
}

.data-table td {
    padding: 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border: 1px solid #3b82f6;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #020624 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
}

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

.login-logo .logo-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.login-logo p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form input {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.login-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 1rem;
}

/* Scanner */
.scanner-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

#reader {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.scanner-result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

/* Drag & Drop Upload */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-gold);
    background: rgba(224, 168, 16, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Gráfico */
.chart-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

/* Overlay del sidebar en móvil (solo visual, no intercepta clicks) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    pointer-events: none;
}

.sidebar-overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 100;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .top-header {
        padding: 1rem;
    }

    .content-container {
        padding: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

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

    .data-table {
        display: block;
        overflow-x: auto;
    }
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
}

/* Estilos adicionales para dashboard */
#currentDateTime {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

/* Animación de carga */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Mejoras para tablas en móvil */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 600px;
    }

    .card-value {
        font-size: 1.75rem;
    }

    .chart-container {
        padding: 1rem;
    }
}

/* Tooltip personalizado */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background: var(--gray-800);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    margin-bottom: 0.25rem;
}

/* ============================================
   MODALES - Backdrop blur
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: color 0.2s;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    position: sticky;
    bottom: 0;
    background: white;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ============================================
   SWITCH (Toggle)
   ============================================ */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 50px;
    height: 24px;
    vertical-align: middle;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-400);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--success);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* ============================================
   FILTROS Y BÚSQUEDA
   ============================================ */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.search-input {
    width: 100%;
    max-width: 320px;
    padding: 0.625rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(224, 168, 16, 0.1);
}

@media (max-width: 768px) {
    .search-input {
        max-width: 100%;
    }
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}

/* Estado badge column - centered */
.estado-badge {
    text-align: center;
    white-space: nowrap;
}

/* ============================================
   BOTONES DE ACCIÓN EN TABLA
   ============================================ */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    background: none;
    border: none;
    padding: 0.375rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-size: 1rem;
}

.action-btn.view {
    color: var(--info);
}

.action-btn.view:hover {
    background: var(--info-light);
}

.action-btn.edit {
    color: var(--primary-gold);
}

.action-btn.edit:hover {
    background: rgba(224, 168, 16, 0.1);
}

.action-btn.delete {
    color: var(--danger);
}

.action-btn.delete:hover {
    background: var(--danger-light);
}

.action-btn.invite {
    color: var(--success);
}

.action-btn.invite:hover {
    background: var(--success-light);
}

/* ============================================
   PAGINACIÓN MODERNA
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    padding: 0.5rem 0;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.page-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.page-btn.active {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(224, 168, 16, 0.25);
    cursor: default;
}

.page-btn.active:hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    transform: none;
    box-shadow: 0 2px 8px rgba(224, 168, 16, 0.25);
}

.page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
    color: var(--gray-400);
    user-select: none;
}

/* Tabla responsive */
.table-container {
    overflow-x: auto;
}

.data-table td .action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

/* Badge clickeable para estado */
.badge-clickable {
    cursor: pointer;
    transition: opacity 0.2s;
}

.badge-clickable:hover {
    opacity: 0.8;
}

/* ============================================
   MODAL - TRANSICIÓN MÁS RÁPIDA Y FLUIDA
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
}

.modal-overlay.active {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* ============================================
   BOTONES DE ACCIÓN MODERNOS
   ============================================ */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn i {
    font-size: 0.875rem;
}

.action-btn.view {
    background: var(--info-light);
    color: var(--info);
}

.action-btn.view:hover {
    background: var(--info);
    color: white;
    transform: translateY(-1px);
}

.action-btn.edit {
    background: rgba(224, 168, 16, 0.15);
    color: var(--primary-gold-dark);
}

.action-btn.edit:hover {
    background: var(--primary-gold);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.action-btn.invite {
    background: var(--success-light);
    color: var(--success);
}

.action-btn.invite:hover {
    background: var(--success);
    color: white;
    transform: translateY(-1px);
}

.action-btn.delete {
    background: var(--danger-light);
    color: var(--danger);
}

.action-btn.delete:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: var(--radius-md);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.2s ease-out;
    z-index: 1100;
    max-width: 350px;
    border-left: 4px solid;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification i {
    font-size: 1.125rem;
}

.toast-notification span {
    flex: 1;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0 0.25rem;
}

.toast-success {
    border-left-color: var(--success);
}

.toast-success i {
    color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}

.toast-error i {
    color: var(--danger);
}

/* ============================================
   FORMULARIO - Guardar en misma fila que Estado
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-row .btn {
    margin-bottom: 0;
    height: 42px;
    white-space: nowrap;
}

/* ============================================
   ACCIONES CENTRADAS EN TABLA
   ============================================ */
.data-table td:last-child,
.data-table th:last-child {
    text-align: center !important;
}

.data-table .action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

/* Asegurar que todas las celdas de acciones tengan el mismo ancho mínimo */
.data-table td:last-child {
    min-width: 280px;
}

/* Responsive: en móvil las acciones se apilan */
@media (max-width: 768px) {
    .data-table .action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

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

/* ============================================
   BOTÓN DANGER
   ============================================ */
.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* ============================================
   TOAST NOTIFICATIONS MODERNAS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-modern {
    min-width: 280px;
    max-width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    backdrop-filter: blur(8px);
    border-left: 4px solid;
}

.toast-modern.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-modern:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Icono del toast */
.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Contenido del toast */
.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* Botón cerrar */
.toast-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 1rem;
    padding: 0;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close-btn:hover {
    color: var(--gray-600);
}

/* Toast SUCCESS (Verde) */
.toast-modern.success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.toast-modern.success .toast-icon {
    background: #10b981;
    color: white;
}

.toast-modern.success .toast-title {
    color: #065f46;
}

/* Toast ERROR (Rojo) */
.toast-modern.error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.toast-modern.error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast-modern.error .toast-title {
    color: #991b1b;
}

/* Toast INFO (Azul) */
.toast-modern.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.toast-modern.info .toast-icon {
    background: #3b82f6;
    color: white;
}

.toast-modern.info .toast-title {
    color: #1e40af;
}

/* Toast WARNING (Amarillo) */
.toast-modern.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.toast-modern.warning .toast-icon {
    background: #f59e0b;
    color: white;
}

.toast-modern.warning .toast-title {
    color: #92400e;
}

/* Responsive */
@media (max-width: 480px) {
    .toast-modern {
        min-width: 260px;
        max-width: 320px;
        padding: 12px 16px;
    }
}


/* ============================================
   TOAST NOTIFICATIONS MODERNAS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-modern {
    min-width: 280px;
    max-width: 350px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    border-left: 4px solid;
}

.toast-modern.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-modern:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.toast-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 1rem;
    padding: 0;
    flex-shrink: 0;
}

.toast-close-btn:hover {
    color: var(--gray-600);
}

.toast-modern.success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.toast-modern.success .toast-icon {
    background: #10b981;
    color: white;
}

.toast-modern.success .toast-title {
    color: #065f46;
}

.toast-modern.error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.toast-modern.error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast-modern.error .toast-title {
    color: #991b1b;
}

.toast-modern.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.toast-modern.info .toast-icon {
    background: #3b82f6;
    color: white;
}

.toast-modern.info .toast-title {
    color: #1e40af;
}

@media (max-width: 480px) {
    .toast-modern {
        min-width: 260px;
        max-width: 320px;
        padding: 12px 16px;
    }
}

/* ============================================================
   ESTILOS PREMIUM PARA DATATABLES (CUMBRESQR)
   ============================================================ */
.dataTables_wrapper {
    padding: 1rem 0;
}

table.dataTable {
    border-collapse: collapse !important;
    margin-bottom: 1.5rem !important;
    border-bottom: 1px solid var(--gray-200) !important;
}

table.dataTable thead th {
    background: var(--gray-50) !important;
    color: var(--gray-600) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 1rem !important;
    border-bottom: 2px solid var(--gray-200) !important;
}

table.dataTable tbody td {
    padding: 1rem !important;
    font-size: 0.875rem !important;
    border-bottom: 1px solid var(--gray-200) !important;
}

.dataTables_filter {
    margin-bottom: 1.5rem !important;
    float: right !important;
}

.dataTables_filter label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dataTables_filter input {
    padding: 0.5rem 0.75rem !important;
    border: 1px solid var(--gray-300) !important;
    border-radius: var(--radius-md) !important;
    font-size: 0.875rem !important;
    background: white !important;
    transition: all 0.2s ease !important;
}

.dataTables_filter input:focus {
    outline: none !important;
    border-color: var(--primary-gold) !important;
    box-shadow: 0 0 0 3px rgba(224, 168, 16, 0.1) !important;
}

.dataTables_info {
    font-size: 0.875rem !important;
    color: var(--gray-600) !important;
    padding-top: 0.75rem !important;
}

.dataTables_paginate {
    padding-top: 0.75rem !important;
}

.dataTables_paginate .paginate_button {
    padding: 0.4rem 0.8rem !important;
    margin-left: 0.25rem !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--gray-200) !important;
    background: white !important;
    color: var(--gray-700) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.dataTables_paginate .paginate_button:hover {
    background: var(--primary-gold) !important;
    color: var(--primary-dark) !important;
    border-color: var(--primary-gold-dark) !important;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: #6b7280 !important;
    color: #ffffff !important;
    border-color: #6b7280 !important;
    font-weight: 600 !important;
}

.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:hover,
.dataTables_paginate .paginate_button.disabled:active {
    background: var(--gray-100) !important;
    color: var(--gray-400) !important;
    border-color: var(--gray-200) !important;
    cursor: not-allowed !important;
}
/* ============================================
   MODALES - SIN TRANSICION (APARICION INMEDIATA)
   ============================================ */
.modal-overlay,
.modal-container {
    transition: none !important;
}
