/* ============================================================
   FILENTO — App-Demo (klickbarer 5-Schritte-Wizard + Account)
   Nutzt Tokens aus styles.css (Indigo + Koralle, Geist, Glas).
   ============================================================ */

body { min-height: 100vh; }

.demo-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 14px var(--gutter);
  background: var(--glass); backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.demo-bar .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; }
.demo-bar .brand img { width: 32px; height: 32px; }
.demo-bar .brand .word { background: linear-gradient(120deg, var(--text), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.demo-flag { font-family: var(--font-mono); font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); padding: 4px 9px; border-radius: 999px; }
.demo-bar .spacer { flex: 1; }
.demo-tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 999px; }
.demo-tabs button { padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem; color: var(--text-3); transition: color .2s, background .2s; }
.demo-tabs button.active { color: var(--on-brand); background: linear-gradient(135deg, var(--blue), var(--indigo)); box-shadow: var(--shadow-brand); }
.demo-back { color: var(--text-3); font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.demo-back:hover { color: var(--brand); }
.demo-back svg { width: 16px; height: 16px; }

.stage { max-width: 860px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) var(--gutter) 80px; }

/* progress */
.wz-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wz-seg { height: 6px; flex: 1; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wz-seg i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--indigo)); transition: width .5s var(--ease); }
.wz-seg.done i { width: 100%; }
.wz-seg.active i { width: 50%; }
.wz-steplabel { font-family: var(--font-mono); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 26px; }

.wz-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: clamp(24px, 4vw, 42px);
}
.wz-h { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; }
.wz-sub { color: var(--text-2); margin-top: 10px; font-size: 1.05rem; }
.wz-body { margin-top: 28px; }

/* dropzone */
.wz-drop {
  border: 2px dashed var(--border); border-radius: var(--r-md);
  padding: 40px 24px; text-align: center; cursor: pointer;
  background: var(--surface-2); transition: border-color .25s, background .25s, transform .2s;
}
.wz-drop:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-2px); }
.wz-drop .ic { width: 58px; height: 58px; border-radius: 16px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); }
.wz-drop .ic svg { width: 28px; height: 28px; }
.wz-drop b { font-family: var(--font-display); font-size: 1.1rem; }
.wz-drop p { color: var(--text-3); font-size: .92rem; margin-top: 6px; }
.wz-examples { margin-top: 16px; font-size: .85rem; color: var(--text-3); text-wrap: pretty; }

.wz-files { display: grid; gap: 10px; margin-top: 18px; }
.wz-file { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border-2); animation: fade-up .4s var(--ease) both; }
.wz-file .fic { width: 38px; height: 44px; border-radius: 7px; background: linear-gradient(160deg, var(--brand-soft), transparent); border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent); display: grid; place-items: center; color: var(--brand); flex-shrink: 0; position: relative; }
.wz-file .fic svg { width: 18px; height: 18px; }
.wz-file .fmeta { flex: 1; min-width: 0; }
.wz-file .fmeta b { font-size: .94rem; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wz-file .fmeta span { color: var(--text-3); font-size: .8rem; }
.wz-file .ok { color: #22c55e; }
.wz-file .rm { color: var(--text-3); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; transition: background .2s, color .2s; }
.wz-file .rm:hover { background: var(--accent-soft); color: var(--accent); }
.wz-file .rm svg { width: 16px; height: 16px; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wz-addmore { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--border)); }
.wz-addmore:hover { background: var(--brand-soft); }
.wz-addmore svg { width: 16px; height: 16px; }

.wz-note { display: flex; gap: 12px; padding: 15px 17px; border-radius: var(--r-sm); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); margin-top: 20px; font-size: .9rem; color: var(--text-2); }
.wz-note svg { width: 19px; height: 19px; color: var(--brand); flex-shrink: 0; margin-top: 1px; }
.wz-note.warn { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.wz-note.warn svg { color: var(--accent); }

/* step 3 — scanning */
.wz-scan { display: grid; gap: 14px; margin: 10px 0; }
.wz-scan-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border-2); opacity: .5; transition: opacity .4s, border-color .4s; }
.wz-scan-row.active { opacity: 1; border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.wz-scan-row.done { opacity: 1; }
.wz-scan-row .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); flex-shrink: 0; }
.wz-scan-row.active .dot { background: var(--brand-soft); color: var(--brand); }
.wz-scan-row.done .dot { background: #22c55e; color: #fff; }
.wz-scan-row .dot svg { width: 18px; height: 18px; }
.wz-spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: wz-spin .7s linear infinite; }
@keyframes wz-spin { to { transform: rotate(360deg); } }
.wz-scan-row b { font-weight: 600; }

