/* ================= CORE CONFIGURATION & VARIABLES ================= */
:root {
    /* Color Palette */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --success-hover: #059669;
    --success-light: #ecfdf5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fefbeb;
    
    /* Grays & Neutrals */
    --dark-blue: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    
    /* Layout */
    --sidebar-width: 280px;
    --transition-speed: 0.25s;
    --border-radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--dark-blue);
    font-weight: 700;
}

.hidden {
    display: none !important;
}

/* ================= COMPONENTES GENERALES (BOTONES, TARJETAS, ETC) ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
}

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

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

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

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

.btn-block {
    display: flex;
    width: 100%;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}
.btn-text:hover {
    text-decoration: underline;
}

.icon-inline {
    width: 18px;
    height: 18px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.card-icon {
    font-size: 1.5rem;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
}

/* ================= 1. PANTALLA DE AUTENTICACIÓN (LOGIN & REGISTRO) ================= */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    padding: 20px;
}

.auth-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 480px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.grad-cap-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.grad-cap-icon {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.auth-header h1 {
    font-size: 1.85rem;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.input-icon svg {
    width: 20px;
    height: 20px;
}

.input-group input {
    width: 100%;
    padding: 12px 14px 12px 46px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: border-color var(--transition-speed) ease;
}

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

.auth-divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    z-index: 1;
}

.auth-divider span {
    background-color: var(--bg-card);
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

/* Google Login Mock Block */
.google-login-mock {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    background-color: #ffffff;
    transition: all var(--transition-speed) ease;
    margin-bottom: 24px;
}

.google-login-mock:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.google-mock-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid var(--border-color);
}

.google-mock-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.mock-action {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
}

.mock-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.google-logo {
    display: flex;
    align-items: center;
}

.auth-footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.no-access-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.exclusive-access {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ================= 2. DASHBOARD DE USUARIO ================= */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: #1e293b;
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 6px;
}

.sidebar-header h2 {
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
    line-height: 1.3;
}

.sidebar-menu {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    color: #cbd5e1;
}

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

.menu-item.active {
    background-color: var(--primary);
    color: white;
}

.item-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-contacts {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contacts-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.contacts-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.contact-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.whatsapp-btn {
    background-color: #25d366;
}

.calendly-btn {
    background-color: #006bff;
}

.sidebar-user-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.15);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: #94a3b8;
}

.logout-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}
.logout-btn:hover {
    color: var(--danger);
}
.logout-btn svg {
    width: 20px;
    height: 20px;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.top-bar h1 {
    font-size: 1.5rem;
}

.top-bar-actions {
    display: flex;
    gap: 12px;
}

.btn-leader-access {
    background-color: #0d9488;
    color: white;
}
.btn-leader-access:hover {
    background-color: #0f766e;
}

.btn-admin-access {
    background-color: var(--primary);
    color: white;
}
.btn-admin-access:hover {
    background-color: var(--primary-hover);
}

.content-viewport {
    padding: 32px;
    flex-grow: 1;
}

.dashboard-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.dashboard-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bienvenida / Welcome Card Styling */
.welcome-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: linear-gradient(to right, #ffffff, #fdfdfd);
    border-left: 5px solid var(--primary);
}

.welcome-text-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
}

.welcome-text-side h2 {
    font-size: 1.85rem;
    line-height: 1.25;
}

.welcome-p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.welcome-graphics-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.graphics-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.spartan-img {
    height: 140px;
    object-fit: contain;
    border-radius: 8px;
}

.aitor-img {
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Sustainability Box */
.sustainability-box {
    background-color: #f1f5f9;
    border-radius: 10px;
    padding: 20px;
    border: 1px dashed #cbd5e1;
}

.sustainability-box h3 {
    font-size: 0.8rem;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    font-weight: 800;
}

.sustainability-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.sustainability-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: #475569;
}

.sustainability-total {
    border-top: 1px solid #cbd5e1;
    padding-top: 8px;
    margin-top: 4px;
    font-weight: 700;
    color: var(--dark-blue) !important;
    font-size: 0.95rem !important;
}

