/* ==========================================================
   Mieter-/Sozial-/Kassen-Lotse – Generatoren Premium Design (2025)
   ========================================================== */

:root {
  --primary: #0070f3;
  --primary-dark: #0059c9;
  --primary-light: #e6f0ff;
  --accent: #1a5276;
  --text: #2f2f2f;
  --bg: #f8f9fb;
  --white: #fff;
  --border: #e0e6ed;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --transition: all 0.25s ease;
}

/* --- Grundlayout --- */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.8;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  font-size: 1.05rem;
}

/* --- Header --- */
.site-header {
  background-color: var(--white);
  padding: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-logo {
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.25s ease;
  letter-spacing: -0.01em;
}

.site-logo:hover {
  color: var(--primary);
}

/* --- Hauptcontainer --- */
.page-container {
  max-width: 900px;
  margin: 3rem auto;
  background: var(--white);
  padding: 3rem 2.8rem;
  border-radius: var(--radius);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.03),
    0 10px 30px rgba(0,0,0,0.08);
  transition: var(--transition);
}

.page-container:hover {
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.04),
    0 14px 40px rgba(0,0,0,0.1);
}

/* --- Überschriften --- */
h1 {
  font-size: 2.4rem;
  margin-bottom: 2rem;
  line-height: 1.3;
  text-align: center;
  font-weight: 700;
  background: linear-gradient(90deg, #004e92, #0070f3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.015em;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-weight: 600;
  border-left: 4px solid var(--primary);
  padding-left: 0.8rem;
}

/* --- Fieldsets --- */
fieldset {
  border: 1px solid #e4e8ec;
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  transition: var(--transition);
  background-color: #fcfdff;
}

fieldset:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

legend {
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--accent);
  padding: 0 0.6em;
}

/* --- Labels & Inputs --- */
label {
  display: block;
  margin-top: 1.2rem;
  font-weight: 500;
  color: #444;
}

label small {
  display: block;
  font-weight: normal;
  font-size: 0.85em;
  color: #666;
  margin-top: 0.2rem;
}

input[type="text"],
input[type="date"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-top: 0.4rem;
  border: 1px solid #cfd6de;
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text);
  background-color: #fff;
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

/* --- Checkboxgruppen --- */
.checkbox-group {
  margin-top: 1.2rem;
}

.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  margin-top: 0.4rem;
  color: #333;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  accent-color: var(--primary);
}

/* --- Subdetails (ausklappbare Felder) --- */
.sub-details {
  display: none;
  margin-left: 1.3rem;
  border-left: 3px solid #e5eaf0;
  padding-left: 1.2rem;
  margin-top: 0.8rem;
  margin-bottom: 1rem;
  background: #fdfefe;
  border-radius: 6px;
}

/* --- Info-/Warnboxen --- */
.info-box,
.warning-box {
  font-size: 0.96rem;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.8rem 0;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.info-box {
  background-color: #eef9ff;
  border-left: 6px solid var(--primary);
}

.warning-box {
  background-color: #fff9e6;
  border-left: 6px solid #f0ad4e;
}

/* --- Button-Gruppe --- */
.button-group {
  margin-top: 2.8rem;
  padding-top: 1.8rem;
  border-top: 1px solid #eee;
  text-align: center;
}

button {
  padding: 12px 26px;
  font-size: 1.05rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.15s ease, box-shadow 0.2s ease;
  margin: 0.5rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* --- Buttons --- */
.button-primary {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 112, 243, 0.25);
}

.button-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #0070f3, #00c6ff);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.button-primary:hover::before {
  opacity: 1;
}

.button-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 112, 243, 0.3);
}

.button-secondary {
  background-color: #7f8c8d;
  color: #fff;
}

.button-secondary:hover {
  background-color: #626f70;
}

.button-danger {
  background-color: #d9534f;
  color: #fff;
}

.button-danger:hover {
  background-color: #c9302c;
}

/* Nur der PDF-Erstellen-Button wird überschrieben */
#createPdfBtn {
  background-color: var(--primary) !important;
  color: #fff !important;
  border: none !important;
}

#createPdfBtn:hover {
  background-color: var(--primary-dark) !important;
  box-shadow: 0 6px 15px rgba(0, 112, 243, 0.3) !important;
  transform: translateY(-2px);
}

.popup-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); z-index: 1000; justify-content: center; align-items: center; padding: 1rem; box-sizing: border-box;}
    .popup-content { background: white; padding: 2rem; border-radius: 10px; max-width: 450px; width: 100%; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.25);}
    .popup-content h2 { font-size: 1.5em; margin-top: 0; margin-bottom: 1rem; color: #333; border-bottom: none; padding-bottom: 0;}
    .popup-content p { margin-bottom: 1.5rem; color: #444; }
    .popup-content form { margin-top: 1rem; }
    .popup-content input[type="submit"] { background:#ffc439; border:none; padding:0.9rem 1.8rem; font-weight:bold; border-radius:5px; cursor: pointer; color: #333; font-size: 1em;}
    .popup-content input[type="submit"]:hover { background-color: #f0b429; }
    .popup-close-button { margin-top: 1.5rem; background: none; border: 1px solid #ccc; color: #555; font-weight: normal; cursor: pointer; padding: 0.6rem 1.2rem; border-radius: 5px; font-size: 0.9em;}
    .popup-close-button:hover { background-color: #f0f0f0; }

/* --- Footer --- */
footer {
  text-align: center;
  padding: 2.5rem 0;
  margin-top: 3rem;
  font-size: 0.95rem;
  color: #555;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.25s ease;
}

footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}


/* --- Textumbruch für lange Wörter auf kleinen Displays --- */
h1, h2, h3, p, li, td, th {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* --- Responsiv --- */
@media (max-width: 700px) {
  .page-container {
    margin: 1rem;
    padding: 1.6rem;
  }

  h1 {
    font-size: 1.9rem;
  }

  legend {
    font-size: 1.15rem;
  }

  button {
    width: 100%;
    margin: 0.6rem 0;
  }
}

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e6ebf1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.03);
  padding: 1.2rem 1rem;
  text-align: center;
  position: relative;
  z-index: 10;
}

/* dezente Glanzlinie am oberen Rand */
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #004e92, #0070f3);
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

/* Schriftzug / Logo */
.site-logo {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a5276;
  text-decoration: none;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #004e92, #0070f3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.25s ease;
}

/* Hover-Effekt: heller Farbverlauf + leichtes Anheben */
.site-logo:hover {
  transform: translateY(-1px);
  background: linear-gradient(90deg, #0054a6, #339af0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 6px rgba(0, 112, 243, 0.15);
}

/* Optional: leichtes Unterstatement beim Scrollen (keine JS nötig) */
@supports (position: sticky) {
  .site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(6px);
  }
}

/* Mobile Anpassung */
@media (max-width: 700px) {
  .site-header {
    padding: 1.2rem 1rem;
  }
  .site-logo {
    font-size: 1.7rem;
  }
}


