/* ═══════════════════════════════════════════════════
   EGGW – Gemeinsame Basis-Styles
   Eingebunden in alle Seiten des Projekts
   ═══════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg:           #F4EFE4;
  --surface:      #FFFFFF;
  --surface-warm: #FAF7F0;
  --dark:         #1A2E1C;
  --dark-mid:     #243D26;
  --accent:       #B6840A;
  --accent-light: #F5E8C0;
  --accent-pale:  #FBF4E0;
  --text:         #1C1A16;
  --text-mid:     #5A5448;
  --text-light:   #8A857D;
  --border:       #DDD7CA;
  --border-light: #EDE8DC;
  --danger:       #A82417;
  --danger-bg:    #FDECEA;
  --warn:         #8A5A00;
  --warn-bg:      #FEF4D8;
  --ok:           #1E5C38;
  --ok-bg:        #E4F4EB;
  --nav-bg:       #162418;
  --shadow:       0 2px 16px rgba(26,46,28,0.10);
  --shadow-card:  0 1px 6px rgba(26,46,28,0.07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #111A10;
    --surface:      #1A2A18;
    --surface-warm: #1E3020;
    --dark:         #E8E2D4;
    --dark-mid:     #C8C0AE;
    --accent:       #D4A030;
    --accent-light: #3A2C08;
    --accent-pale:  #2A2208;
    --text:         #EDE8DC;
    --text-mid:     #A8A298;
    --text-light:   #6A6460;
    --border:       #2E3E2C;
    --border-light: #243022;
    --danger:       #E05545;
    --danger-bg:    #2A1210;
    --warn:         #D4A030;
    --warn-bg:      #2A2008;
    --ok:           #4ABA78;
    --ok-bg:        #0E2818;
    --nav-bg:       #0E1A0C;
    --shadow:       0 2px 16px rgba(0,0,0,0.3);
    --shadow-card:  0 1px 6px rgba(0,0,0,0.2);
  }
}
:root[data-theme="light"] {
  --bg:#F4EFE4;--surface:#FFFFFF;--surface-warm:#FAF7F0;--dark:#1A2E1C;--dark-mid:#243D26;
  --accent:#B6840A;--accent-light:#F5E8C0;--accent-pale:#FBF4E0;--text:#1C1A16;
  --text-mid:#5A5448;--text-light:#8A857D;--border:#DDD7CA;--border-light:#EDE8DC;
  --danger:#A82417;--danger-bg:#FDECEA;--warn:#8A5A00;--warn-bg:#FEF4D8;
  --ok:#1E5C38;--ok-bg:#E4F4EB;--nav-bg:#162418;
  --shadow:0 2px 16px rgba(26,46,28,0.10);--shadow-card:0 1px 6px rgba(26,46,28,0.07);
}
:root[data-theme="dark"] {
  --bg:#111A10;--surface:#1A2A18;--surface-warm:#1E3020;--dark:#E8E2D4;--dark-mid:#C8C0AE;
  --accent:#D4A030;--accent-light:#3A2C08;--accent-pale:#2A2208;--text:#EDE8DC;
  --text-mid:#A8A298;--text-light:#6A6460;--border:#2E3E2C;--border-light:#243022;
  --danger:#E05545;--danger-bg:#2A1210;--warn:#D4A030;--warn-bg:#2A2008;
  --ok:#4ABA78;--ok-bg:#0E2818;--nav-bg:#0E1A0C;
  --shadow:0 2px 16px rgba(0,0,0,0.3);--shadow-card:0 1px 6px rgba(0,0,0,0.2);
}

/* ── Reset & Basis ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

/* ── Seitenkopf ── */
.eggw-header {
  background: var(--dark);
  position: relative;
}
.eggw-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('/static/img/EGGW%20Grundst%C3%BCck_1.png');
  background-size: cover; background-position: center 40%;
  opacity: 0.28;
}
.eggw-header::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(26,46,28,0.85) 0%, rgba(26,46,28,0.55) 60%, rgba(26,46,28,0.75) 100%);
  pointer-events: none;
}
.eggw-header-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 22px 40px;
  display: flex; align-items: center; gap: 20px;
  position: relative; z-index: 1;
}
.eggw-logo {
  height: 89px; width: auto; flex-shrink: 0;
  background: transparent; border-radius: 7px; padding: 5px 9px;
  mix-blend-mode: multiply;
}
.eggw-header-text { flex: 1; }
.eggw-eyebrow {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 2px;
}
.eggw-title {
  font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  font-size: 2.4rem; font-weight: 400; color: #F0EBE0; line-height: 1.2;
}
.eggw-sub {
  font-size: 1rem; color: rgba(240,235,224,0.55); margin-top: 3px;
}
.eggw-uebersicht-btn {
  color: white; text-decoration: none;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 8px; padding: 6px 14px;
  font-size: 0.8rem; font-weight: 700; white-space: nowrap;
  transition: border-color 0.2s; flex-shrink: 0;
}
.eggw-uebersicht-btn:hover { border-color: white; }

