/* ============================================================
   Campus Cuisine – Design System & App Styles
   Version: 0.2.0
   Brand Colors (CMYK source):
     Orange:     C0 M85 Y100 K0  → #FF2600
     Turquoise:  C51 M22 Y31 K4  → #78BFA9
     Baby Blue:  C20 M2  Y0  K0  → #CCE8FF
     Black:      100% K           → #1A1A1A
     Dark Grey:  80% K            → #333333
     Light Grey: 22% K            → #C8C8C8
   ============================================================ */

/* ── 1. Design Tokens ───────────────────────────────────── */
:root {
  /* Colors */
  --c-orange:       #FF2600;
  --c-orange-dark:  #CC1E00;
  --c-orange-lt:    #FF5C40;
  --c-orange-bg:    #FFF0ED;
  --c-turquoise:    #78BFA9;
  --c-turquoise-bg: #EEF8F5;
  --c-baby-blue:    #CCE8FF;
  --c-baby-blue-bg: #F0F7FF;
  --c-black:        #1A1A1A;
  --c-dark-grey:    #333333;
  --c-mid-grey:     #666666;
  --c-grey:         #999999;
  --c-light-grey:   #C8C8C8;
  --c-lighter-grey: #F0F0F0;
  --c-white:        #FFFFFF;
  --c-error:        #D32F2F;
  --c-error-bg:     #FFEBEE;
  --c-success:      #2E7D32;
  --c-success-bg:   #E8F5E9;

  /* Typography */
  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-size-xs:   11px;
  --font-size-sm:   13px;
  --font-size-md:   15px;
  --font-size-lg:   18px;
  --font-size-xl:   22px;
  --font-size-2xl:  28px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Borders */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 100px;

  /* Shadows */
  --shadow-sm:   0 1px 4px rgba(0,0,0,.08);
  --shadow-md:   0 2px 12px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.16);
  --shadow-fab:  0 4px 20px rgba(255,38,0,.35);

  /* Transitions */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur:  200ms;

  /* Safe areas (for notched phones) */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── 2. Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; height: 100dvh; }
body {
  font-family: var(--font);
  font-size: var(--font-size-md);
  color: var(--c-black);
  background: var(--c-white);
  height: 100%;
  height: 100dvh;
  overflow: hidden;        /* App shell – inner views scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}
a { color: var(--c-orange); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── 3. App Shell ────────────────────────────────────────── */
#app {
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Screen containers */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  background: var(--c-white);
  transform: translateX(0);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.screen.hidden {
  display: none;
}

/* ── 4. Loading Spinner ──────────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--c-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  z-index: 9999;
  transition: opacity .4s var(--ease);
}
#loading-screen.fade-out { opacity: 0; pointer-events: none; }

.app-logo-loading {
  width: 80px; height: 80px;
  background: var(--c-orange);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: var(--c-white);
  letter-spacing: -1px;
  box-shadow: 0 12px 40px rgba(255,38,0,.4);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 12px 40px rgba(255,38,0,.4); }
  50%       { transform: scale(1.06); box-shadow: 0 18px 50px rgba(255,38,0,.55); }
}
.loading-text {
  color: var(--c-grey);
  font-size: var(--font-size-sm);
  letter-spacing: .05em;
}

/* ── 5. Scrollable Content ───────────────────────────────── */
.scroll-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-content::-webkit-scrollbar { display: none; }

/* ── 6. Bottom Navigation ────────────────────────────────── */
.bottom-nav {
  display: flex;
  align-items: center;      /* icons vertically centred within the bar */
  background: #f2f2f7;      /* iOS system light grey – fills safe-area zone deliberately */
  border-top: 0.5px solid rgba(0,0,0,0.12);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
  padding: 4px 0 max(4px, var(--safe-bottom));
  flex-shrink: 0;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: none;
  color: inherit;
}
.nav-icon { font-size: 22px; line-height: 1; }
.nav-label {
  font-size: 10px;
  color: var(--c-grey);
  font-weight: 500;
}
.nav-item.active .nav-label {
  color: var(--c-orange);
  font-weight: 700;
}
/* Badge on nav icon */
.nav-badge {
  position: relative;
  display: inline-block;
}
.nav-badge::after {
  content: '';
  position: absolute;
  top: -2px; right: -4px;
  width: 8px; height: 8px;
  background: var(--c-orange);
  border-radius: 50%;
  border: 2px solid var(--c-white);
}

/* ── 7. Top App Bar ──────────────────────────────────────── */
.app-bar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: calc(var(--safe-top) + var(--space-md)) var(--space-md) var(--space-md);
  background: var(--c-white);
  border-bottom: 1px solid var(--c-lighter-grey);
  flex-shrink: 0;
}
.app-bar-title {
  font-size: var(--font-size-lg);
  font-weight: 800;
}
.app-bar-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-lighter-grey);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.app-bar-action {
  margin-left: auto;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-lighter-grey);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── 8. Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px var(--space-lg);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-md);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--dur) var(--ease);
  width: 100%;
  text-align: center;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: var(--c-orange);
  color: var(--c-white);
}
.btn-primary:hover:not(:disabled)   { background: var(--c-orange-dark); }
.btn-primary:active:not(:disabled)  { background: var(--c-orange-dark); }

