:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #222638;
  --border: #2d3148;
  --blue: #4f7cff;
  --blue-dim: #2a3d7a;
  --green: #2ecc71;
  --green-dim: #1a4a30;
  --red: #e74c3c;
  --red-dim: #4a1a1a;
  --orange: #f39c12;
  --orange-dim: #3d2e0a;
  --text: #e8eaf6;
  --text-dim: #7986cb;
  --text-muted: #3d4570;
  --radius: 12px;
}

/* -- LIGHT MODE -- */
body.light-mode {
  --bg: #f0f2f8;
  --surface: #ffffff;
  --surface2: #f5f7ff;
  --border: #dde1f0;
  --blue: #3a5dae;
  --blue-dim: #dde6f8;
  --green: #27ae60;
  --green-dim: #d4f0e0;
  --red: #c0392b;
  --red-dim: #fde8e6;
  --orange: #d68910;
  --orange-dim: #fef3dc;
  --text: #1a1d27;
  --text-dim: #4a5568;
  --text-muted: #9aa3b8;
}

body.light-mode .landing-hero { background: linear-gradient(135deg, #3A5DAE 0%, #4f7cff 100%); }
body.light-mode .auth-page { background: var(--bg); }
body.light-mode input, body.light-mode select, body.light-mode textarea { background: var(--surface); color: var(--text); border-color: var(--border); }
body.light-mode .kpi-card { background: var(--surface); }
body.light-mode .kpi-card.blue { background: var(--blue); }
body.light-mode .kpi-card.blue .kpi-label, body.light-mode .kpi-card.blue .kpi-value { color: white; }
body.light-mode table thead tr { background: var(--surface2); }
body.light-mode .tab { color: var(--text-dim); }
body.light-mode .tab.active { background: var(--surface); color: var(--blue); }
body.light-mode .modal { background: var(--surface); }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* -- AUTH / LANDING -- */
.auth-page { display: none; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; }
.auth-page.active { display: flex; }
.auth-box { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 40px; width: 100%; max-width: 440px; }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-icon { width: 56px; height: 56px; background: var(--blue); border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 12px; }
.auth-logo h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.auth-logo p { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.auth-tabs { display: flex; background: var(--surface2); border-radius: 10px; padding: 4px; margin-bottom: 28px; }
.auth-tab { flex: 1; padding: 10px; text-align: center; font-size: 14px; font-weight: 500; cursor: pointer; border-radius: 8px; transition: all 0.2s; color: var(--text-dim); border: none; background: none; font-family: inherit; }
.auth-tab.active { background: var(--blue); color: white; }

/* -- FORMS -- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; font-family: 'DM Mono', monospace; }
input, select, textarea { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; color: var(--text); font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.2s; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); }
input[type="color"] { height: 40px; padding: 4px; cursor: pointer; }
.btn { width: 100%; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; border: none; margin-top: 8px; }
.btn-primary { background: var(--blue); color: white; }
.btn-primary:hover { background: #3a6aff; }
.error-msg { background: var(--red-dim); border: 1px solid var(--red); color: var(--red); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 12px; display: none; }
.error-msg.show { display: block; }

/* -- APP SHELL -- */
.app-page { display: none; flex-direction: column; min-height: 100vh; }
.app-page.active { display: flex; }
header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 60px; position: sticky; top: 0; z-index: 100; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.logo-icon { width: 32px; height: 32px; background: var(--blue); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.verein-badge { background: var(--blue-dim); color: var(--blue); padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; font-family: 'DM Mono', monospace; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.btn-sm { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; font-family: inherit; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border); background: var(--surface2); color: var(--text); }
.btn-sm:hover { border-color: var(--blue); color: var(--blue); }
.btn-sm.danger { border-color: var(--red-dim); color: var(--red); }
.btn-sm.primary { background: var(--blue); color: white; border-color: var(--blue); }

/* -- NAV -- */
nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
.tab { padding: 12px 18px; font-size: 13px; font-weight: 500; color: var(--text-dim); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; white-space: nowrap; }
.tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab.admin-tab { color: var(--orange); }
.tab.admin-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
main { padding: 24px; max-width: 1400px; margin: 0 auto; width: 100%; flex: 1; }
.page { display: none; }
.page.active { display: block; }

/* -- KPI CARDS -- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: transform 0.15s; }
.kpi-card:hover { transform: translateY(-2px); }
.kpi-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-family: 'DM Mono', monospace; margin-bottom: 6px; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -1px; }
.kpi-card.blue { background: var(--blue-dim); border-color: var(--blue); }
.kpi-card.blue .kpi-value { color: var(--blue); }
.kpi-card.green { background: var(--green-dim); border-color: var(--green); }
.kpi-card.green .kpi-value { color: var(--green); }
.kpi-card.red { background: var(--red-dim); border-color: var(--red); }
.kpi-card.red .kpi-value { color: var(--red); }
.kpi-card.orange { background: var(--orange-dim); border-color: var(--orange); }
.kpi-card.orange .kpi-value { color: var(--orange); }

/* -- SECTIONS / TABLES -- */
.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.section-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.section-title { font-size: 13px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 18px; text-align: left; font-size: 10px; font-family: 'DM Mono', monospace; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); }
td { padding: 12px 18px; font-size: 13px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; font-family: 'DM Mono', monospace; }
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-blue { background: var(--blue-dim); color: var(--blue); }
.badge-orange { background: var(--orange-dim); color: var(--orange); }
.loading { display: flex; align-items: center; justify-content: center; padding: 32px; color: var(--text-muted); font-family: 'DM Mono', monospace; font-size: 12px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 40px; text-align: center; color: var(--text-muted); font-size: 13px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--green-dim); color: var(--green); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-family: 'DM Mono', monospace; }
.refresh-info { font-size: 11px; color: var(--text-muted); font-family: 'DM Mono', monospace; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,0.2); }

/* -- DETAIL VIEW -- */
.detail-view { display: none; }
.detail-view.active { display: block; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 13px; cursor: pointer; margin-bottom: 20px; padding: 6px 0; border: none; background: none; font-family: inherit; }
.back-btn:hover { color: var(--blue); }
.detail-header { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.detail-title { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.detail-meta { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* -- KASSIERER BARS -- */
.kassierer-list { padding: 8px 0; }
.kassierer-row { padding: 14px 18px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.kassierer-row:last-child { border-bottom: none; }
.kassierer-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.kassierer-meta { font-size: 12px; color: var(--text-dim); }
.progress-bar { height: 4px; background: var(--surface2); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 2px; transition: width 0.6s ease; }
.kassierer-amount { font-size: 18px; font-weight: 700; color: var(--blue); text-align: right; font-family: 'DM Mono', monospace; }
.kassierer-txcount { font-size: 11px; color: var(--text-muted); text-align: right; }

/* -- MODALS -- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.modal-btn { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; border: none; }
.modal-btn-primary { background: var(--blue); color: white; }
.modal-btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.modal-btn-danger { background: var(--red); color: white; }

/* -- SUB TABS -- */
.sub-tab { padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--text-dim); cursor: pointer; border-radius: 8px; transition: all 0.2s; background: none; border: none; font-family: inherit; }
.sub-tab.active { background: var(--blue); color: white; }

/* -- RADIO OPTIONS -- */
.radio-option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 13px; transition: all 0.15s; user-select: none; }
.radio-option:hover { border-color: var(--blue); }
.radio-option.selected { border-color: var(--blue); background: var(--blue-dim); }
.radio-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text-muted); flex-shrink: 0; transition: all 0.15s; position: relative; }
.radio-dot.selected { border-color: var(--blue); background: var(--blue); }
.radio-dot.selected::after { content: ''; position: absolute; inset: 3px; background: white; border-radius: 50%; }

/* -- ADMIN -- */
.admin-header { background: linear-gradient(135deg, var(--orange-dim), #2a1f05); border: 1px solid var(--orange); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.admin-badge { background: var(--orange); color: white; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; font-family: 'DM Mono', monospace; }

/* -- LANDING -- */
.landing { display: none; min-height: 100vh; }
.landing.active { display: block; }
.landing-hero { background: linear-gradient(135deg, var(--surface), var(--surface2)); border-bottom: 1px solid var(--border); padding: 80px 24px; text-align: center; }
.landing-logo { width: 72px; height: 72px; background: var(--blue); border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 36px; margin-bottom: 24px; }
.landing-hero h1 { font-size: 48px; font-weight: 800; letter-spacing: -2px; margin-bottom: 16px; color: white; }
.landing-hero h1 span { color: rgba(255,255,255,0.75); }
.landing-hero p { font-size: 18px; color: rgba(255,255,255,0.9); max-width: 560px; margin: 0 auto 32px; }
.landing-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-btn { padding: 14px 28px; border-radius: 12px; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.2s; border: none; }
.landing-btn-primary { background: rgba(255,255,255,0.15); color: white; border: 2px solid rgba(255,255,255,0.4); }
.landing-btn-primary:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }
.landing-btn-ghost { background: white; color: #3A5DAE; border: 2px solid white; }
.landing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; padding: 60px 24px; max-width: 1000px; margin: 0 auto; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-text { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.landing-footer { text-align: center; padding: 24px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 12px; font-family: 'DM Mono', monospace; }
.landing-footer a { color: var(--blue); text-decoration: underline; }
.landing-footer a:hover { color: var(--text); }

/* -- FAQ ACCORDION -- */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s; }
.faq-item:hover { border-color: var(--blue); }
.faq-item.open { border-color: var(--blue); }
.faq-frage { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; font-size: 14px; font-weight: 500; gap: 12px; }
.faq-frage:hover { background: var(--surface2); }
.faq-icon { font-size: 18px; color: var(--blue); flex-shrink: 0; font-weight: 300; }
.faq-antwort { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-antwort ul, .faq-antwort ol { padding-left: 20px; margin: 6px 0; }
.faq-antwort li { margin-bottom: 4px; }
.faq-antwort strong { color: var(--text); }
.pfand-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding: 14px 18px; }
.pfand-item { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.pfand-item .label { font-size: 10px; color: var(--text-muted); font-family: 'DM Mono', monospace; margin-bottom: 4px; }
.pfand-item .value { font-size: 18px; font-weight: 700; }

/* -- LIGHTBOX -- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  cursor: default;
  animation: zoomIn 0.2s ease;
  object-fit: contain;
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-caption {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.screenshot-img {
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
}
.screenshot-img:hover {
  transform: scale(1.02);
  box-shadow: 0 28px 70px rgba(0,0,0,0.2) !important;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============================================
   RESPONSIVE – Mobile & Tablet
   ============================================ */

@media (max-width: 768px) {

  /* -- LANDING PAGE -- */
  .landing-hero { padding: 48px 20px; }
  .landing-hero h1 { font-size: 32px; letter-spacing: -1px; }
  .landing-hero p { font-size: 15px; }
  .landing-cta { flex-direction: column; align-items: stretch; padding: 0 12px; }
  .landing-btn { width: 100%; text-align: center; }
  .landing-logo { width: 56px; height: 56px; font-size: 28px; }

  /* Feature Sections */
  .screenshot-section { flex-direction: column !important; padding: 40px 20px !important; gap: 24px !important; }
  .screenshot-section img { width: 100% !important; max-width: 340px; margin: 0 auto; }
  .screenshot-section .text-block { max-width: 100% !important; }
  .screenshot-section h2 { font-size: 24px !important; }

  /* Feature Cards Grid */
  .landing-features { grid-template-columns: 1fr !important; padding: 40px 20px !important; }

  /* Screenshots Slider */
  .screenshot-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; padding: 0 16px !important; }

  /* CTA Footer */
  .landing-cta-footer { padding: 48px 20px !important; }
  .landing-cta-footer .cta-buttons { flex-direction: column; align-items: stretch; }

  /* -- HEADER -- */
  .header { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .header-logo span { display: none; } /* Name ausblenden, nur Icon */
  .header-verein { font-size: 12px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-right { gap: 6px; }

  /* -- TAB NAVIGATION -- */
  .tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 8px; gap: 0; }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab { font-size: 12px; padding: 10px 12px; white-space: nowrap; flex-shrink: 0; }

  /* -- KPI GRID -- */
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .kpi-value { font-size: 20px !important; }

  /* -- SECTIONS -- */
  .section { border-radius: 12px; }
  .section-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .section-title { font-size: 14px; }

  /* -- TABLES -- */
  table { font-size: 12px; }
  th, td { padding: 8px 10px !important; }
  /* Weniger wichtige Spalten auf Mobile ausblenden */
  .hide-mobile { display: none !important; }

  /* -- MODALS -- */
  .modal { width: 95vw !important; max-width: 95vw !important; padding: 20px !important; margin: 10px !important; }

  /* -- FORMS -- */
  .form-group { margin-bottom: 12px; }
  input, select, textarea { font-size: 16px !important; } /* verhindert iOS Zoom */

  /* -- DASHBOARD PAGE -- */
  #page-dashboard { padding: 12px !important; }

  /* -- ADMIN -- */
  .admin-header { padding: 16px !important; gap: 12px; }
  #adminKpiGrid { grid-template-columns: repeat(2, 1fr) !important; }

  /* -- APP TAB -- */
  .qr-section { flex-direction: column !important; text-align: center; }

  /* -- AUTH PAGE -- */
  .auth-page { padding: 16px !important; }
  .auth-card { padding: 24px 20px !important; }
}

@media (max-width: 480px) {
  .landing-hero h1 { font-size: 26px; }
  .kpi-grid { grid-template-columns: 1fr !important; }
  .screenshot-grid { grid-template-columns: 1fr !important; }
  #adminKpiGrid { grid-template-columns: 1fr !important; }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .landing-hero h1 { font-size: 38px; }
  .screenshot-section { padding: 48px 32px !important; gap: 32px !important; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* -- MOBILE HEADER & NAV -- */
@media (max-width: 768px) {
  header { padding: 0 12px; height: auto; min-height: 52px; flex-wrap: wrap; gap: 6px; }
  header .logo { font-size: 13px; gap: 6px; }
  header .logo img { width: 26px; height: 26px; }
  .header-right { gap: 5px; flex-wrap: nowrap; }
  .header-right .btn-sm { font-size: 11px; padding: 4px 8px; }
  .verein-badge { font-size: 11px; padding: 2px 8px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  nav { padding: 0 8px; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .tab { font-size: 11px; padding: 10px 10px; white-space: nowrap; flex-shrink: 0; }

  .pages { padding: 12px; }

  /* KPI Grid */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-card { padding: 12px 14px; }
  .kpi-value { font-size: 18px; }
  .kpi-label { font-size: 10px; }

  /* Sections */
  .section { margin-bottom: 12px; }
  .section-header { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
  .section-header input[type="text"] { width: 100% !important; }

  /* Tables horizontal scroll */
  .section { overflow-x: auto; }
  table { min-width: 500px; }

  /* Modals */
  .modal-overlay { align-items: flex-end; }
  .modal { width: 100% !important; max-width: 100% !important; border-radius: 20px 20px 0 0 !important; margin: 0 !important; max-height: 90vh; overflow-y: auto; }

  /* Admin grid */
  #adminKpiGrid { grid-template-columns: repeat(2, 1fr); padding: 12px; }

  /* App Tab QR */
  #page-app > div { padding: 0 !important; }
}

@media (max-width: 420px) {
  .tab { font-size: 10px; padding: 10px 8px; }
  .kpi-grid { grid-template-columns: 1fr; }
  header .logo > span { display: none; } /* "VereinsKassenApp" Text auf kleinen Geräten ausblenden */
}

/* -- LANDING PAGE FEATURE SECTIONS MOBILE -- */
@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  [style*="padding:64px 24px"] {
    padding: 40px 16px !important;
  }
  [style*="max-width:1100px"] {
    padding: 0 !important;
  }
  /* Bilder in Feature-Sections zentrieren */
  .feature-grid img {
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }
  /* Steps "In 3 Schritten" */
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}
