/* css/app.css — heller Apple-Look des i-video24-Mitgliederbereichs.
   Gleiche Designsprache wie der AffiSpin-Mitgliederbereich (gemeinsamer Standard).
   Selbst gehostet, kein Fremd-CDN. */

:root {
  --bg:#f5f5f7; --card:#fff; --ink:#1d1d1f; --muted:#6e6e73;
  --accent:#1877f2; --accent-dark:#166fe5; --line:#e4e4e7;
  --ok:#0a7d3a; --ok-bg:#eafaf0;
  --radius:14px;
  --maxw:1400px;
  --shadow:0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06);
}
* { box-sizing:border-box; margin:0; padding:0; }
body {
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--ink); line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
a { color:var(--accent); text-decoration:none; }
img { max-width:100%; }
h1,h2,h3,h4 { line-height:1.25; }

/* ── Admin-Ansicht-Streifen (beim „als Kunde anmelden") ── */
.imp-bar {
  background:var(--accent); color:#fff; text-align:center;
  padding:9px 16px; font-size:14px;
}
.imp-bar a { color:#fff; font-weight:700; text-decoration:underline; margin-left:8px; }

/* ── Gerüst: Seitenleiste + Inhalt ── */
.shell { display:flex; min-height:100vh; }
.side {
  width:248px; background:var(--card); border-right:1px solid var(--line);
  display:flex; flex-direction:column; padding:20px 14px;
  position:sticky; top:0; height:100vh; overflow-y:auto;
}
.brand { display:flex; align-items:center; padding:4px 8px 16px; }
.brand img { height:34px; }
.nav { display:flex; flex-direction:column; gap:1px; flex:1; }
.nav-group {
  margin-top:15px; padding:0 12px 5px; font-size:11px; font-weight:700;
  text-transform:uppercase; letter-spacing:.04em; color:var(--muted);
}
.nav a {
  display:flex; align-items:center; gap:9px; padding:9px 12px; border-radius:9px;
  color:var(--ink); font-size:14px; font-weight:500;
}
.nav a:hover { background:var(--bg); }
.nav a.on { background:var(--accent); color:#fff; }
.nav-pro-badge {
  margin-left:auto; background:#fff3e0; color:#b25c00; font-size:9px; font-weight:800;
  text-transform:uppercase; letter-spacing:.06em; padding:2px 6px; border-radius:5px;
}
.nav a.on .nav-pro-badge { background:rgba(255,255,255,.25); color:#fff; }
.who { border-top:1px solid var(--line); margin-top:14px; padding:14px 8px 0; }
.who-name { font-weight:600; font-size:14px; }
.who-mail { font-size:12px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; }
.who-links { margin-top:6px; display:flex; gap:14px; }
.who-links a { font-size:13px; color:var(--muted); }
.who-links a:hover { color:var(--accent); }

.main { flex:1; min-width:0; display:flex; flex-direction:column; }

/* ── Kopfleiste ── */
.topbar { border-bottom:1px solid var(--line); background:var(--card); }
.topbar-inner {
  display:flex; align-items:center; justify-content:space-between;
  max-width:var(--maxw); margin:0 auto; padding:16px 32px; gap:14px;
}
.topbar h1 { font-size:22px; font-weight:700; }
.topbar-left { display:flex; align-items:center; gap:14px; }
.burger { display:none; background:none; border:0; cursor:pointer; padding:4px; color:var(--ink); }
.side-backdrop { display:none; }
.topbar-right { display:flex; align-items:center; gap:18px; }
.topbar-center { display:flex; align-items:center; gap:10px; flex:1; justify-content:center; max-width:580px; }
.help-btn {
  display:inline-flex; align-items:center; gap:7px; white-space:nowrap;
  padding:8px 13px; border-radius:9px; background:var(--bg); color:var(--ink);
  font-size:14px; font-weight:600;
}
.help-btn:hover { background:#ececed; }
/* Suchfeld: Lupe und Eingabefeld sind ECHTE Flex-Nachbarn (kein Icon-Overlay). */
.help-search {
  display:flex; align-items:center; gap:8px; flex:1; min-width:120px;
  padding:0 12px; border:1px solid var(--line); border-radius:9px; background:var(--bg);
}
.help-search svg { flex:none; color:var(--muted); }
.help-search input[type=search] {
  flex:1; min-width:0; width:auto; border:0; background:transparent;
  padding:9px 0; font-size:14px; font-family:inherit; color:var(--ink); outline:none;
}
.help-search:focus-within {
  border-color:var(--accent); background:#fff;
  box-shadow:0 0 0 3px rgba(24,119,242,.13);
}
.content { max-width:var(--maxw); margin:0 auto; padding:28px 32px 56px; width:100%; flex:1; }
.container { width:100%; }
.container-small { max-width:760px; margin:0 auto; }

/* ── Fußzeile (Impressum / Datenschutz auf jeder Member-Seite) ── */
.app-footer {
  border-top:1px solid var(--line); padding:18px 32px;
  text-align:center; color:var(--muted); font-size:12.5px;
}
.app-footer a { color:var(--muted); }
.app-footer a:hover { color:var(--accent); }

/* ── Sprachumschalter ── */
.langswitch { display:flex; gap:2px; }
.langswitch a {
  padding:4px 9px; border-radius:7px; font-size:12px; font-weight:700;
  color:var(--muted); text-transform:uppercase;
}
.langswitch a:hover { background:var(--bg); }
.langswitch a.on { background:var(--accent); color:#fff; }

/* ── Hinweis-Streifen ── */
.alert {
  border-radius:var(--radius); padding:14px 18px; font-size:14px; margin-bottom:18px;
  display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
}
.alert-danger, .alert-error { background:#fff0f0; border:1px solid #f3c9c6; color:#8a2820; }
.alert-info    { background:#eaf1fd; border:1px solid #cfe0fb; color:#15407c; }
.alert-success { background:var(--ok-bg); border:1px solid #bfe7cd; color:var(--ok); }
.alert .alert-link { font-weight:700; white-space:nowrap; }

/* ── Begrüßung & Überschriften ── */
.greeting { font-size:16px; color:var(--muted); margin-bottom:20px; }
.subtitle { font-size:15px; color:var(--muted); margin-bottom:22px; }
.page-intro { color:var(--muted); font-size:14px; margin-bottom:20px; }
.section-title, .section-header {
  font-size:13px; font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; color:var(--muted); margin:26px 0 10px;
}
.muted { color:var(--muted); }
.muted-line { color:var(--muted); font-size:13px; }

/* ── Statistik-Karten (Dashboard) ── */
.cards { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
@media (max-width:1000px) { .cards { grid-template-columns:repeat(2,1fr); } }
@media (max-width:540px)  { .cards { grid-template-columns:1fr; } }
.stat-card {
  background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:20px; display:block; color:var(--ink);
  transition:transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
  transform:translateY(-3px);
  box-shadow:0 2px 4px rgba(0,0,0,.06), 0 14px 36px rgba(0,0,0,.11);
}
.stat-num { font-size:30px; font-weight:700; color:var(--accent); line-height:1.1; }
.stat-lbl { font-size:14px; font-weight:600; margin-top:4px; }
.stat-sub { font-size:13px; color:var(--muted); margin-top:1px; }

/* ── Karten-Raster ── */
.grid { display:grid; gap:18px; }
.grid-2 { grid-template-columns:repeat(2,1fr); }
.grid-3 { grid-template-columns:repeat(3,1fr); }
@media (max-width:900px) { .grid-2, .grid-3 { grid-template-columns:1fr; } }
.card {
  background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:22px; color:var(--ink);
}
.card-header { margin-bottom:12px; }
.card-title { font-size:16px; font-weight:700; }
.card-meta { font-size:13px; color:var(--muted); }

/* ── Inhalts-Tafel ── */
.panel {
  background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:24px; margin-bottom:24px;
}
.panel h2 { font-size:17px; font-weight:700; margin-bottom:14px; }
.panel-title { font-size:17px; font-weight:700; margin-bottom:14px; }
.panel-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.panel-head h2 { margin-bottom:0; }
.panel-bar { display:flex; align-items:center; justify-content:space-between;
  gap:14px; flex-wrap:wrap; margin-bottom:18px; }
.panel-close {
  color:var(--muted); font-size:26px; line-height:.7; text-decoration:none;
  padding:0 7px; border-radius:7px;
}
.panel-close:hover { color:var(--ink); background:var(--bg); }

/* ── An/Aus-Schalter ── */
.switch {
  display:inline-block; width:46px; height:27px; border-radius:14px; flex:none;
  background:#c9c9ce; position:relative; transition:background .16s ease;
}
.switch-on { background:var(--accent); }
.switch-knob {
  position:absolute; top:3px; left:3px; width:21px; height:21px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.3); transition:left .16s ease;
}
.switch-on .switch-knob { left:22px; }

/* ── Willkommensvideo: schlanke Leiste, wenn ausgeschaltet ── */
.welcome-mini {
  display:flex; align-items:center; justify-content:space-between;
  background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:14px 20px; margin-top:24px;
}
.welcome-mini-title { font-size:15px; font-weight:600; }

/* ── Start-Video ── */
.video-wrap {
  position:relative; width:100%; padding-bottom:56.25%; height:0;
  border-radius:12px; overflow:hidden; background:#000;
}
.video-wrap iframe, .video-wrap video { position:absolute; inset:0; width:100%; height:100%; border:0; }

/* ── Knöpfe ── */
.btn, .btn-primary {
  display:inline-block; padding:11px 22px; border:0; border-radius:10px;
  background:var(--accent); color:#fff; font-size:15px; font-weight:600;
  font-family:inherit; cursor:pointer; text-align:center;
}
.btn:hover, .btn-primary:hover { background:var(--accent-dark); color:#fff; }
.btn-secondary {
  display:inline-block; padding:11px 22px; border:1px solid var(--line);
  border-radius:10px; background:#fff; color:var(--ink); font-size:15px;
  font-weight:600; font-family:inherit; cursor:pointer; text-align:center;
}
.btn-secondary:hover { background:var(--bg); color:var(--ink); }
.btn-ghost {
  display:inline-block; padding:10px 20px; border:1px solid var(--line);
  border-radius:10px; background:#fff; color:var(--ink); font-size:14px;
  font-weight:600; font-family:inherit; cursor:pointer;
}
.btn-ghost:hover { background:var(--bg); }
.btn-sm, .btn-small {
  display:inline-block; padding:7px 14px; border:0; border-radius:8px;
  background:var(--accent); color:#fff; font-size:13px; font-weight:600;
  font-family:inherit; cursor:pointer; text-align:center;
}
.btn-sm:hover, .btn-small:hover { background:var(--accent-dark); color:#fff; }
.btn-large { padding:14px 30px; font-size:16px; }
.btn-block { display:block; width:100%; }
.btn-danger { background:#e0245e; }
.btn-danger:hover { background:#c81e51; }
.btn-success { background:var(--ok); }
.btn-success:hover { background:#0a6b32; }
.btn-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.btn[disabled], .btn-primary[disabled], .btn-secondary[disabled] { opacity:.55; cursor:default; }

/* ── Leerer Zustand ── */
.empty, .empty-state { padding:42px 20px; text-align:center; color:var(--muted); }
.empty-state-icon { font-size:42px; margin-bottom:10px; }
.empty-state-title { font-size:17px; font-weight:700; color:var(--ink); margin-bottom:6px; }
.empty-state-text { font-size:14px; color:var(--muted); }

/* ── Formularfelder ── */
label { display:block; font-size:13px; font-weight:600; margin:14px 0 6px; }
input:not([type]), input[type=text], input[type=email], input[type=password],
input[type=url], input[type=number], input[type=date], input[type=search],
input[type=tel], select, textarea, .input {
  width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:10px;
  font-size:15px; font-family:inherit; background:#fff; color:var(--ink);
}
textarea { min-height:110px; resize:vertical; line-height:1.5; }
input:focus, select:focus, textarea:focus, .input:focus {
  outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(24,119,242,.15);
}
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 20px; }
.form-grid .full { grid-column:1 / -1; }
.form-group { margin-bottom:16px; }
.form-hint { font-size:12px; color:var(--muted); margin-top:5px; }
.checkrow { display:flex; align-items:center; gap:9px; margin-top:14px; }
.checkrow input { width:auto; }
.checkrow label { margin:0; }
@media (max-width:640px) { .form-grid { grid-template-columns:1fr; } }

/* ── Meldungen ── */
.msg { padding:12px 15px; border-radius:10px; font-size:14px; margin-bottom:16px; }
.msg-ok  { background:var(--ok-bg); color:var(--ok); border:1px solid #bfe7cd; }
.msg-err { background:#fff0f0; color:#c0322b; border:1px solid #f3c9c6; }

/* ── Tabellen ── */
.table-wrap {
  background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow);
  overflow-x:auto;
}
.table { width:100%; border-collapse:collapse; font-size:14px; }
.table th, .table td { padding:12px 16px; text-align:left; vertical-align:middle; }
.table thead th {
  background:#fafafa; color:var(--muted); font-size:12px; font-weight:600;
  text-transform:uppercase; letter-spacing:.03em; border-bottom:1px solid var(--line);
  white-space:nowrap;
}
.table tbody tr { border-bottom:1px solid var(--line); }
.table tbody tr:last-child { border-bottom:0; }
.table tbody tr:hover { background:#fafbfc; }
.table-filter { max-width:300px; margin-bottom:14px; }

/* ── Etiketten ── */
.badge {
  display:inline-block; padding:3px 10px; border-radius:20px;
  font-size:12px; font-weight:600;
}
.badge-ok   { background:var(--ok-bg); color:var(--ok); }
.badge-off  { background:#f0f0f2; color:var(--muted); }
.badge-warn { background:#fff3e0; color:#b25c00; }

/* ── Aktionen in Tabellenzeilen ── */
.row-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.tbl-action {
  background:none; border:0; padding:0; cursor:pointer; font-size:13px;
  font-weight:600; color:var(--accent); font-family:inherit;
}
.tbl-action:hover { text-decoration:underline; }
.tbl-action.danger { color:#e0245e; }

/* ── Werbe-Banner (vom Admin gepflegt) ── */
.banner { text-align:center; margin:0 auto; }
.banner img { max-width:100%; height:auto; border-radius:10px; }
.banner-rotation { text-align:center; }
.banner-slide img { max-width:100%; height:auto; border-radius:10px; }

/* ── Dialog (Modal) ── */
.modal-host, .modal-backdrop {
  position:fixed; inset:0; z-index:200; display:none;
  align-items:flex-start; justify-content:center;
  background:rgba(0,0,0,.45); padding:6vh 16px 24px; overflow-y:auto;
}
.modal-host.open, .modal-backdrop.open { display:flex; }
.modal-box {
  background:var(--card); border-radius:var(--radius); width:100%; max-width:480px;
  box-shadow:0 20px 60px rgba(0,0,0,.30); overflow:hidden;
}
.modal-head {
  display:flex; align-items:center; justify-content:space-between;
  padding:17px 22px; border-bottom:1px solid var(--line);
}
.modal-head h2 { font-size:17px; font-weight:700; }
.modal-x {
  background:none; border:0; cursor:pointer; font-size:25px; line-height:1;
  color:var(--muted); padding:0 4px;
}
.modal-x:hover { color:var(--ink); }
.modal-body { padding:20px 22px; }
.modal-body label:first-child { margin-top:0; }
.modal-foot, .modal-actions {
  display:flex; justify-content:flex-end; gap:10px;
  padding:15px 22px; border-top:1px solid var(--line); background:#fafafa;
}
.modal-hint { font-size:13px; color:var(--muted); margin-top:8px; }

/* ── Login / Passwort-Seiten ── */
.login-container {
  min-height:100vh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; padding:24px;
}
.login-box {
  background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow);
  padding:36px; width:100%; max-width:400px;
}
.login-logo { text-align:center; margin-bottom:22px; }
.login-logo img { height:42px; }

/* ── Hilfsklassen ── */
.text-center { text-align:center; }
.text-right { text-align:right; }
.mt-20 { margin-top:20px; }
.mb-20 { margin-bottom:20px; }
.hidden { display:none; }

/* ── Tutorials (Hilfe-Videos) ── */
.tut-searchbar { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.tut-searchbar input { max-width:340px; }
.tut-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
  gap:18px; margin-top:14px;
}
.tut-card {
  background:var(--card); border-radius:var(--radius); box-shadow:var(--shadow);
  overflow:hidden; color:var(--ink); display:block;
  transition:transform .15s ease, box-shadow .15s ease;
}
a.tut-card:hover {
  transform:translateY(-4px);
  box-shadow:0 2px 4px rgba(0,0,0,.06), 0 14px 36px rgba(0,0,0,.12);
}
.tut-thumb-wrap { position:relative; }
.tut-thumb { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; background:#0b1528; }
.tut-noimg { display:flex; align-items:center; justify-content:center; color:#4f6bff; font-size:38px; }
.tut-soon .tut-thumb { filter:grayscale(.45); }
.tut-soon-badge {
  position:absolute; top:10px; left:10px; background:#1d1d1f; color:#fff;
  font-size:12px; font-weight:700; padding:4px 11px; border-radius:20px;
}
.tut-card-body { padding:14px 16px 16px; }
.tut-card-title { font-weight:600; font-size:15px; }
.tut-card-desc {
  color:var(--muted); font-size:13px; margin-top:4px;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.tut-section { font-size:15px; font-weight:700; margin:30px 0 2px; }
.tut-section-head {
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; margin:30px 0 2px;
}
.tut-section-head .tut-section { margin:0; }

/* ── Schmale Bildschirme ── */
@media (max-width:860px) {
  .side {
    position:fixed; top:0; left:0; bottom:0; z-index:100; width:264px; height:100vh;
    transform:translateX(-100%); transition:transform .22s ease;
    box-shadow:0 0 40px rgba(0,0,0,.20);
  }
  .shell.menu-open .side { transform:translateX(0); }
  .side-backdrop {
    display:block; position:fixed; inset:0; z-index:90; background:rgba(0,0,0,.45);
    opacity:0; pointer-events:none; transition:opacity .22s ease;
  }
  .shell.menu-open .side-backdrop { opacity:1; pointer-events:auto; }
  .burger { display:block; }
  .topbar-center { display:none; }
  .topbar-inner { padding:13px 16px; }
  .topbar h1 { font-size:19px; }
  .content { padding:18px; }
}
