/* ==========================================================================
   EMERTEK Docházka — Průmyslový Design Systém „Black & Maroon“ (KROK 14)
   Ostrá geometrie (4–6px), Tabular Monospace telemetrie, Bottom-Sheet palcem,
   Vertikální časová osa & Split-Screen pro Z Fold / Desktop
   ========================================================================== */

:root {
  --bg-root: #08090b;
  --bg-main: #08090b;
  --bg-panel: #111318;
  --bg-card: #161920;
  --bg-elevated: #1d212a;
  --bg-input: #1d212a;

  --border-subtle: #232834;
  --border-strong: #31384a;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-maroon: #800020;
  --accent-maroon-bright: #a8002a;
  --accent-maroon-light: #e11d48;
  --accent-maroon-glow: rgba(128, 0, 32, 0.28);

  --state-job: #10b981;
  --state-job-bg: rgba(16, 185, 129, 0.12);

  --state-base: #3b82f6;
  --state-base-bg: rgba(59, 130, 246, 0.12);

  --state-transit: #f59e0b;
  --state-transit-bg: rgba(245, 158, 11, 0.12);

  --state-shop: #a855f7;
  --state-shop-bg: rgba(168, 85, 247, 0.12);

  --state-offline: #64748b;
  --state-offline-bg: rgba(100, 116, 139, 0.12);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);

  --radius-xs: 4px;
  --radius: 5px;
  --radius-md: 6px;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-root);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(circle at 50% -10%, rgba(128, 0, 32, 0.18), transparent 48%),
    linear-gradient(180deg, #0a0c10 0%, #08090b 100%);
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
}

body.no-bottom-nav {
  padding-bottom: 28px;
}

.hidden {
  display: none !important;
}

.mono-muted {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.mono-input {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
}

.meta-sep {
  color: var(--border-strong);
  margin: 0 5px;
}

/* ==========================================================================
   Horní Průmyslová Stavová Lišta + Rychlý Přepínač Profilu
   ========================================================================== */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(8, 9, 11, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.brand-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-title span {
  color: #fb7185;
  font-weight: 700;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.conn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
}

.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--state-job);
}

.conn-badge.online {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
}

.conn-badge.queue {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.14);
}

.conn-badge.queue .conn-dot {
  background: var(--state-transit);
  animation: pulseDot 1.2s infinite;
}

.conn-badge.offline {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.conn-badge.offline .conn-dot {
  background: var(--danger);
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.82);
  }
}

/* Rychlý přepínač profilů v pravém horním rohu */
.profile-menu-anchor {
  position: relative;
}

.profile-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  max-width: 190px;
}

.profile-trigger-btn:hover {
  border-color: var(--accent-maroon-bright);
  background: var(--bg-elevated);
}

#hdr-top-worker-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-trigger-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--state-offline);
  flex-shrink: 0;
}

.profile-trigger-dot.active {
  background: var(--state-job);
}

.profile-trigger-caret {
  color: var(--text-muted);
  font-size: 10px;
}

.profile-quick-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(320px, calc(100vw - 24px));
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--accent-maroon-bright);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.72);
  padding: 12px;
  z-index: 120;
}

.qm-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.qm-active-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-maroon-bright);
  border-radius: var(--radius-xs);
  padding: 9px 10px;
  margin-bottom: 10px;
}

.qm-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}

.qm-email {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  word-break: break-all;
}

.qm-switch-section {
  margin-bottom: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.qm-workers-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 210px;
  overflow-y: auto;
}

.qm-worker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-offline);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.qm-worker-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.qm-worker-btn.st-JOB { border-left-color: var(--state-job); }
.qm-worker-btn.st-BASE { border-left-color: var(--state-base); }
.qm-worker-btn.st-TRANSIT { border-left-color: var(--state-transit); }
.qm-worker-btn.st-SHOP { border-left-color: var(--state-shop); }