/* step 4 — smart preview */
.wz-section { margin-top: 26px; }
.wz-section:first-child { margin-top: 0; }
.wz-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.wz-section-head .si { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.wz-section-head .si svg { width: 16px; height: 16px; }
.wz-section-head h4 { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; }
.wz-section-head .cnt { margin-left: auto; font-family: var(--font-mono); font-size: .74rem; font-weight: 700; color: var(--text-3); background: var(--surface-3); padding: 3px 9px; border-radius: 999px; }
.si.auto { background: var(--brand-soft); color: var(--brand); }
.si.yn { background: rgba(168, 85, 247, .14); color: #a855f7; }
.si.consent { background: rgba(245, 158, 11, .14); color: #d97706; }
.si.manual { background: var(--accent-soft); color: var(--accent); }
.si.custom { background: rgba(34, 197, 94, .14); color: #16a34a; }

.wz-field { display: grid; grid-template-columns: 200px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border-2); }
.wz-field:first-of-type { border-top: none; }
.wz-field .flab { font-size: .92rem; }
.wz-field .flab b { font-weight: 600; display: block; }
.wz-field .src { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: .68rem; color: var(--text-3); margin-top: 3px; }
.wz-field .src svg { width: 11px; height: 11px; }
.wz-input { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: .94rem; transition: border-color .2s, box-shadow .2s; }
.wz-input:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }

.wz-toggle { display: inline-flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 999px; }
.wz-toggle button { padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: .86rem; color: var(--text-3); transition: .2s; }
.wz-toggle button.on { background: var(--brand); color: #fff; }

.wz-consent { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--border-2); }
.wz-check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border); flex-shrink: 0; display: grid; place-items: center; cursor: pointer; transition: .2s; background: var(--surface-2); }
.wz-check.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.wz-check svg { width: 14px; height: 14px; opacity: 0; transition: opacity .15s; }
.wz-check.on svg { opacity: 1; }
.wz-consent p { font-size: .92rem; color: var(--text-2); }

.wz-ask { display: flex; gap: 10px; margin-top: 4px; }
.wz-ask input { flex: 1; }
.wz-ask button { white-space: nowrap; }
.wz-answer { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-sm); background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); font-size: .92rem; color: var(--text-2); animation: fade-up .4s var(--ease) both; }

