@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg-base:      #0a1a0f;
  --bg-card:      #0f2316;
  --bg-elevated:  #162e1d;
  --bg-hover:     #1c3a24;
  --bg-input:     #0d1f14;
  --border:       #1e4029;
  --border-light: #254d32;
  --border-focus: #22c55e;
  --accent:        #22c55e;
  --accent-dim:    #166534;
  --accent-glow:   rgba(34,197,94,.15);
  --accent-warm:   #f59e0b;
  --accent-warm-dim: #78350f;
  --danger:        #ef4444;
  --danger-dim:    #7f1d1d;
  --info:          #38bdf8;
  --info-dim:      #0c4a6e;
  --text-primary:   #e8f5e9;
  --text-secondary: #86a891;
  --text-muted:     #4a6b52;
  --text-on-accent: #052e16;
  --font-ui:   'Outfit', sans-serif;
  --font-mono: 'Outfit', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.6);
  --sidebar-w: 220px;
  --topbar-h:  58px;
  --transition: 180ms ease;
}

[data-theme="light"] {
  --bg-base:     #f0f7f1;
  --bg-card:     #ffffff;
  --bg-elevated: #e8f3e9;
  --bg-hover:    #dceede;
  --bg-input:    #f5faf6;
  --border:       #c8e6c9;
  --border-light: #d4edda;
  --border-focus: #16a34a;
  --accent:        #16a34a;
  --accent-dim:    #dcfce7;
  --accent-glow:   rgba(22,163,74,.12);
  --accent-warm:   #d97706;
  --accent-warm-dim: #fef3c7;
  --danger:        #dc2626;
  --danger-dim:    #fee2e2;
  --info:          #0284c7;
  --info-dim:      #e0f2fe;
  --text-primary:   #1a3320;
  --text-secondary: #4a7c59;
  --text-muted:     #8aab91;
  --text-on-accent: #fff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
}

/* ── iOS Safe Area ─────────────────────────────────────────── */
:root {
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
}

/* ── iOS Zoom verhindern ────────────────────────────────────── */
html {
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
button { font-family: var(--font-ui); cursor: pointer; border: none; outline: none; }
input, select, textarea {
  font-family: var(--font-ui);
  font-size: .9rem;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder { color: var(--text-muted); }
select option { background: var(--bg-card); }

input[type="time"] {
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
/* ── Layout ────────────────────────────────────────────────── */
#app-shell { display: flex; min-height: 100vh; }

#sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 100;
  transition: transform var(--transition), background var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border);
}
.logo-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.logo-text { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.logo-sub { font-size: .7rem; color: var(--text-muted); font-family: var(--font-mono); display: block; margin-top: -2px; }

.sidebar-nav { flex: 1; padding: .75rem .6rem; overflow-y: auto; }

.nav-section-label {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: .8rem .8rem .3rem;
}
.nav-section-label[data-admin-only] { display: none; }
body.is-admin .nav-section-label[data-admin-only] { display: block; }

.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .8rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.nav-icon { width: 18px; height: 18px; opacity: .7; flex-shrink: 0; }
.nav-link:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.nav-link.active { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent-dim); }
.nav-link.active .nav-icon { opacity: 1; }
.nav-link[data-admin-only] { display: none; }
body.is-admin .nav-link[data-admin-only] { display: flex; }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: .75rem .6rem calc(.75rem + env(safe-area-inset-bottom));
  margin-top: auto;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}
.user-pill:hover { background: var(--bg-hover); }

.user-avatar {
  width: 30px; height: 30px;
  background: var(--accent-dim);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: .8rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .65rem; font-family: var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }

#main-area { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

#topbar {
  height: calc(var(--topbar-h) + var(--safe-top));
  padding-top: var(--safe-top);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: background var(--transition);
}
.topbar-left { display: flex; flex-direction: column; }
.page-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.page-subtitle { font-size: .72rem; color: var(--text-muted); font-family: var(--font-mono); }
.topbar-right { display: flex; align-items: center; gap: .75rem; }

