/* ===========================================================================
   Klubmodul Affiliate - shared styles.
   Brand: navy #16487a, green #43c97a, gold #ffd75e, Inter.
   Class names are kept stable so every page re-skins from these tokens.
   =========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* brand */
  --navy: #16487a;
  --navy-dark: #0f3a63;
  --navy-soft: #e7f1fa;
  --green: #2e9e57;
  --green-bright: #43c97a;
  --green-dark: #25864a;
  --green-soft: #e4f6ec;
  --gold: #ffd75e;
  --gold-dark: #e8a12c;
  --ink: #2b3946;
  --muted: #5e7186;
  --line: #e1e9f1;
  --bg: #f4f8fc;
  --white: #ffffff;

  /* semantic aliases used by existing markup */
  --blue: var(--navy);
  --blue-dark: var(--navy-dark);
  --blue-soft: var(--navy-soft);
  --orange: var(--green);          /* primary CTA = Klubmodul green */
  --orange-dark: var(--green-dark);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 34px rgba(22, 72, 122, 0.10);
  --shadow-sm: 0 4px 14px rgba(22, 72, 122, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); letter-spacing: -0.01em; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 0; border-radius: 11px; padding: 13px 24px; font-size: 15px;
  font-weight: 700; cursor: pointer; transition: transform .05s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--font); line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(46,158,87,.28); }
.btn-primary:hover { background: var(--green-dark); text-decoration: none; }
.btn-blue { background: var(--navy); color: #fff; }
.btn-blue:hover { background: var(--navy-dark); text-decoration: none; }
.btn-ghost { background: var(--navy-soft); color: var(--navy); }
.btn-ghost:hover { background: #d8e8f6; text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: var(--gold-dark); color: #fff; text-decoration: none; }
.btn-sm { padding: 9px 15px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* --- Top nav --- */
.nav { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); }
.brand img { height: 34px; width: auto; display: block; }
.brand .tag { font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: 15px; }

/* --- Hero --- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff; padding: 84px 0 96px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(67,201,122,.35) 0%, rgba(67,201,122,0) 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: 46px; max-width: 780px; color: #fff; }
.hero p.lead { font-size: 19px; opacity: .94; max-width: 640px; margin: 0 0 30px; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14);
  padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero .pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* --- Sections --- */
section.block { padding: 70px 0; }
section.block h2 { font-size: 32px; text-align: center; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 44px; font-size: 17px; }
.eyebrow { text-align:center; color: var(--green); font-weight:800; letter-spacing:.08em; text-transform:uppercase; font-size:13px; margin-bottom:8px; }

/* --- Cards / grids --- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 19px; }
.step-num {
  width: 42px; height: 42px; border-radius: 12px; background: var(--navy-soft);
  color: var(--navy); font-weight: 800; font-size: 18px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 16px;
}
.icon-badge {
  width: 46px; height: 46px; border-radius: 12px; background: var(--green-soft);
  display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:14px;
}
.earn { font-size: 38px; font-weight: 800; color: var(--navy); margin: 6px 0; }
.earn small { font-size: 16px; color: var(--muted); font-weight: 600; }
.stat-big { font-size: 40px; font-weight: 800; color: var(--navy); }
.tier-card { border-top: 5px solid var(--green); }
.tier-card.alt { border-top-color: var(--gold-dark); }

/* --- FAQ --- */
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 12px; padding: 18px 22px; }
.faq-item summary { font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--navy); font-weight: 800; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 12px 0 0; color: var(--muted); }

/* --- Footer --- */
footer { background: var(--navy-dark); color: #c4d6e8; padding: 44px 0; margin-top: 0; font-size: 14px; }
footer a { color: #fff; }

/* --- Auth card --- */
.auth-wrap { min-height: calc(100vh - 66px); display: flex; align-items: center; justify-content: center; padding: 30px; }
.auth-card { width: 100%; max-width: 430px; }
.tabs { display: flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; margin-bottom: 22px; background:#fff; }
.tabs button { flex: 1; border: 0; background: var(--white); padding: 13px; font-weight: 700; cursor: pointer; color: var(--muted); font-family: var(--font); }
.tabs button.active { background: var(--navy); color: #fff; }
label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: var(--font); background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--navy-soft); border-color: var(--navy); }
.form-msg { font-size: 14px; margin-top: 14px; min-height: 20px; }
.form-msg.error { color: #c0392b; }
.form-msg.ok { color: var(--green); }

/* --- Dashboard / app --- */
.app-shell { padding: 36px 0 70px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 28px; font-weight: 800; margin-top: 4px; color: var(--navy); }
.link-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.link-box input { flex: 1; min-width: 220px; font-family: ui-monospace, Menlo, monospace; }
.qr { width: 150px; height: 150px; border: 1px solid var(--line); border-radius: 10px; background:#fff; }
.templates textarea { min-height: 120px; font-size: 14px; line-height:1.5; resize: vertical; }

table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { background: var(--navy-soft); color: var(--navy); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; display:inline-block; }
.badge.pending { background: #fff3df; color: #b3640a; }
.badge.on_hold { background: var(--navy-soft); color: var(--navy); }
.badge.completed { background: var(--green-soft); color: var(--green-dark); }
.badge.clawed_back { background: #fde8e8; color: #c0392b; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 14px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; opacity: 0; transition: opacity .2s; z-index: 50; }
.toast.show { opacity: 1; }

/* --- Share page specifics --- */
.channel-head { display:flex; align-items:center; gap:12px; margin-bottom:6px; }
.channel-ico { width:40px; height:40px; border-radius:11px; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:18px; flex:none; }
.ico-li { background:#0a66c2; } .ico-x { background:#000; } .ico-fb { background:#1877f2; }
.ico-mail { background:var(--navy); } .ico-blog { background:var(--gold-dark); }
.variant { border:1px solid var(--line); border-radius:11px; padding:16px; margin-bottom:14px; background:#fbfdff; }
.variant .v-label { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin-bottom:8px; }
.variant .v-text { white-space:pre-wrap; font-size:14.5px; line-height:1.55; }
.variant .v-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }

/* --- Responsive --- */
@media (max-width: 860px) {
  .grid-3, .grid-4, .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 34px; }
  .brand .tag { display: none; }
}
@media (max-width: 520px) {
  .grid-2, .grid-3, .grid-4, .kpi-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 10px; }
  .nav-links a:not(.btn) { display: none; }
}