.qm-worker-btn.is-current {
  background: rgba(128, 0, 32, 0.18);
  border-color: var(--accent-maroon-bright);
}

.qm-actions {
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.icon-btn-small {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  min-height: 32px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
  white-space: nowrap;
}

.icon-btn-small:hover,
.icon-btn-small:active {
  color: var(--text-primary);
  border-color: var(--accent-maroon-bright);
  background: #242935;
}

/* ==========================================================================
   Hlavní Kontejner & Split-Screen Adaptace (Mobil vs. Z Fold / Desktop)
   ========================================================================== */

.app-shell {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 12px 12px 24px;
}

@media (min-width: 900px) {
  .app-shell {
    max-width: 1180px;
    padding: 16px 20px 32px;
  }

  body.admin-wide .app-shell {
    max-width: 1340px;
  }

  .today-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    gap: 16px;
    align-items: start;
  }

  .today-col-right {
    position: sticky;
    top: 66px;
  }

  .reports-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 16px;
    align-items: start;
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}

.card-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 12px;
}

.section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ==========================================================================
   Obrazovka 1: Samoobslužná Registrace, Obnova & Rychlý Vstup
   ========================================================================== */

.auth-wrap {
  max-width: 470px;
  margin: 14px auto 0;
}

.auth-hero {
  text-align: center;
  margin-bottom: 16px;
}

.auth-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--bg-card);
  border: 1px solid var(--accent-maroon-bright);
  border-radius: var(--radius-md);
  box-shadow: 0 0 24px var(--accent-maroon-glow);
}

.auth-hero h1 {
  font-size: 19px;
  font-weight: 900;
  margin: 10px 0 4px;
  letter-spacing: 0.07em;
}

.auth-hero p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-quick-card {
  border-left: 3px solid var(--accent-maroon-bright);
}

.auth-quick-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-admin-divider {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.tab-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  background: var(--bg-panel);
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  margin-bottom: 14px;
}

.tab-switch-btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 8px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.tab-switch-btn.active {
  background: linear-gradient(135deg, var(--accent-maroon), var(--accent-maroon-bright));
  color: #ffffff;
  border-color: #c8103e;
}

/* ==========================================================================
   Formulářové Prvky & Tlačítka
   ========================================================================== */

.field-group {
  margin-bottom: 12px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.field-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-control,
.textarea-control,
.select-control {
  width: 100%;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 11px 12px;
  font-size: 15px;
  font-family: var(--font-sans);
  min-height: 46px;
  outline: none;
  transition: border-color 0.14s, box-shadow 0.14s;
}

.input-control:focus,
.textarea-control:focus,
.select-control:focus {
  border-color: var(--accent-maroon-bright);
  box-shadow: 0 0 0 2px var(--accent-maroon-glow);
}

.textarea-control {
  min-height: 86px;
  resize: vertical;
  line-height: 1.45;
}

input[type="time"].input-control,
input[type="date"].input-control,
input[type="month"].input-control {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 700;
  color-scheme: dark;
}

.btn {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  transition: transform 0.08s ease, background 0.14s ease, border-color 0.14s ease;
  user-select: none;
}

.btn:hover {
  border-color: #454f66;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-maroon), var(--accent-maroon-bright));
  border-color: #c8103e;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-maroon-glow);
}

.btn-base {
  background: var(--state-base-bg);
  border-color: rgba(59, 130, 246, 0.55);
  border-left: 3px solid var(--state-base);
  color: #dbeafe;
}

.btn-job {
  background: var(--state-job-bg);
  border-color: rgba(16, 185, 129, 0.55);
  border-left: 3px solid var(--state-job);
  color: #d1fae5;
}

.btn-transit {
  background: var(--state-transit-bg);
  border-color: rgba(245, 158, 11, 0.55);
  border-left: 3px solid var(--state-transit);
  color: #fef3c7;
}

.btn-shop {
  background: var(--state-shop-bg);
  border-color: rgba(168, 85, 247, 0.55);
  border-left: 3px solid var(--state-shop);
  color: #f3e8ff;
}

.btn-danger,
.btn-danger-outline {
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.55);
  border-left: 3px solid var(--danger);
  color: #fecaca;
}

