/* Kunden-Dashboard im Look der Website (www.ar-button.com), NICHT im Bridge-Farbschema
   (Wunsch Peter 2026-09-29): nur Koralle, Lime, Orange und deren Abstufungen, Überschriften in
   Tilt Warp, Text in Nunito (beide aus den Elementor-Fonts der Website, siehe index.php).
   Lime-Fläche wie die Website, Koralle-Band/-Inseln mit Lime-Schrift wie deren Koralle-Abschnitte. */
/* Hover aller Knöpfe wie auf der Website (Try Free, Logo-Pille, Produkt-Pillen):
   Orange mit Lime-Schrift, ohne Übergang */
:root {
    --coral: #FF6456;
    --coral-deep: #e5483a;      /* Fließtext auf Lime: etwas dunkler für Lesbarkeit */
    --coral-dark: #cf3a2c;      /* Fehlertexte */
    --coral-soft: rgba(255, 100, 86, 0.12);
    --coral-line: rgba(255, 100, 86, 0.25);
    --lime: #E6F796;
    --lime-light: #f3fbcc;      /* helle Inseln auf der Lime-Seite */
    --lime-pale: #fafde8;       /* Kacheln/Felder in hellen Inseln */
    --lime-deep: #d5ec6c;
    --lime-soft: rgba(230, 247, 150, 0.2);
    --orange: #FFA930;
    --orange-deep: #e98a00;
    --orange-soft: rgba(255, 169, 48, 0.16);

    --font-display: 'Tilt Warp', 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-text: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 14px;
    --docs-width: 50vw;         /* Doku-Drawer: halbe Fensterbreite (Wunsch Peter 2026-10-13); Handy siehe @media unten */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden-Attribut gewinnt immer (sonst überstimmen display-Regeln wie .chart-empty es) */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-text);
    font-size: 15px;
    line-height: 1.45;
    color: var(--coral-deep);
    background: var(--lime);
    -webkit-font-smoothing: antialiased;
    transition: margin-right 0.3s ease;
}

button { font: inherit; color: inherit; }

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kopfzeile wie die Website: Logo-Pille links, Pillen-Knopf rechts ---------- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    background: var(--lime);
}
.app-brand-wrap { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.app-brand img { display: block; height: 2.4rem; width: auto; }
.app-title {
    font-family: var(--font-display);
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--coral);
    white-space: nowrap;
}
/* Account-Umschalter (mehrere Keys an einer E-Mail): Pille wie die Range-Umschalter */
.key-switch { margin-left: auto; }
.key-switch label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 700; color: var(--coral); }
.key-switch select {
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.4rem 2rem 0.4rem 0.9rem;
    border: 1.5px solid var(--coral);
    border-radius: 999px;
    background: var(--lime-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF6456' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.7rem center / 0.9rem;
    color: var(--coral);
    cursor: pointer;
    appearance: none;
    text-overflow: ellipsis;
}
.key-switch select:hover { border-color: var(--orange); }
/* API-Key in der Kopfzeile: vollständig, nie abgeschnitten (am Handy eigene Zeile, siehe @media unten) */
.app-key {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-left: auto;
    padding: 0.3rem 0.35rem 0.3rem 0.95rem;
    border: 1.5px solid var(--coral);
    border-radius: 999px;
    background: var(--lime-pale);
    color: var(--coral);
    --ink: var(--coral);
    --btn-bg: var(--coral-soft);
    --btn-border: var(--coral-line);
}
.app-key-label { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.app-key code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--coral-deep);
    white-space: nowrap;
}
.app-key + .key-switch { margin-left: 0; }
.app-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: var(--coral);
    color: var(--lime);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}
.app-logout svg { width: 1rem; height: 1rem; }
.app-logout:hover { background: var(--orange); color: var(--lime); }

/* ---------- Kennzahlen-Band: Koralle mit Lime-Schrift (wie die Koralle-Abschnitte) ---------- */
.app-summary {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--coral);
    color: var(--lime);
}
.sum-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.6rem 0.6rem 0.65rem;
    border-right: 1px solid rgba(230, 247, 150, 0.25);
    text-align: center;
}
.sum-card:last-child { border-right: 0; }
.sum-label { font-size: 0.75rem; font-weight: 700; opacity: 0.85; }
.sum-value {
    font-family: var(--font-display);
    font-size: 1.55rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.sum-value small { font-size: 0.66em; opacity: 0.7; }
.sum-sub { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.74rem; font-weight: 600; opacity: 0.85; }
.state-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; border: 1.5px solid var(--lime); }
.state-dot.is-on { background: var(--lime); }
.sum-meter {
    display: block;
    width: min(11rem, 80%);
    height: 0.32rem;
    margin-top: 0.3rem;
    border-radius: 999px;
    background: rgba(230, 247, 150, 0.3);
    overflow: hidden;
}
.sum-meter span { display: block; height: 100%; border-radius: inherit; background: var(--lime); transition: width 0.8s var(--ease-out); }
.sum-month.is-over .sum-meter span { background: linear-gradient(90deg, var(--lime), var(--orange)); }

