/* DepotMechta – ruhiges Creme/Schiefer-Theme nach Vorbild mindhorizons.de */
:root {
  --bg: #fcfaf5;
  --card: #fffdf6;
  --card2: #f3efe6;
  --ink: #47565d;
  --muted: #7d8a90;
  --line: #e7e2d6;
  --brand-1: #47565d;
  --brand-2: #93a5ad;
  --hell: #fffdf6;
  --grad: linear-gradient(120deg, #47565d 0%, #6a7c85 100%);
  --success: #3d7a5c;
  --error: #b0563e;
  --shadow-sm: 0 1px 3px rgba(71, 86, 93, 0.08);
  --shadow-lg: 0 18px 48px rgba(71, 86, 93, 0.18);
  --radius: 12px;
  --r: 12px;
}

html[data-theme="dark"] {
  --bg: #22292d; --card: #2b3439; --card2: #333d43; --ink: #f2efe6;
  --muted: #a8b2b7; --line: #3d474d; --brand-1: #cfd8dc; --hell: #2b3439;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
  color-scheme: dark;
}
html[data-theme="dark"] .site-header { background: rgba(34,41,45,.88); }
html[data-theme="dark"] .field input, html[data-theme="dark"] .field textarea,
html[data-theme="dark"] select { background: #272f34; }
html[data-theme="dark"] .notice { background: #2a2410; border-color: #4d4215; color: #fbbf24; }
html[data-theme="dark"] .impersonation-bar { background: #2a2410; border-color: #4d4215; color: #fbbf24; }
html[data-theme="dark"] .btn { color: #22292d !important; }
html[data-theme="dark"] .btn-ghost { color: var(--ink) !important; background: transparent; }
html[data-theme="dark"] .settings-btn { color: var(--ink); }
html[data-theme="dark"] .hero .btn { color: #47565d !important; }
html[data-theme="dark"] .cta-band .btn { color: #47565d !important; }
html[data-theme="dark"] .cta-band .btn-ghost { color: #fffdf6 !important; }
html[data-theme="dark"] .flash { background: #0d2436; color: #7dd3fc; border-color: #164e63; }
html[data-theme="dark"] .flash-success { background: #0b2a1c; color: #34d399; border-color: #14532d; }
html[data-theme="dark"] .flash-error { background: #2a1416; color: #f87171; border-color: #4c1f23; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: light; }

body {
  font-family: var(--schrift, Arial, Helvetica, sans-serif);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1080px, 92%); margin: 0 auto; }
a { color: var(--brand-1); }
h1, h2, h3 { letter-spacing: -0.01em; font-weight: 350; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); line-height: 1.15; }
strong, b, th { font-weight: 650; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 250, 245, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; gap: 0.8rem; position: relative; }
.logo { font-size: 1.05rem; font-weight: 350; color: var(--ink); text-decoration: none; letter-spacing: 0.24em; text-transform: uppercase; }
.logo span { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 0.7rem; }
.top-nav {
  display: flex; align-items: center; gap: 1.3rem;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  white-space: nowrap;
}
.top-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.top-nav a:hover { color: var(--brand-1); border-bottom-color: var(--brand-1); }
@media (max-width: 1020px) { .top-nav { display: none; } }

.quick-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.feld-reihe { display: flex; gap: 0.8rem; }
.user-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.88rem; font-weight: 600; color: var(--muted);
  background: var(--card2); border: 1px solid var(--line);
  padding: 0.35rem 0.85rem; border-radius: 8px;
}
.user-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.chip-admin { color: #0f766e; border-color: #99e3d1; background: #e5f7f1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  background: var(--brand-1); color: var(--hell) !important;
  padding: 0.6rem 1.35rem; border-radius: 8px; border: none;
  font-size: 0.96rem; font-weight: 550; cursor: pointer; text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink) !important; border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand-1); color: var(--brand-1) !important; }
.btn-big { padding: 0.85rem 1.8rem; font-size: 1.05rem; }
.btn-danger { background: #fbeaea; color: var(--error) !important; border: 1px solid #f0c4c4; }
.btn-danger:hover { background: #f5d9d9; }
.btn-mini { padding: 0.32rem 0.7rem; font-size: 0.84rem; border-radius: 7px; }

.settings-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card2); color: var(--ink);
  border: 1px solid var(--line); padding: 0.55rem 1.1rem; border-radius: 8px;
  font-size: 0.95rem; font-weight: 650; cursor: pointer; transition: border-color 0.15s ease;
}
.settings-btn:hover { border-color: var(--brand-1); }

/* Menüband rechts */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease; z-index: 90;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw);
  /* dvh statt vh: auf Handys wird die Adressleiste korrekt mitgerechnet,
     sonst ragt das Menü-Ende (Abmelden) unter den Bildschirmrand */
  height: 100dvh; max-height: 100dvh;
  font-family: var(--schrift, Arial, Helvetica, sans-serif);
  background: var(--card); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100; display: flex; flex-direction: column; padding: 1.4rem;
  padding-bottom: calc(1.4rem + env(safe-area-inset-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.drawer, .drawer * { font-family: inherit; }
@supports not (height: 100dvh) { .drawer { height: 100vh; max-height: 100vh; } }
body.drawer-open .drawer { transform: translateX(0); }
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.drawer-head h2 { font-size: 1.1rem; }
.drawer-close { background: var(--card2); border: 1px solid var(--line); width: 34px; height: 34px; border-radius: 8px; font-size: 1rem; cursor: pointer; color: var(--muted); }
.drawer-close:hover { color: var(--ink); }
.drawer-user { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 0.9rem 1rem; margin-bottom: 1.2rem; }
.drawer-user strong { display: block; }
.drawer-user small { color: var(--muted); }
.drawer nav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 0 auto; }
.drawer nav a { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 550; transition: background 0.12s ease; }
.drawer nav a:hover { background: var(--card2); color: var(--brand-1); }
.drawer nav .sep { height: 1px; background: var(--line); margin: 0.7rem 0.2rem; }
.drawer nav .nav-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 0.4rem 0.8rem 0.1rem; font-weight: 700; }
.drawer-foot { margin-top: 1rem; flex-shrink: 0; padding-bottom: 0.5rem; }
.drawer-foot .btn, .drawer-foot .btn-danger { width: 100%; }

/* Aufklappbare Menü-Gruppen (Akkordeon) */
.menue-gruppe { border-bottom: 1px solid var(--line); padding: 0.2rem 0; }
.menue-gruppe summary {
  cursor: pointer; font-weight: 700; padding: 0.6rem 0.4rem;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.menue-gruppe summary::-webkit-details-marker { display: none; }
.menue-gruppe summary::after { content: "▾"; color: var(--muted); transition: transform 0.15s ease; }
.menue-gruppe[open] summary::after { transform: rotate(180deg); }
.menue-gruppe a { display: block; padding: 0.45rem 0.4rem 0.45rem 1.6rem; color: var(--ink); text-decoration: none; font-weight: 500; }
.menue-gruppe a:hover { background: var(--card2); color: var(--brand-1); }
.rolle-zeile { margin-top: 0.4rem; font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.8rem; color: var(--muted); font-size: 0.92rem; }

/* Impersonation */
.impersonation-bar {
  background: #fff3cd; border-bottom: 1px solid #ffe08a; color: #7a5d00;
  padding: 0.55rem 1.2rem; display: flex; justify-content: center; align-items: center;
  gap: 1rem; flex-wrap: wrap; font-size: 0.95rem; position: sticky; top: 57px; z-index: 45;
}

/* Flash */
.flash { padding: 0.85rem 1.2rem; border-radius: 8px; margin-bottom: 1.2rem; background: #e8f1fd; color: #1d4ed8; border: 1px solid #c3d9f8; }
.flash-success { background: #e7f6ec; color: var(--success); border-color: #bfe5cb; }
.flash-error { background: #fbeaea; color: var(--error); border-color: #f0c4c4; }

main { flex: 1; padding: 2.6rem 0 3.5rem; }

/* Hero (Startseite): Vollbild-Foto, ruhig und atmosphärisch */
.hero {
  position: relative; overflow: hidden;
  width: 100vw; margin-left: calc(50% - 50vw); margin-top: -2.6rem;
  min-height: 74vh; display: flex; flex-direction: column; justify-content: center;
  background:
    linear-gradient(180deg, rgba(39, 44, 46, 0.30), rgba(39, 44, 46, 0.16) 45%, rgba(39, 44, 46, 0.44)),
    url('https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?auto=format&fit=crop&w=2000&q=80') center/cover no-repeat;
  color: #fffdf6; padding: 6.5rem 6% 5.5rem; text-align: center;
}
.hero .eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 550; letter-spacing: 0.28em; text-transform: uppercase; margin-bottom: 1.4rem; color: rgba(255, 253, 246, 0.85); }
.hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); line-height: 1.14; margin-bottom: 1.2rem; font-weight: 250; letter-spacing: 0; }
.hero h1 .grad, .hero span.grad { color: #fffdf6; font-weight: 350; }
.hero p { color: rgba(255, 253, 246, 0.9); font-size: 1.14rem; max-width: 620px; margin: 0 auto 2.2rem; font-weight: 350; }
.hero-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.hero .btn { background: #fffdf6; color: #47565d !important; font-weight: 600; }
.hero .btn-ghost { background: rgba(39, 44, 46, 0.35); color: #fffdf6 !important; border: none; backdrop-filter: blur(4px); }
.hero .trust-row { color: rgba(255, 253, 246, 0.85); }

/* Karten */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 1.1rem; margin-top: 1.6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.7rem; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 0.9rem; }
.card.link-card { transition: border-color 0.15s ease, transform 0.15s ease; }
.card.link-card:hover { transform: translateY(-3px); border-color: var(--brand-1); }
a.card { text-decoration: none; color: inherit; display: block; }

.section-title { margin: 3rem 0 0.4rem; font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 300; }
.section-sub { color: var(--muted); margin-bottom: 1.2rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.4rem; }
.stat .num { font-size: 2.2rem; font-weight: 300; letter-spacing: -0.02em; }
.stat .lbl { color: var(--muted); font-size: 0.9rem; font-weight: 550; }
.stat-link { text-decoration: none; color: inherit; transition: border-color 0.15s ease; display: block; }
.stat-link:hover { border-color: var(--brand-1); }
.stat-link .lbl { color: var(--brand-1); }

.badge { display: inline-block; font-size: 0.76rem; font-weight: 700; padding: 0.15rem 0.6rem; border-radius: 6px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); }
.badge-admin { color: #0f766e; border-color: #99e3d1; background: #e5f7f1; }
.badge-rot { background: #fbeaea; color: var(--error); border-color: #f0c4c4; }
.badge-ok { background: #e7f6ec; color: var(--success); border-color: #bfe5cb; }
.label-rot { color: var(--error) !important; }

/* Formulare */
.form-card { max-width: 470px; margin: 0 auto; padding: 2rem; }
.form-card h1 { margin-bottom: 0.4rem; font-size: 1.55rem; }
.form-card .form-sub { color: var(--muted); margin-bottom: 1.4rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.93rem; }
.field input, .field textarea {
  width: 100%; padding: 0.65rem 0.85rem;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem; font-family: inherit;
  background: #fffdf6; color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 3px rgba(71, 86, 93, 0.15); }
.field .hint { font-size: 0.84rem; color: var(--muted); margin-top: 0.25rem; }
.form-footer { margin-top: 1.1rem; color: var(--muted); font-size: 0.95rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.1rem; }
.checkbox-row input { width: auto; accent-color: var(--brand-1); }
.form-card .btn { width: 100%; padding: 0.75rem; }

select { padding: 0.45rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; font-size: 0.92rem; font-family: inherit; background: #fffdf6; color: var(--ink); cursor: pointer; }
select:focus { outline: none; border-color: var(--brand-1); }
.field select { width: 100%; padding: 0.65rem 0.85rem; font-size: 1rem; }

/* Leads */
.lead-search { display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: 0.9rem; align-items: end; }
.lead-search .field { margin-bottom: 0; }
@media (max-width: 720px) { .lead-search { grid-template-columns: 1fr; } }
.filter-row { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-chips { display: flex; gap: 0.4rem; }
.chip { padding: 0.35rem 0.9rem; border-radius: 7px; border: 1px solid var(--line); background: var(--card); color: var(--muted); text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.chip:hover { border-color: var(--brand-1); color: var(--brand-1); }
.chip-on { background: var(--brand-1); color: var(--hell); border-color: var(--brand-1); }
.chip-on:hover { color: var(--hell); }
.aktionen { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.aktionen form { display: inline; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.mini-site { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mini-site:last-of-type { border-bottom: none; }

/* Roadmap */
.roadmap-section { margin-bottom: 1.4rem; }
.roadmap-section h2 { margin-bottom: 0.7rem; font-size: 1.15rem; }
.todo-list { list-style: none; }
.todo-list li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.todo-list li:last-child { border-bottom: none; }
.todo-check { flex-shrink: 0; width: 1.35rem; height: 1.35rem; border-radius: 6px; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; margin-top: 0.22rem; color: var(--hell); background: var(--card2); }
.todo-done .todo-check { background: var(--brand-1); border-color: var(--brand-1); }
.todo-done span.todo-text { color: var(--muted); text-decoration: line-through; }
.progress-bar { height: 8px; border-radius: 999px; background: var(--card2); overflow: hidden; margin: 0.5rem 0 0.2rem; }
.progress-bar > div { height: 100%; background: var(--grad); border-radius: 999px; }

/* Text-Seiten */
.text-page h1 { margin-bottom: 1rem; }
.text-page h2 { margin: 1.5rem 0 0.5rem; font-size: 1.12rem; }
.text-page p { margin-bottom: 0.8rem; }
.notice { background: #fff8e6; border: 1px solid #f0dfa8; padding: 0.85rem 1.2rem; margin-bottom: 1.5rem; color: #7c5e0b; }
.notice code, code { background: var(--card2); border: 1px solid var(--line); border-radius: 4px; padding: 0.1rem 0.35rem; font-size: 0.9em; }

/* Tabellen */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; }
th { background: var(--card2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
tr:last-child td { border-bottom: none; }

/* Startseite (Marketing) */
.trust-row { margin-top: 1.8rem; color: var(--muted); font-size: 0.9rem; letter-spacing: 0.04em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.1rem; margin-top: 1.6rem; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; }
.step h3 { margin: 0.6rem 0 0.3rem; font-size: 1.02rem; }
.step p { color: var(--muted); font-size: 0.94rem; }
.step-num { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-1); color: var(--hell); font-weight: 500; align-items: center; justify-content: center; font-size: 1.05rem; }
.quote-band { text-align: center; padding: 4.5rem 6%; margin: 3.5rem 0 1rem; background: #47565d; color: #fffdf6; width: 100vw; margin-left: calc(50% - 50vw); border: none; }
.quote { font-size: clamp(1.3rem, 2.8vw, 1.9rem); font-weight: 300; max-width: 780px; margin: 0 auto 0.8rem; line-height: 1.4; }
.quote-name { color: rgba(255, 253, 246, 0.75); }
.quote-band a { color: #fffdf6; }
.faq { max-width: 760px; margin: 1.5rem auto 0; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 0.7rem; padding: 0.9rem 1.2rem; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { color: var(--muted); margin-top: 0.6rem; }
.cta-band { text-align: center; background: #47565d; color: #fffdf6; border: none; border-radius: 16px; padding: 3.8rem 1.5rem; margin-top: 3.5rem; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.5rem; font-weight: 300; }
.cta-band p { color: rgba(255, 253, 246, 0.8); margin-bottom: 1.6rem; }
.cta-band .btn { background: #fffdf6; color: #47565d !important; }
.cta-band .btn-ghost { background: transparent; color: #fffdf6 !important; border: 1px solid rgba(255, 253, 246, 0.5); }

/* FAQ / Hilfe-Seite */
.faq-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.faq-nav a {
  padding: 0.4rem 0.9rem; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 600;
}
.faq-nav a:hover { border-color: var(--brand-1); color: var(--brand-1); }
.faq .section-title { margin-top: 2.2rem; }
.faq details { max-width: 100%; }

/* Tutorial */
#tut-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.55); }
.tut-box {
  position: fixed; left: 50%; bottom: 5vh; transform: translateX(-50%);
  width: min(380px, 92vw); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 1.3rem; font-family: var(--schrift, Arial, sans-serif);
}
@media (min-width: 760px) { .tut-box { transform: none; } }
.tut-box h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.tut-box p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.1rem; }
.tut-fortschritt { height: 3px; background: var(--card2); margin: -1.3rem -1.3rem 1rem; }
.tut-fortschritt span { display: block; height: 100%; background: var(--brand-1); transition: width 0.25s ease; }
.tut-aktionen { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; }
.tut-rechts { display: flex; gap: 0.5rem; }
.tut-highlight {
  position: relative; z-index: 201;
  outline: 3px solid var(--brand-1); outline-offset: 2px;
  background: var(--card2) !important;
}

/* Footer */
.site-footer { background: var(--card); border-top: 1px solid var(--line); padding: 2rem 0 1.2rem; color: var(--muted); font-size: 0.93rem; }
.foot-spalten { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
@media (max-width: 760px) { .foot-spalten { grid-template-columns: 1fr 1fr; } }
.foot-spalten h4 { color: var(--ink); font-size: 0.95rem; margin-bottom: 0.6rem; }
.foot-spalten a { display: block; color: var(--muted); text-decoration: none; padding: 0.15rem 0; }
.foot-spalten a:hover { color: var(--brand-1); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.footer-inner nav { display: flex; gap: 1.1rem; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--brand-1); }

/* Weiche Rundungen für ruhige Anmutung */
.card, .stat, .step, .table-wrap, .flash, .notice, .faq details, .form-card { border-radius: var(--r); }

/* Preise & Kalkulator */
.preis-karte { text-align: center; position: relative; }
.preis-karte .preis { font-size: 2.3rem; font-weight: 300; color: var(--ink); margin: 0.3rem 0 0.8rem; }
.preis-karte .preis span { font-size: 0.95rem; font-weight: 550; color: var(--muted); }
.preis-beliebt { border-color: var(--brand-1); border-width: 2px; }
.beliebt-badge { position: absolute; top: -0.8rem; left: 50%; transform: translateX(-50%); background: var(--brand-1); color: var(--hell); font-weight: 600; font-size: 0.8rem; padding: 0.18rem 1rem; border-radius: 999px; }
.kalk-ergebnis { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1.15rem; }
.kalk-ergebnis strong { color: var(--brand-1); font-size: 1.3rem; }
input[type="range"] { accent-color: var(--brand-1); }

/* ===== Logo-Bild ===== */
.logo-bild { height: var(--logo-h, 34px); display: block; }
.logo { transform: translate(var(--logo-x, 0px), var(--logo-y, 0px)); }

/* ===== Reiter (System-Einstellungen) ===== */
.tab-leiste { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.tab-knopf {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  padding: 0.5rem 1.05rem; border-radius: 999px; font-size: 0.92rem; font-weight: 550;
  cursor: pointer; font-family: inherit; transition: all 0.15s ease;
}
.tab-knopf:hover { border-color: var(--brand-1); color: var(--ink); }
.tab-knopf.aktiv { background: var(--brand-1); color: var(--hell); border-color: var(--brand-1); }
.tab-panel { display: none; }
.tab-panel.aktiv { display: block; animation: einblenden 0.2s ease; }
@keyframes einblenden { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.einstell-card { max-width: 720px; margin-bottom: 1.2rem; }
.einstell-card h3 { margin-bottom: 0.35rem; font-weight: 550; font-size: 1.12rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.card-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.2rem; }
.paket-block { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 0.4rem; }
.paket-block:first-of-type { border-top: none; padding-top: 0; }
.speicher-leiste {
  position: sticky; bottom: 0; padding: 0.9rem 0;
  background: linear-gradient(180deg, transparent, var(--bg) 35%);
}

/* ===== Eigene Seiten & Menü ===== */
.seite-eintrag {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  margin-top: 0.8rem; box-shadow: var(--shadow-sm);
}
.seite-eintrag summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; gap: 0.8rem; padding: 1rem 1.3rem; flex-wrap: wrap;
}
.seite-eintrag summary::-webkit-details-marker { display: none; }
.seite-eintrag .seite-titel { font-weight: 600; }
.seite-eintrag .seite-titel::before { content: "▸ "; color: var(--muted); }
.seite-eintrag[open] .seite-titel::before { content: "▾ "; }
.seite-eintrag .seite-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.seite-form { padding: 0 1.3rem 1.2rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }

/* ===== simple-datatables im Plattform-Look ===== */
.table-wrap { padding: 0.9rem 1.1rem; }
.datatable-wrapper .datatable-top { padding: 0 0 0.8rem; display: flex; gap: 0.8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.datatable-wrapper .datatable-bottom { padding: 0.8rem 0 0; display: flex; gap: 0.8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.datatable-wrapper .datatable-search .datatable-input {
  border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.8rem;
  background: var(--card); color: var(--ink); font-family: inherit; font-size: 0.92rem;
}
.datatable-wrapper .datatable-selector {
  border: 1px solid var(--line); border-radius: 8px; padding: 0.35rem 0.5rem;
  background: var(--card); color: var(--ink); font-family: inherit;
}
.datatable-wrapper .datatable-info { color: var(--muted); font-size: 0.88rem; }
.datatable-pagination ul { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.datatable-pagination .datatable-pagination-list-item-link {
  display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none; font-size: 0.9rem; padding: 0 0.5rem;
}
.datatable-pagination .datatable-active .datatable-pagination-list-item-link {
  background: var(--brand-1); color: var(--hell); border-color: var(--brand-1);
}
.datatable-wrapper th { cursor: pointer; user-select: none; white-space: nowrap; }
.datatable-wrapper th button { all: unset; cursor: pointer; }

/* ===== Tabellen auf dem Handy ===== */
@media (max-width: 700px) {
  .table-wrap { padding: 0.6rem 0.6rem; }
  th, td { padding: 0.55rem 0.6rem; font-size: 0.88rem; }
  .datatable-wrapper .datatable-top, .datatable-wrapper .datatable-bottom { flex-direction: column; align-items: stretch; }
  .datatable-wrapper .datatable-search .datatable-input { width: 100%; }
  .aktionen { gap: 0.3rem; }
  .aktionen .btn-mini { padding: 0.35rem 0.55rem; }
}

/* ===== Tabellen-Werkzeuge (Export + Ansicht) ===== */
.tabellen-werkzeuge { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }

/* ===== Kachel-Ansicht: Zeilen als Karten (ideal fürs Handy) ===== */
.kachel-modus .datatable-container { overflow: visible; }
.kachel-modus table { display: block; }
.kachel-modus thead { display: none; }
.kachel-modus tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; }
.kachel-modus tbody tr {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1rem 1.1rem; box-shadow: var(--shadow-sm);
}
.kachel-modus tbody td {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem;
  border-bottom: 1px dashed var(--line); padding: 0.4rem 0; font-size: 0.92rem; text-align: right;
}
.kachel-modus tbody td:last-child { border-bottom: none; }
.kachel-modus tbody td::before {
  content: attr(data-label);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); font-weight: 650; text-align: left; flex-shrink: 0;
}
.kachel-modus tbody td.aktionen { justify-content: flex-start; text-align: left; }
.kachel-modus tbody td:empty { display: none; }

/* ===== Dunkelmodus: Lesbarkeit ===== */
html[data-theme="dark"] .todo-check { color: #22292d; }
html[data-theme="dark"] .chip-admin { color: #7ddfc3; border-color: #2b5c4b; background: #1d3a30; }
html[data-theme="dark"] .badge-admin { color: #7ddfc3; border-color: #2b5c4b; background: #1d3a30; }
html[data-theme="dark"] .badge-ok { color: #7ddfc3; border-color: #2b5c4b; background: #1d3a30; }
html[data-theme="dark"] .badge-rot { color: #f1a08c; border-color: #6b3527; background: #3d221b; }
html[data-theme="dark"] .btn-danger { background: #3d221b; color: #f1a08c !important; border-color: #6b3527; }
html[data-theme="dark"] .user-chip .dot { background: #7ddfc3; }
html[data-theme="dark"] .datatable-input,
html[data-theme="dark"] .datatable-selector { background: var(--card2) !important; color: var(--ink) !important; border-color: var(--line) !important; }
html[data-theme="dark"] .datatable-info,
html[data-theme="dark"] .datatable-wrapper { color: var(--ink); }
html[data-theme="dark"] .datatable-sorter::before { border-bottom-color: var(--muted) !important; }
html[data-theme="dark"] .datatable-sorter::after { border-top-color: var(--muted) !important; }
html[data-theme="dark"] th { color: var(--muted); }
html[data-theme="dark"] .step-num { color: #22292d; }
html[data-theme="dark"] .beliebt-badge { color: #22292d; }
html[data-theme="dark"] .chip-on { color: #22292d; }
html[data-theme="dark"] .tab-knopf.aktiv { color: #22292d; }
html[data-theme="dark"] .speicher-leiste { background: linear-gradient(180deg, transparent, var(--bg) 35%); }

/* Sortier-Pfeile immer sichtbar */
.datatable-sorter { position: relative; padding-right: 16px; cursor: pointer; }

/* ===== Logo: helle/dunkle Variante + automatische Invertierung ===== */
.logo { display: inline-flex; align-items: center; }
.logo-dunkel { display: none; }
html[data-theme="dark"] .logo-hell:has(~ .logo-dunkel) { display: none; }
html[data-theme="dark"] .logo-dunkel { display: block; }
html[data-theme="dark"] .logo-invert { filter: invert(1) hue-rotate(180deg); }

/* ===== Stil-Galerie im Website-Editor ===== */
.stil-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.6rem; margin: 0.4rem 0 0.6rem; }
.stil-karte {
  border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.8rem;
  cursor: pointer; display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--card); transition: border-color 0.12s ease;
}
.stil-karte:hover { border-color: var(--brand-1); }
.stil-karte input { position: absolute; opacity: 0; }
.stil-karte.stil-aktiv, .stil-karte:has(input:checked) { border-color: var(--brand-1); box-shadow: 0 0 0 2px var(--brand-1); }
.stil-karte strong { font-size: 0.95rem; }
.stil-karte small { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.stil-karte a { font-size: 0.8rem; color: var(--brand-1); text-decoration: none; margin-top: 0.3rem; }

/* Handy: Anmelden/Registrieren nur im Menü, nicht in der Kopfzeile */
@media (max-width: 767px) {
  .header-actions a.btn, .header-actions a.btn-ghost { display: none; }
}

/* ===== Massenaktionen ===== */
.massen-leiste { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; padding: 0.8rem 0 0.2rem; border-top: 1px solid var(--line); margin-top: 0.8rem; }
.massen-info { color: var(--muted); font-size: 0.88rem; margin-right: 0.4rem; }
.massen-check { width: 17px; height: 17px; accent-color: var(--brand-1); cursor: pointer; }

/* ===== Monitoring: Warn-Kacheln ===== */
.stat-warn { border-color: var(--error); }
.stat-warn .num { color: var(--error); }

/* ===== Leaflet-Karte an das Theme anpassen ===== */
.leaflet-container { font-family: var(--schrift, sans-serif); }
.leaflet-popup-content { font-size: 0.92rem; line-height: 1.5; }
.leaflet-popup-content a { color: var(--brand-1); }
html[data-theme="dark"] .leaflet-tile { filter: brightness(0.85) contrast(1.05); }
html[data-theme="dark"] .leaflet-popup-content-wrapper,
html[data-theme="dark"] .leaflet-popup-tip { background: var(--card); color: var(--ink); }
