﻿/* ========================================
   GYMPRO - ESTILOS PRINCIPALES
   ======================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --dark: #1e293b;
    --dark2: #0f172a;
    --gray: #64748b;
    --gray-light: #f1f5f9;
    --gray-border: #e2e8f0;
    --white: #ffffff;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-light);
    color: var(--dark);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========== LOGIN ========== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1a1033 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99,102,241,.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 8px 16px rgba(99,102,241,.4);
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
}

.login-logo p {
    color: var(--gray);
    font-size: 14px;
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

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

    .login-form label i {
        margin-right: 6px;
    }

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

    .login-form input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
    }

.login-error {
    background: #fef2f2;
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-login:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 16px rgba(99,102,241,.4);
    }

.demo-accounts {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-border);
    text-align: center;
}

    .demo-accounts p {
        font-size: 12px;
        color: var(--gray);
        margin-bottom: 12px;
        font-weight: 500;
    }

.demo-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-btn {
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.admin-demo {
    background: #ede9fe;
    color: #7c3aed;
}

.prof-demo {
    background: #d1fae5;
    color: #065f46;
}

.socio-demo {
    background: #dbeafe;
    color: #1e40af;
}

.demo-btn:hover {
    transform: translateY(-1px);
    filter: brightness(.95);
}

/* ========== MAIN APP ========== */
.main-app {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark2);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: width .3s ease;
    overflow: hidden;
}

    .sidebar.collapsed {
        width: var(--sidebar-collapsed);
    }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 800;
    font-size: 18px;
    white-space: nowrap;
}

    .sidebar-logo i {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        flex-shrink: 0;
    }

.sidebar-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
}

    .sidebar-toggle:hover {
        color: white;
    }

.user-info-sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-sidebar {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.user-details-sidebar {
    display: flex;
    flex-direction: column;
}

    .user-details-sidebar span:first-child {
        color: white;
        font-size: 13px;
        font-weight: 600;
    }

.role-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 3px;
    width: fit-content;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.role-admin {
    background: #7c3aed33;
    color: #a78bfa;
}

.role-profesor {
    background: #06965333;
    color: #34d399;
}

.role-socio {
    background: #1d4ed833;
    color: #60a5fa;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

    .sidebar-nav::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar-nav::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.1);
        border-radius: 4px;
    }

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.3);
    padding: 12px 16px 6px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: rgba(255,255,255,.65);
    cursor: pointer;
    border-radius: 0;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    border-left: 3px solid transparent;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    width: 100%;
    background: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    font-family: 'Inter', sans-serif;
}

    .nav-item i {
        width: 20px;
        text-align: center;
        font-size: 15px;
        flex-shrink: 0;
    }

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

    .nav-item.active {
        background: linear-gradient(90deg, rgba(99,102,241,.25), rgba(99,102,241,.05));
        color: #a78bfa;
        border-left-color: var(--primary);
    }

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

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(239,68,68,.1);
    color: #fca5a5;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
}

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

    .btn-logout i {
        flex-shrink: 0;
    }

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left .3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ========== TOPBAR ========== */
.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}

.menu-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

    .menu-btn:hover {
        background: var(--gray-light);
        color: var(--dark);
    }

.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.topbar-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    white-space: nowrap;
}