/* ---------- Layout ---------- */
.app-main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    padding: 1rem 1.5rem 1.5rem;
}
.app-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 0.8rem;
    align-items: stretch;
}
.app-stack { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.app-stack > .island { flex: 1 1 auto; }

/* Helle Insel (Standard): Lime-Abstufung, Koralle-Schrift */
.island {
    min-width: 0;
    padding: 1rem 1.2rem 1.1rem;
    border-radius: var(--radius);
    background: var(--lime-light);
    color: var(--coral-deep);
    --ink: var(--coral);
    --btn-bg: var(--coral-soft);
    --btn-border: var(--coral-line);
}
/* Koralle-Insel: Lime-Schrift */
.island-coral {
    background: var(--coral);
    color: var(--lime);
    --ink: var(--lime);
    --btn-bg: rgba(230, 247, 150, 0.14);
    --btn-border: rgba(230, 247, 150, 0.5);
}
.island h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.45rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.island > h2 { margin-bottom: 0.7rem; }

/* ---------- Usage-Insel ---------- */
.island-usage { display: flex; flex-direction: column; outline: none; }
.usage-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.range-switch {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: var(--coral-soft);
}
.range-switch button {
    border: 0;
    background: transparent;
    color: var(--coral);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.28rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
}
.range-switch button:hover { background: var(--orange); color: var(--lime); }
.range-switch button.is-active { background: var(--coral); color: var(--lime); }

.period-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 0 0.4rem;
    position: relative;
}
.nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    border: 1.5px solid var(--coral);
    background: transparent;
    color: var(--coral);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease;
}
.nav-arrow svg { width: 1.05rem; height: 1.05rem; stroke-width: 2.4; }
.nav-arrow:hover:not(:disabled) { background: var(--orange); border-color: var(--orange); color: var(--lime); }
.nav-arrow:active:not(:disabled) { transform: scale(0.92); }
.nav-arrow:disabled { opacity: 0.25; cursor: default; }
.period-nav.is-lifetime .nav-arrow { visibility: hidden; }
.nav-label { text-align: center; min-width: 0; }
.nav-label strong {
    display: block;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: var(--coral);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-label span { display: block; font-size: 0.8rem; font-weight: 600; min-height: 1.1em; }
.nav-label.slide-next { animation: slideNext 0.35s var(--ease-out); }
.nav-label.slide-prev { animation: slidePrev 0.35s var(--ease-out); }
@keyframes slideNext { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes slidePrev { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.nav-now {
    position: absolute;
    right: 3.1rem;
    top: 50%;
    transform: translateY(-15%);
    border: 0;
    background: none;
    color: var(--coral);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.product-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.2rem 0 0.7rem;
}
/* Chips wie die Produkt-Pillen der Website */
.chip {
    border: 1.5px solid var(--coral);
    background: transparent;
    color: var(--coral);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.18rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chip:hover { background: var(--orange); border-color: var(--orange); color: var(--lime); }
.chip.is-active { background: var(--coral); color: var(--lime); }
.chip-more { border-style: dashed; }

.chart-wrap {
    position: relative;
    flex: 1 1 auto;
    height: clamp(240px, 40vh, 480px);
    transition: opacity 0.25s ease;
}
.chart-wrap.is-loading { opacity: 0.55; }
.chart-wrap.is-loading::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--coral), transparent);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    animation: loadingBar 1s linear infinite;
}
@keyframes loadingBar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    opacity: 0.8;
    pointer-events: none;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem 1.2rem;
    padding: 0.5rem 0 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.chart-legend i { display: inline-block; }
.lg-views { width: 1rem; height: 0.75rem; border-radius: 2px; background: rgba(255, 100, 86, 0.14); border-top: 2.5px solid var(--coral); }
/* Klickrate als Linie (seit 2026-10-12, vorher schmaler Balken) */
.lg-clicks { width: 1rem; height: 0; border-top: 2.5px solid var(--orange); border-radius: 2px; }
.lg-expected { width: 1rem; height: 0; border-top: 2px dashed rgba(255, 100, 86, 0.5); }
/* „Above plan limit“ im Usage-Graphen: zartes Koralle-Band (Orange ist dort die Klickrate) */
.lg-over { width: 0.9rem; height: 0.75rem; border-radius: 3px; background: var(--coral-soft); border-top: 1.5px dashed var(--coral); }
.lg-over-item { color: var(--coral); }
/* Plan usage */
.lg-cum { width: 1rem; height: 0.75rem; border-radius: 2px; background: var(--coral-soft); border-top: 2.5px solid var(--coral); }
.lg-proj { width: 1rem; height: 0; border-top: 2px dashed var(--coral); }
.lg-limit { width: 1rem; height: 0; border-top: 2px solid var(--coral-deep); }
.lg-above { width: 1rem; height: 0.75rem; border-radius: 2px; background: rgba(255, 169, 48, 0.55); border-top: 2.5px solid var(--orange); }
.lg-selected { width: 0.9rem; height: 0.75rem; border-radius: 2px; background: rgba(255, 100, 86, 0.16); }

.kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.6rem;
}
.kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.4rem 0.65rem;
    border-radius: 10px;
    background: var(--lime-pale);
}
.kpi span { font-size: 0.8rem; font-weight: 700; }
.kpi strong {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.9rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--coral);
    font-variant-numeric: tabular-nums;
}
.kpi em {
    font-style: normal;
    font-size: 0.74rem;
    font-weight: 700;
    min-height: 1.2em;
    padding: 0 0.5rem;
    border-radius: 999px;
}
.kpi em.is-up { color: var(--coral-deep); background: var(--lime-deep); }
.kpi em.is-down { color: var(--coral-deep); background: var(--coral-soft); }
.kpi em.is-flat { opacity: 0.7; }
/* Werte in der Farbe ihrer Kurve: Views Koralle, Klickrate Orange (dunkleres Orange für Lesbarkeit
   auf hellem Grund); kleine Linie vor dem Titel wie in der Legende */
