/* EKODAV SAFETY — Světlý moderní design systém (inspirováno www.ekodav.cz) */
:root {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --line: #e2e8f0;
  --line-light: #cbd5e1;
  
  --text: #0f172a;
  --text-dim: #475569;
  --muted: #64748b;
  
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-ink: #ffffff;
  
  --blue: #0284c7;
  --green: #10b981;
  --yellow: #f59e0b;
  --orange: #ea580c;
  --red: #dc2626;
  
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --stripe: repeating-linear-gradient(135deg, #f59e0b 0 14px, #0f172a 14px 28px);
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 84px;
  background: var(--bg);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* --- Top Bar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.stripe {
  height: 4px;
  background: var(--stripe);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
}

.brand-wrap {
  flex: 1;
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 16px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title .brand-eko {
  color: #10b981;
}

.brand-title .brand-dav {
  color: #0f172a;
}

.brand-title .brand-tag {
  background: #f59e0b;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.brand-sub {
  font-weight: 500;
  font-size: 11.5px;
  color: var(--muted);
}

.url-badge {
  color: var(--primary);
  font-weight: 600;
}

.back, .icon-btn {
  background: #ffffff;
  border: 1px solid var(--line-light);
  color: var(--text);
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.back:hover, .icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.hidden {
  display: none !important;
}

.file-input-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  left: -9999px !important;
}

/* --- Screens --- */
.screen {
  padding: 18px;
  flex: 1;
  display: none;
  animation: fadeIn 0.15s ease;
}

.screen.active {
  display: block;
}

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

/* --- Hero Banner --- */
.hero-card {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
  color: #ffffff;
}

.hero-icon {
  font-size: 28px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-title {
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
}

.hero-text {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 3px;
  line-height: 1.4;
}

.ai-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #0284c7 100%);
  border-color: rgba(79, 70, 229, 0.3);
}

/* --- Section Headers --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 12px;
}

.section-title {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
}

.form-section-title {
  font-weight: 800;
  font-size: 13.5px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.section-flex-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.btn-link-action:hover {
  text-decoration: underline;
}

/* --- Cards & Lists --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.insp-card {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 4px solid var(--primary);
}

.insp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.insp-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.insp-content {
  flex: 1;
  min-width: 0;
}

.insp-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.insp-company {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1px;
}

.insp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.tag-zavada {
  color: var(--red);
  font-weight: 700;
}

.tag-ok {
  color: var(--green);
  font-weight: 700;
}

.tag-kriticka {
  color: #b91c1c;
  background: #fee2e2;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.insp-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.chev {
  font-size: 18px;
  color: var(--muted);
}

/* --- Forms & Inputs --- */
label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin: 10px 0 4px;
}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  outline: none;
  transition: all 0.15s ease;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.input-action-row {
  display: flex;
  gap: 8px;
}

.input-action-row input {
  flex: 1;
}

.grid-2-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .grid-2-inputs {
    grid-template-columns: 1fr;
  }
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix-icon {
  position: absolute;
  left: 10px;
  font-size: 14px;
  color: var(--muted);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 32px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--green);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #059669;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--line-light);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--red);
  border: 1px solid #fecaca;
}

.btn-danger-ghost:hover {
  background: #fef2f2;
}

.btn-primary-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid #bfdbfe;
}

.btn-primary-ghost:hover {
  background: #eff6ff;
}

.btn-ai {
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  color: #ffffff;
}

.btn-ai:hover {
  opacity: 0.92;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 20px;
  font-size: 15px;
}

.btn-full {
  width: 100%;
}