.notif-bell {
    position: relative;
    cursor: pointer;
    color: var(--gray);
    font-size: 18px;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

    .notif-bell:hover {
        background: var(--gray-light);
        color: var(--primary);
    }

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ========== PAGES CONTAINER ========== */
.pages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-width: 0;
}

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

    .page-header h2 {
        font-size: 20px;
        font-weight: 700;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .page-header h2 i {
            color: var(--primary);
        }

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--gray-border);
    transition: var(--transition);
    min-width: 0;
}

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

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

    .stat-icon.purple {
        background: #ede9fe;
        color: #7c3aed;
    }

    .stat-icon.green {
        background: #d1fae5;
        color: #059669;
    }

    .stat-icon.blue {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .stat-icon.orange {
        background: #ffedd5;
        color: #c2410c;
    }

    .stat-icon.red {
        background: #fee2e2;
        color: #dc2626;
    }

    .stat-icon.teal {
        background: #ccfbf1;
        color: #0d9488;
    }

.stat-info {
    min-width: 0;
}

    .stat-info h3 {
        font-size: 22px;
        font-weight: 800;
        color: var(--dark);
        line-height: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-info p {
        font-size: 12px;
        color: var(--gray);
        margin-top: 4px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-info .stat-change {
        font-size: 11px;
        font-weight: 600;
        margin-top: 4px;
    }

.stat-change.up {
    color: var(--secondary);
}

.stat-change.down {
    color: var(--danger);
}

/* ========== TABLE CARD ========== */
.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    overflow: hidden;
}

.table-card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

    .table-card-header h3 {
        font-size: 14px;
        font-weight: 700;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .table-card-header h3 i {
            color: var(--primary);
        }
.table-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.table-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-light);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    min-width: 300px;
    flex: 1;
    max-width: 320px;
    height: 36px;
}

    .table-search input {
        border: none;
        background: none;
        font-size: 13px;
        font-family: 'Inter', sans-serif;
        outline: none;
        width: 160px;
        min-width: 0;
    }

    .table-search i {
        color: var(--gray);
        font-size: 13px;
        flex-shrink: 0;
    }
/* Mobile */
@media (max-width: 768px) {
    .table-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search {
        width: 100%;
        max-width: 100%;
        height: 40px;
    }

    .table-filters select {
        width: 100%;
        height: 40px;
    }
}
/* ========== TABLA DESKTOP ========== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead th {
    background: var(--gray-light);
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1px;
    color: var(--gray);
    white-space: nowrap;
    border-bottom: 1px solid var(--gray-border);
}

/* FILAS */
tbody tr {
    border-bottom: 1px solid var(--gray-border);
    transition: background .15s;    
}
    tbody tr:last-child {
        border-bottom: none;
    }

    tbody tr:hover {
        background: #f8fafc;
    }

/* CELDAS */
tbody td {
    padding: 0px 14px; /* 🔽 clave: antes 11px 14px */
    vertical-align: middle;
}

/* ========================================
   TABLA → CARD EN MOBILE
   ======================================== */
@media (max-width: 700px) {

    /* Ocultar encabezado de tabla */
    .table-responsive thead {
        display: none;
    }

    /* Cada fila se convierte en una card */
    .table-responsive tbody tr {
        display: block;
        background: white;
        border-radius: var(--radius);
        border: 1px solid var(--gray-border);
        margin: 10px 12px;
        padding: 14px;
        box-shadow: var(--shadow);
    }

        .table-responsive tbody tr:hover {
            background: white;
        }

    /* Cada celda se convierte en una fila con label */
    .table-responsive tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 7px 0;
        border-bottom: 1px solid #f1f5f9;
        font-size: 13px;
        gap: 8px;
    }

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

        /* Label generado desde data-label */
        .table-responsive tbody td::before {
            content: attr(data-label);
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .4px;
            color: var(--gray);
            flex-shrink: 0;
            min-width: 80px;
        }

        /* Primera celda (avatar/nombre) sin label, full width */
        .table-responsive tbody td:first-child {
            flex-direction: column;
            align-items: flex-start;
            border-bottom: 1px solid var(--gray-border);
            padding-bottom: 12px;
            margin-bottom: 4px;
        }

            .table-responsive tbody td:first-child::before {
                display: none;
            }

        /* Acciones centradas al final */
        .table-responsive tbody td:last-child {
            justify-content: flex-end;
            padding-top: 10px;
        }

            .table-responsive tbody td:last-child::before {
                display: none;
            }

    /* Avatar cell en mobile */
    .avatar-cell {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
        transition: background 0.2s;
    }
        .avatar-cell:not(:last-child) {
            border-bottom: 1px solid #f1f5f9;
        }

        .avatar-cell:hover {
            background: #f8fafc;
        }
}

/* ========== AVATAR ========== */
.avatar-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    transition: background 0.2s;
}
    .avatar-cell:not(:last-child) {
        border-bottom: 1px solid #f1f5f9;
    }
    .avatar-cell:hover {
        background: #f8fafc;
    }

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    margin-bottom: 5px;
}

.avatar-info .name {
    font-weight: 600;
    font-size: 13px;
}

.avatar-info .sub {
    font-size: 12px;
    color: var(--gray);
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    white-space: nowrap;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-purple {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-gray {
    background: #f1f5f9;
    color: #475569;
}

.badge-orange {
    background: #ffedd5;
    color: #9a3412;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(99,102,241,.4);
    }

.btn-success {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
}

    .btn-success:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(16,185,129,.4);
    }

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

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

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

    .btn-warning:hover {
        background: #d97706;
    }

.btn-outline {
    background: none;
    border: 2px solid var(--gray-border);
    color: var(--gray);
}

    .btn-outline:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-light);
    }

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: none;
    border: 1px solid var(--gray-border);
    color: var(--gray);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
    flex-shrink: 0;
}

    .btn-icon:hover {
        background: var(--primary-light);
        color: var(--primary);
        border-color: var(--primary);
    }

    .btn-icon.danger:hover {
        background: #fee2e2;
        color: var(--danger);
        border-color: var(--danger);
    }

    .btn-icon.success:hover {
        background: #d1fae5;
        color: var(--secondary);
        border-color: var(--secondary);
    }

