/* כיוון כתיבה: עברית/ערבית מימין לשמאל, שאר השפות משמאל לימין */
html[dir=rtl] { --start: right; --end: left; }
html[dir=ltr] { --start: left; --end: right; }

/* ===========================================================
   PureFit GYM – רכיבי האפליקציה (שלב 2)
   =========================================================== */

/* ---------- מסגרת האפליקציה ---------- */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-top {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: var(--safe-top);
    background: rgb(11, 18, 32);
    border-bottom: 1px solid var(--card-border);
}

.app-top-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
}

    .app-brand img { width: 30px; height: 30px; border-radius: 8px; }
    .app-brand b { color: var(--accent); }

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 107, 44, .15);
    color: var(--accent);
    font-weight: 700;
    font-size: .85rem;
}

    .live-pill::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--accent);
        animation: blink 1.2s infinite;
    }

@keyframes blink { 50% { opacity: .25; } }

.app-main {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 16px calc(96px + var(--safe-bottom));
}

.page-title {
    font-size: 1.5rem;
    margin: 4px 0 14px;
}

/* ---------- ניווט תחתון ---------- */
.tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: var(--safe-bottom);
    background: rgba(17, 26, 46, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--card-border);
}

    .tabbar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 2px 10px;
        color: var(--text-dim);
        font-size: .75rem;
        font-weight: 600;
        position: relative;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        letter-spacing: -.01em;
    }

        .tabbar a .ti { font-size: 1.35rem; line-height: 1.2; }
        .tabbar a.active { color: var(--text); }

            .tabbar a.active::before {
                content: "";
                position: absolute;
                top: 0;
                inset-inline: 28%;
                height: 3px;
                border-radius: 0 0 3px 3px;
                background: var(--accent);
            }

        .tabbar a .dot {
            position: absolute;
            top: 6px;
            inset-inline-start: calc(50% + 10px);
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent);
        }

/* ---------- כפתורים קטנים ---------- */
.btn-sm { min-height: 38px; padding: 0 .9rem; font-size: .9rem; }
.btn-icon {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 12px;
    font-size: 1.05rem;
}
.btn-danger { background: transparent; color: #FCA5A5; border-color: rgba(239, 68, 68, .45); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #06210F; }

/* ---------- צ'יפים (ימים / סינון) ---------- */
.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
}

    .chips::-webkit-scrollbar { display: none; }

.chip {
    flex: 0 0 auto;
    min-width: 46px;
    min-height: 46px;
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--bg-soft);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
}

    .chip small { font-size: .7rem; color: var(--text-dim); font-weight: 600; }
    .chip.active { background: var(--primary-strong); border-color: var(--primary); }
    .chip.active small { color: #DCE8FF; }
    .chip.today { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- כרטיסים ורשימות ---------- */
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
.small { font-size: .85rem; }

.card-tight { padding: 14px; }

.ex-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
}

.ex-num {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(59, 130, 246, .18);
    color: #BFD7FF;
    font-weight: 800;
}

.ex-name { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.ex-en { color: var(--text-dim); font-size: .85rem; direction: ltr; text-align: var(--start); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    font-size: .78rem;
    color: #C9D4E8;
    white-space: nowrap;
}

.tag-accent { background: rgba(255, 107, 44, .14); border-color: rgba(255, 107, 44, .35); color: #FFC7AE; }

.ex-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.empty {
    text-align: center;
    padding: 28px 16px;
    border: 1px dashed var(--card-border);
    border-radius: var(--radius);
    color: var(--text-dim);
}

    .empty .big { font-size: 2.4rem; display: block; margin-bottom: 6px; }

/* ---------- טפסים ---------- */
.field { display: grid; gap: 6px; }
.field > label { font-size: .85rem; color: var(--text-dim); font-weight: 600; }

.input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: var(--bg-soft);
    color: var(--text);
    font: inherit;
}

    .input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
    .input.ltr { direction: ltr; text-align: left; }

.stepper {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    align-items: center;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    overflow: hidden;
}

    .stepper button {
        height: 46px;
        border: 0;
        background: transparent;
        color: var(--text);
        font-size: 1.4rem;
        font-weight: 700;
        cursor: pointer;
    }

        .stepper button:active { background: var(--card); }

    .stepper input {
        width: 100%;
        height: 46px;
        border: 0;
        background: transparent;
        color: var(--text);
        font: inherit;
        font-weight: 800;
        font-size: 1.1rem;
        text-align: center;
        -moz-appearance: textfield;
    }

        .stepper input::-webkit-outer-spin-button,
        .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stepper-label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-dim); font-weight: 600; margin-bottom: 6px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
}

