/* =====================================================
   Fischer Cockpit – Stylesheet
   ===================================================== */

:root {
  --c-primary: #203c33;
  --c-primary-dark: #172d26;
  --c-primary-light: #365548;
  --c-accent: #376551;
  --c-accent-dark: #284e3f;
  --c-warm: #806019;
  --c-warm-dark: #74531a;
  --c-danger: #b13e36;
  --c-danger-bg: #fbeceb;
  --c-success: #3c7351;
  --c-success-bg: #eaf2e9;
  --c-info: #41677c;
  --c-info-bg: #eaf1f5;
  --c-bg: #f6f7f3;
  --c-surface: #ffffff;
  --c-text: #202a29;
  --c-text-muted: #59655e;
  --c-text-soft: #6b786e;
  --c-border: #dce0d9;
  --c-border-strong: #bac6bb;
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;
  --sh-sm: 0 1px 2px rgba(32,60,51,0.06);
  --sh-md: 0 4px 12px rgba(32,60,51,0.08);
  --sh-lg: 0 12px 32px rgba(32,60,51,0.12);
  --t: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--c-primary);
}

[v-cloak] { display: none; }

/* === SCREENS / SHELLS === */
.screen-center {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--c-bg) 0%, #fff 100%);
  padding: 24px;
}

.brand-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
}
.brand-logo.center { justify-content: center; }
.brand-logo strong { font-size: 1.1rem; color: var(--c-primary); display: block; }
.brand-logo small { display: block; font-size: 0.72rem; color: var(--c-text-muted); letter-spacing: 0.06em; text-transform: uppercase; }

.logo-mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  border-radius: var(--r-md);
  color: white; font-family: var(--font-display); font-weight: 800;
}

.login-card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  width: 100%; max-width: 400px;
  box-shadow: var(--sh-md);
}

.config-warning {
  margin-top: 20px;
  padding: 14px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  color: #78350f;
}
.config-warning strong { display: block; margin-bottom: 4px; }
.config-warning code { background: rgba(0,0,0,0.06); padding: 1px 4px; border-radius: 3px; }

.error {
  background: var(--c-danger-bg);
  color: var(--c-danger);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

/* === APP === */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--c-primary);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-display);
}
.sidebar-brand strong { font-size: 1rem; color: white; display: block; }
.sidebar-brand small { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.5); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 2px; }

.user-block {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--r-md);
}
.user-meta strong { display: block; font-size: 0.9rem; color: white; }
.user-meta span { display: block; font-size: 0.75rem; color: rgba(255,255,255,0.6); }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav-divider {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin: 14px 12px 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 880px) { .side-nav-divider { display: none; } }

.side-nav-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem; font-weight: 500;
  text-align: left;
  transition: all var(--t);
}
.side-nav-btn:hover { background: rgba(255,255,255,0.06); color: white; }
.side-nav-btn.active {
  background: rgba(55,101,81,0.15);
  color: white;
  border-left: 3px solid var(--c-accent);
  padding-left: 9px;
}
.side-nav-btn.logout {
  margin-top: auto;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
}

.badge-num {
  margin-left: auto;
  background: var(--c-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
}
.badge-num.warm { background: var(--c-warm); }
.badge-num.info { background: var(--c-info); }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-display); font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.main {
  padding: 32px 40px 80px;
  width: 100%;
  max-width: 1280px;
}

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative; height: auto;
    flex-direction: row; gap: 12px;
    padding: 12px 16px;
    overflow-x: auto;
  }
  .sidebar-brand, .user-block { flex-shrink: 0; padding: 6px; border: none; }
  .side-nav { flex-direction: row; gap: 6px; }
  .side-nav-btn { padding: 8px 12px; white-space: nowrap; font-size: 0.85rem; }
  .side-nav-btn.active { padding-left: 12px; border-left: none; border-bottom: 3px solid var(--c-accent); border-radius: 0; }
  .side-nav-btn.logout { margin-top: 0; margin-left: auto; }
  .main { padding: 20px; }
}

