/* apo.so.me Kundenportal – Design (abgestimmt auf digitalsichtbar.apo-so-me.de) */

:root {
  --dark: #121242;        /* Marken-Dunkelblau */
  --blue: #1C36EB;        /* Royal-Blau (Primär-Aktion) */
  --blue-deep: #0027D9;
  --cyan: #7DE8FA;        /* Hellcyan-Akzent ("Sichtbarkeit.") */
  --red: #D80303;         /* Rot-Akzent */
  --light: #ABB1DE;       /* gedämpftes Lavendel für Nebentexte */
  --white: #FFFFFF;
  --text: #F6F7FF;        /* Off-White */
  --danger: #FFB4AE;
  --card-bg: rgba(246, 247, 255, 0.05);
  --card-border: rgba(246, 247, 255, 0.13);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Golos Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--dark);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

/* Fester Verlaufs-Hintergrund (funktioniert auch auf iOS sauber) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--dark);
  background-image:
    radial-gradient(circle at 88% -8%, rgba(216, 3, 3, 0.42) 0%, rgba(216, 3, 3, 0) 55%),
    radial-gradient(circle at 112% 62%, rgba(0, 9, 181, 0.55) 0%, rgba(0, 9, 181, 0) 60%),
    radial-gradient(circle at -12% 85%, rgba(0, 39, 217, 0.5) 0%, rgba(0, 39, 217, 0) 55%);
}

a { color: var(--cyan); }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 32px 22px 70px;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 34px;
  flex-wrap: wrap;
}

.brandrow { display: flex; align-items: center; gap: 12px; }

.wordmark {
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.3px;
  color: var(--white);
  text-decoration: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  border: 1px solid rgba(125, 232, 250, 0.35);
  background: rgba(125, 232, 250, 0.12);
  color: var(--cyan);
}

/* ---------- Karten & Grids ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 26px;
  backdrop-filter: blur(8px);
}

.card.accent {
  border-color: rgba(125, 232, 250, 0.3);
  box-shadow: 0 0 50px rgba(28, 54, 235, 0.25);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 840px) {
  .grid2 { grid-template-columns: 1fr; }
}

.stack { display: flex; flex-direction: column; gap: 16px; }

h1, h2, h3, h4 { color: var(--white); margin: 0 0 6px; line-height: 1.2; letter-spacing: -0.2px; }
h1 { font-size: 38px; font-weight: 600; }
h2 { font-size: 25px; font-weight: 600; }
h3 { font-size: 19px; font-weight: 600; }

/* Icon vor Seiten-Überschriften */
.h-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(125, 232, 250, 0.12);
  border: 1px solid rgba(125, 232, 250, 0.3);
  color: var(--cyan);
  vertical-align: -9px;
  margin-right: 12px;
  flex-shrink: 0;
}
.h-ico svg { width: 21px; height: 21px; }

@media (max-width: 720px) {
  h1 { font-size: 30px; }
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 4px;
}

