/* SHF P — regulile de design din PARERE_DESIGN.md, partea A. Trei mărimi de literă (22 / 17 / 13), pasul 4, nicio altă culoare. */
:root {
  --fund: #F2F2F7; --card: #FFFFFF; --foaie: #FFFFFF; --tx: #1C1C1E; --t2: #636366; --stins: #85858B; --linie: #E5E5EA;
  --et: #E9E9EE; --marcat: #F2F2F7; --sis: #0B6BD3; --leu: #6E3F0C; --eur: #5E2CA5; --usd: #2F7D32; --umbra: 0 2px 16px rgba(0,0,0,.10);
  --in: #7CC08C; --kb: 0px; color-scheme: light dark;
}
@media (prefers-color-scheme: dark) { :root {
  --fund: #000000; --card: #1C1C1E; --foaie: #2C2C2E; --tx: #F2F2F7; --t2: #AEAEB2; --stins: #8E8E93; --linie: #38383A;
  --et: #3A3A3C; --marcat: #2C2C2E; --sis: #8ACBFF; --leu: #D19A5B; --eur: #A98AE6; --usd: #A6E09E; --umbra: 0 0 0 1px #38383A; --in: #4E9E66;
} }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fund); color: var(--tx); font: 400 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; font-variant-numeric: tabular-nums; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: inherit; cursor: pointer; touch-action: manipulation; }
button:active, .apasa:active { opacity: .6; }
button:disabled { opacity: .35; }
input, select, textarea { font-family: inherit; font-size: 17px; font-weight: 400; line-height: 1.3; color: var(--tx); }   /* sub 16 px, Safari pe iPhone mărește pagina la atingerea câmpului */
[hidden] { display: none !important; }
.v-MDL { color: var(--leu); } .v-EUR { color: var(--eur); } .v-USD { color: var(--usd); } .v-alt { color: var(--tx); }
.mic { font-size: 13px; color: var(--t2); } .stins { color: var(--stins); } .act { font-weight: 500; }
.ln { display: inline-block; height: 3px; border-radius: 2px; background: var(--stins); vertical-align: middle; }
.l48 { width: 48px; } .l36 { width: 36px; } .l12 { width: 12px; }