/* === PAGE === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.page-title h1 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin-bottom: 4px; }
.page-title p { color: var(--c-text-muted); font-size: 0.95rem; }
.page-actions { display: flex; gap: 8px; }

/* === CARDS === */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.card-head h3 { font-size: 1.05rem; }
.card-head p { color: var(--c-text-muted); font-size: 0.85rem; }

/* === GRID === */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-aside { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2,1fr);} .grid-aside { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* === KPI === */
.kpi {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.kpi-label { font-size: 0.78rem; color: var(--c-text-muted); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 12px; }
.kpi-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--c-primary); line-height: 1; display: flex; align-items: baseline; gap: 6px; }
.kpi-value small { font-size: 0.85rem; font-weight: 500; color: var(--c-text-muted); }
.kpi-trend { margin-top: 8px; font-size: 0.78rem; color: var(--c-text-muted); }
.kpi.accent { background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%); border-color: var(--c-primary); }
.kpi.accent .kpi-label { color: rgba(255,255,255,0.7); }
.kpi.accent .kpi-value { color: white; }
.kpi.accent .kpi-value small { color: rgba(255,255,255,0.6); }

/* === LIST ITEMS === */
.list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
}
.list-item:last-child { border-bottom: none; }
.list-item-content { flex: 1; min-width: 0; }
.list-item-content strong { display: block; color: var(--c-primary); font-weight: 600; font-size: 0.95rem; }
.list-item-content span { display: block; font-size: 0.8rem; color: var(--c-text-muted); margin-top: 2px; }

/* === STATUS BADGES === */
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 0.72rem; font-weight: 600;
}
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.success { background: var(--c-success-bg); color: var(--c-success); }
.status.danger { background: var(--c-danger-bg); color: var(--c-danger); }
.status.warm { background: rgba(232,177,78,0.15); color: var(--c-warm-dark); }
.status.info { background: var(--c-info-bg); color: var(--c-info); }
.status.muted { background: var(--c-bg); color: var(--c-text-muted); }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem; font-weight: 600;
  border-radius: var(--r-md);
  transition: all var(--t);
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--c-primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--c-primary-dark); }
.btn-accent { background: var(--c-accent); color: white; }
.btn-accent:hover:not(:disabled) { background: var(--c-accent-dark); }
.btn-warm { background: var(--c-warm); color: var(--c-primary); }
.btn-warm:hover:not(:disabled) { background: var(--c-warm-dark); color: white; }
.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-border-strong); }
.btn-outline:hover:not(:disabled) { border-color: var(--c-primary); }
.btn-danger { background: var(--c-danger-bg); color: var(--c-danger); }
.btn-danger:hover:not(:disabled) { background: var(--c-danger); color: white; }
.btn-ghost { color: var(--c-text-muted); padding: 8px 12px; }
.btn-ghost:hover { color: var(--c-primary); background: var(--c-bg); }
.btn-lg { padding: 13px 22px; font-size: 0.98rem; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; }

.actions-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* === FORMS === */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--c-primary); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.95rem;
  background: white;
  color: var(--c-text);
  transition: border-color var(--t);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(55,101,81,0.12);
}
.field textarea { resize: vertical; min-height: 80px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }

/* === STAFF JOB LIST === */
.job-list { max-width: 600px; }
.staff-job {
  background: white;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all var(--t);
}
.staff-job:hover { border-color: var(--c-accent); box-shadow: var(--sh-sm); transform: translateY(-1px); }
.staff-job-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; gap: 10px; }
.staff-job-title { font-family: var(--font-display); font-weight: 700; color: var(--c-primary); font-size: 1rem; }
.staff-job-meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--c-text-muted); flex-wrap: wrap; }

