/* ===== Kabalot - שפה עיצובית (עיצוב מחדש, שלב 1): שטוח, בלי צללים וגרדיאנטים; היררכיה משכבות גוונים ===== */
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-hebrew-300-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-hebrew-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-hebrew-400-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-hebrew-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-hebrew-500-hebrew.woff2') format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'IBM Plex Sans Hebrew';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-hebrew-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* צבעים - רק אלה */
  --c-cream: #F5F0E6;        /* רקע */
  --c-white: #FFFFFF;        /* כרטיסים ומשטחים */
  --c-sheet: #FBF8F2;        /* רקע חלונית תחתונה */
  --c-green: #1D4A3C;        /* ראשי: מספר ראשי, כפתור ראשי, אייקונים, מצב פעיל */
  --c-green-soft: #E3ECE7;   /* רקע אייקונים ותגיות */
  --c-ink: #16241F;          /* טקסט ראשי */
  --c-ink-2: #6A746F;        /* טקסט משני */
  --c-line: #EEE8DC;         /* קווי הפרדה */
  --c-border: #E6DFD1;       /* מסגרות */
  --c-ok: #1D4A3C;           /* תקציב תקין */
  --c-near: #D99A2B;         /* מתקרב לגבול (מעל 85%) */
  --c-over: #A13A22;         /* חריגה - טקסט */
  --c-over-bar: #C4553A;     /* חריגה - פס */

  /* שמות שהקוד הקיים משתמש בהם -> הצבעים החדשים */
  --bg: var(--c-cream);
  --surface: var(--c-white);
  --surface-2: var(--c-sheet);
  --text: var(--c-ink);
  --muted: var(--c-ink-2);
  --border: var(--c-border);
  --line: var(--c-line);
  --accent: var(--c-green);
  --accent-ink: var(--c-white);
  --accent-soft: var(--c-green-soft);
  --warn: var(--c-near);
  --warn-soft: var(--c-sheet);
  --danger: var(--c-over);
  --bar: var(--c-green);
  --shadow: none;
  /* עו"ש - בלי כחול: אותה שפה ירוקה */
  --bank: var(--c-green);
  --bank-ink: var(--c-white);
  --bank-soft: var(--c-green-soft);
  --bank-border: var(--c-border);

  /* טיפוגרפיה: IBM Plex Sans Hebrew, 300 / 400 / 500 בלבד */
  --font: 'IBM Plex Sans Hebrew', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --w-light: 300;
  --w-regular: 400;
  --w-medium: 500;
  --fs-xs: 12px;   /* מינימום */
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 22px;
  --fs-hero: 44px; /* המספר הראשי במסך הבית */

  /* ריווח - בסיס 4px; שוליים צדדיים 16px */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --gutter: 16px;

  /* צורה */
  --radius: 16px;        /* כרטיסים */
  --r-btn: 12px;         /* כפתורים */
  --r-chip: 20px;        /* צ'יפים */
  --r-sheet: 22px;       /* חלונית תחתונה - פינות עליונות */
  --r-tile: 12px;        /* ריבוע אייקון */
  --tap: 44px;           /* אזור לחיצה מינימלי */
  --tabbar-h: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: var(--w-regular) var(--fs-md)/1.5 var(--font);
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px);
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
b, strong, h1, h2, h3, h4, th, legend { font-weight: var(--w-medium); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- app bar ---- */
.appbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: var(--w-medium); font-size: 19px; }
.brand img { border-radius: 8px; }
.who {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; max-width: 50vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.offline { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 8px 16px; font-size: 14px; }

/* מסך טעינה / אבחון (boot.js): מכסה הכול עד שהאפליקציה עלתה - אף פעם לא מסך לבן */
.boot { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--bg); color: var(--text);
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px); overflow-y: auto; }
.boot[hidden] { display: none; }
.boot-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.boot-msg { margin: 0; font-size: var(--fs-lg); color: var(--muted); }
.boot-failed .boot-msg { color: var(--text); font-weight: var(--w-medium); }
.boot-diag { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.boot-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.boot-actions button { min-height: 44px; padding: 0 16px; border-radius: var(--r-btn); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.boot-actions button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.boot-copied { margin: 0; min-height: 1.5em; font-size: 14px; color: var(--muted); }
.boot-details { text-align: start; font-size: 14px; color: var(--muted); }
.boot-info { white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.45; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px; margin: 8px 0 0; text-align: left; user-select: text; -webkit-user-select: text; }

main { max-width: 640px; margin: 0 auto; padding: 4px 16px 16px; }
.view { display: flex; flex-direction: column; gap: 12px; }

/* ---- add form (קטגוריה, תיאור, מחיר, שמירה) ---- */
.add-form {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.add-title { margin: 0; font-size: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; color: var(--muted); font-weight: var(--w-medium); }
/* 17px ומעלה: באייפון שדות קטנים מ-16px גורמים להגדלה אוטומטית של המסך */
.add-form select, .add-form input {
  width: 100%; min-width: 0; font-size: 17px; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text);
}
.add-form select:focus, .add-form input:focus { outline: 2px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
.add-form [aria-invalid="true"] { border-color: var(--danger); }
.price-wrap { position: relative; display: block; }
/* מספרים משמאל לימין, יישור לימין כמו שאר הטופס; סימן ₪ בצד שמאל של השדה */
.price-wrap input { padding-left: 44px; font-size: 22px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; direction: ltr; text-align: right; }
.price-wrap .currency {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--muted); pointer-events: none;
}
.save-btn { min-height: 56px; font-size: 18px; width: 100%; }
.primary {
  border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink);
  font-weight: var(--w-medium); padding: 0 18px; min-height: 48px;
}
.primary:disabled { opacity: .6; }
.preview { min-height: 24px; font-size: 15px; color: var(--muted); padding: 0 4px; }
.preview.ok { color: var(--accent); font-weight: var(--w-medium); }
.preview.warn { color: var(--warn); }
.reply {
  background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  white-space: pre-wrap; word-wrap: break-word; position: relative; font-size: 15px;
}
.reply.warn { background: var(--warn-soft); }
.reply .close { position: absolute; top: 6px; inset-inline-end: 6px; border: 0; background: none; font-size: 18px; color: var(--muted); padding: 6px; }

.month-strip {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%;
  border: 0; background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; text-align: start;
}
.month-strip .label { color: var(--muted); font-size: 14px; }
.month-strip .value { font-size: 22px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }

.section-title { font-size: 15px; color: var(--muted); margin: 8px 4px 0; font-weight: var(--w-medium); }

/* ---- expense list ---- */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list li + li { border-top: 1px solid var(--border); }
.item {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  width: 100%; border: 0; background: none; text-align: start; padding: 12px 14px; min-height: 60px;
}
.item:active { background: var(--surface-2); }
.icon { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; }
.item .main { min-width: 0; }
.item .desc { font-weight: var(--w-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .amount { font-weight: var(--w-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 28px 16px; }

/* ---- month nav / history ---- */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-nav button {
  width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 18px;
}
.month-nav button:disabled { opacity: .35; }
.month-nav .label { font-weight: var(--w-medium); font-size: 18px; }
.filter { display: flex; }
.filter button {
  border: 0; border-radius: 999px; background: var(--accent-soft); color: var(--text); padding: 6px 12px; font-size: 14px;
}
.day { margin-top: 6px; }
.day-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; padding: 6px 4px; }

/* ---- summary ---- */
.total-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; }
.total-card .label { color: var(--muted); font-size: 14px; }
.total-card .value { font-size: 34px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; line-height: 1.2; }
.total-card .count { color: var(--muted); font-size: 14px; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bar-row {
  display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; width: 100%;
  border: 0; background: var(--surface); border-radius: 14px; padding: 10px 12px; text-align: start; box-shadow: var(--shadow);
}
.bar-row .name { font-weight: var(--w-medium); display: flex; justify-content: space-between; gap: 8px; }
.bar-row .pct { color: var(--muted); font-weight: 400; font-size: 13px; }
.bar-track { height: 8px; border-radius: 999px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--bar); }
.bar-row .amount { font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
/* פירוט "רכב ודלק" לפי רכב, מתחת לשורת הקטגוריה */
.vehicle-rows { list-style: none; margin: 4px 0 2px; padding: 0 44px 0 0; display: flex; flex-direction: column; gap: 4px; }
.vehicle-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; min-height: 44px;
  border: 0; border-radius: 12px; background: var(--surface-2); padding: 8px 12px; font-size: 15px; color: var(--text); text-align: start;
}
.vehicle-row .amount { font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.vehicle-row .muted { color: var(--muted); font-size: 13px; }

/* ---- expense table ---- */
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }
/* סינון לפי רכב - בשורה משלו מתחת לקטגוריה (מופיע רק ב"רכב ודלק") */
.table-tools #table-vehicle { flex: 1 1 100%; order: 3; }
.table-tools select {
  flex: 1; min-width: 0; font-size: 16px; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.export {
  border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink);
  font-weight: var(--w-medium); padding: 0 14px; min-height: 44px; white-space: nowrap;
}
.export:disabled { opacity: .6; }
.table-total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px;
}
.table-total .label { color: var(--muted); font-size: 14px; }
.table-total .value { font-size: 22px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }

.xtable {
  width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 15px;
}
.xtable th, .xtable td { padding: 10px 8px; text-align: start; vertical-align: middle; border-bottom: 1px solid var(--border); }
.xtable thead th {
  position: sticky; top: calc(env(safe-area-inset-top) + 50px); z-index: 2;
  background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: var(--w-medium);
}
.xtable thead th:first-child { border-start-start-radius: var(--radius); }
.xtable thead th:last-child { border-start-end-radius: var(--radius); }
.xtable th button { border: 0; background: none; padding: 0; font: inherit; color: inherit; font-weight: var(--w-medium); }
.xtable th button[aria-sort]::after { content: " ▾"; }
.xtable th button[aria-sort="ascending"]::after { content: " ▴"; }
.col-date { width: 56px; }
.col-amount { width: 92px; }
.col-cat { width: 130px; }
.col-who { width: 64px; }
.xtable td.col-amount, .xtable th.col-amount { text-align: end; font-variant-numeric: tabular-nums; }
.xtable td.col-amount { font-weight: var(--w-medium); white-space: nowrap; }
.xtable td.col-date { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xtable td.col-desc { overflow-wrap: anywhere; }
.xtable td.col-who { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xtable .cat-inline { display: none; color: var(--muted); font-size: 12px; margin-top: 2px; }
.xtable .cat-inline-vehicle { color: var(--muted); font-size: 12px; margin-top: 2px; }
.xtable tbody tr { cursor: pointer; }
.xtable tbody tr:hover, .xtable tbody tr:focus-visible { background: var(--surface-2); outline: none; }
.xtable tbody tr:active { background: var(--accent-soft); }
.xtable tfoot td { font-weight: var(--w-medium); border-bottom: 0; border-top: 2px solid var(--accent); }
.xtable tfoot td.col-amount { font-size: 16px; }
.xtable .empty-row td { text-align: center; color: var(--muted); padding: 28px 12px; cursor: default; }
.hint { color: var(--muted); font-size: 13px; text-align: center; margin: 0; }

/* ---- גרסה 8: מסך בית, הכנסות, תקציב, הוצאות קבועות ---- */
:root { --income: #0f7a5a; --over: var(--danger); --warn-bar: #d58a00; }
@media (prefers-color-scheme: dark) { :root { --income: #3cc497; --warn-bar: #f2b45a; } }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; min-width: 0; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 22px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; }
.stat.income .value { color: var(--income); }
/* הפרש הכנסות והוצאות - לרוחב מלא, בולט */
.stat.positive, .stat.negative { grid-column: 1 / -1; }
.stat.positive { background: var(--accent-soft); }
.stat.negative { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.stat.negative .value { color: var(--danger); }
/* כרטיס "הפרש הכנסות והוצאות": מעט נמוך יותר - סכום קטן יותר וריווח מצומצם */
.stat.positive, .stat.negative { padding: 8px 14px; }
.stat.positive .value, .stat.negative .value { font-size: 24px; line-height: 1.15; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

/* גרסה 9: סיכומי הבית לחיצים (פירוט עסקאות) + שיטת חישוב ההכנסות */
button.stat.tappable { border: 0; width: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer; }
button.stat.tappable:active { background: var(--surface-2); }
.stat .chev { color: var(--muted); font-weight: var(--w-medium); }
.basis-note { margin: -4px 4px 0; font-size: 13px; color: var(--muted); }

/* גרסה 11 (שלב 1): עו"ש - הגדרות ובדיקה */
.bank-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.bank-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bank-head .label { color: var(--muted); font-size: 14px; }
.bank-head .value { font-size: 24px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.bank-head .value.neg { color: var(--danger); }
.bank-head .value.muted { color: var(--muted); }
.bank-rows { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 0; font-size: 14px; }
.bank-rows dt { color: var(--muted); }
.bank-rows dd { margin: 0; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; text-align: end; }
.bank-note { margin: 0; font-size: 13px; color: var(--muted); }
.bank-warn { margin: 0; font-size: 13px; color: var(--warn); font-weight: var(--w-medium); }
.bank-block { display: flex; flex-direction: column; gap: 8px; }
.bank-block h3 { margin: 6px 4px 0; font-size: 15px; }
.bank-block .hint { text-align: start; }
.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form.wrap { flex-wrap: wrap; }
.inline-form .price-wrap { flex: 1 1 140px; }
.inline-form input, .inline-form select {
  min-height: 46px; font-size: 16px; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); min-width: 0;
}
.inline-form .price-wrap input { width: 100%; padding-left: 36px; }
.inline-form select, .inline-form input[type="date"] { flex: 1 1 140px; }
.inline-form input[type="text"]:not([inputmode]) { flex: 1 1 100%; }
.inline-form .primary { min-height: 46px; }
.missing-row { display: grid; grid-template-columns: 40px 1fr minmax(120px, 42%); align-items: center; gap: 10px; padding: 10px 12px; }
.missing-row .main { min-width: 0; }
.missing-row .desc { font-weight: var(--w-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.missing-row .sub { font-size: 12px; color: var(--muted); }
.missing-row select { min-height: 44px; font-size: 16px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); padding: 6px 8px; min-width: 0; }
.missing-row .mini { grid-column: 3; justify-self: end; }
.card-row { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 8px; padding: 12px; }
.card-row .desc { grid-column: 1 / -1; font-weight: var(--w-medium); }
.card-row label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.card-row input { width: 84px; flex: none; min-width: 84px; min-height: 44px; font-size: 16px; text-align: center; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text); }
.card-row .sub { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* גרסה 11.1: בחירה מרובה - עדכון אמצעי תשלום לכמה הוצאות יחד */
.check-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; min-height: 56px; cursor: pointer; }
.check-row input[type="checkbox"], .check-all input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.check-row .main { min-width: 0; }
.check-row .desc { font-weight: var(--w-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-row .sub { font-size: 12px; color: var(--muted); }
.check-row .amount { font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.bulk-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bulk-inline .check-all { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; }
.bulk-inline select { flex: 1 1 160px; min-height: 46px; font-size: 16px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); padding: 6px 10px; min-width: 0; }
.bulk-inline .primary { min-height: 46px; }
.bulk-bar {
  position: fixed; inset-inline: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 7;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px;
  background: var(--surface); border-top: 1px solid var(--line);
}
.bulk-bar .bulk-count { font-weight: var(--w-medium); flex: 1 1 100%; }
.bulk-bar select { flex: 1 1 160px; min-height: 46px; font-size: 16px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); padding: 6px 10px; min-width: 0; }
.bulk-bar .primary { min-height: 46px; }
body.has-bulk-bar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 130px); }
.xtable tbody tr.selected { background: var(--accent-soft); }
.tick { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-inline-end: 6px; border: 2px solid var(--border); border-radius: 6px; font-size: 13px; font-weight: var(--w-medium); vertical-align: middle; }
.tick.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#select-mode-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* גרסה 10: סוג הכנסה - משכורת / הכנסה אחרת */
fieldset.kind-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border: 0; margin: 0 0 12px; padding: 3px; background: var(--surface-2); border-radius: 12px; }
fieldset.kind-choice label { position: relative; display: block; margin: 0; padding: 0; }
fieldset.kind-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
fieldset.kind-choice span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; font-weight: var(--w-medium); color: var(--muted); font-size: 16px;
}
fieldset.kind-choice input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
fieldset.kind-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
#income-add-dialog .add-form { padding: 0; box-shadow: none; background: none; }
#income-counted { color: var(--accent); font-weight: var(--w-medium); }
.details-list { max-height: 55dvh; overflow-y: auto; margin-bottom: 12px; }
.switch-field { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; color: var(--text); }
.switch-field input, .add-form .switch-field input {
  width: 22px; height: 22px; min-height: 0; padding: 0; border: 0; flex: none; accent-color: var(--accent); margin: 0;
}
.sheet .switch-field { flex-direction: row; margin-bottom: 8px; }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: var(--w-medium); font-size: 14px; padding: 8px 4px; min-height: 44px; }

/* תקציב: ירוק - בתקציב, כתום - מעל 80%, אדום - חריגה */
.bar-row.budget.warn .bar-fill { background: var(--warn-bar); }
.bar-row.budget.over .bar-fill { background: var(--over); }
.bar-row.budget.none .bar-fill { background: var(--muted); opacity: .45; }
.bar-row .pct.over { color: var(--over); font-weight: var(--w-medium); }
.bar-row .pct.warn { color: var(--warn); }
.bar-row .amount .of { font-size: 12px; color: var(--muted); font-weight: 400; }

.item.pending { background: var(--warn-soft); }
.item.pending.later { background: var(--surface); }
.item .sub.match { color: var(--accent); white-space: normal; }
#confirm-text { white-space: pre-line; }
.item.static { cursor: default; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: var(--w-medium); }
.amount.income { color: var(--income); }

/* מסך ההוצאות: טבלה / לפי ימים */
.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 12px; padding: 3px; }
.segmented button { border: 0; background: none; border-radius: 10px; min-height: 40px; font-weight: var(--w-medium); color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* תקופת חיוב (חשמל) */
fieldset.period { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.period legend { padding: 0; margin-bottom: 6px; }
.period-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.period-inputs label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }

/* ניהול: עריכת תקציב בשורה */
.budget-row { display: grid; grid-template-columns: 40px 1fr 118px; align-items: center; gap: 10px; padding: 10px 14px; }
.budget-row .main { min-width: 0; }
.budget-row .desc { font-weight: var(--w-medium); }
.budget-row .sub { font-size: 12px; color: var(--muted); }
.budget-row.over .sub { color: var(--over); font-weight: var(--w-medium); }
.budget-field { position: relative; display: block; }
.budget-input {
  width: 100%; min-height: 44px; font-size: 17px; padding: 8px 30px 8px 10px; direction: ltr; text-align: right;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); font-variant-numeric: tabular-nums;
}
.budget-field .currency { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.recurring-row { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 4px 12px; padding: 12px 14px; }
.recurring-row.paused { opacity: .65; }
.recurring-row .main { min-width: 0; }
.recurring-row .desc { font-weight: var(--w-medium); }
.recurring-row .sub { font-size: 13px; color: var(--muted); }
.actions-inline { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; }
.mini { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; min-height: 36px; padding: 4px 12px; font-size: 14px; }
.danger-text { color: var(--danger); }
.secondary-btn {
  width: 100%; min-height: 50px; border: 1.5px dashed var(--accent); border-radius: 14px; background: none; color: var(--accent); font-weight: var(--w-medium);
}
fieldset.choice { border: 1px solid var(--border); border-radius: 12px; margin: 0 0 12px; padding: 8px 12px; }
fieldset.choice legend { font-size: 14px; color: var(--muted); padding: 0 4px; }
fieldset.choice label { flex-direction: row; align-items: center; gap: 8px; margin: 0; padding: 8px 0; color: var(--text); font-size: 16px; }
fieldset.choice input { width: auto; }

/* טלפון: הקטגוריה עוברת לשורה מתחת לתיאור, כדי שהטבלה לא תצטרך גלילה לצדדים */
@media (max-width: 560px) {
  .xtable { font-size: 14px; }
  .xtable th, .xtable td { padding: 10px 6px; }
  .col-cat { display: none; }
  .xtable .cat-inline { display: block; }
  .col-amount { width: 84px; }
  .col-who { width: 52px; }
}

/* ---- tab bar ---- */
.tabbar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--border);
}
.tabbar button {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; color: var(--muted);
}
.tabbar button span:not(.plus) { font-size: var(--fs-xs); line-height: 1.2; }
.tabbar button[aria-current="page"] { color: var(--accent); font-weight: var(--w-medium); }


/* ---- dialogs (bottom sheets) ---- */
.sheet {
  border: 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); width: 100%; max-width: 560px;
  margin: auto auto 0; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--text);
}
@media (min-width: 640px) { .sheet { margin: auto; border-radius: 20px; } }
.sheet::backdrop { background: rgb(0 0 0 / 40%); }
.sheet h2 { margin: 0 0 12px; font-size: 19px; }
.sheet label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); margin-bottom: 12px; flex: 1; }
.sheet input, .sheet select {
  font-size: 17px; color: var(--text); padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); width: 100%;
}
.sheet .row { display: flex; gap: 10px; }
.sheet .row label { min-width: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.actions button { min-height: 48px; border-radius: 14px; padding: 0 16px; border: 1px solid var(--border); background: var(--surface-2); }
.actions .primary { flex: 1; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: var(--w-medium); }
.actions .danger { color: var(--danger); margin-inline-start: auto; }
.meta { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.form-error { color: var(--danger); font-size: 14px; margin: 0 0 8px; }
.pre { white-space: pre-wrap; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.who-list { display: flex; flex-direction: column; gap: 8px; }
.who-list button, .who-list .who-link {
  min-height: 52px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2);
  font-size: 17px; font-weight: var(--w-medium); color: var(--text);
}
.who-list .who-link { display: grid; place-items: center; text-decoration: none; color: var(--danger); }
.who-list .danger-text { color: var(--danger); }

/* ---- auth screen (passkey) ---- */
.auth-screen {
  position: fixed; inset: 0; z-index: 30; background: var(--bg);
  display: grid; place-items: center; padding: calc(env(safe-area-inset-top) + 24px) 16px calc(env(safe-area-inset-bottom) + 24px);
  overflow-y: auto;
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow);
  padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
}
.auth-card img { border-radius: 18px; }
.auth-card h1 { margin: 0; font-size: 26px; }
.auth-text { margin: 0; color: var(--text); font-size: 16px; }
.auth-device { display: flex; flex-direction: column; gap: 4px; width: 100%; font-size: 14px; color: var(--muted); text-align: start; }
.auth-device input {
  font-size: 17px; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text);
}
.auth-btn { width: 100%; min-height: 54px; font-size: 18px; }
.auth-msg { margin: 0; min-height: 22px; color: var(--danger); font-size: 15px; }
.auth-msg.ok { color: var(--accent); }
.auth-foot { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---- toast ---- */
.toast {
  position: fixed; inset-inline: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); z-index: 10;
  max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: var(--c-ink); color: var(--c-white); border-radius: var(--r-btn); padding: 12px 14px;
}
.toast span { flex: 1; min-width: 0; }
.toast button { border: 0; background: none; color: #7fe0bd; font-weight: var(--w-medium); padding: 4px 6px; }

/* ---- עו"ש (שלב 2): מצב בבית, מסך עו"ש, התאמת חיובים ---- */
.chip { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: var(--w-medium); background: var(--surface-2); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.chip.ok { background: var(--accent-soft); color: var(--accent); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.bank-home { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.bank-home-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.bank-home-head h2 { margin: 0; font-size: 17px; }
.bank-home-main .label { color: var(--muted); font-size: 13px; }
.bank-home-main .value, #bank-summary .big { font-size: 28px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.bank-home-main .value.neg, #bank-summary .big.neg, .foot-row.neg strong { color: var(--danger); }
.bank-home-main .value.muted, #bank-summary .big.muted { color: var(--muted); font-size: 18px; }
/* יתרה לא מאומתת: מסומנת בקו מקווקו - לא נראית כמו "היתרה בבנק" */
.unverified { text-decoration: underline dotted var(--warn); text-underline-offset: 6px; }
.bank-note.gap { color: var(--danger); }
.bank-rows.compact { font-size: 13px; }
.bank-rows .income { color: var(--accent); }
.bank-home .secondary-btn { margin: 2px 0 0; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.view-title { margin: 0; font-size: 22px; }
details.bank-block { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 14px; margin: 14px 0; }
details.bank-block summary { font-weight: var(--w-medium); padding: 12px 0; min-height: 44px; cursor: pointer; }
details.bank-block[open] { padding-bottom: 12px; }
details.bank-block .list { box-shadow: none; margin-top: 8px; }
.ledger-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; }
.ledger-row .icon { width: 36px; height: 36px; font-size: 18px; }
.ledger-row .main { min-width: 0; }
.ledger-row .desc { font-weight: var(--w-medium); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-row .sub { font-size: 13px; color: var(--muted); }
.amount-col { text-align: end; }
.amount-col .amount { font-weight: var(--w-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount-col .amount.income { color: var(--accent); }
.amount-col .after { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bank-foot { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.foot-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.foot-row.warn { color: var(--warn); font-weight: var(--w-medium); }
.item.charge .sub { white-space: normal; }
.item.charge.gap .amount { color: var(--danger); }
.field-hint { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
/* ---- שלב 3: בית מפושט, סגירת חודש, תנועות עו"ש בלבד ---- */
.home-head { display: flex; align-items: center; gap: 8px; }
.home-head .month-nav { flex: 1; min-width: 0; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 0 14px; min-height: 44px; font-weight: var(--w-medium); font-size: 14px; white-space: nowrap; }
.chip-btn:active { background: var(--surface-2); }
#bank-calc { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
#bank-calc .big { font-size: 22px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
#bank-calc .big.neg { color: var(--danger); }
.close-entry { margin: 16px 0 4px; }
.close-status { border-radius: var(--radius); padding: 12px 14px; font-weight: var(--w-medium); margin: 4px 0 10px; background: var(--surface-2); color: var(--muted); }
.close-status.ok { background: var(--accent-soft); color: var(--accent); }
.close-status.warn { background: var(--warn-soft); color: var(--warn); }
.bank-rows dd.neg, .bank-rows dd.bad, .gap-val.bad { color: var(--danger); }
.gap-val.ok { color: var(--accent); }
.movement-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.movement-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.movement-form .field { margin: 0; }
.movement-form input[type="date"], .movement-form input[type="text"], .movement-form select { width: 100%; min-width: 0; }
.close-actions { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.close-actions .save-btn:disabled { opacity: .45; }
.item.check-item { grid-template-columns: 1fr auto; min-height: 48px; }
.item.check-item .main { white-space: normal; font-size: 14px; }.movement-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; }
.movement-row .icon { width: 36px; height: 36px; font-size: 18px; }
.movement-row .main { min-width: 0; }
.movement-row .desc { font-weight: var(--w-medium); overflow-wrap: anywhere; }
.movement-row .sub { font-size: 12px; color: var(--muted); }
.movement-row .link-btn { min-height: 36px; padding: 4px 0; font-size: 13px; }/* עו"ש בכחול: כפתור בבית + כותרת תכלת במסך העו"ש */
.home-head .chip-btn { background: var(--bank); color: var(--bank-ink); border-color: var(--bank); }
.home-head .chip-btn:active { filter: brightness(.92); background: var(--bank); }
.stats + .secondary-btn { margin-top: 12px; }
/* פירוט רכב: הוצאות קבועות של הרכב */
.vehicle-recurring { margin: -2px 0 12px; }
.vehicle-rec-title { margin: 0 4px 6px; font-size: 15px; color: var(--muted); }
.vehicle-rec-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.vehicle-rec-row .main { flex: 1; min-width: 0; }
.vehicle-rec-row .desc { font-weight: var(--w-medium); }
.vehicle-rec-row .sub { font-size: 13px; color: var(--muted); }
.rec-badge { flex: none; font-size: 12px; font-weight: var(--w-medium); border-radius: 999px; padding: 3px 9px; background: var(--border); color: var(--text); white-space: nowrap; }
.rec-badge.ok { background: var(--accent-soft); color: var(--accent); }
.rec-badge.wait { background: var(--warn-soft); color: var(--warn); }
/* דף "הוצאות": כפתור הוספת הוצאה מתחת לבחירת החודש */
.add-expense-btn { margin: 4px 0 12px; }

/* מסך העו"ש: "האם היתרה תואמת לבנק?" + "פירוט החישוב" */
.compare-card { gap: 8px; }
.compare-title { margin: 0; font-size: 17px; color: var(--bank); }
.compare-date { color: var(--muted); font-size: 13px; }
.compare-rows { font-size: 16px; gap: 6px 12px; }
.compare-rows dd { font-size: 18px; font-weight: var(--w-medium); }
.bank-rows dd.neg { color: var(--danger); }
.compare-sentence { margin: 2px 0 0; font-weight: var(--w-medium); font-size: 15px; }
.compare-sentence.gap { color: var(--warn); }
.compare-sentence.ok { color: var(--accent); }
.calc-details { border-top: 1px solid var(--border); margin-top: 4px; }
.calc-details summary { font-weight: var(--w-medium); color: var(--bank); padding: 10px 0; min-height: 44px; cursor: pointer; }
.calc-rows { font-size: 14px; }
.calc-rows .sub-row { font-size: 13px; color: var(--muted); font-weight: 500; }
.calc-rows dt.sub-row { padding-inline-start: 14px; }
.calc-rows .total-row { border-top: 1px solid var(--border); padding-top: 6px; font-weight: var(--w-medium); color: var(--text); }
/* ---- שלב 4: מסך "הוספה" עם שתי אפשרויות, טופס הוצאה קבועה, רשימת הקבועות ---- */
.add-choice { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.choice-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; min-height: 64px; font: inherit; cursor: pointer; }
.choice-btn:active { background: var(--surface-2); }
.choice-btn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.choice-btn strong { display: block; font-size: 17px; }
.choice-sub { display: block; font-size: 13px; color: var(--muted); }
.choice-icon { font-size: 26px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; flex: none; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check-line input { width: 20px; height: 20px; }
.recurring-row .sub.when { color: var(--text); }
.recurring-row.ended { opacity: .6; }
.danger-bg { background: var(--danger) !important; color: #fff !important; }
/* בחלון ההוצאה הקבועה: תיבת סימון באותה שורה עם הטקסט */
.sheet label.check-line { flex-direction: row; align-items: center; gap: 10px; color: var(--text); }
.sheet label.check-line input { width: 22px; height: 22px; min-height: 0; flex: none; margin: 0; }

/* מסך העו"ש - שלוש השורות למעלה */
#bank-summary { gap: 10px; }
#bank-summary .top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#bank-summary .top-label { font-weight: var(--w-medium); font-size: 15px; }
#bank-summary .top-sub { font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 2px; }
#bank-summary .top-value { font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#bank-summary .top-value.neg { color: var(--danger); }
#bank-summary .big { white-space: nowrap; }
#bank-summary .top-flags { display: flex; flex-wrap: wrap; gap: 6px; }
#bank-summary .top-charges { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px 0; }
#bank-summary .top-charges > summary { list-style: none; cursor: pointer; }
#bank-summary .top-charges > summary::-webkit-details-marker { display: none; }
#bank-summary .top-charges[open] > summary .top-sub { color: var(--bank); }
#bank-summary .top-charge-list { margin-top: 8px; box-shadow: none; }

/* "הצג עוד" מתחת לרשימות המקוצרות בדף "הוצאות" */
.more-btn { margin: 10px 0 4px; min-height: 44px; }

/* ניהול ← תקציב: "שינוי שם" מתחת לשם הקטגוריה */
.budget-row .rename-btn { display: block; min-height: 32px; padding: 2px 0; font-size: 13px; }

/* "איך הוצאנו" בפירוט ההוצאות של החודש */
.how-spent { display: block; padding: 10px 12px; background: var(--accent-soft); }
.how-spent .how-title { font-weight: var(--w-medium); font-size: 14px; margin-bottom: 4px; }
.how-rows { font-size: 14px; gap: 2px 12px; }

/* פייבוקס: "מאיפה שולם?" מתחת לאמצעי התשלום */
.paybox-from { display: flex; flex-direction: column; gap: 6px; margin: -4px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.paybox-from .field-label { font-size: 14px; color: var(--text); font-weight: var(--w-medium); }

/* עריכת הוצאה: מזדמנת / קבועה */
.kind-switch { margin-bottom: 10px; }
.kind-switch label { flex: 1; display: flex; }
.kind-switch input { position: absolute; opacity: 0; pointer-events: none; }
.kind-switch span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 10px 8px; border-radius: 10px; font-weight: var(--w-medium); color: var(--muted); cursor: pointer; }
.kind-switch input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.kind-switch input:focus-visible + span { outline: 2px solid var(--accent); }
.kind-box { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.kind-box .meta { margin-top: 0; }
.kind-box fieldset.choice { background: var(--surface); }


/* ===================== רכיבי בסיס (עיצוב מחדש) ===================== */

/* אייקונים: Phosphor (fill) מקובץ אחד, בצבע הטקסט */
.ic { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -0.2em; flex: none; }
/* אייקון קטגוריה / אמצעי תשלום: ריבוע מעוגל ירוק בהיר */
.icon {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px;
  border-radius: var(--r-tile); background: var(--c-green-soft); color: var(--c-green); font-size: 20px; line-height: 1;
}
.icon .ic { width: 22px; height: 22px; vertical-align: 0; }
.icon.solid { background: var(--c-green); color: var(--c-white); }

/* סכומים: בידוד LTR, ספרות ברוחב אחיד, אגורות קטנות ומעומעמות */
.amt { unicode-bidi: isolate; direction: ltr; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amt .ag { font-size: 0.62em; color: var(--c-ink-2); font-weight: var(--w-regular); letter-spacing: 0; }
.amt .cur { font-size: 0.8em; }
.hero-amount { font-size: var(--fs-hero); font-weight: var(--w-medium); letter-spacing: -1.5px; color: var(--c-green); line-height: 1.1; }
.hero-amount .ag { font-size: 0.45em; letter-spacing: 0; }

/* כרטיס: לבן על שמנת, בלי צל */
.card { background: var(--c-white); border-radius: var(--radius); padding: var(--sp-4); }
.card-title { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }

/* רשימה: שורות נקיות בתוך כרטיס, קו הפרדה דק */
.list, .rows { list-style: none; margin: 0; padding: 0; background: var(--c-white); border-radius: var(--radius); overflow: hidden; }
.list > li + li, .rows > li + li { border-top: 1px solid var(--c-line); }
.row { display: flex; align-items: center; gap: var(--sp-3); min-height: 56px; padding: var(--sp-2) var(--sp-4); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: var(--w-regular); }
.row .sub, .sub { font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.row .amount { font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }

/* צ'יפ */
.chip-pick {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--c-border); border-radius: var(--r-chip); background: var(--c-white); color: var(--c-ink);
  font-size: var(--fs-sm); font-weight: var(--w-regular); white-space: nowrap;
}
.chip-pick[aria-pressed="true"] { background: var(--c-green); border-color: var(--c-green); color: var(--c-white); }

/* כפתורים: ראשי אחד לכל היותר במסך; שאר - משני או פעולת טקסט */
.btn-primary, .primary {
  min-height: var(--tap); padding: 0 var(--sp-5); border: 0; border-radius: var(--r-btn);
  background: var(--c-green); color: var(--c-white); font-weight: var(--w-medium);
}
.btn-secondary {
  min-height: var(--tap); padding: 0 var(--sp-4); border: 1px solid var(--c-border); border-radius: var(--r-btn);
  background: var(--c-white); color: var(--c-green); font-weight: var(--w-medium);
}
.btn-text, .link-btn { min-height: var(--tap); padding: 0 var(--sp-1); border: 0; background: none; color: var(--c-green); font-weight: var(--w-medium); }
.btn-block { width: 100%; }

/* חלונית תחתונה: ידית, רקע #FBF8F2, פינות עליונות 22px */
dialog.sheet { background: var(--c-sheet); border-radius: var(--r-sheet) var(--r-sheet) 0 0; box-shadow: none; }
dialog.sheet::before {
  content: ''; display: block; width: 40px; height: 4px; margin: 0 auto var(--sp-3); border-radius: 2px; background: var(--c-border);
}
dialog.sheet::backdrop { background: rgb(22 36 31 / 35%); }

/* סרגל תחתון - אייקונים */
.tabbar button .ic { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--c-green); }

/* מצב תקציב */
.st-ok { color: var(--c-ok); }
.st-near { color: var(--c-near); }
.st-over { color: var(--c-over); }

.ic:not(:last-child) { margin-inline-end: 0.3em; }
.icon .ic, .tabbar .ic { margin: 0; }


/* ===================== שלב 2: ניווט וחלונית ההוספה ===================== */

/* כותרת: בורר חודש, אייקון משתמש */
.appbar { display: flex; align-items: center; gap: var(--sp-2); padding: calc(env(safe-area-inset-top) + var(--sp-2)) var(--gutter) var(--sp-2); background: var(--bg); border: 0; }
.appbar .app-month { flex: 1; min-width: 0; }
.appbar .month-nav button { width: var(--tap); height: var(--tap); border: 0; background: none; color: var(--c-green); font-size: 22px; border-radius: var(--r-btn); }
.appbar .month-nav .label { font-size: var(--fs-lg); font-weight: var(--w-medium); }
.who { display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: none; color: var(--c-ink-2); }
.who .ic { width: 28px; height: 28px; margin: 0; }
body[data-view="bank"] .appbar .app-month, body[data-view="close"] .appbar .app-month { visibility: hidden; }

/* סרגל תחתון: בית · תנועות · [+] · סיכומים · ניהול */
.tabbar { grid-template-columns: repeat(5, 1fr); align-items: center; }
.tabbar button { color: var(--c-ink-2); font-weight: var(--w-regular); font-size: var(--fs-xs); min-height: var(--tap); }
.tabbar button[aria-current="page"] { color: var(--c-green); font-weight: var(--w-medium); }
.tabbar .tab-add { display: grid; place-items: center; }
.tabbar .tab-add .plus { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--c-green); color: var(--c-white); }
.tabbar .tab-add .plus .ic { width: 26px; height: 26px; }

/* תנועות: מתג הוצאות / הכנסות */
.flow-switch { margin: 0 0 var(--sp-3); }

/* מצב ריק - הזמנה */
.empty-state { display: grid; justify-items: center; gap: var(--sp-2); text-align: center; padding: var(--sp-6) var(--sp-4); }
.empty-state h2 { margin: 0; font-size: var(--fs-lg); }
.empty-state .sub { margin: 0; }

/* חלונית תחתונה */
.sheet-title { margin: 0 0 var(--sp-3); font-size: var(--fs-lg); font-weight: var(--w-medium); text-align: center; }
.add-choices .row { width: 100%; border: 0; background: none; text-align: start; min-height: 64px; }
.add-choices .title { display: block; font-size: var(--fs-md); font-weight: var(--w-medium); }
.add-choices .sub { display: block; }
.add-choices .chev { color: var(--c-ink-2); }

/* הוצאה חדשה: סכום גדול, מקלדת, צ'יפים */
.amount-sheet form { display: flex; flex-direction: column; gap: var(--sp-2); }
.xs-amount { text-align: center; padding: var(--sp-2) 0 var(--sp-1); }
.xs-amount.empty { color: var(--c-ink-2); }
.keypad { direction: ltr; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.keypad button {
  min-height: 48px; border: 0; border-radius: var(--r-btn); background: var(--c-white); color: var(--c-ink);
  font-size: 22px; font-weight: var(--w-regular); font-variant-numeric: tabular-nums;
}
.keypad button:active { background: var(--c-green-soft); }
.keypad [data-key="back"] .ic { transform: rotate(-90deg); width: 22px; height: 22px; }
.chips-label { margin-top: var(--sp-2); font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.chip-row { display: flex; gap: var(--sp-2); overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip-pick { min-height: var(--tap); }
.chip-row .chip-pick .ic { width: 18px; height: 18px; }
.chip-wrap.sub-row { padding: var(--sp-2); border-radius: var(--r-btn); background: var(--c-green-soft); align-items: center; }
.chip-wrap.sub-row .sub-q { font-size: var(--fs-sm); color: var(--c-green); white-space: nowrap; }
details.more { border-top: 1px solid var(--c-line); padding-top: var(--sp-2); }
details.more > summary { min-height: var(--tap); display: flex; align-items: center; color: var(--c-green); font-weight: var(--w-medium); cursor: pointer; }
details.more .field { display: flex; flex-direction: column; gap: var(--sp-1); margin-bottom: var(--sp-2); }
details.more input, details.more select { min-height: var(--tap); border: 1px solid var(--c-border); border-radius: var(--r-btn); background: var(--c-white); padding: 0 var(--sp-3); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.btn-block { margin-top: var(--sp-2); min-height: 52px; font-size: var(--fs-lg); }

/* הוצאה קבועה / הכנסה: הסכום גדול למעלה */
.amount-hero { display: block; text-align: center; margin: 0 0 var(--sp-3); }
.amount-hero input {
  width: 100%; border: 0; background: none; text-align: center; color: var(--c-green);
  font-size: var(--fs-hero); font-weight: var(--w-medium); letter-spacing: -1.5px; font-variant-numeric: tabular-nums; direction: ltr;
}
.amount-hero input::placeholder { color: var(--c-ink-2); }
.amount-hero input:focus { outline: none; border-bottom: 2px solid var(--c-green-soft); }


/* ===================== שלב 3: מסך הבית ===================== */
#home { display: flex; flex-direction: column; gap: var(--sp-3); }
.hero-card { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-2); width: 100%; border: 0; text-align: start; padding: var(--sp-5) var(--sp-4); }
.hero-label { font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.hero-card .hero-amount { text-align: start; }
.hero-amount.over { color: var(--c-over); }
.hero-sub { font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.hero-sub.small { font-size: var(--fs-xs); }
.progress { height: 6px; border-radius: 3px; background: var(--c-line); overflow: hidden; }
.progress .fill { height: 100%; border-radius: 3px; background: var(--c-ok); }
.progress.near .fill { background: var(--c-near); }
.progress.over .fill { background: var(--c-over-bar); }

.pending-row { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 56px; border: 0; padding: var(--sp-2) var(--sp-4); text-align: start; color: var(--c-ink); }
.pending-row .main { flex: 1; font-weight: var(--w-medium); }
.pending-row .chev, .cat-row .chev { color: var(--c-ink-2); }

#home .section-head { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-2); }
#home .section-title { margin: var(--sp-2) var(--sp-1) 0; font-size: var(--fs-sm); font-weight: var(--w-regular); color: var(--c-ink-2); }
#home .section-head .section-title { margin: 0 var(--sp-1); }
.cat-row { width: 100%; border: 0; background: none; text-align: start; padding: var(--sp-3) var(--sp-4); }
.cat-row .main { display: flex; flex-direction: column; gap: 6px; }
.cat-row .line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.cat-row .title { font-weight: var(--w-regular); }
.cat-row .status { font-size: var(--fs-sm); font-weight: var(--w-medium); color: var(--c-ok); white-space: nowrap; }
.cat-row .status.near { color: var(--c-near); }
.cat-row .status.over { color: var(--c-over); }
.cat-row .status.none { color: var(--c-ink); }
.cat-row .sub { font-size: var(--fs-xs); }
#home .vehicle-rows { list-style: none; margin: 0; padding: 0 calc(var(--sp-4) + 40px + var(--sp-3)) var(--sp-2) var(--sp-4); }
#home .vehicle-row { display: flex; justify-content: space-between; width: 100%; min-height: var(--tap); border: 0; background: none; font-size: var(--fs-sm); color: var(--c-ink-2); }

.prev-card { display: flex; flex-direction: column; gap: var(--sp-1); }
.prev-amount { font-size: var(--fs-xl); font-weight: var(--w-medium); }
.prev-amount.pos { color: var(--c-green); }
.prev-amount.neg { color: var(--c-over); }
.prev-wait { font-size: var(--fs-md); font-weight: var(--w-medium); color: var(--c-ink); }
.prev-card .partial { font-size: var(--fs-sm); color: var(--c-near); }

/* חלונית אישור */
#approve-sheet #approve-all { margin: var(--sp-3) 0 0; }
.approve-row { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); }
.approve-row .main { display: flex; flex-direction: column; min-width: 0; }
.approve-row .title { font-weight: var(--w-medium); }
.approve-row .match { color: var(--c-green); }
.approve-row .act { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--sp-2); justify-content: flex-end; }
.approve-row .act .amount { margin-inline-end: auto; font-weight: var(--w-medium); font-size: var(--fs-lg); }
.approve-row .amount-input { margin-inline-end: auto; width: 120px; min-height: var(--tap); border: 1px solid var(--c-border); border-radius: var(--r-btn); padding: 0 var(--sp-3); font-size: var(--fs-lg); direction: ltr; text-align: center; background: var(--c-white); }
.approve-row .amount-input[aria-invalid="true"] { border-color: var(--c-over); }
.btn-secondary.small, .btn-text.small { min-height: var(--tap); font-size: var(--fs-sm); }
.approve-hint { margin-top: var(--sp-3); }


/* ===================== שלב 4: תנועות ===================== */
.tx-head { display: flex; align-items: center; gap: var(--sp-1); margin: var(--sp-1) 0 var(--sp-3); }
.tx-heading { flex: 1; min-width: 0; }
.tx-title { margin: 0; font-size: var(--fs-xl); font-weight: var(--w-medium); }
.tx-sub { font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.icon-btn { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: var(--r-btn); background: none; color: var(--c-ink); }
.icon-btn .ic { width: 22px; height: 22px; margin: 0; }
.icon-btn[aria-expanded="true"] { background: var(--c-white); color: var(--c-green); }
.menu-wrap { position: relative; }
.menu { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--r-btn); padding: var(--sp-1); }
.menu button { display: flex; align-items: center; gap: var(--sp-2); width: 100%; min-height: var(--tap); padding: 0 var(--sp-3); border: 0; border-radius: 8px; background: none; text-align: start; color: var(--c-ink); }
.menu button:active, .menu button[aria-pressed="true"] { background: var(--c-green-soft); color: var(--c-green); }
.tx-search { width: 100%; min-height: var(--tap); margin-bottom: var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--r-btn); background: var(--c-white); padding: 0 var(--sp-3); }
.tx-filters { margin-bottom: var(--sp-2); }
.tx-filters .chip-pick .clear { width: 14px; height: 14px; margin: 0 4px 0 0; }
.segmented.three { grid-template-columns: repeat(3, 1fr); margin-bottom: var(--sp-3); }
.tx-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.tx-day .day-head { display: flex; justify-content: space-between; padding: 0 var(--sp-1) var(--sp-1); font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.tx-day .day-total { font-variant-numeric: tabular-nums; }
.tx-row { width: 100%; border: 0; background: none; text-align: start; padding: var(--sp-2) var(--sp-4); min-height: 60px; }
.tx-row .main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.tx-row .title { font-weight: var(--w-regular); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-row .title .rec { width: 14px; height: 14px; color: var(--c-ink-2); }
.details { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: var(--fs-xs); font-weight: var(--w-light); color: var(--c-ink-2); }
.details > span { flex: none; display: inline-flex; align-items: center; gap: 3px; }
.details .ic { width: 13px; height: 13px; margin: 0; }
.details .warn { color: var(--c-near); }
.details.extra { color: var(--c-green); }
.tx-row .amount { flex: none; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.tx-row .amount.income { color: var(--c-green); }
.tx-row.selected { background: var(--c-green-soft); }
.tx-group { padding: 0; overflow: hidden; }
.tx-group .group-head { width: 100%; border: 0; background: none; text-align: start; min-height: 64px; padding: var(--sp-2) var(--sp-4); }
.tx-group .group-head .title { font-weight: var(--w-medium); }
.tx-group .group-head .amount { font-weight: var(--w-medium); }
.tx-group .chev { color: var(--c-ink-2); }
.tx-group .rows.inner { border-radius: 0; border-top: 1px solid var(--c-line); }
.tx-group .more-in-group { width: 100%; border-top: 1px solid var(--c-line); font-size: var(--fs-sm); }
#income-list .empty-state, #tx-list .empty-state { display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-5); }

/* תיקונים אחרי שלב 3 */
.progress.paid .fill { background: var(--c-ok); }
.cat-row .status.paid { color: var(--c-ok); }
.cat-row .status { font-weight: var(--w-regular); }
.cat-row .line .title { flex: 1; min-width: 0; }
#home .section-head .btn-text { font-size: var(--fs-sm); font-weight: var(--w-regular); min-height: var(--tap); }
#home .vehicle-row .veh { display: inline-flex; align-items: center; gap: var(--sp-2); }
#home .vehicle-row .veh .ic { width: 16px; height: 16px; margin: 0; }
#home .vehicle-rows { padding-inline-start: calc(var(--sp-4) + 40px + var(--sp-3)); padding-inline-end: var(--sp-4); }
.more-row { width: 100%; border: 0; background: none; text-align: start; color: var(--c-green); font-size: var(--fs-sm); min-height: var(--tap); }
.chev .ic { width: 18px; height: 18px; margin: 0; }
/* ₪ ליד המספר הגדול: כ-60% ובצבע המשני, כמו האגורות */
.hero-amount .cur { font-size: 0.6em; color: var(--c-ink-2); font-weight: var(--w-regular); }
/* שורת פרטים אחת: מקצרים קודם את שם אמצעי התשלום (…), לא את מי שהזין */
.details .method { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.details .method .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details .by { flex: none; padding-inline-end: 2px; }


/* תיקון: חלונית ההוספה לפי התמונה - צ'יפ אמצעי תשלום למעלה, ₪ לפני הסכום, קטגוריות מעל המקלדת */
.xs-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.xs-title { margin: 0; font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.xs-method-btn { min-height: 36px; background: var(--c-green-soft); border-color: var(--c-green-soft); color: var(--c-green); font-weight: var(--w-medium); }
.xs-method-btn.empty { background: var(--c-white); border-color: var(--c-border); color: var(--c-ink-2); }
.xs-method-btn .ic { width: 16px; height: 16px; margin: 0; }
.xs-method-btn .ic.down { width: 14px; height: 14px; }
.xs-method-panel { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-btn); background: var(--c-white); border: 1px solid var(--c-border); }
.chip-wrap { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip-wrap .chip-pick .ic { width: 16px; height: 16px; }
.xs-cats { justify-content: center; margin-bottom: var(--sp-2); }
.xs-amount .cur { font-size: 0.6em; color: var(--c-ink-2); font-weight: var(--w-regular); margin-inline-end: 2px; }
.keypad [data-key="back"] { font-size: 22px; }

/* שלב 5: סיכומים */
#summary { display: flex; flex-direction: column; gap: var(--sp-2); }
#summary .section-title { margin: var(--sp-3) var(--sp-1) 0; font-size: var(--fs-sm); font-weight: var(--w-regular); color: var(--c-ink-2); }
#summary .row { padding: var(--sp-2) var(--sp-4); min-height: 60px; }
#summary .row .main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#summary .row .amount { flex: none; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
#summary .amount.pos { color: var(--c-green); }
#summary .amount.neg, #summary .delta.up { color: var(--c-over); }
#summary .delta.down { color: var(--c-green); }
#summary .delta { font-size: var(--fs-sm); }
.sum-parts { list-style: none; margin: 0; padding: 0 calc(var(--sp-4) + 40px + var(--sp-3)) var(--sp-2) var(--sp-4); }
.sum-parts li { display: flex; justify-content: space-between; font-size: var(--fs-xs); font-weight: var(--w-light); color: var(--c-ink-2); min-height: 24px; align-items: center; }

/* תנועות - התאמות */
/* מתג הוצאות / הכנסות: לשוניות טקסט עם קו תחתון ירוק (שונה ממתג התצוגה) */
.flow-switch { display: flex; gap: var(--sp-5); margin: 0 0 var(--sp-1); border-bottom: 1px solid var(--c-line); }
.flow-switch button { min-height: var(--tap); padding: 0 var(--sp-1); border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--c-ink-2); font-size: var(--fs-md); font-weight: var(--w-regular); border-radius: 0; }
.flow-switch button[aria-pressed="true"] { color: var(--c-green); border-bottom-color: var(--c-green); font-weight: var(--w-medium); box-shadow: none; }
.tx-head { margin: 0 0 var(--sp-2); }
.tx-sub { font-size: var(--fs-sm); }
/* אייקוני חיפוש ותפריט: דקים וקטנים */
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn { color: var(--c-ink-2); }
/* צ'יפ סינון */
.tx-filters .chip-pick[aria-pressed="true"] { min-height: 32px; padding: 4px 12px; background: var(--c-green-soft); border: 0; color: var(--c-green); }
.tx-filters .chip-pick .clear { width: 12px; height: 12px; margin-inline-start: 6px; border: 0; }
/* שורות צפופות יותר */
.tx-row { min-height: 52px; padding: 6px var(--sp-4); }
.tx-row .main { gap: 0; }
.tx-row .title { line-height: 1.35; }
.tx-row .details { line-height: 1.35; }


/* תיקונים קטנים */
.more-link { display: block; margin: var(--sp-2) auto 0; min-height: var(--tap); font-size: var(--fs-sm); }
.details .rec .ic { width: 12px; height: 12px; }
details.more > summary { list-style: none; gap: var(--sp-1); }
details.more > summary::-webkit-details-marker { display: none; }
details.more .sum-chev { width: 14px; height: 14px; transition: transform .2s ease; }
details.more[open] .sum-chev { transform: rotate(180deg); }

/* שלב 6: ניהול */
#view-manage { display: flex; flex-direction: column; gap: var(--sp-2); }
.m-head { display: flex; align-items: center; justify-content: space-between; margin-top: var(--sp-3); }
.m-head .section-title { margin: 0 var(--sp-1); font-size: var(--fs-sm); font-weight: var(--w-regular); color: var(--c-ink-2); }
.m-head .btn-text { font-size: var(--fs-sm); font-weight: var(--w-regular); }
.m-head .btn-text[aria-pressed="true"] { font-weight: var(--w-medium); }
.budget-row { min-height: 60px; }
.budget-row .main, .rec-row .main, .nav-row .main { display: flex; flex-direction: column; min-width: 0; gap: 0; }
.budget-row .title { font-weight: var(--w-regular); }
.budget-row.over .details { color: var(--c-over); }
.rename-main { flex: 1; border: 0; background: none; text-align: start; padding: 0; min-height: var(--tap); color: var(--c-ink); }
.rename-main .pen { width: 14px; height: 14px; color: var(--c-green); margin-inline-start: 6px; }
.budget-row .budget-field { display: flex; align-items: center; gap: 4px; flex: none; width: 112px; min-height: 40px; padding: 0 var(--sp-2); border: 1px solid var(--c-line); border-radius: var(--r-btn); background: var(--c-sheet); }
.budget-row .budget-field:focus-within { border-color: var(--c-green); background: var(--c-white); }
.budget-row .budget-input { width: 100%; min-width: 0; border: 0; background: none; padding: 0; text-align: start; direction: ltr; font-variant-numeric: tabular-nums; font-size: var(--fs-md); }
.budget-row .budget-input:focus { outline: none; }
.budget-row .currency { color: var(--c-ink-2); font-size: var(--fs-sm); }
.rec-row, .nav-row { width: 100%; border: 0; background: none; text-align: start; min-height: 60px; padding: var(--sp-2) var(--sp-4); }
.rec-row .title, .nav-row .title { font-weight: var(--w-regular); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-row .amount { flex: none; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.rec-row.ended, .rec-row.paused { opacity: .6; }
.nav-row .chev { color: var(--c-ink-2); }
.stop-link { display: block; margin: var(--sp-2) auto 0; }
.rec-row .details.when { white-space: normal; overflow: visible; }
.rec-row .amount .approx { font-size: var(--fs-xs); font-weight: var(--w-light); color: var(--c-ink-2); }

/* סקירה לפני פרסום */
/* כותרת עמוד פנימי (עו"ש, סגירת חודש): חץ חזרה דק בצד ימין */
.page-head { display: flex; align-items: center; gap: var(--sp-1); min-height: var(--tap); margin: var(--sp-2) 0 var(--sp-3); }
.page-title { margin: 0; font-size: var(--fs-xl); font-weight: var(--w-medium); color: var(--c-ink); }
.back-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); margin-inline-start: -10px; border: 0; background: none; color: var(--c-ink); border-radius: 50%; }
.back-btn .ic { width: 22px; height: 22px; }
.back-btn:active { background: var(--c-green-soft); }
/* עו"ש: המספרים בצבע הטקסט - אדום רק ב"צפוי להישאר" */
#view-bank .neg, #view-bank .income, #view-bank .amount, #view-bank strong, #view-bank .foot-row.neg strong, #bank-summary .big.neg, #bank-calc .big.neg, #view-bank .bank-rows dd.neg { color: var(--c-ink); }
#bank-summary .top-left .top-value.neg { color: var(--c-over); }
/* "פירוט החישוב" ושאר הפתיחות במסכי העו"ש / סגירה: חץ דק במקום המשולש */
.calc-details > summary, details.bank-block > summary { list-style: none; display: flex; align-items: center; gap: 6px; }
.calc-details > summary::-webkit-details-marker, details.bank-block > summary::-webkit-details-marker { display: none; }
.calc-details > summary::after, details.bank-block > summary::after {
  content: ''; width: 14px; height: 14px; flex: none; background: currentColor; transition: transform .2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M48 96l80 80 80-80' fill='none' stroke='black' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M48 96l80 80 80-80' fill='none' stroke='black' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.calc-details[open] > summary::after, details.bank-block[open] > summary::after { transform: rotate(180deg); }
/* תיבות סימון ורדיו בירוק של האפליקציה */
input[type="checkbox"], input[type="radio"] { accent-color: var(--c-green); }
/* חלונית הוצאה קבועה */
.amount-hero { display: flex; justify-content: center; align-items: baseline; gap: 4px; }
.amount-hero input { width: auto; min-width: 2ch; max-width: 100%; padding: 0; }
.amount-hero .hero-cur { font-size: 26px; color: var(--c-ink-2); font-weight: var(--w-regular); }
.rf-field { margin-bottom: 12px; }
.rf-field .field-label { font-size: 14px; color: var(--c-ink-2); font-weight: var(--w-regular); }
.rf-field .chip-wrap.sub-row { margin-top: var(--sp-2); }
#recurring-dialog .stop-link, .stop-link.danger-text { color: var(--c-over); }
.sheet label.amount-hero { flex-direction: row; justify-content: center; align-items: baseline; gap: 6px; color: inherit; }
.rename-main { justify-content: center; }
#view-bank .chip.bad { background: var(--warn-soft); color: var(--warn); }

/* סגירת חודש והגדרות עו"ש: שדות בשפה החדשה */
.form-view :is(input:not([type="checkbox"]):not([type="radio"]), select) {
  width: 100%; min-width: 0; min-height: 46px; padding: 0 12px; font: inherit; font-size: 17px; color: var(--c-ink);
  background-color: var(--c-sheet); border: 1px solid var(--c-border); border-radius: 12px; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.form-view select.x, .form-view select {
  padding-inline-end: 36px; background-repeat: no-repeat; background-position: left 12px center; background-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M48 96l80 80 80-80' fill='none' stroke='%236A746F' stroke-width='18' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.form-view :is(input:not([type="checkbox"]):not([type="radio"]), select):focus { outline: none; border-color: var(--c-green); background-color: var(--c-white); }
.form-view .price-wrap input { padding-left: 36px; font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.form-view .price-wrap .currency { left: 12px; font-size: 16px; color: var(--c-ink-2); }
.form-view input[type="date"] { direction: ltr; text-align: right; }
.form-view .field { gap: 4px; }
.form-view .field-label { font-size: var(--fs-sm); font-weight: var(--w-regular); color: var(--c-ink-2); }
.form-view .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.form-view .primary { border-radius: 12px; }
/* "נכנס לחשבון / יצא מהחשבון" - כמו מתג התצוגה בתנועות */
.form-view fieldset.kind-choice { gap: 0; }
.form-view fieldset.kind-choice span { min-height: 40px; font-size: var(--fs-md); }
/* סגירה במצב לא זמין: ירוק בהיר עם טקסט ירוק (והכפתור עדיין חסום) */
.close-actions .save-btn:disabled { opacity: 1; background: var(--c-green-soft); color: var(--c-green); cursor: not-allowed; }

/* הגדרות עו"ש */
.set-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.set-list > li + li { border-top: 1px solid var(--c-line); }
.set-card-row { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3) 0; }
.set-row-head { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--w-medium); }
.set-row-head .ic { width: 18px; height: 18px; color: var(--c-green); }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-2); }
.set-row-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.set-row-foot .sub, .set-item .sub { font-size: var(--fs-xs); color: var(--c-ink-2); }
.set-row-foot .primary { min-height: 40px; padding: 0 16px; flex: none; }
.set-item { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) 0; }
.set-item .desc { font-weight: var(--w-medium); }
.set-list .empty { color: var(--c-ink-2); font-size: var(--fs-sm); padding: var(--sp-2) 0; }
.set-form { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); }
.form-view .check-row { padding: 10px 0; }
.form-view .check-all { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
#view-bank-settings .bank-block { background: var(--c-white); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-3); }
#view-bank-settings .bank-block h3 { margin: 0; font-size: var(--fs-md); font-weight: var(--w-medium); }
#view-bank-settings .bank-block .hint { margin: 0; font-size: var(--fs-sm); color: var(--c-ink-2); }

/* שלב 7: קטגוריה חדשה */
.newcat-icons-field { margin-bottom: 12px; }
.newcat-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: var(--sp-2); }
.icon-pick { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 52px; border: 1px solid var(--c-border); border-radius: 12px; background: var(--c-white); color: var(--c-ink); padding: 0; }
.icon-pick .ic { width: 22px; height: 22px; }
.icon-pick[aria-checked="true"] { background: var(--c-green); border-color: var(--c-green); color: var(--c-white); }
.budget-row .rename-wrap { flex-direction: row; align-items: center; gap: 2px; }
.budget-row .rename-wrap .rename-main { flex: 0 1 auto; min-width: 0; }
.budget-row .cat-delete { flex: none; width: 40px; height: 40px; color: var(--c-over); }
.budget-row .cat-delete .ic { width: 18px; height: 18px; }

/* שורת קטגוריות יציבה + רשימה מלאה בחלונית נפרדת */
.chip-pick .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row .chip-pick { max-width: calc(50% - var(--sp-1)); }
.catpick-sheet { max-height: 80vh; overflow-y: auto; }
.catpick-list { padding-bottom: var(--sp-3); }
/* אייקון שכבר בשימוש */
.icon-pick .used-tag { font-size: 9px; line-height: 1; color: var(--c-ink-2); }
.icon-pick.used .ic { opacity: .55; }
.icon-pick[aria-checked="true"] .used-tag { color: var(--c-white); }
.icon-pick[aria-checked="true"].used .ic { opacity: 1; }
/* תאריך ריק: "בחרו תאריך" */
.date-wrap { position: relative; display: block; width: 100%; }
.date-wrap > input { width: 100%; }
.date-wrap[data-empty] > input:not(:focus) { color: transparent; }
.date-wrap[data-empty]:not(:focus-within)::after {
  content: attr(data-ph); position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  color: var(--c-ink-2); pointer-events: none; font-size: var(--fs-md);
}

/* שלב 8: תחזית לחודשים */
.month-sheet { max-height: 88vh; overflow-y: auto; }
.mgroup { margin: 0 0 var(--sp-3); }
.mgroup > h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 var(--sp-1) var(--sp-1); font-size: var(--fs-sm); font-weight: var(--w-regular); color: var(--c-ink-2); }
.mgroup > h3 .amt { color: var(--c-ink); }
.mlist { list-style: none; margin: 0; padding: 0 var(--sp-3); background: var(--c-white); border-radius: 14px; }
.mlist > li { display: flex; align-items: center; gap: var(--sp-2); min-height: 52px; padding: var(--sp-2) 0; }
.mlist > li + li { border-top: 1px solid var(--c-line); }
.mlist .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mlist .desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlist .sub { font-size: var(--fs-xs); color: var(--c-ink-2); }
.mlist .amount { flex: none; font-variant-numeric: tabular-nums; font-weight: var(--w-medium); }
.mlist .amount.income { color: var(--c-green); }
.mlist .muted-row { color: var(--c-ink-2); }
.mlist .muted-row .amount { color: var(--c-ink-2); font-weight: var(--w-regular); text-decoration: line-through; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; background: var(--c-line); color: var(--c-ink-2); margin-inline-start: 6px; vertical-align: middle; }
.tag.est { background: #F6EBD6; color: #8A5B12; }
.tag.done { background: var(--c-green-soft); color: var(--c-green); }
.mlist .icon-btn { width: 40px; height: 40px; }
.mlist .icon-btn .ic { width: 18px; height: 18px; }
.mlist .del { color: var(--c-over); }
.mwarn { margin: 0 0 var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: 12px; background: #F6EBD6; color: #6B4510; font-size: var(--fs-sm); }
.mwarn .chip-pick { margin-top: var(--sp-2); }
.madd { display: block; margin: var(--sp-2) 0 0; color: var(--c-green); }
.routine-explain { font-size: var(--fs-xs); color: var(--c-ink-2); margin: var(--sp-1) var(--sp-1) 0; }
.routine-cats { margin: var(--sp-1) 0 0; }
.routine-cats summary { cursor: pointer; font-size: var(--fs-xs); color: var(--c-green); list-style: none; padding: 6px var(--sp-1); }
.routine-cats summary::-webkit-details-marker { display: none; }
.routine-cats .mlist > li { min-height: 40px; }

/* ---- חיובים צפויים (בתנועות) ---- */
.up-summary { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.up-total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
.up-total .label { color: var(--c-ink-2); font-size: var(--fs-sm); }
.up-total .value { font-size: var(--fs-xl); font-weight: var(--w-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }
.up-parts { list-style: none; margin: 0; padding: var(--sp-2) 0 0; border-top: 1px solid var(--c-line); display: grid; gap: 2px; }
.up-parts li { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--c-ink-2); min-height: 24px; align-items: center; }
.up-parts .amount { color: var(--c-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.up-foot { margin: 0; font-size: var(--fs-xs); }
.up-row .details { flex-wrap: wrap; white-space: normal; row-gap: 0; }
.up-row .amount { white-space: nowrap; }
.up-row.done .title, .up-row.done .details, .up-row.done .amount { color: var(--c-ink-2); }
.up-row.done .amount { text-decoration: line-through; text-decoration-color: var(--c-border); font-weight: var(--w-regular); }
.up-row.done .icon.solid { background: var(--c-line); color: var(--c-ink-2); }
.up-row.done .tag.done { background: var(--c-line); color: var(--c-ink-2); }
.up-note { margin: var(--sp-3) var(--sp-2) 0; }
.flow-switch { flex-wrap: nowrap; }

/* ---- הכנסות צפויות (בעו"ש) ---- */
#view-bank .expinc-open { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--sp-3); width: 100%; border: 0; text-align: start; color: var(--c-ink); min-height: 64px; }
#view-bank .expinc-open .main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; }
.expinc-open .title { font-weight: var(--w-medium); }
.expinc-open .sub { font-size: var(--fs-xs); }
.expinc-open .chev { width: 16px; height: 16px; color: var(--c-ink-2); flex: none; }
.expinc-add { width: 100%; margin: 0 0 var(--sp-3); }
.mlist .mrow-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-2); border: 0; background: none; padding: 0; text-align: start; color: inherit; min-height: 44px; }

/* ---- תקציב משפחתי ---- */
.budget-total { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-2); padding: var(--sp-3) var(--sp-4); }
.budget-total span { color: var(--c-ink-2); font-size: var(--fs-sm); }
.budget-total strong { font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.tracking-note { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-sm); color: var(--c-ink-2); padding: var(--sp-3) var(--sp-4); }
.tracking-note .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* ---- "צפוי לרדת" בתוך "הוצאות" (דפדוף קדימה) ---- */
#view-table[data-ahead] > :not(.flow-switch):not(.ahead-panel):not(.tx-filters) { display: none !important; }
#view-table[data-ahead] > .tx-filters:not([hidden]) { margin: var(--sp-2) 0 0; }
.ahead-title { margin: var(--sp-3) var(--sp-1) var(--sp-2); font-size: var(--fs-lg); font-weight: var(--w-medium); }

/* ---- תשלומים מעסקאות תשלומים (לפי אמצעי תשלום) ---- */
.pay-lines { list-style: none; margin: 0; padding: var(--sp-1) var(--sp-4); border-top: 1px solid var(--c-line); }
.pay-lines li { display: flex; justify-content: space-between; gap: var(--sp-3); min-height: 32px; align-items: center; font-size: var(--fs-sm); color: var(--c-ink-2); }
.pay-lines .amount { color: var(--c-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-note { margin: 0; padding: 0 var(--sp-4) var(--sp-2); font-size: var(--fs-xs); color: var(--c-ink-2); }

/* ---- בית: הוצאות החודש / הכנסות החודש ---- */
.mini-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.mini-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; text-align: start; padding: var(--sp-3) var(--sp-4); min-height: 64px; color: var(--c-ink); }
.mini-card .mini-label { font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.mini-card .mini-value { font-size: var(--fs-lg); font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.mini-card .mini-value.muted { font-size: var(--fs-md); font-weight: var(--w-regular); color: var(--c-ink-2); }
/* ---- בורר חודש: חצים כאייקונים, אזור לחיצה גדול יותר ---- */
.month-nav .mnav-btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; }
.month-nav .mnav-btn .ic { width: 22px; height: 22px; }
.appbar .month-nav .mnav-btn { width: 48px; height: 48px; }

/* ---- סיכומים (v50): ראש המסך, גרף עוגה, תזכורת סגירה ---- */
.sum-head { display: grid; gap: var(--sp-2); padding: var(--sp-4); }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-4); margin: 0; }
.sum-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sum-grid dt { font-size: var(--fs-sm); font-weight: var(--w-light); color: var(--c-ink-2); }
.sum-grid dd { margin: 0; font-size: var(--fs-lg); font-weight: var(--w-medium); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-grid dd.muted { font-size: var(--fs-md); font-weight: var(--w-regular); color: var(--c-ink-2); }
.sum-grid dd.pos { color: var(--c-green); }
.sum-grid dd.neg { color: var(--c-ink); }
.sum-count { margin: 0; font-size: var(--fs-xs); }
.pie-card { display: grid; gap: var(--sp-3); padding: var(--sp-4); }
.pie-wrap { display: flex; justify-content: center; }
.pie { width: 180px; height: 180px; }
.pie .slice { cursor: pointer; }
.pie-legend { list-style: none; margin: 0; padding: 0; }
.pie-legend li + li { border-top: 1px solid var(--c-line); }
.pie-row { display: grid; grid-template-columns: 12px 1fr auto 44px; align-items: center; gap: var(--sp-2); width: 100%; min-height: 44px; padding: 0; border: 0; background: none; text-align: start; color: var(--c-ink); font-size: var(--fs-md); }
.pie-row .dot { width: 10px; height: 10px; border-radius: 50%; }
.pie-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie-row .amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pie-row .pct { color: var(--c-ink-2); font-size: var(--fs-sm); text-align: end; font-variant-numeric: tabular-nums; }

/* ---- חלונית הפירוט (בית / סיכומים): מותאמת לגובה המסך, רק הרשימה נגללת, "סגירה" תמיד גלוי ---- */
#details-dialog { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
#details-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
#details-dialog::before, #details-dialog > h2, #details-dialog > .meta, #details-dialog > .actions { flex: none; }
#details-dialog .details-list {
  flex: 1 1 auto; min-height: 0; max-height: none; margin-bottom: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
}
#details-dialog .details-list .desc { white-space: normal; overflow-wrap: anywhere; }
#details-dialog > .actions { margin-top: 0; padding-top: var(--sp-2); border-top: 1px solid var(--c-line); background: var(--c-sheet); }
#details-dialog .details-list:focus { outline: none; }

/* ---- התראות (שלב 10) ---- */
.push-card { display: grid; gap: var(--sp-2); padding: var(--sp-4); }
.push-status { margin: 0; font-size: var(--fs-sm); color: var(--c-ink-2); }
.push-status.warn { color: var(--c-over); }
.push-row { margin: 0; }
.push-row input:disabled + span { color: var(--c-ink-2); }
.push-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.push-help summary { cursor: pointer; font-size: var(--fs-sm); color: var(--c-green); min-height: 32px; display: flex; align-items: center; }
.push-help p { margin: var(--sp-1) 0; font-size: var(--fs-sm); color: var(--c-ink-2); }
