/* ============================================
   Stadtwerke Lindenbruch – Premium RP Portal
   ============================================ */

:root {
  --primary: #0b3d4f;
  --primary-dark: #062833;
  --primary-light: #0e5a73;
  --accent: #2a9d8f;
  --accent-bright: #3ecfbe;
  --green: #2d8a4e;
  --warning: #e76f51;
  --danger: #e63946;
  --text: #0f1c22;
  --text-muted: #5a6d76;
  --bg: #eef3f6;
  --white: #ffffff;
  --card: #ffffff;
  --shadow: 0 10px 40px rgba(6, 40, 51, 0.12);
  --shadow-lg: 0 20px 60px rgba(6, 40, 51, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

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

/* ========== HEADER ========== */
.header {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: white;
  font-size: 0.82rem;
  padding: 8px 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.emergency {
  background: var(--warning);
  padding: 3px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.3px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  gap: 16px;
}

.logo {
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.logo-text {
  display: none; /* Logo-Bild enthält bereits den Schriftzug */
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  background: #e8f0f3;
  color: var(--primary);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 15px rgba(11, 61, 79, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(11, 61, 79, 0.4);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  color: white;
  box-shadow: 0 4px 15px rgba(42, 157, 143, 0.3);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(42, 157, 143, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 8px 14px; font-size: 0.84rem; }
.btn-block { width: 100%; }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #062833 0%, #0b3d4f 40%, #0e5a73 100%);
  overflow: hidden;
  color: white;
}

.hero-bg { display: none; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #062833 0%, #0b3d4f 45%, #0e5a73 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ========== MAIN ========== */
main { flex: 1; padding: 50px 0 70px; }

.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 8px;
}
.section-title p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid rgba(0,0,0,0.03);
}

.card-title {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========== CHOICE CARDS ========== */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: -70px;
  position: relative;
  z-index: 5;
}

.choice-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  border: 2px solid transparent;
}
.choice-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 25px 50px rgba(42, 157, 143, 0.15);
}
.choice-card .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, #e8f5f3, #d0ebe7);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.choice-card h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 700;
}
.choice-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
  line-height: 1.55;
}

/* ========== REAL METER DISPLAY ========== */
.meters-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 28px;
}

.meter-unit {
  background: linear-gradient(160deg, #1a2a32 0%, #0f1c22 100%);
  border-radius: 18px;
  padding: 24px 18px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 15px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.meter-unit::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.meter-unit.strom::before { background: linear-gradient(90deg, #f4a261, #e9c46a); }
.meter-unit.gas::before { background: linear-gradient(90deg, #e76f51, #f4a261); }
.meter-unit.wasser::before { background: linear-gradient(90deg, #2a9d8f, #3ecfbe); }

.meter-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.meter-face {
  background: #0a1216;
  border-radius: 12px;
  padding: 18px 12px;
  margin-bottom: 14px;
  position: relative;
  border: 2px solid #1e2e36;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.6);
}

.meter-digits {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 2.1rem;
  font-weight: 700;
  color: #3ecfbe;
  letter-spacing: 3px;
  text-shadow: 0 0 12px rgba(62, 207, 190, 0.5);
  background: linear-gradient(180deg, #0d1a1f 0%, #061012 100%);
  padding: 10px 8px;
  border-radius: 6px;
  border: 1px solid #1a2e34;
  display: inline-block;
  min-width: 150px;
}

.meter-unit.strom .meter-digits { color: #e9c46a; text-shadow: 0 0 12px rgba(233, 196, 106, 0.5); }
.meter-unit.gas .meter-digits { color: #f4a261; text-shadow: 0 0 12px rgba(244, 162, 97, 0.5); }
.meter-unit.wasser .meter-digits { color: #3ecfbe; text-shadow: 0 0 12px rgba(62, 207, 190, 0.5); }

.meter-unit-label {
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
  margin-top: 6px;
  letter-spacing: 1px;
}

.meter-footer {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
}

/* Customer info bar */
.customer-bar {
  background: linear-gradient(90deg, #f0f7f6, #e8f3f1);
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid #d0e8e4;
  margin-bottom: 8px;
}

.customer-bar strong { color: var(--primary); }

/* ========== FLEET GALLERY ========== */
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(6,40,51,0.9));
  color: white;
  padding: 30px 16px 14px;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ========== FORMS ========== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #d0dce3;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: #f7fafb;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.15);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ========== ALERTS ========== */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success {
  background: #d8f3ef;
  color: #0d6e5f;
  border: 1px solid #a8e0d5;
}
.alert-error {
  background: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #f5c2c2;
}
.alert-info {
  background: #e8f4f8;
  color: #0a4d68;
  border: 1px solid #b8d9e6;
}

/* ========== TABLE ========== */
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #e4ebf0;
}
th {
  background: #f0f5f7;
  color: var(--primary);
  font-weight: 700;
  white-space: nowrap;
}
tr:hover { background: #f7fbfc; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ========== FOOTER ========== */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 40px 0 28px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}
.footer h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--accent-bright);
}
.footer p, .footer a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.7;
}
.footer a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ========== PAGE TITLE ========== */
.page-title {
  text-align: center;
  margin-bottom: 36px;
}
.page-title h1 {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 8px;
}
.page-title p { color: var(--text-muted); }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .meters-container { grid-template-columns: 1fr; max-width: 340px; margin-left: auto; margin-right: auto; }
  .choice-grid { grid-template-columns: 1fr; margin-top: -40px; }
  .hero h1 { font-size: 2.1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .logo img { height: 42px; }
  .hero { min-height: 360px; }
  .hero h1 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .meter-digits { font-size: 1.7rem; letter-spacing: 2px; min-width: 130px; }
  .card { padding: 22px 16px; }
}