*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0f1117;
  --surface:  #161b27;
  --surface2: #1e2535;
  --border:   #2d3748;
  --border2:  #3d4f63;
  --text:     #e2e8f0;
  --muted:    #718096;
  --dim:      #4a5568;
  --blue:     #3b82f6;
  --blue-bg:  #1e3a5f;
  --green:    #10b981;
  --green-bg: #064e3b;
  --red:      #ef4444;
  --red-bg:   #450a0a;
  --yellow:   #f59e0b;
  --sidebar-w: 200px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════ */
.login-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}
.login-wrap { width: 100%; max-width: 380px; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.25rem 2rem;
}
.login-header { margin-bottom: 1.75rem; }
.login-logo {
  font-size: 1.5rem; font-weight: 700; letter-spacing: -.4px;
  color: var(--text); margin-bottom: .3rem;
}
.login-logo em { color: var(--blue); font-style: normal; }
.login-sub { font-size: .82rem; color: var(--muted); }
.login-form { display: flex; flex-direction: column; gap: 1.1rem; }
.alert-error {
  background: var(--red-bg); border: 1px solid rgba(239,68,68,.35);
  color: #fca5a5; border-radius: 8px; padding: .65rem .9rem;
  font-size: .83rem; margin-bottom: 1rem;
}
.btn-login {
  width: 100%; background: var(--blue); color: #fff;
  border: none; border-radius: 8px; padding: .7rem;
  font-size: .9rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: opacity .15s;
}
.btn-login:hover { opacity: .88; }

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.layout {
  display: flex; min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 40;
}
.sidebar-logo {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.logo-text {
  font-size: 1.1rem; font-weight: 700; letter-spacing: -.3px; color: var(--text);
}
.logo-text em { color: var(--blue); font-style: normal; }

.sidebar-nav {
  flex: 1; padding: .75rem .65rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.nav-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .75rem; border-radius: 7px;
  color: var(--muted); text-decoration: none;
  font-size: .85rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item:hover  { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--surface2); color: var(--text); }
.nav-item.active svg { color: var(--blue); }

.sidebar-footer {
  height: 56px;
  padding: 0 1rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue-bg); border: 1px solid rgba(59,130,246,.3);
  color: var(--blue); font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-name { font-size: .82rem; color: var(--muted); truncate; overflow: hidden; white-space: nowrap; }
.btn-logout {
  color: var(--dim); padding: .3rem; border-radius: 5px;
  transition: color .15s; display: flex; align-items: center;
}
.btn-logout:hover { color: var(--red); }

/* Content */
.content {
  display: flex; flex-direction: column;
  margin-left: var(--sidebar-w);
  flex: 1; min-height: 100vh;
}
.content-inner {
  flex: 1;
  width: 100%; max-width: 1100px;
  margin-left: auto; margin-right: auto;
  padding: 2rem 2rem 2rem;
  display: flex; flex-direction: column;
}
.center-wrap {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 100%;
}
.center-wrap > * { width: 100%; max-width: 620px; }

/* ═══════════════════════════════════════════
   COMMON COMPONENTS
═══════════════════════════════════════════ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem; gap: 1rem;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.35rem; font-weight: 700; letter-spacing: -.3px;
  display: flex; align-items: center; gap: .65rem;
}
.page-sub { font-size: .85rem; color: var(--muted); margin-top: .2rem; }

.section-header {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.75rem 0 1rem;
}
.section-header h2 {
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--dim); white-space: nowrap;
}
.section-header::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--blue); color: #fff;
  border: none; border-radius: 7px; padding: .55rem 1rem;
  font-size: .84rem; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none; transition: opacity .15s;
}
.btn-primary:hover { opacity: .87; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); border-radius: 7px; padding: .5rem .9rem;
  font-size: .83rem; font-weight: 500; font-family: inherit;
  cursor: pointer; text-decoration: none; transition: border-color .15s;
}
.btn-secondary:hover { border-color: var(--border2); }

.btn-danger {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--red);
  border: 1px solid rgba(239,68,68,.35); border-radius: 7px; padding: .5rem .9rem;
  font-size: .83rem; font-weight: 500; font-family: inherit;
  cursor: pointer; transition: background .15s;
}
.btn-danger:hover { background: var(--red-bg); }

.btn-table {
  font-size: .78rem; color: var(--muted); text-decoration: none;
  padding: .25rem .6rem; border: 1px solid var(--border); border-radius: 5px;
  transition: color .15s, border-color .15s;
}
.btn-table:hover { color: var(--text); border-color: var(--border2); }

.header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Fields */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .83rem; font-weight: 500; color: var(--muted); }
.field input, .field select {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: 7px; padding: .6rem .85rem;
  font-size: .88rem; font-family: inherit;
  transition: border-color .15s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--blue);
}
.field input::placeholder { color: var(--dim); }
.required { color: var(--red); }
.field-hint { font-size: .75rem; color: var(--dim); font-weight: 400; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.slug-input-wrap { display: flex; align-items: center; gap: 0; }
.slug-prefix {
  background: var(--surface); border: 1px solid var(--border); border-right: none;
  border-radius: 7px 0 0 7px; padding: .6rem .75rem; color: var(--dim);
  font-size: .85rem; font-family: 'JetBrains Mono', monospace; white-space: nowrap;
}
.slug-input-wrap input { border-radius: 0 7px 7px 0; flex: 1; }

.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.75rem;
  max-width: 620px; margin: 0 auto;
}
.form-body { display: flex; flex-direction: column; gap: 1.1rem; }
.form-actions { display: flex; gap: .65rem; padding-top: .5rem; }