.btn-secondary {
  background: var(--c-lighter-grey);
  color: var(--c-dark-grey);
}
.btn-outline {
  background: transparent;
  color: var(--c-orange);
  border: 2px solid var(--c-orange);
  padding: 12px var(--space-lg);
}
.btn-ghost {
  background: transparent;
  color: var(--c-mid-grey);
  font-weight: 600;
}
.btn-google {
  background: var(--c-white);
  color: var(--c-dark-grey);
  border: 1.5px solid var(--c-light-grey);
  font-weight: 600;
}
.btn-google:hover { background: var(--c-lighter-grey); }
.btn-danger {
  background: var(--c-error-bg);
  color: var(--c-error);
}
.btn-sm {
  padding: 8px 16px;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-full);
  width: auto;
}
.btn-icon-only {
  width: 44px; height: 44px;
  padding: 0;
  border-radius: 50%;
}

/* Spinner inside button */
.btn .spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.btn.loading .btn-text { display: none; }
.btn.loading .spinner  { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* FAB */
.fab {
  position: absolute;
  bottom: calc(64px + var(--safe-bottom));
  right: var(--space-md);
  width: 56px; height: 56px;
  background: var(--c-orange);
  border-radius: 50%;
  box-shadow: var(--shadow-fab);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--c-white);
  cursor: pointer;
  z-index: 10;
  border: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.fab:active { transform: scale(.93); }

/* ── 9. Form Elements ────────────────────────────────────── */
.form-group { margin-bottom: var(--space-md); }
.form-label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-grey);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 14px var(--space-md);
  border: 1.5px solid var(--c-light-grey);
  border-radius: var(--radius-xs);
  font-size: 16px; /* min. 16px verhindert iOS Auto-Zoom beim Fokussieren */
  color: var(--c-dark-grey);
  background: var(--c-lighter-grey);
  outline: none;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  -webkit-appearance: none;
}
/* Safari needs an explicit override for select elements */
select.form-input {
  -webkit-appearance: none;
  border-radius: var(--radius-xs);
}
.form-input:focus {
  border-color: var(--c-orange);
  background: var(--c-white);
}
.form-input.error  { border-color: var(--c-error); }
.form-input.valid  { border-color: var(--c-turquoise); }
.form-error-msg {
  font-size: var(--font-size-xs);
  color: var(--c-error);
  margin-top: 4px;
  display: none;
}
.form-error-msg.visible { display: block; }
textarea.form-input {
  resize: none;
  min-height: 80px;
  line-height: 1.5;
}
.form-select {
  width: 100%;
  padding: 14px var(--space-md);
  border: 1.5px solid var(--c-light-grey);
  border-radius: var(--radius-xs);
  font-size: var(--font-size-md);
  color: var(--c-dark-grey);
  background: var(--c-lighter-grey);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-select:focus { border-color: var(--c-orange); background-color: var(--c-white); }

/* ── 10. Cards ───────────────────────────────────────────── */
.card {
  background: var(--c-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
}
.card-list > .card + .card { margin-top: var(--space-sm); }

/* ── 11. Dividers & Sections ─────────────────────────────── */
.divider {
  height: 1px;
  background: var(--c-lighter-grey);
  margin: var(--space-md) 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--c-grey);
  font-size: var(--font-size-sm);
  margin: var(--space-md) 0;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1;
  height: 1px; background: var(--c-light-grey);
}
.section-label {
  font-size: var(--font-size-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--c-grey);
  padding: var(--space-md) var(--space-md) 6px;
}

/* ── 12. Toast Notifications ─────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(76px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 380px;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--c-white);
  background: var(--c-dark-grey);
  box-shadow: var(--shadow-lg);
  animation: toast-in .25s var(--ease) forwards;
  pointer-events: auto;
  text-align: center;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.success { background: var(--c-success); }
.toast.error   { background: var(--c-error); }
.toast.warning { background: #E65100; }
.toast.fade-out { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(8px); } }

/* ── 13. Avatar ──────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--c-orange-bg);
  color: var(--c-orange);
  text-transform: uppercase;
  user-select: none;
}
.avatar-sm  { width: 28px; height: 28px; font-size: 10px; }
.avatar-md  { width: 40px; height: 40px; font-size: 15px; }
.avatar-lg  { width: 60px; height: 60px; font-size: 22px; }
.avatar-xl  { width: 80px; height: 80px; font-size: 28px; }

/* ── 14. Badges / Chips ──────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-orange    { background: var(--c-orange-bg);    color: var(--c-orange); }
.badge-turquoise { background: var(--c-turquoise-bg); color: #2E9B7D; }
.badge-grey      { background: var(--c-lighter-grey); color: var(--c-mid-grey); }
.badge-blue      { background: var(--c-baby-blue-bg); color: #1A6BB0; }
.badge-black     { background: var(--c-dark-grey);    color: var(--c-white); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--c-light-grey);
  color: var(--c-mid-grey);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--dur) var(--ease);
}
.chip.selected {
  border-color: var(--c-orange);
  color: var(--c-orange);
  background: var(--c-orange-bg);
}

/* ── 15. Settings Rows ───────────────────────────────────── */
.settings-row {
  display: flex; align-items: center; gap: var(--space-md);
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--c-lighter-grey);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur);
}
.settings-row:active { background: var(--c-lighter-grey); }
.settings-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.si-orange    { background: var(--c-orange-bg); }
.si-turquoise { background: var(--c-turquoise-bg); }
.si-grey      { background: var(--c-lighter-grey); }
.si-danger    { background: var(--c-error-bg); }
.settings-label { font-size: var(--font-size-md); font-weight: 700; }
.settings-sub   { font-size: var(--font-size-xs); color: var(--c-grey); margin-top: 2px; }
.settings-arrow { margin-left: auto; color: var(--c-light-grey); font-size: 16px; }

