/* QR-Codes & Kurzlinks (docs/qr-codes-kurzlinks.md) — Liste, Editor, Statistik,
   öffentlicher Generator. Nur Tokens aus app.css bzw. landing.css, Dunkelmodus über :root[data-theme="dark"]. */

.qc { --qc-accent: var(--primary, #1d4ed8); --qc-soft: color-mix(in srgb, var(--qc-accent) 9%, transparent);
      --qc-line: var(--border, #e5e7eb); --qc-muted: var(--muted, #6b7280); --qc-surface: var(--surface, #fff);
      --qc-text: var(--text, #111827); --qc-radius: 16px; }
.qc *, .qc *::before, .qc *::after { box-sizing: border-box; }

/* ── Kopf ─────────────────────────────────────────────────────────────── */
.qc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.qc-head h1 { margin: 0 0 .25rem; display: flex; align-items: center; gap: .55rem; }
.qc-head p { margin: 0; color: var(--qc-muted); max-width: 46rem; }
.qc-head .btn i { margin-right: .35rem; }

/* ── Kennzahlen ───────────────────────────────────────────────────────── */
.qc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.qc-kpi { background: var(--qc-surface); border: 1px solid var(--qc-line); border-radius: var(--qc-radius); padding: .9rem 1rem; }
.qc-kpi .n { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.qc-kpi .l { font-size: .8rem; color: var(--qc-muted); }
@media (max-width: 760px) { .qc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Werkzeugleiste ───────────────────────────────────────────────────── */
.qc-tools { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.qc-search { position: relative; flex: 1 1 240px; max-width: 420px; }
.qc-search i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--qc-muted); font-size: .85rem; }
.qc-search input { width: 100%; padding-left: 2.2rem; margin: 0; }
.qc-chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.qc-chip { border: 1px solid var(--qc-line); background: var(--qc-surface); color: var(--qc-text); border-radius: 999px;
           padding: .35rem .75rem; font-size: .82rem; font-weight: 600; cursor: pointer; }
.qc-chip.on { background: var(--qc-accent); border-color: var(--qc-accent); color: #fff; }

/* ── Liste ────────────────────────────────────────────────────────────── */
.qc-list { display: grid; gap: .8rem; }
.qc-item { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 1rem; align-items: center;
           background: var(--qc-surface); border: 1px solid var(--qc-line); border-radius: var(--qc-radius); padding: .85rem; transition: box-shadow .15s, border-color .15s; }
.qc-item:hover { border-color: color-mix(in srgb, var(--qc-accent) 35%, var(--qc-line)); box-shadow: 0 8px 26px rgba(15, 23, 42, .07); }
.qc-item.is-paused { opacity: .72; }
.qc-thumb { width: 104px; height: 104px; border-radius: 12px; border: 1px solid var(--qc-line); background: #fff; padding: 6px; display: block; }
.qc-thumb img { width: 100%; height: 100%; display: block; }
.qc-main { min-width: 0; }
.qc-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .25rem; }
.qc-title a { font-weight: 700; font-size: 1.02rem; color: var(--qc-text); }
.qc-sub { color: var(--qc-muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qc-link { display: inline-flex; align-items: center; gap: .4rem; margin: .35rem 0 .3rem; max-width: 100%; }
.qc-link code { background: var(--qc-soft); color: var(--qc-accent); border-radius: 8px; padding: .22rem .5rem; font-size: .82rem;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.qc-copy { border: 1px solid var(--qc-line); background: var(--qc-surface); border-radius: 8px; padding: .22rem .45rem; cursor: pointer; color: var(--qc-text); font-size: .8rem; }
.qc-copy.ok { color: var(--success, #059669); border-color: currentColor; }
.qc-metrics { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .8rem; color: var(--qc-muted); }
.qc-metrics b { color: var(--qc-text); font-variant-numeric: tabular-nums; }
.qc-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.qc-menu { position: relative; }
.qc-menu > summary { list-style: none; cursor: pointer; }
.qc-menu > summary::-webkit-details-marker { display: none; }
.qc-menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 210px; background: var(--qc-surface);
               border: 1px solid var(--qc-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 23, 42, .16); padding: .35rem; }
.qc-menu-pop a, .qc-menu-pop button { display: flex; width: 100%; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: 8px;
               background: none; border: 0; font: inherit; font-size: .88rem; color: var(--qc-text); text-align: left; cursor: pointer; text-decoration: none; }
.qc-menu-pop a:hover, .qc-menu-pop button:hover { background: var(--qc-soft); }
.qc-menu-pop .danger { color: var(--danger, #dc2626); }
.qc-menu-pop form { margin: 0; }
.qc-menu-pop hr { border: 0; border-top: 1px solid var(--qc-line); margin: .3rem 0; }
@media (max-width: 760px) {
  .qc-item { grid-template-columns: 76px minmax(0, 1fr); }
  .qc-thumb { width: 76px; height: 76px; }
  .qc-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ── Badges ───────────────────────────────────────────────────────────── */
.qc-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
            border-radius: 999px; padding: .15rem .55rem; background: var(--qc-soft); color: var(--qc-accent); white-space: nowrap; }
.qc-badge.dyn { background: color-mix(in srgb, #059669 12%, transparent); color: #047857; }
.qc-badge.static { background: color-mix(in srgb, #64748b 14%, transparent); color: #475569; }
.qc-badge.paused { background: color-mix(in srgb, #d97706 15%, transparent); color: #b45309; }
.qc-badge.blocked { background: color-mix(in srgb, #dc2626 13%, transparent); color: #b91c1c; }
:root[data-theme="dark"] .qc-badge.dyn { color: #34d399; }
:root[data-theme="dark"] .qc-badge.static { color: #cbd5e1; }
:root[data-theme="dark"] .qc-badge.paused { color: #fbbf24; }
:root[data-theme="dark"] .qc-badge.blocked { color: #f87171; }

/* ── Arten-Kacheln ────────────────────────────────────────────────────── */
.qc-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.qc-type { position: relative; display: flex; flex-direction: column; gap: .35rem; text-align: left; cursor: pointer;
           background: var(--qc-surface); border: 1.5px solid var(--qc-line); border-radius: 14px; padding: .9rem; color: var(--qc-text);
           font: inherit; text-decoration: none; transition: transform .12s, border-color .12s, box-shadow .12s; }
.qc-type:hover { transform: translateY(-2px); border-color: var(--qc-accent); box-shadow: 0 10px 24px rgba(29, 78, 216, .12); text-decoration: none; }
.qc-type.on { border-color: var(--qc-accent); box-shadow: 0 0 0 3px var(--qc-soft); }
.qc-type .ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
               background: var(--qc-soft); color: var(--qc-accent); font-size: 1.05rem; }
.qc-type strong { font-size: .95rem; }
.qc-type span.h { font-size: .78rem; color: var(--qc-muted); line-height: 1.35; }
.qc-type .tag { position: absolute; top: .7rem; right: .7rem; }

/* ── Editor ───────────────────────────────────────────────────────────── */
.qc-ed { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.4rem; align-items: start; }
@media (max-width: 1100px) { .qc-ed { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 900px) { .qc-ed { grid-template-columns: 1fr; } .qc-side { position: static !important; order: -1; } .qc-stage { max-width: 300px; margin: 0 auto; } }
.qc-panel { background: var(--qc-surface); border: 1px solid var(--qc-line); border-radius: var(--qc-radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.qc-panel > h2 { display: flex; align-items: center; gap: .55rem; font-size: 1.05rem; margin: 0 0 .9rem; }
.qc-panel > h2 .no { width: 26px; height: 26px; border-radius: 50%; background: var(--qc-accent); color: #fff; font-size: .78rem;
                     display: inline-flex; align-items: center; justify-content: center; flex: none; }
.qc-panel > h2 small { margin-left: auto; font-weight: 500; color: var(--qc-muted); font-size: .8rem; }
.qc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
.qc-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 .9rem; }
@media (max-width: 640px) { .qc-grid2, .qc-grid3 { grid-template-columns: 1fr; } }
.qc .field { margin-bottom: .85rem; }
.qc .field label small { font-weight: 400; color: var(--qc-muted); }
.qc .hint { font-size: .78rem; color: var(--qc-muted); margin-top: .3rem; }
.qc-section[hidden] { display: none !important; }
.qc-switch { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .9rem; border: 1px solid var(--qc-line); border-radius: 12px; cursor: pointer; margin-bottom: .9rem; }
.qc-switch input { margin-top: .2rem; width: 18px; height: 18px; flex: none; }
.qc-switch strong { display: block; font-size: .92rem; }
.qc-switch span { font-size: .8rem; color: var(--qc-muted); }
.qc-mode { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.qc-mode label { margin: 0; display: flex; gap: .6rem; align-items: flex-start; border: 1.5px solid var(--qc-line); border-radius: 12px; padding: .75rem .8rem; cursor: pointer; font-weight: 400; }
.qc-mode label:has(input:checked) { border-color: var(--qc-accent); box-shadow: 0 0 0 3px var(--qc-soft); }
.qc-mode input { margin-top: .2rem; width: auto; flex: none; }
.qc-mode strong { display: block; font-size: .9rem; }
.qc-mode span { font-size: .78rem; color: var(--qc-muted); }
@media (max-width: 640px) { .qc-mode { grid-template-columns: 1fr; } }

/* Design-Steuerung */
.qc-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.qc-preset { border: 1.5px solid var(--qc-line); background: var(--qc-surface); border-radius: 12px; padding: .45rem .35rem .4rem; cursor: pointer;
             display: flex; flex-direction: column; align-items: center; gap: .3rem; font: inherit; font-size: .72rem; color: var(--qc-text); }
.qc-preset:hover, .qc-preset.on { border-color: var(--qc-accent); }
.qc-preset .sw { width: 44px; height: 44px; border-radius: 10px; display: block; }
.qc-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .75rem; }
.qc-row > .lab { flex: 0 0 9.5rem; font-weight: 600; font-size: .86rem; }
@media (max-width: 640px) { .qc-row > .lab { flex-basis: 100%; } }
.qc-opts { display: flex; gap: .35rem; flex-wrap: wrap; }
.qc-opt { border: 1.5px solid var(--qc-line); background: var(--qc-surface); color: var(--qc-text); border-radius: 10px; padding: .4rem .65rem;
          font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.qc-opt:hover { border-color: var(--qc-accent); }
.qc-opt.on { border-color: var(--qc-accent); background: var(--qc-soft); color: var(--qc-accent); }
.qc-opt svg { width: 18px; height: 18px; }
.qc-color { display: inline-flex; align-items: center; gap: .4rem; }
.qc-color input[type=color] { width: 40px; height: 34px; padding: 2px; border-radius: 9px; border: 1px solid var(--qc-line); background: var(--qc-surface); cursor: pointer; }
.qc-color input[type=text] { width: 6.6rem; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.qc-swatches { display: flex; gap: .3rem; }
.qc-swatches button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(0, 0, 0, .12); cursor: pointer; padding: 0; }
.qc-logo { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.qc-logo .prev { width: 44px; height: 44px; border-radius: 10px; border: 1px dashed var(--qc-line); display: flex; align-items: center; justify-content: center; color: var(--qc-muted); overflow: hidden; }
.qc-more { margin-top: .4rem; }
.qc-more > summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--qc-accent); padding: .3rem 0; }

/* Vorschau-Spalte */
.qc-side { position: sticky; top: 76px; }
.qc-prev { background: var(--qc-surface); border: 1px solid var(--qc-line); border-radius: 20px; padding: 1.1rem; box-shadow: 0 18px 46px rgba(15, 23, 42, .08); }
.qc-stage { position: relative; aspect-ratio: 1 / 1.08; border-radius: 14px; display: flex; align-items: center; justify-content: center; padding: 1.1rem;
            background: repeating-conic-gradient(color-mix(in srgb, var(--qc-line) 55%, transparent) 0% 25%, transparent 0% 50%) 50% / 18px 18px; }
.qc-stage svg { width: 100%; height: 100%; max-height: 100%; display: block; filter: drop-shadow(0 6px 18px rgba(15, 23, 42, .12)); transition: opacity .15s; }
.qc-stage.busy svg { opacity: .55; }
.qc-stage .spin { position: absolute; top: .7rem; right: .7rem; font-size: .9rem; color: var(--qc-muted); display: none; }
.qc-stage.busy .spin { display: block; }
.qc-checks { margin: .7rem 0 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.qc-checks li { font-size: .8rem; display: flex; gap: .45rem; align-items: flex-start; border-radius: 9px; padding: .45rem .6rem; }
.qc-checks li.ok { background: color-mix(in srgb, #059669 10%, transparent); color: #047857; }
.qc-checks li.warn { background: color-mix(in srgb, #d97706 13%, transparent); color: #92400e; }
.qc-checks li.bad { background: color-mix(in srgb, #dc2626 11%, transparent); color: #991b1b; }
.qc-checks li.info { background: var(--qc-soft); color: var(--qc-accent); }
:root[data-theme="dark"] .qc-checks li.ok { color: #6ee7b7; }
:root[data-theme="dark"] .qc-checks li.warn { color: #fcd34d; }
:root[data-theme="dark"] .qc-checks li.bad { color: #fca5a5; }
.qc-short { margin-top: .8rem; border: 1px dashed color-mix(in srgb, var(--qc-accent) 45%, var(--qc-line)); border-radius: 12px; padding: .6rem .7rem; }
.qc-short .l { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--qc-muted); font-weight: 700; }
.qc-short .v { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-weight: 700; color: var(--qc-accent); font-size: .92rem; word-break: break-all; }
.qc-save { display: grid; gap: .5rem; margin-top: .9rem; }
.qc-save[hidden] { display: none; }
.qc-save .btn { width: 100%; justify-content: center; }
.qc-dl { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.qc-dl select { margin: 0; }
.qc-errors { display: none; margin-top: .8rem; padding: .7rem .8rem; border-radius: 12px; background: color-mix(in srgb, #dc2626 10%, transparent); color: #991b1b; font-size: .85rem; }
.qc-errors.on { display: block; }
.qc-errors ul { margin: .2rem 0 0 1rem; padding: 0; }
:root[data-theme="dark"] .qc-errors { color: #fca5a5; }
.qc-status { font-size: .8rem; color: var(--qc-muted); text-align: center; min-height: 1.1rem; }

/* ── Statistik ────────────────────────────────────────────────────────── */
.qc-stathead { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.qc-stathead img { width: 72px; height: 72px; border-radius: 12px; border: 1px solid var(--qc-line); background: #fff; padding: 4px; }
.qc-stathead h1 { margin: 0; font-size: 1.35rem; }
.qc-hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 120px; }
.qc-hours span { display: block; background: var(--vz-series, var(--qc-accent)); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.qc-hours-axis { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font-size: .65rem; color: var(--qc-muted); text-align: center; margin-top: .3rem; }

/* ── Sperrseite / Werbung ─────────────────────────────────────────────── */
.qc-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: center;
           background: linear-gradient(135deg, color-mix(in srgb, var(--qc-accent) 10%, var(--qc-surface)), var(--qc-surface));
           border: 1px solid var(--qc-line); border-radius: 22px; padding: 2rem; margin-bottom: 1.2rem; }
.qc-hero h1 { font-size: 1.8rem; line-height: 1.2; margin: .4rem 0 .7rem; }
.qc-hero p { color: var(--qc-muted); }
.qc-hero ul { list-style: none; padding: 0; margin: 1rem 0 1.3rem; display: grid; gap: .5rem; }
.qc-hero li { display: flex; gap: .55rem; align-items: flex-start; }
.qc-hero li i { color: var(--qc-accent); margin-top: .2rem; }
.qc-hero-art { display: flex; justify-content: center; }
.qc-hero-art .phone { width: 220px; border-radius: 30px; border: 8px solid #0f172a; background: #fff; padding: 1.1rem .9rem; box-shadow: 0 30px 60px rgba(15, 23, 42, .25); }
.qc-hero-art .phone svg { width: 100%; display: block; }
.qc-hero-art .bar { margin-top: .8rem; display: flex; align-items: end; gap: 5px; height: 54px; }
.qc-hero-art .bar span { flex: 1; border-radius: 4px 4px 0 0; background: var(--qc-accent); opacity: .85; }
@media (max-width: 860px) { .qc-hero { grid-template-columns: 1fr; } .qc-hero-art { display: none; } }

.qc-empty { text-align: center; padding: 2.2rem 1rem 1rem; }
.qc-empty h2 { margin: .3rem 0 .4rem; }
.qc-empty p { color: var(--qc-muted); margin: 0 auto 1.2rem; max-width: 34rem; }

/* Häkchen und Optionsfelder nicht auf volle Breite ziehen (app.css: input { width: 100% }) */
.qc input[type=checkbox], .qc input[type=radio] { width: auto; padding: 0; flex: none; }
.qc textarea { min-height: 64px; }

/* ── Öffentlicher Generator (/qr-code-generator, Layout landing) ──────── */
.qg { --qc-accent: var(--lp-primary, #1d4ed8); --qc-line: var(--lp-border, #e5e7eb); --qc-muted: var(--lp-muted, #64748b);
      --qc-surface: #fff; --qc-text: var(--lp-text, #0f172a); }
.qg label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .35rem; }
.qg input[type=text], .qg input[type=url], .qg input[type=email], .qg input[type=tel], .qg select, .qg textarea {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--qc-line); border-radius: 10px; font: inherit; font-size: .95rem; background: #fff; color: var(--qc-text); }
.qg input:focus, .qg select:focus, .qg textarea:focus { outline: 2px solid var(--qc-accent); outline-offset: 0; border-color: var(--qc-accent); }
.qg small { font-weight: 400; color: var(--qc-muted); }
.qg-tool { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.6rem; align-items: start; max-width: 1040px; margin: 0 auto;
           background: #fff; border: 1px solid var(--qc-line); border-radius: 24px; padding: 1.4rem; box-shadow: var(--lp-shadow-md, 0 18px 40px -22px rgba(15,23,42,.35)); }
@media (max-width: 860px) { .qg-tool { grid-template-columns: 1fr; padding: 1rem; } .qg-side { position: static; } .qg .qc-stage { max-width: 300px; margin: 0 auto; } }
.qg-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.qg-tab { border: 1.5px solid var(--qc-line); background: #fff; color: var(--qc-text); border-radius: 999px; padding: .5rem .9rem; font: inherit;
          font-size: .88rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; }
.qg-tab:hover { border-color: var(--qc-accent); }
.qg-tab.on { background: var(--qc-accent); border-color: var(--qc-accent); color: #fff; }
.qg-style { border-top: 1px solid var(--qc-line); margin-top: .4rem; padding-top: 1rem; }
.qg-pro { display: flex; gap: .7rem; align-items: flex-start; flex-wrap: wrap; background: var(--lp-accent-bg, #eff6ff);
          border: 1px solid var(--lp-accent-border, #dbeafe); border-radius: 14px; padding: .8rem .9rem; font-size: .86rem; margin-top: .6rem; }
.qg-pro > i { color: var(--qc-accent); margin-top: .15rem; }
.qg-pro > span { flex: 1 1 260px; }
.qg-pro a { font-weight: 700; white-space: nowrap; }
.qg-side { position: sticky; top: 90px; }
.qg .qc-prev { box-shadow: none; border-radius: 18px; }
.qg-dl { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; margin-top: .9rem; }
.qg-dl select { padding: .55rem .5rem; }
.qg-dl .lp-btn { justify-content: center; padding-left: .6rem; padding-right: .6rem; }
.qg-dl .lp-btn[disabled] { opacity: .45; cursor: not-allowed; }
.qg-note { margin: .7rem 0 0; font-size: .78rem; color: var(--qc-muted); text-align: center; }
.qg-compare { max-width: 860px; margin: 0 auto; overflow-x: auto; }
.qg-compare table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--qc-line); }
.qg-compare th, .qg-compare td { padding: .8rem 1rem; border-bottom: 1px solid var(--qc-line); text-align: left; font-size: .92rem; vertical-align: top; }
.qg-compare th { background: var(--lp-bg-soft, #f8fafc); font-size: .85rem; }
.qg-compare td:nth-child(2), .qg-compare td:nth-child(3), .qg-compare th:nth-child(2), .qg-compare th:nth-child(3) { text-align: center; width: 24%; }
.qg-compare tr:last-child td { border-bottom: 0; }
.qg-tm { text-align: center; font-size: .75rem; color: var(--qc-muted); margin: 0 0 2rem; }
