/* ============================================================
   VALUEZON Styleguide (Brand & Visual Identity, Website-Basis)
   Farben:  Lavendel #C9B4F0 (Hero BG · Primär)
            Aubergine #2C1654 (Headlines · Body · Nav)
            Violet Mid #4A2D7A (Subtext · Kicker)
            Lime #CCFF00 (CTA-Button · Akzent — einziger CTA-Akzent)
            Orange #E8541A (Logo-V · Quote-Icons · Kicker-Nummern)
            Deep Purple #1A0E2E (Dark Sections · Footer)
            White #FFFFFF (Cards · Nav-Pill) · Offwhite #F7F5FC (Seitengrund)
   Kein Blau, kein Grün als Farbton. 3-Farb-System: Lila / Lime / Orange.
   Typo:    Sora (Headlines/Labels/CTAs/Zahlen, tight tracking,
            Italic Light als emotionaler Akzent) + DM Sans (Fließtext, 1.7 LH)
   Form:    Pill-Shape-Buttons (radius 100px), weiche Panels, Nav als Pill-Kapsel
   ============================================================ */

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

:root {
  --lavendel: #C9B4F0;
  --lavendel-soft: #E9E0F9;
  --aubergine: #2C1654;
  --violet-mid: #4A2D7A;
  --lime: #CCFF00;
  --orange: #E8541A;
  --deep: #1A0E2E;
  --white: #FFFFFF;
  --offwhite: #F7F5FC;
  --border: #E7E1F2;
  --muted: #6E5E92;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--offwhite);
  color: var(--aubergine);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .stat-num, .kicker, .btn { font-family: 'Sora', system-ui, sans-serif; }

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13.5px; }
.error { color: var(--orange); font-size: 13px; margin-top: 10px; }

/* ---------------- Logo (Original-SVGs von valuezon.de) ---------------- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-full { height: 26px; width: auto; display: block; }
.login-card .logo-full { height: 34px; }
.footer .logo-full { height: 24px; }

/* ---------------- Kicker / Labels ---------------- */
.kicker {
  font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--violet-mid);
}
.kicker-orange { color: var(--orange); }

/* ---------------- Navigation: weiße Pill-Kapsel ---------------- */
.nav-wrap {
  position: sticky; top: 14px; z-index: 40;
  padding: 14px 20px 0;
  display: flex; justify-content: center;
}
.nav-pill {
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(44, 22, 84, 0.12);
  padding: 10px 12px 10px 22px;
  display: flex; align-items: center; gap: 20px;
  width: 100%; max-width: 1140px;
}
.nav-logo { flex-shrink: 0; }
.nav-links { display: flex; gap: 2px; flex: 1; justify-content: center; flex-wrap: wrap; }
.nav-links a {
  font-family: 'Sora'; font-size: 13px; font-weight: 600;
  color: var(--aubergine); text-decoration: none;
  border-radius: 999px; padding: 8px 16px;
  transition: background .15s;
}
.nav-links a:hover { background: var(--offwhite); }
.nav-links a.active { background: var(--aubergine); color: var(--white); }
.scrape-chip {
  font-family: 'Sora'; font-size: 12px; font-weight: 600;
  background: var(--lavendel); color: var(--aubergine);
  border-radius: 999px; padding: 7px 15px; white-space: nowrap;
}

/* ---------------- Buttons: Pill, Lime = einziger CTA-Akzent ---------------- */
.btn {
  font-size: 14px; font-weight: 700; border: none; cursor: pointer;
  border-radius: 100px; padding: 13px 28px;
  transition: transform .08s, filter .15s;
  text-decoration: none; display: inline-block;
}
.btn:hover { filter: brightness(0.96); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--lime); color: var(--aubergine); }
.btn-outline {
  background: transparent; color: var(--aubergine);
  border: 1.5px solid var(--aubergine); padding: 11.5px 26px;
}
.btn-outline:hover { background: var(--white); filter: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 20px; font-size: 13px; }