/* Toggle Switch */
.toggle {
  position: relative;
  width: 46px; height: 26px;
  flex-shrink: 0;
  margin-left: auto;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--c-light-grey);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--dur);
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  background: white;
  border-radius: 50%;
  top: 2px; left: 2px;
  transition: transform var(--dur) var(--ease);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--c-orange); }
.toggle input:checked + .toggle-slider::after { transform: translateX(20px); }

/* ── 16. Empty States ────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px var(--space-lg);
  gap: var(--space-md);
  text-align: center;
}
.empty-state-icon { font-size: 56px; }
.empty-state-title {
  font-size: var(--font-size-lg);
  font-weight: 800;
  color: var(--c-dark-grey);
}
.empty-state-text {
  font-size: var(--font-size-sm);
  color: var(--c-grey);
  line-height: 1.6;
  max-width: 260px;
}

/* ── 17. AUTH SCREENS ────────────────────────────────────── */
.auth-screen {
  background: var(--c-black);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auth-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 40px) var(--space-xl) 0;
  gap: var(--space-sm);
}
.auth-logo {
  width: 76px; height: 76px;
  background: var(--c-orange);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: var(--c-white);
  letter-spacing: -1px;
  box-shadow: 0 12px 40px rgba(255,38,0,.45);
  margin-bottom: var(--space-sm);
}
.auth-title {
  font-size: var(--font-size-2xl);
  font-weight: 900;
  color: var(--c-white);
  letter-spacing: -.5px;
}
.auth-subtitle {
  font-size: var(--font-size-sm);
  color: var(--c-grey);
  text-align: center;
  max-width: 240px;
  line-height: 1.5;
}
.auth-sheet {
  background: var(--c-white);
  border-radius: 28px 28px 0 0;
  padding: var(--space-xl) var(--space-lg) calc(var(--space-xl) + var(--safe-bottom));
  margin-top: var(--space-xl);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.auth-sheet h2 {
  font-size: var(--font-size-xl);
  font-weight: 800;
  margin-bottom: var(--space-lg);
}
.auth-footer-text {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--c-grey);
  margin-top: var(--space-md);
}
.auth-footer-text a {
  color: var(--c-orange);
  font-weight: 700;
}

