:root {
  /* צבעי המותג של ישרים — כמו באתר ובפרוטוקול */
  --ink: #0F2547;
  --muted: #5B5F75;
  --line: #E7E4F3;
  --line-soft: #EFEDF7;
  --field: #D2CCEB;
  --ground: #F6F5FC;
  --card: #FFFFFF;
  --navy: #4B3FB8;
  --navy-dark: #37399A;
  --navy-tint: #DCD6F7;
  --purple: #8C5BF0;
  --red: #E3262F;
  --red-ink: #A3151B;
  --red-soft: #FDEEEF;
  --warn-ink: #8E1F3B;
  --info-bg: #EEF0FD;
  --info-ink: #2E2C7A;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Rubik', sans-serif;
  background: var(--ground);
  color: var(--ink);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
.wrap { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
h1, h2, .display { font-family: 'Rubik', sans-serif; font-weight: 700; margin: 0; }

/* סרגל עליון */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: auto; }
.brand span { font-family: 'Rubik', sans-serif; font-weight: 900; font-size: 24px; }
.linkbtn { background: none; border: 0; padding: 10px 4px; font: inherit; font-size: 15px; font-weight: 600; color: var(--navy); cursor: pointer; min-height: 44px; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 700; text-decoration: none; }

.content { display: flex; flex-direction: column; gap: 20px; padding: 24px 20px 32px; }

/* כניסה */
.auth { padding: 48px 24px 32px; gap: 36px; flex: 1; }
.logo-block { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; }
.logo-block img { width: 104px; height: auto; }
.logo-block .word { font-family: 'Rubik', sans-serif; font-weight: 900; font-size: 40px; line-height: 1; }
.logo-block .sub { font-size: 16px; color: var(--muted); letter-spacing: .5px; }
.card { background: var(--card); border-radius: 20px; padding: 20px; box-shadow: 0 1px 2px rgba(27,26,58,.06); }
.card.form { padding: 28px 22px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 1px 2px rgba(27,26,58,.06), 0 8px 24px rgba(27,26,58,.06); }
.card h1 { font-size: 28px; }
.lead { margin: 6px 0 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
input.field { width: 100%; height: 54px; border: 1.5px solid var(--field); border-radius: 12px; padding: 0 16px; font: inherit; font-size: 20px; letter-spacing: 2px; text-align: center; color: var(--ink); background: #fff; }
input.field:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(47,45,134,.15); }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; border: 0; border-radius: 14px; background: var(--navy); color: #fff; font: inherit; font-size: 18px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy-dark); color: #fff; }
.btn.outline { background: #fff; color: var(--navy); border: 1.5px solid var(--field); }
.error { background: var(--red-soft); color: var(--warn-ink); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; }
.devnote { background: #FFF6DB; color: #6B4E00; border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); text-align: center; }
.foot .lock { display: flex; align-items: center; gap: 8px; }
.ltr { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }

/* כרטיס תיק */
.case-card { background: linear-gradient(135deg, var(--navy-dark), var(--purple)); color: #fff; border-radius: 20px; padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; }
.case-card .who { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.case-card .name { font-size: 22px; font-weight: 700; }
.case-card .idline { font-size: 15px; color: var(--navy-tint); margin-top: 4px; }
.case-card .pill { padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 700; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fact { background: rgba(255,255,255,.1); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.fact .k { font-size: 13px; color: var(--navy-tint); }
.fact .v { font-size: 17px; font-weight: 700; }

/* שלב */
.stage { display: flex; flex-direction: column; gap: 14px; }
.stage .k { font-size: 15px; font-weight: 600; color: var(--muted); }
.stage .head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stage .head .display { font-size: 26px; }
.stage .of { font-size: 15px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.bar { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.bar span { height: 8px; border-radius: 4px; background: #E3E1EE; }
.bar .done { background: var(--navy); }
.bar .current { background: var(--red); }
.stage p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.more { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; text-decoration: none; min-height: 44px; }

/* מסמכים */
.docs { padding: 0; overflow: hidden; }
.docs .head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 14px; }
.docs .head h2 { font-size: 22px; }
.docs .count { font-size: 14px; font-weight: 700; color: var(--warn-ink); }
.docrow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.docrow:hover { background: #FAFAFD; color: var(--ink); }
.docrow .t { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.docrow .n { font-size: 16px; font-weight: 600; }
.chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #EEF1F4; color: #3E4D5A; font-size: 13px; font-weight: 700; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #7F93A5; }
.docs .note { padding: 12px 16px 16px; border-top: 1px solid var(--line-soft); font-size: 14px; line-height: 1.5; color: var(--muted); }
.all-good { padding: 20px 16px 22px; border-top: 1px solid var(--line-soft); display: flex; gap: 12px; align-items: center; font-size: 16px; font-weight: 600; }
.all-good svg { color: var(--navy); flex-shrink: 0; }

.info { display: flex; gap: 12px; align-items: flex-start; background: var(--info-bg); border-radius: 16px; padding: 16px; }
.info p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--info-ink); }
.info svg { flex-shrink: 0; margin-top: 2px; color: #0D5E82; }

/* יצירת קשר */
.contact { display: flex; flex-direction: column; gap: 10px; }
.contact h2 { font-size: 22px; margin-bottom: 4px; }
.cbtn { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px; border-radius: 14px; text-decoration: none; }
.cbtn.primary { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #fff; }
.cbtn.primary:hover { color: #fff; background: var(--navy-dark); }
.cbtn.secondary { background: #fff; border: 1.5px solid var(--field); color: var(--ink); }
.cbtn .txt { flex: 1; display: flex; flex-direction: column; }
.cbtn .a { font-size: 17px; font-weight: 700; }
.cbtn .b { font-size: 14px; }
.cbtn.primary .b { color: var(--navy-tint); }
.cbtn.secondary .b { color: var(--muted); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #E9E8F7; color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cbtn.primary .avatar { background: rgba(255,255,255,.15); color: #fff; }

/* מסמך בודד */
.doc-title { display: flex; flex-direction: column; gap: 10px; }
.doc-title h1 { font-size: 28px; line-height: 1.2; }
.card h2.small { font-family: 'Rubik', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card p { margin: 0; font-size: 16px; line-height: 1.55; color: #3A3857; }
.card .tip { margin-top: 10px; font-size: 14px; color: var(--muted); }
.warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--warn-ink); }
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.soon { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px; border: 2px dashed var(--field); border-radius: 16px; background: #FBFAFD; color: #8A88A3; }
.soon b { font-size: 16px; }
.soon span { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #EDEBF5; color: var(--muted); }

/* שלבים */
.stages { padding: 8px 18px; display: flex; flex-direction: column; }
.srow { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.srow:last-child { border-bottom: 0; }
.srow.current { background: var(--red-soft); margin: 0 -12px; padding: 14px 12px; border-radius: 14px; }
.dot { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; border: 1.5px solid var(--field); color: var(--muted); }
.srow.done .dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.srow.current .dot { background: var(--red); border-color: var(--red); color: #fff; }
.srow .t { display: flex; flex-direction: column; gap: 3px; }
.srow .n { font-size: 16px; font-weight: 700; }
.srow .n small { font-size: 13px; color: var(--red-ink); }
.srow .d { font-size: 14px; line-height: 1.45; color: var(--muted); }
.srow.current .d { color: #3A3857; }

/* תיק סגור / הודעה */
.closed-box { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 28px 24px; }
.closed-box .icon { width: 64px; height: 64px; border-radius: 50%; background: #EDEBF5; color: var(--navy); display: flex; align-items: center; justify-content: center; }
.closed-box h2 { font-size: 26px; }
.closed-box p { color: var(--muted); }

.strong { color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--muted); }
.navy { color: var(--navy); display: flex; }
.hello { font-size: 30px; }
.stack-10 { display: flex; flex-direction: column; gap: 10px; }
.stack-10 h2.small { font-family: 'Rubik', sans-serif; font-size: 17px; font-weight: 700; }
.srow .dot { font-size: 13px; }
.vlabel { font-size: 15px; font-weight: 700; color: var(--muted); margin-top: 6px; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 2px dashed var(--field); border-radius: 16px; background: #FBFAFD; color: var(--navy); cursor: pointer; text-align: center; margin: 0; }
.dropzone b { font-size: 17px; }
.dropzone span { font-size: 13px; color: var(--muted); font-weight: 600; }
.file-input { font: inherit; font-size: 15px; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dropzone .chosen { color: var(--navy); font-size: 14px; font-weight: 700; }
.dropzone:focus-within { border-color: var(--navy); }

/* נתוני האשראי */
.loading { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 600; color: var(--muted); }
.spinner { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 3px solid var(--navy-tint); border-top-color: var(--navy); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.loan { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.loan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.loan-head .lender { font-size: 17px; font-weight: 700; line-height: 1.35; }
.loan-head .tag { flex-shrink: 0; padding: 3px 10px; border-radius: 999px; background: #EDEBF5; color: var(--navy); font-size: 13px; font-weight: 700; white-space: nowrap; }
.loan-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.loan-facts div { display: flex; flex-direction: column; gap: 2px; }
.loan-facts dt { font-size: 13px; color: var(--muted); }
.loan-facts dd { margin: 0; font-size: 16px; font-weight: 700; text-align: right; }
.small-text { margin: 0; font-size: 14px; line-height: 1.5; }
.disclaimer { background: #FBFAFD; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.disclaimer strong { font-size: 15px; }
.disclaimer p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.reportlink { display: flex; align-items: center; gap: 12px; min-height: 64px; text-decoration: none; color: var(--ink); }
.reportlink .ic { width: 40px; height: 40px; border-radius: 12px; background: #EDEBF5; color: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reportlink .t { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.reportlink .n { font-size: 17px; font-weight: 700; }
.reportlink .d { font-size: 14px; color: var(--muted); }
.errcode { font-size: 12px; color: #8A88A3; margin: 0; }

/* ---- v18 ---- */
h1, h2 { letter-spacing: -0.2px; }
.hello { font-size: 28px; font-weight: 700; }
.logo-block .word { font-weight: 800; }
.brand span { font-weight: 800; }

/* תוויות סטטוס בצבעי Monday */
.status-chip { align-self: flex-start; display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; background: #C4C4C4; }
.status-chip.big { font-size: 17px; padding: 7px 16px; border-radius: 8px; }
.st-new { background: #9AADBD; }
.st-p1 { background: #579BFC; }
.st-sol { background: #00C875; }
.st-asset { background: #CAB641; }
.st-p2 { background: #FF5AC4; }
.st-last { background: #BCA58A; }
.st-appr { background: #037F4C; }
.st-exec { background: #9D50DD; }
.st-req { background: #9AADBD; }
.srow .status-chip { margin: 2px 0; }
.srow.todo .status-chip { opacity: .55; }

/* מדריך: סרטון + פרוטוקול */
.guide { display: flex; flex-direction: column; gap: 14px; }
.guide h2 { font-size: 21px; }
.guide .muted { margin: 0; font-size: 15px; line-height: 1.5; }
.video.vertical { aspect-ratio: 9 / 16; max-width: 300px; width: 100%; margin: 0 auto; }
.confirmed { display: flex; align-items: center; gap: 8px; color: #037F4C; font-size: 15px; font-weight: 600; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 500; line-height: 1.5; margin: 0; cursor: pointer; }
.check input { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; accent-color: var(--navy); }

/* תמונת הנציג */
.avatar.photo { width: 44px; height: 44px; object-fit: cover; padding: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }

/* שליחת מסמכים */
.dropzone.has-files { border-style: solid; border-color: #00C875; background: #F1FBF6; color: #037F4C; }
.chosen-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.chosen-list:empty { display: none; }
.chosen-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--ground); font-size: 14px; }
.chosen-list .fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chosen-list .fsize { color: var(--muted); flex-shrink: 0; }
.btn:disabled { opacity: .85; cursor: progress; }
.spinner.light { width: 18px; height: 18px; border-width: 2.5px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }

/* תחתית ומסמכים משפטיים */
.appfoot { margin-top: auto; padding: 18px 20px 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; }
.linkbtn.small { font-size: 13px; font-weight: 500; min-height: 36px; padding: 6px 2px; color: var(--muted); text-decoration: none; }
.foot-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 12px; color: #8A88A3; }
.foot-meta a { color: inherit; }
dialog.legal { width: min(560px, calc(100vw - 32px)); max-height: 85vh; padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 20px 60px rgba(15,37,71,.3); }
dialog.legal::backdrop { background: rgba(15,37,71,.45); }
.legal-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.legal-head h2 { font-size: 20px; }
.legal-head .close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--ground); font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer; }
.legal-body { padding: 8px 18px 22px; font-size: 14px; line-height: 1.65; color: #34374F; }
.legal-body h3 { margin: 16px 0 4px; font-size: 15px; color: var(--ink); }
.legal-body p { margin: 0 0 8px; }
.guide .video.vertical { max-width: 230px; }

/* ---- v19 ---- */
.chosen-list .frm { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #fff; color: var(--red-ink); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.chosen-list li { gap: 8px; }
.chosen-list .fname { flex: 1; }
.disclaimer.alert { background: var(--red-soft); border: 1.5px solid var(--red); }
.disclaimer.alert strong { color: var(--red-ink); font-size: 16px; }
.disclaimer.alert p { color: #6E1018; font-size: 14px; }
/* חלונות מידע: מסך מלא בנייד, חלון במרכז במחשב */
dialog.legal { position: fixed; inset: 0; margin: auto; width: 100%; height: 100%; max-width: 100%; max-height: 100%; border-radius: 0; display: none; flex-direction: column; overflow: hidden; }
dialog.legal[open] { display: flex; }
.legal-head { flex-shrink: 0; position: static; padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
.legal-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.legal-body.pages { display: flex; flex-direction: column; gap: 12px; padding: 12px; background: var(--ground); }
.legal-body.pages img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 1px 4px rgba(15,37,71,.12); }
@media (min-width: 600px) {
  dialog.legal { width: min(640px, calc(100vw - 48px)); height: min(85vh, 900px); border-radius: 18px; }
}
body.modal-open { overflow: hidden; }

[hidden] { display: none !important; }

/* ---- v22 · תנועה ומשוב בהשראת עקרונות העיצוב של אפל ---- */
/* עקומת "קפיץ בלי קפיצה" — יציאה מהירה והתייצבות רכה, כמו גיליון באייפון */
:root { --ease-settle: cubic-bezier(0.32, 0.72, 0, 1); }

/* 1. תגובה ברגע הנגיעה, לא אחרי שמרימים את האצבע */
html { -webkit-tap-highlight-color: transparent; }
.btn, .cbtn, .linkbtn, .more, .back, .docrow, .reportlink, .dropzone, .legal-head .close, .chosen-list .frm {
  transition: transform 160ms var(--ease-settle), background-color 160ms ease, opacity 160ms ease;
}
.btn:active, .cbtn:active, .reportlink:active, .dropzone:active { transform: scale(0.97); }
.linkbtn:active, .more:active, .back:active { opacity: .55; }
.docrow:active { background: #F3F2FA; }
.legal-head .close:active, .chosen-list .frm:active { transform: scale(0.9); }
.btn:disabled:active { transform: none; }

/* 3. חלונות המידע: בנייד עולים מלמטה ויורדים חזרה לאותו מקום; במחשב מתגבשים במרכז */
@keyframes sheet-in  { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-out { from { transform: none; } to { transform: translateY(100%); } }
@keyframes pop-in    { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pop-out   { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.96); } }
@keyframes dim-in    { from { opacity: 0; } to { opacity: 1; } }
@keyframes dim-out   { from { opacity: 1; } to { opacity: 0; } }
dialog.legal[open] { animation: sheet-in 380ms var(--ease-settle); }
dialog.legal.closing { animation: sheet-out 260ms var(--ease-settle) forwards; }
dialog.legal[open]::backdrop { animation: dim-in 260ms ease; }
dialog.legal.closing::backdrop { animation: dim-out 220ms ease forwards; }
@media (min-width: 600px) {
  dialog.legal[open] { animation: pop-in 240ms var(--ease-settle); }
  dialog.legal.closing { animation: pop-out 180ms ease forwards; }
}

/* 4. מעבר רך בין מסכים (דפדפנים שתומכים; האחרים פשוט מחליפים כמו היום) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 160ms; animation-timing-function: ease; }
.topbar { view-transition-name: topbar; }          /* הסרגל העליון נשאר במקום, רק התוכן מתחלף */
::view-transition-group(topbar) { animation-duration: 0s; }

/* 5. לקוח שביקש בטלפון "פחות תנועה" — רק החלפה שקטה של שקיפות, בלי החלקות והקטנות */
@media (prefers-reduced-motion: reduce) {
  .btn:active, .cbtn:active, .reportlink:active, .dropzone:active,
  .legal-head .close:active, .chosen-list .frm:active { transform: none; }
  dialog.legal[open] { animation: dim-in 150ms ease; }
  dialog.legal.closing { animation: dim-out 120ms ease forwards; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---- v23 · דף נתוני האשראי: סיכום, פילוח, עסקאות נפתחות, מה עוד מופיע בדוח ---- */
.cr-hero { gap: 18px; }
.cr-total { display: flex; flex-direction: column; gap: 2px; }
.cr-total .k { font-size: 14px; color: var(--navy-tint); }
.cr-total .big { font-size: 38px; font-weight: 800; line-height: 1.1; letter-spacing: -0.5px; text-align: right; }
.cr-total .asof { font-size: 13px; color: var(--navy-tint); }
.cr-hero .fact { background: rgba(255,255,255,.12); border-radius: 12px; padding: 12px; gap: 4px; }
.cr-h { font-size: 19px; font-weight: 700; }
.cr-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.cr-mix { display: flex; flex-direction: column; gap: 14px; }
.cr-segbar { width: 100%; height: 14px; display: block; border-radius: 7px; background: var(--line-soft); }
.seg-mort { fill: #37399A; background: #37399A; }
.seg-loan { fill: #8C5BF0; background: #8C5BF0; }
.seg-line { fill: #B9A8F2; background: #B9A8F2; }
.seg-other { fill: #9AADBD; background: #9AADBD; }
.cr-legend { list-style: none; margin: 0; padding: 0; }
.cr-legend li { display: flex; align-items: center; gap: 10px; min-height: 52px; border-top: 1px solid var(--line-soft); }
.cr-legend .sw { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.cr-legend .t, .cr-item .t { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-legend .n, .cr-item .n { font-size: 16px; font-weight: 600; }
.cr-legend .d, .cr-item .d { font-size: 13px; color: var(--muted); }
.cr-legend .v, .cr-item .v { font-size: 16px; font-weight: 700; white-space: nowrap; }

.cr-list { display: flex; flex-direction: column; padding-bottom: 6px; }
.cr-item { border-top: 1px solid var(--line-soft); }
.cr-item summary { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 0; cursor: pointer; list-style: none; transition: opacity 160ms ease; }
.cr-item summary::-webkit-details-marker { display: none; }
.cr-item summary:active { opacity: .6; }
.cr-item .chev { flex-shrink: 0; color: #8A88A3; transition: transform 240ms var(--ease-settle, ease); }
.cr-item[open] .chev { transform: rotate(180deg); }
.cr-item .flag { color: var(--warn-ink); font-weight: 700; }
.cr-body { display: flex; flex-direction: column; gap: 14px; padding: 2px 0 16px; }
.cr-item[open] .cr-body { animation: cr-reveal 260ms var(--ease-settle, ease); }
@keyframes cr-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cr-prog { display: flex; flex-direction: column; gap: 6px; }
.cr-prog svg { width: 100%; height: 8px; display: block; }
.cr-prog .track { fill: var(--line-soft); }
.cr-prog .fill.paid { fill: var(--navy); }
.cr-prog .fill.used { fill: var(--purple); }
.cr-prog-lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.cr-prog-lbl span:first-child { font-weight: 700; color: var(--ink); }
.cr-arrears { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FFF4E5; color: #6B3A00; font-size: 14px; line-height: 1.5; }

.cr-neg { display: flex; flex-direction: column; gap: 4px; }
.cr-find { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 6px; border-top: 1px solid var(--line-soft); }
.cr-find h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.cr-find .d { margin: 0; font-size: 14px; line-height: 1.55; color: #3A3857; }
.cr-find b { font-weight: 700; color: var(--ink); }
.cr-fact { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--ground); }
.cr-fact .n { font-size: 15px; font-weight: 600; }
.cr-months { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cr-months li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--ground); font-size: 13px; color: var(--muted); }
.cr-months li .ltr { font-weight: 700; color: var(--ink); }
.cr-months li b { margin-inline-start: auto; font-size: 15px; color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .cr-item[open] .cr-body { animation: none; }
  .cr-item .chev { transition: none; }
}

/* דיווח על בעיה */
.helplink { display: block; text-align: center; font-size: 15px; font-weight: 600; color: var(--navy); padding: 10px 4px 4px; min-height: 44px; }
.topbar-end { display: flex; align-items: center; gap: 10px; }
.helpbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--navy); color: var(--navy); font-weight: 700; font-size: 18px; text-decoration: none; flex-shrink: 0; }
.helpbtn:active { opacity: .55; }
.center { display: flex; justify-content: center; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.choices legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
textarea.field-text { width: 100%; box-sizing: border-box; border: 1.5px solid var(--field); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 16px; line-height: 1.5; color: var(--ink); background: #fff; resize: vertical; margin-top: 6px; }
textarea.field-text:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(47,45,134,.15); }

/* מסכי הכניסה בזמן הקלדה: לוגו קטן, כדי שהשדה והכפתור יישארו מעל המקלדת */
body.typing .auth { padding-top: 14px; gap: 16px; padding-bottom: 45vh; }
body.typing .auth .logo-block { flex-direction: row; justify-content: center; gap: 8px; padding-top: 0; }
body.typing .auth .logo-block img { width: 34px; }
body.typing .auth .logo-block .word { font-size: 24px; }
body.typing .auth .logo-block .sub { display: none; }

/* מסך הקוד: 6 תיבות (ה-JS מפעיל אותן; בלי JS נשאר השדה הרגיל) */
.otp-field { position: relative; }
.otp-on #code { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; z-index: 2; font-size: 16px; color: transparent; caret-color: transparent; cursor: text; -webkit-tap-highlight-color: transparent; }
.otp { direction: ltr; display: flex; justify-content: center; gap: 8px; }
.otp[hidden], .otp-done[hidden] { display: none; }
.otp-box {
  position: relative; width: 46px; height: 58px; border: 1.5px solid var(--field); border-radius: 14px; background: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: border-color .22s ease, box-shadow .28s ease, background-color .25s ease, color .25s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.otp-box .d { display: inline-block; will-change: transform, opacity; }
.otp-box.filled { border-color: #B9B0E6; background: #FBFAFF; }
.otp-box.active { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(75,63,184,.14), 0 6px 14px -8px rgba(75,63,184,.6); transform: translateY(-2px); }
.otp-box.active::after { content: ""; position: absolute; width: 2px; height: 26px; border-radius: 2px; background: var(--navy); animation: otp-caret 1.1s ease-in-out infinite; }
.otp-box .d.in { animation: otp-in .34s cubic-bezier(.34,1.56,.64,1) both; }
.otp-box .d.out { animation: otp-out .14s ease-in both; }
.otp-box.bump { animation: otp-bump .28s cubic-bezier(.34,1.56,.64,1); }

/* בזמן הבדיקה: גל עדין שעובר על התיבות */
.otp.checking .otp-box { border-color: var(--navy); animation: otp-wave .9s ease-in-out infinite; }
.otp.checking .otp-box:nth-child(2) { animation-delay: .07s; }
.otp.checking .otp-box:nth-child(3) { animation-delay: .14s; }
.otp.checking .otp-box:nth-child(4) { animation-delay: .21s; }
.otp.checking .otp-box:nth-child(5) { animation-delay: .28s; }
.otp.checking .otp-box:nth-child(6) { animation-delay: .35s; }

/* קוד שגוי: אדום + רעידה שנרגעת */
.otp.bad .otp-box { border-color: var(--red); background: var(--red-soft); color: var(--red-ink); box-shadow: none; transform: none; animation: none; }
.otp.shake { animation: otp-shake .55s cubic-bezier(.36,.07,.19,.97) both; }
.otp-msg { margin-top: 12px; text-align: center; color: var(--red-ink); font-size: 15px; font-weight: 600; }
.otp-msg.show { animation: otp-msg .3s ease-out both; }
.otp-msg[hidden] { display: none; }

/* קוד נכון: התיבות מתמלאות אחת אחרי השנייה, מתכנסות, ו-✓ מצטייר */
.otp.ok .otp-box { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: none; transform: none; animation: none; }
.otp.ok .otp-box:nth-child(2) { transition-delay: .05s; }
.otp.ok .otp-box:nth-child(3) { transition-delay: .1s; }
.otp.ok .otp-box:nth-child(4) { transition-delay: .15s; }
.otp.ok .otp-box:nth-child(5) { transition-delay: .2s; }
.otp.ok .otp-box:nth-child(6) { transition-delay: .25s; }
.otp.leave { animation: otp-leave .24s ease-in forwards; }
.otp-done { height: 62px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--navy); font-weight: 700; font-size: 18px; }
.otp-done .ring { width: 48px; height: 48px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; animation: otp-ring .42s cubic-bezier(.34,1.56,.64,1) both; box-shadow: 0 8px 20px -8px rgba(75,63,184,.8); }
.otp-done path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: otp-draw .36s .2s ease-out forwards; }
.otp-done > span:last-child { animation: otp-msg .3s .25s ease-out both; }

@keyframes otp-caret { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes otp-in { from { opacity: 0; transform: translateY(12px) scale(.4); } to { opacity: 1; transform: none; } }
@keyframes otp-out { to { opacity: 0; transform: translateY(-6px) scale(.6); } }
@keyframes otp-bump { 0% { transform: translateY(-2px) scale(1); } 40% { transform: translateY(-3px) scale(1.07); } 100% { transform: translateY(0) scale(1); } }
@keyframes otp-wave { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }
@keyframes otp-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(5px); } 30%, 50%, 70% { transform: translateX(-9px); } 40%, 60% { transform: translateX(9px); } }
@keyframes otp-msg { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes otp-leave { to { opacity: 0; transform: scale(.82); } }
@keyframes otp-ring { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes otp-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 360px) { .otp { gap: 6px; } .otp-box { width: 40px; height: 52px; font-size: 22px; } }
@media (prefers-reduced-motion: reduce) {
  .otp-box { transition: none; }
  .otp-box .d.in, .otp-box .d.out, .otp-box.bump, .otp.checking .otp-box, .otp.shake, .otp-msg.show,
  .otp.leave, .otp-done .ring, .otp-done > span:last-child { animation: none; }
  .otp-box.active::after { animation: none; }
  .otp-done path { animation: none; stroke-dashoffset: 0; }
}
