/**
 * JWARDMUSCLE - Member Dashboard Styles
 * Royal Blue Glassmorphism Design
 * Version: 1.0.0
 * Date: January 11, 2026
 */

/* ============================================
   GLOBAL DASHBOARD STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1e1b4b 50%, #1e3a8a 100%);
    min-height: 100vh;
    color: #fff;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* ============================================
   AUTHENTICATION MODAL
   ============================================ */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.auth-modal-content {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(45, 91, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 30px;
    padding: 50px 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-modal-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2d5bff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-modal-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Auth Forms */
.auth-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: rgba(30, 64, 175, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.link-btn {
    background: none;
    border: none;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.link-btn:hover {
    color: #2d5bff;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #2d5bff 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(45, 91, 255, 0.4);
}

.btn-full {
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: rgba(255, 255, 255, 0.5);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.auth-divider span {
    padding: 0 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Social Sign In */
.social-signin {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-social {
    width: 100%;
    padding: 15px;
    background: rgba(30, 64, 175, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-social:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.btn-social svg {
    width: 20px;
    height: 20px;
}

.auth-switch {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* ============================================
   DASHBOARD CONTENT
   ============================================ */

.dashboard-content {
    display: flex;
    min-height: 100vh;
}

/* Dashboard Navigation */
.dashboard-nav {
    width: 280px;
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.15) 0%, rgba(45, 91, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.nav-logo h1 {
    font-size: 1.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #2d5bff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    padding: 15px 20px;
    background: rgba(30, 64, 175, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #fff;
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2d5bff 100%);
    border-color: #3b82f6;
    color: #fff;
}

.btn-signout {
    padding: 15px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-signout:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

/* Dashboard Main */
.dashboard-main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(45, 91, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(45, 91, 255, 0.3);
}

.stat-icon {
    font-size: 3rem;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #3b82f6 0%, #2d5bff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Quick Actions */
.quick-actions {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(45, 91, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 30px;
}

.quick-actions h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2d5bff 100%);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

/* Content List */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-state {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(45, 91, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Booking Card */
.booking-card,
.program-card,
.subscription-card {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(45, 91, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
}

.booking-card:hover,
.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(45, 91, 255, 0.3);
}

.booking-header,
.program-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.booking-header h3,
.program-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.booking-time,
.program-duration {
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.booking-details,
.program-details,
.subscription-details {
    margin-bottom: 20px;
}

.booking-details p,
.program-details p,
.subscription-details p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    line-height: 1.6;
}

.booking-actions,
.program-actions,
.subscription-actions {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #ef4444;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Profile Form */
.profile-form {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(45, 91, 255, 0.15) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.95) 0%, rgba(45, 91, 255, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95) 0%, rgba(22, 163, 74, 0.95) 100%);
    border-color: rgba(34, 197, 94, 0.5);
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    border-color: rgba(239, 68, 68, 0.5);
}

.toast-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
    border-color: rgba(59, 130, 246, 0.5);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .dashboard-nav {
        width: 240px;
    }

    .dashboard-main {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .dashboard-content {
        flex-direction: column;
    }

    .dashboard-nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    }

    .nav-links {
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
    }

    .nav-link {
        white-space: nowrap;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .dashboard-main {
        padding: 20px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-content h3 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .auth-modal-content {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        left: 20px;
        right: 20px;
    }

    .toast {
        transform: translateY(100px);
    }

    .toast.show {
        transform: translateY(0);
    }
}
