/* ===========================================================
   PureFit GYM – עיצוב בסיסי (עברית, מימין לשמאל, Mobile First)
   =========================================================== */

:root {
    --bg: #0B1220;
    --bg-soft: #111A2E;
    --card: #16213A;
    --card-border: #24314F;
    --text: #F1F5FB;
    --text-dim: #9AA8C2;
    --primary: #3B82F6;
    --primary-strong: #2563EB;
    --accent: #FF6B2C;
    --success: #22C55E;
    --danger: #EF4444;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --font: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; font-weight: 800; }
p { margin: 0 0 1rem; }
h1:focus { outline: none; }

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- כפתורים ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    padding: 0 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform .08s ease, background-color .2s ease, opacity .2s ease;
    user-select: none;
    white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--primary-strong); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--card-border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: 0 1.75rem; }

/* ---------- כרטיסים ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.badge {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    background: rgba(255, 107, 44, .15);
    color: var(--accent);
}

.muted { color: var(--text-dim); }

/* ---------- מסך טעינה (לפני ש-Blazor עולה) ---------- */
.boot {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: var(--bg);
}
.boot-logo { width: 88px; height: 88px; border-radius: 22px; }
.boot-title { font-size: 1.5rem; font-weight: 900; letter-spacing: .5px; }
.boot-text { color: var(--text-dim); font-size: .9rem; }
.boot-text::after { content: " " var(--blazor-load-percentage-text, ""); }
.boot-bar { width: 160px; height: 6px; border-radius: 99px; background: var(--card); overflow: hidden; }
.boot-bar span {
    display: block;
    height: 100%;
    width: var(--blazor-load-percentage, 0%);
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width .1s ease;
}

/* ---------- שגיאות Blazor ---------- */
#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1000;
    padding: .8rem 1.25rem calc(.8rem + var(--safe-bottom));
    background: #7F1D1D;
    color: #fff;
    font-weight: 500;
}
#blazor-error-ui .reload { color: #FFE4D6; font-weight: 700; margin-inline-start: .75rem; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; left: 1rem; top: .7rem; }

.blazor-error-boundary {
    background: #7F1D1D;
    color: #fff;
    padding: 1rem;
    border-radius: var(--radius-sm);
}
.blazor-error-boundary::after { content: "אירעה שגיאה בחלק זה של המסך."; }