.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mb-3 {
  margin-bottom: 14px;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-warning {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-info {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-risk {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* --- Banner Button pro Plán (Navy Dark Bar) --- */
.btn-plan-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transition: all 0.15s ease;
  margin-bottom: 14px;
}

.btn-plan-trigger:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.plan-btn-icon {
  font-size: 16px;
}

.plan-pin-badge {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
  font-weight: 700;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  text-align: center;
}

/* --- Photo Hero Uploader --- */
.photo-uploader-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.photo-uploader-hero:hover {
  border-color: var(--primary);
  background: #f0f9ff;
}

.photo-hero-icon {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 8px;
}

.photo-hero-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.photo-hero-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.photo-actions-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
}

.btn-dual-photo {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  padding: 13px 12px;
  margin: 0;
  border-radius: var(--radius-sm);
  background: #0284c7;
  color: #ffffff;
  border: none;
  text-align: center;
  font-size: 13.5px;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.3);
  transition: all 0.15s ease;
}

.btn-dual-photo:active {
  transform: scale(0.98);
  background: #0369a1;
}

.btn-dual-gallery {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  padding: 13px 12px;
  margin: 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid #0284c7;
  color: #0284c7;
  background: #f0f9ff;
  text-align: center;
  font-size: 13.5px;
  transition: all 0.15s ease;
}

.btn-dual-gallery:active {
  transform: scale(0.98);
  background: #e0f2fe;
}

@media (max-width: 480px) {
  .photo-actions-dual {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .btn-dual-photo, .btn-dual-gallery {
    padding: 14px 12px;
    font-size: 14px;
  }
}

/* --- AI Photo Loading Overlay --- */
.ai-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 16px;
  text-align: center;
  animation: fadeIn 0.2s ease;
}

.spinner-ai {
  width: 36px;
  height: 36px;
  border: 3.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #38bdf8;
  border-right-color: #10b981;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Category Chips --- */
.category-chips-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.cat-chip {
  background: #ffffff;
  border: 1px solid var(--line-light);
  color: #334155;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.cat-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* --- Location Chips --- */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

/* --- Status Grid (Stav na pracovišti) --- */
.status-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.status-btn {
  background: #ffffff;
  border: 1px solid var(--line-light);
  color: var(--text);
  padding: 8px 6px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.status-btn:hover {
  background: var(--bg-card-hover);
}

.status-btn.active-zavada {
  background: #ea580c;
  border-color: #c2410c;
  color: #ffffff;
}

.status-btn.active-ohrozeni {
  background: #dc2626;
  border-color: #991b1b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.status-btn.active-odstraneno {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
}

.status-btn.active-doporuceni {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
}

.status-btn.active-ok {
  background: #10b981;
  border-color: #059669;
  color: #ffffff;
}

/* --- Severity Buttons --- */
.severity-buttons-row {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.sev-btn {
  flex: 1;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 10px 4px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.sev-btn:hover {
  background: #e2e8f0;
}

.sev-btn.active.sev-kriticka {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.sev-btn.active.sev-vysoka {
  background: #ea580c;
  border-color: #c2410c;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.3);
}

.sev-btn.active.sev-stredni {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.sev-btn.active.sev-nizka {
  background: #10b981;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.sev-btn.active.sev-doporuceni {
  background: #0284c7;
  border-color: #0369a1;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

/* --- Matice rizik (P x D) Box --- */
.matice-box {
  background: #f8fafc;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  animation: fadeIn 0.15s ease;
}

.matice-res-banner {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0369a1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  text-align: center;
}

/* --- Quick Chips for Deadlines & Persons --- */
.quick-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.quick-chip {
  background: #ffffff;
  border: 1px solid var(--line-light);
  color: #475569;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-chip:hover {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}

/* --- Voice Header & Status Bar --- */
.voice-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-voice {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-voice:hover {
  background: #fecaca;
}

.voice-status-bar {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
}

.voice-pulse-dot {
  width: 10px;
  height: 10px;
  background: #dc2626;
  border-radius: 50%;
  animation: pulseMic 1.2s infinite;
}

@keyframes pulseMic {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(0.9); opacity: 1; }
}

.voice-stop-btn {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
}

/* --- AI Cards & Box --- */
.ai-card {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
}

.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0f2fe;
}

.ai-sparkle {
  font-weight: 800;
  font-size: 13px;
  color: #0369a1;
}

.ai-section {
  margin-top: 8px;
  font-size: 12.5px;
}

.ai-highlight {
  color: #0284c7;
  font-weight: 700;
}

.ai-measure {
  color: var(--text);
  font-weight: 600;
  margin-top: 2px;
}

.ai-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* --- Layout Panel & Preview --- */
.layout-panel-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.layout-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.layout-panel-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}

.btn-link-danger {
  background: none;
  border: none;
  color: var(--red);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.layout-panel-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.layout-preview-wrap {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #ffffff;
}

.layout-preview-wrap img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

.layout-preview-label {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  text-align: center;
}

.layout-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.modal-card-lg {
  max-width: 680px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--text);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.modal-list-scroll {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-company-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-company-item:hover {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.btn-icon-danger {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.6;
}

.btn-icon-danger:hover {
  opacity: 1;
}

.modal-chips-manage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manage-chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.tag-del-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
}

/* --- Plan Canvas in Modal --- */
.plan-canvas-wrap {
  position: relative;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f8fafc;
  cursor: crosshair;
}

.plan-full-img {
  width: 100%;
  display: block;
  user-select: none;
}

.plan-pin-marker {
  position: absolute;
  transform: translate(-50%, -100%);
  font-size: 24px;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.plan-existing-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  pointer-events: none;
}

.plan-coord-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* --- Findings Items --- */
.findings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finding-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.finding-zavada {
  border-left: 4px solid var(--red);
}

.finding-ok {
  border-left: 4px solid var(--green);
}

.finding-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.finding-index {
  font-weight: 800;
  font-size: 12px;
  color: var(--muted);
}

.finding-cat {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
  flex: 1;
}

.finding-body {
  margin-top: 8px;
  font-size: 13px;
}

.finding-desc {
  color: #1f2937;
  line-height: 1.4;
}

.finding-legis {
  font-size: 12px;
  color: var(--primary);
  margin-top: 4px;
}

.finding-measure {
  font-size: 12px;
  color: #334155;
  margin-top: 2px;
}

.finding-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
}

.finding-thumb {
  margin-top: 8px;
}

.finding-thumb img {
  max-height: 90px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.finding-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* --- Detail Screen Header --- */
.detail-header-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
}

.detail-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.detail-title {
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
}

.detail-subtitle {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

.detail-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stat-card {
  text-align: center;
}

.stat-num {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
}

/* --- Export Buttons Grid --- */
.export-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .export-buttons-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Protocol Print View --- */
.print-protocol {
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-family: var(--font-main);
  color: #0f172a;
  box-shadow: var(--shadow-sm);
}

.protocol-brand-stripe {
  height: 6px;
  background: linear-gradient(90deg, #10b981 0 33%, #0f172a 33% 66%, #f59e0b 66% 100%);
  border-radius: 4px 4px 0 0;
  margin: -24px -24px 16px -24px;
}

.protocol-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid #0f172a;
}

.protocol-brand {
  flex: 1;
  min-width: 0;
}

.protocol-header-logo-img {
  max-height: 56px;
  width: auto;
  display: block;
  margin-bottom: 4px;
}

.protocol-logo-wrap {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-eko { color: #10b981; }
.logo-dav { color: #0f172a; }
.logo-safety-badge {
  background: #f59e0b;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 4px;
}

.protocol-logo-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.35;
}

.protocol-web {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2px;
}

.protocol-doc-info {
  text-align: right;
  flex-shrink: 0;
}

.doc-title {
  font-weight: 900;
  font-size: 14.5px;
  color: #0f172a;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.doc-legis-sub {
  font-size: 10px;
  color: #475569;
  font-weight: 600;
  margin-top: 2px;
  margin-bottom: 4px;
  max-width: 380px;
  margin-left: auto;
  line-height: 1.35;
}

.doc-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.protocol-section-header {
  font-weight: 800;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #0f172a;
  color: #ffffff;
  padding: 6px 10px;
  margin: 18px 0 8px;
  border-radius: 4px;
}

.protocol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.protocol-table th,
.protocol-table td {
  border: 1px solid #cbd5e1;
  padding: 8px 10px;
  text-align: left;
}

.protocol-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: #0f172a;
}

.stats-table td {
  padding: 10px;
  font-size: 12.5px;
}

.protocol-plan-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #f8fafc;
}

.protocol-plan-canvas {
  position: relative;
  width: 100%;
  text-align: center;
}

.protocol-plan-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  display: block;
}

.protocol-pin-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.protocol-plan-caption {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--muted);
  background: #f8fafc;
  border-top: 1px solid var(--line);
  text-align: center;
}

.print-risk-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 3px;
}

.print-img-wrap {
  margin-top: 6px;
}

.print-img-wrap img {
  max-height: 70px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.protocol-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  gap: 20px;
}

.sig-box {
  flex: 1;
  font-size: 11.5px;
}

.sig-title {
  font-weight: 700;
  color: #0f172a;
}

.sig-line {
  height: 48px;
  border-bottom: 1px dashed #94a3b8;
  margin-bottom: 4px;
}

.sig-name {
  color: var(--muted);
  font-size: 11px;
}

@media print {
  .no-print, .topbar, .bottomnav, .toast {
    display: none !important;
  }
  body, .app {
    background: #ffffff !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  .screen {
    display: none !important;
  }
  #screen-zprava {
    display: block !important;
    padding: 0 !important;
  }
}

/* --- Bottom Navigation --- */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  z-index: 50;
}

.bottomnav-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
}

.nav-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 12px;
  transition: all 0.15s ease;
}

.nav-btn .nav-icon {
  font-size: 18px;
}

.nav-btn.active, .nav-btn:hover {
  color: var(--primary);
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0f172a;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 200;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- ARES Results Dropdown --- */
.ares-results-dropdown {
  background: #ffffff;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  margin-top: 6px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.15);
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
}

.ares-loading, .ares-empty {
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.ares-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f0f9ff;
  border-bottom: 1px solid #e0f2fe;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
}

.ares-close-btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.ares-list {
  display: flex;
  flex-direction: column;
}

.ares-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.1s ease;
}

.ares-item:last-child {
  border-bottom: none;
}

.ares-item:hover {
  background: #f0f9ff;
}

.ares-item-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.ares-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.ares-ico-badge {
  font-weight: 700;
  color: var(--primary);
}

/* --- Active Inspection Header & Quick Edit --- */
.active-inspection-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  gap: 10px;
}

.active-insp-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.active-insp-label {
  font-size: 10px;
  color: #0369a1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.active-insp-title {
  font-size: 13px;
  color: #0f172a;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 700;
}

/* --- Floor Plan Designer & Sketcher --- */
.designer-section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.designer-templates-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-chip {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.template-chip:hover {
  background: #f0f9ff;
  border-color: var(--primary);
  color: var(--primary);
}

.designer-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.dtool-btn {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dtool-btn:hover {
  background: #f1f5f9;
}

.dtool-btn.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.dtool-options-bar {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.dtool-opt-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dtool-opt-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}

.designer-canvas-wrap {
  position: relative;
  width: 100%;
  border: 2px solid #0f172a;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.designer-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 500;
  display: block;
  cursor: crosshair;
  touch-action: none;
  background-color: #ffffff;
}

.designer-canvas-hint {
  padding: 6px 10px;
  font-size: 11px;
  color: var(--muted);
  background: #f8fafc;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* --- Multi-Floor & Multi-Building Support --- */
.plany-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.plan-card-item {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
}

.plan-card-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.plan-card-thumb-wrap {
  width: 100%;
  height: 110px;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plan-card-index-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.plan-card-body {
  padding: 8px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

.plan-card-actions {
  display: flex;
  gap: 4px;
  margin-top: auto;
}

.plan-card-btn {
  flex: 1;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.plan-card-btn:hover {
  background: #f1f5f9;
}

.plan-card-btn-danger {
  color: #dc2626;
  border-color: #fee2e2;
  background: #fff5f5;
  flex: 0 0 28px;
}

.plan-card-btn-danger:hover {
  background: #fee2e2;
}

/* Plan Tabs Row (Modal & Detail) */
.plan-tabs-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px 0;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.plan-tab-chip {
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.plan-tab-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.plan-tab-chip.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.plan-tab-count {
  background: rgba(255, 255, 255, 0.25);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 800;
}

.plan-tab-chip:not(.active) .plan-tab-count {
  background: #cbd5e1;
  color: #1e293b;
}

/* Dropdown Menu */
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  min-width: 220px;
  padding: 4px 0;
  animation: fadeIn 0.15s ease;
}

.drop-item {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s ease;
}

.drop-item:hover {
  background: #f0f9ff;
  color: var(--primary);
}

.detail-plan-section-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* ==========================================================================
   KONTROLA DOKUMENTACE & REVIZÍ (DOCUMENTATION AUDIT)
   ========================================================================== */
.doc-audit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.doc-audit-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.doc-audit-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.doc-audit-card.status-ok {
  border-left-color: #10b981;
  background: #ffffff;
}

.doc-audit-card.status-zavada {
  border-left-color: #ea580c;
  background: #fffbf7;
}

.doc-audit-card.status-chybi {
  border-left-color: #dc2626;
  background: #fff8f8;
}

.doc-audit-card.status-netykase {
  border-left-color: #94a3b8;
  background: #f8fafc;
  opacity: 0.85;
}

.doc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.doc-card-title {
  font-weight: 800;
  font-size: 13.5px;
  color: #0f172a;
  line-height: 1.35;
}

.doc-card-law {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.doc-card-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 6px;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #f1f5f9;
}

.doc-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.doc-btn {
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid var(--line-light);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.doc-btn:hover {
  background: #f1f5f9;
  color: var(--text);
}

.doc-btn.active-ok {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.doc-btn.active-zavada {
  background: #ea580c !important;
  color: #ffffff !important;
  border-color: #c2410c !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
}

.doc-btn.active-chybi {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

.doc-btn.active-netykase {
  background: #64748b !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}

.doc-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 8px;
  margin-top: 8px;
}

.doc-input-sm {
  padding: 6px 10px;
  font-size: 11.5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  width: 100%;
}

.doc-input-sm:focus {
  border-color: var(--primary);
  outline: none;
}

.doc-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.doc-convert-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #ea580c;
  background: #fff7ed;
  color: #c2410c;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.doc-convert-btn:hover {
  background: #ea580c;
  color: #ffffff;
}

@media (max-width: 480px) {
  .doc-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .doc-inputs-row {
    grid-template-columns: 1fr;
  }
}



/* ==========================================================================
   NOVÉ PRVKY: HLAVNÍ PILÍŘE KATEGORIÍ A ROZKLIKÁVACÍ PODSKUPINY
   ========================================================================== */
.main-category-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 6px;
}

@media (max-width: 540px) {
  .main-category-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pillar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  color: var(--text, #0f172a);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pillar-btn:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.04);
  transform: translateY(-1px);
}

.pillar-btn.active {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.08) 100%);
  color: #065f46;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 2px 6px rgba(16, 185, 129, 0.15);
}

.pillar-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.pillar-title {
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.subcategories-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg, #f8fafc);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed var(--border, #cbd5e1);
  animation: fadeInSubcats 0.2s ease-out;
}

@keyframes fadeInSubcats {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.subcat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.subcat-chip:hover {
  border-color: #10b981;
  color: #059669;
}

.subcat-chip.active {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   RYCHLÉ ŠABLONY: FILTROVANÝ PANEL & CUSTOMIZATION
   ========================================================================== */
.scenarios-panel-wrap {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--card-bg, #ffffff);
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.scenarios-body {
  transition: max-height 0.3s ease, opacity 0.2s ease;
  overflow: hidden;
}

.scenarios-body.collapsed {
  max-height: 0 !important;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

.scenario-chip-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  color: var(--text, #0f172a);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.scenario-chip-item:hover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
  transform: translateY(-1px);
}

.scenario-chip-item.is-custom {
  border-left: 3px solid #f59e0b;
}

/* ==========================================================================
   AI KOREKTOR A ÚPRAVA TEXTU MODAL
   ========================================================================== */
.ai-diff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .ai-diff-grid {
    grid-template-columns: 1fr;
  }
}

.ai-diff-box {
  padding: 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  border: 1px solid var(--border, #e2e8f0);
}

.ai-diff-orig {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.ai-diff-enhanced {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

/* Hromadné akce u dávkového AI rozboru */
.batch-actions-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

@media (max-width: 680px) {
  .batch-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
  .batch-actions-grid > button:first-child {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   SKUPINOVÉ ZOBRAZENÍ RYCHLÝCH ŠABLON S PODKATEGORIEMI & AKORDEONEM
   ========================================================================== */
.scenarios-grouped-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg, #f8fafc);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
}

.scenario-group-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.scenario-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted, #64748b);
  display: flex;
  align-items: center;
  gap: 4px;
}

.scenario-group-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Accordion komponenta pro čistý výběr podkategorií */
.scenario-accordion-item {
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.scenario-accordion-item.is-open {
  border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.scenario-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.scenario-accordion-header:hover {
  background: #f1f5f9;
}

.scenario-accordion-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.scenario-accordion-count {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #e2e8f0;
  padding: 1px 7px;
  border-radius: 10px;
}

.scenario-accordion-chevron {
  font-size: 10px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.scenario-accordion-item.is-open .scenario-accordion-chevron {
  transform: rotate(180deg);
}

.scenario-accordion-body {
  padding: 8px 10px;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.scenario-accordion-item.is-open .scenario-accordion-body {
  display: flex;
}

.scenario-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.scenario-chip-btn:hover {
  border-color: #0284c7;
  background: #f0f9ff;
  color: #0369a1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.scenario-chip-btn.is-custom {
  border-left: 3px solid #f59e0b;
}

/* Sub-akordeon pro úroveň 3 (podokruhy / typy problémů) */
.scenario-subaccordion-item {
  width: 100%;
  border: 1px solid var(--border, #e2e8f0);
  background: #f8fafc;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
  transition: all 0.15s ease;
}

.scenario-subaccordion-item:last-child {
  margin-bottom: 0;
}

.scenario-subaccordion-item.is-open {
  border-color: #cbd5e1;
  background: #ffffff;
}

.scenario-subaccordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #f1f5f9;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  transition: background 0.15s ease;
}

.scenario-subaccordion-header:hover {
  background: #e2e8f0;
}

.scenario-subaccordion-item.is-open .scenario-subaccordion-header {
  background: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
}

.scenario-subaccordion-chevron {
  font-size: 9px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.scenario-subaccordion-item.is-open .scenario-subaccordion-chevron {
  transform: rotate(180deg);
}

.scenario-subaccordion-body {
  padding: 8px;
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  background: #ffffff;
}

.scenario-subaccordion-item.is-open .scenario-subaccordion-body {
  display: flex;
}

.manage-category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 12px;
}

/* ==========================================================================
   ROZCESTNÍK & DLAŽDICE RYCHLÝCH ŠABLON (WIZARD VÝBĚRU OKRUHŮ A PODBODŮ)
   ========================================================================== */
.scenario-wizard-wrap {
  margin-top: 4px;
}

.scenario-wizard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

@media (min-width: 600px) {
  .scenario-wizard-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 10px;
  }
}

.scenario-wizard-tile {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 10px;
  padding: 12px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  min-height: 100px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  position: relative;
}

.scenario-wizard-tile:hover {
  border-color: #0284c7;
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.12);
}

.scenario-wizard-tile:active {
  transform: scale(0.97);
  background: #e0f2fe;
}

.scenario-tile-icon-box {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
}

.scenario-tile-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 4px;
}

.scenario-tile-sub {
  font-size: 10px;
  color: #64748b;
  line-height: 1.2;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scenario-tile-badge {
  font-size: 10px;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 12px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Hlavička a navigace ve 2. kroku (zvolený okruh -> podbody) */
.scenario-wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 8px;
}

.scenario-wizard-back-btn {
  background: #ffffff;
  color: #0284c7;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.scenario-wizard-back-btn:hover {
  background: #f0f9ff;
  border-color: #0284c7;
  color: #0369a1;
}

.scenario-wizard-back-btn:active {
  transform: scale(0.96);
}

.scenario-wizard-path {
  font-size: 11.5px;
  color: #475569;
  font-weight: 600;
}

/* Skupina podokruhu */
.scenario-podokruh-group {
  margin-top: 8px;
  margin-bottom: 8px;
}

.scenario-podokruh-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  margin: 8px 0 6px 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Karta konkrétního nálezu (podbod) */
.scenario-podbod-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.scenario-podbod-card:hover {
  border-color: #38bdf8;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.scenario-podbod-card:active {
  transform: scale(0.985);
  background: #f0f9ff;
  border-color: #0284c7;
}

.scenario-podbod-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.scenario-podbod-icon {
  font-size: 20px;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 1px;
}

.scenario-podbod-body {
  min-width: 0;
  flex: 1;
}

.scenario-podbod-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.scenario-podbod-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scenario-podbod-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.scenario-badge-law {
  font-size: 10px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.scenario-badge-sev {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.scenario-badge-sev.sev-kriticka {
  background: #fee2e2;
  color: #991b1b;
}

.scenario-badge-sev.sev-vysoka {
  background: #ffedd5;
  color: #9a3412;
}

.scenario-badge-sev.sev-stredni {
  background: #fef9c3;
  color: #854d0e;
}

.scenario-badge-sev.sev-nizka {
  background: #dcfce7;
  color: #166534;
}

.scenario-use-btn {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================================================
   ČISTÝ, MODERNÍ SEGMENTOVANÝ DESIGN KATEGORIÍ A EDITOVATELNÉ AI KARTY
   ========================================================================== */
.main-category-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 4px;
}

@media (max-width: 500px) {
  .main-category-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pillar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 8px;
  border-radius: 8px;
  border: 1.5px solid var(--border, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text, #1e293b);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.pillar-btn:hover {
  border-color: #10b981;
  color: #047857;
}

.pillar-btn.active {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.pillar-icon {
  font-size: 16px;
}

.subcat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--card-bg, #ffffff);
  color: var(--text, #334155);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.subcat-chip:hover {
  border-color: #10b981;
  color: #047857;
}

.subcat-chip.active {
  background: #059669;
  color: #ffffff;
  border-color: #047857;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.25);
}

/* Editovatelné prvky uvnitř AI karty */
.ai-editable-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  padding: 6px 8px;
  box-sizing: border-box;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ai-editable-textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  outline: none;
}

.ai-editable-input {
  width: 100%;
  font-family: inherit;
  font-size: 11.5px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  padding: 5px 8px;
  box-sizing: border-box;
}

.ai-editable-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  outline: none;
}


/* ==========================================================================
   LEGISLATION PICKER, AUTO-SUGGEST & AI LAW FINDER
   ========================================================================== */

.dropdown-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: #ffffff;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 99;
  display: flex;
  flex-direction: column;
}

.dropdown-suggestions.hidden {
  display: none !important;
}

.dropdown-leg-item {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease, border-left 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-leg-item:last-child {
  border-bottom: none;
}

.dropdown-leg-item:hover,
.dropdown-leg-item.active {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}

.dropdown-leg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dropdown-leg-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e3a8a;
}

.dropdown-leg-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  white-space: nowrap;
}

.dropdown-leg-par {
  font-size: 11.5px;
  font-weight: 600;
  color: #2563eb;
}

.dropdown-leg-desc {
  font-size: 11px;
  color: #475569;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Legislative Citation Box */
.legislativa-citace-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: #1e3a8a;
  transition: all 0.2s ease;
}

.legislativa-citace-box.hidden {
  display: none !important;
}

/* Legislative Catalog Modal Cards */
.leg-pilir-btn {
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  transition: all 0.15s ease;
}

.leg-pilir-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.leg-catalog-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.leg-catalog-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

.leg-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.leg-card-zakon {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.leg-card-par {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  margin-top: 1px;
}

.leg-card-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.leg-card-citace {
  font-size: 12px;
  color: #334155;
  line-height: 1.4;
  background: #f8fafc;
  border-left: 3px solid #3b82f6;
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
}

.leg-card-naprava {
  font-size: 11.5px;
  color: #065f46;
  line-height: 1.35;
  background: #f0fdf4;
  padding: 5px 8px;
  border-radius: 6px;
}

.leg-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}


/* ==========================================================================
   ENHANCED 4-PILLAR & SUBCATEGORY STYLING (MODERN & CLEAN)
   ========================================================================== */

.main-category-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 8px;
}

@media (max-width: 580px) {
  .main-category-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pillar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pillar-btn .pillar-icon {
  font-size: 16px;
}

.pillar-btn:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* Pillar specific active states */
#pillar-eko.active {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25) !important;
}

#pillar-bozp.active {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #1e40af !important;
  box-shadow: 0 3px 10px rgba(59, 130, 246, 0.25) !important;
}

#pillar-po.active {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #991b1b !important;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25) !important;
}

#pillar-vtz.active {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25) !important;
}

/* Subcategory chips container */
.subcategories-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.subcat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.subcat-chip:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
  background: #f0fdf4;
  transform: translateY(-1px);
}

.subcat-chip.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35) !important;
}

.subcat-chip-add {
  border-style: dashed !important;
  border-color: #10b981 !important;
  color: #059669 !important;
  background: #f0fdf4 !important;
}

.badge-cat-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 12px;
}


/* ==========================================================================
   PERFORMANCE & SMOOTH SCROLLING OPTIMIZATIONS (EKODAV SAFETY V6.0)
   ========================================================================== */

/* 1. Hardware acceleration & smooth scrolling */
html, body {
  -webkit-overflow-scrolling: touch;
  text-rendering: optimizeSpeed;
}

.screen {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* 2. Content-visibility for large lists (skips rendering offscreen DOM) */
.finding-item,
.insp-card,
.doc-audit-card,
.leg-catalog-card,
.legis-card,
.scenario-chip-item {
  content-visibility: auto;
  contain-intrinsic-size: 0 100px;
}

/* 3. Image performance & render constraints */
img {
  content-visibility: auto;
}

.photo-img-preview {
  max-width: 100%;
  object-fit: cover;
  transform: translateZ(0);
}

.finding-thumb img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  transform: translateZ(0);
}

/* 4. Modal and Toast hardware acceleration */
.modal-overlay {
  will-change: opacity;
  transform: translateZ(0);
}

.modal-card {
  will-change: transform, opacity;
  transform: translateZ(0);
  -webkit-overflow-scrolling: touch;
}

.toast {
  will-change: transform, opacity;
}

/* 5. Fast touch feedback without 300ms tap delay */
button, .btn, .cat-chip, .subcat-chip, .pillar-btn, .leg-pilir-btn, .sev-btn, .status-btn, .nav-btn {
  touch-action: manipulation;
}

/* 6. Opravené rolování a zobrazení přihlašovací / registrační obrazovky na iPhone (iOS Safari) i Androidu */
#screen-login {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: auto !important;
  animation: none !important;
  transform: none !important;
}

#screen-login:not([style*="display: none"]):not([style*="display:none"]) {
  display: block !important;
}

#login-card-wrap {
  flex-shrink: 0 !important;
  margin: 4px auto 80px auto !important;
}




/* === BOČNÍ NÁSTROJE: MĚŘENÍ (DOLE VARIANTA 2) & POZNÁMKA (ÚZKÁ NA BOKU NÍŽE) === */
.side-tools-dock {
  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: none;
}

/* Skrýt plovoucí tlačítka na přihlašovací obrazovce */
body:has(#screen-login:not([style*="display: none"]):not([style*="display:none"])) .side-tools-dock {
  display: none !important;
}

/* 1. Žluté plovoucí tlačítko "Poznámka" – kompaktní ikonka tužky a bloku s volným posunem kamkoliv */
.side-dock-tab.tab-notes {
  pointer-events: auto;
  position: fixed;
  right: 0;
  bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 44px;
  padding: 0;
  background: linear-gradient(145deg, #fef08a 0%, #facc15 60%, #eab308 100%);
  color: #713f12;
  border: 1.5px solid #ca8a04;
  border-right: none;
  border-radius: 14px 0 0 14px;
  box-shadow: -2px 3px 12px rgba(202, 138, 4, 0.42), 0 2px 5px rgba(0, 0, 0, 0.18);
  cursor: grab;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 9550;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-radius 0.15s ease;
}

.side-dock-tab.tab-notes:hover {
  filter: brightness(1.05);
  box-shadow: -3px 4px 15px rgba(202, 138, 4, 0.55), 0 3px 7px rgba(0, 0, 0, 0.22);
}

.side-dock-tab.tab-notes:active,
.side-dock-tab.tab-notes.is-dragging {
  cursor: grabbing !important;
  transform: scale(1.12) !important;
  box-shadow: 0 8px 24px rgba(202, 138, 4, 0.65), 0 3px 8px rgba(0, 0, 0, 0.28) !important;
  z-index: 9999 !important;
}

.side-dock-tab.tab-notes .side-dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.side-dock-tab.tab-notes .side-dock-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}

.side-dock-tab.tab-notes .side-dock-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  font-size: 8.5px;
  font-weight: 900;
  background: #713f12;
  color: #fef08a;
  padding: 0 4px;
  border-radius: 999px;
  min-width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid #fef08a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Adaptivní zaoblení a pozice odznáčku podle strany přichycení */
.side-dock-tab.tab-notes.dock-left {
  border: 1.5px solid #ca8a04;
  border-left: none;
  border-radius: 0 14px 14px 0;
  box-shadow: 2px 3px 12px rgba(202, 138, 4, 0.42), 0 2px 5px rgba(0, 0, 0, 0.18);
}
.side-dock-tab.tab-notes.dock-left .side-dock-badge {
  left: auto;
  right: -5px;
}

.side-dock-tab.tab-notes.dock-right {
  border: 1.5px solid #ca8a04;
  border-right: none;
  border-radius: 14px 0 0 14px;
  box-shadow: -2px 3px 12px rgba(202, 138, 4, 0.42), 0 2px 5px rgba(0, 0, 0, 0.18);
}
.side-dock-tab.tab-notes.dock-right .side-dock-badge {
  left: -5px;
  right: auto;
}

.side-dock-tab.tab-notes.dock-free {
  width: 44px;
  height: 44px;
  border: 1.5px solid #ca8a04;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(202, 138, 4, 0.48), 0 2px 6px rgba(0, 0, 0, 0.2);
}
.side-dock-tab.tab-notes.dock-free .side-dock-badge {
  left: -4px;
  right: auto;
}

/* 2. Kompaktní spodní tlačítko "Měření" (Varianta 2 – těsně nad spodní lištou) */
.bottom-dock-meters-pill {
  pointer-events: auto;
  position: fixed;
  right: 8px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  height: 28px;
  padding: 3px 10px;
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  color: #ffffff;
  border: 1.5px solid #38bdf8;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.28);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, box-shadow 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.bottom-dock-meters-pill:hover,
.bottom-dock-meters-pill:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(2, 132, 199, 0.42);
}

.bottom-dock-meters-pill.monitoring-active {
  background: linear-gradient(135deg, #047857 0%, #10b981 100%);
  border-color: #6ee7b7;
  animation: pulseSideTab 2.2s infinite;
}

.bottom-dock-meters-pill.monitoring-warn {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  border-color: #fde68a;
}

.bottom-dock-meters-pill.monitoring-danger {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
  border-color: #fca5a5;
  animation: pulseSideTabDanger 1.2s infinite;
}

.bottom-meters-icon {
  font-size: 12px;
  line-height: 1;
}

.bottom-meters-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.bottom-meters-live-val {
  font-size: 9.5px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.32);
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@keyframes pulseSideTab {
  0%, 100% { box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35); }
  50% { box-shadow: 0 3px 16px rgba(16, 185, 129, 0.75); }
}

@keyframes pulseSideTabDanger {
  0%, 100% { box-shadow: 0 3px 12px rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 3px 20px rgba(239, 68, 68, 0.95); }
}

/* Na tabletech a širších displejích (Samsung Fold 6 rozložený, iPad) mírně pohodlnější velikost */
@media (min-width: 700px) {
  .side-dock-tab.tab-notes {
    width: 36px;
    min-width: 36px;
    max-width: 38px;
    min-height: 66px;
    height: 68px;
  }
  .side-dock-tab.tab-notes .side-dock-label {
    font-size: 9px;
  }
}

/* v10.77: oprava závorek. Kvůli zbloudilé "}" tato dvě pravidla dosud platila na všech šířkách
   (ne jen od 700 px) – ponechána globálně, aby se vzhled nezměnil. */
.bottom-dock-meters-pill {
  right: 16px;
  bottom: 72px;
  height: 32px;
  padding: 4px 12px;
}
.bottom-meters-label {
  font-size: 12px;
}

/* Ikona Měření v horní liště (pouze čistá ikonka bez textu)
   v10.77: základní pravidlo níže prohlížeč kvůli zbloudilé "}" vždy přeskočil; tlačítko vypadá
   stejně jako sousední ikony. Zakomentováno, aby se po opravě závorek vzhled nezměnil.
.topbar-mereni-btn {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: var(--radius-sm) !important;
  background: #ffffff !important;
  border: 1px solid var(--line-light) !important;
  color: var(--text) !important;
  font-size: 1.2rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.15s ease;
}
*/

.topbar-mereni-btn:hover {
  background: var(--bg-card-hover) !important;
  border-color: var(--primary) !important;
}

.topbar-mereni-btn.monitoring-active {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.topbar-mereni-btn.monitoring-warn {
  background: #fffbeb !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.topbar-mereni-btn.monitoring-danger {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
}

.topbar-mereni-val {
  position: absolute;
  bottom: -5px;
  right: -5px;
  font-size: 8.5px;
  font-weight: 800;
  background: #0f172a;
  color: #ffffff;
  padding: 1px 4px;
  border-radius: 999px;
  line-height: 1.1;
  white-space: nowrap;
  border: 1px solid #ffffff;
  pointer-events: none;
}

.topbar-mereni-val:empty {
  display: none;
}

/* Backdrop & Slide-out Drawer */
.side-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
  z-index: 9700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.side-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.side-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100dvh;
  background: #f8fafc;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.25);
  z-index: 9800;
  transform: translateX(104%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side-drawer-panel.open {
  transform: translateX(0);
}

/* Na telefonu a tabletu (do 1024px) se Zápisník / Poznámka otevře přes celou stránku; na PC zůstává standardní boční panel */
@media (max-width: 1024px) {
  #drawer-notes.side-drawer-panel {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
}

.side-drawer-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.side-drawer-body {
  padding: 12px 14px 80px 14px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.meter-box-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.meter-digital-display {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 10px;
  padding: 12px;
  margin: 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #334155;
}

.meter-big-number {
  font-size: 30px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.5px;
}

.meter-bar-track {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin: 8px 0 4px 0;
}

.meter-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.15s ease-out, background-color 0.2s ease;
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 70%, #ef4444 100%);
}

.note-item-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #6366f1;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ================= HORNÍ PŘEPÍNAČ MODULŮ & PORTÁL DOKUMENTACE FIREM / ZAMĚSTNANCŮ ================= */
.top-module-switcher {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 2px solid #0284c7;
  padding: 6px 10px;
  position: sticky;
  top: 56px;
  z-index: 8900;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.2);
}

/* Skrýt přepínač modulů na přihlašovací obrazovce */
body:has(#screen-login:not([style*="display: none"]):not([style*="display:none"])) .top-module-switcher {
  display: none !important;
}

.top-module-switcher-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.top-mod-btn {
  appearance: none;
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
  text-align: center;
  line-height: 1.2;
  position: relative;
}

.top-mod-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #ffffff;
  border-color: #38bdf8;
}

.top-mod-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #7dd3fc;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.45);
}

.top-mod-btn.active-emerald {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-color: #6ee7b7;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.45);
}

.top-mod-btn.active-amber {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border-color: #fde68a;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.45);
}

.top-mod-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  background: #ef4444;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  line-height: 1;
}

/* Semafor karet revizí */
.firdok-semafor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.firdok-stat-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.firdok-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.firdok-stat-card.stat-expired {
  background: #fef2f2;
  border-color: #fca5a5;
}
.firdok-stat-card.stat-warning {
  background: #fffbeb;
  border-color: #fde68a;
}
.firdok-stat-card.stat-valid {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.firdok-stat-card.stat-total {
  background: #f0f9ff;
  border-color: #bae6fd;
}

/* Karty firem v pásu */
.firdok-company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.firdok-company-card {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
  position: relative;
}

.firdok-company-card:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}

.firdok-company-card.active {
  border-color: #0284c7;
  background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22);
}

/* 4 Pilíře dokumentace: BOZP, PO, EKOLOGIE, IPPC */
.firdok-pillars-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.firdok-pillar-btn {
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.firdok-pillar-btn:hover {
  border-color: #0284c7;
  background: #f8fafc;
}

.firdok-pillar-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0369a1;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3);
}

.firdok-pillar-btn[data-pillar="BOZP"].active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border-color: #0369a1;
}
.firdok-pillar-btn[data-pillar="PO"].active {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: #991b1b;
}
.firdok-pillar-btn[data-pillar="EKOLOGIE"].active {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  border-color: #166534;
}
.firdok-pillar-btn[data-pillar="IPPC"].active {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border-color: #5b21b6;
}

