:root {
    --primary: #0d9488;
    --primary-hover: #0f766e;
    --primary-light: rgba(13, 148, 136, 0.12);
    --primary-subtle: #f0fdfa;
    --bg: #f8fafc;
    --bg-surface: #ffffff;
    --border: #e2e8f0;
    --border-subtle: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --cat-water: #0284c7;
    --cat-nutrition: #10b981;
    --cat-meals: #f59e0b;
    --cat-supplements: #8b5cf6;
    --cat-sleep: #6366f1;
    --cat-weight: #ec4899;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================================
   1. AUTH & SETUP VIEW (Clean Single Login)
   ============================================================ */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    position: relative;
    background: var(--bg);
}
.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-md);
    text-align: center;
    z-index: 10;
}
.auth-logo {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.auth-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.auth-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}
.auth-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 22px;
}
.auth-form {
    text-align: left;
}
.form-group {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-surface);
    transition: all 0.2s var(--ease-smooth);
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
textarea.form-input {
    height: auto;
    padding: 10px 14px;
}

/* PASSWORD TOGGLE */
.pw-toggle-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.pw-toggle-wrap input[type="password"],
.pw-toggle-wrap input[type="text"].pw-toggle-active {
    width: 100%;
    padding-right: 48px;
}
.pw-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
    z-index: 1;
}
.pw-toggle-btn:hover { background: var(--bg); }
.pw-toggle-btn svg { width: 20px; height: 20px; pointer-events: none; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    background: var(--bg-surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}
.btn-secondary:hover { background: var(--bg); border-color: #cbd5e1; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}
.btn-icon:hover { background: var(--bg); }
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    text-align: left;
}

/* ============================================================
   2. DASHBOARD LAYOUT & NATIVE MOBILE HEADER
   ============================================================ */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 150;
    height: 62px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.nav-brand-text .brand-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.nav-brand-text .brand-subtitle {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.02em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-notif-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}
.nav-notif-btn:hover { background: var(--border-subtle); }
.nav-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
}

.nav-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(13, 148, 136, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-avatar-btn:hover { transform: scale(1.05); }

/* Desktop Navigation Segmented Bar */
.desktop-nav-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
}
.desktop-nav-tab {
    background: transparent;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.desktop-nav-tab:hover { color: var(--text); background: var(--bg-surface); }
.desktop-nav-tab.active {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

@media (max-width: 900px) {
    .desktop-nav-bar { display: none; }
}

/* ============================================================
   3. MAIN CONTENT CONTAINER & TABS
   ============================================================ */
.main-content {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 16px));
    flex: 1;
}

.tab-content {
    animation: tabFadeIn 0.25s var(--ease-smooth);
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   4. DASHBOARD SCREEN COMPONENTS (Matching Reference Image)
   ============================================================ */
/* Club Hero Card */
.club-hero-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}
.club-hero-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.club-hero-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.club-hero-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}
.club-switcher-trigger {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.club-hero-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-subtle);
    padding: 2px 8px;
    border-radius: 9999px;
    margin-top: 2px;
    display: inline-block;
}