/* === CHECKLIST === */
.checklist-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: opacity var(--t);
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item.done { opacity: 0.55; }
.checklist-item.done .check-box { background: var(--c-accent); border-color: var(--c-accent); color: white; }
.checklist-item.done .check-text strong { text-decoration: line-through; }
.check-box {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 2px solid var(--c-border-strong);
  display: grid; place-items: center;
  flex-shrink: 0;
  transition: all var(--t);
  margin-top: 2px;
  background: white;
}
.check-box svg { opacity: 0; transition: opacity var(--t); color: white; }
.checklist-item.done .check-box svg { opacity: 1; }
.check-text strong { display: block; font-size: 0.95rem; color: var(--c-primary); font-weight: 600; }
.check-text span { display: block; font-size: 0.78rem; color: var(--c-text-muted); margin-top: 2px; }

/* === TIMER BAR === */
.timer-bar {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  color: white;
  border-radius: var(--r-md);
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.timer-bar strong { font-family: var(--font-display); font-size: 1.4rem; }
.timer-bar .timer-label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; display: block; margin-bottom: 2px; }

/* === PHOTO GRID === */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photo-tile {
  aspect-ratio: 4/3;
  background: var(--c-bg);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 0.78rem;
  color: var(--c-text-muted);
  text-align: center;
  padding: 10px;
  cursor: pointer;
  overflow: hidden;
}
.photo-tile.has {
  background: var(--c-bg);
  border: none;
  padding: 0;
}
.photo-tile.has img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile.add-tile:hover { border-color: var(--c-accent); color: var(--c-accent-dark); }

/* === FEED === */
.feed-item {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
}
.feed-item:last-child { border-bottom: none; }
.feed-item.small { padding: 8px 0; }
.feed-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.feed-icon.success { background: var(--c-success-bg); color: var(--c-success); }
.feed-icon.warm { background: rgba(232,177,78,0.15); color: var(--c-warm-dark); }
.feed-icon.danger { background: var(--c-danger-bg); color: var(--c-danger); }
.feed-icon.info { background: var(--c-info-bg); color: var(--c-info); }
.feed-icon.muted { background: var(--c-bg); color: var(--c-text-muted); }
.feed-content { flex: 1; }
.feed-content strong { display: block; font-size: 0.92rem; color: var(--c-primary); font-weight: 600; }
.feed-content span { display: block; font-size: 0.82rem; color: var(--c-text-muted); margin-top: 2px; }
.feed-content time { font-size: 0.72rem; color: var(--c-text-soft); margin-top: 4px; display: block; }

/* === TABLE === */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--c-text-muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--c-border); }
.tbl td { padding: 14px; border-bottom: 1px solid var(--c-border); font-size: 0.9rem; color: var(--c-text); }
.tbl tr:hover td { background: var(--c-bg); }
.tbl-obj-name { font-weight: 600; color: var(--c-primary); }
.tbl-obj-name span { display: block; font-weight: 400; font-size: 0.78rem; color: var(--c-text-muted); margin-top: 2px; }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(32,60,51,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal {
  background: white;
  border-radius: var(--r-lg);
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--sh-lg);
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--c-border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head h3 { font-size: 1.05rem; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--c-border); display: flex; justify-content: flex-end; gap: 8px; }
.close-btn {
  width: 32px; height: 32px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--c-text-muted);
  font-size: 1.4rem;
  line-height: 1;
}
.close-btn:hover { background: var(--c-bg); color: var(--c-primary); }

/* === TOAST === */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--c-primary);
  color: white;
  padding: 14px 20px;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: all 300ms ease;
  max-width: 380px;
  font-weight: 500;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--c-success); }
.toast.danger { background: var(--c-danger); }