/* ── antetul: stă fix sus, cu lunile ── */
.antet { position: sticky; top: 0; z-index: 5; background: var(--fund); padding: calc(env(safe-area-inset-top) + 8px) 16px 0; }
.a1 { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.blocuri { display: flex; align-items: baseline; gap: 16px; flex: 1 0 auto; }
.bloc { font-size: 13px; font-weight: 500; color: var(--t2); min-height: 44px; min-width: 32px; }
.bloc.on { font-size: 22px; font-weight: 600; color: var(--tx); }
.totaluri { min-height: 44px; display: flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; padding: 0 4px 0 12px; }
.totaluri .an { color: var(--t2); } .totaluri .sl { color: var(--stins); }
.totaluri.m15 { font-size: 15px; } .totaluri.m13 { font-size: 13px; }
.cerc { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; flex: none; margin-right: -6px; }
.cerc > span { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--stins); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; }
.a2 { font-size: 13px; text-align: right; color: var(--t2); min-height: 17px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.a2::-webkit-scrollbar, .luni::-webkit-scrollbar { display: none; }
.luni { display: flex; gap: 8px; overflow-x: auto; margin: 8px -16px 0 0; padding: 6px 16px 10px 0; scrollbar-width: none; }
.luna { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; font-size: 13px; font-weight: 500; background: var(--card); color: var(--t2); position: relative; }
.luna::after { content: ''; position: absolute; inset: -6px 0; }
.luna.on { background: var(--tx); color: var(--fund); }
.luna small { font-size: 11px; font-weight: 400; margin-left: 3px; }

/* ── zilele și rândurile ── */
.lista { padding: 6px 16px calc(env(safe-area-inset-bottom) + 96px); }
.zi { background: var(--card); border-radius: 14px; margin: 0 0 8px; }
.zi-cap { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.zi-cap .data { flex: 1; } .zi-cap .sag { font-size: 13px; color: var(--stins); width: 12px; text-align: center; }
.zi-corp { border-top: .5px solid var(--linie); padding: 0 12px 4px; }
.rand { display: block; width: 100%; min-height: 52px; padding: 8px 6px; margin: 0 -6px; width: calc(100% + 12px); border-radius: 10px; }
.rand.marcat { background: var(--marcat); }
.g { display: grid; grid-template-columns: var(--aw, 6ch) 32px minmax(0, 1fr) 84px 50px; column-gap: 4px; align-items: center; }
.g .suma { text-align: right; white-space: nowrap; } .g .val { text-align: center; font-size: 13px; font-weight: 500; padding-left: 2px; }
.chip { height: 26px; line-height: 24px; font-size: 13px; font-weight: 500; text-align: center; border-radius: 8px; background: var(--et); color: var(--tx); white-space: nowrap; overflow: hidden; border: 1px solid transparent; }
.chip.e { background: transparent; border: 1px dashed var(--stins); }
.chip.s { background: transparent; border: 1px solid var(--sis); color: var(--sis); }
/* IN se deosebește de OUT prin conturul pătratelor: verde pal în IN, neschimbat în OUT (Andrian, 23.11.2026) */
body[data-bloc="IN"] .chip:not(.s), body[data-bloc="IN"] .gchip:not(.on) { border-color: var(--in); }
.nota { font-size: 13px; color: var(--t2); padding: 2px 0 0 2px; overflow-wrap: anywhere; }
.rand.liber .suma, .rand.liber .val { color: var(--stins); }
.info { border-top: .5px solid var(--linie); margin-top: 4px; padding: 8px 0 4px; }
/* nota informativă arată exact ca textul de sub cifre (13 px, culoarea a doua), cu semnul „i” mic — să nu iasă în față față de rândurile de sus (Andrian, 24.11.2026) */
.info-r { display: flex; gap: 6px; padding: 7px 0 7px 2px; min-height: 30px; align-items: flex-start; width: 100%; font-size: 13px; color: var(--t2); overflow-wrap: anywhere; }
.info-i { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--stins); color: var(--stins); font-size: 10px; line-height: 12px; text-align: center; margin-top: 1px; }
.gol { text-align: center; color: var(--stins); font-size: 13px; padding: 24px 0; }

/* ── bara de jos (24.11.2026): capsulă plutitoare; stânga 4 unelte de 46, o linie fină care nu atinge marginile, dreapta cealaltă pereche
   de blocuri — capsule cu litere pe fondul paginii (nu semne, nu „alese”: acolo doar mergi) ── */
.bara { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 8px); width: 343px; max-width: calc(100vw - 32px); height: 56px; border-radius: 28px; background: var(--card); box-shadow: var(--umbra); display: flex; align-items: center; padding: 0 8px; z-index: 8; }
.cu-tastatura .bara { display: none; }
.ib { flex: 0 1 46px; min-width: 40px; height: 56px; display: flex; align-items: center; justify-content: center; color: var(--t2); position: relative; }
.blin { flex: none; width: 1px; height: 26px; background: var(--linie); margin: 0 8px; }
.bbl { flex: 1; display: flex; align-items: center; justify-content: space-around; min-width: 0; }
.bb { width: 60px; height: 56px; display: flex; align-items: center; justify-content: center; }
.bb span { width: 56px; height: 36px; border-radius: 18px; background: var(--fund); color: var(--tx); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ib span { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; }
.ib.on span { color: var(--tx); background: var(--marcat); } .ib.pl span { background: var(--tx); color: var(--card); }
.ib svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ib.loc { visibility: hidden; }

/* ── foaia care urcă de jos ── */
.foaie { position: fixed; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 72px); z-index: 9; background: var(--foaie); border-radius: 20px; padding: 8px 16px 16px; box-shadow: 0 0 0 .5px var(--linie), 0 8px 32px rgba(0,0,0,.18); max-height: 60vh; overflow-y: auto; animation: urca .3s ease-out; }
.cu-tastatura .foaie { bottom: calc(var(--kb) + 8px); max-height: calc(100vh - var(--kb) - 80px); }
@keyframes urca { from { transform: translateY(24px); } to { transform: none; } }   /* fără transparență: o animație oprită nu ascunde foaia */
@media (prefers-reduced-motion: reduce) { .foaie, .toast { animation: none; } }
.maner { width: 36px; height: 5px; border-radius: 3px; background: var(--linie); margin: 0 auto 4px; }
.ft { display: flex; align-items: center; min-height: 36px; } .ft .mic { flex: 1; }
.x { width: 44px; height: 44px; margin: -4px -14px -4px 0; color: var(--stins); text-align: center; font-size: 17px; }
.camp { display: block; width: 100%; height: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--linie); background: var(--fund); outline: none; -webkit-appearance: none; appearance: none; }
.camp:focus { border-color: var(--stins); }
.camp::placeholder { color: var(--stins); }
.r1 { display: flex; gap: 8px; margin: 0 0 8px; } .r1 .camp { flex: 1; min-width: 0; }
.r1 .fval { flex: none; width: 60px; text-align: center; font-size: 17px; font-weight: 500; }
.r3 { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.gata { flex: 1; height: 48px; border-radius: 14px; background: var(--tx); color: var(--fund); text-align: center; font-weight: 500; }
.sterge { height: 48px; padding: 0 12px; color: var(--t2); }
.mesaj { font-size: 13px; color: var(--tx); font-weight: 500; min-height: 0; padding: 8px 2px 0; }
.foaie .mesaj { font-size: 17px; }   /* de ce nu s-a scris: nu se poate rata */
.mesaj:empty { display: none; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 76px); z-index: 10; background: var(--tx); color: var(--fund); font-size: 13px; font-weight: 500; padding: 10px 16px; border-radius: 20px; width: max-content; max-width: calc(100vw - 32px); text-align: center; display: flex; gap: 16px; align-items: center; animation: urca .2s ease-out; }
.toast button { font-weight: 600; text-decoration: underline; min-height: 44px; margin: -12px -8px -12px 0; padding: 0 8px; }   /* „Anulează”: țintă de 44 */
.cu-tastatura .toast { bottom: calc(var(--kb) + 8px); }   /* banda urcă deasupra tastaturii */