/* ── 18. PROFILE SETUP SCREEN ────────────────────────────── */
.setup-screen {
  background: var(--c-white);
}
.setup-hero {
  background: var(--c-orange);
  padding: calc(var(--safe-top) + var(--space-xl)) var(--space-lg) var(--space-lg);
  color: var(--c-white);
}
.setup-step {
  font-size: var(--font-size-xs);
  opacity: .75;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: var(--space-xs);
}
.setup-title {
  font-size: var(--font-size-xl);
  font-weight: 900;
  margin-bottom: 4px;
}
.setup-subtitle {
  font-size: var(--font-size-sm);
  opacity: .8;
}
.setup-content {
  padding: var(--space-lg);
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.avatar-picker {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.avatar-preview {
  width: 72px; height: 72px;
  background: var(--c-orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: white;
  flex-shrink: 0;
  border: 3px solid var(--c-lighter-grey);
}
.avatar-hint {
  font-size: var(--font-size-sm);
  color: var(--c-grey);
  line-height: 1.5;
}
.agency-chips {
  display: flex; flex-wrap: wrap; gap: var(--space-sm);
  margin-bottom: 4px;
}

/* ── 19. HOME SCREEN ─────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, var(--c-orange) 0%, #FF5C40 100%);
  padding: calc(var(--safe-top) + var(--space-md)) var(--space-md) var(--space-lg);
  color: var(--c-white);
  flex-shrink: 0;
}
.home-greeting  { font-size: var(--font-size-sm); opacity: .85; }
.home-name      { font-size: var(--font-size-xl); font-weight: 900; margin: 2px 0 var(--space-md); }
.home-date-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: var(--font-size-sm);
  font-weight: 600;
}
.day-tabs {
  display: flex;
  overflow-x: auto;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md) 4px;
  scrollbar-width: none;
  flex-shrink: 0;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
  background: var(--c-lighter-grey);
  color: var(--c-mid-grey);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border: none;
  transition: all var(--dur);
}
.day-tab.active { background: var(--c-black); color: var(--c-white); }
.day-tab.past   { opacity: 0.38; }   /* past days: visible but clearly muted */

/* Week separator between current / next week */
.day-strip-sep {
  width: 1px;
  flex-shrink: 0;
  align-self: stretch;
  background: var(--c-lighter-grey);
  margin: 6px 2px;
}

/* Banner shown in create-group form when creating for a future date */
.future-date-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--c-orange);
  color: var(--c-white);
  border-radius: var(--radius-md);
  padding: 10px var(--space-md);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

/* ── 20. PROFILE SCREEN ──────────────────────────────────── */
.profile-hero {
  background: linear-gradient(180deg, var(--c-black) 0%, #2A2A2A 100%);
  padding: calc(var(--safe-top) + var(--space-lg)) var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--c-white);
  flex-shrink: 0;
}
.profile-name  { font-size: var(--font-size-xl); font-weight: 800; }
.profile-email { font-size: var(--font-size-sm); color: var(--c-grey); }
.profile-stats {
  display: flex; gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) var(--space-md);
  background: var(--c-lighter-grey);
}
.stat-box {
  flex: 1;
  background: var(--c-white);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  text-align: center;
}
.stat-value { font-size: var(--font-size-xl); font-weight: 900; color: var(--c-orange); }
.stat-label { font-size: 10px; color: var(--c-grey); font-weight: 700; text-transform: uppercase; margin-top: 2px; }

/* ── 21. Utilities ───────────────────────────────────────── */
.text-orange   { color: var(--c-orange); }
.text-grey     { color: var(--c-grey); }
.text-muted    { color: var(--c-mid-grey); }
.text-sm       { font-size: var(--font-size-sm); }
.text-xs       { font-size: var(--font-size-xs); }
.text-bold     { font-weight: 700; }
.text-center   { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.p-md  { padding: var(--space-md); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── 22. Material Symbols Outlined ──────────────────────── */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  vertical-align: middle;
}
/* Active nav icons get filled weight */
.nav-item.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  color: var(--c-orange);
}
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
}
.nav-icon .material-symbols-outlined { font-size: 24px; }
.icon-sm .material-symbols-outlined,
.icon-sm { font-size: 18px; }
.icon-nav { font-size: 22px; }

/* ── 23. Changelog Screen ────────────────────────────────── */
.changelog-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--c-white);
}
.changelog-hero {
  background: linear-gradient(145deg, var(--c-black) 0%, #2a2a2a 100%);
  padding: calc(var(--safe-top) + var(--space-md)) var(--space-md) var(--space-lg);
  color: white;
  flex-shrink: 0;
}
.changelog-version-badge {
  display: inline-block;
  background: var(--c-orange);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: .04em;
  margin-bottom: var(--space-sm);
}
.changelog-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.changelog-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,.55);
}
.changelog-body {
  padding: var(--space-md);
}
.changelog-release {
  margin-bottom: var(--space-lg);
}
.changelog-release-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--c-lighter-grey);
}
.changelog-release-ver {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-orange);
}
.changelog-release-date {
  font-size: 12px;
  color: var(--c-grey);
}
.changelog-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid var(--c-lighter-grey);
}
.changelog-item:last-child { border-bottom: none; }
.changelog-item-dot {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.changelog-item-dot.done {
  background: var(--c-turquoise-bg);
  color: var(--c-turquoise);
}
.changelog-item-dot.coming {
  background: var(--c-baby-blue-bg);
  color: #5599CC;
}
.changelog-item-dot .material-symbols-outlined { font-size: 16px; }
.changelog-item-text {
  font-size: 14px;
  line-height: 1.45;
  padding-top: 4px;
  color: var(--c-dark-grey);
}
.changelog-coming-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  background: var(--c-baby-blue-bg);
  color: #5599CC;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
  margin-top: 4px;
}

/* ── 24. Responsive (large screens show centered card) ─── */
@media (min-width: 480px) {
  body {
    background: #E8E8E8;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #app {
    max-width: 430px;
    height: 100vh;
    box-shadow: var(--shadow-lg);
  }
}

/* ══════════════════════════════════════════════════════════
   v0.4.0 – Lunch Groups
   ══════════════════════════════════════════════════════════ */