/* === MISC === */
.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--c-text-muted);
  font-size: 0.9rem;
}
.empty svg { display: block; margin: 0 auto 12px; color: var(--c-text-soft); }
.divider { height: 1px; background: var(--c-border); margin: 14px 0; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.text-muted { color: var(--c-text-muted); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

/* ============= TASKS / TODO ============= */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: background 120ms, border-color 120ms;
}
.task-item:hover {
  background: var(--c-bg);
  border-color: var(--c-border-strong);
}
.task-item.task-done {
  opacity: 0.7;
}
.task-item.task-overdue {
  border-left: 3px solid var(--c-danger);
}
.task-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
  cursor: pointer;
}
.task-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--c-accent);
}
.task-bullet {
  font-size: 1.3rem;
  line-height: 1;
  padding-top: 2px;
}
.task-bullet.success { color: var(--c-success); }
.task-bullet.danger { color: var(--c-danger); }
.task-bullet.info { color: var(--c-info); }
.task-bullet.muted { color: var(--c-text-soft); }
.task-content { min-width: 0; }
.task-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.chip:hover {
  background: var(--c-bg);
}
.chip.chip-active:hover {
  background: var(--c-accent-dark) !important;
}
.modal-lg .modal { max-width: 720px; }
.btn-danger {
  background: var(--c-danger);
  color: white;
  border-color: var(--c-danger);
}
.btn-danger:hover {
  background: #dc2626;
}

/* ============= FAB / VOICE QUICK ADD ============= */
.fab-voice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-dark) 100%);
  color: white;
  border: none;
  box-shadow: 0 8px 24px rgba(40,78,63,0.4), 0 4px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms, box-shadow 150ms;
  z-index: 50;
}
.fab-voice:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(40,78,63,0.5), 0 4px 8px rgba(0,0,0,0.12);
}
.fab-voice:active {
  transform: scale(0.98);
}

.voice-recorder {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--c-bg);
  border-radius: var(--r-md);
  margin-bottom: 12px;
}
.voice-indicator {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--c-border);
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 200ms, color 200ms;
}
.voice-indicator.recording {
  background: var(--c-danger);
  color: white;
}
.voice-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--c-danger);
  opacity: 0.6;
  animation: voice-pulse 1.2s ease-out infinite;
}
@keyframes voice-pulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 0; }
}
.voice-status strong {
  font-size: 1rem;
  color: var(--c-text);
}
.voice-transcript {
  padding: 12px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  min-height: 60px;
  font-size: 1rem;
  line-height: 1.5;
}
.voice-result {
  padding: 12px 14px;
  background: var(--c-info-bg);
  border-left: 3px solid var(--c-info);
  border-radius: var(--r-md);
  margin-top: 12px;
}
.voice-result-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================================ */
/* MOBILE-FIRST REDESIGN (iPhone Safari)                        */
/* ============================================================ */

/* Bottom-Nav ist standardmäßig versteckt — nur auf Mobile sichtbar */
.bottom-nav {
  display: none;
}
.mobile-sheet-overlay { display: flex; }
.mobile-sheet {
  background: var(--c-surface);
  width: 100%;
  max-width: 480px;
  margin: auto auto 0;
  border-radius: 20px 20px 0 0;
  padding: 8px 0 24px;
  max-height: 85vh;
  overflow-y: auto;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
}
.mobile-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--c-border-strong);
  border-radius: 2px;
  margin: 6px auto 14px;
}
.mobile-sheet-head {
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 8px;
}
.mobile-sheet-body {
  padding: 0 12px;
}
.more-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--c-text);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 120ms;
  min-height: 52px;
}
.more-menu-item:hover, .more-menu-item.active {
  background: var(--c-bg);
}
.more-menu-item.active {
  color: var(--c-accent-dark);
  font-weight: 600;
}
.more-menu-item .nav-badge {
  margin-left: auto;
}
.more-menu-item.logout {
  color: var(--c-danger);
}
.more-menu-divider {
  height: 1px;
  background: var(--c-border);
  margin: 14px 16px 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-soft);
  font-weight: 700;
  padding-top: 6px;
  background: transparent;
  border-top: 1px solid var(--c-border);
}

/* Nav-Badge */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--c-text-soft);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
}
.nav-badge.info   { background: var(--c-info); }
.nav-badge.warm   { background: var(--c-warm); }
.nav-badge.danger { background: var(--c-danger); }
.nav-badge.success{ background: var(--c-success); }