.actions-cell {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* ========== FORMS ========== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

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

    .form-group label {
        font-size: 13px;
        font-weight: 600;
        color: var(--dark);
    }

    .form-group.full-width {
        grid-column: 1 / -1;
    }

.form-control {
    padding: 10px 14px;
    border: 2px solid var(--gray-border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    transition: var(--transition);
    outline: none;
    background: white;
    width: 100%;
}

    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px var(--primary-light);
    }

select.form-control {
    cursor: pointer;
}

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

.form-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary);
    margin-bottom: 4px;
    margin-top: 4px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    grid-column: 1 / -1;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    overflow-y: auto;
}

.modal-box {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    box-shadow: var(--shadow-lg);
    margin: auto;
    position: relative;
}

    .modal-box.modal-lg {
        max-width: 900px;
    }

    .modal-box.modal-sm {
        max-width: 420px;
    }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-border);
}

    .modal-header h3 {
        font-size: 16px;
        font-weight: 700;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .modal-header h3 i {
            color: var(--primary);
        }

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

    .modal-close:hover {
        background: var(--gray-light);
        color: var(--dark);
    }

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--gray-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========== CONFIRM MODAL ========== */
.confirm-modal-body {
    text-align: center;
    padding: 8px 0;
}

    .confirm-modal-body i {
        font-size: 52px;
        color: var(--danger);
        margin-bottom: 16px;
    }

    .confirm-modal-body h3 {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .confirm-modal-body p {
        color: var(--gray);
        font-size: 14px;
    }

/* ========== TOAST ========== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: calc(100vw - 32px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    min-width: 260px;
    max-width: 360px;
    animation: slideInRight .3s ease;
    font-size: 13px;
    font-weight: 500;
}

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

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

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

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

    .toast i {
        font-size: 16px;
        flex-shrink: 0;
    }

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

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

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

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* ========== GRID 2 ========== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.chart-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    padding: 16px;
    min-width: 0;
}

    .chart-card h3 {
        font-size: 14px;
        font-weight: 700;
        color: var(--dark);
        margin-bottom: 14px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .chart-card h3 i {
            color: var(--primary);
        }

/* ========== PROGRESS BAR ========== */
.progress-bar {
    height: 8px;
    background: var(--gray-border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width .5s ease;
}

/* ========== RUTINAS ========== */
.rutina-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    overflow: hidden;
    transition: var(--transition);
}

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

.rutina-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

    .rutina-header h3 {
        font-size: 14px;
        font-weight: 700;
    }

    .rutina-header p {
        font-size: 8px;
        opacity: .8;
        margin-top: 4px;
    }

.rutina-body {
    padding: 14px 16px;
}

.rutina-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rutina-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

    .rutina-meta-item i {
        color: var(--primary);
    }

.ejercicio-dia {
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 10px;
    margin-bottom: 8px;
}

    .ejercicio-dia h4 {
        font-size: 13px;
        font-weight: 700;
        color: var(--primary);
        margin-bottom: 8px;
    }

.ejercicio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-border);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 4px;
}

    .ejercicio-item:last-child {
        border-bottom: none;
    }

.ejercicio-name {
    font-weight: 600;
}

.ejercicio-details {
    color: var(--gray);
    font-size: 12px;
}

/* ========== CAJA ========== */
.caja-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.caja-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    text-align: center;
}

    .caja-card .amount {
        font-size: 24px;
        font-weight: 800;
        margin: 8px 0;
    }

    .caja-card .label {
        font-size: 12px;
        color: var(--gray);
        font-weight: 500;
    }

.amount.green {
    color: var(--secondary);
}

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

.amount.blue {
    color: var(--info);
}

/* ========== LIQUIDACION ========== */
.liquidacion-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 16px 0;
    background: var(--gray-light);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.liq-item {
    text-align: center;
}

    .liq-item .liq-val {
        font-size: 20px;
        font-weight: 800;
    }

    .liq-item .liq-label {
        font-size: 11px;
        color: var(--gray);
        font-weight: 600;
        margin-top: 2px;
    }

.liq-val.green {
    color: var(--secondary);
}

.liq-val.red {
    color: var(--danger);
}

.liq-val.blue {
    color: var(--info);
}

.liq-val.dark {
    color: var(--dark);
}

/* ========== PLAN CARDS ========== */
.plan-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.plan-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    overflow: hidden;
    transition: var(--transition);
}

    .plan-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

