/* ================================
   MEMBER DASHBOARD - LIGHT THEME
   Matches homepage design
   ================================ */

/* CSS Variables from main site */
:root {
    --color-white: #ffffff;
    --color-black: #1a1a1a;
    --color-teal: #4db8a8;
    --color-teal-light: #6fcfc0;
    --color-teal-dark: #3a9688;
    --color-orange: #FF8C42;
    --color-orange-dark: #e67a2e;
    --color-grey: #6b7280;
    --color-grey-light: #f3f4f6;
    --color-grey-dark: #374151;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--color-grey-light);
    color: var(--color-black);
    min-height: 100vh;
}

/* ================================
   HEADER (matches site header)
   ================================ */

.header {
    background: var(--color-white);
    border-bottom: 2px solid var(--color-teal);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-teal);
    letter-spacing: 2px;
}

.logo span {
    font-size: 0.7rem;
    color: var(--color-grey);
    display: block;
    margin-top: -0.3rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
}

.user-info-header {
    display: flex;
    flex-direction: column;
}

.user-info-header .user-name {
    font-weight: 600;
    color: var(--color-black);
}

.user-info-header .user-email {
    font-size: 0.85rem;
    color: var(--color-grey);
}

.btn-admin {
    background: var(--color-orange);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-admin:hover {
    background: var(--color-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 66, 0.3);
}

.btn-logout {
    background: var(--color-teal);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--color-teal-dark);
    transform: translateY(-2px);
}

/* ================================
   LAYOUT WITH LEFT SIDEBAR
   ================================ */

.dashboard-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 2rem;
}

/* Left Sidebar Navigation */
.sidebar {
    width: 250px;
    background: var(--color-white);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    color: var(--color-teal);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-teal);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-grey-dark);
    width: 100%;
    transition: all 0.3s ease;
    text-align: left;
}

.nav-item:hover {
    background: var(--color-grey-light);
    color: var(--color-teal);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
    color: white;
}

.nav-icon {
    font-size: 1.3rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0;
}

.content-section {
    display: none;
}

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

/* Section Header */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--color-black);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-grey);
    font-size: 1.1rem;
}

/* Content Card */
.content-card {
    background: var(--color-white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.content-card h3 {
    color: var(--color-teal);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-teal);
}

/* ================================
   STATS GRID
   ================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--color-teal);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-teal);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--color-grey);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================
   VIDEO FORM
   ================================ */

.video-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--color-teal);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-input {
    background: var(--color-white);
    border: 2px solid var(--color-grey-light);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--color-black);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(77, 184, 168, 0.1);
}

.form-input::placeholder {
    color: var(--color-grey);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
    font-family: 'Rajdhani', sans-serif;
}

.form-hint {
    color: var(--color-grey);
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 184, 168, 0.3);
}

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

/* ================================
   VIDEO ITEMS
   ================================ */

.video-item {
    background: var(--color-grey-light);
    border: 2px solid var(--color-grey-light);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.video-item:hover {
    border-color: var(--color-teal);
    box-shadow: 0 2px 10px rgba(77, 184, 168, 0.2);
}

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

.video-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 0.5rem;
}

.video-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.video-description {
    color: var(--color-grey-dark);
    margin: 0.75rem 0;
    line-height: 1.6;
}

.video-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--color-grey);
    margin-top: 1rem;
}

.video-link {
    color: var(--color-teal);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.video-link:hover {
    color: var(--color-teal-dark);
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-grey);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: var(--color-grey);
    font-style: italic;
}

/* ================================
   LOADING OVERLAY
   ================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(77, 184, 168, 0.3);
    border-top-color: var(--color-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ================================
   POINTS HISTORY
   ================================ */

.timeline {
    margin-top: 2rem;
}

.timeline-day {
    margin-bottom: 2rem;
}

.timeline-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-teal);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-grey-light);
}

.timeline-transactions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-grey-light);
}

.transaction-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.transaction-amount {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 80px;
}

.text-green {
    color: #10b981;
}

.text-red {
    color: #ef4444;
}

.transaction-reason {
    flex: 1;
    color: var(--color-grey-dark);
}

.transaction-notes {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-grey);
    font-style: italic;
}

/* ================================
   LEADERBOARD
   ================================ */

.rank-card {
    background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 2rem;
}

