/* Seto Buget — stiluri specifice aplicatiei (dupa seto.css). */
:root { --pink: #F48FB1; --teal: #4FD1C5; --violet: #B69CFF; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.page { padding-bottom: 0 !important; display: flex; flex-direction: column; gap: 12px; }
.page > * { flex: none; }
.page .grow-space { flex: 1; min-height: 8px; }

/* Titlu ecran */
.scr-head { display: flex; flex-direction: column; gap: 2px; }
.scr-head .back { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; color: #A9C6FF; font-weight: 600; font-size: 15px; padding: 0; margin: 0 0 4px -4px; cursor: pointer; }
.scr-head h1 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.1; }
.scr-head .sub { color: var(--muted); font-size: 14px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ib { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 12px; padding: 0; cursor: pointer; }
.ib:active { background: var(--bg-elev2); }

/* Carduri / liste */
.bcard { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; color: var(--text); text-decoration: none; cursor: pointer; text-align: left; font: inherit; width: 100%; box-sizing: border-box; }
.bcard.flat { cursor: default; }
.bcard.hl { border-color: rgba(244,143,177,.45); background: rgba(244,143,177,.07); }
.box { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; width: 100%; box-sizing: border-box; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; text-align: left; border-radius: 0; cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li.static { cursor: default; }
.li.col { flex-direction: column; align-items: stretch; gap: 7px; }
.li .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.li .t { font-weight: 600; overflow-wrap: anywhere; }
.li .s { color: var(--muted); font-size: 12px; }
.li .amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.li.dim { opacity: .6; }
.li .amt.plus { color: #8FE3A2; }
.li .amt.info { color: #7E8794; }
.sec { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sec .r { text-transform: none; letter-spacing: 0; font-weight: 600; }
.sec a, .sec button.lnk { color: #A9C6FF; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; text-transform: none; letter-spacing: 0; }
.chipi { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--bg-elev2); color: #C9CFD8; font-size: 11px; font-weight: 800; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #232B38; color: #C9CFD8; }
.pill.red { background: rgba(255,122,110,.13); color: #FFB3AB; }
.pill.green { background: rgba(123,216,143,.13); color: #8FE3A2; }
.pill.amber { background: rgba(245,180,84,.13); color: #FFC58A; }
.pill.teal { background: rgba(79,209,197,.13); color: #7FE0D6; }
.pill.violet { background: rgba(182,156,255,.13); color: #CBB9FF; }
.pill.pink { background: rgba(244,143,177,.16); color: #F9B8CF; }
.pill.sm { height: 20px; padding: 0 7px; font-size: 10px; }
.bar { height: 6px; border-radius: 999px; background: #232B38; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; }
.big { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.05; letter-spacing: -.02em; }
.mid { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.1; }
.row-between { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: #1A1F28; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.stat .k { font-size: 11px; font-weight: 600; color: var(--muted); }
.stat .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.stat.good { background: rgba(123,216,143,.10); } .stat.good .k { color: #8FE3A2; } .stat.good .v { color: #A6EDB5; }
.stat.bad { background: rgba(255,122,110,.10); } .stat.bad .k { color: #FFB3AB; }

/* Grafic cerc */
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut { position: relative; width: 136px; height: 136px; flex: none; }
.donut svg { transform: rotate(-90deg); display: block; }
.donut .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut .c b { font-family: var(--font-display); font-size: 22px; }
.donut .c span { font-size: 11px; color: var(--muted); }
.legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.legend span.i { display: flex; align-items: center; gap: 6px; }
.legend .sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.legend .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend .p { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Segmente (taburi) */
.seg { display: flex; padding: 4px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; gap: 2px; }
.seg button { flex: 1; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; padding: 0 6px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: #2A3446; color: var(--text); }
.seg.sm button { height: 30px; font-size: 13px; }
.seg.in-sheet { background: var(--bg); }

/* Butoane */
.btn2 { height: 44px; padding: 0 14px; border-radius: 12px; background: #1A1F28; color: var(--text); border: 1px solid #2A313C; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; }
.btn2.full { width: 100%; }
.btn2.pri { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.btn2.danger { color: #FFB3AB; border-color: rgba(255,122,110,.45); }
.btn2.danger-solid { background: #FF7A6E; color: #2A0B08; border-color: #FF7A6E; font-weight: 700; }
.btn2.sm { height: 36px; font-size: 13px; }
.btn2:disabled { opacity: .5; cursor: default; }
.btns { display: flex; gap: 8px; }
.btns > * { flex: 1; }
.seto-bottom .seto-cta { text-decoration: none; }

/* Filtre */
.chips { display: flex; gap: 6px; overflow-x: auto; }
.chips button { height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: transparent; color: #C9CFD8; border: 1px solid #2F3744; white-space: nowrap; flex: none; cursor: pointer; }
.chips button.on { background: rgba(138,180,255,.14); color: #CFE0FF; border-color: var(--accent); }
.chips.cat button.on { background: rgba(244,143,177,.16); color: #F9B8CF; border-color: rgba(244,143,177,.5); }
.search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border-radius: 14px; background: var(--bg-elev); border: 1px solid #2F3744; color: #8E97A5; }
.search input { border: 0 !important; background: transparent !important; outline: 0 !important; margin: 0; padding: 0; height: 100%; flex: 1; color: var(--text); font-size: 15px; }

/* Formulare */
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fld input, .fld select { height: 46px; margin: 0; padding: 0 12px; font-size: 16px; width: 100%; box-sizing: border-box; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.note { margin: 0 2px; font-size: 12px; color: var(--muted); line-height: 1.45; }
.info { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(138,180,255,.07); border: 1px solid rgba(138,180,255,.25); font-size: 13px; line-height: 1.45; color: #C9CFD8; }
.info b.i { color: var(--accent); }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt:last-child { border-bottom: 0; }
.opt .rad { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #3A4250; box-sizing: border-box; flex: none; }
.opt.on { background: rgba(138,180,255,.07); }
.opt.on .rad { border: 6px solid var(--accent); }
.opt .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt .t { font-weight: 600; }
.opt .s { font-size: 12px; color: var(--muted); }
.opt.on .s { color: #A9C6FF; }
.opt .extra { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.opt .extra input, .opt .extra select { height: 36px; margin: 0; padding: 0 8px; font-size: 14px; width: auto; }
.opt .extra input { width: 70px; }
.tgl { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border-radius: 12px; background: var(--bg-elev2); border: 1px solid #2F3744; font-size: 14px; cursor: pointer; }
.tgl .grow { flex: 1; display: flex; flex-direction: column; }
.tgl .s { font-size: 11px; color: var(--muted); }
.sw2 { width: 42px; height: 24px; border-radius: 999px; background: #2A313C; position: relative; flex: none; transition: .15s; }
.sw2::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #8E97A5; transition: .15s; }
.tgl.on .sw2 { background: rgba(138,180,255,.3); }
.tgl.on .sw2::after { left: 21px; background: var(--accent); }
.ck { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #3A4250; box-sizing: border-box; flex: none; display: grid; place-items: center; background: transparent; padding: 0; cursor: pointer; color: #2A0E18; }
.ck.on { background: var(--pink); border-color: var(--pink); }
.catsel { height: 30px !important; font-size: 12px !important; padding: 0 6px !important; margin: 0 !important; max-width: 200px; border-radius: 9px !important; }

/* Foaie de jos */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(4,6,10,.62); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; background: var(--bg-elev); border-top: 1px solid #2A313C; border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; animation: sheet-in .18s ease; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet > * { flex: none; }
.sheet .chips.cat { overflow: visible; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: #3A4250; align-self: center; flex: none; }
.sheet h2 { margin: 0; font-size: 20px; }
.amount-in { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.amount-in input { font-family: var(--font-display); font-size: 40px !important; font-weight: 700; text-align: center; background: transparent !important; border: 0 !important; outline: 0 !important; width: 70%; height: 56px; padding: 0 !important; margin: 0; }
.amount-in .cur { font-size: 22px; color: var(--muted); font-weight: 700; }

/* Pagina principala */
.bhead { display: flex; align-items: center; gap: 12px; }
.bhead .grow { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bhead .n { font-weight: 700; font-size: 17px; }
.empty-state { text-align: center; color: var(--muted); padding: 30px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.d-chip.buget { background: rgba(244,143,177,.14); color: var(--pink); }

/* Import */
.dup { border-color: rgba(245,180,84,.4) !important; }
.map-table { overflow-x: auto; font-size: 12px; }
.map-table table { border-collapse: collapse; }
.map-table td { border: 1px solid var(--line); padding: 4px 6px; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.map-table tr.hdr td { background: rgba(138,180,255,.12); }

/* Editare categorii */
.ecat { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ecat:last-child { border-bottom: 0; }
.ecat input { height: 38px; margin: 0; padding: 0 10px; font-size: 15px; }
.ecat .nm { flex: 1; min-width: 0; }
.ecat .pl { width: 86px; text-align: right; flex: none; }
.ecat .mv { display: flex; flex-direction: column; }
.ecat .mv button { width: 26px; height: 18px; padding: 0; border: 0; background: none; color: #6B7482; display: grid; place-items: center; cursor: pointer; }
.ecat.del { flex-direction: column; align-items: stretch; background: rgba(255,122,110,.06); }

@media (min-width: 700px) { .page { max-width: 560px; } }

/* Ajustari dupa test */
.amount-in input { width: auto !important; field-sizing: content; min-width: 2ch; max-width: 80%; }
.toast { bottom: calc(92px + env(safe-area-inset-bottom)) !important; }
.big { white-space: nowrap; font-size: clamp(26px, 8.5vw, 34px); }
.row-between { flex-wrap: wrap; }
.row-between > .muted { white-space: nowrap; }