.switch { position: relative; width: 52px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: #334155;
    transition: .2s;
    cursor: pointer;
}
    .switch span::after {
        content: "";
        position: absolute;
        top: 3px;
        inset-inline-start: 3px;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #fff;
        transition: .2s;
    }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(-22px); }
html[dir=ltr] .switch input:checked + span::after { transform: translateX(22px); }

input[type=range].range {
    width: 100%;
    accent-color: var(--accent);
    height: 32px;
}

/* ---------- חלון תחתון (Bottom Sheet) ---------- */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(0, 0, 0, .55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fade .15s ease;
}

.sheet {
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    padding: 10px 16px calc(20px + var(--safe-bottom));
    animation: up .2s ease;
}

.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: #3A4A6E; margin: 0 auto 10px; }

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

    .sheet-head h3 { margin: 0; font-size: 1.2rem; }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .6; } }

@media (min-width: 720px) {
    .sheet-backdrop { align-items: center; }
    .sheet { border-radius: 22px; border-bottom: 1px solid var(--card-border); }
}

/* ---------- חלון אישור ---------- */
.dialog {
    width: calc(100% - 32px);
    max-width: 420px;
    margin: auto;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    animation: up .18s ease;
}

    .dialog h3 { font-size: 1.2rem; }
    .dialog .actions { display: grid; gap: 10px; margin-top: 18px; }

.dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .6);
    display: flex;
    align-items: center;
    animation: fade .15s ease;
}

/* ---------- הודעה קצרה ---------- */
.toast {
    position: fixed;
    z-index: 95;
    inset-inline: 16px;
    bottom: calc(84px + var(--safe-bottom));
    margin: 0 auto;
    max-width: 420px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #0F2A1A;
    border: 1px solid rgba(34, 197, 94, .5);
    color: #BBF7D0;
    font-weight: 700;
    text-align: center;
    box-shadow: var(--shadow);
    animation: up .2s ease;
}

    .toast.error { background: #2A0F0F; border-color: rgba(239, 68, 68, .5); color: #FECACA; }

/* ---------- מפת שרירים ---------- */
.muscle-map {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: #FBF6EC;
}

    .muscle-map img { width: 100%; height: 100%; object-fit: cover; }

.muscle-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: 5px 10px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: rgba(11, 18, 32, .86);
    color: #fff;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}

    .muscle-pin:hover, .muscle-pin:focus-visible { background: var(--accent); outline: none; }

.muscle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

    .muscle-grid button {
        min-height: 54px;
        border-radius: 14px;
        border: 1px solid var(--card-border);
        background: var(--bg-soft);
        color: var(--text);
        font: inherit;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
    }

        .muscle-grid button small { color: var(--text-dim); font-size: .7rem; font-weight: 500; direction: ltr; }

.seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 3px;
    margin-bottom: 12px;
}

    .seg button {
        min-height: 38px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: var(--text-dim);
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }

        .seg button.active { background: var(--primary-strong); color: #fff; }

.pick-list { display: grid; gap: 8px; }

    .pick-list button {
        text-align: start;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid var(--card-border);
        background: var(--bg-soft);
        color: var(--text);
        font: inherit;
        cursor: pointer;
    }

        .pick-list button b { display: block; }
        .pick-list button small { color: var(--text-dim); direction: ltr; display: block; text-align: var(--start); }

/* ---------- סטטיסטיקות קטנות ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.stat {
    background: var(--bg-soft);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
}

    .stat b { display: block; font-size: 1.25rem; font-weight: 900; }
    .stat span { font-size: .75rem; color: var(--text-dim); }

/* ---------- טבלה פשוטה ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 8px 6px; border-bottom: 1px solid var(--card-border); text-align: start; }
.table th { color: var(--text-dim); font-weight: 600; font-size: .8rem; }

.notice {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(59, 130, 246, .12);
    border: 1px solid rgba(59, 130, 246, .35);
    color: #CFE0FF;
    font-size: .9rem;
}

    .notice.warn { background: rgba(255, 181, 71, .1); border-color: rgba(255, 181, 71, .4); color: #FFE2B3; }

/* ===========================================================
   גרסה 0.3.0
   =========================================================== */

/* ---------- שעון בכותרת ---------- */
.app-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.05;
    white-space: nowrap;
}

    .app-clock .clock-time { color: var(--text); font-size: 1.65rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
    .app-clock .clock-date { color: var(--text-dim); font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.live-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 107, 44, .12);
    border-bottom: 1px solid rgba(255, 107, 44, .35);
    color: #FFD2BF;
    font-weight: 700;
    font-size: .9rem;
}