.muted { color: var(--light); }
.small { font-size: 13.5px; }
.mb0 { margin-bottom: 0; }
.section { margin-bottom: 36px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.badge.green  { background: rgba(110,231,160,.13); color: #6EE7A0;      border-color: rgba(110,231,160,.35); }
.badge.mint   { background: rgba(125,232,250,.13); color: var(--cyan);  border-color: rgba(125,232,250,.35); }
.badge.yellow { background: rgba(233,196,106,.13); color: #E9C46A;      border-color: rgba(233,196,106,.35); }
.badge.blue   { background: rgba(142,164,255,.14); color: #8EA4FF;      border-color: rgba(142,164,255,.35); }
.badge.orange { background: rgba(255,157,109,.13); color: #FF9D6D;      border-color: rgba(255,157,109,.35); }
.badge.gray   { background: rgba(246,247,255,.07); color: var(--light); border-color: rgba(246,247,255,.16); }

/* ---------- Phasen-Stepper ---------- */
.stepper { display: flex; margin: 16px 0 6px; }
.step { flex: 1; min-width: 0; }
.step-top { display: flex; align-items: center; }
.dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(246,247,255,.14);
  border: 1px solid rgba(246,247,255,.24);
  flex-shrink: 0;
}
.dot.done { background: var(--cyan); border-color: var(--cyan); }
.dot.current { box-shadow: 0 0 0 4px rgba(125,232,250,.2); }
.line { height: 2px; flex: 1; margin: 0 4px; background: rgba(246,247,255,.14); }
.line.done { background: var(--cyan); }
.step-label {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  color: var(--light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-label.current { color: var(--cyan); font-weight: 700; }
@media (max-width: 720px) {
  .step-label { visibility: hidden; }
  .step-label.current { visibility: visible; }
}

/* ---------- Fortschritt ---------- */
.ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.ring svg { width: 52px; height: 52px; transform: rotate(-90deg); display: block; }
.ring .ring-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; color: var(--white);
}
.progress-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.progress { flex: 1; height: 8px; border-radius: 999px; background: rgba(246,247,255,.1); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.progress-num { font-size: 14px; font-weight: 700; color: var(--cyan); }

/* ---------- Buttons (Pill-Form wie auf der Website) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-ghost { background: rgba(246,247,255,.08); color: var(--white); border-color: rgba(246,247,255,.22); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field label { font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.req { color: var(--cyan); }
.input {
  font: inherit;
  font-size: 15px;
  color: var(--white);
  background: rgba(246,247,255,.06);
  border: 1px solid rgba(246,247,255,.16);
  border-radius: 12px;
  padding: 11px 14px;
  width: 100%;
}
.input::placeholder { color: rgba(171,177,222,.6); }
.input:focus { outline: none; border-color: var(--cyan); background: rgba(246,247,255,.09); }
textarea.input { resize: vertical; min-height: 92px; }
select.input option { color: var(--dark); background: #fff; }
.error-text { color: var(--danger); font-size: 13px; }

.notice {
  padding: 14px 18px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-size: 14.5px;
}
.notice.ok    { background: rgba(125,232,250,.1);  border: 1px solid rgba(125,232,250,.4);  color: var(--cyan); }
.notice.err   { background: rgba(255,180,174,.08); border: 1px solid rgba(255,180,174,.4);  color: var(--danger); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}
.login-card { width: 100%; max-width: 430px; }
.login-card .pill { margin: 10px 0 16px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid rgba(246,247,255,.1);
  margin-top: 44px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--light);
}

/* ---------- Tabellen (Admin) ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(246,247,255,.09); vertical-align: top; }
.tbl th { color: var(--light); font-weight: 600; font-size: 12.5px; letter-spacing: 1px; text-transform: uppercase; }

/* ---------- App-Layout mit Seitennavigation ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 26px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: rgba(10, 10, 40, 0.45);
  border-right: 1px solid rgba(246, 247, 255, 0.09);
  backdrop-filter: blur(10px);
}

.side-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 10px; }
.side-logo { height: 44px; width: auto; display: block; }
.side-nav, .side-quick { display: flex; flex-direction: column; gap: 4px; }
.side-quick { border-top: 1px solid rgba(246,247,255,.09); padding-top: 14px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(246,247,255,.09); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.side-user { padding: 0 12px 6px; }
.side-kundenlogo { max-height: 40px; max-width: 150px; display: block; margin-bottom: 6px; background: #fff; border-radius: 8px; padding: 4px 6px; }

/* Tabs (Projekte, Statistiken) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid rgba(246,247,255,.12); margin-top: 18px; }
.tab { text-decoration: none; padding: 10px 16px; font-size: 14.5px; color: var(--light); border-bottom: 3px solid transparent; }
.tab.active { color: var(--white); font-weight: 700; border-bottom-color: var(--cyan); }

/* Voll gefüllte Hervorhebungs-Karte (Monatliches Update) */
.card.fill {
  background: linear-gradient(135deg, #1C36EB 0%, #0027D9 60%, #1C36EB 100%);
  border-color: rgba(125,232,250,.5);
  box-shadow: 0 14px 40px rgba(28, 54, 235, 0.35);
}
.card.fill .muted { color: rgba(246,247,255,.82); }
.card.fill .btn-primary { background: #fff; color: #1C36EB; }
.card.fill .btn-primary:hover { background: #E8F7FF; }

/* Checkliste "Das brauchen wir noch" */
.need { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid rgba(246,247,255,.09); padding: 10px 0; }
.need:first-of-type { border-top: none; }
.need-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: #FF9D6D; }
.need-dot.gesendet { background: #E9C46A; }
.need-dot.erhalten { background: #6EE7A0; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--light);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.nav-link:hover { color: var(--white); background: rgba(246,247,255,.06); }
.nav-link.active { color: var(--white); background: rgba(28, 54, 235, 0.35); }
.nav-link.active svg { color: var(--cyan); }
.nav-link svg { flex-shrink: 0; }

.main { flex: 1; min-width: 0; padding: 34px 38px 60px; max-width: 1040px; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; flex-direction: column; padding: 16px; gap: 12px; border-right: none; border-bottom: 1px solid rgba(246,247,255,.09); }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav-link { white-space: nowrap; padding: 9px 12px; }
  .side-quick { flex-direction: row; border-top: none; padding-top: 0; }
  .side-foot { margin-top: 0; flex-direction: row; align-items: center; border-top: none; padding-top: 0; flex-wrap: wrap; }
  .side-user { padding: 0 6px; }
  .main { padding: 24px 18px 50px; }
}

/* ---------- Stat-Kacheln (Übersicht) ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; padding: 18px 20px; }
.tile .tile-label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--light); margin: 0 0 6px; }
.tile .tile-value { font-size: 26px; font-weight: 700; color: var(--white); margin: 0; line-height: 1.15; }
.tile .tile-sub { font-size: 13px; color: var(--light); margin: 4px 0 0; }

/* ---------- Listenzeilen (Übersicht / Redaktionsplan) ---------- */
.rowline { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(246,247,255,.09); padding: 11px 0; }
.rowline:first-of-type { border-top: none; }
.rowline .muted { flex-shrink: 0; }

/* ---------- Formular-Assistent (Monatliches Update) ---------- */
.wizard-progress { display: flex; align-items: center; gap: 10px; margin: 18px 0 22px; }
.wizard-bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(246,247,255,.1); overflow: hidden; }
.wizard-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .25s ease; }
.wizard-count { font-size: 13px; font-weight: 700; color: var(--cyan); white-space: nowrap; }

.wstep { display: none; }
.wstep.active { display: block; }
.wnav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }

.choice-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.chip {
  padding: 10px 22px;
  border-radius: 100px;
  border: 1px solid rgba(246,247,255,.2);
  background: rgba(246,247,255,.05);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.chip:hover { border-color: var(--cyan); }
.chip.selected { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.subblock { border-left: 2px solid rgba(125,232,250,.35); padding-left: 16px; margin: 14px 0; display: none; }
.subblock.open { display: block; }

.hint-box { background: rgba(233,196,106,.08); border: 1px solid rgba(233,196,106,.35); border-radius: 12px; padding: 13px 16px; font-size: 14px; color: #F0DCA8; margin: 12px 0; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 14px; }
.consent-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: #1C36EB; }

.aktion-block { border: 1px solid rgba(246,247,255,.14); border-radius: 14px; padding: 16px; margin: 12px 0; }
.aktion-block h4 { margin-bottom: 12px; }

.grid2c { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 700px) { .grid2c { grid-template-columns: 1fr; } }

.success-hero { text-align: center; padding: 40px 20px; }
.success-hero .big { font-size: 40px; margin-bottom: 6px; }