.plan-card-top {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-align: center;
}

    .plan-card-top .price {
        font-size: 28px;
        font-weight: 800;
    }

        .plan-card-top .price span {
            font-size: 14px;
            font-weight: 400;
        }

    .plan-card-top h3 {
        font-size: 15px;
        font-weight: 700;
        margin-top: 4px;
    }

.plan-card-body {
    padding: 16px;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 5px 0;
}

    .plan-feature i {
        color: var(--secondary);
    }

/* ========== PORTAL SOCIO ========== */
.portal-welcome {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    padding: 24px;
    color: white;
    margin-bottom: 20px;
}

    .portal-welcome h2 {
        font-size: 20px;
        font-weight: 800;
    }

    .portal-welcome p {
        opacity: .85;
        margin-top: 6px;
        font-size: 13px;
    }

.portal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.portal-stat {
    background: white;
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    text-align: center;
}

    .portal-stat i {
        font-size: 24px;
        color: var(--primary);
        margin-bottom: 8px;
    }

    .portal-stat .val {
        font-size: 20px;
        font-weight: 800;
        color: var(--dark);
    }

    .portal-stat .lbl {
        font-size: 12px;
        color: var(--gray);
        font-weight: 500;
    }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

    .empty-state i {
        font-size: 48px;
        opacity: .3;
        margin-bottom: 16px;
    }

    .empty-state h3 {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 8px;
        color: var(--dark);
    }

    .empty-state p {
        font-size: 13px;
    }

/* ========== FILTER BAR ========== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--gray-light);
    border-bottom: 1px solid var(--gray-border);
}

    .filter-bar label {
        font-size: 12px;
        font-weight: 600;
        color: var(--gray);
    }

    .filter-bar select, .filter-bar input {
        padding: 6px 10px;
        border: 1px solid var(--gray-border);
        border-radius: 6px;
        font-size: 12px;
        font-family: 'Inter', sans-serif;
        background: white;
        outline: none;
    }

/* ========== ASISTENCIA ========== */
.asistencia-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 12px;
}

.asistencia-day {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

    .asistencia-day.presente {
        background: #d1fae5;
        color: #065f46;
    }

    .asistencia-day.ausente {
        background: #fee2e2;
        color: #991b1b;
    }

    .asistencia-day.tardanza {
        background: #fef3c7;
        color: #92400e;
    }

    .asistencia-day.libre {
        background: var(--gray-light);
        color: var(--gray);
    }

/* ========== TURNOS/HORARIOS ========== */
.horario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 12px;
}

.horario-slot {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 6px;
    padding: 8px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
}

    .horario-slot.trabajando {
        background: #d1fae5;
        color: #065f46;
    }

    .horario-slot.libre {
        background: var(--gray-light);
        color: var(--gray);
    }

/* ========== DETAIL VIEW ========== */
.detail-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    padding: 20px;
    color: white;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.detail-info h2 {
    font-size: 20px;
    font-weight: 800;
}

.detail-info p {
    opacity: .85;
    font-size: 13px;
    margin-top: 4px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.detail-item label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray);
}

.detail-item p {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-top: 4px;
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--gray-border);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

    .tab-btn:hover {
        color: var(--primary);
    }

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

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-top: 1px solid var(--gray-border);
    font-size: 13px;
    color: var(--gray);
    flex-wrap: wrap;
    gap: 8px;
}

.pagination-btns {
    display: flex;
    gap: 4px;
}

.page-btn {
    padding: 4px 10px;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

    .page-btn:hover, .page-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

/* ========== LOADING ========== */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   EDITOR DE RUTINAS
   ======================================== */
.dia-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ejercicios-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 60px;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #f1f5f9;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12px;
    color: #475569;
    text-transform: uppercase;
    align-items: center;
}

.ejercicio-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 60px;
    gap: 12px;
    margin-bottom: 10px;
    align-items: center;
}

    .ejercicio-row input {
        width: 100%;
        height: 40px;
        padding: 10px 12px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        font-size: 13px;
    }

        .ejercicio-row input:focus {
            border-color: #6366f1;
            outline: none;
            box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
        }

.btn-icon-danger {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: var(--transition);
}

    .btn-icon-danger:hover {
        background: #fecaca;
    }

.recurso-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

    .recurso-item input {
        flex: 1;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 10px 12px;
        font-size: 13px;
    }

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