/* ── Group Cards (Home Screen) ───────────────────────────── */
.group-list {
  padding: var(--space-sm) var(--space-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.group-card {
  background: var(--c-white);
  border: 1.5px solid var(--c-lighter-grey);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  active-state: none;
}
.group-card:active { transform: scale(.985); }
.group-card.is-member {
  border-color: var(--c-turquoise);
  background: var(--c-turquoise-bg);
}
.group-card.is-creator {
  border-color: var(--c-orange);
}
.group-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.group-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--c-orange-bg);
  color: var(--c-orange);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.group-card.is-member .group-card-icon {
  background: var(--c-turquoise-bg);
  color: var(--c-turquoise);
}
.group-card-title {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--c-black);
  line-height: 1.3;
}
.group-card-sub {
  font-size: var(--font-size-sm);
  color: var(--c-mid-grey);
  margin-top: 2px;
}
.group-card-footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}
.group-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
}
.status-open     { background: var(--c-turquoise-bg); color: var(--c-turquoise); }
.status-closed   { background: var(--c-lighter-grey); color: var(--c-grey); }
.status-driver   { background: var(--c-orange-bg);    color: var(--c-orange); }
.group-member-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--c-mid-grey);
}
.group-time-badge {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-dark-grey);
}

/* ── Create Group Screen ──────────────────────────────────── */
.create-group-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--c-white);
}
.time-chips {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}
.time-chip {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--c-light-grey);
  background: var(--c-white);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--dur) var(--ease);
}
.time-chip.selected {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: var(--c-white);
}

/* ── Group Detail Screen ──────────────────────────────────── */
.group-detail-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--c-white);
}
.group-detail-hero {
  background: linear-gradient(145deg, var(--c-black) 0%, #2a2a2a 100%);
  padding: calc(var(--safe-top) + var(--space-md)) var(--space-md) var(--space-lg);
  color: white;
  flex-shrink: 0;
}
.group-detail-restaurant {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.group-detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}
.group-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
}
.group-detail-notes {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin-top: var(--space-sm);
  font-style: italic;
}

/* ── Driver Draw ──────────────────────────────────────────── */
.driver-draw-section {
  margin: var(--space-md) var(--space-md) 0;
  border-radius: var(--radius-md);
}
.driver-result-card {
  background: linear-gradient(135deg, var(--c-orange) 0%, var(--c-orange-dark) 100%);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: white;
  text-align: center;
}
.driver-result-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  opacity: .8;
  margin-bottom: 4px;
}
.driver-result-name {
  font-size: 22px;
  font-weight: 900;
}
.driver-result-sub {
  font-size: 12px;
  opacity: .7;
  margin-top: 2px;
}
.driver-draw-btn {
  width: 100%;
  background: var(--c-black);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 16px var(--space-md);
  font-size: var(--font-size-md);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: opacity var(--dur) var(--ease);
}
.driver-draw-btn:active { opacity: .85; }
.driver-draw-btn:disabled { opacity: .4; cursor: not-allowed; }
.driver-draw-btn .spinner { width: 18px; height: 18px; display: none; }
.driver-draw-btn.loading .btn-text { opacity: 0; }
.driver-draw-btn.loading .spinner { display: block; }

/* ── Member List ──────────────────────────────────────────── */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.member-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  border-bottom: 1px solid var(--c-lighter-grey);
}
.member-row:last-child { border-bottom: none; }
.member-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-orange);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.member-avatar.turquoise { background: var(--c-turquoise); }
.member-avatar.grey { background: var(--c-light-grey); color: var(--c-dark-grey); }
.member-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}
.member-agency {
  font-size: 11px;
  color: var(--c-grey);
}
.member-driver-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: var(--c-orange-bg);
  color: var(--c-orange);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
.member-no-drive {
  font-size: 11px;
  color: var(--c-grey);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.member-actions {
  display: flex;
  gap: 6px;
}
.member-kick-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-error-bg);
  color: var(--c-error);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.member-kick-btn .material-symbols-outlined { font-size: 16px; }

/* ── Member order note ───────────────────────────────────── */
.member-order-note {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--c-mid-grey);
  margin-top: 3px;
  flex-wrap: wrap;
}
.member-note-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-grey);
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}
.member-note-edit-btn:hover { color: var(--c-orange); }
.member-note-add-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-turquoise);
  font-size: 12px;
  padding: 0;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  touch-action: manipulation;
}

/* ── Order list (Einkaufsliste) ──────────────────────────── */
.order-list {
  background: var(--c-lighter-grey);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-top: 4px;
}
.order-row {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--c-light-grey);
}
.order-row:last-child { border-bottom: none; }
.order-name {
  font-weight: 600;
  color: var(--c-dark-grey);
  min-width: 80px;
  flex-shrink: 0;
}
.order-note { color: var(--c-mid-grey); }

/* ── Driver draw warning ─────────────────────────────────── */
.driver-draw-warning {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #856404;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  margin-bottom: 8px;
}