/* Badges */
.badge-active {
  font-size: .7rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  padding: .15rem .5rem; border-radius: 5px;
  background: var(--green-bg); color: var(--green); border: 1px solid rgba(16,185,129,.3);
}
.badge-inactive {
  font-size: .7rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  padding: .15rem .5rem; border-radius: 5px;
  background: var(--surface2); color: var(--dim); border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  margin-bottom: 1.75rem;
}
.stat-card {
  background: var(--surface); padding: 1.25rem 1.5rem;
}
.stat-label { font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .35rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--text); }

/* Map */
.map-wrap {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; margin-bottom: 1.75rem; position: relative;
}
.map-wrap-sm #detail-map { height: 300px; }
#map { height: 380px; }
#detail-map { height: 300px; }
.map-legend {
  position: absolute; bottom: 10px; right: 10px; z-index: 1000;
  background: rgba(15,17,23,.85); border: 1px solid var(--border);
  border-radius: 6px; padding: .35rem .7rem;
  font-size: .73rem; color: var(--muted);
  display: flex; align-items: center; gap: .75rem;
}
.legend-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50; margin-right: .3rem;
}
.legend-dot.recent { background: var(--blue); box-shadow: 0 0 5px var(--blue); }
.legend-dot.older  { background: var(--dim); }

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
  background: var(--surface2) !important;
  border: 1px solid var(--border2) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.5) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: .8rem !important;
  padding: .1rem !important;
}
.leaflet-popup-tip { background: var(--surface2) !important; }
.map-popup { padding: .2rem .1rem; line-height: 1.6; }
.map-popup strong { color: var(--text); font-family: 'JetBrains Mono', monospace; }
.popup-slug { color: var(--blue); font-family: 'JetBrains Mono', monospace; }
.popup-time { color: var(--dim); font-size: .75rem; }
.leaflet-popup-close-button { color: var(--muted) !important; }