.btn-subtle {
  background: var(--bg-panel);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-subtle:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-compact {
  min-height: 40px;
  padding: 7px 12px;
  font-size: 13px;
}

/* Ergonomická akční tlačítka pro 1 palec (min. 58px, ostrý 4px levý stavový pruh) */
.action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-btn {
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--state-offline);
  border-radius: var(--radius);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
}

.action-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.action-btn:active {
  transform: translateY(1px);
}

.action-btn.accent-job {
  border-left-color: var(--state-job);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.13), var(--bg-panel) 58%);
}

.action-btn.accent-base {
  border-left-color: var(--state-base);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.13), var(--bg-panel) 58%);
}

.action-btn.accent-transit {
  border-left-color: var(--state-transit);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.13), var(--bg-panel) 58%);
}

.action-btn.accent-shop {
  border-left-color: var(--state-shop);
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.13), var(--bg-panel) 58%);
}

.action-btn.accent-danger {
  border-left-color: var(--danger);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.13), var(--bg-panel) 58%);
}

.action-btn.accent-subtle {
  border-left-color: var(--state-offline);
}

.action-btn-icon {
  font-size: 20px;
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}

.action-btn-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.action-btn-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.action-btn-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.action-btn-arrow {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ==========================================================================
   A) Živý Telemetrický Header + Day Progress Strip („⚡ DNES“)
   ========================================================================== */

.telemetry-header-card {
  border-left: 3px solid var(--state-offline);
  padding: 14px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.telemetry-header-card.state-JOB {
  border-left-color: var(--state-job);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), var(--bg-card) 62%);
}

.telemetry-header-card.state-BASE {
  border-left-color: var(--state-base);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), var(--bg-card) 62%);
}

.telemetry-header-card.state-TRANSIT {
  border-left-color: var(--state-transit);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), var(--bg-card) 62%);
}

.telemetry-header-card.state-SHOP {
  border-left-color: var(--state-shop);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), var(--bg-card) 62%);
}

.telemetry-header-card.state-OFFLINE {
  border-left-color: var(--state-offline);
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.12), var(--bg-card) 62%);
}

.telemetry-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.worker-ident {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.worker-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
}

.role-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(168, 0, 42, 0.25);
  border: 1px solid var(--accent-maroon-bright);
  color: #fda4af;
}

.work-date-line {
  font-size: 12px;
  color: var(--text-secondary);
}

.telemetry-main-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.telemetry-left {
  flex: 1 1 220px;
  min-width: 0;
}

.state-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--state-offline);
}

.state-pill-badge.st-JOB {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.45);
  background: var(--state-job-bg);
}
.state-pill-badge.st-JOB .pulse-dot {
  background: var(--state-job);
  animation: pulseDot 1.4s infinite;
}

.state-pill-badge.st-BASE {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--state-base-bg);
}
.state-pill-badge.st-BASE .pulse-dot {
  background: var(--state-base);
  animation: pulseDot 1.4s infinite;
}

.state-pill-badge.st-TRANSIT {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--state-transit-bg);
}
.state-pill-badge.st-TRANSIT .pulse-dot {
  background: var(--state-transit);
  animation: pulseDot 1.4s infinite;
}

.state-pill-badge.st-SHOP {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.45);
  background: var(--state-shop-bg);
}
.state-pill-badge.st-SHOP .pulse-dot {
  background: var(--state-shop);
  animation: pulseDot 1.4s infinite;
}

.telemetry-place-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.2;
  word-break: break-word;
}

.telemetry-place-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.telemetry-right {
  text-align: right;
  flex-shrink: 0;
}

.telemetry-stopwatch {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: #ffffff;
  background: var(--bg-root);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  padding: 6px 11px;
  display: inline-block;
}

