:root {
  /* Farben von Idealbetten. Die Werte stammen aus dem Designsystem der Website
     (`website/design-system/styles.css`) — dieselben Toene wie im Shop und im
     Dashboard, damit die drei Anwendungen nicht drei Marken sind.

     Das Orange davor (#ffa100) war Meisterbetten und stand hier trotzdem als
     "Idealbetten-Orange" — mitgekommen beim Fork und nie geaendert. */
  --bg: #f6f2ea;
  --surface: #fbf9f4;
  --surface-2: #f2ede3;
  --text: #2e2b26;
  --muted: #8a8378;
  --accent: #6f7f66;       /* gedaempftes Gruen — die Marke */
  --accent-2: #5c6a54;     /* dunkler, fuer Hover und aktive Zustaende */
  --accent-soft: #e8ede2;  /* fuer Flaechen hinter dem Akzent */
  --warn: #c9922f;         /* Hinweis, nicht Fehler */
  --danger: #b5543f;
  --border: #e6dfd0;
  --border-strong: #cfc7b6;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: rgba(255,255,255,.9); position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: none; padding: 0 40px; }
/* Eingeloggt: Logo ganz links, dann die Werkzeuge, Konto ganz rechts */
.header-app { position: relative; }
.header-app .nav-tools { margin-right: auto; }   /* schiebt das Konto-Menü nach rechts */
.brand { display: flex; align-items: center; text-decoration: none; margin-right: 22px; flex: none; }
.brand-logo { height: 40px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); font-weight: 600; }

/* Werkzeug-Navigation in der Kopfleiste */
.nav-tools { display: flex; align-items: center; gap: 4px; }
.nav-tools a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 7px 14px; border-radius: 9px; white-space: nowrap; }
.nav-tools a:hover { color: var(--text); background: var(--surface-2); }
.nav-tools a.active { color: var(--accent-2); background: rgba(255,161,0,.13); }

/* Buttons */
.btn { display: inline-block; padding: 10px 18px; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: .95rem; }
.btn-primary { background: var(--accent); color: #1a1208; }
.btn-primary:hover { background: #e8920a; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Hero */
.hero { padding: 80px 0 50px; text-align: center; }
.hero h1 { font-size: 2.8rem; line-height: 1.15; margin: 0 0 18px; letter-spacing: -1px; }
.accent { color: var(--accent-2); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 40px 0 80px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.feature-card h3 { margin: 0 0 10px; color: var(--accent-2); }
.feature-card p { margin: 0; color: var(--muted); }

/* Auth */
.auth-card { max-width: 420px; margin: 60px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 36px; }
.auth-card h1 { margin: 0 0 6px; }
.muted { color: var(--muted); }
.field { margin: 18px 0; display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; }
.field-inline { flex-direction: row; align-items: center; gap: 8px; }
.input { width: 100%; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 1rem; }
.input:focus { outline: none; border-color: var(--accent); }
.error-text { color: var(--danger); font-size: .85rem; }
.auth-alt { margin-top: 22px; text-align: center; color: var(--muted); }
.auth-alt a { color: var(--accent-2); }

/* Flash messages */
.flashes { margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.flash { padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); }
.flash-success { background: rgba(0,210,168,.12); border-color: var(--accent-2); }
.flash-error { background: rgba(255,107,107,.12); border-color: var(--danger); }
.flash-info { background: rgba(255,161,0,.12); border-color: var(--accent); }

/* Dashboard */
.dashboard { padding: 50px 0; }
.dashboard h1 { margin: 0 0 4px; }
.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.dash-card h3 { margin: 0 0 10px; }
.dash-card p { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 30px 0; margin-top: 60px; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .features, .dash-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

/* ===== Helles Idealbetten-Theme (nur Landingpage via body.theme-light) ===== */
.theme-light { background: #fbf9f6; color: #2b2620; }
.theme-light .site-header { background: rgba(255,255,255,.93); border-bottom: 1px solid #ece7df; }
.theme-light .nav a { color: #6b6459; }
.theme-light .nav a:hover { color: #2b2620; }
.theme-light .site-footer { border-top: 1px solid #ece7df; color: #9a9184; }

/* Landing-Hero (schlicht, ohne Foto – Arbeitsplattform) */
.mb-hero { text-align: center; padding: 64px 0 30px; }
.mb-logo-big { height: 96px; width: auto; display: block; margin: 0 auto 22px; }
.mb-hero h1 { font-size: 2.7rem; line-height: 1.14; margin: 0 0 14px; letter-spacing: -1px; color: #211c16; }
.mb-hero h1 .hl { color: var(--accent); }
.mb-hero .lead { font-size: 1.15rem; color: #5c574e; max-width: 620px; margin: 0 auto 28px; }
@media (max-width: 760px) { .mb-hero h1 { font-size: 2rem; } }

/* Landing-Schritte */
.mb-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 26px 0 84px; }
.mb-card { background: #fff; border: 1px solid #ece7df; border-radius: 16px; padding: 28px; box-shadow: 0 8px 28px rgba(60,45,15,.05); }
.mb-card .num { display: inline-flex; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #1a1208;
  align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px; }
.mb-card h3 { margin: 0 0 8px; color: #1f1b16; }
.mb-card p { margin: 0; color: #6b6459; }

@media (max-width: 760px) { .mb-steps { grid-template-columns: 1fr; } .mb-hero h1 { font-size: 2rem; } .mb-logo-big { height: 96px; } }

/* Dashboard: sekundäre Karten (Hilfe/Konto/Admin) etwas dezenter */
.dash-card-soft { background: var(--surface-2); }
/* Landing: Werkzeug-Übersicht */
.mb-tools { max-width: 980px; margin: 36px auto 0; text-align: center; }
.mb-tools h2 { margin: 0 0 14px; }
.mb-tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.mb-tool-list li { background: rgba(255,255,255,.7); border: 1px solid #ece7df; border-radius: 10px; padding: 12px 14px; text-align: left; }

/* Präsenz-Lampe im Header (nur Inhaber) */
.pres-lamp { display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  padding: 4px 9px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); }
.pres-lamp-dot { width: 10px; height: 10px; border-radius: 50%; background: #c9c4ba; flex: 0 0 auto; }
.pres-lamp-num { font-weight: 700; font-size: .8rem; color: var(--muted); }
.pres-lamp.on .pres-lamp-dot { background: #2bb673; animation: presBlink 1.1s ease-in-out infinite; }
.pres-lamp.on .pres-lamp-num { color: #1f9d63; }
@keyframes presBlink { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(43,182,115,.55); } 50% { opacity: .3; box-shadow: 0 0 0 5px rgba(43,182,115,0); } }