.eggw-konto { position: relative; flex-shrink: 0; }
.eggw-konto-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent); color: var(--dark);
  font-weight: 700; font-size: 1.1rem; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; overflow: hidden;
}
.eggw-konto-avatar:hover { filter: brightness(1.08); }
.eggw-konto-pfeil {
  position: absolute; bottom: -4px; right: -4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--dark); font-weight: 700;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
  pointer-events: none; border: 2px solid var(--dark);
}
.eggw-konto-dropdown {
  display: none; position: absolute; top: 62px; right: 0; z-index: 50;
  background: var(--surface); color: var(--text); border-radius: 10px;
  box-shadow: var(--shadow); min-width: 200px; overflow: hidden;
  border: 1px solid var(--border);
}
.eggw-konto-dropdown.offen { display: block; }
.eggw-konto-name {
  padding: 12px 16px; font-weight: 700; font-size: 0.88rem;
  border-bottom: 1px solid var(--border-light); color: var(--text);
}
.eggw-konto-dropdown a {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 16px; font-size: 0.85rem; color: var(--text);
  text-decoration: none;
}
.eggw-konto-dropdown a:hover { background: var(--surface-warm); }

/* ── Navigation ── */
.eggw-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(182,132,10,0.18);
}
.eggw-nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 40px;
  display: flex; flex-direction: column;
}
.eggw-nav-zeile { display: flex; gap: 0; overflow-x: auto; }
.eggw-nav-zeile:first-child { border-bottom: 1px solid rgba(182,132,10,0.12); }
.eggw-nav a {
  color: rgba(240,235,224,0.45); padding: 9px 20px;
  font-size: 17px; font-weight: 600; letter-spacing: 0.2px;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
}
.eggw-nav a:hover { color: rgba(240,235,224,0.85); }
.eggw-nav a.aktiv { color: var(--accent); border-bottom-color: var(--accent); }
.eggw-nav-trenner { width: 1px; margin: 9px 6px; background: rgba(240,235,224,0.16); flex-shrink: 0; }

/* ── Flash-Meldungen ── */
.eggw-flash-wrap { max-width: 1240px; margin: 20px auto 0; padding: 0 40px; }
.eggw-flash {
  padding: 12px 18px; border-radius: 8px;
  font-weight: 600; font-size: 0.875rem; margin-bottom: 10px;
}
.eggw-flash-erfolg { background: var(--ok-bg); color: var(--ok); }
.eggw-flash-fehler { background: var(--danger-bg); color: var(--danger); }

/* ── Karten ── */
.eggw-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 22px 26px;
  margin-bottom: 20px;
}
.eggw-card-titel {
  font-family: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  font-size: 1rem; color: var(--text-mid);
  padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

/* ── Buttons ── */
.eggw-btn {
  display: inline-block; padding: 8px 18px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 700; color: white; border: none;
  cursor: pointer; text-decoration: none; transition: opacity 0.18s;
}
.eggw-btn:hover { opacity: 0.88; }
.eggw-btn-gruen  { background: #2D6A4F; }
.eggw-btn-blau   { background: #1D4E89; }
.eggw-btn-gold   { background: var(--accent); }
.eggw-btn-slate  { background: #4A5568; }
.eggw-btn-rot    { background: var(--danger); }
.eggw-btn-amber  { background: #92600A; }

/* ── Container ── */
.eggw-container { max-width: 1240px; margin: 28px auto; padding: 0 40px; }

@media (max-width: 768px) {
  .eggw-header-inner, .eggw-nav-inner,
  .eggw-flash-wrap, .eggw-container { padding-left: 16px; padding-right: 16px; }
  .eggw-title { font-size: 1.15rem; }
}
