/* ════════════════════════════════════════════════════════════
   APP — פריסה ורכיבים. כל צבע/מידה נשענים על משתני tokens.css.
   ════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  overscroll-behavior-y: none;
}

button, input { font-family: inherit; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─────────── מסך האפליקציה (בלי מסגרת מכשיר) ─────────── */
.phone {
  width: 100%;
  max-width: 480px;      /* על דסקטופ נשאר ברוחב טלפון, ממורכז */
  margin: 0 auto;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
}
.notch, .statusbar { display: none; }

.appbar {
  flex: none; background: var(--surface);
  padding: calc(8px + env(safe-area-inset-top)) 18px 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.appbar-tools { display: flex; gap: 16px; color: var(--ink); }
.appbar-user {
  display: flex; align-items: center; gap: 7px;
  background: none; border: 0; font-size: var(--fs-body); font-weight: 500;
  color: var(--ink); cursor: pointer;
}

.banner {
  flex: none; width: 100%; background: var(--accent-soft); color: var(--accent);
  padding: 11px 18px; font-size: var(--fs-cap); font-weight: 700;
  display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
}
.banner .spacer { flex: 1; }

.scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--gap) 16px 110px;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }
.grid-on .scroll {
  background-image: repeating-linear-gradient(to bottom,
    rgba(216,68,60,.13) 0 1px, transparent 1px 8px);
}

.screen-anim { animation: screenIn .28s cubic-bezier(.2,.7,.3,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen-anim { animation: none; } }

.fab {
  position: absolute; bottom: calc(46px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  width: 58px; height: 58px; border-radius: 50%; border: 0; padding: 0;
  background: var(--accent-deep); display: grid; place-items: center;
  cursor: pointer; z-index: 35; box-shadow: 0 6px 18px -6px rgba(10,63,191,.7);
}

.tabbar {
  position: absolute; inset-inline: 0; bottom: 0; background: var(--surface);
  border-top: 1px solid var(--line); display: flex;
  padding: 8px 4px calc(20px + env(safe-area-inset-bottom)); z-index: 30;
}
.tabbar button {
  flex: 1; background: none; border: 0; font-size: 11px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; color: var(--ink);
}
.tabbar button[aria-current="page"] { color: var(--accent); }
.tabbar .ic-wrap { position: relative; }
.tabbar .dot {
  position: absolute; top: -2px; inset-inline-end: -4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--neg); border: 1.5px solid var(--surface);
}

/* ─────────── רכיבים ─────────── */
.balance { text-align: right; padding: 2px 0 10px; }
.balance .lbl { font-size: var(--fs-title); font-weight: 700; }
.balance .num {
  direction: ltr; text-align: right; font-family: 'Heebo', var(--font);
  font-size: var(--fs-hero); font-weight: 700; color: var(--accent);
  letter-spacing: -1px; line-height: 1.2; margin: 2px 0;
  font-variant-numeric: tabular-nums;
}
.balance .num .cur { font-size: .78em; }
.balance .asof {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-2);
}

.panel {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden;
}
.panel-head {
  width: 100%; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: right;
}
.panel-head .spacer { flex: 1; }
.panel-head .title { font-size: var(--fs-body); font-weight: 600; }
.panel-head .amt {
  direction: ltr; text-align: right; font-family: 'Heebo', var(--font);
  font-size: 19px; font-weight: 700; margin-top: 2px;
}
.panel-head .badge {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  color: #fff; display: grid; place-items: center; flex: none;
}
.panel-head .chev { color: var(--ink-2); flex: none; transition: transform .2s; }
.panel.open .chev { transform: rotate(180deg); }
.panel-body { padding: 0 16px 16px; font-size: 13px; color: var(--ink-2); }

.h2 { font-size: var(--fs-title); font-weight: 700; text-align: right; margin: 22px 0 10px; }
.h2.first { margin-top: 0; }