/* Metrics 4-Column Summary Area */
.metrics-summary-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 10px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.metrics-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    text-align: center;
}
.metric-summary-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
}
.metric-circle-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}
.metric-circle-icon.members { background: #f0fdf4; color: #16a34a; }
.metric-circle-icon.active-today { background: #fffbeb; color: #d97706; }
.metric-circle-icon.balance { background: #f0fdfa; color: #0d9488; font-weight: 800; font-size: 11px; }
.metric-circle-icon.days { background: #f0fdf4; color: #16a34a; }
.metric-col-val {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.metric-col-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}
.metric-col-link {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.metric-col-link:hover { opacity: 0.8; }

/* Section Header (Recent Activity, Members Overview, Quick Actions) */
.section-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    margin-top: 18px;
}
.section-heading-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
}
.section-heading-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}
.section-heading-link:hover { text-decoration: underline; }

/* Recent Activity Card Container */
.activity-card-container {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 4px 14px;
    box-shadow: var(--shadow-sm);
}
.activity-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
    gap: 10px;
}
.activity-item-row:last-child {
    border-bottom: none;
}
.activity-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.activity-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.activity-avatar.green { background: #dcfce7; color: #16a34a; }
.activity-avatar.purple { background: #f3e8ff; color: #9333ea; }
.activity-avatar.orange { background: #ffedd5; color: #ea580c; }
.activity-text-wrap {
    min-width: 0;
}
.activity-title-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    word-break: break-word;
}
.activity-time-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}
.activity-badge-right {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.badge-water { background: #f0f9ff; color: #0284c7; }
.badge-tracking { background: #f0fdf4; color: #16a34a; }
.badge-joined { background: #f0fdf4; color: #16a34a; }
.badge-weight { background: #faf5ff; color: #9333ea; }

/* Members Overview Horizontal Carousel */
.members-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.members-carousel::-webkit-scrollbar { display: none; }

.member-carousel-card {
    flex: 0 0 128px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 10px;
    text-align: center;
    scroll-snap-align: start;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.member-carousel-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.member-carousel-avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-bottom: 8px;
}
.member-carousel-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}
.member-carousel-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}
.member-carousel-dot.inactive {
    background: #cbd5e1;
}
.member-carousel-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.member-carousel-balance {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 2px;
}
.member-carousel-status {
    font-size: 10px;
    font-weight: 700;
    color: #10b981;
    margin-top: 4px;
}
.member-carousel-status.inactive {
    color: #f59e0b;
}

/* Quick Actions 4-Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}
.quick-action-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}
.quick-action-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.quick-action-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.quick-action-icon-box.add-member { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.quick-action-icon-box.share-qr { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.quick-action-icon-box.announce { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.quick-action-icon-box.reports { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.quick-action-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

/* ============================================================
   5. MEMBERS SCREEN (Search, Filter Pills, Member Cards)
   ============================================================ */
.page-header-block {
    margin-bottom: 16px;
}
.page-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}
.page-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.search-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.search-input-wrap {
    position: relative;
    flex: 1;
}
.search-input-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}
.search-input-wrap input {
    padding-left: 38px;
    height: 42px;
    font-size: 14px;
    border-radius: 10px;
}

.filter-pills-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 14px;
    scrollbar-width: none;
}
.filter-pills-row::-webkit-scrollbar { display: none; }
.filter-pill {
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}
.filter-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

/* Member Native Card */
.member-native-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}
.member-native-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}
.member-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.member-avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}
.member-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}
.member-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}
.member-online-dot.inactive { background: #cbd5e1; }
.member-info-col {
    min-width: 0;
}
.member-card-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}
.member-card-sub {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.member-card-right {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.member-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}
.member-status-badge.active { background: #f0fdf4; color: #16a34a; }
.member-status-badge.inactive { background: #fff7ed; color: #ea580c; }
.member-balance-score {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-top: 2px;
}
.member-balance-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Floating Action Button */
.bottom-floating-action-bar {
    margin-top: 20px;
    padding-top: 8px;
}

/* ============================================================
   6. PLANS & LIBRARY SCREENS
   ============================================================ */
.segmented-control-bar {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 16px;
}
.segmented-pill {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.segmented-pill.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

.plan-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}
.plan-item-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}
.plan-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.plan-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.plan-item-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}
.plan-item-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Library Resource Cards */
.resource-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s var(--ease-smooth);
}
.resource-item-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}
.resource-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.resource-thumb-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.resource-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}
.resource-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ============================================================
   7. JOIN & QR SCREEN
   ============================================================ */
.qr-display-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}
.qr-canvas-wrap {
    display: inline-flex;
    padding: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin: 16px 0;
}
.qr-canvas-wrap canvas, .qr-canvas-wrap img {
    display: block;
    max-width: 100%;
}
.share-link-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.share-link-input-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.share-link-input-group input {
    font-family: monospace;
    font-size: 13px;
    color: var(--primary);
    background: var(--bg);
}

/* ============================================================
   8. COACH HAMBURGER DRAWER (Clean Menu)
   ============================================================ */
.coach-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    justify-content: flex-start;
    animation: fadeIn 0.2s var(--ease-smooth);
}
.coach-drawer-panel {
    background: var(--bg-surface);
    width: 100%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    animation: slideInLeft 0.25s var(--ease-smooth);
}
@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.coach-drawer-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.coach-drawer-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
}
.coach-drawer-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.coach-drawer-body {
    padding: 12px 14px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.coach-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.15s;
    font-family: inherit;
}
.coach-drawer-item:hover {
    background: var(--bg);
}
.coach-drawer-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}
.coach-drawer-item .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
}
.coach-drawer-item.active .material-symbols-outlined {
    color: var(--primary);
}
.coach-drawer-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}
.coach-drawer-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px 2px;
}

/* ============================================================
   9. COACH BOTTOM NAVIGATION (iPhone App Feel)
   ============================================================ */
.coach-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 8px));
    z-index: 140;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}
.coach-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    text-decoration: none;
    min-width: 0;
}
.coach-bottom-nav-item .material-symbols-outlined {
    font-size: 22px;
    margin-bottom: 2px;
    transition: transform 0.15s;
}
.coach-bottom-nav-item.active {
    color: var(--primary);
    font-weight: 800;
}
.coach-bottom-nav-item.active .material-symbols-outlined {
    transform: scale(1.1);
    color: var(--primary);
}

/* ============================================================
   10. MODALS & DRAWERS (Add Member, Plan Builder, etc.)
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s var(--ease-smooth);
}
.modal-dialog {
    background: var(--bg-surface);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.2s var(--ease-smooth);
}
.modal-lg { max-width: 680px; }
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 800; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 200;
    display: flex;
    justify-content: flex-end;
}
.drawer-panel {
    background: var(--bg-surface);
    width: 100%;
    max-width: 560px;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.drawer-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 10;
}
.drawer-body { padding: 20px; flex: 1; }

/* Responsive adjustments */
@media (max-width: 480px) {
    .metrics-summary-grid { gap: 4px; }
    .metric-col-val { font-size: 18px; }
    .quick-actions-grid { gap: 6px; }
    .quick-action-btn { padding: 10px 4px; }
    .quick-action-label { font-size: 10px; }
}

