/* HomeTasK – עיצוב בסגנון פייסבוק, RTL, מובייל-פירסט */

:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --brand: #1877f2;
    --brand-dark: #166fe5;
    --text: #050505;
    --muted: #65676b;
    --border: #dddfe2;
    --success: #31a24c;
    --danger: #e41e3f;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, .12);
    --nav-h: 60px;
    --max: 640px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Hebrew", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--brand); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); font-size: .9rem; }
.link { color: var(--brand); font-weight: 600; font-size: .92rem; }

/* ---------- סרגל עליון ---------- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    background: var(--card);
    box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px;
    padding-top: calc(8px + env(safe-area-inset-top));
}
.topbar__brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; color: var(--brand); }
.topbar__logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--brand); color: #fff;
    display: grid; place-items: center; font-weight: 800;
}
.topbar__actions { display: flex; align-items: center; gap: 6px; }
.iconbtn {
    position: relative; width: 40px; height: 40px; border-radius: 50%;
    background: #e4e6eb; color: #050505;
    display: grid; place-items: center; border: none; cursor: pointer;
}
.iconbtn.avatar { background: var(--brand); color: #fff; font-weight: 700; }
.badge {
    position: absolute; top: -2px; left: -2px;
    background: var(--danger); color: #fff;
    min-width: 18px; height: 18px; border-radius: 9px;
    font-size: .7rem; font-weight: 700;
    display: grid; place-items: center; padding: 0 4px;
    border: 2px solid var(--card);
}

/* ---------- אזור תוכן ---------- */
.app-main {
    max-width: var(--max); margin: 0 auto;
    padding: 14px 14px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}

/* ---------- ניווט תחתון ---------- */
.bottomnav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-around;
    /* רצועת הניווט בגובה קבוע; אזור הבטחון (home indicator) מתווסף כריפוד נפרד מתחתיה */
    box-sizing: content-box;
    min-height: var(--nav-h);
    padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav__item {
    flex: 1; height: var(--nav-h);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--muted); font-size: .68rem; font-weight: 600;
}
.bottomnav__item svg { width: 24px; height: 24px; }
.bottomnav__item.active { color: var(--brand); }
.bottomnav__fab {
    flex: 0 0 56px; width: 56px; height: 56px;
    border-radius: 50%; border: none; cursor: pointer;
    background: var(--brand); color: #fff;
    display: grid; place-items: center;
    transform: translateY(-8px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, .4);
}
.bottomnav__fab svg { width: 28px; height: 28px; }

/* ---------- כרטיסים ---------- */
.card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px;
}
.stack > * { margin-bottom: 10px; }
.stack > *:last-child { margin-bottom: 0; }

/* ---------- כפתורים ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 1rem; font-weight: 700; padding: 11px 16px;
    background: #e4e6eb; color: #050505; font-family: inherit;
    transition: background .15s, opacity .15s;
}
.btn:active { opacity: .85; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:active { background: var(--brand-dark); }
.btn--success { background: var(--success); color: #fff; }
.btn--danger { background: #fdecea; color: var(--danger); }
.btn--ghost { background: #e4e6eb; color: #050505; }
.btn--soft { background: #e7f0ff; color: var(--brand); }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 12px; font-size: .88rem; }
.btn--lg { padding: 14px 18px; font-size: 1.05rem; }
.btn--primary.btn--lg { box-shadow: 0 8px 18px rgba(24, 119, 242, .32); }

/* ---------- התראות מערכת ---------- */
.alert { border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 12px; font-size: .92rem; }
.alert--success { background: #e3f6e9; color: #1a7d39; }
.alert--error { background: #fdecea; color: #c0182f; }
.alert ul { margin: 0; padding-inline-start: 18px; }

/* ---------- טפסים ---------- */
.form .field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea,
.filters input, .filters select {
    width: 100%; font-size: 1rem; font-family: inherit;
    padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: #f5f6f7; color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--brand); background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, .15);
}
.field textarea { resize: vertical; }

/* תיקון מראה שדות תאריך/שעה/חודש (במיוחד ב-iOS Safari) */
.field input[type="date"],
.field input[type="time"],
.field input[type="month"],
.field input[type="datetime-local"],
.filters input[type="month"] {
    -webkit-appearance: none; appearance: none;
    height: 48px; box-sizing: border-box;
    padding: 0 14px; font-size: 16px;
    text-align: right; direction: rtl;
    background-color: #f5f6f7; color: var(--text);
}
/* iOS אינו ממרכז אנכית את הערך – line-height על תיבת הערך פותר זאת */
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
    text-align: right; margin: 0; line-height: 48px; min-height: 48px;
}
input::-webkit-datetime-edit { padding: 0; line-height: 48px; }
input::-webkit-datetime-edit-fields-wrapper { padding: 0; }
/* אייקון בורר התאריך – שקוף-למחצה, נשאר בצד ההתחלה (שמאל ב-RTL) */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator { margin: 0; opacity: .55; }

/* כרטיס מסמך/קובץ מצורף (כשאינו תמונה) */
.file-pill { display: inline-flex; align-items: center; gap: 6px; background: #f0f2f5; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.file-pill--lg { width: 100%; justify-content: center; padding: 22px; font-size: 1.05rem; margin-bottom: 14px; }

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }
.form__preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 8px; }