.telemetry-stopwatch.is-idle {
  color: var(--text-muted);
}

.telemetry-day-totals {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.telemetry-day-totals strong {
  color: #ffffff;
  font-weight: 800;
}

@media (max-width: 500px) {
  .telemetry-main-grid {
    flex-direction: column;
    align-items: stretch;
  }
  .telemetry-right {
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-subtle);
  }
  .telemetry-stopwatch {
    font-size: 24px;
  }
  .telemetry-day-totals {
    margin-top: 0;
    text-align: right;
  }
}

/* Day Progress Strip (proporcionální 8px pruh dnešních segmentů) */
.day-progress-wrap {
  margin-top: 12px;
}

.day-progress-strip {
  height: 8px;
  width: 100%;
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  display: flex;
  overflow: hidden;
  gap: 1px;
}

.day-progress-seg {
  height: 100%;
  min-width: 3px;
  transition: width 0.25s ease;
}

.day-progress-seg.seg-JOB { background: var(--state-job); }
.day-progress-seg.seg-BASE { background: var(--state-base); }
.day-progress-seg.seg-TRANSIT { background: var(--state-transit); }
.day-progress-seg.seg-SHOP { background: var(--state-shop); }

/* Rozpad dnešní směny v pravém sloupci */
.today-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.today-kpi-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-offline);
  border-radius: var(--radius-xs);
  padding: 7px 8px;
}

.today-kpi-box.kpi-job { border-left-color: var(--state-job); }
.today-kpi-box.kpi-base { border-left-color: var(--state-base); }
.today-kpi-box.kpi-transit { border-left-color: var(--state-transit); }
.today-kpi-box.kpi-shop { border-left-color: var(--state-shop); }