/* Karta jednotlivého firemního dokumentu / revize */
.firdok-doc-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-left: 5px solid #0284c7;
  border-radius: 12px;
  padding: 13px 14px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.15s ease;
}

.firdok-doc-card.rev-expired {
  border-left-color: #dc2626;
  background: #fffafa;
}
.firdok-doc-card.rev-warning {
  border-left-color: #f59e0b;
  background: #fffdf5;
}
.firdok-doc-card.rev-valid {
  border-left-color: #10b981;
}

@media (max-width: 640px) {
  .top-module-switcher {
    padding: 5px 6px;
  }
  .top-mod-btn {
    padding: 7px 5px;
    font-size: 0.72rem;
    gap: 4px;
  }
  .firdok-semafor-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .firdok-pillars-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ================= iOS 18 & FACEBOOK MODERN UI FACELIFT ================= */
:root {
  --ios-blue: #0866ff;
  --ios-blue-dark: #0054d6;
  --ios-green: #34c759;
  --ios-orange: #ff9500;
  --ios-red: #ff3b30;
  --fb-bg: #f0f2f5;
  --fb-card: #ffffff;
  --fb-secondary-btn: #e4e6eb;
  --fb-secondary-hover: #d8dadf;
}

body {
  background: var(--fb-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Plus Jakarta Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* Horní lišta ve stylu iPhone / Facebook (Frosted Glass + kruhové ikony) */
.topbar {
  background: rgba(255, 255, 255, 0.90) !important;
  backdrop-filter: blur(22px) saturate(190%);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04) !important;
}

.topbar .icon-btn,
.topbar .back {
  width: 38px;
  height: 38px;
  border-radius: 999px !important;
  background: #f0f2f5 !important;
  border: 1px solid rgba(203, 213, 225, 0.6) !important;
  color: #050505 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), background 0.15s ease !important;
  box-shadow: none !important;
}

.topbar .icon-btn:hover,
.topbar .back:hover {
  background: #e4e6eb !important;
  transform: translateY(-1px);
}

.topbar .icon-btn:active,
.topbar .back:active {
  transform: scale(0.92) !important;
  background: #d8dadf !important;
}

/* Horní přepínač modulů jako iOS Segmented Control / Facebook Pills */
.top-module-switcher {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(203, 213, 225, 0.75) !important;
  padding: 7px 12px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.top-module-switcher-inner {
  background: #e4e6eb;
  padding: 4px;
  border-radius: 14px;
  gap: 4px !important;
  max-width: 940px;
}

.top-mod-btn {
  border: none !important;
  background: transparent !important;
  color: #4b5563 !important;
  border-radius: 11px !important;
  padding: 8px 12px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.top-mod-btn:hover {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.55) !important;
}

.top-mod-btn.active {
  background: linear-gradient(180deg, #0866ff 0%, #0054d6 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 10px rgba(8, 102, 255, 0.34), 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.top-mod-btn.active-emerald {
  background: linear-gradient(180deg, #34c759 0%, #249e44 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 3px 10px rgba(52, 199, 89, 0.34), 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

/* Moderní iPhone / Facebook tlačítka v celé aplikaci */
.btn {
  border-radius: 12px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s ease, background 0.16s ease, filter 0.16s ease !important;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary {
  background: linear-gradient(180deg, #0866ff 0%, #0054d6 100%) !important;
  border-color: #0054d6 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(8, 102, 255, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 5px 14px rgba(8, 102, 255, 0.35) !important;
}

.btn-success {
  background: linear-gradient(180deg, #34c759 0%, #28a745 100%) !important;
  border-color: #249e44 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(52, 199, 89, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.btn-outline,
.btn-secondary {
  background: #f0f2f5 !important;
  border: 1px solid #d0d5dd !important;
  color: #1c1e21 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.btn-outline:hover,
.btn-secondary:hover {
  background: #e4e6eb !important;
  border-color: #b0b8c4 !important;
}

/* Karty ve stylu iOS / Facebook Feed */
.card,
.insp-card,
.detail-header-card,
.detail-plan-section-card,
.firdok-company-card,
.firdok-doc-card,
.firdok-stat-card {
  border-radius: 16px !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

.hero-card {
  border-radius: 18px !important;
  background: linear-gradient(135deg, #0866ff 0%, #0043a8 100%) !important;
  box-shadow: 0 6px 20px rgba(8, 102, 255, 0.25) !important;
}

/* Vstupní pole (Inputy a Selecty) ve stylu iOS */
.input-field,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="url"],
select,
textarea {
  border-radius: 11px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.input-field:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: #0866ff !important;
  box-shadow: 0 0 0 3px rgba(8, 102, 255, 0.16) !important;
}

/* Spodní navigační lišta ve stylu iPhone Tab Bar */
.bottomnav {
  background: rgba(255, 255, 255, 0.90) !important;
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border-top: 1px solid rgba(203, 213, 225, 0.7) !important;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.04) !important;
}

.bottomnav .nav-btn {
  border-radius: 12px !important;
  transition: transform 0.12s ease, color 0.15s ease !important;
}

.bottomnav .nav-btn:active {
  transform: scale(0.92) !important;
}

.bottomnav .nav-btn.active {
  color: #0866ff !important;
}

/* Modální okna ve stylu iOS Sheet / Card */
.modal-card {
  border-radius: 20px !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25) !important;
}

/* =====================================================================
   v10.71: SKRÝVÁNÍ HORNÍ LIŠTY PŘI POSOUVÁNÍ (telefon i PC)
   ===================================================================== */
.topbar,
.top-module-switcher {
  transition: transform 0.25s ease;
}
body.lista-skryta .topbar {
  transform: translateY(-100%);
}
body.lista-skryta .top-module-switcher {
  transform: translateY(calc(-1 * var(--lista-vyska, 140px) - 8px));
}
#firdok-aktivni-firma-bar {
  transition: top 0.25s ease;
}
body.lista-skryta #firdok-aktivni-firma-bar {
  top: 4px !important;
}

/* dlouhá část popisku záložky: na PC součást textu (tlačítko je flex), na mobilu skrytá */
#firdok-subtabs .sub-dlouhy {
  display: contents;
}

/* výběr provozovny přímo v pruhu firmy (PC i mobil) */
#firdok-aktivni-firma-bar .fab-prov {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 3px 8px;
  border: 1.5px solid;
  border-radius: 999px;
  background: #ffffff;
  width: auto;
  max-width: 280px;
  cursor: pointer;
}

/* v10.73: tablet a PC – pruh s firmou v JEDNOM řádku:
   [🏢 název firmy…] [IČO] [📍 provozovna ▾] ....... [výběr firmy ▾] */
@media (min-width: 641px) {
  #firdok-aktivni-firma-bar .fab-box {
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 6px 10px !important;
    border-left-width: 6px !important;
  }
  #firdok-aktivni-firma-bar .fab-label,
  #firdok-aktivni-firma-bar .fab-pocet {
    display: none !important;
  }
  #firdok-aktivni-firma-bar .fab-main { min-width: 0; }
  #firdok-aktivni-firma-bar .fab-row {
    flex-wrap: nowrap !important;
    min-width: 0;
  }
  #firdok-aktivni-firma-bar .fab-row > * { flex: 0 0 auto; white-space: nowrap; }
  #firdok-aktivni-firma-bar .fab-row > .fab-name {
    flex: 0 1 auto;
    min-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem !important;
  }
  #firdok-aktivni-firma-bar .fab-prov { max-width: 230px; }
  #firdok-aktivni-firma-bar .fab-select { flex: 0 1 auto; max-width: 210px !important; }
}

/* v10.73: tablet i PC (aplikace je úzká, cca 640 px) – IČO a výběr firmy schované pod ▾
   (jako na telefonu), aby se vešel celý název firmy */
@media (min-width: 641px) {
  #firdok-aktivni-firma-bar:not(.rozbaleno) .fab-ico { display: none !important; }
  #firdok-aktivni-firma-bar:not(.rozbaleno) .fab-select { display: none !important; }
  #firdok-aktivni-firma-bar.rozbaleno .fab-box { flex-wrap: wrap !important; }
  #firdok-aktivni-firma-bar.rozbaleno .fab-row { flex-wrap: wrap !important; row-gap: 4px; }
  #firdok-aktivni-firma-bar .fab-main { order: 1; flex: 1 1 0; }
  #firdok-aktivni-firma-bar .fab-toggle {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1.5px solid;
    border-radius: 999px;
    background: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  #firdok-aktivni-firma-bar.rozbaleno .fab-toggle { transform: rotate(180deg); }
  #firdok-aktivni-firma-bar.rozbaleno .fab-select {
    order: 3;
    flex: 1 1 100%;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important;
  }
}

/* tlačítka pro mobil jsou na PC skrytá */
.fab-toggle,
#firdok-mobil-nastroje-btn {
  display: none;
}