/* Pulsing dot marker */
.pulse-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--c, #3b82f6);
  box-shadow: 0 0 0 0 var(--c, #3b82f6);
  animation: pulse-ring 2.5s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--c, #3b82f6) 70%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in srgb, var(--c, #3b82f6) 0%,  transparent); }
  100% { box-shadow: 0 0 0 0   color-mix(in srgb, var(--c, #3b82f6) 0%,  transparent); }
}

/* Bottom grid */
.bottom-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem;
}
@media (max-width: 768px) { .bottom-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.25rem;
}
.panel-header {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--dim); margin-bottom: 1rem;
}

/* Bar chart */
.bar-chart {
  display: flex; align-items: flex-end; gap: .35rem; height: 100px;
}
.bar-col {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem;
}
.bar-value { font-size: .65rem; color: var(--dim); }
.bar { width: 100%; background: var(--blue); border-radius: 3px 3px 0 0; min-height: 4px; }
.bar-label { font-size: .65rem; color: var(--dim); }

/* Recent clicks */
.click-list { display: flex; flex-direction: column; gap: .4rem; max-height: 320px; overflow-y: auto; }
.click-list::-webkit-scrollbar { width: 4px; }
.click-list::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.click-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .7rem; background: var(--surface2); border-radius: 6px;
  gap: .5rem;
}
.click-meta { display: flex; flex-direction: column; min-width: 0; }
.click-ip   { font-size: .78rem; font-family: 'JetBrains Mono', monospace; color: var(--text); }
.click-loc  { font-size: .72rem; color: var(--dim); }
.click-right { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.click-slug { font-size: .72rem; color: var(--blue); font-family: 'JetBrains Mono', monospace; }
.click-time { font-size: .7rem; color: var(--dim); }

/* ═══════════════════════════════════════════
   TABLES
═══════════════════════════════════════════ */
.table-wrap {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: var(--surface); }
.data-table th {
  padding: .7rem 1rem; text-align: left;
  font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--dim);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: .7rem 1rem;
  font-size: .83rem; color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--surface2); }

.dim-cell   { color: var(--muted) !important; }
.num-cell   { font-family: 'JetBrains Mono', monospace; }
.mono-cell  { font-family: 'JetBrains Mono', monospace; font-size: .78rem !important; }

.slug-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; color: var(--blue);
}
.ip-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; color: var(--text);
}
.slug-heading { font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; color: var(--blue); }

.link-slug-cell { display: flex; align-items: center; gap: .4rem; }
.dest-link {
  color: var(--muted); text-decoration: none; font-size: .82rem;
  transition: color .15s;
}
.dest-link:hover { color: var(--text); text-decoration: underline; }

.device-badge {
  font-size: .72rem; padding: .15rem .45rem; border-radius: 4px;
  background: var(--surface2); color: var(--muted); border: 1px solid var(--border);
}
.device-mobile  { color: var(--blue);  border-color: rgba(59,130,246,.3);  background: var(--blue-bg); }
.device-desktop { color: var(--green); border-color: rgba(16,185,129,.3);  background: var(--green-bg); }
.device-tablet  { color: var(--yellow); border-color: rgba(245,158,11,.3); background: rgba(120,60,0,.3); }

/* Link detail */
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  margin-bottom: 1.5rem;
}
.detail-cell { background: var(--surface); padding: 1rem 1.25rem; }
.detail-label { font-size: .7rem; color: var(--dim); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .3rem; }
.detail-value { font-size: .95rem; font-weight: 600; }

/* Copy button */
.btn-copy-tiny {
  background: none; border: none; cursor: pointer; color: var(--dim);
  padding: .2rem; border-radius: 4px; display: flex; align-items: center;
  transition: color .15s;
}
.btn-copy-tiny:hover { color: var(--blue); }
.btn-copy-tiny.copied { color: var(--green); }

/* Empty states */
.empty-state {
  text-align: center; padding: 4rem 1rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  color: var(--muted);
}
.empty-hint { color: var(--dim); font-size: .83rem; padding: 1rem 0; }

/* ═══════════════════════════════════════════
   USER MANAGEMENT / AUTH ADDITIONS
═══════════════════════════════════════════ */