.rank-card h3 {
    color: white;
    border: none;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.rank-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.rank-number {
    font-size: 3rem;
    font-weight: 900;
}

.rank-total {
    font-size: 1.2rem;
    opacity: 0.9;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-item {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.leaderboard-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.leaderboard-item.is-current-user {
    background: linear-gradient(135deg, rgba(77, 184, 168, 0.1), rgba(77, 184, 168, 0.05));
    border-color: var(--color-teal);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 50px;
    text-align: center;
    color: var(--color-grey-dark);
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-black);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.you-badge {
    background: var(--color-teal);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.leaderboard-details {
    font-size: 0.9rem;
    color: var(--color-grey);
    margin-top: 0.25rem;
}

.leaderboard-change {
    font-size: 1rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.rank-up {
    color: #10b981;
}

.rank-down {
    color: #ef4444;
}

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

@media (max-width: 1024px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 640px) {
    .dashboard-wrapper {
        padding: 0 1rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BILLING SECTION STYLES
   ============================================ */

.billing-card { margin-bottom: 2rem; }
.subscription-details { margin: 1.5rem 0; }
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .label { color: #666; font-weight: 500; }
.detail-row .value { color: #000; font-weight: 600; }

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-active { background: #d4edda; color: #155724; }
.status-past_due { background: #fff3cd; color: #856404; }
.status-canceled { background: #f8d7da; color: #721c24; }
.status-paid { background: #d4edda; color: #155724; }
.status-open { background: #d1ecf1; color: #0c5460; }
.status-daily-pass { background: #e0e7ff; color: #4338ca; }

.payment-method-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.payment-method-section h4 { margin-bottom: 1rem; color: #333; }
.payment-method-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}
.card-brand { font-weight: 700; color: #00b4d8; text-transform: capitalize; }
.card-number { color: #333; letter-spacing: 2px; }
.card-expiry { color: #666; font-size: 0.9rem; }

.billing-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.billing-actions .btn { flex: 1; min-width: 180px; }
.btn-danger { background: #dc3545; color: white; border-color: #dc3545; }
.btn-danger:hover { background: #c82333; border-color: #bd2130; }

.invoice-list { margin-top: 1.5rem; }
.invoice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.2s;
}
.invoice-item:hover { border-color: #00b4d8; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.invoice-details { flex: 1; }
.invoice-date { font-weight: 600; color: #000; margin-bottom: 0.25rem; }
.invoice-description { color: #666; font-size: 0.9rem; margin-bottom: 0.25rem; }
.invoice-number { color: #999; font-size: 0.85rem; }
.invoice-amount {
    text-align: right;
    margin: 0 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #000;
}
.invoice-amount .invoice-status { display: block; font-size: 0.75rem; margin-top: 0.25rem; }
.invoice-actions .btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.no-data { text-align: center; color: #666; padding: 2rem; }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-content.modal-large { max-width: 900px; }
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
}
.modal-header h3 { margin: 0; color: #000; }
.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-close:hover { color: #000; }
.modal-body { padding: 2rem; }
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}
.modal-actions .btn-outline {
    background: white;
    color: #dc3545;
    border: 2px solid #dc3545;
}
.modal-actions .btn-outline:hover {
    background: #dc3545;
    color: white;
}

.stripe-card-element {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin: 1.5rem 0;
    transition: border-color 0.2s;
}
.stripe-card-element:focus-within { border-color: #00b4d8; }
.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8d7da;
    border-radius: 4px;
}

.plan-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.plan-option {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
}
.plan-option:hover { border-color: #00b4d8; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.plan-option.plan-current { border-color: #00b4d8; background: linear-gradient(135deg, #f0f9ff 0%, #e0f2f1 100%); }
.plan-badge {
    position: absolute;
    top: -12px;
    right: 12px;
    background: #00b4d8;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.plan-header { margin-bottom: 1rem; }
.plan-header h4 { margin: 0 0 0.5rem 0; color: #000; font-size: 1.5rem; }
.plan-price { font-size: 2rem; font-weight: 700; color: #00b4d8; }
.plan-price span { font-size: 1rem; color: #666; }
.plan-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}
.plan-features li { padding: 0.5rem 0; color: #333; }
.select-plan-btn { width: 100%; margin-top: 1rem; }

.proration-info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}
.proration-details { margin: 1rem 0; }
.proration-details .highlight { color: #00b4d8; font-size: 1.2rem; font-weight: 700; }
.proration-explanation {
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-left: 4px solid #00b4d8;
}

.warning-text { font-size: 1.1rem; color: #dc3545; font-weight: 600; }
.cancel-consequences { background: #fff3cd; border-left: 4px solid #ffc107; padding: 1rem; margin: 1.5rem 0; }
.cancel-consequences ul { margin: 0.5rem 0 0 1.5rem; }
.radio-group { margin: 1.5rem 0; }
.radio-option {
    display: flex;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.radio-option:hover { border-color: #00b4d8; }
.radio-option input[type="radio"] { margin-right: 1rem; margin-top: 0.25rem; }
.radio-option input[type="radio"]:checked ~ .radio-content { color: #00b4d8; }
.radio-title { font-weight: 600; margin-bottom: 0.25rem; }
.radio-description { font-size: 0.9rem; color: #666; }
.info-box { background: #f8f9fa; padding: 1rem; border-radius: 8px; margin: 1rem 0; }

.loading-state { text-align: center; padding: 3rem; }
.spinner {
    border: 4px solid #e0e0e0;
    border-top-color: #00b4d8;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}
.spinner-small {
    display: inline-block;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { text-align: center; padding: 3rem; }
.error-state .error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: #00b4d8; }
textarea.form-control { resize: vertical; min-height: 100px; }

@media (max-width: 768px) {
    .billing-actions { flex-direction: column; }
    .billing-actions .btn { width: 100%; }
    .invoice-item { flex-direction: column; align-items: flex-start; }
    .invoice-amount { margin: 1rem 0 0 0; }
    .invoice-actions { width: 100%; }
    .invoice-actions .btn-sm { width: 100%; }
    .plan-selection-grid { grid-template-columns: 1fr; }
    .modal-content { margin: 1rem; }
    .modal-actions { flex-direction: column; }
    .modal-actions .btn { width: 100%; }
}

/* ============================================
   MEMBER CHECK-IN SECTION STYLES
   ============================================ */

/* QR Code Display */
.qr-code-display {
    text-align: center;
    padding: 2rem;
}

.qr-code-container {
    display: inline-block;
    padding: 2rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 2rem;
}

#qr-code {
    display: inline-block;
}

#qr-code canvas {
    display: block;
}

.qr-code-info {
    margin-bottom: 2rem;
}

.qr-code-info p {
    margin: 0.5rem 0;
}

.text-muted {
    color: #666;
}

.text-small {
    font-size: 0.9rem;
    color: #999;
}

.qr-code-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.qr-code-tip {
    padding: 1rem;
    background: #f0f9ff;
    border-left: 4px solid #00b4d8;
    border-radius: 4px;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.qr-code-tip p {
    margin: 0;
    color: #666;
}

/* Punch Pass Status */
.punch-pass-display {
    text-align: center;
    padding: 2rem;
}

.practices-remaining {
    margin-bottom: 2rem;
}

.practices-number {
    font-size: 4rem;
    font-weight: 700;
    color: #00b4d8;
    line-height: 1;
}

.practices-label {
    font-size: 1.2rem;
    color: #666;
    margin-top: 0.5rem;
}

.punch-pass-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.punch-pass-actions .btn {
    min-width: 200px;
}

/* Check-In Stats */
.checkin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-box {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-box .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #00b4d8;
    margin-bottom: 0.5rem;
}

.stat-box .stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Check-In History */
#checkin-history-list {
    max-height: 500px;
    overflow-y: auto;
}

.checkin-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.checkin-history-item:hover {
    border-color: #00b4d8;
    background: #f0f9ff;
}

.checkin-date {
    display: flex;
    flex-direction: column;
}

.checkin-date .date {
    font-weight: 600;
    color: #000;
}

.checkin-date .time {
    font-size: 0.9rem;
    color: #666;
}

.checkin-details {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tier-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-daily { background: #e0e0e0; color: #666; }
.badge-punch { background: #fff3cd; color: #856404; }
.badge-cub { background: #cfe2ff; color: #084298; }
.badge-lion { background: #d1e7dd; color: #0f5132; }
.badge-pro { background: #f8d7da; color: #842029; }
.badge-annual { background: #e2d9f3; color: #6f42c1; }

.points-earned {
    padding: 0.25rem 0.5rem;
    background: #d4edda;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #155724;
}

.practices-info {
    padding: 0.25rem 0.5rem;
    background: #fff3cd;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #856404;
}

.card-subtitle {
    color: #666;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .qr-code-actions {
        flex-direction: column;
    }
    
    .qr-code-actions .btn {
        width: 100%;
    }
    
    .punch-pass-actions {
        flex-direction: column;
    }
    
    .punch-pass-actions .btn {
        width: 100%;
    }
    
    .checkin-stats {
        grid-template-columns: 1fr;
    }
    
    .checkin-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media print {
    /* Hide everything except QR code when printing */
    body * {
        visibility: hidden;
    }
    
    #qr-code, #qr-code * {
        visibility: visible;
    }
    
    #qr-code {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

/* ================================================
   SESSION EXPIRATION WARNINGS
   ================================================ */

.session-warning {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    min-width: 400px;
    max-width: 600px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.session-warning-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    border-left: 4px solid #ff9800;
}

.session-warning-warning .session-warning-content {
    background: #fff3cd;
    border-left-color: #ff9800;
}

.session-warning-urgent .session-warning-content {
    background: #f8d7da;
    border-left-color: #dc3545;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
    }
}

.session-warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.session-warning-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.session-warning-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.session-warning-close:hover {
    color: #333;
}

.session-expired-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.session-expired-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.session-expired-content h2 {
    margin: 0 0 20px 0;
    color: #dc3545;
    font-size: 24px;
}

.session-expired-content p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.6;
}

.session-expired-content p:last-of-type {
    margin-bottom: 25px;
}

.session-expired-content .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .session-warning {
        min-width: 90%;
        max-width: 90%;
        top: 60px;
    }
    
    .session-expired-content {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* ================================================
   SITE NAVIGATION LINKS
   ================================================ */

/* Style for main site navigation links */
.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 4px 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-primary);
    width: 100%;
}

.nav-link:hover {
    background: rgba(54, 176, 158, 0.1);
    transform: translateX(4px);
}

.nav-link .nav-icon {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.nav-link .nav-label {
    font-size: 15px;
    font-weight: 500;
}

/* Make logo clickable with hover effect */
.logo {
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

/* ===================================================
   PASSWORD RESET STYLES
   =================================================== */

/* Forgot Password Link */
.forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #4db8a8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: #3a9988;
    text-decoration: underline;
}

/* Back to Login Link */
.back-to-login-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    color: #4db8a8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-to-login-link:hover {
    color: #3a9988;
}

/* Success Message Styling */
.success-message {
    padding: 0.75rem;
    margin-top: 1rem;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}

/* ===================================================
   AUTH MODAL POSITIONING FIX
   =================================================== */

.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-modal.show {
    display: flex !important;
}

/* Ensure modal content is properly styled */
.auth-modal .modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 2rem;
}

/* Auth modal content */
.auth-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
}

/* Auth close button */
.auth-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.auth-close:hover {
    color: #000;
}

/* Auth header */
.auth-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #eee;
}

.auth-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

/* Auth tabs */
#auth-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #4db8a8;
    border-bottom-color: #4db8a8;
}

.auth-tab:hover {
    color: #4db8a8;
    background: rgba(77, 184, 168, 0.05);
}

/* Auth form */
.auth-form {
    padding: 2rem;
}

.auth-form h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    text-align: center;
    font-size: 1.25rem;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #4db8a8;
}

/* Password input wrapper for visibility toggle */
.password-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 3rem;
    margin-bottom: 0;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    transition: color 0.2s;
    user-select: none;
}

.toggle-password:hover {
    color: #4db8a8;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.toggle-password.visible {
    color: #4db8a8;
}

.btn-auth {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Error message — auth modal */
.error-message {
    display: none;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: #f8d7da;
    color: #dc3545;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .auth-modal {
        padding: 1rem;
    }
    
    .auth-modal-content {
        max-width: 100%;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
}

/* ================================================
   MUSIC PLAYER — LIONS DEN RADIO
   Integrated into member dashboard light theme
   ================================================ */

/* ── Language filter bar ── */
.music-filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.music-filter-btn {
    padding: 0.45rem 1.2rem;
    background: var(--color-white);
    border: 1.5px solid var(--color-grey-light);
    border-radius: 20px;
    color: var(--color-grey);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.music-filter-btn:hover {
    border-color: var(--color-teal);
    color: var(--color-teal);
}

.music-filter-btn.active {
    background: rgba(77,184,168,0.1);
    border-color: var(--color-teal);
    color: var(--color-teal);
}

/* ── Track list card ── */
.music-tracklist-card {
    padding: 0 !important;
    overflow: hidden;
}

.music-track-list {
    display: flex;
    flex-direction: column;
}

/* ── Individual track row ── */
.music-track-item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--color-grey-light);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

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

.music-track-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-teal);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.music-track-item:hover {
    background: rgba(77,184,168,0.04);
}

.music-track-item:hover::before {
    transform: scaleY(0.4);
}

.music-track-item.active {
    background: rgba(77,184,168,0.08);
}

.music-track-item.active::before {
    transform: scaleY(1);
}

/* Track number / EQ bars */
.music-track-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
}

.music-num-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-grey);
    transition: all 0.2s;
}

.music-track-item.active .music-num-text {
    color: var(--color-teal);
}

/* Animated EQ bars */
.music-eq-bars {
    display: none;
    gap: 2px;
    align-items: flex-end;
    height: 16px;
}

.music-eq-bars span {
    display: block;
    width: 3px;
    background: var(--color-teal);
    border-radius: 2px;
    animation: music-eq 0.8s ease-in-out infinite alternate;
}

.music-eq-bars span:nth-child(2) { animation-delay: 0.15s; }
.music-eq-bars span:nth-child(3) { animation-delay: 0.3s; }

@keyframes music-eq {
    from { height: 4px; }
    to   { height: 16px; }
}

.music-track-item.active.is-playing .music-num-text { display: none; }
.music-track-item.active.is-playing .music-eq-bars  { display: flex; }

/* Track info */
.music-track-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.music-track-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.music-track-item.active .music-track-title {
    color: var(--color-teal);
}

.music-track-artist {
    font-size: 0.85rem;
    color: var(--color-grey);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Track meta */
.music-track-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.music-lang-badge {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
}

.music-lang-badge.en {
    background: rgba(52,152,219,0.1);
    color: #2980b9;
    border: 1px solid rgba(52,152,219,0.25);
}

.music-lang-badge.es {
    background: rgba(231,76,60,0.08);
    color: var(--color-teal-dark);
    border: 1px solid rgba(77,184,168,0.3);
}

.music-track-dur {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: var(--color-grey);
    min-width: 32px;
    text-align: right;
}

/* ── Empty state ── */
.music-empty-state {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-grey);
}

/* ── Persistent mini player (bottom bar) ── */
.music-mini-player {
    position: fixed;
    bottom: -120px; /* hidden by default */
    left: 0;
    right: 0;
    z-index: 500;
    background: var(--color-white);
    border-top: 2px solid var(--color-teal);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    padding: 0.6rem 1.5rem 0.8rem;
    transition: bottom 0.35s ease;
}

.music-mini-player.visible {
    bottom: 0;
}

/* Progress */
.music-progress-wrap {
    width: 100%;
    margin-bottom: 0.6rem;
    cursor: pointer;
}

.music-progress-track {
    width: 100%;
    height: 3px;
    background: var(--color-grey-light);
    border-radius: 2px;
    position: relative;
}

.music-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-teal-dark), var(--color-teal));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.music-progress-fill::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--color-teal);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.music-progress-wrap:hover .music-progress-fill::after {
    opacity: 1;
}

.music-progress-times {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
}

.music-progress-times span {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.58rem;
    color: var(--color-grey);
}

/* Player row */
.music-player-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Now playing */
.music-now-playing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.music-album-art {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
    border: 1.5px solid rgba(77,184,168,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.music-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-now-text {
    min-width: 0;
}

.music-now-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-now-artist {
    font-size: 0.8rem;
    color: var(--color-grey);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controls */
.music-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.music-ctrl {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-grey);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: 50%;
}

.music-ctrl:hover {
    color: var(--color-teal);
}

.music-ctrl.music-ctrl-active {
    color: var(--color-teal);
}

.music-ctrl svg {
    width: 17px;
    height: 17px;
}

.music-play-btn {
    width: 44px;
    height: 44px;
    background: var(--color-teal);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    color: white;
}

.music-play-btn:hover {
    background: var(--color-teal-dark);
    transform: scale(1.05);
}

.music-play-btn svg {
    width: 20px;
    height: 20px;
}

/* Volume */
.music-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.music-mute-btn svg {
    width: 16px;
    height: 16px;
}

.music-vol-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 3px;
    background: var(--color-grey-light);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.music-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--color-teal);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s;
}

.music-vol-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.music-vol-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--color-teal);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .music-player-row {
        grid-template-columns: 1fr auto;
    }

    .music-volume {
        display: none;
    }

    .music-mini-player {
        padding: 0.6rem 1rem 0.8rem;
    }

    .music-track-item {
        padding: 0.75rem 1rem;
    }

    .music-filter-bar {
        gap: 0.4rem;
    }
}


/* ============================================
   PWA MOBILE LAYOUT — FULL SCREEN SECTIONS
   Transforms the dashboard into a native app
   experience on mobile devices.
   Desktop layout is completely unchanged.
   ============================================ */

@media (max-width: 768px) {

    /* ── Lock body scroll — sections handle their own scroll ── */
    html, body {
        height: 100%;
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    /* ── Hide the desktop header on mobile ── */
    .header {
        display: none;
    }

    /* ── Full viewport wrapper ── */
    .dashboard-wrapper {
        display: block;
        margin: 0;
        padding: 0;
        gap: 0;
        max-width: 100%;
        height: 100vh;
        height: 100dvh; /* dynamic viewport height — accounts for browser chrome */
        overflow: hidden;
        position: relative;
    }

    /* ── Hide desktop sidebar ── */
    .sidebar {
        display: none;
    }

    /* ── Main content fills full viewport above tab bar ── */
    .main-content {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 68px; /* height of bottom tab bar */
        overflow: hidden;
        background: var(--color-grey-light);
    }

    /* ── Each section is a full-screen view ── */
    .content-section {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        background: var(--color-grey-light);
        /* Animate in from right */
        transform: translateX(4px);
        opacity: 0;
        transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .content-section.active {
        display: block;
        transform: translateX(0);
        opacity: 1;
    }

    /* ── Section inner padding ── */
    .content-section > * {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--color-white);
        border-bottom: 1px solid rgba(77, 184, 168, 0.2);
        padding: 1rem 1.25rem 0.75rem;
        margin: 0 0 1rem;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .section-header h2 {
        font-size: 1.25rem;
        font-family: 'Orbitron', sans-serif;
        font-weight: 700;
        color: var(--color-black);
        margin: 0 0 0.1rem;
        letter-spacing: 0.03em;
    }

    .section-header .section-subtitle {
        font-size: 0.8rem;
        color: var(--color-grey);
        margin: 0;
    }

    /* ── Mobile compact stats grid ── */
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
        padding: 0 1rem 0.5rem;
    }

    .stat-card {
        padding: 0.85rem 0.75rem;
        border-radius: 12px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* ── Content cards ── */
    .content-card {
        margin: 0 0 0.85rem;
        border-radius: 12px;
        padding: 1rem 1.1rem;
    }

    /* ── Bottom tab bar ── */
    .sidebar-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 68px;
        background: var(--color-white);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 1000;
        padding: 0 0.25rem;
        padding-bottom: env(safe-area-inset-bottom); /* iPhone notch/home bar */
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }

    .tab-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 0.4rem 0.5rem;
        border: none;
        background: transparent;
        cursor: pointer;
        border-radius: 10px;
        min-width: 48px;
        transition: all 0.15s ease;
        -webkit-tap-highlight-color: transparent;
        position: relative;
    }

    .tab-btn:active {
        transform: scale(0.92);
    }

    .tab-btn .tab-icon {
        font-size: 1.3rem;
        line-height: 1;
        transition: transform 0.15s ease;
    }

    .tab-btn .tab-label {
        font-size: 0.6rem;
        font-family: 'Rajdhani', sans-serif;
        font-weight: 600;
        color: var(--color-grey);
        letter-spacing: 0.03em;
        transition: color 0.15s ease;
        white-space: nowrap;
    }

    .tab-btn.active .tab-icon {
        transform: translateY(-2px);
    }

    .tab-btn.active .tab-label {
        color: var(--color-teal);
        font-weight: 700;
    }

    .tab-btn.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 3px;
        background: var(--color-teal);
        border-radius: 0 0 3px 3px;
    }

    /* ── More menu overlay ── */
    .tab-more-overlay {
        display: none;
        position: fixed;
        bottom: 68px;
        left: 0;
        right: 0;
        background: var(--color-white);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 20px 20px 0 0;
        padding: 1rem 1.25rem;
        z-index: 999;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
        animation: slideUp 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .tab-more-overlay.open {
        display: block;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); opacity: 0; }
        to   { transform: translateY(0);    opacity: 1; }
    }

    .tab-more-overlay h4 {
        font-family: 'Orbitron', sans-serif;
        font-size: 0.7rem;
        color: var(--color-grey);
        letter-spacing: 0.08em;
        text-transform: uppercase;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--color-grey-light);
    }

    .more-menu-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .more-menu-item {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0.75rem 0.85rem;
        border: none;
        background: var(--color-grey-light);
        border-radius: 10px;
        cursor: pointer;
        font-family: 'Rajdhani', sans-serif;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--color-grey-dark);
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s ease;
        text-decoration: none;
        width: 100%;
    }

    .more-menu-item:active,
    .more-menu-item:hover {
        background: rgba(77, 184, 168, 0.1);
        color: var(--color-teal);
    }

    .more-menu-item .more-icon {
        font-size: 1.1rem;
    }

    /* ── Dismiss overlay backdrop ── */
    .tab-more-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 998;
    }

    .tab-more-backdrop.open {
        display: block;
    }

    /* ── Dashboard section scroll area ── */
    #dashboard-section,
    #videos-section,
    #points-section,
    #leaderboard-section,
    #billing-section,
    #checkin-section,
    #music-section,
    #profile-section {
        padding-bottom: 1rem;
    }

    /* ── Announcements in dashboard section ── */
    .announcements-list {
        padding: 0 1rem;
    }

    /* ── Quick actions compact ── */
    .quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .btn-action {
        padding: 0.65rem 0.5rem;
        font-size: 0.78rem;
        border-radius: 8px;
    }

}

/* ── Hide desktop-only elements on mobile ── */
@media (max-width: 768px) {
    /* The section header mobile sticky needs padding reset */
    .section-header + * {
        padding-top: 0;
    }
}

/* ============================================
   MUSIC PLAYER MOBILE FIXES
   Ensure controls visible and tappable on PWA
   ============================================ */

@media (max-width: 768px) {

    /* Mini player — keep position:fixed, adjust for mobile bottom nav */
    .music-mini-player {
        padding: 0.85rem 1rem 1rem !important;
        bottom: -200px; /* hidden by default on mobile too */
        z-index: 510; /* above bottom nav (z-index:1000 for nav, but player slides over it) */
    }
    .music-mini-player.visible {
        bottom: 68px; /* sit above the bottom tab bar */
    }

    /* Player row — stack vertically on mobile for more space */
    .music-player-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    /* Now playing — full width */
    .music-now-playing {
        width: 100%;
    }

    /* Controls row — centered, full width, bigger tap targets */
    .music-controls {
        justify-content: center !important;
        gap: 0.85rem !important;
        width: 100%;
    }

    .music-ctrl {
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        background: rgba(77,184,168,0.08) !important;
        -webkit-tap-highlight-color: transparent;
    }

    .music-ctrl svg {
        width: 22px !important;
        height: 22px !important;
    }

    /* Play button larger */
    .music-play-btn {
        width: 54px !important;
        height: 54px !important;
    }

    .music-play-btn svg {
        width: 28px !important;
        height: 28px !important;
    }

    /* Progress bar — easier to scrub */
    .music-progress-wrap {
        height: 6px !important;
        border-radius: 3px !important;
        cursor: pointer;
        margin-bottom: 0.25rem;
    }

    /* Volume hidden on mobile — use device volume */
    .music-volume {
        display: none !important;
    }

    /* Time display */
    .music-time {
        font-size: 0.75rem;
        text-align: center;
    }

    /* Track list scrollable */
    .music-section-inner {
        padding-bottom: 1rem;
    }
}

/* ============================================
   MUSIC PLAYER DISMISS / RESTORE
   ============================================ */

/* Music dismiss button hover */
#musicDismissBtn:hover {
    color: var(--color-black) !important;
    background: var(--color-grey-light) !important;
}

/* ============================================
   BILLING BUTTONS — EQUAL SIZE
   ============================================ */

.billing-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0.75rem !important;
}

.billing-actions .btn {
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0.85rem 0.5rem !important;
    font-size: 0.82rem !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

@media (max-width: 640px) {
    .billing-actions {
        grid-template-columns: 1fr !important;
    }
    .billing-actions .btn {
        white-space: normal !important;
        font-size: 0.9rem !important;
        padding: 0.85rem 1rem !important;
    }
}
