/* EuroApp24 — navy #1C2B45 + Gold-Akzent, mobile-first */
:root {
  --navy:#1C2B45; --navy-2:#2a3d5f; --gold:#C9A24B;
  --bg:#eef1f6; --card:#fff; --ink:#1e293b; --muted:#64748b;
  --income:#16a34a; --expense:#dc2626; --line:#e5e9f0;
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { margin:0; padding:0; }
body { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; background:var(--bg); color:var(--ink);
  padding-bottom:calc(70px + env(safe-area-inset-bottom)); }
button,input,select { font-family:inherit; font-size:16px; }
.hidden { display:none !important; }

/* Login */
.auth-wrap { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px;
  background:linear-gradient(160deg,var(--navy),var(--navy-2)); }
.auth-logo { width:110px; height:110px; margin-bottom:18px; background:#fff; border-radius:24px; padding:10px; object-fit:contain; box-shadow:0 8px 24px rgba(0,0,0,.25); }
.auth-card { background:#fff; border-radius:16px; padding:24px; width:100%; max-width:380px; box-shadow:0 12px 40px rgba(0,0,0,.3); }
.auth-card h1 { margin:0 0 4px; font-size:20px; color:var(--navy); }
.auth-card p.sub { margin:0 0 18px; color:var(--muted); font-size:14px; }
.field { margin-bottom:12px; }
.field label { display:block; font-size:13px; color:var(--muted); margin-bottom:4px; }
.field input { width:100%; padding:12px; border:1px solid var(--line); border-radius:10px; }
.btn { width:100%; padding:13px; border:none; border-radius:10px; background:var(--navy); color:#fff; font-weight:600; cursor:pointer; }
.btn:disabled { opacity:.5; }
.btn-gold { background:var(--gold); color:var(--navy); }
.btn-ghost { background:transparent; color:var(--navy); border:1px solid var(--line); }
.auth-toggle { text-align:center; margin-top:14px; font-size:14px; color:var(--muted); }
.auth-toggle a { color:var(--navy); font-weight:600; text-decoration:none; }
.err { background:#fee2e2; color:#b91c1c; padding:8px 12px; border-radius:8px; font-size:13px; margin-bottom:12px; }

/* Topbar */
.topbar { background:var(--navy); color:#fff; padding:calc(12px + env(safe-area-inset-top)) 16px 12px; display:flex; align-items:center; justify-content:space-between; }
.topbar .title { font-weight:700; letter-spacing:.3px; }
.topbar .logout { background:transparent; border:1px solid rgba(255,255,255,.3); color:#fff; padding:5px 10px; border-radius:8px; font-size:13px; }

/* Screens */
.screen { padding:16px; max-width:560px; margin:0 auto; }
.balance { background:var(--navy); color:#fff; border-radius:16px; padding:20px; text-align:center; margin-bottom:14px; }
.balance .label { font-size:13px; opacity:.75; }
.balance .amount { font-size:34px; font-weight:800; margin-top:2px; }
.balance .amount.neg { color:#fca5a5; }
.cards2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:16px; }
.mini { background:var(--card); border-radius:14px; padding:14px; border:1px solid var(--line); }
.mini .cap { font-size:12px; color:var(--muted); }
.mini .val { font-size:20px; font-weight:700; margin-top:2px; }
.mini .val.in { color:var(--income); } .mini .val.ex { color:var(--expense); }
.mini .sub { font-size:11px; color:var(--muted); margin-top:2px; }

.sec-title { font-size:14px; font-weight:700; color:var(--navy); margin:10px 2px; }
.list { background:var(--card); border-radius:14px; border:1px solid var(--line); overflow:hidden; }
.row { display:flex; align-items:center; gap:10px; padding:11px 14px; border-top:1px solid var(--line); }
.row:first-child { border-top:none; }
.row .dot { width:8px; height:8px; border-radius:50%; flex:0 0 auto; }
.row .dot.in { background:var(--income); } .row .dot.ex { background:var(--expense); }
.row .main { flex:1; min-width:0; }
.row .cat { font-weight:600; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.row .meta { font-size:12px; color:var(--muted); }
.row .amt { font-weight:700; font-variant-numeric:tabular-nums; }
.row .amt.in { color:var(--income); } .row .amt.ex { color:var(--expense); }
.row .del { background:none; border:none; color:#cbd5e1; font-size:18px; padding:2px 4px; cursor:pointer; }
.row .del:hover { color:var(--expense); }
.tax-badge { font-size:10px; background:#fef3c7; color:#92400e; padding:1px 5px; border-radius:5px; margin-left:6px; }
.empty { text-align:center; color:var(--muted); padding:24px; font-size:14px; }

/* Form */
.seg { display:flex; background:#e2e8f0; border-radius:12px; padding:4px; margin-bottom:14px; }
.seg button { flex:1; padding:10px; border:none; background:transparent; border-radius:9px; font-weight:600; color:var(--muted); cursor:pointer; }
.seg button.active-ex { background:var(--expense); color:#fff; }
.seg button.active-in { background:var(--income); color:#fff; }
.form-card { background:var(--card); border-radius:14px; border:1px solid var(--line); padding:16px; }
.form-card .field select, .form-card .field input, .form-card .field textarea { width:100%; padding:12px; border:1px solid var(--line); border-radius:10px; }
.amount-input { font-size:26px !important; font-weight:700; text-align:center; }
.check { display:flex; align-items:center; gap:8px; font-size:14px; }
.check input { width:20px; height:20px; }

/* Kategorien */
.cat-group { margin-bottom:8px; }
.cat-main { font-weight:700; color:var(--navy); padding:10px 14px; background:var(--card); border:1px solid var(--line); border-radius:12px; display:flex; justify-content:space-between; align-items:center; }
.cat-subs { padding:2px 0 6px; }
.cat-sub { display:flex; justify-content:space-between; align-items:center; padding:8px 14px 8px 26px; font-size:14px; }
.chip { font-size:11px; background:#eef2f7; color:var(--muted); padding:2px 7px; border-radius:6px; }

/* Bottom nav */
.nav { position:fixed; left:0; right:0; bottom:0; background:#fff; border-top:1px solid var(--line);
  display:flex; padding-bottom:env(safe-area-inset-bottom); z-index:20; }
.nav button { flex:1; background:none; border:none; padding:10px 0 12px; color:var(--muted); font-size:11px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:3px; }
.nav button .ico { font-size:20px; }
.nav button.active { color:var(--navy); font-weight:700; }
.fab { position:fixed; right:18px; bottom:calc(78px + env(safe-area-inset-bottom)); width:56px; height:56px; border-radius:50%;
  background:var(--gold); color:var(--navy); border:none; font-size:30px; box-shadow:0 6px 20px rgba(0,0,0,.25); z-index:21; cursor:pointer; }
