/* NEXDEPT by Andrerer – Oberfläche
   Farbwelt aus dem Logo: Dunkelrot #450A0A, Koralle #F87171.
   „Ich schulde“ = Rot, „Mir wird geschuldet“ = Grün – überall gleich. */

:root {
  color-scheme: light;
  --bg: #faf6f6;
  --surface: #ffffff;
  --surface-2: #f8f1f1;
  --surface-3: #f1e6e6;
  --border: #ecdfdf;
  --border-strong: #dccaca;
  --text: #2a1414;
  --text-2: #4a2d2d;
  --muted: #7d6464;
  --primary: #b91c1c;
  --primary-hover: #991b1b;
  --primary-soft: #fdeaea;
  --primary-text: #991b1b;
  --ring: rgba(220, 38, 38, .25);

  --head-bg: #450a0a;
  --head-bg-2: #5c1010;
  --head-text: #fde4e4;
  --head-muted: #e3afaf;

  --owe: #c81e1e;   --owe-bg: #fdecec;   --owe-soft: #fff6f6;
  --owed: #15803d;  --owed-bg: #e3f6e9;  --owed-soft: #f4fbf6;

  --ok: #15803d;    --ok-bg: #e3f6e9;
  --warn: #a16207;  --warn-bg: #fdf3d7;
  --bad: #b91c1c;   --bad-bg: #fde7e7;
  --info: #1d4ed8;  --info-bg: #e2ebfe;
  --neutral: #6b5959; --neutral-bg: #f1eaea;

  --shadow-sm: 0 1px 2px rgba(69, 10, 10, .06);
  --shadow: 0 1px 3px rgba(69, 10, 10, .07), 0 6px 18px rgba(69, 10, 10, .05);
  --shadow-lg: 0 20px 50px rgba(69, 10, 10, .22);
  --radius: 14px;
  --radius-sm: 9px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #160909;
    --surface: #211010;
    --surface-2: #2a1515;
    --surface-3: #351c1c;
    --border: #3a2020;
    --border-strong: #4d2b2b;
    --text: #fbeeee;
    --text-2: #ecd3d3;
    --muted: #b99a9a;
    --primary: #ef4444;
    --primary-hover: #dc2626;
    --primary-soft: rgba(248, 113, 113, .15);
    --primary-text: #fca5a5;
    --ring: rgba(248, 113, 113, .35);
    --head-bg: #1d0606;
    --head-bg-2: #2b0a0a;
    --owe: #f87171;  --owe-bg: rgba(248, 113, 113, .14);  --owe-soft: rgba(248, 113, 113, .05);
    --owed: #4ade80; --owed-bg: rgba(74, 222, 128, .13);  --owed-soft: rgba(74, 222, 128, .05);
    --ok: #4ade80;   --ok-bg: rgba(74, 222, 128, .13);
    --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .13);
    --bad: #f87171;  --bad-bg: rgba(248, 113, 113, .13);
    --info: #93c5fd; --info-bg: rgba(147, 197, 253, .13);
    --neutral: #cdb5b5; --neutral-bg: rgba(205, 181, 181, .12);
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #160909;
  --surface: #211010;
  --surface-2: #2a1515;
  --surface-3: #351c1c;
  --border: #3a2020;
  --border-strong: #4d2b2b;
  --text: #fbeeee;
  --text-2: #ecd3d3;
  --muted: #b99a9a;
  --primary: #ef4444;
  --primary-hover: #dc2626;
  --primary-soft: rgba(248, 113, 113, .15);
  --primary-text: #fca5a5;
  --ring: rgba(248, 113, 113, .35);
  --head-bg: #1d0606;
  --head-bg-2: #2b0a0a;
  --owe: #f87171;  --owe-bg: rgba(248, 113, 113, .14);  --owe-soft: rgba(248, 113, 113, .05);
  --owed: #4ade80; --owed-bg: rgba(74, 222, 128, .13);  --owed-soft: rgba(74, 222, 128, .05);
  --ok: #4ade80;   --ok-bg: rgba(74, 222, 128, .13);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .13);
  --bad: #f87171;  --bad-bg: rgba(248, 113, 113, .13);
  --info: #93c5fd; --info-bg: rgba(147, 197, 253, .13);
  --neutral: #cdb5b5; --neutral-bg: rgba(205, 181, 181, .12);
  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
}