/* ===== MOBILE Breakpoint (≤768px) ===== */
@media (max-width: 768px) {
  body {
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: contain;
  }

  /* Sidebar verschwindet */
  .sidebar { display: none !important; }

  /* App-Layout wird einspaltig */
  .app {
    display: block !important;
    min-height: 100vh;
  }

  /* Main belegt volle Breite + Platz für Bottom-Nav unten */
  .main {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 16px 14px calc(90px + env(safe-area-inset-bottom, 0)) !important;
    min-height: 100vh;
  }

  /* Bottom-Nav anzeigen */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(64px + env(safe-area-inset-bottom, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.05);
    z-index: 40;
    justify-content: space-around;
    align-items: stretch;
  }
  .bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    background: transparent;
    border: none;
    color: var(--c-text-soft);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 120ms;
    min-height: 64px;
  }
  .bottom-nav-btn svg {
    width: 22px;
    height: 22px;
  }
  .bottom-nav-btn span:not(.nav-badge) {
    line-height: 1.1;
  }
  .bottom-nav-btn.active {
    color: var(--c-accent-dark);
  }
  .bottom-nav-btn.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--c-accent);
    border-radius: 0 0 3px 3px;
  }
  .bottom-nav-btn .nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 22px);
    margin: 0;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  /* FAB rückt über die Bottom-Nav */
  .fab-voice {
    bottom: calc(80px + env(safe-area-inset-bottom, 0));
    right: 16px;
    width: 56px;
    height: 56px;
  }

  /* Headers schlanker */
  .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
    margin-bottom: 12px !important;
  }
  .page-header h1 {
    font-size: 1.4rem !important;
    line-height: 1.2;
  }
  .page-header p {
    font-size: 0.85rem;
    margin: 0;
  }

  /* Karten kompakter */
  .card {
    padding: 14px !important;
    margin-bottom: 12px;
    border-radius: 14px !important;
  }
  .card-head {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
    margin-bottom: 10px;
  }
  .card-head h3 {
    font-size: 1.05rem !important;
  }

  /* Touch-Targets: alle Buttons min. 44px hoch */
  .btn {
    min-height: 44px !important;
    padding: 10px 16px !important;
    font-size: 0.95rem !important;
  }
  .btn-sm {
    min-height: 38px !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }
  .btn-block, .btn-lg {
    min-height: 50px !important;
    font-size: 1rem !important;
  }

  /* Inputs größer für Touch */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="tel"], input[type="number"], input[type="date"],
  input[type="time"], textarea, select {
    font-size: 16px !important; /* verhindert iOS-Auto-Zoom */
    padding: 12px 14px !important;
    min-height: 44px;
    border-radius: 10px !important;
  }
  textarea { min-height: 80px; }

  /* Modal als Bottom-Sheet */
  .modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  .modal, .modal-lg .modal {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92vh !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .modal-body {
    padding: 16px !important;
    -webkit-overflow-scrolling: touch;
  }
  .modal-head {
    padding: 14px 16px !important;
    position: sticky;
    top: 0;
    background: var(--c-surface);
    z-index: 2;
    border-bottom: 1px solid var(--c-border);
  }
  .modal-head h3 {
    font-size: 1.05rem;
  }
  .close-btn {
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
  }
  .modal-foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0)) !important;
    border-top: 1px solid var(--c-border);
    background: var(--c-surface);
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .modal-foot .btn { flex: 1 1 auto; }

  /* Tabellen werden zu Karten via [data-mobile-card] */
  .tbl {
    font-size: 0.9rem;
  }
  /* Tabellen ohne explizites Karten-Markup: trotzdem scrollbar machen */
  .tbl-wrap, [style*="overflow-x:auto"] {
    margin: 0 -14px;
    padding: 0 14px;
  }

  /* Staff-Job-Karten größer für Daumen */
  .staff-job {
    padding: 16px !important;
    margin-bottom: 10px;
    border-radius: 14px;
  }
  .staff-job-title {
    font-size: 1.05rem;
  }

  /* Task-Items mit größeren Touch-Targets */
  .task-item {
    padding: 14px !important;
    gap: 12px;
  }
  .task-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
  }

  /* Filter-Buttons als horizontal scrollbarer Streifen */
  .filter-row {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px !important;
    padding: 4px 14px !important;
    scrollbar-width: none;
  }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-row .btn { flex-shrink: 0; }

  /* Login-Card responsive */
  .login-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 20px !important;
    border-radius: 16px !important;
    margin: 16px !important;
  }
  .screen-center {
    padding: 16px;
  }

  /* Status-Pills kompakter */
  .status {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  /* Feed-Items kompakter */
  .feed-item {
    padding: 12px !important;
    gap: 10px !important;
  }
  .feed-icon {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0;
  }

  /* Actions-Row stapelt auf engen Screens */
  .actions-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .actions-row .btn {
    flex: 1 1 calc(50% - 4px);
  }

  /* Mobile-Sheet ist die Standard-Variante für alle Modal-Overlays */
  .modal-lg { /* schon abgedeckt durch globales .modal */ }

  /* Voice-Modal: spezifisch */
  .voice-recorder {
    flex-direction: column;
    text-align: center;
    padding: 24px 16px;
  }
  .voice-indicator {
    width: 80px;
    height: 80px;
  }
  .voice-indicator svg {
    width: 36px;
    height: 36px;
  }
}

