/* ============================================================
   Google Fonts – Open Sans (wie Peterhoff-Gruppe)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

/* ============================================================
   Global reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  color: #313131;
  line-height: 1.65;
  min-height: 100vh;
}

a { text-decoration: none; color: #dc3545; }
a:hover { text-decoration: underline; }
code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.875em;
  background: #f0f0f0;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ============================================================
   ─── PUBLIC: Login page ────────────────────────────────────
   ============================================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 144px;
  justify-content: center;
  padding: 40px 20px;
}

/* Header mit Logo oben links */
.login-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 32px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  height: 124px;
  display: flex;
  align-items: center;
}
.login-header img {
  height: 96px;
  width: auto;
  display: block;
}

/* Card */
.card {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08), 0 8px 32px rgba(0,0,0,.06);
  padding: 40px 44px;
  width: 100%;
  max-width: 420px;
  border-top: 3px solid #dc3545;
}

.card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #313131;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.subtitle {
  color: #777;
  font-size: 0.875rem;
  margin-bottom: 28px;
  font-weight: 400;
}

/* Form fields */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d8d8d8;
  border-radius: 3px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #313131;
  background: #fff;
  transition: border-color .15s;
  outline: none;
}
.field input:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220,53,69,.1);
}
.field input::placeholder { color: #b0b0b0; font-weight: 300; }

/* Password toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px; }
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  padding: 0;
  display: flex;
  align-items: center;
}
.pw-toggle:hover { color: #dc3545; }

/* Checkbox + link row */
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 0.8rem;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #555;
  cursor: pointer;
  font-weight: 400;
}
.checkbox-label input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: #dc3545;
  cursor: pointer;
}
.small-link { color: #dc3545; font-size: 0.8rem; }
.small-link:hover { text-decoration: underline; }

/* Primary button */
.btn-primary {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 3px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.btn-primary:hover { filter: brightness(.88); }

.forgot-link {
  display: block;
  text-align: center;
  font-size: 0.8125rem;
  color: #888;
}
.forgot-link:hover { color: #dc3545; text-decoration: underline; }

/* Spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
footer {
  margin-top: 28px;
  text-align: center;
  color: #333;
  font-size: 0.775rem;
  font-weight: 400;
  background: rgba(255,255,255,0.75);
  padding: 10px 20px;
  border-radius: 3px;
}
footer a { color: #333; }
footer a:hover { color: #dc3545; text-decoration: underline; }

/* Divider line between logo & card */
.login-wrapper::before {
  display: none;
}

/* ============================================================
   ─── PUBLIC: Awareness page ────────────────────────────────
   ============================================================ */
.awareness-wrapper {
  max-width: 940px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* Alert banner */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: #fff5f5;
  border: 1.5px solid #f5c6cb;
  border-left: 5px solid #dc3545;
  border-radius: 4px;
  padding: 24px 28px;
  margin-bottom: 32px;
}
.alert-icon {
  font-size: 2.4rem;
  line-height: 1;
  color: #dc3545;
  flex-shrink: 0;
}
.alert-body h2 {
  font-size: 1.25rem;
  color: #a71d2a;
  margin-bottom: 8px;
  font-weight: 700;
}
.alert-body p { color: #721c24; font-weight: 400; }

/* Awareness grid */
.awareness-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) { .awareness-grid { grid-template-columns: 1fr; } }

.aw-card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 28px;
  border-top: 3px solid #e8e8e8;
}
.aw-main {
  grid-column: 1 / -1;
  border-top-color: #dc3545;
}
.aw-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: #313131;
}
.aw-card p { color: #555; margin-bottom: 10px; font-weight: 400; }

.tip-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.tip-list li { display: flex; gap: 12px; align-items: flex-start; }
.tip-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }
.tip-list strong { color: #313131; }

.step-list { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.step-list li { color: #555; }

.aw-cta { background: #fff8f8; border-top-color: #dc3545; }
.btn-secondary {
  display: inline-block;
  margin-top: 12px;
  padding: 9px 20px;
  background: #dc3545;
  color: #fff;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  transition: filter .15s;
}
.btn-secondary:hover { filter: brightness(.88); text-decoration: none; }

/* ============================================================
   ─── ADMIN: General layout ─────────────────────────────────
   ============================================================ */
.admin-body { display: flex; min-height: 100vh; background: #f4f4f4; }

/* Sidebar */
.admin-nav {
  width: 230px;
  flex-shrink: 0;
  background: #23282d;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: .01em;
}
.nav-links {
  list-style: none;
  padding: 12px 10px;
  flex: 1;
}
.nav-links li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: #aaa;
  border-radius: 3px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-links li a:hover,
.nav-links li a.active {
  background: rgba(220,53,69,.15);
  color: #fff;
  text-decoration: none;
}
.nav-links li a.active { color: #f5a0a8; }
.nav-footer {
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.nav-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: #aaa;
  border-radius: 3px;
  font-size: 0.875rem;
  transition: background .15s, color .15s;
}
.nav-logout:hover {
  background: rgba(220,53,69,.15);
  color: #f5a0a8;
  text-decoration: none;
}

/* Main content */
.admin-main {
  margin-left: 230px;
  flex: 1;
  padding: 32px;
  max-width: 1200px;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #313131;
  letter-spacing: -0.01em;
}
.badge-live { color: #28a745; font-size: 0.8rem; font-weight: 600; }

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid #dc3545;
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-blue   { background: #fff0f1; color: #dc3545; }
.stat-orange { background: #fff0f1; color: #dc3545; }
.stat-green  { background: #f0fdf4; color: #28a745; }
.stat-purple { background: #fff0f1; color: #dc3545; }
.stat-icon svg { stroke: currentColor; }
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: #313131; line-height: 1; }
.stat-small { font-size: 0.875rem; font-weight: 600; }
.stat-label { font-size: 0.775rem; color: #888; margin-top: 4px; font-weight: 400; text-transform: uppercase; letter-spacing: .03em; }

/* Card block */
.card-block {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 24px;
  margin-bottom: 24px;
}
.card-block h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: #313131;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px solid #dc3545;
  padding-bottom: 10px;
  display: inline-block;
}
.card-highlight { border: 2px solid #ffc107; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h3 { margin-bottom: 0; }

/* Bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 120px;
  padding-top: 24px;
}
.bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 4px; }
.bar-label-top { font-size: 0.72rem; font-weight: 700; color: #313131; }
.bar { width: 100%; background: #dc3545; border-radius: 2px 2px 0 0; min-height: 4px; transition: height .3s; }
.bar-label-bot { font-size: 0.68rem; color: #999; font-weight: 400; }

/* Tables */
.table-scroll { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table th {
  text-align: left;
  padding: 9px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #777;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid #e8e8e8;
  white-space: nowrap;
  background: #fafafa;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
  vertical-align: top;
}
.data-table tbody tr:hover { background: #fef8f8; }
.muted { color: #bbb !important; }
.nowrap { white-space: nowrap; }
.ua-cell { max-width: 220px; word-break: break-all; }
.result-count { color: #888; font-size: 0.875rem; margin-bottom: 14px; }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.filter-field { display: flex; flex-direction: column; gap: 5px; }
.filter-field label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filter-field input,
.filter-field select {
  padding: 7px 12px;
  border: 1.5px solid #d8d8d8;
  border-radius: 3px;
  font-size: 0.875rem;
  font-family: inherit;
  color: #313131;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.filter-field input:focus,
.filter-field select:focus { border-color: #dc3545; }

.btn-filter {
  padding: 8px 18px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  cursor: pointer;
  align-self: flex-end;
  transition: filter .15s;
}
.btn-filter:hover { filter: brightness(.88); }

.btn-ghost {
  padding: 7px 14px;
  background: transparent;
  color: #888;
  border: 1.5px solid #d8d8d8;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  align-self: flex-end;
  transition: background .15s;
  display: inline-block;
}
.btn-ghost:hover {
  background: #f5f5f5;
  text-decoration: none;
  color: #444;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #28a745;
  color: #fff;
  border-radius: 3px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  transition: filter .15s;
}
.btn-export:hover { filter: brightness(.88); text-decoration: none; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid #d8d8d8;
  border-radius: 3px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #313131;
  outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: #dc3545; }
.field input::placeholder { color: #bbb; }

.field.dark label { color: #94a3b8; }
.field.dark input {
  background: #2d3748;
  border-color: #4a5568;
  color: #f7fafc;
}
.field.dark input:focus { border-color: #dc3545; }
.field.dark input::placeholder { color: #64748b; }

.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.color-pick-wrap { display: flex; gap: 8px; align-items: center; }
.color-pick-wrap input[type="color"] {
  width: 44px; height: 36px;
  border: 1.5px solid #d8d8d8;
  border-radius: 3px;
  cursor: pointer;
  padding: 2px;
  background: #fff;
}
.hex-input {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid #d8d8d8;
  border-radius: 3px;
  font-size: 0.875rem;
  font-family: monospace;
  color: #313131;
  outline: none;
}
.hex-input:focus { border-color: #dc3545; }

.preview-box {
  border: 1.5px dashed #d8d8d8;
  border-radius: 3px;
  padding: 18px;
  text-align: center;
  margin-bottom: 18px;
  margin-top: 14px;
  background: #fafafa;
}

.btn-save {
  padding: 9px 22px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  cursor: pointer;
  transition: filter .15s;
}
.btn-save:hover { filter: brightness(.88); }

/* File drop */
.file-drop {
  border: 2px dashed #d8d8d8;
  border-radius: 4px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.file-drop input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.file-drop:hover, .file-drop.drag-over {
  border-color: #dc3545;
  background: #fff8f8;
}
.file-drop-inner svg { display: block; margin: 0 auto 10px; }
.file-drop-inner p { color: #888; font-size: 0.875rem; }
.file-link { color: #dc3545; cursor: pointer; text-decoration: underline; }
.current-logo { margin-bottom: 18px; }
.current-logo img { max-height: 60px; display: block; margin-bottom: 6px; }

.pw-match-hint { display: block; font-size: 0.8rem; margin-top: 5px; }
.match-ok   { color: #28a745; }
.match-fail { color: #dc3545; }
.warn-text  { color: #856404; font-size: 0.875rem; margin-bottom: 14px; }

/* Flash messages */
.flash {
  border-radius: 3px;
  padding: 11px 16px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}
.flash-success { background: #f0fff4; border: 1.5px solid #9be9a8; color: #155724; }
.flash-error   { background: #fff5f5; border: 1.5px solid #f5c6cb; color: #721c24; }

.alert-notice {
  background: #fff8e1;
  border: 1.5px solid #ffd54f;
  border-radius: 3px;
  padding: 12px 18px;
  font-size: 0.875rem;
  color: #6d4c00;
  margin-bottom: 24px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #bbb;
  font-style: italic;
}

/* ── Admin login page ── */
.admin-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #23282d;
}
.admin-login-card {
  background: #2c3338;
  border-radius: 4px;
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  border-top: 3px solid #dc3545;
}
.admin-login-header {
  text-align: center;
  margin-bottom: 32px;
}
.admin-login-header svg { display: block; margin: 0 auto 14px; }
.admin-login-header h1 {
  color: #f9fafb;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: .01em;
}
.admin-login-header p { color: #64748b; font-size: 0.875rem; }

.btn-admin-login {
  width: 100%;
  padding: 11px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  margin-top: 8px;
  transition: filter .15s;
}
.btn-admin-login:hover { filter: brightness(.88); }

.admin-alert {
  background: rgba(220,53,69,.15);
  border: 1px solid rgba(220,53,69,.3);
  color: #f5a0a8;
  border-radius: 3px;
  padding: 10px 14px;
  font-size: 0.875rem;
  margin-bottom: 20px;
}

/* ============================================================
   ─── Modal: Passwort vergessen ─────────────────────────────
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-card {
  background: #fff;
  border-radius: 4px;
  border-top: 3px solid #dc3545;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  padding: 36px 40px;
  width: 100%;
  max-width: 400px;
  position: relative;
  animation: modalIn .18s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}
.modal-close:hover { color: #dc3545; }
.modal-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #313131;
  margin-bottom: 8px;
}
.modal-sub {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 22px;
  line-height: 1.5;
}
