/* ═══════════════════════════════════════════════════════════
   Google Ads Tool – Design nach Vodafone-Designsprache
   Rot #e60000 als einziger Akzent · Ink #25282b · Pill-CTAs
   Flache Karten (6px, Hairline-Border, keine Schatten)
   ═══════════════════════════════════════════════════════════ */

:root {
    --primary: #e60000;
    --primary-dark: #bd0000;
    --on-primary: #ffffff;
    --ink: #25282b;
    --body: #7e7e7e;
    --mute: #bebebe;
    --canvas: #ffffff;
    --canvas-soft: #f2f2f2;
    --on-dark: #ffffff;
    --green: #1a7a3c;
    --green-bg: #e8f5ec;
    --red-bg: #fdeaea;

    --radius-card: 6px;
    --radius-sm: 6px;
    --radius-pill-md: 32px;
    --radius-pill-lg: 60px;

    --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

[hidden] { display: none !important; }

body {
    font-family: var(--font);
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.55;
    font-size: 16px;
}

/* ── Logo-Orb (Speechmark) ── */
.logo-orb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--on-primary);
    border-radius: var(--radius-sm);
    width: 64px; height: 64px;
    font-size: 44px;
    font-weight: 800;
    line-height: 1;
    padding-top: 14px;
    user-select: none;
}
.logo-orb-sm { width: 32px; height: 32px; font-size: 22px; padding-top: 7px; border-radius: 4px; }

