/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: none;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.3s ease, color 0.2s ease, transform 0.2s ease;
}
.btn .icon { width: 1.1rem; height: 1.1rem; }
.btn:disabled { opacity: 0.45; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 0.8125rem; border-radius: 0.625rem; }

.btn-gold {
    background: var(--gradient-gold);
    color: #000;
    box-shadow: 0 10px 15px -3px rgba(217, 119, 6, 0.2);
}
.btn-gold:not(:disabled):hover { box-shadow: 0 0 22px rgba(212, 175, 55, 0.45); }
.btn-gold:not(:disabled):active { transform: scale(0.98); }

.btn-outline { border: 2px solid rgba(217, 119, 6, 0.5); color: var(--amber-400); }
.btn-outline:not(:disabled):hover { border-color: var(--amber-400); background: rgba(251, 191, 36, 0.05); }

.btn-ghost { color: var(--text-2); }
.btn-ghost:not(:disabled):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.btn-ghost--danger { color: var(--neg); }
.btn-ghost--danger:not(:disabled):hover { color: #fca5a5; background: rgba(239, 68, 68, 0.08); }

.btn-danger { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.icon-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.3s ease;
}
.icon-btn:not(:disabled):hover { color: var(--amber-400); border-color: rgba(212, 175, 55, 0.6); }
.icon-btn:disabled { opacity: 0.35; }
.icon-btn--plain { border-color: transparent; background: none; width: 36px; height: 36px; }
.icon-btn--plain:not(:disabled):hover { background: rgba(255, 255, 255, 0.05); border-color: transparent; }
.icon-btn--gold { background: var(--gradient-gold); color: #000; border: 0; box-shadow: 0 8px 18px -6px rgba(212, 175, 55, 0.5); }
.icon-btn--gold:hover { color: #000 !important; box-shadow: 0 0 22px rgba(212, 175, 55, 0.5); }

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--amber-400);
    font-size: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(251, 191, 36, 0.4);
    text-underline-offset: 3px;
}
.link-btn:hover { color: var(--amber-300); }

/* ==========================================================================
   Karten, Abschnitte, Hinweise
   ========================================================================== */
.card {
    padding: 20px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface);
}
.card--inset { padding: 16px; background: rgba(17, 24, 39, 0.3); }

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 1.5rem;
    border: 1px solid rgba(217, 119, 6, 0.3);
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), #000);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}
.hero-card::before {
    content: '';
    position: absolute;
    top: -90px;
    right: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: var(--gradient-gold);
    filter: blur(90px);
    opacity: 0.12;
    pointer-events: none;
}
.hero-card > * { position: relative; }
@media (min-width: 640px) { .hero-card { padding: 28px; } }

.hero-card__head { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 0 0; }

.hero-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

.hero-amount {
    margin-top: 2px;
    font-size: clamp(2rem, 8vw, 2.9rem);
    font-weight: 700;
    line-height: 1.15;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-300));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    overflow-wrap: anywhere;
}
.hero-amount .amount { white-space: normal; }
.hero-sub { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--text-2); }

.hero-note {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-2);
}
.hero-note .icon { width: 1rem; height: 1rem; color: var(--amber-400); }

.unit-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(217, 119, 6, 0.15); }
.unit-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    border: 1px solid rgba(217, 119, 6, 0.3);
    background: rgba(217, 119, 6, 0.08);
    font-size: 0.8125rem;
    font-weight: 500;
}
.unit-chip__code {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.18);
    color: var(--gold-2);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.unit-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.28);
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-2);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--pos);
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}
.badge--gold { background: rgba(217, 119, 6, 0.12); color: var(--amber-400); border: 1px solid rgba(217, 119, 6, 0.3); }
.badge--muted { background: rgba(255, 255, 255, 0.06); color: var(--text-2); font-weight: 500; }
.badge--danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

.section { display: flex; flex-direction: column; gap: 12px; }
.section__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.section__title { font-family: var(--font-serif); font-size: 1.25rem; }
.section__meta { font-size: 0.75rem; color: var(--text-3); }

.hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(217, 119, 6, 0.25);
    background: rgba(217, 119, 6, 0.06);
    font-size: 0.8125rem;
    color: var(--text-2);
}
.hint > span { flex: 1; min-width: 180px; }
.hint .icon { width: 1rem; height: 1rem; color: var(--amber-400); }

.empty-inline { padding: 20px; text-align: center; color: var(--text-3); font-size: 0.875rem; }

.icon-tile {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.875rem;
    color: var(--gold-2);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.16) 0%, rgba(212, 175, 55, 0.03) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.icon-tile .icon { width: 1.5rem; height: 1.5rem; }

.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.875rem; color: var(--text-2); }
.check-list li { position: relative; padding-left: 1.625rem; }
.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--gold);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.legend-icon {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
}
.legend-icon .icon { width: 1rem; height: 1rem; }

/* ==========================================================================
   Leere Zustände
   ========================================================================== */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    text-align: center;
    border-radius: 1.5rem;
    border: 1px dashed rgba(217, 119, 6, 0.3);
    background: rgba(17, 24, 39, 0.25);
}
.empty--compact { padding: 32px 20px; }
.empty__icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.1rem;
    color: var(--gold-2);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.03));
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.12);
}
.empty__icon .icon { width: 1.8rem; height: 1.8rem; }
.empty__title { font-family: var(--font-serif); font-size: 1.4rem; }
.empty__text { max-width: 400px; color: var(--text-2); font-size: 0.9375rem; }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 4px; }

/* ==========================================================================
   Toolbar, Segment-Steuerung, Suche
   ========================================================================== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.segmented {
    display: inline-flex;
    padding: 3px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-strong);
}
.segmented button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border: 0;
    border-radius: 0.55rem;
    background: none;
    color: var(--text-2);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed="true"] { background: var(--gradient-gold); color: #000; font-weight: 600; }
.segmented button .icon { width: 1rem; height: 1rem; }
.segmented--block { display: flex; width: 100%; }
.segmented--direction button { padding: 10px 14px; font-size: 0.875rem; }
.segmented--direction .is-in[aria-pressed="true"] { background: linear-gradient(135deg, #10b981, #34d399); }
.segmented--direction .is-out[aria-pressed="true"] { background: linear-gradient(135deg, #ef4444, #f87171); }

.search { position: relative; flex: 1; min-width: 180px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; color: var(--text-3); pointer-events: none; }
.search .input { height: 40px; padding-left: 38px; }

.inline-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Konto-Logos
   ========================================================================== */
.logo {
    --size: 40px;
    --c: var(--gold);
    width: var(--size);
    height: var(--size);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0.75rem;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, #000);
    border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
    font-size: calc(var(--size) * 0.36);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.logo .icon { width: 55%; height: 55%; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo--image { background: #fff; border-color: rgba(255, 255, 255, 0.2); padding: 8%; }
.logo--brand { background: #000; border-color: rgba(217, 119, 6, 0.35); }
.logo--brand img { width: 78%; height: 78%; }
.logo--sm { --size: 32px; border-radius: 0.6rem; }
.logo--lg { --size: 56px; border-radius: 1rem; }
.logo--xl { --size: 72px; border-radius: 1.25rem; box-shadow: 0 0 30px color-mix(in srgb, var(--c) 20%, transparent); }

/* ==========================================================================
   Kontenbaum
   ========================================================================== */
.tree { list-style: none; margin: 0; padding: 0; }

.tree--root {
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface);
}

.tree-row {
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding-right: 8px;
    border-top: 1px solid var(--border-soft);
    transition: background 0.2s ease;
}
.tree--root > .tree-item:first-child > .tree-row { border-top: 0; }
.tree-row:hover { background: rgba(212, 175, 55, 0.035); }

.tree-row__main {
    flex: 1;
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px 10px 14px;
    border: 0;
    background: none;
    text-align: left;
}

.tree-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tree-row__title { font-size: 0.9375rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-row--folder .tree-row__title { font-weight: 600; }
.tree-row__sub { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tree-row__value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}
.tree-row__conv { font-size: 0.75rem; font-weight: 400; color: var(--text-3); }
.tree-row__chevron { width: 1rem; height: 1rem; margin: 0 4px 0 2px; color: var(--text-4); }

.tree-chevron { width: 1rem; height: 1rem; margin-right: -4px; color: var(--text-3); transition: transform 0.2s ease; }
.tree-chevron.is-open { transform: rotate(90deg); }

.folder-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    color: var(--gold-2);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.03));
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.folder-icon .icon { width: 1.25rem; height: 1.25rem; }

/* Verschachtelte Ebenen mit Hilfslinie */
.tree .tree { position: relative; padding-left: 20px; }
.tree .tree::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 0;
    bottom: 12px;
    width: 1px;
    background: linear-gradient(rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.05));
}
.tree .tree:empty::after {
    content: 'Leerer Ordner';
    display: flex;
    align-items: center;
    min-height: 46px;
    padding-left: 50px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.8125rem;
    color: var(--text-4);
}
.is-editing .tree .tree:empty::after {
    content: 'Hierher ziehen';
    margin: 6px 12px 8px 30px;
    padding-left: 16px;
    border: 1px dashed rgba(212, 175, 55, 0.35);
    border-radius: var(--radius);
    color: var(--text-3);
}