/* ── Info tab section divider ────────────────────────────── */
.status-section-divider {
  height: 1px;
  background: var(--c-lighter-grey);
  margin: 8px 0;
}

/* ── Collapsible group sections in Info tab ───────────────── */
.group-section { }
.group-section[open] .group-section-chevron {
  transform: rotate(180deg);
}
.group-section-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-grey);
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.group-section-summary::-webkit-details-marker { display: none; }
.group-section-summary .material-symbols-outlined { font-size: 16px; }
.group-section-count {
  font-weight: 400;
  opacity: 0.6;
  font-size: 0.9em;
}
.group-section-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
  line-height: 1;
}
.group-section-rows {
  padding-bottom: var(--space-sm);
}

/* ── PWA standalone: compact nav bar ─────────────────────── */
/*
 * In Safari, env(safe-area-inset-bottom) is effectively 0 because the
 * browser's own chrome handles the home-indicator gap.
 * In standalone/PWA mode it is ~34 px (Face ID iPhones), so the bottom-nav
 * grows noticeably. We tighten the bar's *own* padding to compensate:
 *   original  → 4px (top) + items + max(4px, 34px) = ~84px
 *   standalone → 0px (top) + items + env(…)      = ~80px
 * The safe-area zone itself cannot be removed (home-indicator requirement).
 */
@media (display-mode: standalone) {
  .bottom-nav {
    padding-top: 6px;   /* small counterweight so icons appear centred above safe-area zone */
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .nav-item {
    padding: 5px 0 3px;
  }
}

/* ── Action Bar (Join / Leave / Delete) ──────────────────── */
.group-action-bar {
  padding: var(--space-sm) var(--space-md) calc(var(--space-sm) + var(--safe-bottom));
  border-top: 1px solid var(--c-lighter-grey);
  background: var(--c-white);
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}
.group-action-bar .btn { margin-top: 0; }

/* ── Admin badge ──────────────────────────────────────────── */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: #1a1a1a;
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

/* ── Group list loading indicator ────────────────────────── */
.group-list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 16px;
  color: var(--c-mid-grey);
  font-size: var(--font-size-sm);
}

/* ── Group card bottom stats ─────────────────────────────── */
.group-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--font-size-xs);
  color: var(--c-mid-grey);
}
.group-card-notes {
  margin-top: 8px;
  padding: 6px 8px;
  background: var(--c-lighter-grey);
  border-radius: var(--radius-xs);
  font-size: var(--font-size-xs);
  color: var(--c-dark-grey);
  line-height: 1.4;
}

/* ── Group detail header ─────────────────────────────────── */
.group-detail-header {
  padding: var(--space-md);
  background: var(--c-white);
  border-bottom: 1px solid var(--c-lighter-grey);
}
.group-detail-restaurant {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--c-black);
  margin-bottom: 8px;
}
.group-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-sm);
  color: var(--c-mid-grey);
}
.group-detail-meta .material-symbols-outlined { font-size: 15px; }
.group-detail-notes {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--c-lighter-grey);
  border-radius: var(--radius-xs);
  font-size: var(--font-size-sm);
  color: var(--c-dark-grey);
  line-height: 1.5;
}

/* ── Driver section wrapper ──────────────────────────────── */
.driver-section {
  padding: 0 var(--space-md) var(--space-md);
}

/* ── Create group: time chips ────────────────────────────── */
.time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.time-chips .chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--c-light-grey);
  background: var(--c-white);
  color: var(--c-dark-grey);
  font-size: var(--font-size-sm);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all .15s ease;
}
.time-chips .chip.selected {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: white;
  font-weight: 600;
}

/* ── Create group: info box ──────────────────────────────── */
.cg-info-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--c-baby-blue-bg);
  border-radius: var(--radius-xs);
  font-size: var(--font-size-sm);
  color: var(--c-dark-grey);
  line-height: 1.5;
  margin-top: var(--space-md);
}
.cg-info-box .material-symbols-outlined {
  font-size: 18px;
  color: var(--c-turquoise);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── canDrive toggle icon ─────────────────────────────────── */
.drive-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-lighter-grey);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease;
}
.drive-icon {
  font-size: 18px !important;
  color: var(--c-grey);
  transition: color .15s ease;
}
.drive-icon.active {
  color: var(--c-turquoise);
}

/* ── Time field with label ───────────────────────────────── */
.time-field-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.time-field-hint {
  font-size: var(--font-size-sm);
  color: var(--c-mid-grey);
}

/* ══════════════════════════════════════════════════════════
   v0.4.x – "Bin versorgt" Status Feature
   ══════════════════════════════════════════════════════════ */