/* Sidebar user info (two-line) */
.user-info {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
}
.user-name { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-change-pw {
  font-size: .7rem; color: var(--dim); text-decoration: none;
  transition: color .15s; white-space: nowrap;
}
.user-change-pw:hover { color: var(--blue); }

/* Badges */
.badge-admin {
  font-size: .7rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  padding: .15rem .5rem; border-radius: 5px;
  background: rgba(59,130,246,.15); color: var(--blue); border: 1px solid rgba(59,130,246,.3);
}
.badge-locked {
  font-size: .7rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  padding: .15rem .5rem; border-radius: 5px;
  background: var(--red-bg); color: var(--red); border: 1px solid rgba(239,68,68,.3);
}

/* Alerts */
.alert-warning {
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35);
  color: #fcd34d; border-radius: 8px; padding: .75rem 1rem;
  font-size: .85rem; margin-bottom: 1.25rem;
}
.alert-success {
  background: var(--green-bg); border: 1px solid rgba(16,185,129,.35);
  color: #6ee7b7; border-radius: 8px; padding: .65rem .9rem;
  font-size: .83rem; margin-bottom: 1rem;
}

/* Action group in table */
.action-group {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}

/* Small button variant */
.btn-sm {
  padding: .3rem .65rem !important; font-size: .76rem !important;
}

/* Reset-password details/summary */
.reset-pw-details { position: relative; display: inline-block; }
.reset-pw-details summary {
  cursor: pointer; list-style: none;
}
.reset-pw-details summary::-webkit-details-marker { display: none; }
.reset-pw-popup {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 100;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 8px; padding: .75rem; min-width: 260px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.reset-pw-form {
  display: flex; gap: .5rem; align-items: center;
}
.reset-pw-form input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: .45rem .7rem;
  font-size: .82rem; font-family: inherit;
}
.reset-pw-form input:focus { outline: none; border-color: var(--blue); }

/* Map empty state */
.map-empty {
  display: flex; align-items: center; gap: .65rem;
  padding: 1.5rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--dim); font-size: .85rem; margin-bottom: 1.75rem;
}
.map-empty svg { flex-shrink: 0; color: var(--dim); }

/* ═══════════════════════════════════════════
   2FA / SETTINGS / TELEGRAM ADDITIONS
═══════════════════════════════════════════ */

/* 2FA badges in sidebar and table */
.user-2fa-badge {
  font-size: .62rem; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  padding: .1rem .35rem; border-radius: 4px;
  background: rgba(16,185,129,.15); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,.3);
  letter-spacing: .04em;
}
.badge-2fa-on {
  font-size: .7rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  padding: .15rem .5rem; border-radius: 5px;
  background: rgba(16,185,129,.15); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,.3);
}
.badge-2fa-off {
  font-size: .7rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  padding: .15rem .5rem; border-radius: 5px;
  background: var(--surface2); color: var(--dim);
  border: 1px solid var(--border);
}

/* Telegram notification ON/OFF badges */
.badge-notify-on {
  font-size: .65rem; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  padding: .1rem .35rem; border-radius: 4px;
  background: rgba(16,185,129,.15); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,.3); margin-left: .25rem;
}
.badge-notify-off {
  font-size: .65rem; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  padding: .1rem .35rem; border-radius: 4px;
  background: var(--surface2); color: var(--dim);
  border: 1px solid var(--border); margin-left: .25rem;
}

/* Telegram/active connected badge */
.badge-active {
  font-size: .7rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  padding: .15rem .5rem; border-radius: 5px;
  background: rgba(16,185,129,.15); color: #6ee7b7;
  border: 1px solid rgba(16,185,129,.3);
}
.badge-inactive {
  font-size: .7rem; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  padding: .15rem .5rem; border-radius: 5px;
  background: var(--surface2); color: var(--dim);
  border: 1px solid var(--border);
}

/* Settings page accordion */
.settings-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 1rem; overflow: hidden;
}
.settings-summary {
  display: flex; align-items: center; gap: .6rem;
  padding: 1rem 1.25rem; cursor: pointer;
  font-size: .92rem; font-weight: 500; color: var(--text);
  list-style: none; user-select: none;
  transition: background .15s;
}
.settings-summary::-webkit-details-marker { display: none; }
.settings-summary:hover { background: var(--surface2); }
.settings-summary svg { flex-shrink: 0; color: var(--dim); }