/* ---------- יעד שבועי ---------- */
.goal-dots { display: flex; gap: 6px; }

    .goal-dots span {
        flex: 1;
        height: 10px;
        border-radius: 99px;
        background: var(--bg-soft);
        border: 1px solid var(--card-border);
    }

        .goal-dots span.on { background: linear-gradient(90deg, var(--accent), #FFB547); border-color: transparent; }

.streak { font-weight: 800; color: #FFC7AE; }

/* ---------- תוכניות מוכנות ---------- */
.tpl {
    text-align: start;
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    background: var(--bg-soft);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    display: grid;
    gap: 6px;
}

    .tpl:hover { border-color: var(--primary); }
    .tpl h4 { margin: 0; font-size: 1.05rem; }
    .tpl p { margin: 0; color: var(--text-dim); font-size: .88rem; }

/* ---------- לוח שנה ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }

    .cal-grid .dow { text-align: center; font-size: .75rem; color: var(--text-dim); font-weight: 700; }

.cal-day {
    aspect-ratio: 1;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: .85rem;
    background: var(--bg-soft);
    color: var(--text-dim);
    position: relative;
}

    .cal-day.on { background: var(--accent); color: #fff; font-weight: 800; }
    .cal-day.today { box-shadow: inset 0 0 0 2px var(--primary); color: var(--text); }
    .cal-day.blank { background: transparent; }
    .cal-day .pr { position: absolute; top: -4px; left: -2px; font-size: .7rem; }

.legend-row { display: flex; gap: 14px; align-items: center; font-size: .8rem; color: var(--text-dim); margin-top: 10px; }
.legend-row i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-inline-end: 6px; vertical-align: -1px; }
.seg.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg.mb0 { margin-bottom: 0; }

/* כפתור התחלה + אימון זוגי באותה שורה (נשבר לשתי שורות במסך צר) */
.start-row { display: flex; gap: 10px; flex-wrap: wrap; }
.start-row .grow { flex: 1 1 200px; }
.start-row .duo-btn { flex: 1 1 140px; }

/* ---------------- חשבון וסנכרון (0.8.0) ---------------- */
.acc-user { display: flex; align-items: center; gap: 12px; }
.acc-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; flex: none; }
.acc-who { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.gap8 { gap: 8px; }
.row { display: flex; align-items: center; }
.link { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--danger); align-self: flex-start; }
.signin .links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.signin .or { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: .85rem; }
.signin .or::before, .signin .or::after { content: ""; flex: 1; height: 1px; background: var(--card-border); }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; font-weight: 600; }
.btn-google .g-logo { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); margin-inline-end: 8px; }
.ltr-input { direction: ltr; text-align: start; }
[dir=rtl] .ltr-input { text-align: right; }
.nudge { display: grid; gap: 8px; border-color: rgba(59,130,246,.45); }

/* ---------------- לוח בקרה למנהל ---------------- */
.admin-shell { min-height: 100vh; background: var(--bg); }
.admin-top { border-bottom: 1px solid var(--card-border); background: var(--card); }
.admin-top-inner { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.admin-badge { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 700; }
.admin-back { margin-inline-start: auto; }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
.admin-h1 { font-size: 1.5rem; margin: 0 0 16px; }
.admin-narrow { max-width: 460px; }
.admin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi-num { font-size: 2rem; font-weight: 800; }
.mb { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--card-border); white-space: nowrap; }
.admin-table th { color: var(--text-dim); font-weight: 600; }
.uid { display: block; padding: 8px 10px; border-radius: 8px; background: var(--bg-soft); overflow-wrap: anywhere; font-size: .85rem; }

