/* =====================================================
   HÖMMA04 – Zentrales Stylesheet
   Pfad: public_html/assets/css/style.css
   ===================================================== */

/* ---------- Design-Tokens (Dark Mode vorbereitet) ---------- */
:root {
  --blue-900: #002B7A;   /* dunkles Königsblau – Primär */
  --blue-700: #0043C4;   /* Hover, Links */
  --blue-100: #E6EDFB;   /* helle Blau-Fläche */
  --white:    #FFFFFF;
  --gray-50:  #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-400: #CED4DA;
  --gray-600: #868E96;
  --gray-700: #495057;
  --text:     #212529;
  --success:  #2B8A3E;
  --warn:     #E67700;
  --error:    #C92A2A;

  --bg:        var(--gray-50);
  --surface:   var(--white);
  --radius:    10px;
  --shadow:    0 1px 3px rgba(0, 20, 60, .08);
  --font:      system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --maxw:      1080px;
}

[data-theme="dark"] {
  --bg:      #0D1526;
  --surface: #14203A;
  --text:    #E9ECEF;
  --gray-50: #0D1526;
  --gray-100:#1B2A4A;
  --gray-200:#24345A;
  --gray-400:#3D4F78;
  --gray-600:#9AA7C4;
  --gray-700:#C3CDE4;
  --blue-100:#1B2A4A;
  --shadow:  0 1px 3px rgba(0, 0, 0, .4);
}

/* ---------- Basis ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding-bottom: 64px; /* Platz für Bottom-Nav mobil */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; color: var(--text); }
h1 { font-size: 1.7rem; margin: .5em 0; }
h2 { font-size: 1.3rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.page { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--blue-900);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  display: flex; align-items: center; gap: 24px;
  height: 60px;
}
.brand {
  color: var(--white); font-weight: 800; font-size: 1.35rem;
  letter-spacing: .5px; text-decoration: none;
}
.brand span { color: #7EA8FF; }
.brand:hover { text-decoration: none; }

.mainnav { display: none; gap: 4px; flex: 1; }
.mainnav a {
  color: rgba(255,255,255,.85); padding: 8px 14px;
  border-radius: 6px; font-weight: 500;
}
.mainnav a:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.mainnav a.active { background: rgba(255,255,255,.18); color: #fff; }

.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.userlink { color: #fff; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  border-radius: 8px; font-weight: 600; font-size: .95rem;
  padding: 10px 18px; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue-700); color: #fff; }
.btn-primary:hover { background: var(--blue-900); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { display: block; width: 100%; }

/* ---------- Karten ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card-title { margin-top: 0; }

/* ---------- Formulare ---------- */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], select, textarea {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--gray-400);
  border-radius: 8px; font-size: 1rem; font-family: inherit;
  background: var(--surface); color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue-700); outline-offset: 1px; border-color: var(--blue-700);
}
.form-hint { font-size: .85rem; color: var(--gray-600); margin-top: 4px; }

/* ---------- Meldungen ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .95rem; }
.alert-success { background: #E6F4EA; color: var(--success); }
.alert-error   { background: #FBEAEA; color: var(--error); }
.alert-info    { background: var(--blue-100); color: var(--blue-900); }
.alert-warn    { background: #FFF4E0; color: var(--warn); }

/* ---------- Footer ---------- */
.footer {
  background: var(--blue-900); color: rgba(255,255,255,.85);
  margin-top: 48px; padding: 32px 0 16px;
}
.footer-inner { display: grid; gap: 20px; }
.footer .brand-footer { font-size: 1.1rem; }
.footer p { margin: 6px 0 0; font-size: .9rem; }
.footer a { color: rgba(255,255,255,.85); }
.footer-links, .footer-social { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.footer-copy {
  margin-top: 20px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .8rem; color: rgba(255,255,255,.6);
}

/* ---------- Bottom-Nav (mobil) ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--gray-200);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: .7rem; color: var(--gray-600);
  min-width: 64px; padding: 4px 0;
}
.bottomnav a:hover { text-decoration: none; }
.bottomnav a.active { color: var(--blue-700); font-weight: 700; }
.bn-icon { font-size: 1.25rem; line-height: 1; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--gray-600); }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-block; background: var(--blue-100); color: var(--blue-900);
  border-radius: 99px; padding: 2px 10px; font-size: .8rem; font-weight: 600;
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .mainnav { display: flex; }
  h1 { font-size: 2rem; }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; align-items: start; }
  .footer-links, .footer-social { flex-direction: column; align-items: flex-start; gap: 8px; }
}