/* FitFormiq - Trainer Client App Styles - Light/Dark Mode */

:root, [data-theme="light"] {
    --primary: #6D3BE8;
    --primary-light: #8A5FEF;
    --primary-dark: #5424C4;
    --accent: #FE5B02;
    --accent-light: #FF7A2E;
    --accent-dark: #CC4800;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --graphite: #26292C;
    --graphite-2: #34383C;
    --platinum: #EDF2F4;
    --platinum-2: #F7FAFB;
    --bg: #EDF2F4;
    --bg-card: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-input: #FFFFFF;
    --bg-soft: #F7FAFB;
    --border: rgba(38,41,44,0.10);
    --border-light: rgba(38,41,44,0.06);
    --line: rgba(38,41,44,0.08);
    --ring: rgba(254,91,2,0.22);
    --text: #26292C;
    --text-secondary: #4B5258;
    --text-muted: #6B7280;
    --radius: 14px;
    --radius-lg: 18px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(38,41,44,0.04), 0 1px 3px rgba(38,41,44,0.04);
    --shadow-md: 0 1px 2px rgba(38,41,44,0.05), 0 8px 24px -16px rgba(38,41,44,0.18);
    --shadow-lg: 0 2px 4px rgba(38,41,44,0.06), 0 24px 48px -24px rgba(38,41,44,0.28);
    --ease: cubic-bezier(.2,.8,.2,1);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Brand palettes — trainer override of primary colors only */
[data-brand="qpal"]    { --primary: #6D3BE8; --primary-light: #8A5FEF; --primary-dark: #5424C4; }
[data-brand="emerald"] { --primary: #059669; --primary-light: #10B981; --primary-dark: #047857; }
[data-brand="rose"]    { --primary: #E11D48; --primary-light: #F43F5E; --primary-dark: #9F1239; }
[data-brand="amber"]   { --primary: #D97706; --primary-light: #F59E0B; --primary-dark: #B45309; }
[data-brand="sky"]     { --primary: #0284C7; --primary-light: #0EA5E9; --primary-dark: #075985; }
[data-brand="violet"]  { --primary: #7C3AED; --primary-light: #8B5CF6; --primary-dark: #5B21B6; }
[data-brand="slate"]   { --primary: #475569; --primary-light: #64748B; --primary-dark: #334155; }

.brand-logo { height: 28px; width: auto; max-width: 120px; object-fit: contain; vertical-align: middle; }
.brand-swatch { width: 44px; height: 44px; border-radius: 10px; cursor: pointer; border: 3px solid transparent; transition: transform .1s; }
.brand-swatch:hover { transform: scale(1.06); }
.brand-swatch.selected { border-color: var(--text); }

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'cv11', 'ss01';
    letter-spacing: -0.005em;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
}
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: 8px; }

#app {
    max-width: 720px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

/* Responsive breakpoints */
@media (min-width: 768px) {
    #app { max-width: 720px; }
    .card { margin: 12px 24px; }
    .client-item { padding: 14px 24px; }
    .header { padding: 16px 24px; }
    .date-selector { padding: 12px 24px; }
}
@media (min-width: 1024px) {
    #app { max-width: 1100px; }
    .card { margin: 16px 32px; }
    .client-item { padding: 16px 32px; }
    .header { padding: 18px 32px; }
    .date-selector { padding: 14px 32px; }

    /* FAB: anchor near right edge of viewport instead of mobile-centered calc */
    .fab { right: max(32px, calc(50% - 540px)); bottom: 40px; }
}
@media (min-width: 1440px) {
    #app { max-width: 1280px; }
}

/* Header */
.header {
    background: rgba(237,242,244,0.78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    color: var(--text);
    padding: 14px 20px;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
}
.header h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex: 1;
}
.header .btn-back {
    background: var(--bg-card);
    border: 1px solid var(--line);
    color: var(--text);
    width: 38px; height: 38px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .16s var(--ease);
}
.header .btn-back:hover { border-color: var(--primary); color: var(--primary); }
.header .btn-action {
    background: var(--graphite);
    border: none;
    color: var(--platinum);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .16s var(--ease);
}
.header .btn-action:hover { background: var(--accent); }

.header .btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    padding: 6px 8px;
    cursor: pointer;
}

/* Tab bar */
.tab-bar {
    display: flex;
    border-bottom: 1px solid var(--line);
    background: rgba(237,242,244,0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 64px;
    z-index: 99;
}
.tab-bar button {
    flex: 1;
    padding: 14px 12px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all .16s var(--ease);
    letter-spacing: -0.005em;
}
.tab-bar button:hover { color: var(--text); }
.tab-bar button.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* Sidebar (formerly bottom nav) — always visible left sidebar at all screen sizes */
.bottom-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 72px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 8px var(--safe-bottom);
    z-index: 100;
    overflow-y: auto;
    box-shadow: inset -1px 0 0 0 rgba(109,59,232,0.06);
}
.bottom-nav .sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}
.bottom-nav .sidebar-logo img {
    max-width: 100%;
    max-height: 44px;
    object-fit: contain;
}
.bottom-nav .sidebar-logo .sidebar-logo-vertical { max-height: 96px; display: block; }
.bottom-nav .sidebar-logo .sidebar-logo-horizontal { display: none; }
.bottom-nav .sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
}
.bottom-nav .sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: 12px;
}
.bottom-nav .sidebar-lang {
    display: flex;
    gap: 4px;
    justify-content: center;
}
.bottom-nav .sidebar-lang button {
    flex: 1;
    padding: 5px 6px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .16s var(--ease);
}
.bottom-nav .sidebar-lang button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.bottom-nav button {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px 4px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    transition: all .16s var(--ease);
}
.bottom-nav button:hover { color: var(--primary); background: rgba(109,59,232,0.06); }
.bottom-nav .sidebar-items button.active,
.bottom-nav .sidebar-logout.active {
    background: rgba(254,91,2,0.10);
    color: var(--accent);
    box-shadow: inset 3px 0 0 0 var(--primary);
}
.bottom-nav .sidebar-items button.active .nav-icon { color: var(--accent); }
.bottom-nav .nav-icon { font-size: 18px; }
.bottom-nav .nav-label { display: none; }

body { padding-left: 72px; }
#app { max-width: none; margin: 0; }

/* Inner sub-nav (e.g. client detail tabs inside trainer view) */
.sub-nav {
    display: flex;
    overflow-x: auto;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 64px;
    z-index: 90;
}
.sub-nav button {
    flex: 1 0 auto;
    border: none;
    background: none;
    color: var(--text-muted);
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    border-bottom: 2px solid transparent;
    transition: color .16s var(--ease);
}
.sub-nav button:hover { color: var(--text); }
.sub-nav button.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}
.sub-nav .nav-icon { font-size: 16px; }

/* Chip (filter pills used on measurements page etc.) */
.chip {
    background: var(--bg-card);
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .16s var(--ease);
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.chip:hover { border-color: var(--graphite); background: var(--bg-card); }
.chip.active {
    background: var(--graphite);
    border-color: var(--graphite);
    color: var(--platinum);
}
.chip.active span { color: rgba(237,242,244,0.7); }
.chip-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Desktop: expand sidebar with labels */
@media (min-width: 1024px) {
    body { padding-left: 240px; }
    .bottom-nav {
        width: 240px;
        padding: 18px 14px var(--safe-bottom);
    }
    .bottom-nav .sidebar-logo { padding: 8px 8px 16px; }
    .bottom-nav .sidebar-logo img { max-height: 64px; }
    .bottom-nav .sidebar-logo .sidebar-logo-vertical { display: none; }
    .bottom-nav .sidebar-logo .sidebar-logo-horizontal { display: block; }
    .bottom-nav button {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 12px 16px;
        gap: 14px;
        font-size: 14px;
        text-align: left;
    }
    .bottom-nav .nav-label { display: inline; }
    .bottom-nav .sidebar-items { gap: 4px; }
    .toast { left: calc(50% + 120px); }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    margin: 14px 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(109,59,232,0.18);
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    letter-spacing: -0.01em;
}
.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Client list */
.client-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    transition: background .16s var(--ease);
}
.client-item:hover { background: var(--bg-card); }
.client-item:active { background: var(--bg-soft); }
.client-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px -2px rgba(109,59,232,0.4);
}
.client-info { flex: 1; }
.client-name { font-weight: 600; font-size: 15px; color: var(--text); }
.client-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.client-arrow { color: var(--text-muted); font-size: 18px; }