/* ------------------------------------------------------------------ Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.grow { flex: 1; min-width: 0; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.c-owe { color: var(--owe); }
.c-owed { color: var(--owed); }

.boot { min-height: 100vh; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: var(--muted); }
.boot img { border-radius: 12px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; transform: scale(.96); } }

/* ------------------------------------------------------------------ Kopfzeile */
.head { position: sticky; top: 0; z-index: 20; background: linear-gradient(180deg, var(--head-bg), var(--head-bg-2)); color: var(--head-text); }
.head .in { max-width: 1120px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 18px; height: 60px; }
.head .brand img { height: 30px; display: block; }
.tabs { display: flex; gap: 2px; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px; border-radius: 9px;
  color: var(--head-text); font-weight: 550; opacity: .82; text-decoration: none;
}
.tabs a:hover { background: rgba(255, 255, 255, .07); opacity: 1; }
.tabs a.on { background: rgba(248, 113, 113, .2); opacity: 1; color: #fff; }
.tabs a .count { min-width: 20px; padding: 0 6px; border-radius: 20px; background: rgba(255, 255, 255, .14); font-size: 11.5px; line-height: 19px; text-align: center; }
.head .me { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--head-text); }
.head .me:hover { text-decoration: none; }
.head .me .nm { font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .15); }
.dot.off { background: #f87171; box-shadow: 0 0 0 3px rgba(248, 113, 113, .15); }
.dot.wait { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .15); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #f87171, #b91c1c); color: #fff; font-weight: 700; font-size: 12.5px;
}
.avatar.owe { background: var(--owe-bg); color: var(--owe); }
.avatar.owed { background: var(--owed-bg); color: var(--owed); }
.avatar.even { background: var(--neutral-bg); color: var(--neutral); }