.today-kpi-lbl {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.today-kpi-val {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

@media (max-width: 420px) {
  .today-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Chipy (Backdate Bar, Vozidla, Oběd) & Predikční Karta
   ========================================================================== */

.chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  min-height: 38px;
  padding: 6px 11px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.chip.active {
  background: rgba(128, 0, 32, 0.34);
  border-color: var(--accent-maroon-bright);
  color: #ffffff;
}

.chip.active-vehicle {
  background: var(--state-transit-bg);
  border-color: var(--state-transit);
  color: #fef3c7;
}

.chip.active-lunch {
  background: var(--state-job-bg);
  border-color: var(--state-job);
  color: #d1fae5;
}

.backdate-card {
  padding: 11px 13px;
}

.backdate-active-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  color: #fcd34d;
  background: var(--state-transit-bg);
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.backdate-active-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #fcd34d;
  font-weight: 600;
}

/* Výrazná GPS Predikční karta */
.prediction-card {
  background: linear-gradient(135deg, rgba(128, 0, 32, 0.32), var(--bg-card) 85%);
  border: 1px solid var(--accent-maroon-bright);
  border-left: 4px solid #fb7185;
  box-shadow: 0 8px 24px var(--accent-maroon-glow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prediction-card-header {
  font-size: 13px;
  font-weight: 800;
  color: #fda4af;
  line-height: 1.4;
}

.prediction-card-header span {
  font-weight: 700;
  color: #ffffff;
}

.prediction-confirm-btn {
  min-height: 56px;
  background: linear-gradient(135deg, var(--accent-maroon), var(--accent-maroon-bright));
  border: 1px solid #fb7185;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Poznámka na zakázce, Spolupracovníci & Inline Oběd
   ========================================================================== */

.job-note-card {
  border-left: 3px solid var(--state-job);
}

.note-status-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
}

.note-status-badge.saved {
  color: #6ee7b7;
  background: var(--state-job-bg);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.note-status-badge.saving {
  color: #fcd34d;
  background: var(--state-transit-bg);
}

.note-status-badge.dirty {
  color: #93c5fd;
  background: var(--state-base-bg);
}

.note-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.coworkers-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.coworkers-names {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.coworkers-names strong {
  color: var(--text-primary);
}

.coworker-adopt-btn {
  width: 100%;
  text-align: left;
  background: var(--bg-panel);
  border: 1px solid rgba(16, 185, 129, 0.38);
  border-left: 3px solid var(--state-job);
  border-radius: var(--radius-xs);
  padding: 9px 11px;
  color: #d1fae5;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.coworker-adopt-preview {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lunch-inline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
}

.lunch-inline-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.lunch-chips-group {
  display: flex;
  gap: 5px;
}

/* ==========================================================================
   B) Vertikální Kolejnice Časové Osy (Vertical Timeline Track)
   ========================================================================== */

.v-timeline,
.timeline-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v-timeline {
  padding-left: 20px;
}

.v-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border-subtle);
}

.v-timeline-item,
.timeline-item {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-offline);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.v-timeline-item:hover,
.timeline-item:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.v-timeline-item.seg-BASE,
.timeline-item.seg-BASE {
  border-left-color: var(--state-base);
}

.v-timeline-item.seg-JOB,
.timeline-item.seg-JOB {
  border-left-color: var(--state-job);
}

.v-timeline-item.seg-TRANSIT,
.timeline-item.seg-TRANSIT {
  border-left-color: var(--state-transit);
}

.v-timeline-item.seg-SHOP,
.timeline-item.seg-SHOP {
  border-left-color: var(--state-shop);
}

.v-timeline-node {
  position: absolute;
  left: -20px;
  top: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--state-offline);
  z-index: 2;
}

.v-timeline-item.seg-JOB .v-timeline-node { border-color: var(--state-job); background: #064e3b; }
.v-timeline-item.seg-BASE .v-timeline-node { border-color: var(--state-base); background: #1e3a8a; }
.v-timeline-item.seg-TRANSIT .v-timeline-node { border-color: var(--state-transit); background: #78350f; }
.v-timeline-item.seg-SHOP .v-timeline-node { border-color: var(--state-shop); background: #581c87; }

.v-timeline-item.is-running .v-timeline-node {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseDot 1.4s infinite;
}

.timeline-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-time-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.timeline-time-range {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
}

.timeline-dur-pill,
.timeline-duration {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.timeline-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.seg-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.03em;
}

.seg-badge.seg-BASE {
  background: var(--state-base-bg);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.seg-badge.seg-JOB {
  background: var(--state-job-bg);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.seg-badge.seg-TRANSIT {
  background: var(--state-transit-bg);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

.seg-badge.seg-SHOP {
  background: var(--state-shop-bg);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
}

.edited-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.timeline-note {
  margin-top: 7px;
  padding: 6px 9px;
  background: rgba(8, 9, 11, 0.55);
  border-left: 2px solid var(--border-strong);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 12.5px;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

.timeline-edit-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.timeline-edit-btn:hover {
  color: #ffffff;
  border-color: var(--accent-maroon-bright);
}

.timeline-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 16px 10px;
  background: var(--bg-panel);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius);
}

/* ==========================================================================
   Fixní Spodní Navigační Lišta (Bottom Nav)
   ========================================================================== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 70;
  background: rgba(8, 9, 11, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.nav-tab {
  background: transparent;
  border: none;
  border-top: 2px solid transparent;
  color: var(--text-muted);
  min-height: 58px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.14s, background 0.14s, border-color 0.14s;
}

.nav-tab .nav-icon {
  font-size: 17px;
  line-height: 1;
}

.nav-tab.active {
  color: #ffffff;
  border-top-color: var(--accent-maroon-bright);
  background: linear-gradient(180deg, rgba(128, 0, 32, 0.24), transparent);
}

/* ==========================================================================
   Bottom-Sheet Modály (Ovládání jedním palcem + Krokování času +-5/15m)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@keyframes slideUpSheet {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-top: 2px solid var(--accent-maroon-bright);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.7);
  animation: slideUpSheet 0.16s ease-out;
}

.modal-sheet.modal-sheet-wide {
  max-width: 720px;
}

.sheet-grabber {
  width: 38px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 10px;
}

@media (min-width: 768px) {
  .modal-backdrop {
    align-items: center;
    padding: 18px;
  }
  .modal-sheet {
    border-radius: var(--radius-md);
    padding: 18px;
  }
  .sheet-grabber {
    display: none;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 16px;
  font-weight: 900;
  margin: 0;
  letter-spacing: 0.02em;
}

.modal-close-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  font-size: 16px;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #ffffff;
  border-color: var(--accent-maroon-bright);
}

.safety-brake-sheet {
  border-top: 3px solid var(--state-transit);
}

.confirm-dialog-msg {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.confirm-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.picker-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 46dvh;
  overflow-y: auto;
  margin-bottom: 12px;
}

.picker-item-btn {
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  text-align: left;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-job);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.picker-item-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--state-job);
}

.picker-item-sub {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  display: block;
}

.picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.time-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 460px) {
  .time-pair-grid {
    grid-template-columns: 1fr;
  }
}

.time-adjust-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 9px;
}

.time-step-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 7px;
}

.time-step-btn {
  min-height: 32px;
  padding: 4px 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.time-step-btn:hover:not(:disabled) {
  background: rgba(128, 0, 32, 0.3);
  border-color: var(--accent-maroon-bright);
  color: #ffffff;
}

.time-step-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.ripple-notice {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-maroon-bright);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  margin-bottom: 12px;
}

/* ==========================================================================
   Plovoucí Toast Notifikace
   ========================================================================== */

.toast-container {
  position: fixed;
  top: calc(58px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  max-width: 480px;
  margin: 0 auto;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.toast {
  background: rgba(22, 25, 32, 0.98);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--state-job);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}

.toast.error {
  border-left-color: var(--danger);
  color: #fecaca;
}

.toast.warn {
  border-left-color: var(--state-transit);
  color: #fde68a;
}

/* ==========================================================================
   Obrazovka 3: 📊 MOJE VÝKAZY A HODINY
   ========================================================================== */

.month-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.month-nav-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  min-height: 44px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.month-nav-btn:hover {
  border-color: var(--accent-maroon-bright);
  background: var(--bg-elevated);
}

.month-picker-input {
  text-align: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 14.5px;
  min-height: 44px;
  padding: 8px 10px;
  color-scheme: dark;
}

.rep-hero-card {
  background: linear-gradient(145deg, rgba(128, 0, 32, 0.24), var(--bg-card) 62%);
  border-color: #3a1924;
  border-left: 3px solid var(--accent-maroon-bright);
}

.rep-hero-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rep-hero-hours {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 34px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.rep-hero-hours small {
  font-size: 15px;
  font-weight: 700;
  color: #fda4af;
}

.rep-hero-hm {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-panel);
  padding: 4px 9px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
}

.rep-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 400px) {
  .rep-stats-grid {
    grid-template-columns: 1fr;
  }
}

.rep-stat-tile {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 9px 10px;
}

.rep-stat-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.rep-stat-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.rep-absence-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.rep-mini-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-secondary);
}

.rep-mini-pill.warn-unclosed {
  background: var(--state-transit-bg);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}

.rep-mini-pill.day-off {
  background: var(--state-base-bg);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.rep-mini-pill.sick {
  background: var(--state-shop-bg);
  border-color: rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

/* Skládaný progress bar struktury času */
.time-stacked-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-root);
  border-radius: var(--radius-xs);
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border-subtle);
  margin: 8px 0 12px;
  gap: 1px;
}

.time-bar-seg {
  height: 100%;
  transition: width 0.25s ease;
}

.time-bar-seg.seg-job { background: var(--state-job); }
.time-bar-seg.seg-base { background: var(--state-base); }
.time-bar-seg.seg-transit { background: var(--state-transit); }
.time-bar-seg.seg-shop { background: var(--state-shop); }

.dot-ind {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
}
.dot-ind.seg-job { background: var(--state-job); }
.dot-ind.seg-base { background: var(--state-base); }
.dot-ind.seg-transit { background: var(--state-transit); }
.dot-ind.seg-shop { background: var(--state-shop); }

.time-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.time-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 7px 9px;
  font-size: 12px;
}

.time-legend-label {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: var(--text-secondary);
}

.time-legend-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--text-primary);
}

/* Rozpad zakázek v měsíci */
.job-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-breakdown-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-job);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
}

.job-breakdown-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.job-breakdown-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.job-breakdown-meta {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
  color: #6ee7b7;
  white-space: nowrap;
}

.job-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-root);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 5px;
}