.status-dot { display: flex; align-items: center; gap: .4rem; font-size: .72rem; font-family: var(--font-mono); color: var(--text-muted); }
.status-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); display: inline-block; }
.status-dot.online::before { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.status-dot.offline::before { background: var(--danger); }

.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 44px; height: 24px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
}
.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform var(--transition), background var(--transition);
}
[data-theme="light"] .theme-toggle::after { transform: translateX(20px); background: var(--accent); }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 34px; height: 34px;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

#page-content {
  flex: 1;
  padding: 1.75rem 1.5rem;
  padding-bottom: calc(1.75rem + var(--safe-bottom));
  max-width: 1200px;
  width: 100%;
  animation: page-in .15s ease;
}
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Cards ─────────────────────────────────────────────────── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; transition: background var(--transition), border-color var(--transition); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.card-value { font-size: 2rem; font-weight: 700; font-family: var(--font-mono); color: var(--text-primary); line-height: 1; }
.card-value.accent { color: var(--accent); }
.card-value.warn { color: var(--accent-warm); }
.card-value.danger { color: var(--danger); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500; font-family: var(--font-ui); transition: all var(--transition); white-space: nowrap; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--text-on-accent); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-light); color: var(--text-primary); }
.btn-danger { background: var(--danger-dim); color: var(--danger); border: 1px solid var(--danger-dim); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border); }
.btn-sm { padding: .3rem .65rem; font-size: .78rem; }
.btn-lg { padding: .7rem 1.4rem; font-size: .95rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; }
.btn-icon:hover { color: var(--text-primary); border-color: var(--border-light); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Badges ────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: 99px; font-size: .68rem; font-weight: 600; font-family: var(--font-mono); letter-spacing: .02em; text-transform: uppercase; }
.badge-green  { background: var(--accent-dim);      color: var(--accent); }
.badge-amber  { background: var(--accent-warm-dim);  color: var(--accent-warm); }
.badge-red    { background: var(--danger-dim);        color: var(--danger); }
.badge-gray   { background: var(--bg-elevated);       color: var(--text-muted); }
.badge-blue   { background: var(--info-dim);          color: var(--info); }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .78rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .04em; }
.form-hint { font-size: .72rem; color: var(--text-muted); margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem}

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead th { background: var(--bg-elevated); padding: .65rem 1rem; text-align: left; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-hover); }
td .mono { font-family: var(--font-mono); font-size: .8rem; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.modal-backdrop.visible { opacity: 1; pointer-events: auto; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); width: 100%; max-width: 480px; padding: 1rem; transform: translateY(12px); transition: transform var(--transition); box-shadow: var(--shadow-lg); }
.modal-backdrop.visible .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-close { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 1rem; cursor: pointer; transition: all var(--transition); }
.modal-close:hover { color: var(--text-primary); border-color: var(--border-light); }
.modal-footer { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ── Toast ─────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 500; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .65rem 1rem; font-size: .82rem; display: flex; align-items: center; gap: .6rem; box-shadow: var(--shadow-md); animation: toast-in .2s ease; pointer-events: auto; max-width: 320px; }
.toast.success { border-color: var(--accent-dim); }
.toast.error   { border-color: var(--danger-dim); }
.toast-icon { font-size: .9rem; }
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Empty / Skeleton ──────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; opacity: .5; }
.empty-state p { font-size: .85rem; }
.skeleton { background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; border-radius: var(--radius-sm); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Grids ─────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.valves-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── Valve cards ───────────────────────────────────────────── */
.valve-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem; transition: all var(--transition); position: relative; overflow: hidden; }
.valve-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--border); transition: background var(--transition); }
.valve-card.is-open { border-color: var(--accent-dim); }
.valve-card.is-open::before { background: var(--accent); }
.valve-card.is-auto::before { background: var(--accent-warm); }
.valve-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: .75rem; }
.valve-name { font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.valve-id { font-family: var(--font-mono); font-size: .65rem; color: var(--text-muted); }
.valve-status-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .85rem; flex-wrap: wrap; }
.valve-timer { font-family: var(--font-mono); font-size: .78rem; color: var(--text-muted); }
.valve-timer.active { color: var(--accent); }
.valve-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.valve-actions .btn { justify-content: center; }

