* { box-sizing: border-box; }
:root {
    --bg: #eef8ff;
    --card: #ffffff;
    --text: #0f2336;
    --muted: #66788a;
    --primary: #00a8e8;
    --primary-dark: #0077c8;
    --success: #13a66f;
    --danger: #e44c4c;
    --gold: #ffc933;
    --line: #dbeaf5;
    --shadow: 0 18px 55px rgba(14, 70, 120, .14);
    --radius: 24px;
}
html, body { margin: 0; min-height: 100%; background: linear-gradient(180deg, #dff5ff 0%, var(--bg) 34%, #f8fbff 100%); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
a { color: inherit; text-decoration: none; }
.app-shell { width: min(100%, 620px); margin: 0 auto; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; backdrop-filter: blur(16px); background: rgba(238, 248, 255, .84); border-bottom: 1px solid rgba(255,255,255,.72); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand img { border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 131, 204, .18); }
.top-actions { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.top-actions a { padding: 8px 10px; border-radius: 999px; background: rgba(255,255,255,.75); color: var(--primary-dark); font-weight: 700; }
.content { padding: 16px 14px 36px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(28px, 7vw, 42px); margin-bottom: 6px; letter-spacing: -.04em; }
h2 { font-size: 19px; margin-bottom: 12px; letter-spacing: -.025em; }
.muted { color: var(--muted); }
.notice { padding: 12px 14px; border-radius: 16px; margin-bottom: 12px; font-weight: 700; background: #eaf9f2; color: #0a6c45; border: 1px solid #c9efdc; }
.notice.error { background: #fff0f0; color: #a52828; border-color: #ffd1d1; }
.hero-card, .card, .child-card, .account-hero { background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); border-radius: var(--radius); }
.login-card { margin-top: 18px; padding: 26px 20px; text-align: center; overflow: hidden; position: relative; }
.login-card:before { content: ""; position: absolute; inset: -100px -90px auto auto; width: 220px; height: 220px; background: radial-gradient(circle, rgba(255,201,51,.42), transparent 65%); }
.login-logo { width: 118px; height: 118px; border-radius: 28px; box-shadow: 0 20px 46px rgba(0,128,220,.25); margin-bottom: 14px; }
.form-stack { display: grid; gap: 12px; text-align: left; }
.form-stack.compact { gap: 10px; }
label { display: grid; gap: 6px; min-width: 0; color: #365169; font-size: 14px; font-weight: 800; }
input, select { width: 100%; min-width: 0; max-width: 100%; display: block; border: 1px solid var(--line); border-radius: 16px; padding: 13px 13px; font-size: 16px; background: #fbfdff; color: var(--text); outline: none; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,168,232,.12); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.checkline { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.checkline input { width: 20px; height: 20px; }
.btn { border: 0; border-radius: 17px; padding: 14px 16px; font-size: 16px; font-weight: 900; cursor: pointer; color: white; background: var(--primary); box-shadow: 0 10px 24px rgba(0, 131, 204, .19); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.btn.secondary { background: #173e63; }
.btn.success { background: var(--success); }
.btn.danger { background: var(--danger); }
.btn.outline { background: transparent; color: var(--danger); border: 1px solid #ffd1d1; box-shadow: none; }
.button-row { display: grid; gap: 10px; }
.button-row.two { grid-template-columns: 1fr 1fr; }
.page-title { padding: 10px 2px 6px; }
.page-title p { color: var(--muted); margin-bottom: 8px; }
.children-grid { display: grid; gap: 13px; }
.child-card { display: block; padding: 18px; transition: transform .16s ease, box-shadow .16s ease; }
.child-card:active { transform: scale(.985); }
.child-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, #00c2ff, #006de8); color: white; font-weight: 900; font-size: 24px; box-shadow: 0 10px 25px rgba(0,130,215,.2); }
.child-card h2 { margin: 0; }
.balance { font-weight: 950; letter-spacing: -.05em; }
.balance.big { font-size: 36px; margin: 6px 0 10px; }
.balance.huge { font-size: clamp(34px, 11vw, 56px); color: white; text-shadow: 0 4px 20px rgba(0,0,0,.17); }
.last-booking { margin: 0 0 12px; font-size: 14px; }
.pill { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; padding: 7px 10px; background: #fff5cf; color: #805a00; font-size: 13px; font-weight: 800; }
.muted-pill { background: #edf3f8; color: var(--muted); }
.account-hero { padding: 20px; margin-bottom: 14px; background: radial-gradient(circle at 10% 0%, rgba(255,201,51,.4), transparent 34%), linear-gradient(135deg, #00b7ef, #006de8); color: white; overflow: hidden; }
.account-hero p { margin-bottom: 12px; opacity: .9; font-weight: 700; }
.back-link { display: inline-flex; margin-bottom: 10px; color: rgba(255,255,255,.9); font-weight: 800; }
.card { padding: 17px; margin-bottom: 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.section-head span { color: var(--muted); font-size: 13px; font-weight: 800; }
.chart-card canvas { width: 100%; height: 180px; display: block; }
.transactions { display: grid; gap: 10px; }
.tx-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 13px; border-radius: 18px; background: #f8fbff; border: 1px solid var(--line); }
.tx-date { color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.tx-main strong { display: block; margin-bottom: 4px; }
.tx-side { display: grid; align-content: start; justify-items: end; gap: 8px; }
.tx-amount { font-weight: 950; font-size: 17px; white-space: nowrap; }
.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--danger); }
.tx-actions { display: flex; gap: 8px; }
.tx-actions form { margin: 0; }
.link-btn { appearance: none; border: 0; background: transparent; color: var(--primary-dark); font-weight: 900; padding: 0; font-size: 12px; cursor: pointer; }
.danger-link { color: var(--danger); }
.user-list { display: grid; gap: 14px; }
.user-edit { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: #f8fbff; }
@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .content { padding-left: 12px; padding-right: 12px; }
    .button-row.two { grid-template-columns: 1fr; }
    .top-actions a { padding: 7px 8px; font-size: 13px; }
    .tx-item { grid-template-columns: 1fr; }
    .tx-side { justify-items: start; }
}


/* v1.4: iOS/Safari-Fix für Formularfelder.
   Das native date-input kann auf iPhones eine eigene Mindestbreite erzwingen.
   Deshalb wird das Buchungsformular explizit als einspaltiges Formular gesetzt
   und das Date-Feld optisch als normales Textfeld gerendert. */
.booking-form,
.allowance-form,
.interest-form,
.booking-form *,
.allowance-form *,
.interest-form * {
    min-width: 0;
    max-width: 100%;
}
.booking-form .form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.booking-form label,
.allowance-form label,
.interest-form label {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.booking-form input,
.allowance-form input,
.allowance-form select,
.interest-form input,
.interest-form select {
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-inline-size: 100% !important;
    box-sizing: border-box !important;
}
.booking-form input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    max-inline-size: 100% !important;
    text-align: left;
    line-height: normal;
}
.booking-form input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    min-width: 0;
    max-width: 100%;
    margin: 0;
}
@media (max-width: 760px) {
    .card { overflow: hidden; }
    .booking-form .form-row { display: block !important; }
    .booking-form .form-row > label { display: grid; margin-bottom: 12px; }
    .booking-form .form-row > label:last-child { margin-bottom: 0; }
}

/* v1.5: Zeitraumfilter für das Kontoverlauf-Diagramm. */
.chart-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 12px 0 8px;
}
.chart-filter-btn {
    appearance: none;
    border: 1px solid var(--line);
    background: #f8fbff;
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 6px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}
.chart-filter-btn.active {
    border-color: rgba(0, 168, 232, .38);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 8px 18px rgba(0, 131, 204, .16);
}
@media (max-width: 360px) {
    .chart-filter-btn { font-size: 11px; padding-left: 4px; padding-right: 4px; }
}

/* v1.6: PIN-Sperrbildschirm. */
.pin-card p { max-width: 420px; margin-left: auto; margin-right: auto; }
.pin-form { max-width: 360px; margin: 0 auto; }
.pin-form input[name="pin"] {
    text-align: center;
    letter-spacing: .18em;
    font-size: 24px;
    font-weight: 900;
}
.logout-under-pin {
    display: inline-flex;
    justify-content: center;
    color: var(--primary-dark);
    font-weight: 800;
    padding: 8px 0 0;
}

/* v2.0: Admin-/Banker-Rechte und Kinderfreigaben. */
.full-link {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    text-align: center;
    margin-top: 10px;
}
.permission-box {
    display: grid;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fbfdff;
}
.permission-box > strong {
    font-size: 14px;
    color: var(--text);
}
.permission-box p {
    margin-bottom: 0;
    font-size: 13px;
    line-height: 1.35;
}
.child-permission-list {
    display: grid;
    gap: 8px;
}
.user-edit-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}
.user-edit-head > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.role-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
.role-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 8px;
    background: #edf3f8;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
@media (max-width: 420px) {
    .user-edit-head { grid-template-columns: 1fr; }
    .role-pills { justify-content: flex-start; }
}

/* v2.1: übersichtlichere Benutzerverwaltung, Lightbox und klickbare Diagrammpunkte. */
.users-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.add-user-fab {
    white-space: nowrap;
    padding-left: 18px;
    padding-right: 18px;
}
.user-group {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}
.user-group:first-of-type { margin-top: 0; }
.user-group h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 0 2px;
    font-size: 16px;
    letter-spacing: -.02em;
}
.user-group h3 span {
    display: inline-flex;
    min-width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #edf3f8;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 950;
}
.empty-group { margin: 0 0 4px; font-size: 14px; }
.user-accordion {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #f8fbff;
    overflow: hidden;
}
.user-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 14px;
    cursor: pointer;
    list-style: none;
}
.user-summary::-webkit-details-marker { display: none; }
.user-summary:after {
    content: "⌄";
    grid-column: 1 / -1;
    justify-self: center;
    color: var(--muted);
    font-weight: 950;
    line-height: 1;
    transform: translateY(-2px);
}
.user-accordion[open] .user-summary:after { content: "⌃"; }
.user-summary-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.user-summary-main strong,
.user-summary-main span { overflow-wrap: anywhere; }
.user-accordion .user-edit {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: #ffffff;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: end center;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    background: rgba(15, 35, 54, .44);
    backdrop-filter: blur(10px);
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
    width: min(100%, 620px);
    max-height: min(86vh, 820px);
    overflow: auto;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(5, 27, 48, .32);
    padding: 18px;
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.modal-head h2 { margin: 0; }
.modal-close {
    appearance: none;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #edf3f8;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
}
body.modal-open { overflow: hidden; }
.report-cron-box {
    display: grid;
    gap: 6px;
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fbff;
    font-size: 13px;
}
.report-cron-box code {
    display: block;
    overflow-x: auto;
    padding: 8px;
    border-radius: 12px;
    background: #173e63;
    color: #fff;
    font-size: 12px;
}
.chart-point-info {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}
.chart-point-info.active {
    background: #fff5cf;
    border-color: rgba(255,201,51,.8);
    color: #805a00;
}
@media (max-width: 520px) {
    .users-title-row { display: grid; }
    .add-user-fab { width: 100%; }
    .user-summary { grid-template-columns: 1fr; }
    .role-pills { justify-content: flex-start; }
    .modal-card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
}


/* v2.2: Zinsverwaltung und tagegenaue Monatszinsen. */
.interest-card {
    display: grid;
    gap: 12px;
}
.interest-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.interest-summary-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid var(--line);
}
.interest-summary-item span,
.interest-summary-item small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}
.interest-summary-item strong {
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -.03em;
}
.interest-summary-item.accent {
    background: #fff5cf;
    border-color: rgba(255,201,51,.8);
}
.interest-summary-item.accent strong {
    color: #805a00;
}
.interest-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}
.interest-form {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
@media (max-width: 560px) {
    .interest-summary-grid { grid-template-columns: 1fr; }
}

/* v2.3: Kind-Detailansicht für Banker sortiert und Einstellungsbereiche einklappbar. */
.settings-details {
    padding: 0;
    overflow: hidden;
}
.settings-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.settings-summary::-webkit-details-marker { display: none; }
.settings-summary h2 {
    margin: 0 0 4px;
}
.settings-summary span:not(.settings-chevron) {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
}
.settings-chevron {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #edf3f8;
    color: var(--primary-dark);
    font-weight: 950;
}
.settings-details[open] .settings-chevron {
    transform: rotate(180deg);
}
.settings-details > form,
.settings-details > .interest-summary-grid,
.settings-details > .interest-note {
    margin-left: 17px;
    margin-right: 17px;
}
.settings-details > form {
    margin-bottom: 17px;
}
.settings-details > .interest-summary-grid,
.settings-details > .interest-note {
    margin-bottom: 12px;
}
.settings-details > .interest-form {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.child-interest-card {
    margin-top: 0;
}

/* v2.4: Infinite Scroll für die Umsatzliste. */
.tx-hidden {
    display: none !important;
}
.tx-infinite-footer {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 6px 0 0;
}
.tx-scroll-sentinel {
    width: 100%;
    height: 1px;
}
.tx-load-more {
    width: 100%;
    max-width: 280px;
    padding: 12px 14px;
    font-size: 14px;
    box-shadow: none;
}
.tx-load-hint {
    margin: 0;
    text-align: center;
    font-size: 12px;
}
.tx-infinite-footer.finished .tx-load-more,
.tx-infinite-footer.finished .tx-load-hint,
.tx-infinite-footer.finished .tx-scroll-sentinel {
    display: none;
}


/* v2.5: Accordion-Header sauber in einer Zeile, ohne nativen Summary-Marker. */
.settings-summary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
}
.settings-summary::marker {
    content: '';
    font-size: 0;
}
.settings-summary::-webkit-details-marker {
    display: none;
}
.settings-summary-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-summary-head h2 {
    margin: 0;
    line-height: 1.2;
}
.settings-summary-subline {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
    margin-left: 44px;
}
.settings-chevron {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}
@media (max-width: 640px) {
    .settings-summary-subline {
        margin-left: 38px;
    }
}


/* v2.6: Accordion-Header und Checkboxen weiter verfeinert. */
.settings-summary-head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-chevron {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    display: inline-block;
    background: transparent;
    color: #111827;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    border-radius: 0;
}
.settings-details[open] .settings-summary-subline {
    display: none;
}
.compact-toggle {
    gap: 8px;
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
}
.compact-toggle input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}
@media (max-width: 640px) {
    .compact-toggle {
        font-size: 13px;
    }
}


/* v2.7: Detailansichten optisch vereinheitlicht. */
.child-detail {
    display: grid;
    gap: 14px;
}

.detail-card {
    border: 1px solid rgba(204, 224, 239, .72);
    box-shadow: 0 18px 45px rgba(8, 45, 78, .08);
    overflow: hidden;
}

.detail-card > h2,
.detail-card .card-head h2,
.detail-card .settings-summary h2 {
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.detail-card .card-head {
    align-items: center;
    margin-bottom: 14px;
}

.detail-card .card-head .muted,
.detail-card .settings-summary-subline,
.detail-card .interest-note {
    color: #587089;
}

.booking-card,
.transaction-card,
.chart-card {
    padding: 18px;
}

.booking-card h2,
.transaction-card h2 {
    margin-bottom: 14px;
}

.booking-card .form-stack,
.settings-details .form-stack {
    background: linear-gradient(180deg, rgba(248, 252, 255, .96), rgba(255, 255, 255, .92));
    border: 1px solid rgba(204, 224, 239, .7);
    border-radius: 22px;
    padding: 14px;
}

.booking-card .form-row,
.settings-details .form-row {
    gap: 12px;
}

.booking-card label,
.settings-details label {
    color: #31506b;
}

.booking-card input,
.settings-details input,
.settings-details select {
    background: #fff;
    border-color: rgba(204, 224, 239, .95);
}

.booking-card .button-row {
    margin-top: 2px;
}

.settings-details {
    padding: 0;
}

.settings-summary {
    padding: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,255,.92));
    border-bottom: 1px solid transparent;
}

.settings-details[open] .settings-summary {
    border-bottom-color: rgba(204, 224, 239, .7);
}

.settings-summary-head h2 {
    font-size: 19px;
}

.settings-chevron {
    transform-origin: center;
    transition: transform .16s ease;
}

.settings-details[open] .settings-chevron {
    transform: rotate(180deg);
}

.settings-details > form,
.settings-details > .interest-summary-grid,
.settings-details > .interest-note {
    margin-left: 18px;
    margin-right: 18px;
}

.settings-details > form {
    margin-top: 14px;
    margin-bottom: 18px;
}

.settings-details > .interest-summary-grid {
    margin-top: 14px;
}

.interest-summary-grid {
    gap: 10px;
}

.interest-summary-item {
    border-radius: 18px;
    background: #fbfdff;
    border-color: rgba(204, 224, 239, .85);
}

.interest-summary-item.accent {
    background: #fff6d8;
    border-color: rgba(255, 191, 0, .5);
}

.transaction-card {
    display: grid;
    gap: 12px;
}

.transaction-list {
    display: grid;
    gap: 10px;
}

.transaction-item {
    border: 1px solid rgba(204, 224, 239, .75);
    border-radius: 18px;
    padding: 13px;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    box-shadow: 0 10px 22px rgba(8, 45, 78, .045);
}

.transaction-item .transaction-main,
.transaction-item .transaction-meta {
    min-width: 0;
}

.transaction-item strong,
.transaction-item span,
.transaction-item small {
    overflow-wrap: anywhere;
}

.load-more-wrap {
    margin-top: 2px;
}

.chart-card canvas {
    max-width: 100%;
}

.compact-toggle {
    align-items: center;
    min-height: 28px;
}

@media (max-width: 640px) {
    .child-detail {
        gap: 12px;
    }

    .booking-card,
    .transaction-card,
    .chart-card {
        padding: 16px;
    }

    .detail-card > h2,
    .detail-card .card-head h2,
    .detail-card .settings-summary h2 {
        font-size: 20px;
    }

    .settings-summary {
        padding: 16px;
    }

    .settings-details > form,
    .settings-details > .interest-summary-grid,
    .settings-details > .interest-note {
        margin-left: 16px;
        margin-right: 16px;
    }

    .booking-card .form-stack,
    .settings-details .form-stack {
        padding: 12px;
        border-radius: 20px;
    }

    .transaction-item {
        border-radius: 16px;
        padding: 12px;
    }
}


/* v2.8: Gefülltes Dreieck im Accordion + Euro-Suffix bei Betragsfeldern. */
.settings-summary-head {
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-summary-head h2 {
    margin: 0;
    display: flex;
    align-items: center;
    min-height: 22px;
}
.settings-chevron {
    width: 0;
    height: 0;
    flex: 0 0 auto;
    display: inline-block;
    background: transparent;
    border-style: solid;
    border-width: 6px 0 6px 9px;
    border-color: transparent transparent transparent #111827;
    transform: none;
    transition: transform .16s ease;
    margin-left: 2px;
}
.settings-details[open] .settings-chevron {
    border-width: 9px 6px 0 6px;
    border-color: #111827 transparent transparent transparent;
    transform: none;
}
.input-suffix-wrap {
    position: relative;
}
.input-suffix-wrap input {
    padding-right: 42px;
}
.input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #587089;
    font-size: 16px;
    font-weight: 900;
    pointer-events: none;
}


/* v2.9: Zinsinfo in der Banker-Übersicht. */
.pill-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.info-pill {
    background: #eaf5ff;
    color: #1d5f91;
}


/* v2.10: Sichtbarer Begriff „Banker“ durch „Eltern“ ersetzt. Technische Rolle bleibt kompatibel. */


/* v2.11: Verwalterstatus, Sparziel, Fortschritt und Konfetti. */
.goal-hero-box {
    margin-top: 16px;
    padding: 13px;
    border-radius: 20px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.34);
    backdrop-filter: blur(8px);
}
.goal-hero-head,
.goal-summary-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.goal-hero-head strong,
.goal-summary-line strong { overflow-wrap: anywhere; }
.goal-hero-head span,
.goal-summary-line span { font-weight: 950; white-space: nowrap; }
.goal-progress {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.32);
    overflow: hidden;
    margin: 9px 0 8px;
}
.goal-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffc933, #fff3a6);
    box-shadow: 0 0 20px rgba(255,201,51,.45);
}
.goal-progress.light {
    background: #eaf3fb;
}
.goal-progress.light span {
    background: linear-gradient(90deg, #00a8e8, #ffc933);
}
.goal-hero-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
}
.goal-summary-card {
    margin: 14px 18px 0;
    padding: 14px;
    border: 1px solid rgba(204, 224, 239, .85);
    border-radius: 20px;
    background: #fbfdff;
}
.goal-summary-card p { margin: 8px 0 0; }
.savings-goal-card .goal-form,
.child-profile-card .child-profile-form { margin-top: 14px; }
.tx-actor {
    display: block;
    margin-top: 2px;
    font-size: 12px;
}
.manager-status-section .form-row { margin-top: 8px; }
.confetti-canvas {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}
@media (max-width: 640px) {
    .goal-summary-card { margin-left: 16px; margin-right: 16px; }
    .goal-hero-head,
    .goal-summary-line { align-items: flex-start; }
}


/* v2.12: Einstellungen und Kinderverwaltung. */
.settings-title-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.children-admin-card .section-head {
    align-items: flex-start;
}
.child-admin-list {
    margin-top: 12px;
}
.small-note {
    font-size: 12px;
    margin: 0;
}
.btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
}
@media (max-width: 640px) {
    .settings-title-actions {
        width: 100%;
        justify-content: stretch;
    }
    .settings-title-actions .btn {
        flex: 1 1 auto;
    }
}


/* v3.2: Benutzer-Accordion-Pfeil vor dem Namen, keine Kind-Zuordnung bei Verwaltern, Sparziel-Konfetti-Hinweis. */
.user-summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
}
.user-summary::after {
    content: none !important;
    display: none !important;
}
.user-summary::before {
    content: "";
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 9px;
    border-color: transparent transparent transparent #111827;
}
.user-accordion[open] .user-summary::before {
    border-width: 9px 6px 0 6px;
    border-color: #111827 transparent transparent transparent;
}
.user-summary-main {
    grid-column: 2;
    grid-row: 1;
}
.user-summary .role-pills {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}
.goal-reached-toast {
    position: fixed;
    left: 50%;
    top: max(18px, env(safe-area-inset-top));
    z-index: 10000;
    transform: translateX(-50%);
    width: min(92vw, 420px);
    padding: 16px 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #fff7d7);
    border: 1px solid rgba(255, 201, 51, .75);
    box-shadow: 0 24px 60px rgba(8, 45, 78, .22);
    color: var(--text);
    text-align: center;
    animation: goalToastIn .22s ease-out both;
}
.goal-reached-toast strong {
    display: block;
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 4px;
}
.goal-reached-toast span {
    display: block;
    color: #587089;
    font-size: 14px;
    font-weight: 800;
}
.goal-reached-toast.is-hiding {
    animation: goalToastOut .22s ease-in both;
}
@keyframes goalToastIn {
    from { opacity: 0; transform: translate(-50%, -12px) scale(.96); }
    to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes goalToastOut {
    from { opacity: 1; transform: translate(-50%, 0) scale(1); }
    to { opacity: 0; transform: translate(-50%, -12px) scale(.96); }
}
@media (max-width: 640px) {
    .user-summary {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .user-summary .role-pills {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
    }
    .goal-reached-toast strong {
        font-size: 20px;
    }
}


/* v3.2: öffentliche Landingpage, Demo und Hilfelinks. */
.landing-card .landing-actions {
    display: grid;
    gap: 10px;
    margin: 18px 0 12px;
}
.login-help-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 6px;
    font-size: 13px;
}
.login-help-links a {
    color: var(--primary-dark);
    font-weight: 850;
}
code {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    background: #edf3f8;
    color: var(--primary-dark);
}