/* Anordnen-Modus */
.drag-handle {
    width: 34px;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    color: var(--text-3);
    cursor: grab;
    touch-action: none;
}
.drag-handle:hover { color: var(--amber-400); }
.is-editing .tree-row__main { padding-left: 4px; }
.is-ghost > .tree-row { background: rgba(212, 175, 55, 0.1); outline: 1px dashed rgba(212, 175, 55, 0.7); outline-offset: -1px; }
.is-ghost > .tree-row > * { opacity: 0.5; }
.is-chosen > .tree-row { background: rgba(212, 175, 55, 0.07); }
.is-dragging { opacity: 0.95; }
.is-dragging > .tree-row { background: #0d1017; border: 1px solid var(--gold); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); }
.is-dragging .tree { display: none; }

/* Gruppen nach Einheit */
.group { display: flex; flex-direction: column; gap: 10px; }
.group__header { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.group__name { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; }
.group__count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-2);
    font-size: 0.75rem;
}
.group__total { margin-left: auto; font-weight: 600; color: var(--amber-400); }

/* ==========================================================================
   Kontodetail & Transaktionen
   ========================================================================== */
.account-hero { display: flex; flex-direction: column; gap: 18px; }
.account-hero__top { display: flex; align-items: flex-start; gap: 16px; }
.account-hero__balance { flex: 1; min-width: 0; }
.account-hero__unit { margin-top: 2px; }
.account-hero__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.sparkline { width: 100%; height: 72px; display: block; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat {
    min-width: 0;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}
.stat__label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.stat__value { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.stat__value .amount { white-space: normal; }

.note-card {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 0.875rem;
    white-space: pre-line;
}
.note-card .icon { color: var(--gold); margin-top: 2px; }

.tx-month + .tx-month { margin-top: 8px; }
.tx-month__label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 4px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

.tx-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}
.tx-list > li + li { border-top: 1px solid var(--border-soft); }

.tx-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    background: none;
    text-align: left;
    transition: background 0.2s ease;
}
.tx-row:hover { background: rgba(212, 175, 55, 0.04); }

.tx-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.tx-icon .icon { width: 1.1rem; height: 1.1rem; }
.tx-icon--in { color: var(--pos); background: rgba(16, 185, 129, 0.12); }
.tx-icon--out { color: var(--neg); background: rgba(239, 68, 68, 0.12); }

.tx-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tx-row__title { font-size: 0.9375rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-row__sub { font-size: 0.75rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-row__amount { display: flex; flex-direction: column; align-items: flex-end; font-weight: 600; text-align: right; }
.tx-row__balance { font-size: 0.6875rem; font-weight: 400; color: var(--text-4); }

/* ==========================================================================
   Übersicht
   ========================================================================== */
.overview-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .overview-grid { grid-template-columns: 1fr 1fr; } }

.alloc { display: flex; flex-direction: column; gap: 16px; }
.alloc__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 0.875rem; }
.alloc__label { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text-2); }
.alloc__value { display: flex; align-items: baseline; gap: 8px; font-weight: 600; color: var(--amber-400); white-space: nowrap; }
.alloc__pct { min-width: 3.2em; text-align: right; font-size: 0.75rem; font-weight: 400; color: var(--text-3); }