/* Tablet */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Sidebar */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

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

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

    /* Layout */
    .pages-container {
        padding: 12px;
    }

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

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

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

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

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

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

    /* Page header */
    .page-header h2 {
        font-size: 17px;
    }

    .page-header {
        margin-bottom: 14px;
    }

    /* Modal */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal-box {
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
    }

    .modal-body {
        max-height: 65vh;
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 99;
    }

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

    /* Topbar */
    .topbar-user {
        display: none;
    }

    /* Table search */
    .table-search input {
        width: 120px;
    }

    .table-card-header {
        padding: 10px 12px;
    }

    /* Rutinas editor */
    .ejercicio-row {
        grid-template-columns: 1fr;
        gap: 8px;
        background: #f8fafc;
        padding: 10px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .ejercicios-header {
        display: none;
    }

    .ejercicio-row input {
        height: 38px;
    }

    .ejercicio-row .btn-icon-danger {
        margin: 0;
    }

    /* Caja summary */
    .caja-summary {
        grid-template-columns: 1fr 1fr;
    }

    .caja-card .amount {
        font-size: 20px;
    }

    /* Detail header */
    .detail-header {
        padding: 16px;
    }

    .detail-avatar {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    .detail-info h2 {
        font-size: 17px;
    }
}

/* Mobile pequeño */
@media (max-width: 400px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .caja-summary {
        grid-template-columns: 1fr;
    }

    .demo-btns {
        flex-direction: column;
        align-items: center;
    }

    .login-container {
        padding: 28px 20px;
    }
}

/* ========== UTILITIES ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

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

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

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

.mb-16 {
    margin-bottom: 16px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

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

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.w-full {
    width: 100%;
}

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

.text-sm {
    font-size: 12px;
}

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

.hidden {
    display: none !important;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

#globalLoader {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
    z-index: 9999;
    transition: width 0.3s ease, opacity 0.4s ease;
    opacity: 0;
}

    /* animación cuando está activo */
    #globalLoader.active {
        opacity: 1;
        width: 70%;
    }

    /* animación final */
    #globalLoader.done {
        width: 100%;
        opacity: 0;
    }

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* BASE */
.alert-card {
    border-radius: 10px;
    padding: 12px;
    border-left: 4px solid;
    background: #f8fafc;
}

/* CONTENIDO */
.alert-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .alert-content.center {
        justify-content: center;
        gap: 10px;
    }

/* SUB TEXTO */
.alert-sub {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

/* 🔴 DANGER */
.alert-card.danger {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* 🟡 WARNING */
.alert-card.warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

/* 🟢 SUCCESS */
.alert-card.success {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}
.alert-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .alert-content.column {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

        .alert-content.column button {
            margin-top: 6px;
        }

/* Estilos generales de la card (para asegurar consistencia con Imagen 1) */

/* --- 1. CONTENEDOR PRINCIPAL (CARD) --- */
.rutina-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease;
}

/* --- 2. CABECERA (VIOLETA) --- */
.rutina-header {
    background-color: #5c4bdf;
    color: white;
    padding: 16px;
}

    .rutina-header h3 {
        margin: 0;
        font-size: 1.15rem;
        font-weight: 700;
    }

    .rutina-header p {
        margin: 4px 0 0;
        font-size: 0.85rem;
        opacity: 0.9;
        line-height: 1.2;
    }

/* --- 3. CUERPO DE LA CARD --- */
.rutina-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

/* Fila de Badges (Nivel y Objetivo) */
.rutina-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Info de Semanas, Días y Profesor */
.rutina-meta-compacta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: #64748b;
}

.meta-item, .rutina-profesor {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .rutina-meta-compacta i,
    .rutina-profesor i {
        color: #5c4bdf; /* Iconos en violeta según imagen */
        font-size: 0.9rem;
        width: 16px;
        text-align: center;
    }

/* --- 4. PREVISUALIZACIÓN DE EJERCICIOS (RECUADRO CELESTE) --- */
.ejercicios-preview-container {
    background-color: #f0f7ff;
    border-radius: 10px;
    padding: 12px;
    margin: 4px 0;
}

.dia-nombre {
    color: #5c4bdf;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: block;
}

.tabla-ejercicios-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fila-ejercicio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(92, 75, 223, 0.1); /* Borde sutil violeta */
}

    .fila-ejercicio:last-child {
        border-bottom: none;
    }

.ej-nombre {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

.ej-valores {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* --- 5. BOTONES DE ACCIÓN --- */
.rutina-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
}

.btn-ver {
    flex: 2;
    background: white;
    border: 1px solid #e2e8f0;
    color: #838384;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-edit {
    flex: 1;
    background: #5c4bdf;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-del {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-ver:hover {
    background: #f8fafc;
}

.btn-edit:hover {
    background: #4a3bc7;
}

.btn-del:hover {
    background: #fecaca;
}