.kpi span::before { content: ''; display: inline-block; width: 0.8rem; height: 0; margin: 0 0.35rem 0.2rem 0; vertical-align: middle; border-top: 2.5px solid currentColor; border-radius: 2px; }
.kpi-views span, .kpi-views strong { color: var(--coral); }
.kpi-rate span, .kpi-rate strong { color: var(--orange-deep); }
.kpi-rate { background: #fff8e6; }

/* ---------- Plan usage: Monatsverlauf gegen das Limit ---------- */
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; }
.plan-month { font-size: 0.85rem; font-weight: 700; }
.plan-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin: 0.35rem 0 0.6rem; }
.plan-summary strong {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--coral);
    font-variant-numeric: tabular-nums;
}
.plan-summary strong small { font-size: 0.62em; opacity: 0.75; }
.plan-status { font-size: 0.8rem; font-weight: 700; padding: 0.2rem 0.7rem; border-radius: 999px; }
.plan-status.is-ok { background: var(--lime-deep); color: var(--coral-deep); }
.plan-status.is-warn { background: var(--orange-soft); color: var(--orange-deep); }
.plan-status.is-over { background: var(--orange); color: var(--lime); }
.plan-status.is-neutral { background: var(--coral-soft); color: var(--coral-deep); }
.plan-chart-wrap { position: relative; height: clamp(180px, 26vh, 280px); transition: opacity 0.25s ease; }
.plan-chart-wrap.is-loading { opacity: 0.55; }
.plan-note { margin-top: 0.3rem; font-size: 0.75rem; font-weight: 600; opacity: 0.75; text-align: center; }

/* ---------- Account (Koralle-Insel) + Top-Listen ---------- */
.account { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.45rem 0.9rem; align-items: center; font-size: 0.9rem; margin-bottom: 0.9rem; }
.account dt { font-size: 0.78rem; font-weight: 700; opacity: 0.85; }
.account dd { display: flex; align-items: center; gap: 0.45rem; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.account code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; overflow-wrap: anywhere; }
.copy-btn {
    flex: 0 0 auto;
    border: 1.5px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
}
.copy-btn:hover { background: var(--orange); color: var(--lime); border-color: var(--orange); }
.btn-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1.5px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    cursor: pointer;
}
.btn-soft svg { width: 1rem; height: 1rem; }
.btn-soft:hover { background: var(--orange); color: var(--lime); border-color: var(--orange); }

.toplist { display: flex; flex-direction: column; gap: 0.3rem; }
.toplist-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.36rem 0.6rem;
    border-radius: 8px;
    font-size: 0.86rem;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    width: 100%;
}
.toplist-row::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--w, 0%);
    background: var(--coral-soft);
    border-radius: inherit;
    transition: width 0.6s var(--ease-out);
}
.toplist-row > * { position: relative; }
button.toplist-row { cursor: pointer; }
button.toplist-row:hover::before { background: rgba(255, 100, 86, 0.22); }
.toplist-row.is-filtered { box-shadow: inset 0 0 0 1.5px var(--coral); }
.toplist-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--coral); }
.toplist-value { flex: 0 0 auto; font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.toplist-empty { font-size: 0.85rem; opacity: 0.75; padding: 0.3rem 0; }

/* ---------- Domains: Kacheln wie die Demo-Presets, freie Plätze gestrichelt ---------- */
.domains-head { display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.domains-count { font-size: 0.85rem; font-weight: 700; }
.domains-status { margin-left: auto; font-size: 0.8rem; font-weight: 600; min-height: 1em; transition: opacity 0.3s ease; }
.domains-status.is-error { color: var(--coral-dark); }
.domains-status button { border: 0; background: none; color: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; margin-left: 0.3rem; }
.domains-hint { font-size: 0.85rem; margin: 0.35rem 0 0.8rem; }
.domain-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 0.55rem;
}
.tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.9rem;
    padding: 0.45rem 0.55rem 0.45rem 0.9rem;
    border-radius: 10px;
    border: 1.5px solid var(--coral);
    background: var(--coral);
    color: var(--lime);
    transition: transform 0.2s var(--ease-out);
    animation: tileIn 0.3s var(--ease-out);
}
@keyframes tileIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.tile:hover { background: var(--orange); border-color: var(--orange); }
.tile-name {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: text;
}
input.tile-name { padding: 0.2rem 0.3rem; border-radius: 5px; outline: none; background: var(--lime-soft); }
input.tile-name::placeholder { color: rgba(230, 247, 150, 0.7); }
.tile-remove {
    flex: 0 0 auto;
    width: 1.6rem;
    height: 1.6rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
}
.tile-remove:hover { opacity: 1; background: var(--lime-soft); }
.tile.is-excess { background: var(--orange); border-color: var(--orange); }
.tile-empty {
    border: 1.5px dashed var(--coral);
    background: transparent;
    color: var(--coral);
    justify-content: center;
    font-size: 0.86rem;
    font-weight: 700;
    animation: none;
}
.tile-empty:hover { background: transparent; border-color: var(--coral); }
.tile-empty span { opacity: 0.45; }
button.tile-empty { cursor: pointer; flex-direction: column; gap: 0; }
button.tile-empty span { opacity: 1; }
button.tile-empty small { font-size: 0.72rem; font-weight: 600; opacity: 0.7; }
button.tile-empty:hover { background: var(--coral-soft); }
.tile-editing { background: var(--coral); border-style: solid; color: var(--lime); }

/* ---------- Hinweise (blockierte Domains): Orange = „hier fehlt etwas“, wie „Limit reached“ ---------- */
.alerts { display: flex; flex-direction: column; gap: 0.6rem; }
.alerts:empty { display: none; }
.alert {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.8rem 0.75rem 0.9rem;
    border-radius: var(--radius);
    background: var(--orange);
    color: var(--lime);
    animation: tileIn 0.3s var(--ease-out);
}
.alert-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: rgba(230, 247, 150, 0.22);
}
.alert-icon svg { width: 1.15rem; height: 1.15rem; stroke-width: 2.2; }
.alert-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.alert-text strong { font-size: 0.95rem; font-weight: 800; overflow-wrap: anywhere; }
.alert-text span { font-size: 0.82rem; font-weight: 600; }
.alert .btn-primary { flex: 0 0 auto; background: var(--lime); color: var(--coral); }
.alert .btn-primary:hover { background: var(--coral); color: var(--lime); }
.alert-close { flex: 0 0 auto; width: 1.8rem; height: 1.8rem; border: 0; border-radius: 6px; background: transparent; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; opacity: 0.85; }
.alert-close:hover { opacity: 1; background: rgba(230, 247, 150, 0.2); }
.btn-small { font-size: 0.85rem; padding: 0.42rem 1rem; }
.alert-text code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; }
.alert-note { display: block; margin-top: 0.15rem; font-weight: 800; }
.alert.is-done { background: var(--lime-deep); color: var(--coral-deep); }
.alert.is-done .alert-icon { background: var(--coral); color: var(--lime); }