/* Messages & Announcements cards */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.messages-card, .announcements-card {
    margin-bottom: 0;
    min-height: 200px;
}

.card-body {
    padding-top: 8px;
}

.announcement-item {
    background-color: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.announcement-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Tasks Banner */
.tasks-banner {
    display: flex;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.tasks-badge {
    background-color: var(--success);
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
}

.tasks-content {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: #065f46;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Goals Tracking Widget */
.goals-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.goals-body {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}

.goal-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.goal-empty-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.habit-tracker-box {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.habit-tracker-box h5 {
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: #475569;
}

.habit-checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.habit-checklist label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
}

.habit-checklist input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Progress bar style */
.progress-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--success);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-percentage {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success);
    text-align: right;
}

/* Radar Chart Placeholder */
.radar-chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px dashed var(--border-color);
    min-height: 220px;
}

.radar-circle {
    width: 120px;
    height: 120px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-circle::before {
    content: '';
    width: 70px;
    height: 70px;
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    position: absolute;
}

.radar-circle::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    position: absolute;
}

.radar-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
}

.chart-caption {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* ================= 3. MODALES GENERALES ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.2s ease;
}

.modal-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 440px;
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.35rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: var(--text-main);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-input-group input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
}

.modal-input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.modal-body-padding {
    padding-top: 8px;
}

.modal-p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.ref-error-message {
    font-size: 0.8rem;
    color: var(--danger);
    font-weight: 500;
    margin-top: 6px;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ================= 4. PANEL DE ADMINISTRACIÓN ================= */
.admin-container {
    min-height: 100vh;
    background-color: #f1f5f9;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 16px;
}

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

.owner-badge {
    background-color: var(--dark-blue);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.owner-badge span {
    background-color: var(--primary);
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    font-size: 0.75rem;
}

.admin-header-right {
    display: flex;
    gap: 12px;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.admin-grid-top {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.admin-form-card {
    margin-bottom: 0;
}

.admin-row-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.form-field label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
}

.form-field input, .form-field select {
    padding: 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
}

.form-field input:focus, .form-field select:focus {
    outline: none;
    border-color: var(--primary);
}

.announcement-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.announcement-form textarea {
    width: 100%;
    height: 100px;
    padding: 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
}
.announcement-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.align-self-right {
    align-self: flex-end;
}

/* Referral display alert */
.referral-alert-card {
    background-color: var(--success-light);
    border: 1px solid #a7f3d0;
    border-radius: var(--border-radius);
    padding: 16px;
}

.referral-alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

.referral-input-url {
    flex-grow: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1.5px solid #a7f3d0;
    background-color: white;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--success-hover);
}

/* Member list Table card */
.admin-table-card {
    padding: 0;
    overflow: hidden;
}

.table-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-search-wrapper input {
    padding: 8px 16px;
    border-radius: 50px;
    border: 1.5px solid var(--border-color);
    font-size: 0.85rem;
    width: 260px;
}
.table-search-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
}

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

.members-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.members-table th {
    background-color: #f8fafc;
    padding: 14px 24px;
    font-weight: 600;
    color: #475569;
    border-bottom: 1.5px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.members-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-joined {
    background-color: var(--success-light);
    color: #065f46;
}

.badge-invited {
    background-color: var(--warning-light);
    color: #92400e;
}

/* Action buttons inside table */
.action-btn-group {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}
.btn-icon:hover {
    background-color: #f1f5f9;
}
.btn-icon.delete:hover {
    color: var(--danger);
    background-color: var(--danger-light);
}

/* ================= COMPLEMENTARY MOCK VIEWS (COURSES, VIDEO, TESTIMONIAL) ================= */
.section-intro {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 1rem;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.text-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.text-block h3 {
    margin-top: 10px;
    font-size: 1.2rem;
}

.text-block ul {
    list-style-position: inside;
    padding-left: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Onboarding checklist */
.onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #f8fafc;
}

.step-item.completed {
    border-color: #a7f3d0;
    background-color: #f0fdf4;
}

.step-number {
    width: 36px;
    height: 36px;
    background-color: var(--text-muted);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.completed .step-number {
    background-color: var(--success);
}

.step-info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.step-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Video mockup */
.video-mockup {
    position: relative;
    width: 100%;
    height: 340px;
    background-color: #0f172a;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
    margin-bottom: 24px;
    overflow: hidden;
}
.video-mockup::before {
    content: '';
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 0.4) 100%);
    z-index: 1;
}

.video-play-btn {
    z-index: 2;
    background-color: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s ease, background-color 0.2s ease;
    border: 2px solid white;
}
.video-mockup:hover .video-play-btn {
    transform: scale(1.1);
    background-color: var(--primary);
}

.video-duration {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background-color: rgba(0,0,0,0.6);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
    font-family: monospace;
}

.video-title {
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    z-index: 2;
}

.compensation-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.comp-box {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.comp-box h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.comp-box p {
    font-size: 0.85rem;
    color: #475569;
}

/* Course cards */
.course-card {
    padding: 0;
    overflow: hidden;
}

.course-thumbnail {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
}

.bg-teal { background: linear-gradient(135deg, #0d9488 0%, #115e59 100%); }
.bg-indigo { background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%); }
.bg-purple { background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%); }

.course-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-content h3 {
    font-size: 1.05rem;
}

.course-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Products */
.product-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-img-placeholder {
    height: 160px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.product-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-body h4 {
    font-size: 1.1rem;
}

.product-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-grow: 1;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
    align-self: flex-start;
}

/* Testimonials */
.testimonial-slider {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.testimonial-card {
    background-color: #f8fafc;
    border-left: 4px solid var(--warning);
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.testimonial-text {
    font-style: italic;
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.6;
}

.testimonial-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark-blue);
}

/* Estilos por defecto para los botones y logo de menú móvil (ocultos en PC) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    transition: background-color var(--transition-speed) ease;
}
.mobile-menu-toggle:hover {
    background-color: var(--border-color);
}

.mobile-logo-text {
    display: none !important;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1e3a8a; /* Azul Zinzino */
    margin-left: 12px;
    flex-grow: 1;
    text-align: left;
}

.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #cbd5e1;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    transition: color var(--transition-speed) ease;
}
.sidebar-close-btn:hover {
    color: var(--danger);
}

.sidebar-overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1000;
    transition: opacity 0.3s ease;
}