/* ── "Bin versorgt" extended FAB (bottom-left, mirrored with the + FAB) ── */
.fab-versorgt {
  position: absolute;
  bottom: calc(64px + var(--safe-bottom));
  left: var(--space-md);
  height: 48px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-full);
  border: 2px solid var(--c-light-grey);
  background: var(--c-white);
  color: var(--c-mid-grey);
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
  z-index: 10;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-md);
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.fab-versorgt:active { transform: scale(.95); }
.fab-versorgt.active {
  border-color: var(--c-turquoise);
  background: var(--c-turquoise-bg);
  color: #2E9B7D;
  box-shadow: 0 4px 20px rgba(120,191,169,.35);
}
.fab-versorgt .material-symbols-outlined {
  font-size: 20px;
}
.fab-versorgt.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* ── Status chip (Info screen hero only) ──────────────────── */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.15);
  color: white;
  font-size: var(--font-size-sm);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: all var(--dur) var(--ease);
  align-self: flex-start;
}
.status-chip:active { transform: scale(.95); }
.status-chip.active {
  border-color: white;
  background: rgba(255,255,255,.28);
  color: white;
}
.status-chip .material-symbols-outlined { font-size: 18px; }
.status-chip.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* ── Info Screen ──────────────────────────────────────────── */
.info-hero {
  background: linear-gradient(145deg, #1a5c4a 0%, var(--c-turquoise) 100%);
  padding: calc(var(--safe-top) + var(--space-md)) var(--space-md) var(--space-lg);
  color: white;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.info-hero-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: 800;
}
.info-hero-title .material-symbols-outlined {
  font-size: 26px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.info-hero-sub {
  font-size: var(--font-size-sm);
  opacity: .75;
  margin-top: 4px;
}

/* ── Status overview list ─────────────────────────────────── */
.status-overview-list {
  padding: var(--space-sm) var(--space-md) 0;
}
.status-overview-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #2E9B7D;
  padding: var(--space-md) 0 var(--space-sm);
}
.status-overview-count .material-symbols-outlined {
  font-size: 16px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.status-overview-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px 0;
  border-bottom: 1px solid var(--c-lighter-grey);
}
.status-overview-row:last-child { border-bottom: none; }
.status-overview-info {
  flex: 1;
  min-width: 0;
}
.status-overview-name {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--c-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-overview-agency {
  font-size: var(--font-size-xs);
  color: var(--c-grey);
  margin-top: 2px;
}
.status-overview-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #2E9B7D;
  background: var(--c-turquoise-bg);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.status-overview-badge .material-symbols-outlined {
  font-size: 14px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.status-overview-badge--group {
  color: var(--c-primary);
  background: rgba(229, 57, 53, 0.08);
}
.status-overview-badge--unknown {
  color: var(--c-grey);
  background: var(--c-lighter-grey);
}
/* Multi-badge wrapper for users in multiple groups */
.status-overview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  flex-shrink: 0;
  max-width: 58%;
}

/* ── Collapsible "Keine Rückmeldung"-Sektion ──────────────── */
.status-inactive-section {
  margin: var(--space-md) 0 0;
  border-top: 1px solid var(--c-lighter-grey);
}
.status-inactive-section[open] .status-inactive-chevron {
  transform: rotate(180deg);
}
.status-inactive-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) 0;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-grey);
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.status-inactive-summary::-webkit-details-marker { display: none; }
.status-inactive-summary .material-symbols-outlined {
  font-size: 16px;
}
.status-inactive-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
  line-height: 1;
}
.status-inactive-list {
  padding-bottom: var(--space-sm);
}

/* ══════════════════════════════════════════════════════════
   v0.6.0 – Speisekarten (Menus)
   ══════════════════════════════════════════════════════════ */

/* ── Menus Screen Hero ────────────────────────────────────── */
.menus-hero {
  background: linear-gradient(145deg, var(--c-black) 0%, #2a2a2a 100%);
  padding: calc(var(--safe-top) + var(--space-md)) var(--space-md) var(--space-lg);
  color: white;
  flex-shrink: 0;
}
.menus-hero-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-lg);
  font-weight: 800;
}
.menus-hero-title .material-symbols-outlined {
  font-size: 26px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.menus-hero-date {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}

/* ── Menu Cards ───────────────────────────────────────────── */
.menus-list {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.menu-card {
  background: var(--c-white);
  border: 1.5px solid var(--c-lighter-grey);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.menu-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
}
.menu-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--c-orange-bg);
  color: var(--c-orange);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}
.menu-card-info { flex: 1; min-width: 0; }
.menu-card-name {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: var(--c-black);
}
.menu-card-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--c-grey);
  margin-top: 2px;
}
.menu-card-photo {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
  border-top: 1px solid var(--c-lighter-grey);
  border-bottom: 1px solid var(--c-lighter-grey);
}
.menu-card-photo--zoomable {
  cursor: zoom-in;
}