/* =====================================================================
   v10.71: KOMPAKTNÍ DOKUMENTACE FIREM NA TELEFONU
   ===================================================================== */
@media (max-width: 640px) {
  /* záložky v jednom řádku, posun prstem do strany */
  #firdok-subtabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px !important;
    padding: 4px !important;
    margin-bottom: 8px !important;
  }
  #firdok-subtabs::-webkit-scrollbar { display: none; }
  #firdok-subtabs > button {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    white-space: nowrap;
    padding: 7px 11px !important;
    font-size: 0.78rem !important;
  }
  #firdok-subtabs .sub-dlouhy { display: none !important; }

  /* úvodní modrý banner na telefonu není potřeba */
  #firdok-hero { display: none !important; }

  /* pruh s firmou: jeden řádek */
  #firdok-aktivni-firma-bar { margin-bottom: 8px !important; }
  #firdok-aktivni-firma-bar .fab-box {
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 6px 6px 6px 10px !important;
    border-left-width: 6px !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16) !important;
  }
  #firdok-aktivni-firma-bar .fab-main { order: 1; cursor: pointer; }
  #firdok-aktivni-firma-bar .fab-toggle { order: 2; }
  #firdok-aktivni-firma-bar .fab-select { order: 3; }
  #firdok-aktivni-firma-bar:not(.rozbaleno) .fab-label,
  #firdok-aktivni-firma-bar:not(.rozbaleno) .fab-row > span:not(.fab-name),
  #firdok-aktivni-firma-bar:not(.rozbaleno) .fab-select {
    display: none !important;
  }
  /* sbalený pruh: 1. řádek název firmy, 2. řádek výběr provozovny */
  #firdok-aktivni-firma-bar .fab-row { flex-wrap: wrap !important; row-gap: 4px !important; }
  #firdok-aktivni-firma-bar .fab-row .fab-name { flex: 1 1 100%; }
  #firdok-aktivni-firma-bar .fab-prov {
    max-width: 100%;
    font-size: 16px; /* iOS při klepnutí nezoomuje */
    padding: 2px 8px;
  }
  #firdok-aktivni-firma-bar .fab-name {
    display: block;
    max-width: 100%;
    font-size: 0.95rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #firdok-aktivni-firma-bar.rozbaleno .fab-box { flex-wrap: wrap !important; }
  #firdok-aktivni-firma-bar.rozbaleno .fab-name { white-space: normal; }
  #firdok-aktivni-firma-bar.rozbaleno .fab-select {
    flex: 1 1 100%;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important; /* iOS nezoomuje */
  }
  #firdok-aktivni-firma-bar .fab-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 1.5px solid;
    border-radius: 999px;
    background: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  #firdok-aktivni-firma-bar.rozbaleno .fab-toggle { transform: rotate(180deg); }

  /* 4 karty revizí v jednom řádku */
  .firdok-semafor-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .firdok-stat-card {
    padding: 6px 4px !important;
    border-radius: 10px !important;
    align-items: center;
    text-align: center;
    justify-content: flex-start !important;
  }
  .firdok-stat-card > div:nth-child(1) {
    font-size: 0.56rem !important;
    line-height: 1.15;
    letter-spacing: 0;
  }
  .firdok-stat-card > div:nth-child(2) {
    order: -1;
    font-size: 1.2rem !important;
    margin: 0 !important;
    line-height: 1.15;
  }
  .firdok-stat-card > div:nth-child(3) { display: none; }

  /* upozornění + Google Disk sbalené do jednoho řádku */
  #firdok-mobil-nastroje-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 0 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
  }
  #firdok-mobil-nastroje-btn .fmn-sipka { transition: transform 0.2s ease; }
  #screen-firemni-dokumentace.nastroje-rozbalene #firdok-mobil-nastroje-btn .fmn-sipka { transform: rotate(180deg); }
  #screen-firemni-dokumentace:not(.nastroje-rozbalene) #firdok-reminder-banner,
  #screen-firemni-dokumentace:not(.nastroje-rozbalene) #firdok-gdrive-panel {
    display: none !important;
  }
}