/* ---------------- Login ---------------- */
.login-overlay {
  position: fixed; inset: 0; z-index: 100;
  background:
    radial-gradient(70% 55% at 78% 20%, rgba(255, 255, 255, 0.35), transparent 65%),
    var(--lavendel);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: var(--white); border-radius: 28px;
  box-shadow: 0 20px 60px rgba(44, 22, 84, 0.18);
  padding: 46px 42px; width: 400px; max-width: 100%;
  text-align: center;
}
.login-card .logo { justify-content: center; margin-bottom: 12px; }
.login-card .logo-mark { height: 38px; }
.login-card .logo-word { font-size: 24px; }
.login-kicker {
  font-family: 'Sora'; font-size: 11px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--violet-mid); margin-bottom: 28px;
}
.login-card input {
  width: 100%; padding: 13px 20px;
  border: 1.5px solid var(--border); border-radius: 100px;
  font: inherit; margin-bottom: 14px; outline: none; color: var(--aubergine);
  background: var(--offwhite);
}
.login-card input:focus { border-color: var(--violet-mid); background: var(--white); }

/* ---------------- Layout ---------------- */
main {
  width: 100%; max-width: 1180px;
  margin: 24px auto 70px; padding: 0 20px;
  flex: 1;
}
.section { margin-bottom: 40px; }

/* Section-Header wie im Styleguide: orange Nummern-Kicker + Linie */
.section-head { margin: 38px 0 18px; }
.section-head .kicker-orange { display: block; margin-bottom: 8px; }
.section-head h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.25;
}
.section-head .rule { border: none; border-top: 1px solid var(--border); margin-top: 14px; }