/* ── Photo Lightbox ─────────────────────────────────────────────────────── */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.photo-lightbox--open {
  opacity: 1;
}
.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
}
.photo-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox-content img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.photo-lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  color: var(--c-dark);
}
.menu-card-text {
  padding: var(--space-md);
  border-top: 1px solid var(--c-lighter-grey);
}
.menu-card-line {
  font-size: var(--font-size-sm);
  color: var(--c-dark-grey);
  line-height: 1.65;
  padding: 1px 0;
}
.menu-card-line:empty { display: none; }

/* ── Auto-Import Text Body (REWE auto-grab) ──────────────── */
.menu-card-auto-body {
  padding: var(--space-md) var(--space-md) var(--space-sm);
  border-top: 1px solid var(--c-lighter-grey);
}
.menu-card-auto-dish {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--c-black);
  line-height: 1.5;
}
.menu-card-auto-body--pending .menu-card-auto-dish {
  color: var(--c-grey);
  font-weight: 400;
  font-style: italic;
}
.menu-card-auto-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: var(--space-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-grey);
}
.menu-card-auto-badge .material-symbols-outlined {
  font-size: 13px;
}

/* ── REWE Week-View Rows ─────────────────────────────────── */
.menu-card-week-list {
  display: flex;
  flex-direction: column;
}
.menu-card-week-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px var(--space-sm);
  border-bottom: 1px solid var(--c-lighter-grey);
  border-radius: 6px;
}
.menu-card-week-row:last-child {
  border-bottom: none;
}
.menu-card-week-day {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--c-grey);
  letter-spacing: .03em;
}
.menu-card-week-dish {
  font-size: var(--font-size-sm);
  color: var(--c-black);
  line-height: 1.4;
}
.menu-card-week-price {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--c-mid-grey);
  white-space: nowrap;
}
/* Highlight today's row */
.menu-card-week-row--today {
  background: var(--c-orange-bg);
  border-bottom-color: transparent;
}
.menu-card-week-row--today .menu-card-week-day {
  color: var(--c-orange);
  font-weight: 800;
}
.menu-card-week-row--today .menu-card-week-dish {
  font-weight: 600;
}
.menu-card-week-row--today .menu-card-week-price {
  color: var(--c-orange);
  font-weight: 700;
}

/* ── Menu Upload Screen ───────────────────────────────────── */
.photo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-md);
  border: 2px dashed var(--c-light-grey);
  border-radius: var(--radius-md);
  background: var(--c-lighter-grey);
  cursor: pointer;
  touch-action: manipulation;
  transition: all var(--dur) var(--ease);
  text-align: center;
}
.photo-upload-area:active {
  background: var(--c-baby-blue-bg);
  border-color: var(--c-turquoise);
}
.photo-upload-icon { color: var(--c-grey); }
.photo-upload-hint {
  font-size: var(--font-size-sm);
  color: var(--c-mid-grey);
  font-weight: 600;
}

.photo-preview {
  width: 100%;
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
  max-height: 260px;
  object-fit: cover;
  border: 1.5px solid var(--c-lighter-grey);
}

/* OCR Progress bar */
.ocr-progress-bar {
  height: 4px;
  background: var(--c-lighter-grey);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-sm);
}
.ocr-progress-fill {
  height: 100%;
  background: var(--c-orange);
  border-radius: var(--radius-full);
  transition: width .2s ease;
  width: 0%;
}
.ocr-status {
  font-size: var(--font-size-xs);
  color: var(--c-mid-grey);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  margin-left: var(--space-sm);
}

/* Location chips in upload form */
.location-chips {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

/* ── Update Overlay ─────────────────────────────────────────────────────── */
#update-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  animation: overlay-in .25s var(--ease) forwards;
}
#update-overlay.update-overlay-hiding {
  animation: overlay-out .25s var(--ease) forwards;
}
@keyframes overlay-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlay-out { to   { opacity: 0; } }

.update-overlay-card {
  background: var(--c-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 32px 24px 40px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: sheet-in .3s var(--ease) forwards;
}
@keyframes sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } }

.update-overlay-icon {
  width: 56px;
  height: 56px;
  background: var(--c-orange-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-orange);
  margin-bottom: 4px;
}
.update-overlay-icon .material-symbols-outlined {
  font-size: 28px;
}
.update-overlay-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--c-black);
  text-align: center;
}
.update-overlay-body {
  font-size: var(--font-size-sm);
  color: var(--c-mid-grey);
  text-align: center;
  line-height: 1.5;
  max-width: 300px;
}
.update-overlay-btn {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.update-overlay-later {
  background: none;
  border: none;
  color: var(--c-grey);
  font-size: var(--font-size-sm);
  padding: 8px 16px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.update-overlay-later:hover { color: var(--c-mid-grey); }

/* ============================================================
   SKELETON LOADER  (v1.0.0)
   ============================================================ */
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  height: 88px;
  margin: 0 16px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

/* ============================================================
   OFFLINE BANNER  (v1.0.0)
   ============================================================ */
#offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #1c1c1e;
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .1px;
  transform: translateY(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#offline-banner.visible {
  transform: translateY(0);
}