/* step 5 — pdf preview */
.wz-pdfwrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; }
.wz-pdf { position: relative; aspect-ratio: 1 / 1.35; border-radius: var(--r-sm); background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid rgba(0,0,0,.1); }
.wz-pdf .pg { position: absolute; inset: 0; padding: 26px 28px; color: #1e293b; }
.wz-pdf .pg .ph { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: #0f172a; }
.wz-pdf .pg .pmeta { font-size: .68rem; color: #64748b; margin-top: 2px; }
.wz-pdf .prow { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef2f7; font-size: .76rem; }
.wz-pdf .prow span:first-child { color: #64748b; }
.wz-pdf .prow span:last-child { color: #0f172a; font-weight: 600; font-family: var(--font-mono); }
.wz-pdf .pfields { margin-top: 14px; }
.wz-watermark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.wz-watermark span { font-family: var(--font-display); font-weight: 800; font-size: 3.6rem; letter-spacing: .2em; color: rgba(225, 29, 72, .18); transform: rotate(-24deg); border: 4px solid rgba(225, 29, 72, .18); padding: 8px 30px; border-radius: 12px; }
.wz-corner { position: absolute; font-family: var(--font-mono); font-size: .56rem; font-weight: 700; letter-spacing: .1em; color: rgba(225,29,72,.5); text-transform: uppercase; }
.wz-corner.tl { top: 10px; left: 12px; } .wz-corner.tr { top: 10px; right: 12px; }
.wz-corner.bl { bottom: 10px; left: 12px; } .wz-corner.br { bottom: 10px; right: 12px; }

.wz-finish .guarantee { display: flex; gap: 13px; padding: 18px; border-radius: var(--r-md); background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); }
.wz-finish .guarantee .gic { width: 42px; height: 42px; border-radius: 12px; background: #22c55e; color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.wz-finish .guarantee .gic svg { width: 22px; height: 22px; }
.wz-finish .guarantee b { font-family: var(--font-display); font-size: 1rem; }
.wz-finish .guarantee p { color: var(--text-2); font-size: .88rem; margin-top: 4px; }
.wz-pricebox { margin-top: 18px; padding: 22px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.wz-pricebox .amt { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; letter-spacing: -.03em; }
.wz-pricebox .amt small { font-size: 1rem; color: var(--text-3); font-weight: 600; }
.wz-pricebox .btn { width: 100%; margin-top: 14px; }
.wz-pricebox .fine { color: var(--text-3); font-size: .78rem; margin-top: 10px; }

/* nav */
.wz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.wz-nav .btn-ghost.dim { opacity: .55; }

/* batch banner */
.wz-batch { display: flex; align-items: center; gap: 12px; padding: 14px 17px; border-radius: var(--r-sm); background: rgba(168,85,247,.1); border: 1px solid rgba(168,85,247,.28); margin-top: 18px; font-size: .9rem; color: var(--text-2); }
.wz-batch svg { width: 19px; height: 19px; color: #a855f7; flex-shrink: 0; }
.wz-batch b { color: var(--text); }

/* ===== ACCOUNT ===== */
.acct-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.acct-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 28px; }
.acct-card.full { grid-column: 1 / -1; }
.acct-label { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.acct-banner { display: flex; gap: 14px; padding: 18px; border-radius: var(--r-md); background: linear-gradient(120deg, var(--brand-soft), transparent); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); margin-bottom: 22px; }
.acct-banner .bic { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--indigo)); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.acct-banner b { font-family: var(--font-display); }
.acct-banner p { color: var(--text-2); font-size: .9rem; margin-top: 3px; }
.acct-plan { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.acct-plan .n { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; }
.acct-badge { font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(34,197,94,.16); color: #16a34a; font-family: var(--font-mono); }
.acct-meter { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 14px; }
.acct-meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--indigo)); }
.acct-usage { display: flex; justify-content: space-between; font-size: .86rem; color: var(--text-3); margin-top: 8px; }
.acct-quick { display: grid; gap: 12px; margin-top: 14px; }
.acct-q { display: flex; align-items: center; gap: 13px; padding: 15px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border-2); transition: border-color .2s, transform .2s; cursor: pointer; }
.acct-q:hover { border-color: var(--brand); transform: translateX(3px); }
.acct-q .qic { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.acct-q .qic svg { width: 20px; height: 20px; }
.acct-q b { font-size: .96rem; font-family: var(--font-display); }
.acct-q span { display: block; color: var(--text-3); font-size: .84rem; }
.acct-q .arr { margin-left: auto; color: var(--text-3); }

.order { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-top: 1px solid var(--border-2); }
.order:first-of-type { border-top: none; }
.order .oic { width: 40px; height: 48px; border-radius: 8px; background: linear-gradient(160deg, var(--brand-soft), transparent); border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent); display: grid; place-items: center; color: var(--brand); flex-shrink: 0; }
.order .oic svg { width: 18px; height: 18px; }
.order .ometa { flex: 1; min-width: 0; }
.order .ometa b { font-weight: 600; font-size: .96rem; }
.order .ometa span { display: block; color: var(--text-3); font-size: .82rem; }
.order .otime { font-family: var(--font-mono); font-size: .76rem; color: var(--text-3); }
.order .btn-sm { flex-shrink: 0; }
.order-expire { font-size: .8rem; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.order-expire svg { width: 13px; height: 13px; }

@media (max-width: 740px) {
  .wz-field { grid-template-columns: 1fr; gap: 7px; }
  .wz-pdfwrap, .acct-grid { grid-template-columns: 1fr; }
  .demo-tabs button { padding: 8px 12px; font-size: .82rem; }
  .demo-bar .brand .word { display: none; }
  .demo-back { display: none; }
}

/* baseline icon sizing for JS-rendered svgs */
.stage svg { width: 18px; height: 18px; }
.stage svg.big { width: 32px; height: 32px; }
.acct-q .arr svg { width: 18px; height: 18px; }
.demo-back svg { width: 16px; height: 16px; }

/* ===== REFERRAL ===== */
.rc-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 18px; }
.rc-ic { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--accent)); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.rc-ic svg { width: 20px; height: 20px; }
.rc-head b { font-family: var(--font-display); font-size: 1.08rem; }
.rc-head p { color: var(--text-2); font-size: .9rem; margin-top: 4px; }
.rc-head strong { color: var(--text); font-weight: 700; }
.rc-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.rc-stat { flex: 1; min-width: 160px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border-2); }
.rc-stat span { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-3); font-weight: 600; }
.rc-stat span svg { width: 13px; height: 13px; }
.rc-stat b { display: block; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-top: 5px; letter-spacing: -.02em; }
.rc-label { display: block; font-size: .82rem; color: var(--text-3); margin-bottom: 8px; font-weight: 600; }
.rc-link { display: flex; gap: 10px; }
.rc-link input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: .86rem; }
.rc-link .btn { flex-shrink: 0; }
.rc-editcode { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-weight: 600; font-size: .85rem; }
.rc-editcode svg { width: 14px; height: 14px; }
.rc-editcode:hover { color: var(--brand-strong); }
.rc-fine { margin-top: 16px; font-size: .78rem; color: var(--text-3); line-height: 1.55; }
.rc-fine strong { color: var(--text-2); font-weight: 700; }