/* ---------------- תפריט נגישות ---------------- */
.a11y-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; min-width: 40px; justify-content: center; padding: 0 10px; border-radius: 999px; border: 1px solid var(--card-border); background: var(--card); color: var(--text); font: inherit; cursor: pointer; font-size: 1.1rem; }
.a11y-btn-label { font-size: .9rem; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.a11y-size { display: flex; align-items: center; gap: 8px; }
.a11y-size-val { min-width: 3.5em; text-align: center; font-weight: 700; }
.a11y-wide { align-self: flex-start; }
.legal-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.legal-row a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- מכונים (1.0) ---------------- */
.gym-nav { display: flex; gap: 4px; margin-inline-start: 8px; }
.gym-nav ::deep a, .gym-nav a { color: var(--text-dim); padding: 6px 10px; border-radius: 10px; font-weight: 600; }
.gym-nav a.active { color: var(--text); background: var(--bg-soft); }
.gym-badge { background: var(--primary); }
.gym-head { display: flex; align-items: center; gap: 12px; }
.gym-avatar { width: 48px; height: 48px; flex: none; border-radius: 14px; background: linear-gradient(135deg, var(--accent), #FFB020); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.4rem; }
.gym-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.gym-two > .field { min-width: 160px; }
.grow { flex: 1; }
.qr-box { background: #fff; border-radius: 14px; padding: 8px; width: min(260px, 100%); align-self: center; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-code-text { text-align: center; font-size: 1.05rem; }
.qr-code-text b { letter-spacing: .2em; font-size: 1.3rem; }
.join-link { background: var(--bg-soft); border-radius: 10px; padding: 8px 10px; font-size: .85rem; overflow-wrap: anywhere; text-align: center; }
.gym-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gym-list li { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.gym-search { max-width: 280px; }
.tag.ok-tag { background: rgba(34,197,94,.15); color: var(--success); border: 1px solid rgba(34,197,94,.4); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.tag.danger-tag { background: rgba(239,68,68,.15); color: var(--danger); border: 1px solid rgba(239,68,68,.4); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.tag.soon { background: rgba(255,107,44,.15); color: var(--accent); border: 1px solid rgba(255,107,44,.4); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.small-num { font-size: 1.2rem !important; }
.plan-view { display: grid; gap: 10px; }
.plan-day ul { margin: 4px 0 0; padding-inline-start: 18px; }
.gym-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 520px; overflow-y: auto; }
.gym-hist li { border-top: 1px solid var(--card-border); padding-top: 8px; }
.code-input { letter-spacing: .15em; text-transform: uppercase; font-weight: 700; }
.print-only { display: none; }
@media (max-width: 700px) { .admin-top-inner { flex-wrap: wrap; } .gym-nav { order: 10; width: 100%; margin: 0; overflow-x: auto; } }
@media print {
    body, .admin-shell { background: #fff !important; color: #000 !important; }
    .no-print, .skip-link, .toast-host, .toast, .toasts, .dialog-backdrop, .sheet-backdrop { display: none !important; }
    .print-only { display: block; text-align: center; color: #000; }
    .print-title { font-size: 1.6rem; margin-bottom: 8px; }
    .gym-grid { display: block; }
    .print-area { border: 0 !important; box-shadow: none !important; background: #fff !important; color: #000 !important; text-align: center; }
    .qr-box { width: 70mm; margin: 0 auto; }
    .admin-main { padding: 0; }
    .admin-h1, .gym-head, .admin-kpis, .notice, .row-between.mb { display: none !important; }
}


/* ===========================================================
   1.0.1 – שער התחברות, נגישות בכותרת, הודעת מנהל
   =========================================================== */
.app-a11y { min-height: 44px; min-width: 44px; font-size: 1.35rem; flex: 0 0 auto; border-color: var(--accent, #22C55E); }
.app-top-inner .app-clock { margin-inline-start: auto; }
.site-a11y { min-height: 42px; font-size: 1.25rem; border-color: var(--accent, #22C55E); }
@media (max-width: 1099px) { .site-a11y .a11y-btn-label { display: none; } }
@media (max-width: 360px) {
    .app-top-inner { gap: 8px; }
    .app-brand span { font-size: .95rem; }
    .app-clock .clock-time { font-size: 1.35rem; }
    .app-clock .clock-date { font-size: .8rem; }
}
.gate-card { max-width: 460px; margin: 48px auto; }
.gate-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 80px 0; }
.gate-loading img { width: 64px; height: 64px; opacity: .9; }
.announce { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; font-weight: 600; border-bottom: 1px solid var(--card-border); }
.announce-info { background: #12305A; color: #E6F0FF; }
.announce-warn { background: #5A3A00; color: #FFF4DB; }
.announce-ok { background: #0E4A2A; color: #E3FFEF; }
.announce-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.announce-x { background: none; border: 0; color: inherit; font-size: 1.1rem; min-width: 32px; min-height: 32px; cursor: pointer; }

/* ---------- לוח בקרה של מנהל (1.0.1) ---------- */
a.card.kpi { color: inherit; text-decoration: none; }
a.card.kpi:hover { border-color: var(--accent, #22C55E); }
.admin-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.admin-dl dt { color: var(--text-dim); }
.admin-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.gym-actions .btn { white-space: nowrap; }
.ann-level { width: auto; min-width: 140px; }
#ann-text { resize: vertical; min-height: 72px; }
.daybars { margin: 0; }
.daybars-cap { margin-bottom: 8px; }
.daybars-svg { width: 100%; height: 120px; display: block; }
.daybars-base { stroke: var(--card-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.daybars-grid { stroke: var(--card-border); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: .6; }
.daybars-bar { fill: var(--accent, #22C55E); }
.daybars-hit { fill: transparent; }
.daybars-col:hover .daybars-bar { opacity: .75; }
.daybars-col:hover .daybars-hit { fill: rgba(255, 255, 255, .04); }
.daybars-axis { direction: ltr; display: flex; justify-content: space-between; margin-top: 4px; font-variant-numeric: tabular-nums; }
.btn.danger { color: var(--danger, #EF4444); }

/* ---------- 1.1: תוכנית מהמכון ---------- */
.plan-notice { border-color: var(--accent); margin-bottom: 14px; }
.plan-notice-ico { font-size: 1.6rem; line-height: 1; }
.plan-notice-note { font-style: italic; color: var(--text-dim); overflow-wrap: anywhere; }
#pe-card .plan-editor { margin-top: 4px; }
#pe-card .chips { flex-wrap: wrap; }
#pe-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#pe-note { resize: vertical; }

/* ---------- 1.2: תבניות לפי רמה, המלצות, בטיחות ---------- */
.tag-warn { background: rgba(245, 158, 11, .14); border-color: rgba(245, 158, 11, .4); color: #FCD38A; }
.ex-note { color: var(--text-dim); margin-top: 6px; overflow-wrap: anywhere; }
.cur-spotter { margin-top: 8px; display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(245, 158, 11, .16); color: #FCD38A; font-weight: 700; }
.cur-note { margin-top: 6px; color: var(--text-dim); font-size: .95rem; overflow-wrap: anywhere; }
.safety-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.safety-list li { background: var(--bg-soft, rgba(255,255,255,.04)); border: 1px solid var(--card-border); border-radius: 12px; padding: 10px 12px; line-height: 1.4; }
.safety-agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.safety-agree input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--accent); }
.gt-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.gt-item { border-top: 1px solid var(--card-border); padding-top: 10px; display: grid; gap: 6px; }
.gt-tips { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gt-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; font-weight: 800; background: var(--bg-soft, #1E293B); color: var(--text); margin-inline-end: 4px; }
.gt-badge.lv-beginner { background: #14532D; color: #BBF7D0; }
.gt-badge.lv-intermediate { background: #1E3A8A; color: #BFDBFE; }
.gt-badge.lv-advanced { background: #7C2D12; color: #FED7AA; }
.gt-home-levels { display: grid; gap: 8px; }
.gt-home-level { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 12px; color: inherit; text-decoration: none; }
.gt-home-level:hover { border-color: var(--accent); }

/* ---------- 1.3: מפת שרירים קדמי/אחורי ---------- */
.mm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.mm-seg { flex: 1; margin: 0; }
.mm-flip { flex: 0 0 auto; }
.mm-stage { aspect-ratio: 2 / 3; background: #FFFCF5; }
.mm-stage.is-back .muscle-pin { padding: 7px 13px; font-size: .82rem; }
.muscle-pin.sel { background: var(--accent); }
.mm-bubble { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent); background: var(--bg-soft, rgba(255,255,255,.04)); animation: up .15s ease; }
.mm-latin { color: var(--text-dim); font-size: .9rem; }

/* ---------- 1.4: מערכת המכון / לוח הבקרה – כותרת, ניווט, כותרת תחתונה ---------- */
.portal { display: flex; flex-direction: column; }
.portal .admin-main { flex: 1; width: 100%; }
.portal-top { position: sticky; top: 0; z-index: 30; background: rgb(17, 26, 46); }
.portal-top-inner { max-width: 1200px; gap: 10px 14px; min-height: 64px; flex-wrap: wrap; padding-bottom: 0; }
/* שורה שנייה בכותרת: לשוניות הניווט (מקום לכל השפות) */
.portal-nav { display: flex; gap: 8px; order: 10; width: 100%; margin: 0; padding: 4px 0 10px; overflow-x: auto; }
.portal-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 12px; color: var(--text-dim); font-weight: 700; font-size: 1rem; border: 1px solid transparent; text-decoration: none; transition: background .15s, color .15s; }
.portal-nav a:hover { background: var(--bg-soft, rgba(255,255,255,.05)); color: var(--text); }
.portal-nav a.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(255, 107, 44, .3); }
.pn-ico { font-size: 1.15rem; line-height: 1; }
.portal-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.portal-user { display: flex; align-items: center; gap: 8px; }
.portal-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #FFB020); color: #fff; font-weight: 800; }
.portal-name { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-foot { border-top: 1px solid var(--card-border); background: var(--card); margin-top: 24px; }
.portal-foot-inner { max-width: 1200px; margin: 0 auto; padding: 18px 16px; display: grid; gap: 10px; }
.portal-foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.portal-foot-links a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.portal-foot-links a:hover { color: var(--text); }
.portal-foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--text-dim); }
@media (max-width: 1100px) { .portal-name { display: none; } }
@media (max-width: 860px) {
    .portal-top-inner { flex-wrap: wrap; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
    .portal-actions { gap: 6px; }
    .portal-lang { max-width: 6.5rem; }
    .portal-actions .btn-ghost.btn-sm:not(#portal-signout) { display: none; }
    /* בנייד: הניווט עובר לסרגל לשוניות קבוע למטה */
    .portal-nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 40; margin: 0; gap: 0; width: auto; overflow: visible; justify-content: space-around; background: rgb(17, 26, 46); border-top: 1px solid var(--card-border); padding: 6px 4px calc(6px + var(--safe-bottom)); }
    .portal-nav a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: .78rem; border-radius: 10px; justify-content: center; }
    .portal-nav a.active { box-shadow: none; }
    .pn-ico { font-size: 1.35rem; }
    .portal .admin-main { padding-bottom: 96px; }
    .portal-foot { margin-bottom: 72px; }
}

/* ---------- 1.4: בחירת תרגיל ---------- */
.exs-pick-row { align-items: stretch; }
.exs-pick-row .btn { white-space: nowrap; }
.pick-list button.picked { border-color: var(--accent); }
.exs-split-map { display: none; }
@media (min-width: 900px) {
    .sheet.sheet-wide { max-width: 940px; }
    .exs-split { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 20px; align-items: start; }
    .exs-split-map { display: block; position: sticky; top: 0; }
    .exs-split-list .pick-list { max-height: 62vh; overflow-y: auto; }
}
.portal-lang { min-height: 40px; max-width: 9.5rem; border-radius: 999px; padding: 0 12px; background: var(--card); color: var(--text); border: 1px solid var(--card-border); font: inherit; font-size: .9rem; cursor: pointer; }

/* ---------- 1.5: צוות וקבוצות ---------- */
.team-row { border-top: 1px solid var(--card-border); padding-top: 10px; display: grid; gap: 6px; }
.team-row.pending { opacity: .85; }
.team-perms { display: flex; flex-wrap: wrap; gap: 6px 14px; border: 0; padding: 0; margin: 0; }
.team-perms legend { margin-bottom: 6px; color: var(--text-dim); }
.team-perm { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .9rem; }
.team-perm input { width: 18px; height: 18px; accent-color: var(--accent); }
.coach-select { min-width: 150px; padding: 6px 10px; min-height: 36px; }
.mem-coach { align-items: center; }
.grp-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 50vh; overflow-y: auto; }
.grp-member { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 12px; cursor: pointer; }
.grp-member.on { border-color: var(--accent); background: rgba(255, 107, 44, .08); }
.grp-member input { width: 18px; height: 18px; accent-color: var(--accent); }
.grp-status { line-height: 1.6; }
/* 1.6 – דף קבוצה */
#grp-table tr.row-on td { background: rgba(255, 107, 44, .07); }
#grp-table input[type=checkbox], #grp-sel-all, #grp-show-all { width: 18px; height: 18px; accent-color: var(--accent); }
.grp-coach { color: var(--text-dim); }
.grp-edit-plan-link { white-space: nowrap; }
/* 1.7 – מסך פתיחה מהאייקון (בחירה: מערכת המכון / האימונים שלי) */
.start-screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 16px; text-align: center; }
.start-logo { border-radius: 18px; }
.start-brand { font-size: 1.4rem; font-weight: 800; }
.start-brand b { color: var(--accent); }
.start-title { font-size: 1.35rem; margin: 12px 0 4px; }
.start-choices { display: grid; gap: 12px; width: 100%; max-width: 420px; }
.start-choice { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-border); color: var(--text); text-decoration: none; text-align: start; font-size: 1.1rem; }
.start-choice:hover, .start-choice:focus-visible { border-color: var(--accent); }
.start-ico { font-size: 2rem; line-height: 1; }
.d-block { display: block; }
/* 1.7 – מנוי ותשלום */
.sub-line { font-size: 1.05rem; }
.bill-amount { font-size: 1.6rem; font-weight: 800; }
/* 1.7.2 – שליטה בימים */
.days-ctl .dc-date-in { max-width: 180px; }
.days-ctl .dc-days-in { max-width: 90px; }
.admin-log { max-height: 220px; overflow: auto; font-size: .85rem; }
.admin-log li { padding: 4px 0; border-bottom: 1px solid var(--card-border); }
.bill-block { border-top: 1px solid var(--card-border); padding-top: 10px; }
.plain-list { list-style: none; margin: 0; padding: 0; }
/* 1.7.4 – שם המשתמש בכותרת האפליקציה */
.app-user { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; min-width: 0; max-width: 220px; }
.app-user:hover .app-user-name, .app-user:focus-visible .app-user-name { color: var(--accent); }
.app-user .portal-avatar { flex: none; }
.app-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user-name.first { display: none; }
@media (max-width: 600px) {
    .app-user { max-width: 110px; gap: 6px; }
    .app-user .portal-avatar { width: 30px; height: 30px; }
    .app-user-name.full { display: none; }
    .app-user-name.first { display: inline; }
}
@media (max-width: 360px) { .app-user-name.first { display: none; } }
@media (max-width: 600px) {
    /* בנייד: האייקון בלבד במקום "PureFit GYM", כדי שהשם יהיה מלא */
    .app-top-inner:has(.app-user) .app-brand span { display: none; }
    .app-user { max-width: 130px; }
}
/* 1.8 – דורשים תשומת לב / פעילות */
.attn-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--card-border); }
.attn-row:last-child { border-bottom: 0; }
.attn-why { color: var(--text); }
.attn-actions .btn { white-space: nowrap; }
.act-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 4px 0; }
/* 1.8.1 – שם באנגלית ליד השם המקומי */
.en-name { display: block; font-size: .78em; font-weight: 500; color: var(--text-dim); unicode-bidi: isolate; }
.en-name.inline { display: inline; margin-inline-start: 6px; }
.tag .en-name.inline { color: inherit; opacity: .8; }
.phone-links { display: inline-flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
/* 1.8.5 – עריכת קבוצה: שם ופרטים בלי חפיפה */
.grp-member { flex-wrap: wrap; }
.grp-member > .grow { min-width: 0; overflow-wrap: anywhere; }
.grp-member-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: start; }
.grp-members { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