/* --- v10.75: Návrhář plánu – vlastní barvy a úpravy prvků --- */
.dtool-btn-vyber { border-color: #2563eb; color: #1d4ed8; }
.dtool-btn-vyber.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.dtool-snap { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: #475569; cursor: pointer; user-select: none; }
.dstyl-row { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #cbd5e1; }
.dstyl-row.hidden { display: none; }
.dstyl-item { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dstyl-item input[type="color"] { width: 36px; height: 28px; padding: 1px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; cursor: pointer; }
.dstyl-swatches { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.dstyl-swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #94a3b8; cursor: pointer; padding: 0; transition: transform .1s ease; }
.dstyl-swatch:hover { transform: scale(1.18); }
.dstyl-chk { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: #475569; cursor: pointer; }
.dsel-akce:disabled { opacity: .4; cursor: not-allowed; }
.designer-canvas-hint kbd { background: #e2e8f0; border-radius: 3px; padding: 0 4px; font-size: 10.5px; }

/* =========================================================================
   v10.77: VARIANTA A = KOMPAKTNÍ MOBILNÍ FORMULÁŘ ZJIŠTĚNÍ
   Vše je k dispozici, ale zabírá na výšku méně místa a je sbalené.
   Aktivní přes body.zj-var-a (nastavuje aplikovatRezimFormulareZjisteni).
   ========================================================================= */
body.zj-var-a #zjisteni-sec-plan .btn-plan-trigger { padding: 9px 10px; font-size: 12.5px; }
body.zj-var-a #zjisteni-sec-plan .plan-btn-icon { font-size: 14px; }

/* Foto: jen dvě tlačítka vedle sebe, bez velké ikony a dlouhých textů */
body.zj-var-a #zjisteni-sec-foto { margin-top: 8px; }
body.zj-var-a #foto-preview.photo-uploader-hero { padding: 8px; border-width: 1.5px; }
body.zj-var-a #foto-preview .photo-hero-icon,
body.zj-var-a #foto-preview .photo-hero-sub,
body.zj-var-a #foto-preview > div[style*="margin-top:8px"] { display: none; }
body.zj-var-a #foto-preview .photo-hero-title { font-size: 11px; letter-spacing: 0; }
body.zj-var-a #foto-preview .photo-actions-dual { grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
body.zj-var-a #foto-preview .btn-dual-photo,
body.zj-var-a #foto-preview .btn-dual-gallery { padding: 9px 6px; font-size: 12px; gap: 5px; }
body.zj-var-a #foto-preview img { max-height: 180px; object-fit: contain; }

/* Rychlé šablony: jedna lišta, rozbalí se kliknutím */
body.zj-var-a #scenarios-panel-wrap { margin-top: 8px !important; padding: 7px 10px; }
body.zj-var-a #scenarios-panel-wrap > div:first-child > div:first-child { flex: 1; padding: 3px 0; }
body.zj-var-a #scenarios-panel-title { font-size: 11.5px !important; }
body.zj-var-a #scenarios-toggle-icon { font-size: 12px !important; color: #2563eb !important; }
body.zj-var-a #btn-spravovat-sablony,
body.zj-var-a #btn-pridat-vlastni-sablonu { font-size: 10px !important; padding: 2px 6px !important; }

/* Místo: rychlé volby v jednom vodorovně posuvném řádku */
body.zj-var-a #zjisteni-sec-misto { margin-top: 8px !important; }
body.zj-var-a #zjisteni-sec-misto label { font-size: 12px; }
body.zj-var-a #zjisteni-misto-input { padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
body.zj-var-a #location-chips-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 5px; margin-top: 6px; padding-bottom: 3px; scrollbar-width: thin; }
body.zj-var-a #location-chips-row > * { flex: 0 0 auto; white-space: nowrap; font-size: 11px; padding: 4px 9px; }

/* Kategorie: 4 malé pilíře v jednom řádku */
body.zj-var-a #zjisteni-sec-kategorie { margin-top: 8px !important; }
body.zj-var-a #main-category-pillars.main-category-pillars-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 4px; margin: 4px 0 0; }
body.zj-var-a #main-category-pillars .pillar-btn { flex-direction: column; gap: 1px; padding: 5px 2px; border-radius: 8px; min-height: 0; }
body.zj-var-a #main-category-pillars .pillar-icon { font-size: 14px; margin: 0; }
body.zj-var-a #main-category-pillars .pillar-title { font-size: 9.5px; line-height: 1.1; }
body.zj-var-a #zjisteni-sec-kategorie .input-with-icon { margin-top: 5px !important; }
body.zj-var-a #select-kategorie { padding-top: 7px; padding-bottom: 7px; font-size: 13px; }

/* Popis */
body.zj-var-a #zjisteni-sec-popis { margin-top: 10px !important; }
body.zj-var-a #zjisteni-sec-popis .voice-header-row label { font-size: 12.5px !important; }
body.zj-var-a #quick-meters-notes-bar { padding: 3px 6px !important; gap: 4px !important; margin-bottom: 4px !important; }
body.zj-var-a #quick-meters-notes-bar > span { display: none; }
body.zj-var-a #zjisteni-popis-ai { min-height: 64px; font-size: 13px; }
body.zj-var-a #zjisteni-sec-popis .btn-ai { font-size: 12px !important; padding: 8px 10px !important; }

/* Lišta detailů (Závažnost, Zákon, Opatření, Lhůta) */
body.zj-var-a #zjisteni-var-a-toggle-bar { margin-top: 10px !important; padding: 8px 10px !important; }
body.zj-var-a #zjisteni-var-a-toggle-bar strong { font-size: 12px !important; }
body.zj-var-a #zjisteni-var-a-summary-text { font-size: 11px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.zj-var-a #scenarios-panel-wrap > div:first-child { flex-wrap: nowrap !important; }
body.zj-var-a #scenarios-panel-title { white-space: nowrap; }
body.zj-var-a #btn-spravovat-sablony { font-size: 0 !important; padding: 3px 7px !important; }
body.zj-var-a #btn-spravovat-sablony::before { content: "⚙️"; font-size: 12px; }