/* ===== Sehr schmale Bildschirme (≤375px = iPhone SE) ===== */
@media (max-width: 380px) {
  .bottom-nav-btn span:not(.nav-badge) {
    font-size: 0.62rem;
  }
  .page-header h1 { font-size: 1.25rem !important; }
}

/* Klickbare Feed-Items */
.feed-item-clickable {
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.feed-item-clickable:hover {
  background: var(--c-bg);
}
.feed-item-clickable:active {
  transform: scale(0.998);
}

/* ============= SCHICHT-STATUS-KARTE ============= */
.shift-status {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.shift-status.shift-active {
  border-left: 4px solid var(--c-accent);
  background: linear-gradient(180deg, rgba(55,101,81,0.04), var(--c-surface));
}
.shift-inactive, .shift-active-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shift-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-bg);
  color: var(--c-text-muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.shift-info { flex: 1; }
.shift-info strong { display: block; font-size: 1rem; }
.shift-timer {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-accent-dark);
  letter-spacing: -0.5px;
}
.shift-gps-stats {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--c-text-muted);
}
.shift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.shift-actions .btn { flex: 1 1 auto; min-width: 110px; }

@media (max-width: 768px) {
  .shift-active-top { flex-wrap: wrap; }
  .shift-timer { width: 100%; text-align: center; margin-top: 6px; }
  .shift-actions .btn { flex: 1 1 calc(50% - 4px); }
  /* Schicht-Start-Auswahl auf Mobile kompakter */
  .radio-card { padding: 10px 12px !important; }
  .radio-card strong { font-size: 0.95rem; }
  .radio-card .text-sm { font-size: 0.8rem; line-height: 1.3; }
}

/* Minimierte aktive Schicht: nur eine Mini-Leiste */
.shift-status.shift-collapsed {
  padding: 8px 12px;
  margin-bottom: 12px;
}
.shift-status.shift-collapsed .shift-active-top {
  gap: 8px;
}
.shift-status.shift-collapsed .shift-icon {
  width: 28px; height: 28px;
}
.shift-status.shift-collapsed .shift-icon svg { width: 14px; height: 14px; }
.shift-status.shift-collapsed .shift-info strong { font-size: 0.85rem; }
.shift-status.shift-collapsed .shift-info span { display: none; }
.shift-status.shift-collapsed .shift-timer { font-size: 0.95rem; }
.shift-status.shift-collapsed .shift-collapse-btn { color: var(--c-text-muted); }

/* ============= Winterdienst-Liste (Kunde) ============= */
.winter-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  transition: border-color 120ms;
}
.winter-item:hover { border-color: var(--c-border-strong); }
.winter-item-photo {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.winter-item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
}
.winter-no-photo {
  width: 100%; height: 100%;
  background: var(--c-bg);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-soft);
}
.winter-item-content { flex: 1; min-width: 0; }
.winter-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
@media (max-width: 768px) {
  .winter-item-photo { width: 72px; height: 72px; }
}