.settings-body {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

/* QR code frame */
.qr-frame {
  background: #161b27; border: 1px solid var(--border);
  border-radius: 10px; padding: .75rem; display: inline-flex;
}
.qr-frame img { display: block; border-radius: 6px; }

/* Register button on login page */
.btn-register {
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border2); border-radius: 8px;
  padding: .7rem 1rem; font-size: .9rem; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-register:hover { background: var(--border2); border-color: var(--blue); }

/* ═══════════════════════════════════════════
   MOBILE (≤ 767px)
═══════════════════════════════════════════ */

/* Bottom nav — versteckt auf Desktop */
.mobile-nav { display: none; }

@media (max-width: 767px) {

  /* Sidebar ausblenden */
  .sidebar { display: none; }

  /* iOS scroll fix */
  .layout { display: block; }
  .content { display: block; }

  /* Content volle Breite */
  .content { margin-left: 0; }
  .content-inner {
  flex: 1;
    padding: 1.25rem 1rem 6rem;
  }

  /* Bottom Navigation */
  .mobile-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: .25rem; padding: .6rem .25rem;
    color: var(--dim); text-decoration: none;
    font-size: .62rem; font-weight: 500;
    transition: color .15s;
  }
  .mobile-nav-item:hover,
  .mobile-nav-item.active { color: var(--blue); }
  .mobile-nav-item svg { flex-shrink: 0; }

  .mobile-nav-create {
    color: var(--blue);
    background: var(--blue-bg);
    border-radius: 12px;
    margin: .35rem .2rem;
    padding: .4rem .5rem;
  }
  .mobile-nav-create.active { color: #fff; background: var(--blue); }

  /* Page header stapeln */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.25rem;
  }
  .header-actions { width: 100%; flex-wrap: wrap; }

  /* Tabellen scrollbar */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 540px; }

  /* Felder einspaltig */
  .field-row { grid-template-columns: 1fr; }

  /* Form-Card volle Breite */
  .form-card { max-width: 100%; }

  /* Stats Grid 2 Spalten */
  .stats-grid { grid-template-columns: 1fr 1fr; }

  /* Karte kleiner */
  .map-wrap-sm #detail-map { height: 220px; }

  /* Detail-Grid 2 Spalten */
  .detail-grid { grid-template-columns: 1fr 1fr; }

  /* Settings Body weniger Padding */
  .settings-body { padding: 1rem; }

  /* Reset-PW Popup volle Breite */
  .reset-pw-popup { min-width: 0; width: calc(100vw - 2rem); }

  /* Page-Header Titel kleiner */
  .page-header h1 { font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════
   COOKIE BANNER
═══════════════════════════════════════════ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: var(--surface2);
  border-top: 1px solid var(--border2);
  padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 1.25rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,.4);
}
.cookie-text {
  display: flex; align-items: flex-start; gap: .65rem;
  font-size: .8rem; color: var(--muted); line-height: 1.55;
  max-width: 680px; text-align: center;
}
.cookie-btn {
  background: var(--blue); color: #fff;
  border: none; border-radius: 7px;
  padding: .55rem 1.25rem; font-size: .84rem; font-weight: 600;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: opacity .15s; flex-shrink: 0;
}
.cookie-btn:hover { opacity: .87; }

@media (max-width: 767px) {
  .cookie-banner {
    flex-direction: column; align-items: stretch;
    padding: 1rem; gap: .85rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
  .cookie-btn { width: 100%; text-align: center; padding: .65rem; }
}

/* Site footer */
.site-footer {
  height: 56px;
  display: flex; align-items: center; justify-content: center; gap: .75rem;
  padding: 0 2rem;
  border-top: 1px solid var(--border);
  font-size: .76rem; color: var(--dim);
  flex-shrink: 0;
}
.site-footer a { color: var(--dim); text-decoration: none; transition: color .15s; }
.site-footer a:hover { color: var(--muted); }
.site-footer span { color: var(--border2); }

@media (max-width: 767px) {
  .site-footer { display: none; }
}