.bar { height: 8px; overflow: hidden; border-radius: 999px; background: #1f2937; }
.bar__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 65%, #fff));
    transition: width 0.6s ease;
}

/* ==========================================================================
   Listen (Einstellungen, Profil)
   ========================================================================== */
.settings-group { display: flex; flex-direction: column; gap: 8px; }
.settings-group__title {
    padding-left: 4px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--amber-400);
}

.list {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}

.list-row {
    width: 100%;
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border: 0;
    background: none;
    text-align: left;
    transition: background 0.2s ease;
}
.list-row + .list-row { border-top: 1px solid var(--border-soft); }
a.list-row:hover, button.list-row:hover { background: rgba(212, 175, 55, 0.04); }

.list-row__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.625rem;
    color: var(--gold-2);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.03));
    border: 1px solid rgba(212, 175, 55, 0.25);
}
.list-row__icon .icon { width: 1.1rem; height: 1.1rem; }
.list-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-row__label { font-size: 0.9375rem; font-weight: 500; }
.list-row__sub { font-size: 0.75rem; color: var(--text-3); }
.list-row__chevron { width: 1rem; height: 1rem; color: var(--text-4); }
.list-row__control { flex-shrink: 0; max-width: 46%; }
.list-row.is-danger .list-row__label { color: var(--neg); }
.list-row.is-danger .list-row__icon { color: var(--neg); background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }

/* ==========================================================================
   Formulare
   ========================================================================== */
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-row--3 { grid-template-columns: 1fr 1.6fr 0.9fr; }
@media (max-width: 480px) {
    .form-row { grid-template-columns: minmax(0, 1fr); }
    .form-row--3 { grid-template-columns: 1fr 1fr; }
    .form-row--3 > :nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
}
.form-actions { display: flex; justify-content: flex-end; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 0.8125rem; font-weight: 500; color: var(--text-2); }
.field__hint { font-size: 0.75rem; color: var(--text-3); }
.form-error { font-size: 0.8125rem; color: var(--neg); }

.input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(217, 119, 6, 0.25);
    background: var(--surface-input);
    color: var(--text);
    font-size: 16px; /* verhindert Zoom auf iOS */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.input::placeholder { color: var(--text-4); }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18); }