/* ── Schedule ──────────────────────────────────────────────── */
.schedule-day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; margin-bottom: .75rem; }
.day-pill { text-align: center; padding: .4rem .2rem; border-radius: var(--radius-sm); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); cursor: pointer; transition: all var(--transition); user-select: none; }
.day-pill.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

/* ── Filter bar ────────────────────────────────────────────── */
.filter-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-bar input, .filter-bar select { width: auto; flex: 1; min-width: 120px; }

/* ── Section helpers ───────────────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.section-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.section-sub { font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }

/* ── Weather ───────────────────────────────────────────────── */
.weather-widget { display: flex; align-items: center; gap: 1rem; }
.weather-icon { font-size: 2rem; }
.weather-temp { font-size: 1.4rem; font-weight: 700; font-family: var(--font-mono); }
.weather-desc { font-size: .75rem; color: var(--text-muted); }
.rain-warning { background: var(--info-dim); border: 1px solid var(--info); color: var(--info); border-radius: var(--radius-md); padding: .5rem .85rem; font-size: .78rem; display: flex; align-items: center; gap: .5rem; }

/* ── Toggle ────────────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: .5rem; }
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 11px; cursor: pointer; transition: all var(--transition); }
.toggle-slider::before { content: ''; position: absolute; height: 14px; width: 14px; left: 3px; bottom: 3px; background: var(--text-muted); border-radius: 50%; transition: all var(--transition); }
.toggle input:checked ~ .toggle-slider { background: var(--accent-dim); border-color: var(--accent); }
.toggle input:checked ~ .toggle-slider::before { transform: translateX(18px); background: var(--accent); }
.toggle-label { font-size: .82rem; color: var(--text-secondary); }

/* ── Utility ───────────────────────────────────────────────── */
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; }
.gap-sm { gap: .5rem; } .gap-md { gap: 1rem; }
.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .8rem; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Overflow-Schutz (global) ────────────────────────────────── */
html {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
}

#app-shell {
  overflow-x: hidden;
  max-width: 100vw;
}

#main-area {
  overflow-x: hidden;
  max-width: 100vw;
}

#page-content {
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Valve Swipe Container absichern */
#valve-swipe-track {
  max-width: 100%;
  box-sizing: border-box;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  #sidebar {
    transform: translateX(-220px);
    width: 220px;
    z-index: 300;
  }

  #sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .menu-toggle { display: flex; }

  #main-area {
    margin-left: 0;
    width: 100vw;
    max-width: 100vw;
  }

  #page-content {
    padding: .75rem;
    padding-bottom: calc(.75rem + var(--safe-bottom));
    max-width: 100vw;
    width: 100%;
  }

  /* Stats-Grid: immer 2 Spalten, responsiv */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
    margin-bottom: .75rem;
  }

  .stats-grid .card {
    padding: .75rem .65rem;
  }

  .stats-grid .card-value {
    font-size: 1.5rem;
  }

  .stats-grid .card-title {
    font-size: .65rem;
  }

  /* Zwei-Spalten → eine Spalte */
  .two-col,
  .three-col { grid-template-columns: 1fr; }

 .form-row   { grid-template-columns: 1fr; }

  .schedule-day-grid { grid-template-columns: repeat(4, 1fr); }

  .valves-grid { grid-template-columns: 1fr; }

  /* Topbar kompakter */
  .topbar { padding: 0 .75rem; }

  /* Modal: von unten */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* ── Sehr kleine Screens (iPhone SE 375px, 390px) ───────────── */
@media (max-width: 430px) {
  #page-content {
    padding: .6rem .6rem;
  }

  .stats-grid {
    gap: .5rem;
  }

  .stats-grid .card {
    padding: .65rem .55rem;
  }

  .stats-grid .card-value {
    font-size: 1.35rem;
  }

  /* Karten generell: weniger Padding auf kleinen Screens */
  .card {
    padding: .85rem .75rem;
  }

  /* Section-Header kompakter */
  .section-header {
    margin-bottom: .5rem;
  }
}
