:root {
  --primary: #2d6a4f;
  --primary-light: #40916c;
  --primary-lighter: #74c69d;
  --primary-bg: #d8f3dc;
  --accent: #f4a261;
  --text-dark: #1b1b1b;
  --text-muted: #6c757d;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background-color: #f8fffe;
}

/* Translucent overlay for content sections over body background */
.container {
  position: relative;
}

.navbar-brand { font-weight: 700; font-size: 1.5rem; color: white !important; }
.navbar { background: var(--primary) !important; }
.navbar-nav .nav-link { color: rgba(255,255,255,0.9) !important; }
.navbar-nav .nav-link:hover { color: white !important; }
.header-account-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.header-account-avatar {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.header-account-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.header-account-avatar-icon {
  color: white;
  font-size: 1rem;
  line-height: 1;
}
.navbar-toggler { border-color: rgba(255,255,255,0.5); }
.navbar-toggler-icon { filter: invert(1); }
.site-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: inline-block;
}
.site-logo-sm {
  width: 28px;
  height: 28px;
}
.profile-image-frame {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary-bg);
  border: 3px solid rgba(45, 106, 79, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-image-placeholder {
  color: var(--primary);
  font-size: 3.2rem;
  line-height: 1;
}

.hero {
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
              url('/images/REH%201.jfif') center / cover no-repeat;
  color: white;
  padding: 80px 0;
  text-align: center;
}
.hero h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 1rem; text-shadow: 1px 2px 6px rgba(0,0,0,0.6); }
.hero p { font-size: 1.2rem; opacity: 0.95; margin-bottom: 2rem; text-shadow: 1px 1px 4px rgba(0,0,0,0.5); }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: none;
  filter: brightness(0.95);
}
.auth-body :is(.btn-primary, .btn-outline-primary, .btn-outline-secondary),
.admin-content :is(.btn-primary, .btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary),
.admin-modal :is(.btn-primary, .btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary) {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: none;
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
.auth-body :is(.btn-primary, .btn-outline-primary, .btn-outline-secondary):is(:hover, :focus, :active, .active),
.admin-content :is(.btn-primary, .btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary):is(:hover, :focus, :active, .active),
.admin-modal :is(.btn-primary, .btn-secondary, .btn-light, .btn-outline-primary, .btn-outline-secondary):is(:hover, :focus, :active, .active) {
  filter: brightness(0.95);
}
.btn-light {
  color: var(--primary);
  font-weight: 600;
}
.btn-light:hover {
  color: var(--primary);
}

.card { border: none; box-shadow: 0 2px 15px rgba(0,0,0,0.08); border-radius: 12px; background: rgba(255,255,255,0.97); }
.card-header { background: var(--primary); color: white; border-radius: 12px 12px 0 0 !important; font-weight: 600; }
.card-header .btn-close { filter: invert(1); }

.feature-card { text-align: center; padding: 2rem; }
.feature-icon { font-size: 3rem; color: var(--primary); margin-bottom: 1rem; }

.status-badge { font-size: 0.85rem; padding: 4px 12px; border-radius: 20px; font-weight: 600; display: inline-block; }
.status-aktiv { background: #d4edda; color: #155724; }
.status-erlegt { background: #f8d7da; color: #721c24; }
.status-verendet { background: #fff3cd; color: #856404; }
.status-wildunfall { background: #fde8d8; color: #7a3d0d; }
.status-gesichtet { background: #cce5ff; color: #004085; }

footer { background: var(--primary); color: rgba(255,255,255,0.9); padding: 2rem 0; margin-top: 4rem; }
footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
footer a:hover { color: white; }

/* Content background for pages without hero */
.page-content-bg {
  background: rgba(255,255,255,0.88);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ohrmarke-preview { display: inline-block; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.2); margin-right: 8px; vertical-align: middle; }

.section-title { color: var(--primary); font-weight: 700; margin-bottom: 1.5rem; }
.required-star { color: #dc3545; }
.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #eef8f0 0%, #f8fffe 100%);
}
.access-guard {
  border-radius: 16px;
}
.marking-preview-box {
  background: rgba(45, 106, 79, 0.08);
  border: 1px solid rgba(45, 106, 79, 0.18);
  border-radius: 14px;
  padding: 1rem 1.25rem;
}
.marking-summary {
  color: var(--primary);
}
.support-row {
  margin-bottom: 0.75rem;
}
.banner-thumb {
  height: 180px;
  object-fit: cover;
  object-position: center;
}

.alert-info { background: var(--primary-bg); border-color: var(--primary-lighter); color: var(--primary); }

/* Admin sidebar */
.admin-sidebar {
  min-height: 100vh;
  background: var(--primary);
  color: white;
  padding: 0;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.85) !important;
  padding: 12px 20px;
  border-radius: 0;
  transition: background 0.2s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(255,255,255,0.15) !important;
  color: white !important;
}
.admin-sidebar .nav-link i { margin-right: 8px; }
.admin-brand { padding: 20px; font-size: 1.2rem; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.2); }
.admin-content { padding: 30px; background: #f8fffe; min-height: 100vh; }
/* Stats cards */
.stat-card { text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-muted); font-size: 0.9rem; }

/* Table */
.table-responsive { border-radius: 8px; overflow: hidden; }
.table thead th { background: var(--primary); color: white; border: none; }
.table tbody tr:hover { background: var(--primary-bg); }

/* QR code display */
.qr-container { text-align: center; padding: 20px; background: white; border-radius: 12px; box-shadow: 0 2px 15px rgba(0,0,0,0.1); display: inline-block; }

/* Form styling */
.form-control:focus, .form-select:focus {
  border-color: var(--primary-lighter);
  box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.25);
}
.form-label { font-weight: 500; }

/* Success number display */
.success-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 15px 30px;
  border-radius: 12px;
  display: inline-block;
  letter-spacing: 2px;
}

/* Timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--primary-lighter); }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before { content: ''; position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid white; box-shadow: 0 0 0 2px var(--primary); }

@media (max-width: 768px) {
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero { padding: 50px 0; }
  .hero .btn { display: block; width: 100%; margin: 0.4rem 0 !important; font-size: 1rem; padding: 0.75rem 1rem; }
  .admin-sidebar { min-height: auto; }

  /* Touch-friendly buttons & inputs */
  .btn { min-height: 44px; }
  .form-control, .form-select { min-height: 44px; font-size: 16px; /* 16px prevents iOS Safari from zooming on input focus */ }

  /* Cards */
  .card { margin-bottom: 1rem; }
  .feature-card { padding: 1.25rem; }

  /* Section spacing */
  .my-5 { margin-top: 2rem !important; margin-bottom: 2rem !important; }

  /* Footer columns stack */
  footer .col-md-4 { margin-bottom: 1rem; }

  /* Stats */
  .stat-number { font-size: 1.8rem; }

  /* Admin */
  .admin-content { padding: 15px; }
  .admin-brand { font-size: 1rem; }

  /* Tables on mobile */
  .table { font-size: 0.85rem; }

}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .hero { padding: 40px 0; }
  .section-title { font-size: 1.3rem; }
  .success-number { font-size: 1.5rem; padding: 10px 20px; }
}