.content { max-width: 1120px; margin: 0 auto; padding: 24px 20px 90px; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .titles { flex: 1; min-width: 200px; }
.page-head .titles p { margin: 4px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Bausteine */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h2 { flex: 1; display: flex; align-items: center; gap: 9px; }
.card-head .total { font-size: 15px; }
.card-body { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }

/* Zusammenfassung */
.sums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.sum {
  position: relative; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.sum .label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.sum .label .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.sum .label .ic svg { width: 16px; height: 16px; }
.sum .value { margin-top: 8px; font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sum .sub { font-size: 12.5px; color: var(--muted); }
.sum.owe { background: var(--owe-soft); }
.sum.owe .ic { background: var(--owe-bg); color: var(--owe); }
.sum.owe .value { color: var(--owe); }
.sum.owed { background: var(--owed-soft); }
.sum.owed .ic { background: var(--owed-bg); color: var(--owed); }
.sum.owed .value { color: var(--owed); }
.sum.net { background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%); border-color: transparent; color: #fff; overflow: hidden; }
.sum.net .label { color: #fecaca; }
.sum.net .label .ic { background: rgba(255, 255, 255, .14); color: #fff; }
.sum.net .sub { color: #fecaca; }
.sum.net::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(248, 113, 113, .4), transparent 70%); }

/* Schnell erfassen */
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.quick button {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1.5px dashed var(--border-strong); background: var(--surface); color: var(--text); font: inherit; text-align: left;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.quick button .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.quick button b { display: block; font-size: 15px; }
.quick button small { display: block; font-size: 12.5px; }
.quick .owe .ic { background: var(--owe-bg); color: var(--owe); }
.quick .owed .ic { background: var(--owed-bg); color: var(--owed); }
.quick .owe:hover { border-color: var(--owe); border-style: solid; box-shadow: 0 0 0 3px var(--owe-bg); }
.quick .owed:hover { border-color: var(--owed); border-style: solid; box-shadow: 0 0 0 3px var(--owed-bg); }

/* Schulden-Liste */
.debts > .debt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--border);
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.debts > .debt:last-child { border-bottom: 0; }
.debts > .debt:hover { background: var(--surface-2); }
.debt .who { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debt .what { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debt .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.debt .end { text-align: right; flex: none; }
.debt .end .amt { font-size: 15px; display: block; }
.debt .end small { font-size: 12px; display: block; }
.bar { height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin-top: 6px; width: 90px; margin-left: auto; }
.bar > i { display: block; height: 100%; border-radius: 5px; background: currentColor; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.owe { background: var(--owe-bg); color: var(--owe); }
.badge.owed { background: var(--owed-bg); color: var(--owed); }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .ic { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.empty .ic svg { width: 22px; height: 22px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0 auto 12px; max-width: 340px; }

/* Personen */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.person { padding: 16px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.person:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.person .top { display: flex; align-items: center; gap: 12px; }
.person .top b { display: block; font-size: 15px; }
.person .say { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; background: var(--surface-2); }
.person .say.owe { background: var(--owe-bg); color: var(--owe); }
.person .say.owed { background: var(--owed-bg); color: var(--owed); }
.person .say .amt { font-size: 16px; }
.person .split { display: flex; gap: 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* Detail */
.detail-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.detail-top .big { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 7px 12px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pays { margin: 14px 0 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 10px; }
.pays li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.pays li:last-child { border-bottom: 0; }
.pays li.total { background: var(--surface-2); font-weight: 650; border-radius: 0 0 10px 10px; }
.section-t { margin: 18px 0 6px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 500 13.5px/1 var(--font); cursor: pointer;
  white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg.i { width: 16px; height: 16px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 44px; padding: 0 18px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }

/* Formulare */
.form { display: grid; gap: 14px; }
.form .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.field > small { font-size: 12px; }
input, select, textarea {
  width: 100%; min-width: 0; height: 40px; padding: 0 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 14px var(--font); transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 70px; padding: 9px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.money-in { position: relative; }
.money-in input { padding-right: 34px; font-size: 20px; font-weight: 700; height: 50px; font-variant-numeric: tabular-nums; }
.money-in::after { content: "€"; position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 17px; font-weight: 600; }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { padding-left: 34px; height: 36px; }
.more { border: 0; padding: 0; margin: 0; }
.more summary { cursor: pointer; color: var(--primary-text); font-weight: 550; font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { margin-bottom: 12px; }
.more > div { display: grid; gap: 14px; }

/* Richtung wählen (Ich schulde / Mir wird geschuldet) */
.dir { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 12px; background: var(--surface-2); }
.dir input { position: absolute; opacity: 0; pointer-events: none; }
.dir label {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 9px; cursor: pointer;
  color: var(--muted); font-weight: 650; font-size: 13.5px; text-align: center; line-height: 1.2; padding: 0 8px;
}
.dir input:focus-visible + label { outline: 2px solid var(--primary); outline-offset: 1px; }
.dir input[value="owe"]:checked + label { background: var(--surface); color: var(--owe); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--owe); }
.dir input[value="owed"]:checked + label { background: var(--surface); color: var(--owed); box-shadow: var(--shadow-sm), inset 0 0 0 1.5px var(--owed); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: 500 12.5px var(--font); cursor: pointer;
}
.chip:hover { border-color: var(--border-strong); }
.chip.on { background: var(--primary-soft); border-color: transparent; color: var(--primary-text); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 340px; }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: 13.5px; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert svg { margin-top: 1px; }
.alert p { margin: 0; color: inherit; }

/* Mobiler „+“-Knopf */
.fab {
  display: none; position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 58px; height: 58px; border-radius: 50%;
  border: 0; background: var(--primary); color: #fff; box-shadow: 0 10px 28px rgba(185, 28, 28, .45); cursor: pointer;
  align-items: center; justify-content: center;
}
.fab svg.i { width: 26px; height: 26px; stroke-width: 2.2; }

/* ------------------------------------------------------------------ Modal & Toast */
.modal-bg {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 16px; background: rgba(30, 6, 6, .55); backdrop-filter: blur(3px); overflow-y: auto; animation: fade .14s ease-out;
}
.modal { width: 100%; max-width: 500px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: rise .16s ease-out; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { flex: 1; font-size: 17px; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 18px 18px; }
.modal-foot .left { margin-right: auto; display: flex; gap: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }

#toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 200; display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 380px; padding: 11px 14px;
  border-radius: 10px; background: #450a0a; color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: rise .16s ease-out;
}
.toast.bad { background: #7f1d1d; }
.toast.ok svg { color: #86efac; }

/* ------------------------------------------------------------------ Anmeldung */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-art {
  position: relative; overflow: hidden; padding: 48px; color: #fde4e4; display: flex; flex-direction: column;
  background:
    radial-gradient(800px 400px at 110% -10%, rgba(248, 113, 113, .32), transparent 60%),
    radial-gradient(600px 500px at -10% 110%, rgba(220, 38, 38, .38), transparent 60%),
    linear-gradient(160deg, #450a0a 0%, #2a0606 100%);
}
.auth-art::before {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(circle at 70% 40%, #000, transparent 75%);
}
.auth-art > * { position: relative; }
.auth-art img { height: 44px; width: auto; align-self: flex-start; }
.auth-art .claim { margin-top: auto; max-width: 480px; }
.auth-art h1 { font-size: 34px; line-height: 1.15; color: #fff; letter-spacing: -.02em; }
.auth-art h1 em { font-style: normal; background: linear-gradient(90deg, #fca5a5, #fecaca); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art .claim p { margin-top: 14px; color: #f3c4c4; font-size: 15px; }
.auth-art ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 10px; }
.auth-art li { display: flex; gap: 10px; align-items: center; color: #fde4e4; }
.auth-art li svg { color: #fca5a5; }
.auth-art .fine { margin-top: 40px; font-size: 12px; color: #d59a9a; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .logo-m { display: none; height: 34px; margin-bottom: 24px; }
.auth-box h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.auth-box > p { color: var(--muted); margin-bottom: 22px; }
.auth-box .switch { margin-top: 18px; text-align: center; color: var(--muted); }
.auth-box .err { margin-bottom: 14px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface-2); margin-bottom: 20px; }
.tabs2 button { height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: 600 13px var(--font); cursor: pointer; }
.tabs2 button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ Responsiv */
@media (max-width: 900px) {
  .sums { grid-template-columns: 1fr 1fr; }
  .sums .net { grid-column: 1 / -1; }
  .g2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-box .logo-m { display: block; }
}
@media (max-width: 700px) {
  .head .in { height: auto; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px 0; }
  .head .brand img { height: 26px; }
  .head .me .nm { display: none; }
  .tabs { order: 3; width: calc(100% + 28px); margin: 0 -14px; padding: 0 10px 8px; overflow-x: auto; }
  .tabs a { height: 34px; padding: 0 11px; flex: none; }
  .content { padding: 16px 14px 100px; }
  .quick { display: none; }
  .fab { display: inline-flex; }
  .sum .value { font-size: 22px; margin-top: 6px; }
  .sum { padding: 12px 14px; }
  .sum .label .ic { width: 24px; height: 24px; }
  .sums { gap: 10px; }
  .page-head .actions, .page-head .actions .search { width: 100%; }
  .debts > .debt { padding: 12px 14px; }
  .card-head { padding: 12px 14px; }
  #toast-root { bottom: 88px; }
}
@media (max-width: 560px) {
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { border-radius: 18px 18px 0 0; max-width: none; }
  .modal-foot { border-radius: 0; }
  .form .cols { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 100px 1fr; }
}
@media (max-width: 330px) {
  .sums { grid-template-columns: 1fr; }
}