/* ── Welcome-Tutorial ── */
.tut-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(37, 40, 43, 0.65);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: tut-fade 0.25s ease;
}
.tut-overlay-soft { background: rgba(37, 40, 43, 0.45); pointer-events: none; }
.tut-modal {
    background: #fff; border-radius: var(--radius-sm);
    max-width: 460px; width: 100%; padding: 28px;
}
.tut-modal h3 { margin-bottom: 10px; }
.tut-modal p { margin-bottom: 18px; }
.tut-tip {
    position: fixed; z-index: 220;
    background: #fff; border-radius: var(--radius-sm);
    max-width: 380px; padding: 18px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    animation: tut-fade 0.25s ease;
}
.tut-tip h4 { margin-bottom: 6px; }
.tut-tip p { font-size: 14px; margin-bottom: 12px; }
.tut-tip-arrow { font-size: 20px; margin-bottom: 4px; }
.tut-tip-muted { opacity: 0.25; pointer-events: none; transition: opacity 0.3s ease; }
.tut-tip-footer { margin-top: 12px; border-top: 1px solid #eee; padding-top: 8px; }
.tut-skip {
    background: none; border: none; cursor: pointer;
    color: var(--mute); font-size: 12px; padding: 0;
}
.tut-skip:hover { color: var(--primary); text-decoration: underline; }
.tut-spotlight {
    position: relative; z-index: 210;
    box-shadow: 0 0 0 4px var(--primary), 0 0 0 9999px rgba(37, 40, 43, 0.45);
    border-radius: var(--radius-sm);
    background: #fff;
}
@keyframes tut-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Login als Conversion-Seite ── */
.connect-kicker {
    color: var(--primary);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.btn-google { display: inline-flex; align-items: center; gap: 10px; }
.btn-google .g-icon { flex-shrink: 0; }
.trust-list { list-style: none; margin-top: 28px; display: grid; gap: 12px; padding: 0; }
.trust-list li { font-size: 14px; line-height: 1.5; opacity: 0.92; }
.connect-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    padding: 26px;
    align-self: center;
}
.connect-card h3 { margin-bottom: 18px; }
.connect-steps { list-style: none; display: grid; gap: 16px; margin: 0 0 20px; padding: 0; }
.connect-steps li { display: flex; gap: 12px; align-items: flex-start; }
.connect-steps small { display: block; opacity: 0.8; margin-top: 2px; }
.connect-why {
    background: rgba(230, 0, 0, 0.12);
    border-left: 3px solid var(--primary);
    border-radius: 0 6px 6px 0;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 14px;
}
.connect-why p { margin: 4px 0 0; opacity: 0.9; }

/* ── Konten-Refresh ── */
.refresh-box { display: flex; align-items: center; gap: 12px; }

/* ── Klickbare Tabellen-Einträge ── */
.table-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--mute); }
.table-link:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Sprachumschalter ── */
.lang-switch { display: inline-flex; gap: 2px; margin-left: 8px; }
.lang-switch a {
    color: var(--mute);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
}
.lang-switch a.active { color: #fff; background: rgba(255, 255, 255, 0.15); }
.lang-switch a:hover { color: #fff; }

/* ── Monetarisierung: Pricing + Popup ── */
.badge-red { background: var(--primary); color: #fff; }
.btn-upgrade { background: var(--primary); color: #fff; border: none; }
.btn-upgrade:hover { filter: brightness(0.9); }
.pricing-intro { margin-bottom: 24px; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: stretch;
}
.pricing-card { position: relative; display: flex; flex-direction: column; text-align: center; padding: 28px 24px; }
.pricing-featured { border-color: var(--primary); border-width: 2px; }
.pricing-current { outline: 2px solid var(--ink); }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.pricing-tagline { color: var(--mute); margin: 4px 0 16px; }
.pricing-price { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.pricing-price span { font-size: 16px; font-weight: 400; color: var(--mute); }
.pricing-features { list-style: none; margin: 20px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pricing-features li::before { content: '✓ '; color: var(--primary); font-weight: 700; }
.pricing-cta { margin-top: auto; }
.pricing-note { text-align: center; margin-top: 24px; }
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(37, 40, 43, 0.6);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-box {
    background: #fff; border-radius: var(--radius-sm);
    max-width: 480px; width: 100%;
    padding: 28px;
}
.modal-box h3 { margin-bottom: 10px; }
.modal-box p { margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Tabellen-Aktionsspalte ── */
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn, .row-actions .btn-danger { vertical-align: middle; }

/* ── Gadsby.io Logo ── */
.brand-mark { width: 30px; height: 30px; display: block; }
.brand-mark-sm { width: 22px; height: 22px; }
.brand-tld { color: inherit; }

/* ── Topbar (dunkle Nav) ── */
.topbar {
    background: var(--ink);
    color: var(--on-dark);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 0px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--on-dark);
    text-decoration: none;
}
.brand-name {
    font-weight: 800;
    font-size: 21px;
    letter-spacing: -0.5px;
    text-transform: lowercase;
}
.topnav { display: flex; gap: 20px; }
.topnav-link {
    color: var(--on-dark);
    text-decoration: none;
    font-size: 16px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.topnav-link:hover { border-bottom-color: var(--primary); }
.topnav-link-sub { font-size: 13px; color: var(--mute); }
.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.user-chip {
    font-size: 13px;
    color: var(--mute);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Page-Hero (dunkles Band mit Display-Headline) ── */
.page-hero {
    background: var(--ink);
    color: var(--on-dark);
    padding: 28px 32px 44px;
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; }
.page-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -1px;
    text-transform: uppercase;
}
.breadcrumbs {
    font-size: 14px;
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.breadcrumbs a { color: var(--mute); text-decoration: none; }
.breadcrumbs a:hover { color: var(--on-dark); }
.bc-sep { color: var(--body); }
.bc-current { color: var(--on-dark); font-weight: 700; }

/* ── Badges / Chips ── */
.badge {
    padding: 4px 12px;
    border-radius: var(--radius-pill-md);
    font-size: 13px;
    font-weight: 700;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-gray { background: var(--canvas-soft); color: var(--body); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 32px auto; padding: 0 0px; }

.panel {
    background: var(--canvas);
    border: 1px solid var(--mute);
    border-radius: var(--radius-card);
    padding: 32px;
    margin-bottom: 24px;
}
.panel h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}
.panel h3 {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 28px 0 10px;
}

.hint { color: var(--body); font-size: 14px; margin-bottom: 14px; }
.hint-inline { color: var(--body); font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.hint a { color: var(--primary); }

/* ── Steps (Assistent) ── */
.steps { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.step {
    flex: 1;
    min-width: 160px;
    padding: 12px 16px;
    border: 1px solid var(--mute);
    border-radius: var(--radius-pill-lg);
    background: var(--canvas);
    cursor: pointer;
    font-family: var(--font);
    font-size: 15px;
    color: var(--body);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.step span {
    width: 24px; height: 24px;
    border-radius: 9999px;
    background: var(--canvas-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}
.step.active { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.step.active span { background: var(--primary); color: var(--on-primary); }
.step:disabled { cursor: not-allowed; opacity: .5; }

/* ── Formulare ── */
textarea, input[type="text"], input[type="url"], input[type="number"], input[type="date"], select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: var(--font);
    background: var(--canvas);
    color: var(--ink);
}
input:disabled, select:disabled { background: var(--canvas-soft); border-color: var(--mute); color: var(--body); }
textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(230,0,0,.15);
}
textarea { resize: vertical; }
::placeholder { color: var(--mute); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.57px;
    text-transform: uppercase;
    color: var(--body);
}
.field-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.field-row .field { flex: 1; min-width: 240px; }
.grow { flex: 2 !important; }

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.checks input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }
input[type="radio"] { accent-color: var(--primary); }

/* ── Buttons (Pills) ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-pill-lg);
    background: var(--primary);
    color: var(--on-primary);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-primary { background: var(--primary); }
.btn-outline {
    background: var(--canvas);
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--red-bg); border-color: var(--primary); }
.btn-outline-light {
    background: transparent;
    color: var(--on-dark);
    border: 1px solid var(--on-dark);
}
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: var(--on-dark); }
.btn-small { padding: 6px 16px; font-size: 14px; }
.btn-large { padding: 14px 32px; font-size: 18px; }
.btn-danger { background: transparent; color: var(--primary); border: none; font-size: 17px; cursor: pointer; padding: 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.actions { display: flex; align-items: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.status-text { color: var(--body); font-size: 14px; }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 15px; }
.alert-success { background: var(--green-bg); color: var(--green); }
.alert-error { background: var(--red-bg); color: var(--primary-dark); }
.alert-info { background: var(--canvas-soft); color: var(--ink); }

/* ── Anzeigengruppen ── */
.ad-group {
    border: 1px solid var(--mute);
    border-radius: var(--radius-card);
    padding: 20px;
    margin-bottom: 14px;
    background: var(--canvas-soft);
}
.ad-group-head { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.ad-group-head input { font-weight: 700; }
.ad-group h4 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.57px;
    text-transform: uppercase;
    color: var(--body);
    margin: 14px 0 8px;
}

.kw-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.kw-row input { flex: 1; }
.kw-row select { width: 130px; }

.ad-box { border: 1px solid var(--mute); border-radius: var(--radius-sm); padding: 12px 16px; background: var(--canvas); margin-bottom: 10px; }
.ad-toggle {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    background: none; border: none; cursor: pointer;
    padding: 4px 0;
    font: inherit; color: inherit; text-align: left;
}
.ad-toggle-hint {
    flex: 1;
    color: var(--mute);
    font-size: 13px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.ad-box.collapsed .ad-toggle-hint { opacity: 1; }
.ad-chevron {
    font-size: 14px;
    color: var(--mute);
    transition: transform 0.35s ease;
}
.ad-box.collapsed .ad-chevron { transform: rotate(-90deg); }
.ad-body {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.35s ease;
}
.ad-body-inner { overflow: hidden; min-height: 0; }
.ad-box.collapsed .ad-body { grid-template-rows: 0fr; }
.ad-box .char-count { font-size: 12px; color: var(--body); }
.ad-box .char-count.over { color: var(--primary); font-weight: 700; }
.ad-line { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ad-line input { flex: 1; }

/* ── Tags / Chips ── */
.tag-editor { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--canvas-soft);
    color: var(--ink);
    padding: 4px 12px;
    border-radius: var(--radius-pill-md);
    font-size: 14px;
    font-weight: 700;
}
.chip button { background: none; border: none; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; }
.chip-neg { background: var(--red-bg); color: var(--primary-dark); }
.tag-input { width: 220px !important; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ── Sitelinks ── */
.sitelink-row {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1.5fr 2fr auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
@media (max-width: 800px) { .sitelink-row { grid-template-columns: 1fr; } }

/* ── Geo-Suche ── */
.geo-search { display: flex; gap: 8px; max-width: 480px; }
.geo-results { margin-top: 8px; }
.geo-result {
    padding: 10px 16px;
    border: 1px solid var(--mute);
    border-radius: var(--radius-sm);
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 14px;
    background: var(--canvas);
}
.geo-result:hover { border-color: var(--primary); background: var(--red-bg); }

/* ── Loader ── */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300; /* über dem Tutorial-Overlay (200-220) */
}
.loader-box { text-align: center; color: var(--ink); font-weight: 700; }
.loader-anim { height: 60px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.spinner {
    width: 46px; height: 46px;
    border: 4px solid var(--canvas-soft);
    border-top-color: var(--primary);
    border-radius: 9999px;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-dots { display: flex; gap: 10px; }
.loader-dots i {
    width: 14px; height: 14px;
    background: var(--primary);
    border-radius: 9999px;
    animation: dot-bounce 0.9s ease-in-out infinite;
}
.loader-dots i:nth-child(2) { animation-delay: 0.15s; }
.loader-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot-bounce {
    0%, 100% { transform: translateY(0); opacity: .5; }
    50% { transform: translateY(-14px); opacity: 1; }
}
.loader-logo {
    width: 48px; height: 48px;
    animation: logo-pulse 1.2s ease-in-out infinite;
}
@keyframes logo-pulse {
    0%, 100% { transform: scale(0.85) rotate(0deg); opacity: .7; }
    50% { transform: scale(1.1) rotate(8deg); opacity: 1; }
}

/* ── Kampagnentyp-Auswahl ── */
.type-select { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.type-option {
    flex: 1;
    min-width: 240px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--mute);
    border-radius: var(--radius-card);
    cursor: pointer;
    background: var(--canvas);
}
.type-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--red-bg);
}
.type-option small { color: var(--body); }

/* ── PMax Bild-Upload ── */
.image-uploads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.image-slot {
    border: 1px dashed var(--mute);
    border-radius: var(--radius-card);
    padding: 16px;
    background: var(--canvas-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.image-slot small { color: var(--body); }
.image-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.image-preview { position: relative; }
.image-preview img {
    height: 64px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--mute);
    display: block;
}
.image-preview button {
    position: absolute;
    top: -8px; right: -8px;
    background: var(--primary);
    color: var(--on-primary);
    border: none;
    border-radius: 9999px;
    width: 20px; height: 20px;
    font-size: 11px;
    cursor: pointer;
    line-height: 1;
}

/* ── Konten-Übersicht ── */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.account-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--mute);
    border-radius: var(--radius-card);
    background: var(--canvas);
    text-decoration: none;
    color: var(--ink);
    transition: border-color .15s;
}
.account-card:hover { border-color: var(--primary); }
.account-card strong { display: block; font-size: 18px; }
.account-card small { color: var(--body); }
.account-icon { font-size: 26px; }
.account-arrow { margin-left: auto; color: var(--primary); font-size: 20px; }

.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ── Kampagnen-Tabelle ── */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--mute);
    white-space: nowrap;
}
.data-table th {
    background: var(--canvas-soft);
    color: var(--ink);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.57px;
    text-transform: uppercase;
}
.data-table td:first-child { white-space: normal; font-weight: 700; }

/* ── Wissensdateien ── */
.file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--canvas-soft);
}
.file-name { font-weight: 700; }
.file-meta { color: var(--body); font-size: 13px; margin-right: auto; }
.file-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.file-upload-label { cursor: pointer; }
.file-editor {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid var(--mute);
    border-radius: var(--radius-card);
    background: var(--canvas-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Rich-Text-Editor (Konzept) ── */
.rte-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--ink);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--canvas-soft);
}
.rte-toolbar button {
    padding: 5px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill-md);
    background: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
}
.rte-toolbar button:hover { background: var(--canvas); border-color: var(--primary); color: var(--primary); }
.rte {
    min-height: 320px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px 24px;
    border: 1px solid var(--ink);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--canvas);
}
.rte:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(230,0,0,.15); }
.rte h2 {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.2px;
    margin: 22px 0 8px;
}
.rte h2:first-child { margin-top: 0; }
.rte h3 { font-size: 16px; font-weight: 700; margin: 16px 0 6px; }
.rte p { margin-bottom: 10px; }
.rte ul, .rte ol { margin: 0 0 10px 22px; }

.eli5-box {
    margin-top: 20px;
    padding: 20px 24px;
    border-radius: var(--radius-card);
    background: var(--ink);
    color: var(--on-dark);
}
.eli5-box h3 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.eli5-box p { margin: 0; }

#push-result { margin-top: 18px; }
#push-result pre {
    background: var(--canvas-soft);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* ── Footer ── */
.footer {
    background: var(--ink);
    color: var(--on-dark);
    margin-top: 48px;
    padding: 32px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    flex-wrap: wrap;
}
.footer-mute { color: var(--mute); margin-left: auto; }

/* ── Login-Seite (Landing) ── */
.login-page { background: var(--ink); min-height: 100vh; }
.login-topbar { padding: 16px 32px; }
.login-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.login-topbar .brand { display: flex; align-items: center; gap: 12px; color: var(--on-dark); }
.login-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 32px 64px;
    color: var(--on-dark);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.login-title {
    font-size: clamp(48px, 7vw, 88px);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.login-sub { font-size: 18px; color: var(--mute); margin-bottom: 32px; max-width: 520px; }
.login-note { font-size: 13px; color: var(--body); margin-top: 24px; max-width: 480px; }

/* ── Login-Demo: Mini-App mit Unterseiten ── */
.demo-window {
    background: var(--canvas);
    color: var(--ink);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.demo-titlebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--canvas-soft);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots i { width: 10px; height: 10px; border-radius: 9999px; background: var(--mute); }
.demo-dots i:first-child { background: var(--primary); }
.demo-url {
    flex: 1;
    background: var(--canvas);
    border-radius: var(--radius-pill-md);
    padding: 4px 14px;
    font-size: 12px;
    color: var(--body);
}
.demo-url b { color: var(--ink); font-weight: 700; }

/* Viewport mit horizontal slidenden Unterseiten */
.demo-viewport { overflow: hidden; }
.demo-scenes {
    display: flex;
    width: 500%;
    transition: transform .65s cubic-bezier(.7,0,.25,1);
}
.on-1 .demo-scenes { transform: translateX(0); }
.on-2 .demo-scenes { transform: translateX(-20%); }
.on-3 .demo-scenes { transform: translateX(-40%); }
.on-4 .demo-scenes { transform: translateX(-60%); }
.on-5 .demo-scenes { transform: translateX(-80%); }

.scene {
    width: 20%;
    flex: none;
    padding: 16px 20px 20px;
    height: 330px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.scene h4 {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.57px;
    color: var(--primary);
    margin-bottom: 2px;
}
.scene label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.57px;
    text-transform: uppercase;
    color: var(--body);
    margin-top: 4px;
}

/* Bausteine der Mini-UI */
.d-input {
    border: 1px solid var(--mute);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    min-height: 36px;
}
.d-textarea { min-height: 72px; }
.caret {
    display: inline-block;
    width: 2px; height: 14px;
    background: var(--primary);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.d-btn {
    align-self: flex-start;
    margin-top: auto;
    background: var(--primary);
    color: var(--on-primary);
    border-radius: var(--radius-pill-lg);
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 700;
    transition: transform .15s, background .15s;
}
.d-btn.pressed { transform: scale(.92); background: var(--primary-dark); }

.skel {
    display: block;
    height: 7px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--canvas-soft) 25%, #e4e4e4 50%, var(--canvas-soft) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.d-h { display: block; height: 9px; border-radius: 4px; background: var(--ink); opacity: .85; }
.w95 { width: 95%; } .w90 { width: 90%; } .w85 { width: 85%; } .w82 { width: 82%; }
.w75 { width: 75%; } .w70 { width: 70%; } .w55 { width: 55%; } .w40 { width: 40%; } .w35 { width: 35%; }

/* Szene 2: Konzept – Zeilen erscheinen kaskadierend */
.d-doc {
    border: 1px solid var(--mute);
    border-radius: var(--radius-card);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.scene-concept .d-doc > *, .scene-concept .d-eli5 {
    opacity: 0;
    transform: translateY(8px);
}
.on-2 .scene-concept .d-doc > * { animation: rise .45s ease forwards; }
.on-2 .scene-concept .d-doc > *:nth-child(1) { animation-delay: .5s; }
.on-2 .scene-concept .d-doc > *:nth-child(2) { animation-delay: .75s; }
.on-2 .scene-concept .d-doc > *:nth-child(3) { animation-delay: 1s; }
.on-2 .scene-concept .d-doc > *:nth-child(4) { animation-delay: 1.3s; }
.on-2 .scene-concept .d-doc > *:nth-child(5) { animation-delay: 1.55s; }
.on-2 .scene-concept .d-doc > *:nth-child(6) { animation-delay: 1.8s; }
.on-2 .scene-concept .d-doc > *:nth-child(7) { animation-delay: 2.1s; }
.on-2 .scene-concept .d-doc > *:nth-child(8) { animation-delay: 2.35s; }
.on-2 .scene-concept .d-eli5 { animation: rise .5s ease 2.7s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.d-eli5 {
    background: var(--ink);
    color: var(--on-dark);
    border-radius: var(--radius-card);
    padding: 10px 14px;
    font-size: 12px;
    margin-top: auto;
}

/* Szene 3: Bausteine – Chips, Anzeige, Sitelinks */
.d-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.d-chip {
    background: var(--canvas-soft);
    border: 1px solid var(--mute);
    border-radius: var(--radius-pill-md);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.d-chip-link { background: var(--canvas); border-color: var(--primary); color: var(--primary); }
.scene-blocks .d-chip, .scene-blocks .d-ad, .scene-blocks label {
    opacity: 0;
    transform: translateY(10px) scale(.9);
}
.on-3 .scene-blocks label { animation: pop .35s ease forwards .35s; }
.on-3 .scene-blocks .d-chips:not(.d-sitelinks) .d-chip { animation: pop .4s cubic-bezier(.34,1.56,.64,1) forwards; }
.on-3 .scene-blocks .d-chips:not(.d-sitelinks) .d-chip:nth-child(1) { animation-delay: .5s; }
.on-3 .scene-blocks .d-chips:not(.d-sitelinks) .d-chip:nth-child(2) { animation-delay: .7s; }
.on-3 .scene-blocks .d-chips:not(.d-sitelinks) .d-chip:nth-child(3) { animation-delay: .9s; }
.on-3 .scene-blocks .d-chips:not(.d-sitelinks) .d-chip:nth-child(4) { animation-delay: 1.1s; }
.on-3 .scene-blocks .d-ad { animation: pop .5s cubic-bezier(.34,1.56,.64,1) forwards 1.6s; }
.on-3 .scene-blocks .d-sitelinks .d-chip { animation: pop .4s cubic-bezier(.34,1.56,.64,1) forwards; }
.on-3 .scene-blocks .d-sitelinks .d-chip:nth-child(1) { animation-delay: 2.6s; }
.on-3 .scene-blocks .d-sitelinks .d-chip:nth-child(2) { animation-delay: 2.8s; }
.on-3 .scene-blocks .d-sitelinks .d-chip:nth-child(3) { animation-delay: 3s; }
@keyframes pop { to { opacity: 1; transform: none; } }
.d-ad {
    border: 1px solid var(--mute);
    border-radius: var(--radius-card);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.d-ad-headline { font-size: 13px; font-weight: 700; color: #1558d6; }
.d-ad-url { font-size: 11px; color: var(--green); }

/* Szene 4: Einstellungen – Budget-Slider + Geo-Ping */
.d-slider {
    position: relative;
    height: 10px;
    border-radius: 9999px;
    background: var(--canvas-soft);
    margin: 8px 0 14px;
}
.d-slider i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    border-radius: 9999px;
    background: var(--primary);
    transition: width 1.1s cubic-bezier(.7,0,.25,1) .5s;
}
.on-4 .d-slider i { width: 68%; }
.d-slider b {
    position: absolute;
    right: 0; top: -22px;
    font-size: 12px;
    color: var(--primary);
    opacity: 0;
    transition: opacity .4s 1.3s;
}
.on-4 .d-slider b { opacity: 1; }
.d-chip-geo { display: inline-flex; align-items: center; gap: 7px; border-color: var(--primary); }
.d-chip-geo em {
    width: 8px; height: 8px;
    border-radius: 9999px;
    background: var(--primary);
    font-style: normal;
}
.on-4 .d-chip-geo em { animation: pulse 1.4s ease-out infinite .8s; }
.scene-settings .d-chip, .scene-settings label { opacity: 0; transform: translateY(8px); }
.on-4 .scene-settings label { animation: rise .35s ease forwards .3s; }
.on-4 .scene-settings .d-chip { animation: pop .4s cubic-bezier(.34,1.56,.64,1) forwards; }
.on-4 .scene-settings .d-chip:nth-child(1) { animation-delay: .9s; }
.on-4 .scene-settings .d-chip:nth-child(2) { animation-delay: 1.1s; }

/* Szene 5: Veröffentlichen – Progress, Checkliste, Erfolgskarte */
.d-progress {
    height: 8px;
    border-radius: 9999px;
    background: var(--canvas-soft);
    overflow: hidden;
    margin: 6px 0 4px;
}
.d-progress i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--primary);
    border-radius: 9999px;
}
.on-5 .d-progress i { animation: fill 1.6s cubic-bezier(.7,0,.25,1) forwards .4s; }
@keyframes fill { to { width: 100%; } }
.d-checklist { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.d-checklist li {
    font-size: 12px;
    font-weight: 600;
    color: var(--body);
    opacity: 0;
    transform: translateX(-8px);
}
.d-checklist li::before {
    content: '✓';
    color: var(--green);
    font-weight: 800;
    margin-right: 8px;
}
.on-5 .d-checklist li { animation: slide-in .35s ease forwards; }
.on-5 .d-checklist li:nth-child(1) { animation-delay: .7s; }
.on-5 .d-checklist li:nth-child(2) { animation-delay: 1.1s; }
.on-5 .d-checklist li:nth-child(3) { animation-delay: 1.5s; }
.on-5 .d-checklist li:nth-child(4) { animation-delay: 1.9s; }
@keyframes slide-in { to { opacity: 1; transform: none; } }

.demo-final {
    margin-top: auto;
    background: var(--ink);
    color: var(--on-dark);
    border-radius: var(--radius-card);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(14px) scale(.9);
}
.on-5 .demo-final { animation: pop .55s cubic-bezier(.34,1.56,.64,1) forwards 2.4s; }
.demo-final small { color: var(--mute); display: block; font-size: 11px; }
.demo-final strong { font-size: 14px; }
.demo-final-check {
    width: 36px; height: 36px;
    flex: none;
    border-radius: 9999px;
    background: var(--primary);
    color: var(--on-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
}
.on-5 .demo-final-check { animation: pulse 1.6s ease-out infinite 3s; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(230,0,0,.5); }
    70% { box-shadow: 0 0 0 14px rgba(230,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(230,0,0,0); }
}

/* Fortschrittsleiste unter der Demo */
.demo-progress {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    background: var(--canvas-soft);
}
.demo-step {
    flex: 1;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.57px;
    text-transform: uppercase;
    color: var(--body);
    padding-top: 8px;
    border-top: 3px solid var(--mute);
    transition: color .4s, border-color .4s;
}
.demo-step.done { color: var(--primary); border-top-color: var(--primary); }

/* Feature-Leiste */
.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,.18);
}
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature strong { display: block; font-size: 16px; }
.feature small { color: var(--mute); font-size: 13px; }
.feature-num {
    flex: none;
    width: 32px; height: 32px;
    border-radius: 9999px;
    background: var(--primary);
    color: var(--on-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

/* ── Kampagnen-Optimierung ── */
.opt-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0 16px; }
.opt-meta-item { font-size: 14px; color: var(--body); }

.opt-summary {
    background: var(--canvas-soft);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.55;
}

#opt-suggestions { display: flex; flex-direction: column; gap: 14px; }

.sugg-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    background: #fff;
}
.sugg-card h3 { margin: 10px 0 6px; font-size: 17px; }
.sugg-card.sugg-applied { border-color: var(--green); background: var(--green-bg); }
.sugg-card.sugg-rejected { opacity: 0.55; }

.sugg-head { display: flex; gap: 8px; flex-wrap: wrap; }
.badge.impact-high { background: var(--red-bg); color: var(--primary-dark); }
.badge.impact-medium { background: #fff4e0; color: #9a6200; }
.badge.impact-low { background: var(--canvas-soft); color: var(--body); }

.sugg-reason { font-size: 14.5px; color: var(--body); margin-bottom: 8px; }
.sugg-detail {
    font-size: 14px;
    font-weight: 600;
    background: var(--canvas-soft);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    display: inline-block;
    margin-bottom: 10px;
}
.sugg-actions { display: flex; gap: 10px; margin-top: 6px; }
.sugg-done { font-size: 14px; font-weight: 700; margin-top: 6px; }
.sugg-applied .sugg-done, .sugg-done.sugg-applied { color: var(--green); }
.sugg-done.sugg-rejected { color: var(--body); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .topbar-inner, .page-hero, .container, .footer { padding-left: 16px; padding-right: 16px; }
    .panel { padding: 20px; }
}