/* Cabecera móvil (oculta en PC) */
.mobile-section-header {
    display: none;
}

/* ================= RESPONSIVE MEDIA QUERIES ================= */
@media (max-width: 1024px) {
    .welcome-card {
        grid-template-columns: 1fr;
    }
    .admin-grid-top {
        grid-template-columns: 1fr;
    }
    .admin-row-form {
        grid-template-columns: 1fr;
    }
    .goals-body {
        grid-template-columns: 1fr;
    }
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Ocultar elementos de escritorio en cabecera */
    #active-section-title {
        display: none !important;
    }
    .top-bar-actions {
        display: none !important;
    }

    /* Mostrar logo y botón de hamburguesa móvil en cabecera */
    .mobile-menu-toggle {
        display: flex !important;
    }
    .mobile-logo-text {
        display: block !important;
    }

    /* Mostrar cabecera de sección móvil abajo */
    .mobile-section-header {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
        text-align: left;
    }

    #mobile-page-title {
        font-size: 1.85rem;
        font-weight: 800;
        color: #1e3a8a;
        font-family: 'Outfit', sans-serif;
        position: relative;
        padding-bottom: 10px;
        margin-bottom: 4px;
        display: inline-block;
    }

    #mobile-page-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 48px;
        height: 3.5px;
        background-color: var(--primary);
        border-radius: 2px;
    }

    /* Botones de acceso en fila 50% de ancho en móvil */
    .mobile-action-buttons {
        display: flex;
        gap: 12px;
        width: 100%;
    }

    .mobile-action-buttons .btn {
        flex: 1;
        padding: 14px 10px;
        font-size: 0.95rem;
        font-weight: 700;
        border-radius: 10px;
        border: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    }

    .mobile-action-buttons .btn-leader-access {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
        color: white;
    }
    .mobile-action-buttons .btn-leader-access:hover {
        background: #047857;
    }

    .mobile-action-buttons .btn-admin-access {
        background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        color: white;
    }
    .mobile-action-buttons .btn-admin-access:hover {
        background: #1d4ed8;
    }

    /* Menú lateral estilo Drawer en móvil (Z-index superior) */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: 290px;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        box-shadow: 10px 0 25px rgba(15, 23, 42, 0.15);
        background-color: #ffffff; /* Fondo blanco muy limpio */
        border-right: 1px solid var(--border-color);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-close-btn {
        display: block !important; /* Visible solo en móvil */
    }

    /* Estilos del sidebar en móvil para que combine con el diseño blanco premium */
    .sidebar-header {
        background-color: #ffffff;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-header h2 {
        color: #1e3a8a;
        font-size: 1.05rem;
    }

    .sidebar-logo-icon {
        background-color: #e2e8f0;
        color: #1e3a8a;
    }

    .menu-item {
        color: #475569;
        font-weight: 600;
        background-color: transparent;
        padding: 12px 16px;
    }
    .menu-item:hover {
        background-color: #f1f5f9;
        color: #1e3a8a;
    }
    .menu-item.active {
        background-color: #eff6ff;
        color: #2563eb;
        border-left: 4px solid #2563eb;
        border-radius: 0 8px 8px 0;
        padding-left: 12px;
    }

    /* Mostrar todos los elementos del sidebar en móvil */
    .sidebar-header h2, .sidebar-logo-icon + h2,
    .menu-item span:not(.item-icon), .sidebar-contacts,
    .user-details, .sidebar-user-footer .logout-btn {
        display: flex !important;
    }
    
    .sidebar-menu {
        display: block !important;
    }
    
    .sidebar-user-footer {
        justify-content: space-between;
        padding: 16px;
        background-color: #f8fafc;
        border-top: 1px solid var(--border-color);
        display: flex !important;
    }

    .sidebar-user-footer .user-name {
        color: var(--dark-blue);
    }
    .sidebar-user-footer .user-role {
        color: var(--text-muted);
    }

    .sidebar-contacts {
        background-color: #f8fafc;
        border-top: 1px solid var(--border-color);
    }
    .sidebar-contacts .contacts-title {
        color: #64748b;
    }
    .sidebar-contacts .contacts-subtitle {
        color: #64748b;
    }

    /* Ajustes del contenido principal en móvil */
    .main-content {
        margin-left: 0 !important;
    }

    .top-bar {
        padding: 12px 16px;
        height: 60px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    }

    /* Escalado visual más grande en móvil (User UX) */
    body {
        font-size: 1.02rem;
    }

    .content-viewport {
        padding: 16px;
    }

    /* Botones y formularios más cómodos de pulsar */
    .btn {
        padding: 12px 20px;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .input-group input, .modal-input-group input, .form-field input, .form-field select {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .input-group .input-icon {
        left: 16px;
    }
    
    .input-group input {
        padding-left: 48px !important;
    }

    /* Welcome Card */
    .welcome-card {
        padding: 20px;
        gap: 24px;
        grid-template-columns: 1fr;
        border-left: none;
        border-top: 4px solid var(--primary);
    }
    
    .welcome-text-side {
        text-align: center;
    }

    .welcome-text-side h2 {
        font-size: 1.6rem;
    }

    .welcome-text-side .btn {
        align-self: center;
        width: 100%;
    }

    .graphics-container {
        display: flex;
        justify-content: space-between;
        background: none;
        border: none;
        padding: 0;
        margin-top: 12px;
    }
    
    .spartan-img, .aitor-img {
        width: 48%;
        height: 140px;
        background: white;
        padding: 8px;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        border: 1px solid var(--border-color);
        object-fit: contain;
    }
    
    .aitor-img {
        object-fit: cover;
    }

    .dashboard-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .grid-layout, .compensation-details, .testimonial-slider {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .admin-container {
        padding: 16px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .admin-header-right {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-header-right .btn {
        width: 100%;
    }
}
