/* =====================================================
   LG KI Agent · Gemeinsames Stylesheet
   Helles Design · Blau-Akzente · Karten · responsive
   ===================================================== */

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eff6ff;
  --blue-soft: #dbeafe;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --bg: #f6f8fc;
  --card: #ffffff;
  --line: #e2e8f0;
  --green: #16a34a;
  --green-light: #dcfce7;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --violet: #7c3aed;
  --violet-light: #ede9fe;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, .08), 0 16px 48px rgba(37, 99, 235, .12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 12px; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; font-family: inherit;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none !important;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, .35); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(37, 99, 235, .45); }
.btn-ghost { background: var(--card); color: var(--blue); border: 1.5px solid var(--blue-soft); }
.btn-ghost:hover { background: var(--blue-light); }
.btn-soft { background: var(--blue-soft); color: var(--blue-dark); border: 1px solid #bfdbfe; font-weight: 700; }
.btn-soft:hover { background: #cfe1fd; }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-green { background: var(--green); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; filter: grayscale(.3); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: .3px;
}
.badge-std { background: var(--blue-light); color: var(--blue-dark); }
.badge-prem { background: var(--violet-light); color: var(--violet); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-amber { background: var(--amber-light); color: var(--amber); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-gray { background: #f1f5f9; color: var(--ink-soft); }

/* ---------- Karten ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
}

/* ---------- Formulare ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 14px 0 5px; }
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
textarea { resize: vertical; min-height: 90px; }

/* ---------- Topbar (Frontseite) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none !important; }
.brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; }
.topnav { display: flex; gap: 20px; margin-left: 12px; }
.topnav a { color: var(--ink-soft); font-weight: 600; font-size: 14.5px; }
.topnav a:hover { color: var(--blue); text-decoration: none; }
.topbar-actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1180px; margin: 0 auto; padding: 72px 24px 48px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
.hero h1 { font-size: 44px; line-height: 1.12; letter-spacing: -1px; }
.hero h1 .grad { background: linear-gradient(120deg, var(--blue), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 18px 0 28px; font-size: 18px; color: var(--ink-soft); max-width: 540px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 360px; filter: drop-shadow(0 24px 48px rgba(37, 99, 235, .25)); border-radius: 28px; }

/* ---------- Stats-Leiste ---------- */
.stats-bar {
  max-width: 1180px; margin: 0 auto 56px; padding: 0 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.stat .num { font-size: 30px; font-weight: 800; color: var(--blue); }
.stat .lbl { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

/* ---------- Sektionen ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: 56px 24px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head .eyebrow { color: var(--blue); font-weight: 800; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.section-head h2 { font-size: 32px; letter-spacing: -.5px; margin: 8px 0 10px; }
.section-head p { color: var(--ink-soft); font-size: 16px; }

/* ---------- Produkt-Grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.product-card { display: flex; flex-direction: column; position: relative; overflow: hidden; }
.product-card .tag { font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--blue); }
.product-card h3 { font-size: 22px; margin: 6px 0 2px; display: flex; align-items: center; gap: 9px; }
.product-card .short { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 12px; }
.product-card .price { font-size: 28px; font-weight: 800; margin: 6px 0 2px; }
.product-card .price small { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.product-card .price-extra { font-size: 12px; color: var(--ink-faint); margin-bottom: 10px; }
.feat-list { list-style: none; margin: 12px 0 16px; flex: 1; }
.feat-list li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; padding: 5px 0; color: var(--ink-soft); }
.feat-list li .ok { color: var(--green); font-weight: 800; flex-shrink: 0; }
.feat-list li .prem-mark { margin-left: auto; flex-shrink: 0; }
.product-card .sell { background: var(--blue-light); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--blue-dark); margin-bottom: 4px; }

/* Standard vs. Premium Vergleichsblöcke */
.tier-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-top: 10px; }
.tier-block .tier-head { font-size: 11.5px; font-weight: 800; letter-spacing: 1px; color: var(--ink-soft); }
.tier-block .feat-list { margin: 6px 0 0; }
.tier-block.prem { border-color: #ddd6fe; background: #fbfaff; }
.tier-block.prem .tier-head { color: var(--violet); }
.tier-block.prem .feat-list li .ok { color: var(--violet); }

/* ---------- Portal-Grid ---------- */
.portal-cat { margin-bottom: 28px; }
.portal-cat h3 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 9px; }
.portal-cat h3 .count { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.portal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.portal-tile {
  display: flex; align-items: center; gap: 11px;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 13px 15px; text-decoration: none !important; color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.portal-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--blue-soft); }
.portal-tile.prem { border-color: #ddd6fe; background: #fdfcff; }
.portal-tile.prem .ptier { color: var(--violet); font-weight: 700; }
.portal-tile.prem:hover { border-color: var(--violet); }
.portal-tile .picon { font-size: 22px; }
.portal-tile .pname { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.portal-tile .ptier { font-size: 11px; color: var(--ink-faint); }
.portal-tile .plink { margin-left: auto; color: var(--ink-faint); font-size: 13px; }

/* ---------- Schritte ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { text-align: center; padding: 28px 22px; }
.step .nr {
  width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--blue), var(--violet)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800;
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Zitate ---------- */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quote { font-size: 15px; color: var(--ink-soft); }
.quote .q-text { font-style: italic; margin-bottom: 12px; }
.quote .q-who { font-weight: 700; color: var(--ink); font-size: 13.5px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 36px 24px; }
.footer .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; font-size: 14px; }
.footer .disclaimer { font-size: 12px; color: var(--ink-faint); max-width: 860px; }

/* ---------- App-Layout (Kunde/Admin) ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { padding: 4px 10px 16px; font-size: 16px; }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 11px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  border: none; background: transparent; width: 100%; text-align: left; font-family: inherit;
  transition: background .12s ease, color .12s ease;
}
.sidebar .nav-item:hover { background: var(--blue-light); color: var(--blue-dark); }
.sidebar .nav-item.active { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.sidebar .spacer { flex: 1; }
.main { flex: 1; padding: 28px 32px; max-width: 1180px; }
.main-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.main-head h1 { font-size: 26px; letter-spacing: -.4px; }
.main-head .sub { color: var(--ink-soft); font-size: 14px; }
.main-head .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.kpi .num { font-size: 26px; font-weight: 800; }
.kpi .lbl { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.kpi.k-blue .num { color: var(--blue); }
.kpi.k-green .num { color: var(--green); }
.kpi.k-amber .num { color: var(--amber); }
.kpi.k-violet .num { color: var(--violet); }

.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel-grid .full { grid-column: 1 / -1; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--ink-faint); padding: 10px 12px; border-bottom: 2px solid var(--line);
}
table.data td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: var(--blue-light); }

/* ---------- Login-Karte ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; text-align: center; padding: 40px 36px; }
.login-card img.logo { width: 84px; height: 84px; border-radius: 20px; margin-bottom: 14px; object-fit: contain; }
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card p.sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; }
.login-card .hint { margin-top: 16px; font-size: 12.5px; color: var(--ink-faint); background: var(--blue-light); border-radius: 10px; padding: 10px 14px; }
.login-error { color: var(--red); font-size: 13.5px; font-weight: 600; margin-top: 10px; display: none; }

/* ---------- Review Booster ---------- */
.review-item { border: 1px solid var(--line); border-radius: 13px; padding: 16px; margin-bottom: 12px; }
.review-item .stars { color: #f59e0b; font-size: 15px; letter-spacing: 2px; }
.review-item .r-author { font-weight: 700; font-size: 13.5px; }
.review-item .r-text { font-size: 14px; color: var(--ink-soft); margin: 6px 0 10px; }
.gen-output {
  background: var(--blue-light); border: 1px solid var(--blue-soft); border-radius: 12px;
  padding: 14px 16px; font-size: 14px; white-space: pre-wrap; margin-top: 12px;
  color: var(--ink); min-height: 60px;
}
.gen-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.score-ring { display: flex; align-items: center; gap: 18px; }
.score-ring svg { flex-shrink: 0; }
.tone-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tone-btn {
  padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; color: var(--ink-soft);
}
.tone-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 600; opacity: 0; transition: all .25s ease; z-index: 99;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .3);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 80;
  display: none; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto;
}
.modal-bg.open { display: flex; }
.modal { width: 100%; max-width: 560px; padding: 28px; }
.modal h2 { font-size: 20px; margin-bottom: 4px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.check-tile {
  display: flex; align-items: center; gap: 9px; border: 1.5px solid var(--line);
  border-radius: 11px; padding: 10px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600;
}
.check-tile input { width: auto; }
.check-tile.checked { border-color: var(--blue); background: var(--blue-light); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { order: -1; }
  .hero-art img { max-width: 220px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .quotes { grid-template-columns: 1fr; }
  .panel-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .topnav { display: none; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar .brand { padding-bottom: 4px; width: 100%; }
  .sidebar .nav-item { width: auto; }
  .sidebar .spacer { display: none; }
  .main { padding: 20px 16px; }
  .hero h1 { font-size: 32px; }
}