/* ---------- Einstieg: Checkliste + Einbau-Code ---------- */
.setup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.setup-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0.8rem 0 1rem; }
.setup-steps li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.7rem 0.75rem; border-radius: 10px; background: var(--lime-pale); }
.setup-steps li > span:last-child { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.setup-steps strong { font-size: 0.9rem; font-weight: 800; color: var(--coral); }
.setup-steps small { font-size: 0.8rem; font-weight: 600; line-height: 1.4; }
.step-dot {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    border: 1.5px solid var(--coral);
    color: var(--coral);
    font-size: 0.8rem;
    font-weight: 800;
}
.step-dot svg { width: 0.95rem; height: 0.95rem; stroke-width: 2.6; }
.setup-steps li.is-done .step-dot { background: var(--coral); color: var(--lime); }
.setup-steps li.is-done strong { text-decoration: line-through; text-decoration-thickness: 1.5px; opacity: 0.7; }
.link-inline { border: 0; background: none; padding: 0; color: var(--coral); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-inline:hover { color: var(--orange-deep); }
.code-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--coral-soft); margin-bottom: 0.7rem; }
.code-tabs button { border: 0; background: transparent; color: var(--coral); font-size: 0.82rem; font-weight: 700; padding: 0.28rem 0.85rem; border-radius: 999px; cursor: pointer; }
.code-tabs button:hover { background: var(--orange); color: var(--lime); }
.code-tabs button.is-active { background: var(--coral); color: var(--lime); }
.code-panel { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.code-panel > * { max-width: 100%; }
.code-hint { font-size: 0.85rem; font-weight: 600; }
.code-hint code, .setting-note code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; }
.code-block { position: relative; width: 100%; border-radius: 10px; background: var(--coral); color: var(--lime); --ink: var(--lime); --btn-bg: rgba(230, 247, 150, 0.14); --btn-border: rgba(230, 247, 150, 0.5); }
.code-block pre { margin: 0; padding: 0.75rem 5rem 0.75rem 0.9rem; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.55; }
.code-block .copy-btn { position: absolute; top: 0.55rem; right: 0.55rem; }
.code-steps { padding-left: 1.2rem; font-size: 0.88rem; display: flex; flex-direction: column; gap: 0.3rem; }
.code-key { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: 10px; background: var(--lime-pale); font-size: 0.85rem; font-weight: 700; }
.code-key code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; color: var(--coral); overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Top-Seiten (Links) + Geräte ---------- */
a.toplist-row { text-decoration: none; }
a.toplist-row:hover::before { background: rgba(255, 100, 86, 0.22); }
.devices { display: flex; flex-direction: column; gap: 0.3rem; }
.devices-lead { font-size: 0.86rem; font-weight: 600; margin-bottom: 0.25rem; }
.devices-lead strong { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; color: var(--coral); }

/* ---------- Einstellungen ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin-top: 0.7rem; }
.setting-block { display: flex; flex-direction: column; gap: 0.7rem; padding: 0.85rem 0.9rem; border-radius: 10px; background: var(--lime-pale); }
.switch-row { display: flex; align-items: flex-start; gap: 0.7rem; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row > span:last-child { display: flex; flex-direction: column; gap: 0.15rem; }
.switch-row strong { font-size: 0.95rem; font-weight: 800; color: var(--coral); }
.switch-row small { font-size: 0.8rem; font-weight: 600; line-height: 1.4; }
.switch { position: relative; flex: 0 0 auto; width: 2.4rem; height: 1.4rem; margin-top: 0.1rem; border-radius: 999px; background: var(--coral-soft); border: 1.5px solid var(--coral); transition: background 0.2s ease; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: calc(1.4rem - 7px); height: calc(1.4rem - 7px); border-radius: 50%; background: var(--coral); transition: transform 0.2s var(--ease-out); }
.switch-row input:checked + .switch { background: var(--coral); }
.switch-row input:checked + .switch::after { transform: translateX(1rem); background: var(--lime); }
.switch-row input:focus-visible + .switch { box-shadow: 0 0 0 3px var(--coral-soft); }
.setting-body { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; padding-left: 3.1rem; }
.setting-body.is-off { opacity: 0.5; }
/* GA ohne Advanced-Tarif: Schalter gesperrt, darunter Upgrade-Hinweis (Optik wie die Hinweise oben) */
.setting-block.is-locked .switch-row { cursor: default; }
.setting-block.is-locked .switch-row .switch { opacity: 0.45; }
.setting-upgrade { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1rem; padding-left: 3.1rem; }
.setting-upgrade[hidden] { display: none; }
.setting-upgrade-text { display: flex; flex-direction: column; gap: 0.1rem; flex: 1 1 14rem; font-size: 0.8rem; font-weight: 600; line-height: 1.4; }
.setting-upgrade-text strong { font-size: 0.85rem; font-weight: 800; color: var(--coral); }
.ga-event { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.7rem; width: 100%; }
.check-row { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 8.5rem; font-size: 0.85rem; font-weight: 700; color: var(--coral); }
.check-row input { accent-color: var(--coral); width: 1rem; height: 1rem; }
.text-input {
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.6rem;
    border: 1.5px solid var(--coral-line);
    border-radius: 8px;
    background: var(--lime-light);
    color: var(--coral-deep);
    outline: none;
}
.text-input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.text-input:disabled { opacity: 0.55; }
input.text-input { flex: 1 1 10rem; max-width: 16rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; }
.select-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.7rem; font-size: 0.85rem; font-weight: 700; color: var(--coral); }
.setting-note { font-size: 0.76rem; font-weight: 600; line-height: 1.45; opacity: 0.85; }