textarea.input { height: auto; min-height: 72px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
select.input {
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    text-overflow: ellipsis;
}
select.input option, select.input optgroup { background: #0b0d12; color: var(--text); }
.input--compact { height: 38px; width: auto; font-size: 0.875rem; }
.list-row__control .input { height: 38px; font-size: 0.875rem; }
input[type="date"].input { min-height: 46px; }
input[type="date"].input::-webkit-calendar-picker-indicator { filter: invert(0.75) sepia(1) saturate(4) hue-rotate(5deg); cursor: pointer; }
input[type="search"].input::-webkit-search-cancel-button { filter: invert(0.6); }

.input-group { position: relative; display: block; }
.input-group .input { padding-right: 64px; }
.input-group__suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-2);
    font-size: 0.8125rem;
    font-weight: 600;
    pointer-events: none;
}
.input--amount { height: 62px; font-size: 1.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.switch { position: relative; display: inline-flex; flex-shrink: 0; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.switch__track { position: relative; width: 100%; height: 100%; border-radius: 999px; background: #374151; transition: background 0.2s ease; }
.switch__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}
.switch input:checked + .switch__track { background: var(--gradient-gold); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* Vorschau im Kontoformular */
.form-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), #000);
}
.form-preview__text { min-width: 0; display: flex; flex-direction: column; }
.form-preview__text strong { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-preview__text span { font-size: 0.8125rem; color: var(--text-3); }

/* Logo-Auswahl */
.logo-picker { display: flex; flex-direction: column; gap: 12px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.icon-choice {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-2);
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.icon-choice:hover { color: var(--text); border-color: rgba(212, 175, 55, 0.5); }
.icon-choice[aria-pressed="true"] {
    color: var(--c);
    border-color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent);
}
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--c);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease;
}
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { border-color: #fff; transform: scale(1.1); }
.logo-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.logo-upload .field__hint { flex-basis: 100%; }

/* Transaktionsformular */
.tx-context {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.875rem;
}
.tx-context__name { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-context__balance { color: var(--text-3); font-size: 0.8125rem; white-space: nowrap; }
.tx-context__balance .amount { color: var(--text-2); font-weight: 600; }

/* Kurse */
.rate-list { display: flex; flex-direction: column; gap: 10px; }
.rate-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr);
    align-items: center;
    gap: 10px;
}
.rate-row__unit { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rate-row__name { font-size: 0.875rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-row__eq { font-size: 0.8125rem; color: var(--text-3); white-space: nowrap; }
@media (max-width: 480px) {
    .rate-row { grid-template-columns: 1fr auto; }
    .rate-row__input { grid-column: 1 / -1; }
}

/* ==========================================================================
   Profil
   ========================================================================== */
.profile-card { display: flex; align-items: center; gap: 18px; }
.avatar {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-gold);
    color: #000;
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow: 0 0 34px rgba(212, 175, 55, 0.3);
}
.avatar .icon { width: 1.8rem; height: 1.8rem; }
.profile-card__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-card__name { font-family: var(--font-serif); font-size: 1.5rem; }
.profile-card__mail { color: var(--text-2); font-size: 0.875rem; overflow-wrap: anywhere; }
.profile-card__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.feature-card { display: flex; gap: 16px; align-items: flex-start; }
.feature-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.feature-card__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1rem; font-family: var(--font-sans); font-weight: 600; }
.feature-card__text { color: var(--text-2); font-size: 0.875rem; }
.feature-card__text strong { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.feature-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.plan-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.16), rgba(217, 119, 6, 0.03));
    border: 1px solid rgba(217, 119, 6, 0.45);
}
.plan-card__head { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.plan-card__name { font-family: var(--font-serif); font-size: 1.6rem; }
.plan-card__desc { color: var(--text-3); font-size: 0.8125rem; }
.plan-card__price { text-align: right; white-space: nowrap; }
.plan-card__price span { font-size: 2rem; font-weight: 700; }
.plan-card__price small { margin-left: 4px; color: var(--text-3); font-size: 0.8125rem; }

/* ==========================================================================
   Modals / Bottom-Sheets
   ========================================================================== */
.modal-layer { position: fixed; inset: 0; z-index: 100; }

.sheet-backdrop {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: fade-in 0.2s ease;
}

.sheet {
    width: 100%;
    max-height: calc(100dvh - var(--safe-top) - 24px);
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem 1.5rem 0 0;
    border: 1px solid rgba(217, 119, 6, 0.3);
    border-bottom: 0;
    background: linear-gradient(180deg, #0d1017, var(--surface-sheet) 40%);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.6);
    animation: sheet-up 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
    outline: none;
}

.sheet__header { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 14px 10px 20px; }
.sheet__grabber {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 40px;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
}
.sheet__title { flex: 1; min-width: 0; font-family: var(--font-serif); font-size: 1.3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 6px 20px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.sheet__text { color: var(--text-2); font-size: 0.9375rem; }
.sheet__footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px calc(14px + var(--safe-bottom));
    border-top: 1px solid rgba(217, 119, 6, 0.15);
}
.sheet__footer .btn { flex: 1; }
.sheet__footer .footer-start { flex-basis: 100%; order: 1; }

@media (min-width: 640px) {
    .sheet-backdrop { align-items: center; padding: 24px; }
    .sheet {
        width: min(580px, 100%);
        max-height: min(88vh, 860px);
        border-radius: var(--radius-xl);
        border-bottom: 1px solid rgba(217, 119, 6, 0.3);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 40px rgba(212, 175, 55, 0.06);
        animation: pop-in 0.22s ease;
    }
    .sheet__grabber { display: none; }
    .sheet__header { padding-top: 16px; }
    .sheet__footer { padding-bottom: 14px; }
    .sheet__footer .btn { flex: 0 0 auto; }
    .sheet__footer .footer-start { flex-basis: auto; order: 0; margin-right: auto; }
}

.action-list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}
.action-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 0;
    background: none;
    font-size: 0.9375rem;
    text-align: left;
    transition: background 0.15s ease;
}
.action-item + .action-item { border-top: 1px solid var(--border-soft); }
.action-item:hover { background: rgba(212, 175, 55, 0.06); }
.action-item > .icon { color: var(--gold-2); }
.action-item > span { flex: 1; }
.action-item.is-danger, .action-item.is-danger > .icon { color: var(--neg); }
.action-item.is-current { background: rgba(212, 175, 55, 0.08); }
.action-item__check { color: var(--amber-400) !important; }

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-stack {
    position: fixed;
    left: 50%;
    bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
    z-index: 200;
    width: min(460px, calc(100% - 24px));
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
@media (min-width: 960px) {
    .toast-stack { left: calc(50% + var(--sidebar-w) / 2); bottom: 24px; }
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px 10px 16px;
    border-radius: 0.875rem;
    border: 1px solid rgba(217, 119, 6, 0.35);
    background: rgba(13, 16, 23, 0.97);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    font-size: 0.875rem;
    pointer-events: auto;
    animation: toast-in 0.25s ease;
}
.toast__msg { flex: 1; }
.toast__action { padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--amber-400); font-size: 0.875rem; font-weight: 600; }
.toast__action:hover { background: rgba(251, 191, 36, 0.08); }
.toast__close { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text-3); }
.toast__close .icon { width: 1rem; height: 1rem; }
.toast__close:hover { color: var(--text); }