/* ---------- אימות ---------- */
.auth-body {
    min-height: 100vh; position: relative; overflow-x: hidden;
    background: #ffffff;
}

.auth-wrap {
    position: relative; z-index: 1;
    max-width: 420px; margin: 0 auto; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 32px 18px calc(28px + env(safe-area-inset-bottom));
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand__logo {
    width: 72px; height: 72px; border-radius: 20px; background: var(--brand); color: #fff;
    display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; margin: 0 auto 14px;
    box-shadow: 0 10px 24px rgba(24, 119, 242, .32);
}
.auth-brand h1 { color: var(--brand); font-size: 2rem; letter-spacing: -.5px; }
.auth-brand p { color: var(--muted); font-size: 1rem; margin: 6px 0 0; }
.auth-features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.auth-feature {
    background: #e7f0ff; color: var(--brand); font-size: .82rem; font-weight: 600;
    padding: 6px 12px; border-radius: 20px;
}

.auth-card { border-radius: 20px; padding: 24px 20px; border: 1px solid var(--border); box-shadow: 0 6px 24px rgba(8, 30, 72, .07); }
.auth-card__head { text-align: center; margin-bottom: 18px; }
.auth-card__head h2 { font-size: 1.45rem; }
.auth-card__head p { margin: 6px 0 0; }
.auth-card h2 { font-size: 1.3rem; }
.auth-card > .muted { margin-bottom: 14px; }

/* שדה קלט עם אייקון */
.input-wrap { position: relative; display: block; }
.input-wrap__icon { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.input-wrap input { padding-inline-start: 44px; }
.input-wrap--pwd input { padding-inline-end: 46px; }
.pwd-toggle {
    position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border: none; background: transparent; color: var(--muted);
    cursor: pointer; display: grid; place-items: center; border-radius: 50%;
}
.pwd-toggle svg { width: 22px; height: 22px; }
.pwd-toggle--on { color: var(--brand); }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: .85rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.auth-links { text-align: center; margin-top: 16px; font-size: .92rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.auth-links a { font-weight: 700; }
.auth-links .sep { color: var(--border); }

/* ---------- כותרות עמוד ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.page-head h1 { font-size: 1.4rem; }
.page-head__actions { display: flex; gap: 8px; }

/* ---------- טאבים ---------- */
.tabs { display: flex; gap: 6px; background: var(--card); padding: 5px; border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); }
.tab { flex: 1; text-align: center; padding: 9px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: .92rem; }
.tab--active { background: #e7f0ff; color: var(--brand); }

/* ---------- ברכת פתיחה ---------- */
.greeting { margin-bottom: 14px; }
.greeting h1 { font-size: 1.5rem; }

/* ---------- כרטיסי סטטיסטיקה ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 6px; }
.stat { display: flex; flex-direction: column; gap: 4px; text-align: center; align-items: center; }
.stat__value { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.stat__label { font-size: .82rem; color: var(--muted); }

/* ---------- בלוקים ---------- */
.block { margin-top: 18px; }
.block__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.block__head h2 { font-size: 1.1rem; }

/* ---------- מצב ריק ---------- */
.empty { text-align: center; padding: 26px 16px; color: var(--muted); }
.empty p { margin: 0 0 12px; }

/* ---------- כרטיס משימה ---------- */
.task { display: flex; align-items: stretch; gap: 10px; padding: 12px; }
.task__check { display: flex; align-items: center; margin: 0; }
.checkbtn {
    width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border);
    background: #fff; cursor: pointer; display: grid; place-items: center; color: #fff; flex-shrink: 0;
}
.checkbtn--on { background: var(--success); border-color: var(--success); }
.task__body { flex: 1; display: flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.task__main { flex: 1; min-width: 0; }
.task__title { font-size: 1rem; font-weight: 600; }
.task--done .task__title { text-decoration: line-through; color: var(--muted); }
.task--high { border-inline-start: 4px solid var(--danger); }
.task__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.task__thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }

.chip { font-size: .76rem; font-weight: 600; padding: 3px 8px; border-radius: 20px; background: #e4e6eb; color: var(--muted); }
.chip--muted { background: #e4e6eb; color: var(--muted); }
.chip--danger { background: #fdecea; color: var(--danger); }
.chip--user { background: #e7f0ff; color: var(--brand); }

/* ---------- כרטיס תשלום ---------- */
.payment { display: flex; align-items: center; gap: 12px; padding: 12px; color: inherit; }
.payment__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.payment__body { flex: 1; min-width: 0; }
.payment__title { font-size: 1rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.payment__meta { font-size: .8rem; color: var(--muted); }
.payment__hasimg { color: var(--muted); }
.payment__amount { font-weight: 800; color: var(--text); white-space: nowrap; }

/* ---------- מסננים ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select, .filters input { flex: 1; min-width: 120px; }
.total-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #e7f0ff; color: var(--brand); border-radius: var(--radius); margin-bottom: 12px; font-weight: 700; }

/* ---------- תצוגת פרטים ---------- */
.detail__image { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 14px; }
.detail__title { font-size: 1.4rem; margin: 8px 0; }
.detail__desc { color: #050505; white-space: pre-wrap; }
.detail__amount { font-size: 2rem; font-weight: 800; }
.detail--done .detail__title { text-decoration: line-through; color: var(--muted); }
.detail__list { margin: 14px 0 0; padding: 0; }
.detail__list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.detail__list > div:last-child { border-bottom: none; }
.detail__list dt { color: var(--muted); font-size: .9rem; margin: 0; }
.detail__list dd { margin: 0; font-weight: 600; text-align: left; }
.detail__note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.detail__note h3 { font-size: .95rem; color: var(--muted); margin-bottom: 6px; }
.detail__actions { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.status-chip { display: inline-block; font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; }
.status-chip--open { background: #e7f0ff; color: var(--brand); }
.status-chip--done { background: #e3f6e9; color: var(--success); }

/* ---------- סיכום (גרפים) ---------- */
.barrow { display: block; padding: 9px 0; border-bottom: 1px solid var(--border); }
.barrow:last-child { border-bottom: none; }
.barrow__head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .92rem; }
.bar { height: 9px; background: #e4e6eb; border-radius: 6px; overflow: hidden; }
.bar__fill { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.row-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.row-line:last-child { border-bottom: none; }

/* ---------- קטגוריות ---------- */
.cat-row { display: flex; align-items: center; gap: 12px; }
.cat-row__name { flex: 1; font-weight: 600; }
.chips-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { background: var(--card); border: 1px solid var(--border); border-inline-start-width: 4px; border-radius: 20px; padding: 6px 12px; font-size: .9rem; font-weight: 600; }

/* ---------- התראות ---------- */
.notif { display: flex; gap: 10px; align-items: flex-start; color: inherit; }
.notif__dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; margin-top: 7px; flex-shrink: 0; }
.notif--unread { background: #f0f6ff; }
.notif--unread .notif__dot { background: var(--brand); }
.notif__body { flex: 1; }
.notif__body p { margin: 3px 0; font-size: .92rem; color: var(--muted); }

/* ---------- פרופיל ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head__avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; flex-shrink: 0; }
.profile-head__avatar--sm { width: 40px; height: 40px; font-size: 1.1rem; }
.invite { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.invite__row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.invite__row code { flex: 1; font-size: 1.3rem; font-weight: 800; letter-spacing: .15em; background: #f5f6f7; padding: 10px; border-radius: var(--radius-sm); text-align: center; border: 1px dashed var(--border); }
.menu-link { display: flex; align-items: center; justify-content: space-between; font-weight: 600; color: var(--text); }
.logout-form { margin-top: 20px; }

/* ---------- בקשת פוש ---------- */
.push-prompt { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #e7f0ff; }
.push-prompt p { margin: 2px 0 0; }
.push-prompt .btn { flex-shrink: 0; }

/* ---------- גיליון פעולה ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sheet__panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--card); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    max-width: var(--max); margin: 0 auto;
    animation: sheetUp .2s ease;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet__panel h3 { text-align: center; color: var(--muted); font-size: .95rem; margin-bottom: 14px; }
.sheet__item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius); color: inherit; }
.sheet__item:active { background: #f0f2f5; }
.sheet__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; flex-shrink: 0; }
.sheet__item strong { display: block; }
.sheet__item small { color: var(--muted); }
.sheet__cancel { width: 100%; margin-top: 12px; padding: 13px; border: none; border-radius: var(--radius-sm); background: #e4e6eb; font-weight: 700; font-size: 1rem; cursor: pointer; font-family: inherit; }

.task__thumb--doc { display: grid; place-items: center; background: #f0f2f5; font-size: 1.5rem; }

/* ---------- פופאפ אישור ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.modal__box { position: relative; background: var(--card); border-radius: var(--radius); padding: 22px 18px 16px; width: min(340px, 90vw); box-shadow: var(--shadow-md); text-align: center; animation: popIn .15s ease; }
@keyframes popIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal__msg { font-size: 1.05rem; font-weight: 600; margin: 0 0 18px; }
.modal__actions { display: flex; gap: 10px; }
.modal__actions .btn { flex: 1; }

/* מודאל רשימה (משימות של יום ביומן) */
.modal__box--list { width: min(420px, 92vw); padding: 0; overflow: hidden; text-align: right; }
.modal__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal__header h3 { font-size: 1.05rem; }
.modal__x { background: #e4e6eb; border: none; width: 30px; height: 30px; border-radius: 50%; font-size: .85rem; cursor: pointer; color: var(--muted); flex-shrink: 0; }
.modal__body { padding: 6px 8px; max-height: 60vh; overflow-y: auto; }
.popup-task { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-radius: 8px; color: inherit; }
.popup-task + .popup-task { border-top: 1px solid var(--border); }
.popup-task:active { background: #f0f2f5; }
.popup-task__time { font-weight: 700; color: var(--brand); font-size: .85rem; min-width: 42px; }
.popup-task--high .popup-task__time { color: var(--danger); }
.popup-task__title { flex: 1; font-weight: 600; }
.popup-task--done { color: var(--muted); }
.popup-task--done .popup-task__title { text-decoration: line-through; font-weight: 400; }
.popup-task__check { color: var(--success); font-weight: 700; }
.popup-task__who { font-size: .72rem; background: #e7f0ff; color: var(--brand); padding: 2px 8px; border-radius: 20px; }

.cal__cell--has { cursor: pointer; }
.cal__cell--has:active { background: #eef3fb; }
.cal__popup { display: none; }

/* ---------- תצוגת יומן (משימות) ---------- */
.viewtoggle { display: inline-flex; background: var(--card); border-radius: var(--radius-sm); padding: 4px; box-shadow: var(--shadow); gap: 4px; }
.viewtoggle a { padding: 7px 14px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 5px; }
.viewtoggle a.active { background: #e7f0ff; color: var(--brand); }

.cal__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal__bar h2 { font-size: 1.15rem; }
.cal__nav { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--card); box-shadow: var(--shadow); font-size: 1.2rem; cursor: pointer; color: var(--brand); }
.cal { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal__week { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__wd { text-align: center; padding: 8px 0; font-size: .8rem; font-weight: 700; color: var(--muted); background: #f7f8fa; border-bottom: 1px solid var(--border); }
/* קווי הרשת נוצרים מרווח 1px על רקע בצבע הגבול – אחיד בכל התאים ללא תלות במיקום/תוכן */
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); }
.cal__cell { min-height: 76px; background: var(--card); padding: 4px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal__cell--empty { background: #fafbfc; }
.cal__daynum { font-size: .8rem; font-weight: 700; color: var(--muted); align-self: flex-start; width: 24px; height: 24px; display: grid; place-items: center; }
.cal__cell--today .cal__daynum { background: var(--brand); color: #fff; border-radius: 50%; }
.cal__task { font-size: .68rem; line-height: 1.3; padding: 2px 5px; border-radius: 5px; background: #e7f0ff; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__task--high { background: #fdecea; color: var(--danger); }
.cal__task--done { background: #eef0f2; color: var(--muted); text-decoration: line-through; }
.cal__more { font-size: .64rem; color: var(--muted); padding-inline-start: 5px; }
.cal__note { text-align: center; color: var(--muted); font-size: .85rem; padding: 12px; }

/* יומן קומפקטי (מסך הבית) */
.cal--compact .cal__cell { min-height: 46px; align-items: center; padding: 4px 2px; gap: 4px; color: inherit; }
.cal--compact .cal__daynum { font-size: .8rem; }
.cal__dots { display: inline-flex; align-items: center; gap: 3px; min-height: 8px; }
.cal__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.cal__dot--high { background: var(--danger); }
.cal__dot--done { background: var(--muted); }
.cal__dots small { font-size: .6rem; color: var(--muted); font-weight: 700; }

/* ---------- מסכים רחבים ---------- */
@media (min-width: 720px) {
    .app-main { padding-bottom: 24px; }
}