/* ---------- Upgrade-Hinweis ---------- */
.upgrade-card {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 80;
    width: min(23rem, calc(100vw - 2rem));
    padding: 1.1rem 1.2rem 1.1rem;
    border-radius: 16px;
    background: var(--lime-pale);
    color: var(--coral-deep);
    box-shadow: 0 16px 40px rgba(255, 100, 86, 0.28), 0 2px 6px rgba(255, 100, 86, 0.12);
    overflow: hidden;
    transform: translateY(calc(100% + 2rem));
    opacity: 0;
    transition: transform 0.6s var(--ease-out), opacity 0.4s ease, right 0.3s ease;
}
.upgrade-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--coral), var(--orange), var(--coral));
    background-size: 200% 100%;
    animation: accentFlow 4s linear infinite;
}
@keyframes accentFlow { from { background-position: 0 0; } to { background-position: 200% 0; } }
/* Kein Farbstreifen oben (Wunsch Peter 2026-10-12) */
.upgrade-card::before { content: none; }
.upgrade-card.is-visible { transform: none; opacity: 1; }
.upgrade-top { display: flex; gap: 0.85rem; align-items: flex-start; }
.upgrade-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    background: var(--coral);
    color: var(--lime);
    animation: bob 2.8s ease-in-out infinite;
}
.upgrade-icon svg { width: 1.35rem; height: 1.35rem; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-6deg); } }
.upgrade-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--coral); margin-bottom: 0.25rem; }
.upgrade-card p { font-size: 0.88rem; line-height: 1.45; }
.upgrade-card p strong { font-weight: 800; }
.upgrade-note { font-size: 0.78rem !important; opacity: 0.85; margin-top: 0.45rem; }
.upgrade-actions { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.9rem; }
.btn-primary {
    position: relative;
    overflow: hidden;
    border: 0;
    background: var(--coral);
    color: var(--lime);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease;
}
.btn-primary:hover { background: var(--orange); color: var(--lime); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.6; cursor: default; background: var(--coral); }
/* Sanfter Glanz über den Upgrade-Knopf, alle paar Sekunden */
.upgrade-card .btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: sheen 3.6s ease-in-out 1.5s infinite;
}
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.btn-quiet { border: 0; background: none; font-size: 0.85rem; font-weight: 700; color: var(--coral); cursor: pointer; }
.btn-quiet:hover { text-decoration: underline; }
.upgrade-card.is-done .upgrade-icon { background: var(--lime-deep); color: var(--coral); animation: pop 0.5s var(--ease-out); }
@keyframes pop { 0% { transform: scale(0.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.upgrade-burst { position: absolute; left: 2.35rem; top: 2.35rem; pointer-events: none; }
.upgrade-burst i {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c);
    animation: burst 0.8s var(--ease-out) forwards;
}
@keyframes burst { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--x), var(--y)) scale(0.4); opacity: 0; } }