/* Beim Anordnen keinen Text markieren */
.is-editing .tree { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* ==========================================================================
   App-Installation
   ========================================================================== */
.install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
    z-index: 150;
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px 12px 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: rgba(13, 16, 23, 0.97);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 24px rgba(212, 175, 55, 0.12);
    animation: toast-in 0.35s ease;
}
@media (min-width: 960px) {
    .install-banner { left: auto; right: 24px; bottom: 24px; width: 420px; }
}
.install-banner__logo { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; }
.install-banner__text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.8125rem; line-height: 1.35; }
.install-banner__text strong { font-size: 0.875rem; color: var(--text); }
.install-banner__text span { color: var(--text-2); }

.install-guide { display: flex; flex-direction: column; gap: 20px; }
.install-benefits { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.install-benefits li { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 0.9375rem; }
.install-benefits .icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--amber-400); }
.install-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.install-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}
.install-steps__num {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--gradient-gold);
    color: #000;
    font-size: 0.8125rem;
    font-weight: 600;
}
.install-steps__text { flex: 1; font-size: 0.9375rem; }
.install-steps__text strong { color: var(--amber-400); font-weight: 600; }
.install-steps__icon { width: 1.4rem; height: 1.4rem; flex-shrink: 0; color: var(--amber-400); }

/* ==========================================================================
   Abo & Zahlung
   ========================================================================== */
.sub-status { display: flex; gap: 16px; align-items: flex-start; }
.sub-status__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.plan-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .plan-grid { grid-template-columns: 1fr 1fr; } }
.plan-card .btn { margin-top: auto; }
.plan-card--featured { border-color: var(--border-strong); background: linear-gradient(145deg, rgba(217, 119, 6, 0.14), rgba(217, 119, 6, 0.03)); }
.sub-note { display: flex; align-items: flex-start; gap: 8px; color: var(--text-3); font-size: 0.8125rem; }
.sub-note .icon { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: 2px; color: var(--amber-400); }
.list-row--card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }

.trial-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    margin: 12px 16px 0;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: rgba(217, 119, 6, 0.1);
    font-size: 0.875rem;
}
.trial-banner strong { color: var(--amber-400); }
.trial-banner__cta { color: var(--amber-400); font-weight: 600; }
@media (min-width: 960px) { .trial-banner { margin: 20px auto 0; max-width: calc(var(--content-w) - 48px); } }