.job-progress-fill {
  height: 100%;
  background: var(--state-job);
}

.job-breakdown-sub {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* Lokální kalkulačka sazby */
.calc-card {
  border-left: 3px solid var(--accent-maroon-bright);
}

.calc-toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.calc-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.calc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calc-rate-input {
  flex: 1 1 130px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 16px;
}

.calc-result-box {
  margin-top: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-left: 3px solid var(--state-job);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calc-result-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 900;
  color: #6ee7b7;
}

.rep-export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rep-export-grid .btn-full-span {
  grid-column: 1 / -1;
}

.email-result-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-left: 3px solid var(--state-job);
  background: var(--state-job-bg);
  font-size: 12.5px;
  color: #d1fae5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.email-result-banner.archived {
  border-color: rgba(245, 158, 11, 0.45);
  border-left-color: var(--state-transit);
  background: var(--state-transit-bg);
  color: #fef3c7;
}

/* Historie dnů v měsíci */
.day-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-offline);
  border-radius: var(--radius);
  overflow: hidden;
}

.day-card.status-WORKED { border-left-color: var(--state-job); }
.day-card.status-DAY_OFF { border-left-color: var(--state-base); }
.day-card.status-SICK { border-left-color: var(--state-shop); }
.day-card.status-UNCLOSED { border-left-color: var(--state-transit); }