/* ── paginile (Ușa, căutarea, istoricul) ── */
.pagina { padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 96px); }
.inapoi { min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.sectiune { font-size: 13px; color: var(--t2); margin: 16px 0 6px 12px; }
.lista-r { background: var(--card); border-radius: 14px; padding: 0 12px; }
.lr { display: flex; align-items: center; gap: 8px; min-height: 44px; width: 100%; border-bottom: .5px solid var(--linie); padding: 6px 0; }
.lr:last-child { border-bottom: 0; } .lr > :first-child { flex: 1; min-width: 0; } .lr .dr { color: var(--t2); text-align: right; }
.lr .sag { color: var(--stins); }

/* ── ușa ── */
#usa { position: fixed; inset: 0; z-index: 20; background: var(--fund); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top) + 24px) 24px calc(env(safe-area-inset-bottom) + 24px); overflow-y: auto; }
#usa:empty { display: none; }
.usa-c { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.usa-c h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.usa-c p { margin: 0; color: var(--t2); font-size: 13px; }
.usa-c p.tare { color: var(--tx); font-weight: 500; }
.buton { height: 48px; border-radius: 14px; background: var(--tx); color: var(--fund); text-align: center; font-weight: 500; width: 100%; }
.buton.al2 { background: var(--card); color: var(--tx); }
.leg { min-height: 44px; font-size: 13px; font-weight: 500; color: var(--t2); text-align: center; }
.cod6 { text-align: center; letter-spacing: 8px; font-size: 22px; font-weight: 600; height: 56px; }
.codref { font: 600 22px/1.6 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 1px; background: var(--card); border-radius: 14px; padding: 16px 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; -webkit-user-select: all; user-select: all; }
.camp.ref { text-transform: uppercase; text-align: center; font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* ── treapta 1: corectat, etichete, cursuri, căutare, istoric ── */
.ft .mic { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fzi { font-size: 17px; color: var(--tx); background: var(--fund); border: 1px solid var(--linie); border-radius: 8px; height: 32px; padding: 0 6px; margin-left: 2px; -webkit-appearance: none; appearance: none; vertical-align: middle; }
.banner { font-size: 13px; font-weight: 500; text-align: center; padding: 8px 12px; background: var(--card); border-radius: 12px; margin: 6px 0 0; }
.info-r.marcat { background: var(--marcat); border-radius: 8px; }
.zi-corp.fara-linie { border-top: 0; padding-top: 4px; }
.r1.sus { margin-top: 8px; margin-bottom: 0; }
.camp.lipit { flex: none; width: auto; display: flex; align-items: center; font-weight: 500; }
.gata.ing { flex: none; width: 96px; }
.r1 .camp.ing2 { flex: none; width: 118px; }
.rc { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.rc .act, .act.mic { min-height: 36px; color: var(--tx); font-weight: 500; text-align: left; }
.act.mic { display: block; padding: 6px 0; }
.gr-rand { display: flex; flex-wrap: wrap; gap: 12px 8px; margin: 6px 0 10px; }   /* toate grupele se văd deodată, pe două rânduri — fără derulare ascunsă într-o parte */
.gr-rand::-webkit-scrollbar { display: none; }
.gchip { flex: none; height: 32px; padding: 0 14px; border-radius: 16px; font-size: 13px; font-weight: 500; background: var(--et); position: relative; border: 1px solid transparent; }
.gchip::after { content: ''; position: absolute; inset: -6px 0; }
.gchip.on { background: var(--tx); color: var(--fund); }
.alege .lr > .sgn, .doua .sgn { flex: none; width: 84px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sgd { flex: 1; min-width: 0; font-size: 13px; color: var(--t2); border-left: 1px solid var(--linie); padding-left: 8px; overflow-wrap: anywhere; }
.alege .lr.ales .sgn { text-decoration: underline; }
.lr .tx { color: var(--tx); }
.doua { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1.4fr); gap: 16px; margin-top: 4px; }
.doua > div > button { display: flex; width: 100%; min-height: 40px; align-items: center; }
.doua .sgn { width: 72px; } .tare { font-weight: 600; }
.ascunse { padding: 8px 0 0; } .ascunse .act { text-decoration: underline; min-height: 32px; }
.ed { border-top: .5px solid var(--linie); margin-top: 8px; padding-top: 12px; } .ed0 { padding: 4px 0 10px; }
.foaia { padding-top: 6px; } s { color: var(--stins); }
.ist-r { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: .5px solid var(--linie); font-size: 13px; }
.ist-r:last-child { border-bottom: 0; } .ist-r .ora { flex: none; width: 38px; color: var(--t2); } .ist-r .ce { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ist-r .act { flex: none; text-decoration: underline; min-height: 32px; margin: -6px 0; }
.leg.lat { display: block; width: 100%; margin-top: 8px; }
.pagina .camp { background: var(--card); }

/* ── pagina zilei (ca în Notițe) și paginile de grupe: capul lipit sus, titlul mare, rândul liber în care se scrie direct ── */
.pz-cap { position: sticky; top: 0; z-index: 5; background: var(--fund); display: flex; align-items: center; gap: 8px; min-height: 52px; margin: calc(-1 * (env(safe-area-inset-top) + 8px)) -16px 0; padding: calc(env(safe-area-inset-top) + 4px) 16px 4px; }
.pz-cap .inapoi { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-cap .blocuri { flex: 1; justify-content: center; } .pz-cap .blocuri .bloc.on { font-size: 17px; }
.pz-cap > span { flex: 1; text-align: right; } .pz-cap > span:empty { flex: 1; }
.pz-cap .totaluri { flex: none; padding: 0 0 0 8px; justify-content: flex-end; min-width: 60px; }
.pz-data { font-size: 22px; font-weight: 600; margin: 4px 0 12px 4px; } .pz-data .mic { font-weight: 400; }
.pz-data button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.pzi .zi { padding-bottom: 4px; }
.scris { display: flex; align-items: center; gap: 4px; min-height: 56px; padding: 4px 6px 4px 12px; border-top: .5px solid var(--linie); }
.zi-corp:empty + .scris, #pz-randuri:has(.zi-corp:empty) + .scris { border-top: 0; }
.scris input { background: none; border: 0; outline: none; height: 44px; padding: 0 4px; min-width: 0; border-radius: 0; }
.scris input::placeholder { color: var(--stins); }
.scris .ss { flex: none; width: max(7ch, calc(var(--aw, 6ch) + 1ch)); text-align: right; }
.scris .sv { flex: none; width: 40px; height: 32px; border-radius: 10px; background: var(--et); font-size: 13px; font-weight: 500; text-align: center; }
.scris .st { flex: 1; }
.scris .sg { flex: none; width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: var(--tx); color: var(--fund); font-weight: 600; font-size: 17px; }
.scris .sg.info { background: var(--et); color: var(--tx); font-style: italic; }
.rand.pend .suma, .rand.pend .val, .rand.pend .nota { color: var(--stins); }
.rand.pend.picat .nota { color: var(--tx); } .rand.pend .rc { min-height: 32px; } .rand.pend .rc .act { min-height: 32px; }
.lista-r .lr > .sgn { flex: none; width: 84px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-r .lr > .sgd { flex: 1; }
.lista-r .ed { padding: 8px 0 12px; } .lista-r .ed.fara-linie { border-top: 0; padding-top: 12px; }
.lista-r .lr .act { color: var(--tx); }

/* ── blocul SHF (24.11.2026, după părerea inginerului de design) ── */
.dinshf { color: var(--sis); }                                  /* rândul venit din SHF, în IN / OUT: partea sistemului stă prima, albastră */
.pct { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-left: 6px; vertical-align: middle; flex: none; }
.luna .pct { width: 6px; height: 6px; margin-left: 5px; }      /* punctul de restanță pe rubrică */
.hfata .lista-r { margin-bottom: 8px; }
.hr { display: grid; grid-template-columns: 62px 50px minmax(0, 1fr) 84px; column-gap: 8px; align-items: center; min-height: 56px; border-bottom: .5px solid var(--linie); }
.hr.h3 { grid-template-columns: 62px minmax(0, 1fr) 84px; }
.hr:last-child { border-bottom: 0; }
.hr > button, .hr > .hd { min-height: 56px; display: flex; flex-direction: column; justify-content: center; }
.hd { text-align: left; white-space: nowrap; align-items: flex-start; }
.hd small, .hs small { display: block; font-size: 13px; font-weight: 400; color: var(--t2); min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hr.tarziu .hz { font-weight: 600; }
.hc { font-size: 13px; font-weight: 500; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-items: flex-start; }
.hs { text-align: right; white-space: nowrap; align-items: flex-end; margin-right: 4px; min-width: 0; }
.hs.m15 { font-size: 15px; } .hs.m13 { font-size: 13px; }
.hb { width: 84px; height: 48px; display: flex; align-items: center; justify-content: center; }
.hb span { display: block; width: 84px; height: 32px; line-height: 30px; border-radius: 10px; border: 1px solid var(--stins); font-size: 13px; font-weight: 500; text-align: center; }
.hf { width: 84px; height: 48px; font-size: 13px; color: var(--t2); text-align: center; align-items: center; }
.hr.facut .hs { color: var(--t2); }
.hv { display: grid; grid-template-columns: 50px minmax(0, 1fr) 84px; column-gap: 8px; align-items: center; min-height: 64px; }
.hv .camp { height: 48px; background: var(--fund); }
.hv .hc { min-height: 48px; display: flex; align-items: center; }
.hvl { display: block; width: 100%; text-align: left; min-height: 32px; padding: 0 0 10px 2px; }
.hsub { margin: -8px 0 12px 4px; }
.hsi { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin: 8px 0 0 12px; }
.hsi .info-i { display: inline-block; vertical-align: -1px; margin-right: 2px; }
.plus { width: 44px; height: 44px; font-size: 22px; font-weight: 400; color: var(--tx); text-align: center; }
.hcor { margin: 16px 0 0 12px; color: var(--t2); }
.hdet { padding: 8px 2px 0; overflow-wrap: anywhere; }
.htext { margin: 0 4px 8px; }
.hnota { height: auto; min-height: 72px; padding: 12px; resize: none; overflow: hidden; }
.seg { display: flex; gap: 8px; margin: 0 0 12px; } .seg .gchip { flex: 1; height: 44px; border-radius: 14px; font-size: 17px; text-align: center; }
.hnou .gr-rand { margin: 0 0 8px; }
.hdl { justify-content: flex-start; min-height: 44px; gap: 8px; margin: 0 0 0 4px; }
.hrez { margin: 12px 4px 0; color: var(--tx); overflow-wrap: anywhere; }
.fval.static { display: flex; align-items: center; justify-content: center; }
.lr.comut { min-height: 48px; }
.gata.al2, .buton.al2 { background: var(--card); color: var(--tx); border: 1px solid var(--linie); }
.foaie .gata.al2 { background: var(--fund); }
.r3 .buton { flex: 1; }
.ifil { margin: 8px 0 0; }
.ist-r .ce[data-a] { cursor: pointer; }
.lr .pct { color: var(--t2); }