/* Checklist */
.checklist-section {
    margin: 16px;
}
.checklist-category {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.checklist-category::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(109,59,232,0.15);
    flex-shrink: 0;
}
.checklist-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}
.checklist-checkbox {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 14px;
    color: transparent;
}
.checklist-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.checklist-item-content { flex: 1; }
.checklist-item-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}
.checklist-item-title.done {
    text-decoration: line-through;
    color: var(--text-muted);
}
.checklist-item-detail {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Progress ring */
.progress-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 16px;
}
.progress-ring {
    position: relative;
    width: 80px;
    height: 80px;
}
.progress-ring svg {
    transform: rotate(-90deg);
}
.progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.progress-stats {
    font-size: 14px;
    color: var(--text-secondary);
}
.progress-stats div { margin: 4px 0; }

/* Forms */
.form-group {
    margin: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: -0.005em;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
    background: var(--bg-input);
    color: var(--text);
}
.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover { border-color: rgba(38,41,44,0.18); }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select option { background: var(--bg-card); color: var(--text); }

/* Buttons */
.btn {
    display: block;
    width: calc(100% - 32px);
    margin: 16px;
    padding: 14px 20px;
    min-height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    letter-spacing: -0.005em;
    transition: all .16s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 0.92; }
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(38,41,44,0.08), 0 6px 16px -8px rgba(254,91,2,0.5);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 2px 4px rgba(38,41,44,0.1), 0 12px 24px -10px rgba(254,91,2,0.55); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--graphite);
}
.btn-outline:hover { background: var(--graphite); color: var(--platinum); }
.btn-sm {
    width: auto;
    display: inline-block;
    padding: 9px 16px;
    min-height: 0;
    margin: 4px;
    font-size: 13px;
    border-radius: 10px;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 32px;
    right: calc(50% - 210px);
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(254,91,2,0.35), 0 16px 32px -12px rgba(38,41,44,0.3);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s var(--ease);
}
.fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 6px 16px rgba(254,91,2,0.45), 0 24px 40px -14px rgba(38,41,44,0.35); }

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: var(--bg);
}
.login-logo {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.02em;
}
.login-logo img {
    height: auto;
    width: auto;
    max-width: min(80vw, 280px);
    max-height: 240px;
    object-fit: contain;
}
.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 14px;
    position: relative;
    padding-bottom: 12px;
}
.login-subtitle::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
    transform: translateX(-50%);
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
.login-page .form-group { width: 100%; margin: 8px 0; }
.login-page .btn { width: 100%; margin: 16px 0 8px; }
.login-page .btn-login { width: 60%; max-width: 240px; margin-left: auto; margin-right: auto; display: block; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-accent-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-accent-outline:hover { background: var(--accent); color: #fff; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 32px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-text { font-size: 15px; }

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    border: 1px solid var(--border);
    animation: fadeInUp 0.3s ease;
}
.toast.toast-error {
    background: #dc2626;
    color: #fff;
    border-color: #b91c1c;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Date selector */
.date-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.date-selector button {
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 22px;
    color: var(--primary);
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    line-height: 1;
    transition: background 0.15s;
}
.date-selector button:active {
    background: var(--primary);
    color: #fff;
}
.date-selector .date-text {
    font-size: 15px;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
    color: var(--text);
}

/* Utility */
.p-16 { padding: 16px; }
.mb-80 { margin-bottom: 80px; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.hidden { display: none !important; }

/* Category badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.badge { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }
.badge-diet { background: #FEF3C7; color: #92400E; }
.badge-training { background: #E0E7FF; color: #3730A3; }
.badge-supplement { background: #EDE9FE; color: #5B21B6; }
.badge-water { background: #CFFAFE; color: #155E75; }
.badge-walk { background: #D1FAE5; color: #065F46; }
.badge-custom { background: var(--bg-soft); color: var(--text-secondary); }

/* Language toggle (reused from former theme toggle) */
.theme-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}
.theme-toggle button {
    padding: 6px 10px;
    border: none;
    background: none;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}
.theme-toggle button.active {
    background: var(--primary);
    color: #fff;
}

/* Calendar */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.cal-nav-btn { border: none; background: none; font-size: 24px; color: var(--text); cursor: pointer; padding: 4px 12px; }
.cal-title { font-size: 16px; font-weight: 600; color: var(--text); }
.cal-mode-toggle { display: flex; gap: 4px; justify-content: center; padding: 0 16px 12px; }
.cal-mode-toggle button { padding: 6px 16px; border: 1px solid var(--border); background: var(--bg-card); border-radius: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.cal-mode-toggle button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.cal-grid { padding: 0 8px 16px; }
.cal-header-row { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 4px; }
.cal-header-cell { font-size: 11px; font-weight: 600; color: var(--text-secondary); padding: 4px 0; }
.cal-row { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { position: relative; min-height: 48px; border: 1px solid var(--border-light, rgba(0,0,0,0.06)); border-radius: 6px; margin: 1px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.cal-cell:hover { background: var(--bg-elevated); }
.cal-cell-empty { border-color: transparent; cursor: default; }
.cal-cell-empty:hover { background: none; }
.cal-cell-week { min-height: 72px; }
.cal-today { background: rgba(254,91,2,0.08); border-color: var(--accent); }
.cal-today .cal-day-num { color: var(--accent); font-weight: 800; }
.cal-day-num { font-size: 13px; color: var(--text); margin-bottom: 2px; }
.cal-dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; }
.cal-dot-event { background: var(--primary); }
.cal-dot-diet { background: #F59E0B; }
.cal-dot-training { background: #3B82F6; }
.cal-dot-tasks { background: #10B981; }
.cal-events-list { padding: 8px 8px 0; }
.cal-event-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-card); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.cal-event-item:hover { background: var(--bg-elevated); }
.cal-event-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cal-event-info { flex: 1; min-width: 0; }
.cal-event-title { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-meta { font-size: 12px; color: var(--text-secondary); }

/* Profile */
.profile-card { background: var(--bg-card); border-radius: 16px; padding: 24px 20px; }
.profile-avatar-section { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 20px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.profile-avatar-placeholder { display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-size: 28px; font-weight: 700; }
.profile-upload-btn { font-size: 12px !important; cursor: pointer; }

/* Radio card group */
.radio-group{display:flex;flex-direction:column;gap:8px}
.radio-card{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border:1px solid var(--border,#e5e7eb);border-radius:10px;cursor:pointer;background:#fff;transition:all .15s ease}
.radio-card:hover{border-color:#c7d2fe}
.radio-card input[type="radio"]{position:absolute;opacity:0;pointer-events:none}
.radio-card .radio-dot{flex:0 0 auto;width:20px;height:20px;border-radius:50%;border:2px solid #cbd5e1;background:#fff;margin-top:2px;position:relative;transition:all .15s ease}
.radio-card input[type="radio"]:checked + .radio-dot{border-color:#6D3BE8}
.radio-card input[type="radio"]:checked + .radio-dot::after{content:"";position:absolute;inset:3px;border-radius:50%;background:#6D3BE8}
.radio-card:has(input[type="radio"]:checked){border-color:#6D3BE8;background:#eef1f8}
.radio-card .radio-body{flex:1;min-width:0}
.radio-card .radio-title{font-weight:600;font-size:14px;color:#111827}
.radio-card .radio-desc{font-size:12px;color:#6b7280;margin-top:2px;line-height:1.4}


/* =============================================
   DIGITAL PRODUCTS / SHOP
   ============================================= */

/* Product icon box */
.product-icon-box {
    width: 48px; height: 48px; border-radius: 12px;
    background: rgba(103, 125, 183, 0.1); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}

/* Public shop header */
.shop-header {
    text-align: center; padding: 32px 20px 20px; background: var(--bg-card);
    border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.shop-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.shop-avatar-placeholder {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 10px;
    background: var(--primary); color: #fff; font-size: 28px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.shop-trainer-name { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.shop-subtitle { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 0 16px 80px; }
.product-card {
    background: var(--bg-card); border-radius: 16px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06); cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.product-card-img { width: 100%; height: 160px; object-fit: cover; display: block; }
.product-card-icon {
    height: 120px; display: flex; align-items: center; justify-content: center;
    background: rgba(103, 125, 183, 0.07); font-size: 48px; color: var(--primary);
}
.product-card-body { padding: 14px 16px 16px; }
.product-card-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.product-card-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price { font-size: 20px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Inline icon action buttons (event lists, item rows) */
.icon-btn { border:none; background:transparent; color:var(--text-secondary); cursor:pointer; width:34px; height:34px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; font-size:16px; transition:background .15s, color .15s; }
.icon-btn:hover { background:var(--bg); color:var(--primary); }
.icon-btn-danger { color:var(--text-secondary); }
.icon-btn-danger:hover { background:rgba(239,68,68,0.12); color:var(--danger); }

/* Calendar event count badge (when more than one event on a day) */
.cal-event-count { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--primary); color:#fff; font-size:11px; font-weight:700; line-height:1; }
