/* =============================================================================
   Finansai (finansai.domi.lt) — stiliai
   Švarus „fintech“ stilius: šviesus fonas, smaragdo/šiferio akcentai.
   ============================================================================= */
:root {
  --bg: #f1f5f9;
  --fg: #0f172a;
  --card: #ffffff;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --primary: #0f172a;        /* tamsus šiferis (antraštė, mygtukai) */
  --accent: #10b981;         /* smaragdas (pajamos / CTA) */
  --accent-d: #059669;
  --pos: #059669;
  --neg: #dc2626;
  --blue: #2563eb;
  --input-bg: #f8fafc;
  --ring: rgba(16, 185, 129, 0.35);

  --r: 0.625rem;
  --r-lg: 1rem;
  --r-xl: 1.25rem;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px -10px rgba(15, 23, 42, 0.25);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; font-size: 1rem; }
a { color: inherit; }
strong { font-weight: 700; }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.muted { color: var(--muted); }
.muted-xs { color: var(--muted-2); font-size: 0.78rem; }
.pad { padding: 1rem 1.25rem; }
.link { color: var(--accent-d); text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ---------- Logo mark ---------- */
.logo-mark {
  width: 2rem; height: 2rem; border-radius: 0.5rem; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; font-weight: 800; font-size: 1.15rem;
}
.logo-title { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }

/* =============================================================================
   Antraštė + navigacija (programos puslapiai)
   ============================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--primary); color: #fff;
}
.header-row { display: flex; align-items: center; gap: 1rem; padding: 0.6rem 0; }
.logo { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: #fff; flex-shrink: 0; }
.nav { display: flex; align-items: center; gap: 0.15rem; flex: 1; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.4rem; flex-shrink: 0;
  padding: 0.45rem 0.8rem; border-radius: 999px; text-decoration: none;
  color: rgba(255,255,255,0.72); font-weight: 600; font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.is-active { color: #fff; background: rgba(255,255,255,0.16); }
.nav-emoji { font-size: 1rem; }
.header-user { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.user-chip { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: #fff;
  padding: 0.3rem 0.6rem 0.3rem 0.3rem; border-radius: 999px; transition: background 0.15s; }
.user-chip:hover { background: rgba(255,255,255,0.1); }
.user-avatar { width: 1.9rem; height: 1.9rem; border-radius: 999px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 0.85rem; }
.user-name { font-weight: 600; font-size: 0.9rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 0.5rem; color: rgba(255,255,255,0.8);
  text-decoration: none; font-size: 1.1rem; transition: background 0.15s; }
.icon-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

@media (max-width: 640px) {
  .nav-label { display: none; }
  .user-name { display: none; }
  .nav-link { padding: 0.45rem 0.6rem; }
}

/* =============================================================================
   Bendri programos elementai
   ============================================================================= */
.app-main { padding: 1.25rem 1rem 3rem; display: flex; flex-direction: column; gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.25rem; }
.page-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.page-head-actions { display: flex; gap: 0.5rem; }

.btn-sm { padding: 0.5rem 0.9rem; border-radius: var(--r); background: var(--accent); color: #fff; font-weight: 600; font-size: 0.88rem; text-decoration: none; display: inline-flex; align-items: center; transition: background 0.15s; }
.btn-sm:hover { background: var(--accent-d); }
.btn-sm-ghost { background: var(--card); color: var(--fg); border: 1px solid var(--line-2); }
.btn-sm-ghost:hover { background: var(--bg); }

/* ---------- Balanso kortelės ---------- */
.balance-cards { display: flex; gap: 1rem; flex-wrap: wrap; }
.balance-card { flex: 1; min-width: 14rem; padding: 1.25rem 1.4rem;
  background: linear-gradient(135deg, #0f172a, #1e293b); border: none; color: #fff; }
.balance-label { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.05em; }
.balance-amount { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 0.35rem; }

/* ---------- Statistika ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0.9rem 1rem; box-shadow: var(--shadow); }
.stat-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.stat-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; margin-top: 0.2rem; }
.stat-green .stat-value { color: var(--pos); }
.stat-red .stat-value { color: var(--neg); }
.stat-blue .stat-value { color: var(--blue); }
@media (max-width: 560px) { .stat-value { font-size: 1.05rem; } .stats { gap: 0.5rem; } }

/* ---------- Tinkleliai / paneliai ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 1rem; font-weight: 700; margin: 0; }
.panel-sub { font-size: 0.82rem; color: var(--muted); }

/* ---------- Kategorijų juostos (dashboard) ---------- */
.cat-bars { list-style: none; margin: 0; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.cat-bar-top { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.3rem; }
.cat-bar-name { font-weight: 600; }
.cat-bar-amt { font-weight: 700; }
.cat-bar-track { height: 0.5rem; background: var(--bg); border-radius: 999px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 999px; min-width: 2%; }

/* ---------- Sąskaitų sąrašas ---------- */
.acc-list { list-style: none; margin: 0; padding: 0; }
.acc-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1.25rem; }
.acc-row + .acc-row { border-top: 1px solid var(--line); }
.acc-main { flex: 1; min-width: 0; }
.acc-name { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-sub { font-size: 0.78rem; color: var(--muted); }
.acc-bal { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.bank-badge { width: 2.4rem; height: 2.4rem; border-radius: 0.6rem; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1); color: #334155; font-weight: 800; font-size: 1rem; }

/* ---------- Sąskaitų kortelės (accounts) ---------- */
.acc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.acc-card { padding: 1.1rem 1.2rem; }
.acc-card.is-inactive { opacity: 0.55; }
.acc-card-top { display: flex; align-items: flex-start; gap: 0.7rem; }
.acc-card-info { flex: 1; min-width: 0; }
.acc-card-bal { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 0.7rem; }
.acc-iban { font-size: 0.74rem; color: var(--muted-2); font-variant-numeric: tabular-nums; margin-top: 0.2rem; }
.acc-credit-note { font-size: 0.76rem; color: var(--muted); margin-top: 0.25rem; }
.acc-card-bal.neg, .acc-bal.neg { color: var(--neg); }
.acc-card-foot { margin-top: 0.5rem; }

/* ---------- Ženkleliai ---------- */
.badge { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.badge-active  { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef9c3; color: #a16207; }
.badge-expired { background: #fee2e2; color: #b91c1c; }
.badge-error   { background: #fee2e2; color: #b91c1c; }

/* ---------- Operacijų sąrašas ---------- */
.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 1.25rem; }
.tx-row + .tx-row { border-top: 1px solid var(--line); }
.tx-icon { width: 2.2rem; height: 2.2rem; border-radius: 999px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; }
.tx-icon.in  { background: #dcfce7; color: var(--pos); }
.tx-icon.out { background: #fee2e2; color: var(--neg); }
.tx-main { flex: 1; min-width: 0; }
.tx-desc { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: 0.77rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-right { text-align: right; flex-shrink: 0; }
.tx-amt { font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.tx-amt.pos { color: var(--pos); }
.tx-amt.neg { color: var(--neg); }
.tx-date { font-size: 0.74rem; color: var(--muted-2); }
.tx-del { flex-shrink: 0; }
.icon-btn-sm { width: 1.9rem; height: 1.9rem; border-radius: 0.45rem; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 0.95rem; transition: background 0.15s, color 0.15s; }
.icon-btn-sm:hover { background: var(--bg); color: var(--fg); }

.pos { color: var(--pos); } .neg { color: var(--neg); }
.tx-cp { font-weight: 600; color: var(--fg); }
.tx-mkrule { flex-shrink: 0; text-decoration: none; opacity: 0.55; }
.tx-mkrule:hover { opacity: 1; background: var(--bg); }
.tx-clickable { cursor: pointer; border-radius: 0.4rem; }
.tx-clickable:hover .tx-desc { text-decoration: underline; }
.tx-row.tx-saved { background: #ecfdf5; transition: background 0.2s; }

/* ---------- Operacijos detalių modalas ---------- */
.dialog-head-row { display: flex; align-items: center; justify-content: space-between; }
.dialog-x { width: 1.9rem; height: 1.9rem; border-radius: 0.45rem; color: var(--muted-2); font-size: 1rem; }
.dialog-x:hover { background: var(--bg); color: var(--fg); }
.td-amount { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; margin: 0.4rem 0 1rem; }
.td-amount.pos { color: var(--pos); } .td-amount.neg { color: var(--neg); }
.td-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; }
.td-cell { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.td-cell span:last-child { font-weight: 600; font-size: 0.9rem; word-break: break-word; }
.td-k { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.td-desc { background: var(--bg); border-radius: var(--r); padding: 0.6rem 0.75rem; font-size: 0.9rem; word-break: break-word; }
.td-recon-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.rc-list { max-height: 45vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); margin-top: 0.5rem; }
.rc-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; cursor: pointer; font-size: 0.88rem; }
.rc-item + .rc-item { border-top: 1px solid var(--line); }
.rc-item:hover { background: var(--bg); }
.rc-item input { flex-shrink: 0; }
@media (max-width: 480px) { .td-grid { grid-template-columns: 1fr; } }

/* ---------- Filtrai + suvestinė ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; align-items: center; }
.input-sm { padding: 0.45rem 0.65rem; font-size: 0.88rem; }
.filters .input-sm { flex: 0 1 auto; min-width: 8rem; }
.filters input[type="search"] { flex: 1 1 12rem; }
.tx-summary { display: flex; gap: 1.25rem; padding: 0 0.25rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.tx-summary .pos, .tx-summary .neg { font-variant-numeric: tabular-nums; }
.uncat-chip { margin-left: auto; text-decoration: none; font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 999px; background: #fef9c3; color: #a16207; }
.uncat-chip:hover { background: #fef08a; }
.uncat-chip.is-on { background: var(--accent); color: #fff; }

/* ---------- Kategorijų lustai ---------- */
.cat-chips { list-style: none; margin: 0; padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cat-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.4rem 0.35rem 0.7rem;
  border: 1.5px solid var(--line-2); border-radius: 999px; font-size: 0.86rem; font-weight: 600; background: var(--card); }
.cat-dot { width: 0.65rem; height: 0.65rem; border-radius: 999px; flex-shrink: 0; }
.chip-x { width: 1.3rem; height: 1.3rem; border-radius: 999px; color: var(--muted-2); font-size: 1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.chip-x:hover { background: var(--bg); color: var(--neg); }

/* ---------- Kategorijų medis (tėvinės + subkategorijos) ---------- */
.cat-tree { list-style: none; margin: 0; padding: 0.5rem 1rem 1rem; }
.cat-parent { padding: 0.35rem 0; }
.cat-parent + .cat-parent { border-top: 1px solid var(--line); }
.cat-line { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; }
.cat-line .cat-name { font-weight: 600; font-size: 0.92rem; flex: 1; }
.cat-children { list-style: none; margin: 0.1rem 0 0.2rem; padding: 0 0 0 1.6rem; border-left: 2px solid var(--line); margin-left: 0.3rem; }
.cat-child .cat-name { font-weight: 500; font-size: 0.88rem; color: var(--muted); }
.btn-xs-ghost { font-size: 0.74rem; font-weight: 600; color: var(--accent-d); padding: 0.1rem 0.4rem; border-radius: 0.4rem; }
.btn-xs-ghost:hover { background: var(--bg); }

/* ---------- Inline kategorijos pasirinkiklis operacijų sąraše ---------- */
.tx-cat-form { flex-shrink: 0; max-width: 11rem; }
.tx-cat-select { width: 100%; padding: 0.3rem 0.4rem; font-size: 0.78rem; border: 1px solid var(--line-2); border-radius: 0.45rem; background: var(--input-bg); color: var(--fg); }
.tx-cat-select:focus { border-color: var(--accent); outline: none; }
@media (max-width: 720px) { .tx-cat-form { display: none; } }

/* ---------- Taisyklės ---------- */
.rules-bar { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; flex-wrap: wrap; }
.rules-bar .muted { flex: 1; min-width: 16rem; font-size: 0.86rem; }
.rules-apply { display: flex; gap: 0.5rem; align-items: center; }
.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-row { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1.25rem; }
.rule-row + .rule-row { border-top: 1px solid var(--line); }
.rule-row.is-off { opacity: 0.55; }
.rule-order { color: var(--muted-2); font-weight: 700; font-size: 0.8rem; padding-top: 0.15rem; }
.rule-drag { color: var(--muted-2); cursor: grab; font-size: 1.1rem; line-height: 1; padding-top: 0.1rem; user-select: none; }
.rule-drag:active { cursor: grabbing; }
.rule-row.dragging { opacity: 0.5; background: var(--bg); }
.rule-main { flex: 1; min-width: 0; }
.rule-target { font-weight: 600; font-size: 0.92rem; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.rule-name { color: var(--muted); font-weight: 500; }
.rule-conds { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; line-height: 1.5; }
.rule-conds b { color: var(--fg); font-weight: 700; }
.rule-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.rule-actions .badge { border: none; cursor: pointer; }
.rule-cond-head { font-weight: 700; font-size: 0.9rem; margin: 0.5rem 0 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }

/* ---------- Taisyklių „builder“ (DevOps stilius) ---------- */
.dialog-el.rule-dialog { width: 96vw; max-width: 1100px; }
.rule-dialog .dialog-form { max-height: 90vh; overflow-y: auto; }
.rule-dialog #clauses { min-height: 3rem; }
.qb-head, .clause-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 5.5rem 1.6fr 1.9rem;
  gap: 0.4rem; align-items: center;
}
.qb-head { margin: 0.15rem 0 0.35rem; font-size: 0.72rem; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.03em; }
.clause-row { margin-bottom: 0.4rem; }
.clause-row .input { padding: 0.5rem 0.55rem; font-size: 0.9rem; }
.clause-row .c-del {
  width: 1.9rem; height: 2.1rem; border-radius: 0.45rem; color: var(--muted-2);
  font-size: 1.1rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.clause-row .c-del:hover { background: #fee2e2; color: var(--neg); }
/* ---------- Įjungimo/išjungimo jungiklis ---------- */
.switch-form { display: inline-flex; align-items: center; gap: 0.4rem; }
.switch { width: 2.5rem; height: 1.45rem; border-radius: 999px; background: var(--line-2); position: relative; transition: background 0.15s; flex-shrink: 0; }
.switch.on { background: var(--accent); }
.switch-knob { position: absolute; top: 2px; left: 2px; width: 1.05rem; height: 1.05rem; border-radius: 999px; background: #fff; transition: left 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.switch.on .switch-knob { left: 1.2rem; }
.switch-label { font-size: 0.76rem; font-weight: 600; color: var(--muted); min-width: 3.4rem; }

.qb-add { margin-top: 0.25rem; font-weight: 600; font-size: 0.85rem; color: var(--accent-d); padding: 0.4rem 0; }
.qb-add:hover { text-decoration: underline; }
@media (max-width: 620px) {
  .qb-head { display: none; }
  .clause-row { grid-template-columns: 1fr 1fr; }
  .clause-row .c-del { grid-column: 2; justify-self: end; }
}

/* ---------- Balanso valiutų suskirstymas ---------- */
.balance-breakdown { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.bd-chip { background: rgba(255,255,255,0.14); color: #fff; font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 999px; }
.bd-warn { background: rgba(251,191,36,0.25); }

/* ---------- Importas: dropzone ---------- */
.import-drop { padding: 1rem; }
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: 2.25rem 1.25rem; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: #f0fdf9; }
.dz-emoji { font-size: 2.25rem; }
.dz-title { font-weight: 700; font-size: 1.05rem; margin-top: 0.35rem; }
.dz-sub { color: var(--muted); font-size: 0.85rem; max-width: 30rem; margin: 0.35rem auto 0; }
.dz-list { list-style: none; margin: 0.9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.dz-list li { font-size: 0.85rem; font-weight: 600; color: var(--fg); }
.import-actions { display: flex; justify-content: flex-end; padding: 0.9rem 0.25rem 0; }

/* ---------- Importas: naujų sąskaitų vedlys ---------- */
.wizard-overlay { margin-top: 1rem; display: flex; justify-content: center; }
.wizard-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 30rem; padding: 1.5rem; }
.wizard-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.wizard-badge { background: var(--accent); color: #fff; font-weight: 700; font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 999px; }
.wizard-count { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.wizard-intro { color: var(--muted); font-size: 0.86rem; margin: 0 0 1rem; line-height: 1.5; }
.wizard-actions { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.wizard-actions .btn-primary, .wizard-actions .btn-secondary { width: auto; }
.import-summary .acc-row { padding-left: 0; padding-right: 0; }

/* ---------- Projektai ---------- */
.proj-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.proj-card { padding: 1.1rem 1.2rem; }
.proj-card.is-archived { opacity: 0.6; }
.proj-card-top { display: flex; align-items: flex-start; gap: 0.7rem; }
.proj-card-info { flex: 1; min-width: 0; }
.proj-badge { width: 2.4rem; height: 2.4rem; border-radius: 0.6rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.proj-name { font-weight: 700; font-size: 0.95rem; text-decoration: none; color: var(--fg); }
.proj-name:hover { text-decoration: underline; }
.proj-net { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 0.6rem; }
.proj-net.pos { color: var(--pos); } .proj-net.neg { color: var(--neg); }
.proj-io { display: flex; gap: 1rem; font-size: 0.82rem; font-weight: 600; margin-top: 0.15rem; }
.proj-io .pos { color: var(--pos); } .proj-io .neg { color: var(--neg); }
.proj-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.proj-foot-actions { display: flex; gap: 0.6rem; }
.link-muted { font-size: 0.78rem; color: var(--muted); }
.link-muted:hover { color: var(--fg); text-decoration: underline; }
.link-danger:hover { color: var(--neg); }

/* projekto žymė (taisyklėse, operacijų sąraše) */
.proj-tag { display: inline-flex; align-items: center; padding: 0.05rem 0.45rem; border-radius: 999px; font-size: 0.76rem; font-weight: 600; }
.tx-proj-chip:not(:empty) { display: inline-block; margin-left: 0.35rem; padding: 0.02rem 0.4rem; border-radius: 999px; background: #eff6ff; color: #2563eb; font-size: 0.72rem; font-weight: 600; }
.tx-recon-chip:not(:empty) { display: inline-block; margin-left: 0.35rem; padding: 0.02rem 0.4rem; border-radius: 999px; background: #f0fdf4; color: #15803d; font-size: 0.72rem; font-weight: 600; }

/* ---------- Tuščios būsenos ---------- */
.empty-hero { padding: 2.5rem 1.5rem; text-align: center; }
.empty-emoji { font-size: 2.5rem; margin-bottom: 0.5rem; }
.empty-hero h2 { margin: 0.25rem 0 0.5rem; font-size: 1.25rem; }
.empty-hero p { color: var(--muted); max-width: 28rem; margin: 0 auto 1.25rem; }
.btn-primary.inline, .inline { width: auto; display: inline-flex; }

/* ---------- Pavojinga zona ---------- */
.danger-zone { padding: 1.25rem; }
.danger-zone .panel-title { color: var(--neg); margin-bottom: 0.5rem; }
.danger-zone p { margin: 0 0 1rem; }

/* =============================================================================
   Formos / mygtukai / dialogai (bendri su auth)
   ============================================================================= */
.field { margin-bottom: 0.9rem; }
.field-label { display: block; font-weight: 600; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.input { width: 100%; padding: 0.65rem 0.85rem; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--input-bg); color: var(--fg); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.input.pin { text-align: center; letter-spacing: 0.5em; font-weight: 800; font-size: 1.5rem; }
.input-amount { font-size: 1.2rem; font-weight: 700; }
.field-row { display: flex; gap: 0.75rem; }
.field-row .field { flex: 1; }

.btn-primary { width: 100%; padding: 0.75rem; border-radius: var(--r); color: #fff; font-weight: 700; background: var(--accent); transition: background 0.15s; }
.btn-primary:hover { background: var(--accent-d); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { display: block; width: 100%; padding: 0.7rem; border-radius: var(--r); background: var(--bg); color: var(--fg); border: 1px solid var(--line-2); font-weight: 600; text-align: center; text-decoration: none; transition: background 0.15s; }
.btn-secondary:hover { background: var(--line); }
.btn-danger { width: 100%; padding: 0.7rem; border-radius: var(--r); color: #fff; background: var(--neg); font-weight: 700; }
.btn-danger:hover { filter: brightness(0.95); }
.btn-danger-ghost { padding: 0.6rem 0.9rem; border-radius: var(--r); color: var(--neg); background: #fee2e2; font-weight: 600; }

/* ---------- Tipo perjungiklis (operacija) ---------- */
.type-toggle { display: flex; gap: 0.4rem; padding: 0.25rem; background: var(--bg); border-radius: var(--r); margin-bottom: 1rem; }
.type-opt { flex: 1; text-align: center; padding: 0.5rem; border-radius: 0.45rem; font-weight: 600; font-size: 0.9rem; color: var(--muted); cursor: pointer; transition: all 0.15s; }
.type-opt input { display: none; }
.type-opt.active { background: var(--card); box-shadow: var(--shadow); color: var(--fg); }

/* ---------- <dialog> ---------- */
.dialog-el { width: calc(100% - 2rem); max-width: 26rem; border: none; border-radius: var(--r-xl); padding: 0; box-shadow: var(--shadow-lg); background: var(--card); color: var(--fg); }
.dialog-el::backdrop { background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); }
.dialog-form { padding: 1.5rem; }
.dialog-h { font-size: 1.2rem; font-weight: 800; margin: 0 0 1.1rem; }
.dialog-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 1.25rem; }
.dialog-actions .btn-primary, .dialog-actions .btn-secondary { width: auto; flex: 1; }

/* =============================================================================
   Autentifikacijos puslapiai
   ============================================================================= */
.auth-body { background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0f172a 100%); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: 1.5rem 1rem; }
.auth-logo { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; color: #fff; }
.auth-card { width: 100%; max-width: 25rem; padding: 1.75rem; }
.auth-title { font-size: 1.4rem; font-weight: 800; margin: 0 0 0.25rem; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.25rem; }
.auth-links { margin-top: 1.25rem; text-align: center; font-size: 0.88rem; font-weight: 600; }
.auth-links a { color: var(--accent-d); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-divider { margin: 0 0.5rem; color: var(--muted-2); }
.auth-check { display: flex; align-items: center; gap: 0.5rem; margin: -0.2rem 0 1rem; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.auth-check input { width: 1rem; height: 1rem; accent-color: var(--accent); }
.auth-foot { color: rgba(255,255,255,0.4); font-size: 0.8rem; }

/* ---------- Pranešimai ---------- */
.alert { border-radius: var(--r); padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.88rem; font-weight: 600; }
.alert-success { background: #dcfce7; border: 1px solid #86efac; color: #15803d; }
.alert-error   { background: #fee2e2; border: 1px solid #fca5a5; color: #b91c1c; }
.alert-info    { background: #dbeafe; border: 1px solid #93c5fd; color: #1d4ed8; }

/* ---------- Slaptažodžio taisyklės ---------- */
.password-rules { list-style: none; margin: 0.5rem 0 0; padding: 0; font-size: 0.8rem; color: var(--muted); }
.password-rules li { padding-left: 1.25rem; position: relative; margin-top: 2px; }
.password-rules li::before { content: '○'; position: absolute; left: 0.25rem; }
.password-rules li.rule-ok { color: var(--pos); } .password-rules li.rule-ok::before { content: '✓'; }
.password-rules li.rule-fail { color: var(--neg); } .password-rules li.rule-fail::before { content: '✕'; }
.match-msg { display: block; margin-top: 0.35rem; font-size: 0.8rem; font-weight: 600; min-height: 1rem; }
.match-ok { color: var(--pos); } .match-fail { color: var(--neg); }

/* ---------- Paskyros blokas ---------- */
.account-block { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0.25rem 1rem; margin: 1.25rem; }
.account-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; font-weight: 600; font-size: 0.92rem; }
.account-row + .account-row { border-top: 1px solid var(--line); }
.account-label { color: var(--muted); font-weight: 500; }
.card .btn-secondary { width: calc(100% - 2.5rem); margin-left: 1.25rem; margin-right: 1.25rem; }
.danger-zone form { margin: 0; }