/* ---------------- Hero (Lavendel, wie Website) ---------------- */
.hero {
  background:
    radial-gradient(60% 70% at 85% 75%, rgba(255, 255, 255, 0.28), transparent 60%),
    var(--lavendel);
  border-radius: 28px;
  padding: 64px 56px 56px;
  margin-top: 10px;
}
.hero .kicker { margin-bottom: 18px; display: block; }
.hero h1 {
  font-size: clamp(38px, 6vw, 58px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.08;
  margin-bottom: 20px;
}
.hero h1 em { font-style: italic; font-weight: 300; }
.hero p.sub {
  max-width: 560px; font-size: 17px; color: var(--violet-mid); margin-bottom: 30px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero .stats { display: flex; gap: 56px; margin-top: 46px; flex-wrap: wrap; }
.stat-num {
  font-size: 48px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1;
  color: var(--aubergine);
}
.stat-lbl { font-size: 14px; color: var(--violet-mid); }

/* Kleiner Seiten-Hero für Unterseiten */
.page-hero {
  background: var(--lavendel);
  border-radius: 24px;
  padding: 36px 40px;
  margin-top: 10px; margin-bottom: 26px;
}
.page-hero .kicker { margin-bottom: 8px; display: block; }
.page-hero h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.page-hero h1 em { font-style: italic; font-weight: 300; }
.page-hero p { color: var(--violet-mid); font-size: 15px; margin-top: 8px; max-width: 640px; }

/* ---------------- Cards / Panels ---------------- */
.card {
  background: var(--white); border-radius: 24px;
  padding: 26px 30px;
  box-shadow: 0 2px 14px rgba(44, 22, 84, 0.05);
}
.card h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 12px; }
.card .kicker { display: block; margin-bottom: 10px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .12s, box-shadow .12s; }
.card-link:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(44, 22, 84, 0.12); border-radius: 24px; }
.card p.desc { font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.card .card-cta { margin-top: 16px; }

/* Dark Section (Deep Purple) */
.card-dark {
  background: var(--deep); color: var(--white);
  border-radius: 24px; padding: 26px 30px;
}
.card-dark h3 { color: var(--white); }
.card-dark .kicker { color: var(--lavendel); }
.card-dark p { color: var(--lavendel); font-size: 14.5px; }
.card-dark .stat-num { color: var(--lime); }

/* ---------------- Werkzeugleiste (Kategorie-Wahl) ---------------- */
.toolbar {
  background: var(--white); border-radius: 999px;
  box-shadow: 0 2px 14px rgba(44, 22, 84, 0.05);
  padding: 10px 12px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 22px;
}
.toolbar .muted { padding: 0 10px; }

select, input[type="number"], input[type="text"], input[type="password"] {
  font: inherit; font-size: 14px; color: var(--aubergine);
  padding: 11px 18px; border: 1.5px solid var(--border);
  border-radius: 100px; background: var(--offwhite); outline: none; min-width: 0;
}
select:focus, input:focus { border-color: var(--violet-mid); background: var(--white); }
select { font-weight: 500; cursor: pointer; }

.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.form-row input, .form-row select { flex: 1; min-width: 150px; }
.form-row input.grow { flex: 2; }
.form-row input.small { max-width: 90px; flex: 0; }

/* ---------------- Stat-Kacheln ---------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.tile {
  background: var(--white); border-radius: 20px; padding: 20px 22px;
  box-shadow: 0 2px 14px rgba(44, 22, 84, 0.05);
}
.tile .val {
  font-family: 'Sora'; font-size: 26px; font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.15; color: var(--aubergine);
}
.tile .lbl { font-size: 12.5px; color: var(--violet-mid); margin-top: 5px; line-height: 1.4; }
.tile.accent { background: var(--deep); }
.tile.accent .val { color: var(--lime); }
.tile.accent .lbl { color: var(--lavendel); }
.tile.soft { background: var(--lavendel-soft); box-shadow: none; }

/* ---------------- Tabellen ---------------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  font-family: 'Sora'; text-align: left; padding: 10px 12px;
  color: var(--violet-mid); font-weight: 600; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase;
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); line-height: 1.45; }
.data-table tbody tr:hover { background: var(--offwhite); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* ---------------- Badges ---------------- */
.badge {
  font-family: 'Sora'; display: inline-block; font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 3px 12px; vertical-align: middle; letter-spacing: .02em;
}
.badge-measured { background: var(--lime); color: var(--aubergine); }
.badge-proxy { background: var(--lavendel); color: var(--aubergine); }
.badge-rough { background: var(--border); color: var(--muted); }
.badge-sponsored { background: var(--orange); color: var(--white); }

/* ---------------- Faktor-Karten ---------------- */
.factor-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.factor-card {
  background: var(--white); border-radius: 20px; padding: 20px 22px;
  box-shadow: 0 2px 14px rgba(44, 22, 84, 0.05);
  border-top: 4px solid var(--lavendel);
}
.factor-card .fval {
  font-family: 'Sora'; font-size: 30px; font-weight: 800;
  letter-spacing: -0.03em; color: var(--aubergine);
}
.factor-card .flbl { font-family: 'Sora'; font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.factor-card .fbasis { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }

/* ---------------- Uploads ---------------- */
.upload-row { display: flex; gap: 18px; flex-wrap: wrap; margin: 6px 0 14px; }
.upload-field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--violet-mid); flex: 1; min-width: 260px; }
.upload-field input[type="file"] {
  font: inherit; font-size: 13px; padding: 12px 14px;
  border: 1.5px dashed var(--lavendel); border-radius: 18px;
  background: var(--white); color: var(--aubergine); cursor: pointer;
}
.upload-field input[type="file"]::file-selector-button {
  font-family: 'Sora'; font-size: 12px; font-weight: 700; cursor: pointer;
  border: none; border-radius: 100px; padding: 7px 16px; margin-right: 12px;
  background: var(--lime); color: var(--aubergine);
}
.upload-field select { border-radius: 100px; background: var(--white); }

/* ---------------- Hinweise / Empty States ---------------- */
.empty-hint {
  color: var(--violet-mid); font-size: 14px; line-height: 1.65;
  background: var(--lavendel-soft); border-radius: 18px;
  padding: 18px 20px;
}

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--deep); color: var(--white); border-radius: 100px;
  padding: 13px 28px; font-size: 14px; z-index: 90; max-width: 90vw;
  box-shadow: 0 8px 28px rgba(26, 14, 46, 0.35);
}
.toast.err { background: var(--orange); }

/* ---------------- Footer (Deep Purple) ---------------- */
.footer { background: var(--deep); margin-top: auto; }
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 34px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer p { color: var(--lavendel); font-size: 13px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
  .nav-pill { padding: 8px 10px 8px 16px; gap: 10px; }
  .nav-links a { padding: 7px 11px; font-size: 12px; }
  .logo-word { font-size: 16px; }
  .hero { padding: 40px 26px; }
  .hero .stats { gap: 30px; }
  .stat-num { font-size: 36px; }
  .page-hero { padding: 26px 22px; }
  .card { padding: 20px 18px; }
  .toolbar { border-radius: 24px; }
  .toolbar select { width: 100%; }
}