.day-card-summary {
  padding: 11px 12px;
  cursor: pointer;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.day-card-summary:hover {
  background: rgba(255, 255, 255, 0.02);
}

.day-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.day-date-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-hours-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

.day-money-span {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  color: #6ee7b7;
}

.day-meta-line {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.day-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.day-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.day-tag.tag-job {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

.day-tag.tag-shop {
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.35);
}

.day-notes-preview {
  font-size: 12px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.day-chevron {
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.day-card.expanded .day-chevron {
  transform: rotate(180deg);
}

.day-card-detail {
  border-top: 1px solid var(--border-subtle);
  background: rgba(8, 9, 11, 0.52);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   Obrazovka 4: 🛡️ ŠÉFOVSKÝ VELÍN (Wide Dashboard Grid)
   ========================================================================== */

.admin-lock-wrap {
  max-width: 430px;
  margin: 24px auto;
}

.admin-subnav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 5px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .admin-subnav {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-subnav-btn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 800;
  padding: 6px 8px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.admin-subnav-btn:hover {
  color: var(--text-primary);
}

.admin-subnav-btn.active {
  background: linear-gradient(135deg, var(--accent-maroon), var(--accent-maroon-bright));
  color: #ffffff;
  border-color: #c8103e;
}

.radar-toolbar-card {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.radar-summary-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .radar-summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.radar-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-offline);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.radar-stat-box.st-JOB { border-left-color: var(--state-job); background: linear-gradient(90deg, var(--state-job-bg), var(--bg-card)); }
.radar-stat-box.st-TRANSIT { border-left-color: var(--state-transit); background: linear-gradient(90deg, var(--state-transit-bg), var(--bg-card)); }
.radar-stat-box.st-SHOP { border-left-color: var(--state-shop); background: linear-gradient(90deg, var(--state-shop-bg), var(--bg-card)); }
.radar-stat-box.st-BASE { border-left-color: var(--state-base); background: linear-gradient(90deg, var(--state-base-bg), var(--bg-card)); }

.radar-stat-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
}

.radar-stat-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 2px;
}

.admin-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 760px) {
  .admin-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1140px) {
  .admin-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.admin-corr-jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 980px) {
  .admin-corr-jobs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-two-col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 900px) {
  .admin-two-col-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.radar-worker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-offline);
  border-radius: var(--radius);
  padding: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.radar-worker-card.st-JOB { border-left-color: var(--state-job); }
.radar-worker-card.st-BASE { border-left-color: var(--state-base); }
.radar-worker-card.st-TRANSIT { border-left-color: var(--state-transit); }
.radar-worker-card.st-SHOP { border-left-color: var(--state-shop); }

.radar-worker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.radar-worker-name {
  font-size: 15.5px;
  font-weight: 900;
  color: #ffffff;
}

.radar-where-line {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 3px;
}

.radar-worked-line {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.radar-mini-segs {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 8px 9px;
  max-height: 175px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.radar-mini-seg {
  font-size: 11.5px;
  line-height: 1.35;
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: 4px;
}

.radar-mini-seg:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.radar-boss-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.radar-boss-btn {
  flex: 1 1 auto;
  min-height: 36px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 800;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  color: var(--text-secondary);
  cursor: pointer;
}

.radar-boss-btn:hover {
  color: #ffffff;
  border-color: var(--accent-maroon-bright);
  background: var(--bg-elevated);
}

.radar-boss-btn.danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.42);
}

/* GPS Telemetrie na Radaru & Geofence formuláře */
.radar-gps-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11px;
}

.radar-gps-age {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.radar-gps-dist {
  font-weight: 800;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.radar-gps-dist.on-site {
  background: var(--state-job-bg);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.radar-gps-dist.off-site {
  background: var(--state-transit-bg);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}

.radar-map-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--state-base-bg);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #93c5fd;
  font-weight: 800;
  text-decoration: none;
}

.radar-map-link:hover {
  background: rgba(59, 130, 246, 0.28);
  color: #ffffff;
}

.geo-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 96px;
  gap: 8px;
}

@media (max-width: 520px) {
  .geo-fields-grid {
    grid-template-columns: 1fr 1fr;
  }
  .geo-fields-grid > div:last-child {
    grid-column: 1 / -1;
  }
}

.geo-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.geo-status-pill {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--state-base-bg);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

/* Korelace, společné jízdy a Stavební deník */
.cotravel-box {
  background: linear-gradient(90deg, var(--state-transit-bg), var(--bg-card));
  border: 1px solid rgba(245, 158, 11, 0.42);
  border-left: 3px solid var(--state-transit);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.cotravel-item {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(245, 158, 11, 0.25);
  font-size: 13px;
}

.cotravel-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.corr-job-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--state-job);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.corr-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.corr-crew-row {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 12.5px;
}

.diary-box {
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-maroon-bright);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-primary);
  white-space: pre-line;
}

.diary-box strong {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #fda4af;
  margin-bottom: 4px;
}

/* Měsíční matice týmu */
.admin-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-bulk-bar .btn {
  width: auto;
  flex: 1 1 200px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 680px;
}

.admin-table th,
.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.admin-table tfoot td {
  background: rgba(128, 0, 32, 0.22);
  font-weight: 800;
  color: #ffffff;
  border-top: 2px solid var(--accent-maroon-bright);
}

.num-col {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right !important;
  white-space: nowrap;
}

.pending-review-panel {
  background: linear-gradient(135deg, var(--state-transit-bg), var(--bg-card));
  border: 1px solid var(--state-transit);
  border-left: 3px solid var(--state-transit);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.catalog-item-row {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.anomaly-banner {
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
}