/* ---------- Doku-Drawer (Knopf am Rand wie in der Bridge) ---------- */
.docs-toggle {
    position: fixed;
    top: 18%;
    right: 0;
    z-index: 120;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    /* Hell wie die Upgrade-Karte (Wunsch Peter 2026-10-12): Lime-Fläche, Koralle-Icon, weicher Koralle-Schatten –
       hebt sich so auch über der Koralle-Insel „Account“ ab */
    border: 0;
    border-radius: 16px 0 0 16px;
    background: var(--lime-pale);
    color: var(--coral);
    /* Schatten nur aufgeklappt (Wunsch Peter 2026-10-13), siehe body.docs-open unten */
    box-shadow: none;
    cursor: pointer;
    transition: right 0.3s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.3s ease;
}
.docs-toggle svg { width: 1.35rem; height: 1.35rem; }
.docs-toggle:hover { background: var(--orange); color: var(--lime); }
.docs-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 110;
    display: flex;
    width: var(--docs-width);
    height: 100vh;
    height: 100dvh;
    background: var(--lime);
    box-shadow: -4px 0 28px rgba(255, 100, 86, 0.25);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    visibility: hidden;
}
.docs-drawer iframe { flex: 1 1 auto; width: 100%; border: 0; }
body.docs-open .docs-drawer { transform: none; visibility: visible; }
body.docs-open .docs-toggle { right: var(--docs-width); box-shadow: 0 10px 28px rgba(255, 100, 86, 0.28), 0 2px 6px rgba(255, 100, 86, 0.12); }
body.docs-open .upgrade-card { right: calc(var(--docs-width) + 1.5rem); }
@media (min-width: 1100px) {
    /* Breite Bildschirme: Inhalt rückt zusammen statt verdeckt zu werden (wie Bridge) */
    body.docs-open { margin-right: var(--docs-width); }
    /* Bei halber Breite reicht der Platz nicht für zwei Spalten (Top-Listen, API-Key würden zerquetscht) */
    body.docs-open .app-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Login ---------- */
.login-wrap { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.login-card { width: min(30rem, 100%); padding: 2rem 2rem 1.6rem; }
.login-card h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; letter-spacing: -0.03em; color: var(--coral); margin-bottom: 0.4rem; }
.login-lead { font-size: 1rem; margin-bottom: 1.2rem; }
.login-form { display: flex; flex-direction: column; gap: 0.8rem; }
.login-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 700; color: var(--coral); }
.login-form input {
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--coral);
    border-radius: 10px;
    background: var(--lime-pale);
    color: var(--coral-deep);
    outline: none;
    transition: box-shadow 0.15s ease;
}
.login-form input:focus { box-shadow: 0 0 0 3px var(--coral-soft); }
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--coral-deep);
    -webkit-box-shadow: 0 0 0 40px var(--lime-pale) inset;
    caret-color: var(--coral-deep);
}
.login-form .btn-primary { margin-top: 0.5rem; padding: 0.8rem; font-size: 1.05rem; }
/* Selbst-Registrierung (signup.php) */
.signup-badge {
    display: inline-block;
    margin-bottom: 0.6rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: var(--orange);
    color: var(--lime);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.login-lead strong { font-weight: 800; }
.signup-legal { margin-top: 0.9rem; font-size: 0.78rem; line-height: 1.45; }
.signup-switch { margin-top: 1rem; font-size: 0.9rem; font-weight: 700; text-align: center; }
.signup-legal a,
.signup-switch a { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }
.signup-legal a:hover,
.signup-switch a:hover { color: var(--orange-deep); }
/* Honeypot: für Menschen unsichtbar, aber nicht display:none (manche Bots überspringen versteckte Felder) */
.login-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert-verify { background: var(--orange); color: var(--lime); }
.alert-verify .alert-icon { background: var(--lime); color: var(--orange-deep); }
.alert-verify .btn-primary { flex: 0 0 auto; background: var(--lime); color: var(--coral); }
.alert-verify .btn-primary:hover { background: var(--coral); color: var(--lime); }
.link-btn { display: block; margin: 1.1rem auto 0; border: 0; background: none; color: var(--coral); font-size: 0.9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.flash { font-size: 0.9rem; font-weight: 700; padding: 0.6rem 0.85rem; border-radius: 10px; margin-bottom: 0.9rem; }
.flash-error { background: var(--coral); color: var(--lime); }
.flash-ok { background: var(--lime-deep); color: var(--coral-deep); }

/* ---------- Plan & billing (billing.js) ---------- */
.island-billing { display: flex; flex-direction: column; gap: 1rem; }
.billing-loading, .billing-empty { font-size: 0.9rem; opacity: 0.8; }
.plan-pending { padding: 0.6rem 0.9rem; border-radius: 10px; background: var(--orange-soft); font-weight: 600; margin-bottom: 0.6rem; }
.plan-pending .link-btn { display: inline; margin: 0 0 0 0.3rem; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.7rem; }
.plan-card { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.9rem 1rem; border-radius: 12px; background: var(--lime-pale); }
.plan-card.is-current { box-shadow: inset 0 0 0 2px var(--coral); }
.plan-card h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--coral); }
.plan-price { font-family: var(--font-display); font-size: 1.15rem; color: var(--coral-deep); }
.plan-price small { font-family: var(--font-text); font-size: 0.8rem; font-weight: 600; opacity: 0.8; }
.plan-card ul { list-style: none; font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 auto; }
.plan-card .btn-primary, .plan-card .btn-soft { align-self: flex-start; }
.plan-current { align-self: flex-start; padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--coral); color: var(--lime); font-size: 0.8rem; font-weight: 800; }
.plan-current.is-pending { background: var(--orange); }
.plan-note { margin-top: 0.6rem; font-size: 0.78rem; opacity: 0.85; }
.billing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; }
.billing-block h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--coral); margin-bottom: 0.5rem; }
.billing-block .billing-sub { margin-top: 1.1rem; }
.billing-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem 0.8rem; }
.billing-form .is-wide { grid-column: 1 / -1; }
.billing-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; font-weight: 700; color: var(--coral); }
.billing-form label[hidden] { display: none; }
.billing-form input, .billing-form select {
    font: inherit; font-size: 0.95rem; font-weight: 600; padding: 0.55rem 0.75rem; border: 1.5px solid var(--coral-line); border-radius: 10px;
    background: var(--lime-pale); color: var(--coral-deep); outline: none;
}
.billing-form input:focus, .billing-form select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.billing-form-actions { display: flex; justify-content: flex-end; }
.mandate-box { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; font-size: 0.9rem; }
.mandate-ok { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.6rem 0.9rem; border-radius: 10px; background: var(--lime-deep); }
.mandate-ok span { font-size: 0.82rem; font-weight: 600; }
.invoice-list table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.invoice-list th { text-align: left; color: var(--coral); font-size: 0.75rem; font-weight: 800; padding: 0.35rem 0.4rem; background: var(--lime); }
.invoice-list td { padding: 0.4rem; border-bottom: 1px solid var(--coral-soft); vertical-align: middle; }
.invoice-list tbody tr:hover > td { background: var(--orange); color: var(--lime); }
.invoice-list tbody tr:hover > td a:not(.btn-primary) { color: var(--lime); }
.invoice-list a { color: var(--coral); font-weight: 700; }
.invoice-list .btn-primary { padding: 0.25rem 0.7rem; font-size: 0.8rem; margin-left: 0.3rem; }
.inv-actions { white-space: nowrap; text-align: right; }
.inv-status { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.72rem; font-weight: 800; background: var(--coral-soft); }
.inv-status.is-bezahlt { background: var(--lime-deep); }
.inv-status.is-ueberfaellig { background: var(--coral); color: var(--lime); }
.inv-status.is-in_einzug, .inv-status.is-teilbezahlt { background: var(--orange-soft); color: var(--orange-deep); }
.inv-status.is-storniert { opacity: 0.6; text-decoration: line-through; }
.domains-status.is-error { color: var(--coral-dark); }
/* Bestätigungsdialog Planwechsel */
.plan-dialog { margin: auto; border: 0; border-radius: var(--radius); padding: 0; background: var(--lime-light); color: var(--coral-deep); width: min(28rem, calc(100vw - 2rem)); box-shadow: 0 24px 60px rgba(229, 72, 58, 0.25); }
.plan-dialog::backdrop { background: rgba(229, 72, 58, 0.22); }
.plan-dialog-inner { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.3rem 1.4rem 1.2rem; }
.plan-dialog h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; color: var(--coral); }
.plan-amount { display: grid; grid-template-columns: 4rem auto; align-items: baseline; gap: 0 0.6rem; }
.plan-amount span { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.8; }
.plan-amount strong { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; color: var(--coral); }
.plan-amount small { grid-column: 2; font-size: 0.8rem; }
.plan-small { font-size: 0.8rem; opacity: 0.85; }
.plan-dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.3rem; }
@media (max-width: 900px) { .billing-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .billing-form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Preset Builder (builder.js): Presets als Pillen wie die Domain-Kacheln, Vorschau, Code-Feld, Attribut-Inseln ---------- */
.builder-presets { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.7rem; }
.preset-pill { display: inline-flex; align-items: center; gap: 0.1rem; min-height: 2.4rem; padding: 0.2rem 0.3rem 0.2rem 0.4rem; border-radius: 999px; border: 1.5px solid var(--coral-line); background: var(--coral-soft); color: var(--coral); }
.preset-pill.is-active { background: var(--coral); border-color: var(--coral); color: var(--lime); }
.preset-pill:hover { background: var(--orange); border-color: var(--orange); color: var(--lime); }
.preset-pill.is-paused:not(.is-active) { border-style: dashed; opacity: 0.75; }
.preset-pill.is-new:hover { background: var(--coral); border-color: var(--coral); }
.preset-open { border: 0; background: none; color: inherit; font-weight: 800; font-size: 0.88rem; padding: 0.25rem 0.45rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; }
.preset-open small { font-size: 0.7rem; font-weight: 700; opacity: 0.85; }
.preset-live { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px rgba(230, 247, 150, 0.4); }
.preset-icon { border: 0; background: none; color: inherit; width: 1.6rem; height: 1.6rem; border-radius: 999px; cursor: pointer; font-size: 0.85rem; opacity: 0.8; }
.preset-icon:hover { opacity: 1; background: rgba(230, 247, 150, 0.28); }
.preset-name-input { width: 11rem; border: 0; border-radius: 999px; padding: 0.35rem 0.7rem; font: inherit; font-size: 0.85rem; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--lime-pale); color: var(--coral-deep); outline: none; }
.preset-add { border: 1.5px dashed var(--coral); border-radius: 999px; background: transparent; color: var(--coral); font-weight: 800; font-size: 0.85rem; padding: 0.45rem 1rem; cursor: pointer; }
.preset-add:hover { background: var(--orange); border-color: var(--orange); border-style: solid; color: var(--lime); }
.preset-add.is-upgrade { border-style: solid; border-color: var(--orange); color: var(--orange-deep); }
.builder-preset-hint { font-size: 0.82rem; font-weight: 600; margin: -0.3rem 0 0.7rem; }
.builder-stage { position: relative; border-radius: 12px; background: var(--lime-pale); overflow: hidden; }
.builder-preview { display: flex; gap: 0.8rem; height: 440px; padding: 0.6rem; }
/* Viewer und Controls je halbe Breite (Wunsch Peter 2026-10-15) */
.builder-preview > ar-button { flex: 1 1 50%; min-width: 0; height: 100%; }
.builder-preview > ar-button-controls { flex: 1 1 50%; min-width: 0; height: 100%; overflow: auto; }
.builder-locked { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.5rem; text-align: center; background: rgba(250, 253, 232, 0.94); }
.builder-locked strong { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; color: var(--coral); letter-spacing: -0.02em; }
.builder-locked span { font-size: 0.88rem; font-weight: 600; max-width: 30rem; }
.builder-code { margin-top: 0.8rem; }
.builder-code-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.9rem; margin-bottom: 0.45rem; }
.builder-code-head .range-switch button:disabled { opacity: 0.45; cursor: not-allowed; background: transparent; color: var(--coral); }
.builder-code-note { font-size: 0.8rem; font-weight: 700; }
.builder-code-row { position: relative; border: 1.5px dashed var(--coral); border-radius: 12px; background: var(--lime-pale); }
.builder-code-field { margin: 0; min-height: 3rem; max-height: 14rem; overflow: auto; padding: 0.7rem 5.2rem 0.7rem 0.9rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--coral-deep); outline: none; }
.builder-code-field:focus { box-shadow: inset 0 0 0 2px var(--coral); border-radius: 11px; }
.builder-code-row .copy-btn { position: absolute; top: 0.55rem; right: 0.55rem; }
.builder-code-help { margin-top: 0.4rem; font-size: 0.78rem; font-weight: 600; }
.builder-code-help code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }
.builder-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0 0.9rem; }
.builder-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
.builder-dirty { font-size: 0.8rem; font-weight: 800; color: var(--orange-deep); }
.builder-attrs { columns: 3 17rem; column-gap: 0.7rem; }
.b-island { break-inside: avoid; margin-bottom: 0.7rem; padding: 0.55rem 0.65rem 0.4rem; border-radius: 12px; background: var(--lime-pale); }
.b-island h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.02rem; letter-spacing: -0.02em; color: var(--coral); padding-bottom: 0.3rem; margin-bottom: 0.15rem; border-bottom: 1px solid var(--coral-line); }
.b-island-product { background: var(--coral); --ink: var(--lime); }
.b-island-product h3 { color: var(--lime); border-bottom-color: rgba(230, 247, 150, 0.35); }
.b-island-product .b-row .b-name,
.b-island-product .b-row.is-on .b-name { color: var(--lime); }
.b-row { display: grid; grid-template-columns: 2.2rem 2.2rem minmax(0, 1fr) minmax(0, 1.35fr); align-items: center; gap: 0.3rem 0.4rem; padding: 0.22rem 0; border-bottom: 1px solid rgba(255, 100, 86, 0.1); }
.b-row:last-child { border-bottom: 0; }
.b-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.7rem; color: #e9755e; overflow-wrap: anywhere; }
.b-row.is-on .b-name { color: var(--coral-deep); font-weight: 700; }
.b-row:not(.is-on) .b-input { opacity: 0.55; }
.b-input input[type="text"], .b-input input[type="number"], .b-input input[type="url"], .b-input select {
    width: 100%; font: inherit; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.45rem; border: 1.5px solid var(--coral-line); border-radius: 8px; background: var(--lime-light); color: var(--coral-deep); outline: none;
}
.b-input input:focus, .b-input select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.b-color { display: inline-flex; align-items: center; gap: 0.4rem; }
.b-input input[type="color"] { flex: 0 0 auto; width: 2.1rem; height: 1.5rem; padding: 0.1rem; border: 1.5px solid var(--coral-line); border-radius: 8px; background: var(--lime-light); cursor: pointer; }
.b-color code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.7rem; }
.b-input input::placeholder { color: rgba(229, 72, 58, 0.45); }
.b-island-product .b-input select { background: var(--lime-pale); border-color: var(--lime); }
.b-bool { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.b-bool input { accent-color: var(--coral); }
.b-url { display: flex; gap: 0.25rem; }
.b-samples { flex: 0 0 1.75rem; border: 1.5px solid var(--coral-line); border-radius: 8px; background: var(--lime-light); color: var(--coral); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.b-samples svg { width: 0.85rem; height: 0.85rem; stroke-width: 1.8; }
.b-samples:hover { background: var(--orange); border-color: var(--orange); color: var(--lime); }
.b-samples-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr)); gap: 0.3rem; padding: 0.35rem 0 0.45rem; }
.b-samples-grid button { border: 1.5px solid var(--coral-line); border-radius: 8px; background: var(--lime-light); padding: 2px; cursor: pointer; }
.b-samples-grid button:hover { border-color: var(--orange); background: var(--orange); }
.b-samples-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
/* Kleine Schalter wie .switch, zwei Bedeutungen: Koralle = am Button, Orange = in den Controls */
.b-switch { position: relative; display: inline-flex; cursor: pointer; }
.b-switch input { position: absolute; opacity: 0; pointer-events: none; }
.b-switch .switch { width: 2rem; height: 1.15rem; margin: 0; }
.b-switch .switch::after { width: calc(1.15rem - 7px); height: calc(1.15rem - 7px); }
.b-switch input:checked + .switch { background: var(--coral); }
.b-switch input:checked + .switch::after { transform: translateX(0.85rem); background: var(--lime); }
.b-switch.is-controls .switch { border-color: var(--orange); background: var(--orange-soft); }
.b-switch.is-controls .switch::after { background: var(--orange); }
.b-switch.is-controls input:checked + .switch { background: var(--orange); }
.b-switch:hover .switch { box-shadow: 0 0 0 2px var(--orange); }
.b-switch input:focus-visible + .switch { box-shadow: 0 0 0 3px var(--coral-soft); }
.b-island-product .b-switch .switch { border-color: var(--lime); }
.b-switch-spacer { width: 2rem; }
.builder-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.78rem; font-weight: 700; }
.builder-legend i { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: -0.05rem; }
.builder-legend .lg-on { background: var(--coral); }
.builder-legend .lg-ctl { background: var(--orange); }
@media (max-width: 760px) {
    .builder-preview { flex-direction: column; height: auto; }
    .builder-preview > ar-button { height: 340px; flex: none; }
    .builder-preview > ar-button-controls { height: auto; max-height: 320px; flex: none; }
}

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
    .app-grid { grid-template-columns: minmax(0, 1fr); }
    .app-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
    .sum-card:nth-child(2) { border-right: 0; }
    .sum-card:nth-child(-n+2) { border-bottom: 1px solid rgba(230, 247, 150, 0.25); }
    :root { --docs-width: calc(100vw - 2.6rem); }
}
@media (max-width: 600px) {
    .plan-chart-wrap { height: 200px; }
    .app-header { padding: 0.7rem 1rem; }
    .app-brand img { height: 2rem; }
    .app-title { font-size: 1.3rem; }
    .app-logout span { display: none; }
    .key-switch label span { display: none; }
    /* Mit Umschalter reicht der Platz nicht für Logo + „Dashboard“ + Auswahl + Abmelden */
    .app-header:has(.key-switch) .app-title { display: none; }
    .key-switch select { font-size: 0.8rem; }
    /* Key in eigener Zeile über die ganze Breite statt gekürzt */
    .app-header { flex-wrap: wrap; }
    .app-key { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
    .app-key-label { display: none; }
    .app-key code { font-size: 0.8rem; overflow-wrap: anywhere; white-space: normal; }
    .app-logout { padding: 0.5rem 0.65rem; }
    .app-main { padding: 0.7rem 0.7rem 1rem; }
    .island { padding: 0.85rem 0.85rem 0.95rem; }
    .usage-head { justify-content: center; }
    .usage-head h2 { width: 100%; text-align: center; }
    .range-switch button { padding: 0.25rem 0.6rem; }
    .nav-now { position: static; grid-column: 1 / -1; transform: none; justify-self: center; }
    .kpi strong { font-size: 1.4rem; }
    .chart-wrap { height: 250px; }
    .domain-tiles { grid-template-columns: minmax(0, 1fr); }
    .setup-steps, .settings-grid { grid-template-columns: minmax(0, 1fr); }
    .setting-body { padding-left: 0; }
    .alert { flex-wrap: wrap; }
    .alert-text { flex-basis: calc(100% - 5.5rem); }
    /* Hinweis im Seitenfluss unter der Kennzahlen-Leiste statt schwebend über dem Graphen */
    .app-header, .app-summary { order: -2; }
    .upgrade-card {
        order: -1;
        position: relative;
        right: auto;
        bottom: auto;
        width: auto;
        margin: 0.7rem 0.7rem 0;
        transform: translateY(-8px);
        box-shadow: 0 6px 20px rgba(255, 100, 86, 0.2);
    }
    body.docs-open .upgrade-card { right: auto; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
