/* Tablas de Administración Premium */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.admin-table th {
    background: #F8FAFC;
    color: #475569;
    font-weight: 800;
    padding: 14px 18px;
    border-bottom: 1px solid #E2E8F0;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #F1F5F9;
    color: #1E293B;
    vertical-align: middle;
}

.admin-table td:last-child {
    white-space: nowrap;
}

.admin-actions-cell {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

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

.admin-table tr:hover td {
    background: #F8FAFC;
}

/* Diseño de Menú Justificado en Cuadrícula */
.admin-content-body .admin-modules-flex {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

.admin-content-body .admin-modules-flex>div {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    flex: none;
    /* Desactivar flex-grow desigual */
}

.admin-content-body .admin-modules-flex>div>span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #475569;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 8px;
    margin-bottom: 4px;
}

/* Botones de acción tipo píldora */
.admin-content-body .action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    margin: 2px;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.admin-content-body .link-delete {
    background: #EF4444;
}

.admin-content-body .link-delete:hover {
    background: #DC2626;
}

.admin-content-body .link-edit {
    background: var(--primary);
}

.admin-content-body .link-edit:hover {
    background: var(--primary-hover);
}

.admin-content-body .link-toggle {
    background: #64748B;
}

.admin-content-body .link-toggle.active {
    background: var(--success);
}

.admin-content-body .link-premium {
    background: #F59E0B;
}

.admin-content-body .link-premium:hover {
    background: #D97706;
}

/* Botones de Pestañas del Administrador */
.admin-tab-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #E2E8F0;
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.admin-tab-btn:hover {
    background: #F1F5F9;
    color: var(--primary);
    border-color: #CBD5E1;
}

.admin-sidebar-menu .admin-tab-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.15);
}

/* ==========================================
   DASHBOARD SaaS - ESTILO GRANDES EMPRESAS
   ========================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #F8FAFC;
    font-family: 'Outfit', sans-serif;
}

/* Sidebar Estilo SaaS */
.admin-sidebar {
    width: 280px;
    background: #0F172A;
    /* Slate 900 */
    color: #F8FAFC;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    border-right: 1px solid #1E293B;
    transition: all 0.3s ease;
}

.admin-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #1E293B;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sidebar-header h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: #FFF;
    letter-spacing: -0.5px;
}

.admin-sidebar-menu {
    flex: 1;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
}

.admin-menu-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-menu-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748B;
    /* Slate 500 */
    padding-left: 12px;
    margin-bottom: 4px;
}

/* Reemplaza .admin-tab-btn con el estilo premium del sidebar */
.admin-sidebar-menu .admin-tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #94A3B8;
    /* Slate 400 */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: none;
}

.admin-sidebar-menu .admin-tab-btn:hover {
    background: #1E293B;
    /* Slate 800 */
    color: #FFF;
}

.admin-sidebar-menu .admin-tab-btn.active {
    background: #3B82F6;
    /* Blue 500 */
    color: #FFF;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* Área de Contenido Principal */
.admin-main {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    width: calc(100% - 280px);
}

/* Topbar del Dashboard */
.admin-topbar {
    height: 70px;
    background: #FFF;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.admin-topbar-left h1 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: #0F172A;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-content-body {
    padding: 30px;
    flex: 1;
}

/* Adaptación Móvil */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

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

    .admin-main {
        margin-left: 0;
        width: 100%;
    }

    .admin-topbar {
        padding: 0 20px;
    }
}

