/* Hande Fit - Member Portal Styles (Enhanced) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #c1f722;
    --primary-dark: #a8d91e;
    --primary-glow: rgba(193, 247, 34, 0.3);
    --secondary: #073d2c;
    --secondary-light: #0a5a42;
    --bg-cream: #f5f0e1;
    --bg-light: #faf8f0;
    --bg-card: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --text-muted: #6b7280;
    --text-secondary: #9ca3af;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(193, 247, 34, 0.15);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-spring: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    min-height: 100vh;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

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

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--primary-glow);
    }

    50% {
        box-shadow: 0 0 0 8px transparent;
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease both;
}

.animate-delay-1 {
    animation-delay: 0.05s;
}

.animate-delay-2 {
    animation-delay: 0.1s;
}

.animate-delay-3 {
    animation-delay: 0.15s;
}

.animate-delay-4 {
    animation-delay: 0.2s;
}

.animate-delay-5 {
    animation-delay: 0.25s;
}

.animate-delay-6 {
    animation-delay: 0.3s;
}

.animate-delay-7 {
    animation-delay: 0.35s;
}

.animate-delay-8 {
    animation-delay: 0.4s;
}

/* ═══════════════════════════════════════════
   AUTH PAGES (Login/Register)
   ═══════════════════════════════════════════ */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--secondary) 0%, #052a1e 50%, #041f16 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative background elements */
.auth-container::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -80px;
    right: -80px;
    border-radius: 50%;
    pointer-events: none;
}

.auth-container::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(193, 247, 34, 0.1) 0%, transparent 70%);
    bottom: -40px;
    left: -40px;
    border-radius: 50%;
    pointer-events: none;
}

.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: scaleIn 0.5s ease both;
    position: relative;
    z-index: 1;
}

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

.auth-logo {
    height: 60px;
    margin-bottom: 20px;
    border-radius: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

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

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    letter-spacing: 0.01em;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    pointer-events: none;
}

.input-with-icon .form-control {
    padding-left: 44px;
}

.form-control:focus~.input-icon,
.input-with-icon:focus-within .input-icon {
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-light);
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-dark);
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary);
    color: var(--secondary);
    box-shadow: 0 4px 14px rgba(193, 247, 34, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(193, 247, 34, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98) translateY(0);
    box-shadow: 0 2px 8px rgba(193, 247, 34, 0.2);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 700;
}

/* ═══════════════════════════════════════════
   APP HEADER
   ═══════════════════════════════════════════ */
.app-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

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

.app-logo {
    height: 32px;
    border-radius: 6px;
}

.header-greeting {
    display: flex;
    flex-direction: column;
}

.greeting-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.greeting-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-light);
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.notification-btn:hover {
    background: var(--bg-cream);
    color: var(--text-dark);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(7, 61, 44, 0.2);
    overflow: hidden;
    text-decoration: none;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ═══════════════════════════════════════════
   STATS CARDS (Dashboard)
   ═══════════════════════════════════════════ */
.stats-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 20px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.stats-scroll::-webkit-scrollbar {
    display: none;
}

.stat-card {
    min-width: 150px;
    flex-shrink: 0;
    background: white;
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
}

.stat-card:nth-child(1)::after {
    background: linear-gradient(90deg, var(--primary), #e0ff6b);
}

.stat-card:nth-child(2)::after {
    background: linear-gradient(90deg, var(--secondary), #0a8a62);
}

.stat-card:nth-child(3)::after {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 1.1rem;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   SECTION TITLE
   ═══════════════════════════════════════════ */
.section-title {
    padding: 4px 20px 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════
   MENU GRID (Dashboard)
   ═══════════════════════════════════════════ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 20px 24px;
}

.menu-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    gap: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.menu-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(193, 247, 34, 0.06) 100%);
    opacity: 0;
    transition: var(--transition);
}

.menu-item:hover::before,
.menu-item:active::before {
    opacity: 1;
}

.menu-item:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-sm);
}

.menu-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: var(--transition);
}

/* Each menu icon gets a unique color */
.menu-item:nth-child(1) .menu-icon {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.menu-item:nth-child(2) .menu-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.menu-item:nth-child(3) .menu-icon {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.menu-item:nth-child(4) .menu-icon {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.menu-item:nth-child(5) .menu-icon {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
}

.menu-item:nth-child(6) .menu-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.menu-item:nth-child(7) .menu-icon {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.menu-item:nth-child(8) .menu-icon {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.menu-text {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.88rem;
    letter-spacing: -0.01em;
}

.menu-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 400;
    text-align: center;
    line-height: 1.3;
    margin-top: -4px;
}

/* ═══════════════════════════════════════════
   BOTTOM NAVIGATION
   ═══════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    z-index: 100;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: var(--radius);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link i {
    font-size: 1.2rem;
    margin-bottom: 1px;
    transition: var(--transition-fast);
}

.nav-link.active {
    color: var(--secondary);
}

.nav-link.active i {
    color: var(--secondary);
    transform: scale(1.1);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.nav-link:active {
    transform: scale(0.9);
}

/* ═══════════════════════════════════════════
   PAGE CONTENT
   ═══════════════════════════════════════════ */
.page-content {
    padding: 20px;
}

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

.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

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

/* ═══════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════ */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: fadeInUp 0.3s ease both;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    animation: fadeInUp 0.4s ease both;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-light);
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

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

.empty-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 280px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════
   GENERIC CARD
   ═══════════════════════════════════════════ */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.card:hover {
    box-shadow: var(--shadow);
}

/* ═══════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════ */
.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.85rem;
}

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

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

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

.mb-1 {
    margin-bottom: 8px;
}

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

/* ═══════════════════════════════════════════
   SCROLLBAR STYLING
   ═══════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* ═══════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════ */
::selection {
    background: var(--primary);
    color: var(--secondary);
}