.bars { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; }
.bars .row + .row { margin-top: 20px; }
.bars .row { text-align: right; }
.bars .t { font-size: var(--fs-body); font-weight: 600; }
.bars .n { font-size: 12px; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
.bars .track {
  height: 5px; border-radius: 99px; background: var(--accent-soft);
  margin: 10px 0 8px; overflow: hidden; display: flex; justify-content: flex-end;
}
.bars .amt {
  direction: ltr; text-align: right; font-family: 'Heebo', var(--font);
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.tabstrip {
  display: flex; gap: 20px; background: var(--surface);
  border-bottom: 1px solid var(--line); padding: 0 18px;
  overflow-x: auto; scrollbar-width: none;
  margin: calc(var(--gap) * -1) -16px var(--gap);
  position: sticky; top: 0; z-index: 20;
}
.tabstrip::-webkit-scrollbar { display: none; }
.tabstrip button {
  background: none; border: 0; font-size: var(--fs-body); font-weight: 500;
  padding: 12px 0 10px; cursor: pointer; white-space: nowrap;
  margin-bottom: -1px; color: var(--ink); border-bottom: 3px solid transparent;
}
.tabstrip button[aria-pressed="true"] {
  color: var(--accent); font-weight: 700; border-bottom-color: var(--accent);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 7px 12px;
  font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.pill svg { color: var(--ink-2); }
.pill-row { display: flex; gap: 8px; margin: 4px 0 14px; }

.section { margin-bottom: 10px; }
.section-head {
  width: 100%; background: var(--surface); border: 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
  display: flex; align-items: center; padding: 12px 16px;
}
.section-head .spacer { flex: 1; }
.section-head .title { font-size: var(--fs-body); font-weight: 700; }
.section-head .info { color: var(--ink-3); margin-inline-start: 6px; }
.section-head .chev { color: var(--ink-2); transition: transform .2s; }
.section.closed .chev { transform: rotate(180deg); }
.section.closed .section-body { display: none; }

.tx { background: var(--surface); }
.tx-row {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.tx-row .desc { text-align: right; }
.tx-row .nm { font-size: var(--fs-body); font-weight: 500; color: var(--ink); }
.tx-row .dt { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.tx-row .spacer { flex: 1; }
.tx-row .money { text-align: left; min-width: 92px; }
.tx-row .amt {
  direction: ltr; text-align: left; font-family: 'Heebo', var(--font);
  font-size: 16px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tx-row .amt.pos { color: var(--pos); }
.tx-row .amt .cur, .tx-row .bal .cur { font-weight: 500; margin-inline-end: 2px; }
.tx-row .bal {
  direction: ltr; text-align: left; font-size: 13px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; margin-top: 3px;
}
/* אייקון כרטיס כחול מלא צמוד לקצה השמאלי — כמו בתמונה */
.tx-row .tag {
  width: 44px; height: 29px; border-radius: 6px; flex: none;
  background: var(--accent); position: relative;
  display: grid; place-items: center; color: #fff;
}
.tx-row .tag::after {
  content: ''; position: absolute; left: 8px; bottom: 7px;
  width: 15px; height: 4px; border-radius: 2px; background: #fff;
}
.tx-row .tag.pending { background: var(--pending); }
.tx-row .tag.pending::after { display: none; }

.carousel {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.card {
  flex: none; width: 262px; aspect-ratio: 1.58; border-radius: var(--r-lg);
  padding: 16px; color: #fff; display: flex; flex-direction: column;
  justify-content: space-between; scroll-snap-align: center; cursor: pointer;
  background: var(--accent-deep);
}
.card.accent { background: var(--accent); }
.card .top, .card .bot { display: flex; justify-content: space-between; }
.card .top { align-items: flex-start; }
.card .bot { align-items: flex-end; }
.card .num {
  direction: ltr; text-align: right; font-family: 'Heebo', var(--font);
  font-size: 21px; font-weight: 700; letter-spacing: 1px;
}
.card .holder { font-size: 12px; opacity: .9; margin-top: 1px; }
.card .debit { font-size: 11px; font-weight: 600; letter-spacing: .5px; }
.card .visa { font-style: italic; font-weight: 800; font-size: 21px; letter-spacing: -.5px; }
.card .kind { font-size: 13px; font-weight: 700; }
.card .cycle { font-size: 11.5px; opacity: .9; margin-top: 1px; }
.card .right { text-align: right; }

.icon-actions { display: flex; justify-content: space-around; padding: 18px 8px 6px; }
.icon-actions button {
  background: none; border: 0; display: flex; flex-direction: column;
  align-items: center; gap: 7px; cursor: pointer; color: var(--ink); width: 72px;
}
.icon-actions svg { color: var(--accent); }
.icon-actions button[disabled] { opacity: .55; cursor: default; color: var(--ink-3); }
.icon-actions button[disabled] svg { color: var(--ink-3); }
.icon-actions .lbl { font-size: 12px; line-height: 1.3; white-space: pre-line; text-align: center; }

.months {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  background: var(--accent-soft); border-radius: 99px; padding: 9px 14px;
  overflow-x: auto; scrollbar-width: none; margin: 14px 0;
}
.months::-webkit-scrollbar { display: none; }
.months button {
  background: none; border: 0; font-size: 13.5px; font-weight: 500;
  color: var(--ink); cursor: pointer; white-space: nowrap; padding: 0 4px;
}
.months button[aria-pressed="true"] { color: var(--accent); font-weight: 700; }

.list { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.list-row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 15px 16px;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs-body); color: var(--ink); cursor: pointer; text-align: right;
}
.list-row:last-child { border-bottom: 0; }
.list-row .spacer { flex: 1; }
.list-row .sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.list-row .date { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.list-row .badge {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; flex: none;
}
.link-btn {
  display: flex; align-items: center; gap: 4px; background: none; border: 0;
  font-size: var(--fs-body); font-weight: 700; color: var(--accent);
  cursor: pointer; margin-bottom: 14px;
}
.muted { text-align: center; color: var(--ink-3); font-size: 13.5px; padding: 48px 0; }
.foot { font-size: 11.5px; color: var(--ink-3); text-align: center; margin-top: 16px; }

/* ─────────── לוח הבקרה ─────────── */
.lab {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 70;
  width: auto; max-width: 480px; margin: 0 auto; max-height: 86vh; overflow-y: auto;
  border-radius: 18px 18px 0 0;
  background: rgba(255,255,255,.98); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.9); padding: 20px;
  box-shadow: 0 -20px 50px -20px rgba(16,24,40,.35); color: #101828;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateY(101%); transition: transform .25s ease;
}
.lab.open { transform: none; }
.lab-toggle {
  display: grid; place-items: center; position: fixed;
  top: calc(8px + env(safe-area-inset-top)); inset-inline-start: 8px; z-index: 60;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(18,33,58,.5); color: #fff; cursor: pointer;
}
.lab h1 { font-size: 15px; font-weight: 700; }
.lab-sub { font-size: 12px; color: #8A97A8; margin: 4px 0 18px; line-height: 1.5; }
.lab-grp { margin-bottom: 16px; }
.lab-grp > label {
  display: block; font-size: 11px; font-weight: 700; color: #48566A;
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 7px;
}
.swatches { display: flex; gap: 7px; }
.swatches button {
  width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer;
}
.swatches button[aria-pressed="true"] { border-color: #101828; box-shadow: 0 0 0 2px #fff inset; }
.seg { display: flex; background: #E8ECF3; border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  flex: 1; border: 0; background: transparent; font-size: 12px; font-weight: 600;
  color: #48566A; padding: 6px 4px; border-radius: 7px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: #fff; color: #101828; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.lab-actions { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #E3E8EF; }
.lab-actions button {
  flex: 1; font-size: 12px; font-weight: 600; padding: 9px; border-radius: 9px;
  border: 1px solid #E3E8EF; background: #fff; color: #101828; cursor: pointer;
}
.lab-actions .primary, .lab-actions button[aria-pressed="true"] {
  background: #101828; color: #fff; border-color: #101828;
}
.lab-toggle { display: none; }

/* ─────────── לוח הבקרה נפתח כמגירה תחתית בכל רוחב ─────────── */

/* ─────────── מסך התחברות (אחד לאחד לפי הסרטון) ─────────── */
.login {
  position: absolute; inset: 0; z-index: 50; background: var(--surface);
  display: flex; flex-direction: column;
}
.login-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 18px 10px;
}
.login-bar .tools { display: flex; align-items: center; gap: 16px; color: var(--ink); }
.login-bar .lang { font-size: 15px; font-weight: 600; }
.login-brand { display: flex; align-items: center; gap: 7px; font-weight: 800; color: var(--accent); font-size: 17px; }
.login-body { flex: 1; padding: 26px 24px; overflow-y: auto; }
.login-scene { display: flex; justify-content: center; margin: 8px 0 22px; }

/* כותרת ברכה ממורכזת, כמו בסרטון */
.login-hi { text-align: center; font-size: 22px; font-weight: 700; line-height: 1.4; margin-bottom: 26px; }

/* שדה: תווית מעל מיושרת ימין; העין בשמאל; הקלט מיושר לימין */
.login-field { border-bottom: 1px solid var(--ink-3); padding-bottom: 8px; margin-bottom: 6px; }
.login-field label {
  display: block; text-align: right; font-size: 13px; color: var(--ink-3); margin-bottom: 8px;
}
.login-field .in-wrap { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; }
.login-field input {
  flex: 1; border: 0; outline: 0; background: none; font-size: 18px; font-weight: 600;
  color: var(--ink); text-align: right; letter-spacing: 2px;
}
.login-field .eye { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; flex: none; }

.login-error {
  color: var(--neg); font-size: 13px; font-weight: 600;
  text-align: right; margin: 8px 0 2px;
}
/* "שכחתי סיסמה" מיושר לימין */
.login-forgot {
  display: block; background: none; border: 0;
  color: var(--accent); font-size: 13px; font-weight: 700; cursor: pointer;
  text-align: right; width: 100%; margin: 6px 0 42px;
}
.login-submit {
  width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: 10px;
  padding: 15px; font-size: 17px; font-weight: 700; cursor: pointer;
}
.login-bio {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: none; border: 0; margin-top: 22px;
  color: var(--accent); font-size: 15px; font-weight: 700; cursor: pointer;
}
.login-field.shake { animation: shake .35s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

/* ─────────── מסך ביניים אחרי התחברות ─────────── */
.welcome {
  position: absolute; inset: 0; z-index: 55; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; animation: fadeIn .3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.welcome-scene { animation: bob 2s ease-in-out infinite; }
@keyframes bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.welcome-last { font-size: 14px; font-weight: 600; color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .welcome-scene { animation: none; }
}

/* ─────────── מסך העברת כספים ─────────── */
.sub-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: -4px 0 16px;
}
.sub-head .back {
  background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0;
  display: grid; place-items: center;
}
.sub-head .sub-title { font-size: var(--fs-title); font-weight: 700; }

.from-card {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 14px 16px;
}
.from-card .from-lbl { font-size: 13px; color: var(--ink-3); text-align: right; }
.from-card .from-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }
.from-card .from-bal {
  direction: ltr; font-family: 'Heebo', var(--font); font-size: 20px; font-weight: 700;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.from-card .from-bal .cur { font-weight: 500; margin-inline-end: 2px; }
.from-card .from-acc { font-size: 13px; color: var(--ink-2); }

.recips {
  display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 2px 16px 4px;
}
.recips::-webkit-scrollbar { display: none; }
.recip {
  flex: none; width: 62px; text-align: center; background: none; border: 0;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.recip .ph {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 18px;
  box-shadow: var(--shadow);
}
.recip.add .ph { background: var(--surface); color: var(--ink-3); border: 1.5px dashed var(--line); box-shadow: none; }
.recip span:last-child { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62px; }

.field {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 11px 14px; margin-bottom: 10px;
}
.field label { display: block; font-size: 12px; color: var(--ink-3); font-weight: 600; text-align: right; }
.field input {
  width: 100%; border: 0; outline: 0; background: none; font: inherit;
  font-size: var(--fs-body); font-weight: 600; color: var(--ink);
  text-align: right; padding-top: 4px;
}
.cta {
  width: 100%; background: var(--accent); color: #fff; border: 0; border-radius: var(--r-md);
  padding: 15px; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 6px;
}
.tr-msg { text-align: center; font-size: 13.5px; font-weight: 600; margin-top: 12px; }
.tr-msg.ok { color: var(--pos); }
.tr-msg.err { color: var(--neg); }
