/* Tabler/Lucide-style outline icons */
.icon { stroke: currentColor; fill: none; flex-shrink: 0; }
.icon-only { display: inline-flex; align-items: center; justify-content: center; }

/* Hlasování 360 — kompletní stylesheet */
:root {
  --color-primary: #d97706;
  --color-primary-dark: #b45309;
  --color-primary-light: #fbbf24;
  --color-text: #1f2937;
  --color-text-soft: #6b7280;
  --color-text-muted: #9ca3af;
  --color-bg: #f9fafb;
  --color-surface: #ffffff;
  --color-surface-2: #f3f4f6;
  --color-border: #e5e7eb;
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --color-warning: #f59e0b;
  --color-info: #2563eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.10), 0 4px 6px rgba(0,0,0,.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; line-height: 1.5; color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* === Layout === */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: #111827; color: #e5e7eb;
  display: flex; flex-direction: column; flex-shrink: 0;
}

/* v1.0.10-rc30: Mobile sidebar — hamburger + off-canvas drawer */
.sidebar-toggle {
  display: none; /* Skryté na desktopu */
  position: fixed; top: 12px; left: 12px; z-index: 1001;
  width: 40px; height: 40px; padding: 8px;
  background: #111827; border: 1px solid #374151; border-radius: 6px;
  cursor: pointer; flex-direction: column; gap: 5px;
  align-items: center; justify-content: center;
}
.sidebar-toggle:hover { background: #1f2937; }
.sidebar-toggle span {
  display: block; width: 20px; height: 2px; background: #e5e7eb;
  transition: transform 0.2s, opacity 0.2s;
}
.sidebar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-toggle.open span:nth-child(2) { opacity: 0; }
.sidebar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-backdrop {
  display: none; /* Skryté na desktopu */
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
  z-index: 999; opacity: 0; transition: opacity 0.2s;
}
.sidebar-backdrop.visible { display: block; opacity: 1; }

@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh;
    width: 280px; max-width: 85vw; z-index: 1000;
    transform: translateX(-100%); transition: transform 0.25s ease-out;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.open { transform: translateX(0); }
  .shell { padding-top: 56px; /* prostor pro hamburger button */ }
  .content { padding-left: 16px !important; padding-right: 16px !important; }
}
.sidebar-header {
  padding: 20px 18px; border-bottom: 1px solid #1f2937;
  font-weight: 700; font-size: 17px;
}
.sidebar-header small { display: block; font-weight: 400; font-size: 12px; color: #9ca3af; margin-top: 4px; }
.sidebar nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.sidebar nav h4 {
  padding: 12px 18px 6px; margin: 0; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: #6b7280; font-weight: 600;
}
/* v1.0.10-rc27: Collapsible nav groups */
.sidebar .nav-group { border: none; padding: 0; margin: 0; }
.sidebar .nav-group > summary {
  list-style: none; cursor: pointer; padding: 8px 12px 4px 18px;
  display: flex; align-items: center; justify-content: space-between;
  user-select: none;
}
.sidebar .nav-group > summary::-webkit-details-marker { display: none; }
.sidebar .nav-group > summary h4 {
  padding: 4px 0 4px; margin: 0; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: #6b7280; font-weight: 600;
  flex: 1; pointer-events: none;
}
.sidebar .nav-group > summary::after {
  content: "▸"; color: #6b7280; font-size: 10px; margin-left: 8px;
  transition: transform 0.15s; flex-shrink: 0;
}
.sidebar .nav-group[open] > summary::after { transform: rotate(90deg); }
.sidebar .nav-group:hover > summary h4 { color: #9ca3af; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px; color: #d1d5db; font-size: 14px;
}
.sidebar nav a:hover { background: #1f2937; color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--color-primary); color: #fff; }
.sidebar-footer {
  padding: 12px 18px; border-top: 1px solid #1f2937; font-size: 13px;
}
.sidebar-footer .who { color: #9ca3af; font-size: 12px; }
.sidebar-footer a { color: #e5e7eb; }

/* v1.0.10-rc28: Mode badge + toggle v sidebaru */
.sidebar-event-context {
  padding: 10px 14px; border-bottom: 1px solid #1f2937;
  background: #0f172a;
}
.sidebar-event-context .se-name {
  font-size: 11px; color: #9ca3af; margin-bottom: 6px;
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mode-toggle-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px; border-radius: 6px;
  background: transparent; border: 1px solid #374151;
  color: #e5e7eb; font-size: 12px; cursor: pointer;
  font-family: inherit; transition: background 0.15s;
}
.mode-toggle-btn:hover:not(.disabled) { background: #1f2937; border-color: #4b5563; }
.mode-toggle-btn.disabled { cursor: not-allowed; opacity: 0.7; }
.mode-toggle-btn .mode-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.mode-toggle-btn.is-live .mode-dot { background: #dc2626; box-shadow: 0 0 6px #dc2626; }
.mode-toggle-btn.is-test .mode-dot { background: #9ca3af; }
.mode-toggle-btn .mode-label {
  font-weight: 600; letter-spacing: 0.5px;
}
.mode-toggle-btn.is-live .mode-label { color: #fca5a5; }
.mode-toggle-btn.is-test .mode-label { color: #d1d5db; }
.mode-toggle-btn .mode-action {
  margin-left: auto; font-size: 10px; color: #6b7280;
}

.content { flex: 1; min-width: 0; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--color-border);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
}
.topbar h1 { margin: 0; font-size: 18px; font-weight: 600; }
.topbar .status-pill {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--color-surface-2); color: var(--color-text);
}
.status-pill.live { background: #fef3c7; color: #92400e; }
.status-pill.voting { background: #dcfce7; color: #166534; animation: pulse 2s infinite; }
.status-pill.closed { background: #fee2e2; color: #991b1b; }
.status-pill.draft { background: #dbeafe; color: #1e40af; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .7; } }

.main { padding: 24px; max-width: 1280px; }
.main h2 { margin: 0 0 16px; font-size: 22px; font-weight: 700; }
.main h3 { margin: 24px 0 12px; font-size: 17px; font-weight: 600; }

/* === Cards === */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card h3:first-child { margin-top: 0; }
.card-grid { display: grid; gap: 16px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr !important; }
}

.stat { display: flex; flex-direction: column; gap: 6px; position: relative; padding: 18px 20px; }
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--color-text-soft); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .label .icon { opacity: .6; }
.stat .value { font-size: 36px; font-weight: 700; color: var(--color-text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 13px; color: var(--color-text-soft); margin-top: auto; }
.stat.accent .value { color: var(--color-primary); }
.stat .progress { margin-top: 8px; height: 6px; }

/* === Modal (rc31) — reusable dialog */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay.open { display: flex; animation: modalFadeIn 0.15s ease-out; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-dialog {
  background: white; border-radius: 12px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: modalSlideUp 0.2s ease-out;
}
@keyframes modalSlideUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  padding: 20px 24px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.modal-header h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--color-text); }
.modal-close {
  width: 32px; height: 32px; background: transparent; border: 0; border-radius: 6px;
  font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.modal-close:hover { background: #f1f5f9; color: #475569; }
.modal-body { padding: 16px 24px; }
.modal-footer {
  padding: 12px 24px 20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  border-top: 1px solid #f1f5f9; margin-top: 8px;
}
.modal-footer .btn { font-family: inherit; }
@media (max-width: 480px) {
  .modal-dialog { border-radius: 10px; }
  .modal-header { padding: 16px 18px 10px; }
  .modal-body { padding: 14px 18px; }
  .modal-footer { padding: 10px 18px 18px; flex-direction: column-reverse; }
  .modal-footer .btn { width: 100%; }
}

/* === Forms === */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-weight: 600; font-size: 13px; color: var(--color-text); }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="date"],
.form-row input[type="datetime-local"],
.form-row input[type="time"],
.form-row input[type="color"],
.form-row input[type="url"],
.form-row select,
.form-row textarea {
  padding: 10px 12px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 15px; background: #fff; color: var(--color-text);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217,119,6,.15);
}
.form-row .hint { font-size: 12px; color: var(--color-text-soft); }
.form-row.checkbox { flex-direction: row; align-items: center; gap: 10px; }
.form-row.checkbox label { font-weight: 400; }
.form-row.checkbox input[type="checkbox"] { width: 18px; height: 18px; }
.form-row.error input, .form-row.error select { border-color: var(--color-danger); }
.form-row.error .hint { color: var(--color-danger); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* === Buttons (rc32: kompletní redesign) ===
   Hierarchie variant:
   - .btn (primary, default)     — hlavní akce, oranžová (brand)
   - .btn.secondary              — tertiary CTA, šedá vyplň
   - .btn.ghost                  — quaternary, transparent s borderem
   - .btn.danger                 — destruktivní akce (smazat, archivovat)
   - .btn.success                — pozitivní akce (potvrdit, schválit)
   - .btn.warning                — varovná akce (žlutá)
   - .btn.outline                — alternativa ke ghost (border tečkovaný, méně formální)

   Modifikátory:
   - .btn.lg                     — velké (44px height) — primární akce v dashboardu
   - .btn.sm                     — malé (28px height) — v tabulkách
   - .btn.block                  — full-width
   - .danger-text                — červený text na ghost (sm akce typu smazat)
*/
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: 1px solid transparent; cursor: pointer;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; line-height: 1;
  background: var(--color-primary); color: #fff;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  text-decoration: none; font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
.btn:active { transform: translateY(0.5px); box-shadow: inset 0 1px 2px rgba(0,0,0,0.08); }
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* SECONDARY: šedá vyplň, viditelné */
.btn.secondary { background: #e5e7eb; color: var(--color-text); border-color: #d1d5db; box-shadow: none; }
.btn.secondary:hover { background: #d1d5db; border-color: #9ca3af; }
.btn.secondary:active { background: #9ca3af; }

/* GHOST: transparent, jasný hover */
.btn.ghost { background: transparent; color: var(--color-text); border-color: #d1d5db; box-shadow: none; }
.btn.ghost:hover { background: #f3f4f6; border-color: #9ca3af; color: var(--color-text); }
.btn.ghost:active { background: #e5e7eb; }

/* GHOST + DANGER-TEXT: ghost s červeným textem (pro destruktivní akce v tabulkách) */
.btn.ghost.danger-text { color: var(--color-danger); border-color: #fecaca; }
.btn.ghost.danger-text:hover { background: #fef2f2; border-color: var(--color-danger); color: var(--color-danger); }

/* DANGER: červené vyplnění */
.btn.danger { background: var(--color-danger); color: #fff; border-color: var(--color-danger); }
.btn.danger:hover { background: #b91c1c; border-color: #b91c1c; }
.btn.danger:active { background: #991b1b; }

/* SUCCESS: zelené vyplnění */
.btn.success { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.btn.success:hover { background: #15803d; border-color: #15803d; }
.btn.success:active { background: #14532d; }

/* WARNING: žluté vyplnění */
.btn.warning { background: var(--color-warning); color: #78350f; border-color: var(--color-warning); }
.btn.warning:hover { background: #d97706; color: #fff; border-color: #d97706; }

/* OUTLINE: transparent s tečkovaným borderem (méně častý) */
.btn.outline { background: transparent; color: var(--color-text); border: 1px dashed var(--color-border); box-shadow: none; }
.btn.outline:hover { background: var(--color-surface-2); border-style: solid; border-color: var(--color-text-soft); }

/* SIZE varianty */
.btn.lg { padding: 13px 24px; font-size: 15px; }
.btn.sm { padding: 6px 11px; font-size: 12.5px; gap: 4px; }
.btn.block { width: 100%; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* === Screen editor (rc36) — komponenty pro editor obrazovky === */
.editor-section {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.editor-section-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--color-surface-2);
}
.editor-section-header h3 {
  margin: 0; font-size: 15px; font-weight: 600; color: var(--color-text);
  display: flex; align-items: center; gap: 8px;
}
.editor-section-header .editor-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--color-primary); color: white;
  font-size: 12px; font-weight: 700;
}
.editor-section-header .editor-section-count {
  font-size: 12px; color: var(--color-text-soft); font-weight: normal;
}
.editor-section-body { padding: 18px; }

/* Preset cards */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.preset-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  display: flex; flex-direction: column; gap: 6px;
}
.preset-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}
.preset-card:active { transform: translateY(1px); }
.preset-card .preset-title { font-size: 14px; font-weight: 600; color: var(--color-text); }
.preset-card .preset-desc { font-size: 12px; color: var(--color-text-soft); line-height: 1.4; }

/* Advanced toggle — collapsible "Pokročilé" pattern */
.advanced-toggle {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 0;
  color: var(--color-text-soft); font-size: 13px;
  cursor: pointer; padding: 8px 0; font-family: inherit;
  margin: 16px 0 8px;
}
.advanced-toggle:hover { color: var(--color-text); }
.advanced-toggle::before {
  content: '▸'; font-size: 11px;
  transition: transform 0.15s;
}
.advanced-toggle.open::before { transform: rotate(90deg); }
.advanced-content { display: none; }
.advanced-content.open { display: block; }

/* Color palette grid */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.palette-field {
  display: flex; flex-direction: column; gap: 4px;
}
.palette-field label { font-size: 12px; font-weight: 600; color: var(--color-text); }
.palette-field input[type="color"] {
  width: 100%; height: 36px; padding: 2px;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  cursor: pointer;
}
.palette-field small { font-size: 11px; color: var(--color-text-soft); }

/* Preview wrapper */
.preview-wrap {
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 8px; background: var(--color-surface-2);
}
.preview-wrap iframe {
  width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 4px; background: white;
  display: block;
}

/* State tabs */
.state-tab-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
}
.state-tab {
  padding: 6px 14px; border: 1px solid var(--color-border); background: white;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px;
  color: var(--color-text); font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.state-tab:hover { background: var(--color-surface-2); border-color: var(--color-text-soft); }
.state-tab.active {
  background: var(--color-primary); color: white; border-color: var(--color-primary); font-weight: 600;
}

/* Sponsor rotating items — modal-friendly cards */
.rotating-item-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 100px 1fr 1fr 32px;
  gap: 8px;
  align-items: end;
}
.rotating-item-card .form-row { margin: 0; }
.rotating-item-card .form-row label { font-size: 11px; }
.rotating-item-card .form-row input { font-size: 13px; padding: 6px 8px; }
@media (max-width: 700px) {
  .rotating-item-card { grid-template-columns: 1fr; }
}

/* === Results page (rc37) — Výsledky & vyhlášení === */

/* Confirmation gate — zabraňuje náhodnému zobrazení výsledků */
.results-gate {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  text-align: center;
}
.results-gate-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  background: white; border-radius: 50%;
  color: #92400e; margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(146, 64, 14, 0.15);
}
.results-gate h3 { color: #92400e; margin: 0 0 8px; font-size: 18px; }
.results-gate p { color: #78350f; max-width: 520px; margin: 0 auto 16px; font-size: 14px; }
.results-gate-hint { font-size: 12px; color: #92400e; margin-top: 12px !important; }

/* Citlivé info pole (po revealu) */
.results-sensitive-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: #fef3c7; border: 1px solid #fbbf24;
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 8px;
}
.results-sensitive-bar small { color: #92400e; }

/* Results table — bar chart v tabulce */
.results-table th, .results-table td { padding: 12px 14px; }
.results-table .rank-cell {
  font-size: 22px; font-weight: 700; color: var(--color-text);
  width: 60px; text-align: center;
}
.results-table .rank-cell.gold { color: #ca8a04; }
.results-table .rank-cell.silver { color: #71717a; }
.results-table .rank-cell.bronze { color: #b45309; }
.results-table .rank-medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  font-weight: 700; font-size: 14px;
}
.results-table .rank-medal.gold { background: #fef3c7; color: #ca8a04; }
.results-table .rank-medal.silver { background: #f4f4f5; color: #52525b; }
.results-table .rank-medal.bronze { background: #fed7aa; color: #b45309; }

.results-bar-container {
  position: relative; height: 8px;
  background: var(--color-surface-2); border-radius: 100px;
  overflow: hidden; min-width: 80px;
}
.results-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--color-primary); border-radius: 100px;
  transition: width 0.5s ease-out;
}
.results-table tr.gold .results-bar-fill { background: linear-gradient(90deg, #f59e0b, #ca8a04); }
.results-table tr.silver .results-bar-fill { background: linear-gradient(90deg, #a1a1aa, #71717a); }
.results-table tr.bronze .results-bar-fill { background: linear-gradient(90deg, #fb923c, #ea580c); }

.results-vote-cell { font-size: 14px; }
.results-vote-cell .num { font-weight: 600; }
.results-vote-cell .source-label {
  font-size: 11px; color: var(--color-text-soft); display: block;
}

.results-total-cell {
  font-size: 22px; font-weight: 700; color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* Vítěz banner — pro views kde je 1. místo známé */
.winner-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fef3c7 100%);
  border: 2px solid #fbbf24;
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.winner-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(251, 191, 36, 0.3), transparent 50%);
  pointer-events: none;
}
.winner-banner .winner-trophy {
  font-size: 48px; margin-bottom: 8px;
}
.winner-banner .winner-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 2px;
  color: #92400e; font-weight: 600; margin-bottom: 6px;
}
.winner-banner .winner-name {
  font-size: 28px; font-weight: 700; color: #78350f; margin-bottom: 4px;
}
.winner-banner .winner-votes {
  font-size: 14px; color: #92400e;
}

/* Ceremony progress (status flow) */
.ceremony-progress {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0;
  padding: 12px; background: var(--color-surface-2); border-radius: var(--radius-md);
}
.ceremony-step {
  flex: 1; min-width: 80px; padding: 8px 6px; text-align: center;
  font-size: 11px; color: var(--color-text-soft); position: relative;
  border-radius: var(--radius-sm);
}
.ceremony-step.completed { color: var(--color-success); background: #f0fdf4; }
.ceremony-step.active {
  color: white; background: var(--color-primary); font-weight: 600;
}
.ceremony-step .step-icon {
  display: block; font-size: 18px; margin-bottom: 2px;
}

/* Tie resolution — drag-and-drop list */
.tie-resolver {
  background: white; border: 1px solid var(--color-warning);
  border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px;
}
.tie-resolver h4 { margin-top: 0; color: #92400e; }
.tie-list {
  list-style: none; padding: 0; margin: 0;
  background: var(--color-surface-2); border-radius: var(--radius-sm); padding: 10px;
}
.tie-list li {
  background: white; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 10px 12px; margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px;
}
.tie-list li:last-child { margin-bottom: 0; }
.tie-list li .tie-handle {
  cursor: grab; color: var(--color-text-soft); font-size: 16px;
  user-select: none;
}
.tie-list li .tie-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary); color: white;
  font-weight: 600; font-size: 13px;
}

/* Export cards */
.export-card {
  display: flex; flex-direction: column; gap: 8px;
}
.export-card .export-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: var(--color-surface-2); color: var(--color-primary);
  margin-bottom: 8px;
}
.export-card-action-grid {
  display: flex; flex-direction: column; gap: 6px;
}

/* === Dashboard (rc40) — Akční pruh + alerts === */

/* Action strip — velký kontextový pruh s next action */
.action-strip {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 16px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.action-strip:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.action-strip-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.action-strip-body { flex: 1; min-width: 0; }
.action-strip-title { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.action-strip-hint { font-size: 13px; }
.action-strip-btn {
  border: 0; padding: 12px 22px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; flex-shrink: 0;
  color: white; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity 0.15s, transform 0.1s;
}
.action-strip-btn:hover { opacity: 0.9; }
.action-strip-btn:active { transform: translateY(1px); }

/* 4 color varianty */
.action-strip.green { background: #eaf3de; }
.action-strip.green .action-strip-icon { background: #c0dd97; color: #27500a; }
.action-strip.green .action-strip-title { color: #27500a; }
.action-strip.green .action-strip-hint { color: #3b6d11; }
.action-strip.green .action-strip-btn { background: #639922; }

.action-strip.amber { background: #faeeda; }
.action-strip.amber .action-strip-icon { background: #fac775; color: #633806; }
.action-strip.amber .action-strip-title { color: #633806; }
.action-strip.amber .action-strip-hint { color: #854f0b; }
.action-strip.amber .action-strip-btn { background: #ba7517; }

.action-strip.blue { background: #e6f1fb; }
.action-strip.blue .action-strip-icon { background: #b5d4f4; color: #0c447c; }
.action-strip.blue .action-strip-title { color: #0c447c; }
.action-strip.blue .action-strip-hint { color: #185fa5; }
.action-strip.blue .action-strip-btn { background: #378add; }

.action-strip.purple { background: #eeedfe; }
.action-strip.purple .action-strip-icon { background: #cecbf6; color: #3c3489; }
.action-strip.purple .action-strip-title { color: #3c3489; }
.action-strip.purple .action-strip-hint { color: #534ab7; }
.action-strip.purple .action-strip-btn { background: #7f77dd; }

/* Dashboard alert (super_admin reopen voting apod.) */
.dashboard-alert {
  display: flex; align-items: center; gap: 14px;
  border-radius: var(--radius-md); padding: 14px 16px;
  margin-bottom: 16px;
}
.dashboard-alert.warning {
  background: #fef3c7; border: 1px solid #fbbf24; color: #92400e;
}
.dashboard-alert.warning .dashboard-alert-icon { color: #92400e; flex-shrink: 0; }
.dashboard-alert.info {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
}
.dashboard-alert.info .dashboard-alert-icon { color: #1e40af; flex-shrink: 0; }
.dashboard-alert.danger {
  background: #fee2e2; border: 2px solid #dc2626; color: #991b1b;
}
.dashboard-alert.danger .dashboard-alert-icon { color: #dc2626; flex-shrink: 0; }
.dashboard-alert-body { flex: 1; }
.dashboard-alert-title { font-weight: 600; margin-bottom: 4px; }
.dashboard-alert-hint { font-size: 13px; color: #78350f; }
.dashboard-alert.info .dashboard-alert-hint { color: #1e3a8a; }
.dashboard-alert.danger .dashboard-alert-hint { color: #7f1d1d; }

/* Compact ranking tabulka — pro mini live ranking */
.ranking-compact { width: 100%; background: transparent; border-collapse: collapse; }
.ranking-compact td { padding: 8px 10px; border-bottom: 1px solid var(--color-border); }
.ranking-compact tr:last-child td { border-bottom: 0; }
.ranking-compact .rank-col { width: 56px; text-align: center; }
.ranking-compact .rank-medal { width: 28px; height: 28px; font-size: 13px; }
.ranking-compact .bar-col { width: 35%; }
.ranking-compact .votes-col {
  width: 60px; text-align: right;
  font-weight: 600; font-size: 16px;
  font-variant-numeric: tabular-nums;
}

/* LED indikátor pro mode v stat kartě */
.mode-led {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  vertical-align: middle; margin-right: 4px;
}
.mode-led.live { background: #dc2626; }
.mode-led.test { background: #9ca3af; }

/* Timeline chart header layout */
.timeline-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.timeline-header h3 { margin: 0; }
.timeline-header-meta { font-size: 12px; color: var(--color-text-soft); margin: 4px 0 0; }
.timeline-mode-toggle { display: flex; gap: 12px; align-items: center; font-size: 12px; }
.timeline-mode-toggle label { display: flex; align-items: center; gap: 4px; cursor: pointer; }

/* === Paper votes (rc41) === */

/* Grid pro týmy v paper batch form */
.paper-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.paper-team-input {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.paper-team-input label {
  font-size: 13px; color: var(--color-text-soft);
  display: block; margin-bottom: 4px;
}
.paper-team-input label strong { color: var(--color-text); }
.paper-team-input input[type="number"] {
  width: 100%; font-size: 20px; font-weight: 600;
  text-align: center; padding: 8px;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}
.paper-team-input input[type="number"]:focus {
  outline: 2px solid var(--color-primary); outline-offset: -1px;
  border-color: var(--color-primary);
}
/* Highlight neprázdných */
.paper-team-input.has-votes {
  background: #fef3c7;
  border-color: #fbbf24;
}

/* Live total panel */
.paper-total-panel {
  position: sticky; bottom: 0; z-index: 10;
  background: white; border: 2px solid var(--color-primary);
  border-radius: var(--radius-md); padding: 14px 18px;
  display: flex; align-items: center; gap: 16px;
  margin: 16px 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.paper-total-panel .paper-total-label {
  font-size: 13px; color: var(--color-text-soft);
}
.paper-total-panel .paper-total-value {
  font-size: 28px; font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.paper-total-panel .paper-total-teams {
  font-size: 12px; color: var(--color-text-soft);
}

/* Quick time picks */
.paper-time-quicks {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
}
.paper-time-quicks .btn { font-size: 11px; padding: 4px 8px; }

/* Detail breakdown v tabulce dávek */
.paper-batch-row { cursor: pointer; transition: background 0.15s; }
.paper-batch-row:hover { background: var(--color-surface-2); }
.paper-batch-row.expanded { background: var(--color-surface-2); }
.paper-batch-detail {
  display: none;
}
.paper-batch-detail.shown { display: table-row; }
.paper-batch-detail td {
  background: #fafafa; padding: 16px !important;
}
.paper-batch-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.paper-batch-breakdown-item {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 6px 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.paper-batch-breakdown-item small {
  color: var(--color-text-soft); font-size: 11px;
}
.paper-batch-breakdown-item strong {
  font-size: 14px; color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* === Anomalies (rc42) — Detekce anomálií === */

.anomaly-card {
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #fffbeb;
  transition: opacity 0.15s;
}
.anomaly-card.ok {
  border-left-color: var(--color-success);
  background: #f0fdf4;
}
.anomaly-card.critical {
  border-left-color: var(--color-danger);
  background: #fee2e2;
}

/* Hide OK cards when filter is on */
body.anomaly-only-problems .anomaly-card.ok { display: none; }

.anomaly-card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.anomaly-card-header h3 {
  margin: 0; font-size: 14px; flex: 1;
  color: #92400e;
}
.anomaly-card.ok .anomaly-card-header h3 { color: #15803d; }
.anomaly-card.critical .anomaly-card-header h3 { color: #991b1b; }
.anomaly-card-status {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(217, 119, 6, 0.15); color: #92400e;
  flex-shrink: 0;
}
.anomaly-card.ok .anomaly-card-status {
  background: rgba(34, 197, 94, 0.15); color: #15803d;
}
.anomaly-card.critical .anomaly-card-status {
  background: rgba(220, 38, 38, 0.15); color: #991b1b;
}
.anomaly-card-hint {
  font-size: 12px; color: #78350f;
}
.anomaly-card.ok .anomaly-card-hint { color: #166534; }
.anomaly-card.critical .anomaly-card-hint { color: #7f1d1d; }

.anomaly-table {
  width: 100%; font-size: 13px; border-collapse: collapse;
  margin-top: 10px; background: white;
  border-radius: var(--radius-sm); overflow: hidden;
}
.anomaly-table th, .anomaly-table td {
  padding: 6px 10px; text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.anomaly-table th {
  background: rgba(0,0,0,0.04); font-weight: 600;
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--color-text-soft);
}
.anomaly-table tr:last-child td { border-bottom: 0; }

.hash-trunc {
  font-family: 'JetBrains Mono', monospace;
  color: var(--color-text-soft); font-size: 11px;
}

/* Overview metric s velkým číslem */
.anomaly-overview {
  text-align: center; padding: 24px 16px;
}
.anomaly-overview .metric-big {
  font-size: 56px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.anomaly-overview .metric-big.warn { color: var(--color-warning); }
.anomaly-overview .metric-big.ok { color: var(--color-success); }
.anomaly-overview .metric-big.critical { color: var(--color-danger); }
.anomaly-overview .metric-label {
  font-size: 13px; color: var(--color-text-soft);
  text-transform: uppercase; letter-spacing: 1.5px;
}

/* All-OK celebration state */
.anomaly-all-ok {
  text-align: center; padding: 48px 24px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac; border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.anomaly-all-ok-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; border-radius: 50%;
  background: white; color: #15803d;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2);
}
.anomaly-all-ok h2 { margin: 0 0 8px; color: #15803d; font-size: 22px; }
.anomaly-all-ok p { color: #166534; margin: 0; font-size: 14px; }

/* Filter toggle row */
.anomaly-filter-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 16px 0;
}
.anomaly-filter-row label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--color-text-soft);
  cursor: pointer; user-select: none;
}

/* === Users management (rc43) === */

/* Role badges — barevné podle role */
.role-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.role-badge.super-admin {
  background: #fee2e2; color: #991b1b;
  border: 1px solid #fca5a5;
}
.role-badge.admin {
  background: #dbeafe; color: #1e40af;
  border: 1px solid #93c5fd;
}
.role-badge.staff {
  background: #f3f4f6; color: #4b5563;
  border: 1px solid #d1d5db;
}

/* User access chips */
.user-access-list {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.user-access-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; padding-right: 4px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 11px;
}
.user-access-chip .access-event-name {
  color: var(--color-text);
}
.user-access-chip button.access-revoke {
  background: none; border: 0; padding: 0;
  color: var(--color-danger); cursor: pointer;
  font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
}
.user-access-chip button.access-revoke:hover {
  background: #fee2e2;
}
.user-access-add {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  background: white; border: 1px dashed var(--color-border);
  border-radius: 100px;
  font-size: 11px; color: var(--color-text-soft);
  cursor: pointer;
}
.user-access-add:hover { border-color: var(--color-primary); color: var(--color-primary); }
.user-access-add-form { display: none; align-items: center; gap: 4px; }
.user-access-add-form.shown { display: inline-flex; }
.user-access-add-form select {
  font-size: 11px; padding: 2px 4px;
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  max-width: 140px;
}

/* User actions dropdown (kebab) */
.user-actions { position: relative; display: inline-block; }
.user-actions-trigger {
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: 4px 8px;
  cursor: pointer; font-size: 14px; color: var(--color-text-soft);
  font-family: inherit;
}
.user-actions-trigger:hover { background: var(--color-surface-2); }
.user-actions-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 4px);
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 180px; z-index: 10;
  padding: 4px;
}
.user-actions.open .user-actions-menu { display: block; }
.user-actions-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  background: none; border: 0; text-align: left;
  cursor: pointer; font-size: 13px; color: var(--color-text);
  border-radius: var(--radius-sm); font-family: inherit;
}
.user-actions-menu button:hover { background: var(--color-surface-2); }
.user-actions-menu button.danger { color: var(--color-danger); }
.user-actions-menu button.danger:hover { background: #fee2e2; }
.user-actions-menu hr {
  border: 0; border-top: 1px solid var(--color-border);
  margin: 4px 0;
}

/* User row "to jste vy" highlight */
tr.user-me { background: rgba(217, 119, 6, 0.04); }

/* Force change badge */
.force-change-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: var(--radius-sm);
  background: #fef3c7; color: #92400e;
  font-size: 11px; font-weight: 500;
}

/* Mobile: skrýt některé sloupce */
@media (max-width: 900px) {
  table.users-table { font-size: 13px; }
  table.users-table th.col-id, table.users-table td.col-id,
  table.users-table th.col-force, table.users-table td.col-force,
  table.users-table th.col-last-login, table.users-table td.col-last-login {
    display: none;
  }
}

/* === Inquiries (rc43) === */

/* Filter tabs row */
.inquiry-filter-row {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.inquiry-filter-row .btn.sm { font-size: 13px; }
.inquiry-filter-row .btn.filter-pending:not(.ghost) { background: var(--color-warning); }
.inquiry-filter-row .btn.filter-pending.ghost { color: #92400e; }
.inquiry-filter-row .btn.filter-won.ghost { color: #065f46; }
.inquiry-filter-row .btn.filter-lost.ghost { color: #991b1b; }

/* New count badge */
.inquiry-new-badge {
  display: inline-flex; align-items: center;
  background: var(--color-danger); color: white;
  padding: 2px 10px; border-radius: 100px;
  font-size: 13px; margin-left: 8px;
  font-weight: 600;
}

/* Status badges */
.status-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; padding: 2px 9px; border-radius: 100px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.status-badge.new { background: #fee2e2; color: #991b1b; }
.status-badge.read { background: #fef3c7; color: #92400e; }
.status-badge.replied { background: #dbeafe; color: #1e40af; }
.status-badge.archived { background: #f3f4f6; color: #6b7280; }

/* Outcome badges */
.outcome-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 2px 9px; border-radius: 100px;
  font-weight: 700;
}
.outcome-badge.pending { background: #f3f4f6; color: #6b7280; }
.outcome-badge.won { background: #d1fae5; color: #065f46; }
.outcome-badge.lost { background: #fee2e2; color: #991b1b; }

/* Inquiry card — border-left dle outcome/status */
.inquiry-card {
  margin-bottom: 16px;
  border-left: 4px solid #9ca3af;
}
.inquiry-card.border-new { border-left-color: var(--color-danger); }
.inquiry-card.border-read { border-left-color: #f59e0b; }
.inquiry-card.border-replied { border-left-color: var(--color-primary); }
.inquiry-card.border-won { border-left-color: #10b981; }
.inquiry-card.border-lost { border-left-color: #6b7280; }

.inquiry-card-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.inquiry-card-meta {
  flex: 1; min-width: 250px;
}
.inquiry-card-title-line {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 6px; flex-wrap: wrap;
}
.inquiry-card-title-line strong { font-size: 17px; }
.inquiry-card-title-line .timestamp {
  font-size: 12px; color: var(--color-text-soft);
}
.inquiry-card-contacts {
  font-size: 14px; color: var(--color-text);
  line-height: 1.7;
}
.inquiry-card-contacts a { color: var(--color-primary); text-decoration: none; }
.inquiry-card-contacts a:hover { text-decoration: underline; }
.inquiry-card-contacts svg {
  vertical-align: middle; margin-right: 2px;
  color: var(--color-text-soft);
}

/* Message body */
.inquiry-message-body {
  background: #fef9f1; border-radius: var(--radius-sm);
  padding: 14px 18px; margin-top: 14px;
  white-space: pre-wrap; font-size: 14px; line-height: 1.6;
}

/* Inline banner: linked event */
.inquiry-banner {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border-left: 3px solid;
}
.inquiry-banner.linked-event {
  background: #ecfdf5; border-left-color: #10b981;
  color: #065f46;
}
.inquiry-banner.linked-event a {
  color: #065f46; font-weight: 600; text-decoration: none;
}
.inquiry-banner.linked-event a:hover { text-decoration: underline; }
.inquiry-banner.lost-reason {
  background: #fef2f2; border-left-color: var(--color-danger);
  color: #7f1d1d;
}
.inquiry-banner.note {
  background: #fef3c7; border-left-color: #f59e0b;
  color: #78350f;
}

/* Email notification status card */
.notify-status {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border-left: 4px solid;
  margin-bottom: 16px;
}
.notify-status.configured { background: #d1fae5; border-left-color: #10b981; }
.notify-status.fallback { background: #fef3c7; border-left-color: #f59e0b; }
.notify-status.none { background: #fee2e2; border-left-color: var(--color-danger); }
.notify-status-title { font-size: 14px; }
.notify-status-hint { font-size: 13px; margin-top: 4px; }
.notify-status.configured .notify-status-hint { color: #065f46; }
.notify-status.fallback .notify-status-hint { color: #92400e; }
.notify-status.none .notify-status-hint { color: #991b1b; }

/* Actions row */
.inquiry-actions-row {
  display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap;
}
.inquiry-actions-row .ml-auto { margin-left: auto; }

/* Outcome modal — sjednoceno s rc31 .modal-dialog pattern */
.outcome-modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.outcome-modal {
  border: 0; padding: 0; max-width: 520px; width: 92vw;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.outcome-modal .om-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--color-border);
}
.outcome-modal .om-header h3 {
  margin: 0; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.outcome-modal .om-close {
  background: none; border: 0; cursor: pointer;
  font-size: 18px; color: var(--color-text-soft);
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.outcome-modal .om-close:hover { background: var(--color-surface-2); color: var(--color-text); }
.outcome-modal .om-meta {
  padding: 12px 22px; background: var(--color-surface-2);
  font-size: 13px;
}
.outcome-modal .om-body { padding: 16px 22px; }
.outcome-modal .om-body h4 {
  margin: 0 0 8px; font-size: 13px; font-weight: 600;
  color: var(--color-text-soft); text-transform: uppercase;
  letter-spacing: 0.5px;
}
.outcome-modal .om-row {
  display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap;
}
.outcome-modal .om-input,
.outcome-modal .om-select {
  flex: 1; min-width: 0; padding: 8px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 13px;
  font-family: inherit; background: white;
}
.outcome-modal .om-input:focus,
.outcome-modal .om-select:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}
.outcome-modal .om-btn {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
  border: 0; cursor: pointer; white-space: nowrap;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
}
.outcome-modal .om-btn-success { background: #10b981; color: white; }
.outcome-modal .om-btn-success:hover { background: #059669; }
.outcome-modal .om-btn-danger { background: var(--color-danger); color: white; }
.outcome-modal .om-btn-danger:hover { background: #b91c1c; }
.outcome-modal .om-btn-ghost {
  background: white; color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.outcome-modal .om-btn-ghost:hover { background: var(--color-surface-2); }
.outcome-modal .om-hint {
  font-size: 11px; color: var(--color-text-soft);
  margin: 6px 0 0; line-height: 1.4;
}
.outcome-modal .om-divider {
  display: flex; align-items: center; margin: 14px 0;
  color: var(--color-text-soft); font-size: 11px;
  text-transform: uppercase; font-weight: 700; letter-spacing: 1px;
}
.outcome-modal .om-divider::before,
.outcome-modal .om-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--color-border);
}
.outcome-modal .om-divider span { padding: 0 12px; }
.outcome-modal .om-current {
  margin-top: 6px;
}
@media (max-width: 560px) {
  .outcome-modal .om-row { flex-direction: column; }
  .outcome-modal .om-btn { width: 100%; justify-content: center; }
}

/* === Security page (rc44) === */

/* Storage table */
.storage-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.storage-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--color-border);
}
.storage-table tr:last-child td { border-bottom: 0; }
.storage-table .storage-row-name { color: var(--color-text); }
.storage-table .storage-row-count {
  text-align: right; font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.storage-table .storage-row-size {
  text-align: right; color: var(--color-text-soft);
  font-variant-numeric: tabular-nums;
}
.storage-table .storage-row-meta {
  font-size: 11px; color: var(--color-text-soft);
}

/* Security event row — barevné kategorie */
.security-event-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px;
}
.security-event-table th, .security-event-table td {
  padding: 6px 10px; border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.security-event-table th {
  background: var(--color-surface-2); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--color-text-soft);
}
.security-event-table tr:last-child td { border-bottom: 0; }
.security-event-table .event-time {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--color-text-soft); white-space: nowrap;
}
.security-event-table .event-ip {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
}
.security-event-table .event-detail {
  font-size: 11px; color: var(--color-text-soft);
  word-break: break-all; max-width: 320px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Event action badges */
.event-action {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 100px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
  font-family: inherit;
}
.event-action.event-login-success { background: #d1fae5; color: #065f46; }
.event-action.event-login-failed { background: #fee2e2; color: #991b1b; }
.event-action.event-rate-blocked { background: #fef3c7; color: #92400e; }
.event-action.event-vote-invalid { background: #fef3c7; color: #92400e; }
.event-action.event-rate-cleared { background: #ede9fe; color: #5b21b6; }
.event-action.event-other { background: var(--color-surface-2); color: var(--color-text-soft); }

/* Blocked IP empty celebration */
.security-no-blocks {
  text-align: center; padding: 28px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac; border-radius: var(--radius-md);
}
.security-no-blocks-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: white; color: #15803d;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}
.security-no-blocks h3 { margin: 0 0 4px; color: #15803d; font-size: 16px; }
.security-no-blocks p { color: #166534; margin: 0; font-size: 13px; }

/* === Audit log (rc45) — reuses security-event-table + event-action from rc44 === */

/* Header bar — title + actions */
.audit-header-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.audit-header-bar h3 { margin: 0; }
.audit-header-bar .spacer { flex: 1; }

/* Pagination */
.audit-pagination {
  display: flex; gap: 4px; justify-content: center; align-items: center;
  margin-top: 16px; flex-wrap: wrap;
}
.audit-pagination .page-info {
  font-size: 12px; color: var(--color-text-soft);
  margin: 0 8px;
}

/* Audit detail cell — monospace, line clamp */
.audit-detail-cell {
  font-size: 11px; font-family: 'JetBrains Mono', monospace;
  color: var(--color-text-soft);
  word-break: break-all;
  max-width: 480px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Actor cell */
.audit-actor-role {
  display: inline-flex; align-items: center;
  font-size: 11px; padding: 2px 6px; border-radius: var(--radius-sm);
  background: var(--color-surface-2); color: var(--color-text);
  font-weight: 500;
}
.audit-actor-role.role-super-admin { background: #fee2e2; color: #991b1b; }
.audit-actor-role.role-admin { background: #dbeafe; color: #1e40af; }
.audit-actor-role.role-staff { background: #f3f4f6; color: #4b5563; }
.audit-actor-role.role-system { background: #ede9fe; color: #5b21b6; }
.audit-actor-role.role-public { background: #f0fdf4; color: #166534; }
.audit-actor-id {
  font-size: 11px; color: var(--color-text-soft);
  margin-left: 4px;
}

/* === Password change page (rc46) === */

.password-page-card {
  max-width: 480px;
}

/* Password field s show/hide toggle */
.password-field {
  position: relative;
}
.password-field input[type="password"],
.password-field input[type="text"] {
  width: 100%; padding-right: 40px;
  font-family: inherit;
}
.password-field .password-toggle {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  background: none; border: 0; cursor: pointer;
  padding: 4px 8px;
  color: var(--color-text-soft);
  display: inline-flex; align-items: center;
  border-radius: var(--radius-sm);
}
.password-field .password-toggle:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

/* Password strength meter */
.password-strength {
  margin-top: 6px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
}
.password-strength-bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--color-surface-2);
  position: relative; overflow: hidden;
}
.password-strength-bar::after {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0;
  border-radius: 2px;
  transition: width 0.2s, background 0.2s;
  width: 0;
}
.password-strength.weak .password-strength-bar::after {
  width: 25%; background: #dc2626;
}
.password-strength.fair .password-strength-bar::after {
  width: 50%; background: #f59e0b;
}
.password-strength.good .password-strength-bar::after {
  width: 75%; background: #10b981;
}
.password-strength.strong .password-strength-bar::after {
  width: 100%; background: #15803d;
}
.password-strength-label {
  font-weight: 600; min-width: 60px; text-align: right;
}
.password-strength.weak .password-strength-label { color: #dc2626; }
.password-strength.fair .password-strength-label { color: #92400e; }
.password-strength.good .password-strength-label { color: #15803d; }
.password-strength.strong .password-strength-label { color: #15803d; }

/* Password match indicator */
.password-match {
  margin-top: 6px;
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
}
.password-match.matched { color: #15803d; }
.password-match.mismatched { color: #dc2626; }
.password-match.empty { color: var(--color-text-soft); }
.password-match-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%;
}
.password-match.matched .password-match-dot { background: #10b981; }
.password-match.mismatched .password-match-dot { background: #dc2626; }
.password-match.empty .password-match-dot { background: #d1d5db; }

/* Forced flow — login-wrap layout */
.password-forced-card .subtitle {
  text-align: center; color: var(--color-text-soft);
  font-size: 14px; margin: 8px 0 16px;
  line-height: 1.5;
}
.password-forced-card .forced-account-line {
  font-size: 13px; margin-top: 6px;
}
.password-forced-card .logout-link {
  margin-top: 16px; font-size: 13px; text-align: center;
}
.password-forced-card .logout-link a {
  color: var(--color-text-soft);
  text-decoration: none;
}
.password-forced-card .logout-link a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* === Help page (rc47) === */

.help-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
.help-nav {
  background: white;
  border-radius: var(--radius-md);
  padding: 12px;
  position: sticky; top: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.help-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  font-size: 14px;
  transition: background 0.15s;
}
.help-nav a:hover { background: var(--color-surface-2); }
.help-nav a.active {
  background: var(--color-primary);
  color: white;
  font-weight: 600;
}
.help-nav a.active svg { color: white; }
.help-nav a svg { color: var(--color-text-soft); flex-shrink: 0; }

.help-content {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.help-content h2 {
  margin-top: 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 22px;
}
.help-content h2 svg { color: var(--color-primary); flex-shrink: 0; }
.help-content h3 {
  margin-top: 32px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
  font-size: 16px;
}

/* Help step (numbered) */
.help-step {
  background: var(--color-surface-2);
  border-left: 3px solid var(--color-primary);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Help tip (yellow) */
.help-tip {
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Help warning (red) */
.help-warning {
  background: #fee2e2;
  border-left: 3px solid var(--color-danger);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Help kbd (keyboard key) */
.help-content kbd {
  background: #1f2937;
  color: white;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

/* Help inline code */
.help-content code {
  background: var(--color-surface-2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--color-text);
}

/* Mobile */
@media (max-width: 768px) {
  .help-layout {
    grid-template-columns: 1fr;
  }
  .help-nav {
    position: static;
  }
  .help-content {
    padding: 20px;
  }
}

/* === Login page (rc49) === */

.login-brand {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; margin-bottom: 20px;
}
.login-brand-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #b85d04 100%);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}
.login-brand h1 {
  margin: 0; font-size: 20px; font-weight: 700;
  text-align: center;
}
.login-brand .subtitle {
  margin: 0; color: var(--color-text-soft);
  font-size: 14px; text-align: center;
}

/* Caps Lock warning */
.caps-warning {
  display: none;
  margin-top: 6px;
  padding: 6px 10px;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #92400e;
  align-items: center; gap: 6px;
}
.caps-warning.visible { display: flex; }

/* Login meta link (staff link, forgot password) */
.login-meta-link {
  margin-top: 16px; font-size: 13px; text-align: center;
  color: var(--color-text-soft);
}
.login-meta-link a {
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.login-meta-link a:hover { text-decoration: underline; }

/* Login hint (forgot password) */
.login-hint {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--color-text-soft);
  line-height: 1.5;
  text-align: center;
}
.login-hint strong { color: var(--color-text); }

/* === Super dashboard (rc50) === */

/* System info grid */
.sd-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.sd-info-grid > div {
  padding: 10px 14px;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.sd-info-grid strong {
  display: block;
  color: var(--color-text-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  font-weight: 600;
}
.sd-info-grid .sd-info-value-ok { color: var(--color-success); }
.sd-info-grid .sd-info-value-bad { color: var(--color-danger); font-weight: 600; }

/* Audit chain status badge (in system info grid) */
.sd-chain-ok {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--color-success);
}
.sd-chain-bad {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--color-danger);
  font-weight: 600;
}

/* All-OK celebration (no warnings) */
.sd-no-warnings {
  text-align: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
  border-radius: var(--radius-md);
}
.sd-no-warnings-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: white; color: #15803d;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}
.sd-no-warnings h4 { margin: 0 0 4px; color: #15803d; font-size: 15px; }
.sd-no-warnings p { color: #166534; margin: 0; font-size: 13px; }

/* === Public results page (rc38) — vysledky.php === */
.vp-wrap {
  max-width: 760px; margin: 0 auto; padding: 32px 20px 80px;
}
.vp-header {
  text-align: center; margin-bottom: 32px;
}
.vp-header img.logo {
  max-height: 80px; margin-bottom: 8px;
}
.vp-header h1 {
  font-size: 28px; font-weight: 700; margin: 0 0 6px;
  color: var(--color-text);
}
.vp-header .vp-meta {
  font-size: 14px; color: var(--color-text-soft);
}
.vp-section-title {
  text-align: center; font-size: 14px; font-weight: 600;
  color: var(--color-primary); text-transform: uppercase;
  letter-spacing: 2px; margin: 32px 0 24px;
}

/* Podium 3D layout — 2. vlevo, 1. uprostřed nahoře, 3. vpravo */
.vp-podium {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
  margin: 32px 0;
}
.vp-podium-card {
  background: white;
  border-radius: 16px;
  padding: 20px 14px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.vp-podium-card.gold {
  background: linear-gradient(180deg, #fef3c7 0%, white 60%);
  border-top: 6px solid #f59e0b;
  padding-top: 28px;
}
.vp-podium-card.silver {
  background: linear-gradient(180deg, #f4f4f5 0%, white 60%);
  border-top: 6px solid #94a3b8;
}
.vp-podium-card.bronze {
  background: linear-gradient(180deg, #fed7aa 0%, white 60%);
  border-top: 6px solid #b45309;
}
.vp-podium-card .vp-medal {
  font-size: 56px; line-height: 1; margin-bottom: 6px;
}
.vp-podium-card.gold .vp-medal { font-size: 72px; margin-top: -8px; }
.vp-podium-card .vp-rank {
  font-size: 11px; color: var(--color-text-soft); text-transform: uppercase;
  letter-spacing: 1.5px; font-weight: 600; margin-bottom: 6px;
}
.vp-podium-card .vp-team-name {
  font-size: 18px; font-weight: 700; color: var(--color-text);
  margin: 4px 0 6px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.vp-podium-card.gold .vp-team-name { font-size: 22px; }
.vp-podium-card .vp-votes {
  font-size: 14px; color: var(--color-text-soft);
}
.vp-podium-card .vp-votes strong {
  font-size: 22px; color: var(--color-primary); display: block;
  font-variant-numeric: tabular-nums;
}
.vp-podium-card.gold .vp-votes strong { font-size: 28px; }

/* Mobil < 600px: stack místo 3D podium (1./2./3. shora dolů) */
@media (max-width: 600px) {
  .vp-podium {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  /* Zachovat pořadí: 1. nahoře, 2. uprostřed, 3. dole */
  .vp-podium .vp-podium-card.gold { order: 1; }
  .vp-podium .vp-podium-card.silver { order: 2; }
  .vp-podium .vp-podium-card.bronze { order: 3; }
  .vp-podium-card .vp-team-name { min-height: 0; }
}

/* Summary stats */
.vp-summary {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.vp-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  text-align: center;
}
.vp-summary-stat strong {
  display: block; font-size: 20px; color: var(--color-text);
  font-weight: 700; margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.vp-summary-stat small {
  font-size: 12px; color: var(--color-text-soft);
}

/* Footer */
.vp-footer {
  text-align: center; margin-top: 32px;
  font-size: 13px; color: var(--color-text-soft);
}
.vp-footer .vp-thanks {
  font-size: 16px; color: var(--color-text); font-weight: 500;
  margin-bottom: 12px;
}
.vp-share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: white; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; color: var(--color-text); font-family: inherit;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.vp-share-btn:hover {
  background: var(--color-surface-2); border-color: var(--color-text-soft);
}

/* Error state (404 — výsledky nejsou zveřejněné) */
.vp-error {
  max-width: 480px; margin: 80px auto; text-align: center;
  background: white; border-radius: var(--radius-md); padding: 40px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.vp-error-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--color-surface-2); color: var(--color-text-soft);
  margin-bottom: 16px;
}
.vp-error h2 { margin: 0 0 8px; color: var(--color-text); }
.vp-error p { color: var(--color-text-soft); }

/* === Tables === */
table.tbl { width: 100%; border-collapse: collapse; background: #fff; }
table.tbl th, table.tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--color-border); }
table.tbl th { background: var(--color-surface-2); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; color: var(--color-text-soft); }
table.tbl tr:hover td { background: #fafafa; }
table.tbl tr.gold td { background: #fffbeb; }
table.tbl tr.silver td { background: #f9fafb; }
table.tbl tr.bronze td { background: #fef3c7; }
table.tbl tr.withdrawn td { opacity: .5; text-decoration: line-through; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .actions { text-align: right; white-space: nowrap; }

/* === Flash === */
.flash {
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 14px; line-height: 1.6;
}
.flash strong { font-weight: 600; }
.flash.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.flash.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash.warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.flash.info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* === Voter mobile page === */
/* rc54: redesign — gradient header s logem, lepší typografie, Tabler ikony, loading state */

.voter-page {
  min-height: 100vh;
  /* Použij color-mix() pro auto-darken theme color místo hardcoded #000 */
  background: linear-gradient(160deg,
    var(--color-primary) 0%,
    color-mix(in srgb, var(--color-primary) 65%, #000) 100%);
  display: flex; flex-direction: column;
  padding: 0;
  /* Fallback pro browsery bez color-mix() */
  background-color: var(--color-primary);
}

.voter-header {
  padding: 28px 20px 32px;
  color: #fff;
  text-align: center;
}
.voter-header img {
  max-height: 72px;
  margin-bottom: 12px;
  background: rgba(255,255,255,.12);
  padding: 6px;
  border-radius: 12px;
}
.voter-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.voter-header .subtitle {
  font-size: 14px;
  opacity: .9;
  margin-top: 6px;
  font-weight: 500;
}

.voter-content {
  flex: 1;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 28px 20px 100px;
  overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0,0,0,.08);
}

.voter-step-label {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 10px;
}
.voter-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.voter-pin-input {
  width: 100%;
  padding: 18px 16px;
  font-size: 28px;
  text-align: center;
  letter-spacing: 4px;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--color-text);
  background: #fafafa;
  transition: border-color .15s, background .15s;
}
.voter-pin-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
}
.voter-pin-help {
  font-size: 12px;
  color: var(--color-text-soft);
  margin-top: 6px;
  text-align: center;
}

.team-list {
  display: flex; flex-direction: column;
  gap: 10px;
  margin: 14px 0 8px;
}
.team-btn {
  display: flex; align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-size: 15px;
  transition: all .15s;
  position: relative;
}
.team-btn:hover, .team-btn:focus {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, #fff);
  outline: none;
}
.team-btn.selected {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 15%, #fff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.team-btn.selected::after {
  content: '';
  position: absolute;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  background: var(--color-primary);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
}
.team-btn .num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.team-btn .info {
  flex: 1; min-width: 0;
  padding-right: 28px; /* místo pro selected check */
}
.team-btn .info .name {
  font-weight: 700;
  color: var(--color-text);
  font-size: 16px;
}
.team-btn .info .desc {
  font-size: 12px;
  color: var(--color-text-soft);
  margin-top: 2px;
  line-height: 1.4;
}

.voter-confirm {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 14px 16px 18px;
  background: #fff;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  z-index: 100;
  /* iPhone safe-area */
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}
.voter-confirm .btn {
  width: 100%;
  padding: 18px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 14px;
  letter-spacing: 0.3px;
}
.voter-confirm .btn:disabled {
  background: var(--color-text-soft);
  cursor: not-allowed;
  opacity: 0.7;
}
.voter-confirm .btn.loading {
  pointer-events: none;
  position: relative;
  color: transparent !important;
}
.voter-confirm .btn.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: voter-spin .8s linear infinite;
}
@keyframes voter-spin { to { transform: rotate(360deg); } }

/* Success screen */
.voter-success {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #fff;
}
.voter-success .check {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 3px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
  animation: voter-pop .4s cubic-bezier(0.68, -0.55, 0.27, 1.55) backwards;
}
@keyframes voter-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.voter-success h2 {
  font-size: 36px;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.voter-success p { font-size: 18px; opacity: .95; }
.voter-success .vote-for {
  font-size: 22px;
  font-weight: 700;
  margin: 28px 0 16px;
  padding: 20px 24px;
  background: rgba(255,255,255,.15);
  border-radius: 16px;
  max-width: 360px;
}
.voter-success .pill {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Error screen */
.voter-error {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #fff;
}
.voter-error .icon {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.voter-error h2 {
  font-size: 28px;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.voter-error p {
  font-size: 16px;
  opacity: .95;
  max-width: 420px;
  line-height: 1.5;
}
.voter-error .btn {
  margin-top: 28px;
  background: #fff;
  color: var(--color-primary);
  padding: 14px 32px;
  font-weight: 700;
  border-radius: 12px;
  font-size: 16px;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}

/* === Public screen === */
.screen-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative; overflow: hidden;
}
.screen-wrap.light { background: #fff; color: var(--color-text); }
.screen-wrap.dark { background: #111827; color: #f9fafb; }
.screen-header {
  padding: 28px 40px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.screen-wrap.dark .screen-header { border-bottom-color: rgba(255,255,255,.06); }
.screen-header .brand { display: flex; align-items: center; gap: 14px; }
.screen-header .brand img { max-height: 56px; }
.screen-header h1 { margin: 0; font-size: 28px; font-weight: 700; }
.screen-header .subtitle { font-size: 14px; opacity: .7; margin-top: 2px; }
.screen-header .clock { font-size: 36px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-primary); }
.screen-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; }
.screen-banner {
  background: var(--color-primary); color: #fff;
  padding: 14px 40px; text-align: center; font-size: 18px; font-weight: 600;
  letter-spacing: 2px;
}
.screen-banner.live { background: #16a34a; animation: pulse 2s infinite; }

/* === Big number / status === */
.screen-big-status {
  font-size: clamp(48px, 8vw, 120px); font-weight: 900; text-align: center; line-height: 1.1;
}
.screen-sub-status { font-size: clamp(20px, 2.5vw, 32px); opacity: .8; text-align: center; margin-top: 16px; }
.screen-vote-counter {
  font-size: clamp(60px, 12vw, 180px); font-weight: 900; color: var(--color-primary);
  line-height: 1; font-variant-numeric: tabular-nums;
}

/* === Teams grid (ready screen) === */
.teams-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; width: 100%; max-width: 1400px; margin: 0 auto;
}
.team-card {
  background: var(--color-surface-2); border-radius: 16px; padding: 28px 24px;
  text-align: center; border: 2px solid transparent;
}
.screen-wrap.dark .team-card { background: rgba(255,255,255,.05); }
.team-card .number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--color-primary); color: #fff; font-size: 28px; font-weight: 700;
  margin-bottom: 12px;
}
.team-card .name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.team-card .desc { font-size: 13px; opacity: .7; }

/* === Ceremony === */
.ceremony-reveal {
  text-align: center; animation: bounceIn .8s cubic-bezier(.68,-.55,.27,1.55);
}
.ceremony-reveal .medal { font-size: 120px; margin-bottom: 24px; }
.ceremony-reveal .rank { font-size: 36px; font-weight: 700; color: var(--color-primary); margin-bottom: 12px; }
.ceremony-reveal .team-name { font-size: clamp(48px, 7vw, 96px); font-weight: 900; margin-bottom: 16px; }
.ceremony-reveal .count { font-size: 24px; opacity: .8; }
@keyframes bounceIn {
  0% { transform: scale(.3); opacity: 0; }
  50% { transform: scale(1.1); }
  70% { transform: scale(.95); }
  100% { transform: scale(1); opacity: 1; }
}

.podium {
  display: flex; align-items: flex-end; justify-content: center; gap: 30px;
  width: 100%; max-width: 1100px; margin: 40px auto;
}
.podium .stand {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: 12px 12px 0 0; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 24px 16px; text-align: center; min-width: 220px;
}
.podium .stand.gold { height: 320px; }
.podium .stand.silver { height: 260px; background: linear-gradient(135deg, #6b7280, #4b5563); }
.podium .stand.bronze { height: 200px; background: linear-gradient(135deg, #b45309, #92400e); }
.podium .stand .medal { font-size: 56px; margin-bottom: 8px; }
.podium .stand .rank { font-size: 14px; font-weight: 700; letter-spacing: 1px; opacity: .85; }
.podium .stand .name { font-size: 22px; font-weight: 800; margin: 8px 0; }
.podium .stand .count { font-size: 14px; opacity: .9; }

/* === Confetti === */
.confetti-wrap { position: fixed; pointer-events: none; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 1000; }
.confetti {
  position: absolute; top: -10vh; width: 10px; height: 14px; opacity: .85;
  animation: fall 3s linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); }
}

/* === Tickets print === */
@page { size: A4; margin: 8mm; }
.print-sheet {
  width: 194mm; /* A4 - 2*8mm margin */
  display: grid;
  grid-template-columns: repeat(3, 60mm);
  grid-template-rows: repeat(3, 91mm);
  gap: 2mm;
  page-break-after: always;
}
.ticket {
  width: 60mm; height: 91mm;
  border: 1px dashed #cbd5e1;
  display: flex; flex-direction: column;
  padding: 4mm; box-sizing: border-box;
  background: #fff; color: #111; position: relative;
  font-family: -apple-system, sans-serif; font-size: 9pt;
  overflow: hidden;
}
.ticket .ticket-header { text-align: center; border-bottom: 1px solid #e2e8f0; padding-bottom: 2mm; }
.ticket .ticket-title { font-weight: 700; font-size: 10pt; }
.ticket .ticket-event { font-size: 8pt; color: #6b7280; margin-top: 1mm; }
.ticket .ticket-qr { display: flex; justify-content: center; align-items: center; margin: 2mm 0; flex: 1; }
.ticket .ticket-qr canvas, .ticket .ticket-qr img { width: 34mm; height: 34mm; }
.ticket .ticket-pin {
  text-align: center; font-family: monospace; font-size: 14pt; font-weight: 700;
  letter-spacing: 2px; padding: 1mm 0; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0;
}
.ticket .ticket-footer { display: flex; justify-content: space-between; padding-top: 1mm; font-size: 7pt; color: #9ca3af; }
.ticket .ticket-instructions { font-size: 7pt; color: #6b7280; text-align: center; margin-top: 1mm; line-height: 1.2; }
@media print {
  body { background: #fff; margin: 0; }
  .no-print { display: none !important; }
  .print-sheet { box-shadow: none; }
}

/* === Login screens === */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 20px;
}
.login-card {
  background: #fff; padding: 36px 32px; border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  width: 100%; max-width: 380px;
}
.login-card h1 { margin: 0 0 8px; font-size: 24px; }
.login-card .subtitle { color: var(--color-text-soft); font-size: 14px; margin-bottom: 24px; }

/* === Misc === */
.empty { text-align: center; padding: 60px 20px; color: var(--color-text-soft); }
.empty .icon { font-size: 56px; margin-bottom: 12px; }
.empty h3 { margin: 0 0 8px; color: var(--color-text); }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
.tag.active { background: #dcfce7; color: #166534; }
.tag.test { background: #fef3c7; color: #92400e; }
.tag.live { background: #fee2e2; color: #991b1b; }
.tag.draft { background: #dbeafe; color: #1e40af; }
.tag.lost  { background: #fed7aa; color: #9a3412; }
.tag.used  { background: #e5e7eb; color: #374151; }
.tag.replaced { background: #f3e8ff; color: #6b21a8; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--color-border);
}
.checklist li:last-child { border-bottom: none; }
.checklist li .checkbox {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  background: #fff; flex-shrink: 0;
}
.checklist li.done .checkbox { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.checklist li.done .label { color: var(--color-text-soft); }
.checklist li .label { flex: 1; font-size: 14px; }
.checklist li .detail { font-size: 12px; color: var(--color-text-soft); }
.checklist li .badge.auto { background: #e0e7ff; color: #3730a3; }
.checklist li .badge {
  padding: 2px 6px; border-radius: 4px; font-size: 10px;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
}

.progress {
  height: 8px; background: var(--color-surface-2); border-radius: 999px; overflow: hidden;
}
.progress .fill { height: 100%; background: var(--color-primary); transition: width .3s; }

/* === Staff page === */
.staff-wrap { max-width: 600px; margin: 0 auto; padding: 24px; padding-bottom: 100px; }
.staff-wrap h2 { font-size: 20px; }
.scanner-box {
  background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.scanner-box video { width: 100%; height: 100%; object-fit: cover; }
.scanner-box .placeholder { color: #6b7280; font-size: 14px; }
.scanner-box .frame {
  position: absolute; border: 3px solid var(--color-primary); border-radius: 8px;
  top: 15%; left: 15%; right: 15%; bottom: 15%;
}

.staff-vote-result {
  padding: 30px; text-align: center; border-radius: 12px; margin: 20px 0;
}
.staff-vote-result.ok { background: #dcfce7; color: #166534; border: 2px solid #86efac; }
.staff-vote-result.err { background: #fee2e2; color: #991b1b; border: 2px solid #fca5a5; }
.staff-vote-result .icon { font-size: 48px; margin-bottom: 8px; }
.staff-vote-result .msg { font-size: 18px; font-weight: 600; }

/* === rc33: Staff info panel — událost detaily nad skenerem === */
.staff-info-panel {
  background: white; border: 1px solid var(--color-border);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
}
.staff-info-meta {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.staff-meta-item {
  font-size: 12px; padding: 3px 8px; border-radius: 100px;
  background: var(--color-surface-2); color: var(--color-text-soft);
}
.staff-meta-item.live {
  background: #fef3c7; color: #92400e; font-weight: 600;
}
.staff-meta-item.waiting {
  background: #dbeafe; color: #1e40af;
}
.staff-meta-item strong { color: var(--color-text); font-weight: 600; }

.staff-info-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--color-border);
  margin-top: 4px;
}
.staff-info-row.stats { border-top: 0; padding-top: 6px; margin-top: 0; }
.staff-info-row:first-of-type { border-top: 0; padding-top: 0; }
.staff-info-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.staff-info-cell small {
  font-size: 11px; color: var(--color-text-soft);
  text-transform: uppercase; letter-spacing: 0.3px;
}
.staff-info-cell strong {
  font-size: 14px; color: var(--color-text); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.staff-info-cell.ended strong { text-decoration: line-through; opacity: 0.5; }

.staff-countdown {
  display: inline-block; font-size: 11px; padding: 2px 6px;
  border-radius: 100px; margin-top: 3px;
  background: #dcfce7; color: #166534; font-weight: 600;
  align-self: flex-start;
}
.staff-countdown.warning { background: #fef3c7; color: #92400e; }
.staff-countdown.critical {
  background: #fee2e2; color: #991b1b;
  animation: countdownPulse 1s ease-in-out infinite;
}
.staff-countdown.ended { background: #f3f4f6; color: #6b7280; }
@keyframes countdownPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* === Staff mobile optimalizace === */
/* Sticky confirm bar — vždy viditelný palcem dosažitelné tlačítko */
.staff-sticky-confirm {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  padding: 12px 16px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
}
.staff-sticky-confirm .btn {
  width: 100%;
  font-size: 17px;
  padding: 14px 16px;
  min-height: 52px;
}

/* Mobilní úpravy do 600px */
@media (max-width: 600px) {
  .staff-wrap { padding: 12px; padding-bottom: 90px; }
  .staff-wrap h2 { font-size: 18px; margin: 8px 0; }
  /* Scanner — 4:3 místo 1:1, šetří vertikální místo */
  .scanner-box { aspect-ratio: 4/3; }
  /* PIN input větší pro palec */
  .staff-wrap input[data-pin-input] {
    padding: 12px 8px !important;
    min-height: 56px;
  }
  /* Team buttons - kompaktnější */
  .team-btn { padding: 12px 14px; font-size: 14px; }
  .team-btn .num { width: 32px; height: 32px; font-size: 14px; }
}

/* Ještě užší obrazovky (iPhone SE, malé Androidy <380px) */
@media (max-width: 380px) {
  .staff-wrap { padding: 8px; padding-bottom: 90px; }
  .scanner-box { aspect-ratio: 4/3; }
}

/* === rc34/rc35: Tablet layout (768-1199px) ===
   Layout:
   - HEADER (full width)
   - INFO PANEL (full width — kompaktní, horizontalní)
   - SKENER + PIN  | VÝBĚR TÝMU  (2 columns)
   - Potvrdit (sticky bottom)

   Mobil < 768px: vše single column (stejně jako předtím).
*/
@media (min-width: 768px) and (max-width: 1199px) {
  .staff-wrap.scanner-active {
    max-width: 1000px;
  }
  /* Info panel je teď full-width nahoře, ne ve sloupci */
  .staff-wrap.scanner-active > .staff-info-panel {
    margin-bottom: 16px;
  }
  /* Info panel na tabletu: víc cells vedle sebe (4 column) */
  .staff-wrap.scanner-active .staff-info-row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  /* Klíčové: skener vlevo | týmy vpravo */
  .staff-vote-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }
  .staff-vote-scanner { display: flex; flex-direction: column; }
  .staff-vote-teams { display: flex; flex-direction: column; }
  /* Scanner box trochu menší, ať se vejde s týmy vedle */
  .staff-vote-scanner .scanner-box { max-width: 100%; }
  /* Týmy v gridu (2 sloupce uvnitř pravé strany) pokud je týmů víc */
  .staff-vote-teams .team-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  /* Pokud je týmů víc než 6, použij 1 sloupec aby vešly do výšky */
  .staff-vote-teams .team-list:has(> :nth-child(7)) {
    grid-template-columns: 1fr;
  }
  .staff-vote-teams h4 { margin-top: 0; }
  /* Sticky confirm je už full-width, nech ho */
}

/* Pokud má prohlížeč jen part :has() podporu, fallback */
@supports not selector(:has(*)) {
  @media (min-width: 768px) and (max-width: 1199px) {
    .staff-vote-teams .team-list { grid-template-columns: 1fr 1fr; }
  }
}

/* === Filters bar === */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 16px; padding: 12px; background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
}
.filters input, .filters select { padding: 6px 10px; border: 1px solid var(--color-border); border-radius: 6px; }

/* === Diplomas === */
@page diploma { size: A4 landscape; margin: 12mm; }
.diploma {
  width: 273mm; height: 186mm;
  page-break-after: always;
  border: 8px double currentColor;
  padding: 18mm 20mm;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  page: diploma;
}
.diploma.gold   { color: #92400e; background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.diploma.silver { color: #374151; background: linear-gradient(135deg, #f9fafb, #e5e7eb); }
.diploma.bronze { color: #9a3412; background: linear-gradient(135deg, #fff7ed, #fed7aa); }
.diploma.participation { color: #4b5563; background: #fff; }
.diploma .corner { position: absolute; width: 50mm; height: 50mm; border: 2px solid currentColor; opacity: .25; }
.diploma .corner.tl { top: 6mm; left: 6mm; border-right: 0; border-bottom: 0; }
.diploma .corner.tr { top: 6mm; right: 6mm; border-left: 0; border-bottom: 0; }
.diploma .corner.bl { bottom: 6mm; left: 6mm; border-right: 0; border-top: 0; }
.diploma .corner.br { bottom: 6mm; right: 6mm; border-left: 0; border-top: 0; }
.diploma .medal { font-size: 80pt; line-height: 1; margin-bottom: 8mm; }
.diploma .title { font-size: 42pt; font-weight: 700; letter-spacing: 6px; margin-bottom: 4mm; }
.diploma .intro { font-size: 14pt; margin-bottom: 4mm; }
.diploma .team-name { font-size: 32pt; font-weight: 700; margin-bottom: 6mm; }
.diploma .rank-line { font-size: 14pt; margin-bottom: 2mm; }
.diploma .rank-num { font-size: 24pt; font-weight: 700; }
.diploma .votes { font-size: 12pt; margin-top: 4mm; }
.diploma .footer { margin-top: 12mm; display: flex; justify-content: space-around; width: 100%; font-size: 11pt; }
.diploma .footer .sig { width: 60mm; border-top: 1px solid currentColor; padding-top: 2mm; }
.diploma .event-line { font-size: 10pt; opacity: .7; margin-top: 8mm; }

/* === Protocol === */
.protocol {
  max-width: 190mm; margin: 0 auto; padding: 12mm; background: #fff;
  font-family: Georgia, "Times New Roman", serif; font-size: 11pt; line-height: 1.5;
}
.protocol h1 { font-size: 22pt; text-align: center; margin: 0 0 8mm; }
.protocol h2 { font-size: 14pt; margin: 8mm 0 4mm; border-bottom: 1px solid #cbd5e1; padding-bottom: 2mm; }
.protocol h3 { font-size: 12pt; margin: 6mm 0 2mm; }
.protocol .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-bottom: 6mm; }
.protocol .meta div strong { display: inline-block; min-width: 30mm; }
.protocol table { width: 100%; border-collapse: collapse; margin: 4mm 0; }
.protocol table th, .protocol table td { padding: 2mm 3mm; border: 1px solid #cbd5e1; text-align: left; }
.protocol table th { background: #f3f4f6; }
.protocol .hash { font-family: monospace; font-size: 8pt; word-break: break-all; background: #f9fafb; padding: 2mm; border: 1px solid #e5e7eb; }
.protocol .signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm; margin-top: 16mm; }
.protocol .signatures .sig { border-top: 1px solid #111; padding-top: 2mm; text-align: center; }

/* === Token print preview === */
.preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; margin: 16px 0;
}
.preview-grid .item {
  border: 1px solid var(--color-border); border-radius: 6px; padding: 10px;
  text-align: center; font-family: monospace; font-size: 12px;
}

.color-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.color-presets button {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--color-border); cursor: pointer; padding: 0;
}
.color-presets button.active { box-shadow: 0 0 0 2px var(--color-text); }

/* === Char counter (v1.0.10) — pod inputy s maxlength === */
.char-counter {
  font-size: 11px;
  color: #9ca3af;
  text-align: right;
  margin-top: 2px;
  margin-bottom: 4px;
  line-height: 1.2;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
.char-counter.warn { color: #d97706; font-weight: 600; }
.char-counter.danger { color: #dc2626; font-weight: 600; }

/* ====================================================================
   Events list page (rc57)
   - Stat karty (4 — Vše / Aktivní / Běží hlasování / Archiv)
   - Search box (client-side filter)
   - Status pill s Tabler ikonami
   - Action cell s primárním "Otevřít" + secondary actions
   ==================================================================== */

.events-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.events-search-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.events-search-input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.events-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.events-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--color-text-soft);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.events-filter-group {
  display: inline-flex;
  background: var(--color-surface-2, #f3f4f6);
  border-radius: 8px;
  padding: 3px;
  gap: 0;
}
.events-filter-group a {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-soft);
  text-decoration: none;
  border-radius: 6px;
  transition: all .15s;
}
.events-filter-group a:hover {
  color: var(--color-text);
}
.events-filter-group a.active {
  background: #fff;
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.events-table-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.events-table-name strong {
  font-size: 14px;
  color: var(--color-text);
  font-weight: 600;
}
.events-table-name small {
  font-size: 12px;
  color: var(--color-text-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}

.events-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.events-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface-2, #f3f4f6);
  white-space: nowrap;
}
.events-status-pill.phase-prep     { background: #f1f5f9; color: #475569; }
.events-status-pill.phase-voting   { background: #d1fae5; color: #065f46; }
.events-status-pill.phase-review   { background: #fef3c7; color: #92400e; }
.events-status-pill.phase-ceremony { background: #ede9fe; color: #5b21b6; }
.events-status-pill.phase-done     { background: #e0e7ff; color: #3730a3; }
.events-status-sub {
  font-size: 11px;
  color: var(--color-text-soft);
}

.events-actions-cell {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
.events-actions-cell form {
  display: inline-flex;
  margin: 0;
}

.events-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--color-surface, #fff);
  border-radius: 12px;
  border: 1px dashed var(--color-border);
}
.events-empty-state .icon-wrap {
  display: inline-flex;
  width: 80px;
  height: 80px;
  background: var(--color-surface-2, #f3f4f6);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-text-soft);
}
.events-empty-state h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--color-text);
}
.events-empty-state p {
  font-size: 14px;
  color: var(--color-text-soft);
  margin: 0 0 20px;
}

/* Welcome modal — přesunuto z inline <style> v events.php (rc57) */
.welcome-modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  animation: welcomeFadeIn 0.15s ease-out;
}
@keyframes welcomeFadeIn { from { opacity: 0; } to { opacity: 1; } }

.welcome-modal {
  background: white; border-radius: 12px; max-width: 440px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px -10px rgba(15, 23, 42, 0.3);
  position: relative;
  animation: welcomePopIn 0.2s ease-out;
}
@keyframes welcomePopIn {
  from { transform: translateY(-8px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.welcome-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: 0; width: 32px; height: 32px; border-radius: 50%;
  font-size: 22px; line-height: 1; color: #94a3b8;
  cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.welcome-close:hover { background: #f1f5f9; color: #475569; }

.welcome-body { padding: 32px 32px 8px; }
.welcome-body h2 {
  margin: 0 0 6px; font-size: 20px; font-weight: 600;
  color: #0f172a; letter-spacing: -0.01em;
}
.welcome-lead {
  margin: 0 0 20px; color: #64748b; font-size: 14px; line-height: 1.5;
}

.welcome-list {
  margin: 0; padding: 0; list-style: none;
  counter-reset: welcome-step;
}
.welcome-list li {
  counter-increment: welcome-step;
  position: relative;
  padding: 10px 0 10px 36px;
  font-size: 14px; color: #334155; line-height: 1.5;
  border-bottom: 1px solid #f1f5f9;
}
.welcome-list li:last-child { border-bottom: 0; }
.welcome-list li::before {
  content: counter(welcome-step);
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px;
  background: #f1f5f9; color: #475569;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.welcome-list li strong {
  font-weight: 600; color: #0f172a;
}

.welcome-footer {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 32px 24px;
  border-top: 1px solid #f1f5f9;
  margin-top: 16px;
}
.welcome-footer .btn.primary {
  background: var(--color-primary, #d97706); color: white;
  padding: 10px 18px; border-radius: 8px; border: 0;
  font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: inherit;
}
.welcome-footer .btn.primary:hover { filter: brightness(0.95); }

.welcome-skip {
  background: transparent; border: 0; color: #64748b;
  font-size: 13px; cursor: pointer; padding: 8px 12px;
  font-family: inherit;
}
.welcome-skip:hover { color: #0f172a; }

@media (max-width: 480px) {
  .welcome-body { padding: 24px 20px 8px; }
  .welcome-footer { padding: 14px 20px 20px; flex-direction: column; align-items: stretch; gap: 6px; }
  .welcome-footer .btn.primary { width: 100%; }
  .welcome-skip { width: 100%; text-align: center; }
}

/* ====================================================================
   Tokens page (rc58)
   - PIN masking + copy-to-clipboard
   - Token status pill (active/used/lost/replaced)
   - Emergency generate warning card
   - Lokalizace + lepší typografie
   ==================================================================== */

/* Token status pill (jako events status, ale ostatní fáze) */
.token-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.token-status-pill.token-active   { background: #d1fae5; color: #065f46; }
.token-status-pill.token-used     { background: #dbeafe; color: #1e40af; }
.token-status-pill.token-lost     { background: #fee2e2; color: #991b1b; }
.token-status-pill.token-replaced { background: #f3e8ff; color: #6b21a8; }

/* PIN cell — masked + reveal button */
.token-pin-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.token-pin-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  letter-spacing: 1px;
  padding: 2px 8px;
  background: var(--color-surface-2, #f3f4f6);
  border-radius: 4px;
  cursor: text;
  user-select: all;
}
.token-pin-value.masked {
  color: var(--color-text-soft);
  letter-spacing: 3px;
  cursor: default;
  user-select: none;
}
.token-pin-actions {
  display: inline-flex;
  gap: 2px;
  opacity: 0.6;
  transition: opacity .15s;
}
tr:hover .token-pin-actions {
  opacity: 1;
}
.token-pin-btn {
  background: transparent;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: var(--color-text-soft);
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  transition: background .15s;
}
.token-pin-btn:hover {
  background: var(--color-surface-2, #f3f4f6);
  color: var(--color-primary);
}
.token-pin-btn:active {
  transform: scale(0.94);
}
.token-pin-btn.copied {
  color: var(--color-success, #10b981);
}

/* Emergency generate warning card */
.token-generate-blocked {
  border-left: 4px solid var(--color-danger, #dc2626);
}
.token-emergency-warn {
  border-left: 4px solid var(--color-warning, #f59e0b);
}
.token-blocked-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 14px 16px;
  border-radius: 8px;
  color: #7f1d1d;
}
.token-blocked-banner strong {
  color: #991b1b;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.token-blocked-banner p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}
.token-blocked-banner small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #991b1b;
}

.token-emergency-banner {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  padding: 14px 16px;
  border-radius: 8px;
  color: #92400e;
  margin-bottom: 14px;
}
.token-emergency-banner strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.token-emergency-banner p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

/* Load test export (super_admin in test mode) */
.token-loadtest-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #fbbf24;
}
.token-loadtest-bar > strong {
  font-size: 13px;
  color: #92400e;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.token-loadtest-bar .btn {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}
.token-loadtest-bar .btn:hover {
  background: #fde68a;
}
.token-loadtest-warn {
  font-size: 11px;
  color: #78350f;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Print bar (Browser tisk + PDF) */
.token-print-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.token-print-bar:last-child {
  margin-bottom: 0;
}
.token-print-bar > strong {
  font-size: 13px;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 100px;
}

/* Token filter toolbar (jako events filter) */
.token-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.token-filter-toolbar input[type="text"],
.token-filter-toolbar select {
  font-size: 13px;
}
.token-filter-toolbar input[type="text"] {
  min-width: 200px;
}
.token-filter-total {
  margin-left: auto;
  font-size: 13px;
  color: var(--color-text-soft);
}

/* Pagination */
.token-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.token-pagination a,
.token-pagination span {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  min-width: 36px;
  text-align: center;
}
.token-pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.token-pagination a.active,
.token-pagination span.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.token-pagination .ellipsis {
  border: 0;
  background: transparent;
  color: var(--color-text-soft);
  padding: 6px 4px;
}

/* Empty state pro tokens */
.tokens-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--color-surface, #fff);
  border-radius: 12px;
  border: 1px dashed var(--color-border);
}
.tokens-empty-state .icon-wrap {
  display: inline-flex;
  width: 80px;
  height: 80px;
  background: var(--color-surface-2, #f3f4f6);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-text-soft);
}
.tokens-empty-state h3 {
  font-size: 18px;
  margin: 0 0 8px;
}
.tokens-empty-state p {
  font-size: 14px;
  color: var(--color-text-soft);
  margin: 0;
}

/* Token action buttons (Nahradit/Zneplatnit) */
.token-action-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.token-action-group .btn.sm {
  font-size: 12px;
  padding: 4px 8px;
}

/* Token action popover (replace details element) */
.token-action-popover {
  position: relative;
  display: inline-block;
}
.token-action-popover > details > summary {
  list-style: none;
  cursor: pointer;
}
.token-action-popover > details > summary::-webkit-details-marker {
  display: none;
}
.token-action-popover > details[open] > .popover-content {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  min-width: 240px;
  z-index: 50;
}
.token-action-popover .popover-content form {
  margin: 0;
}
.token-action-popover .popover-content input[type="text"] {
  width: 100%;
  margin-bottom: 8px;
  font-size: 13px;
}

/* Detail link (super_admin only) */
.token-detail-link {
  margin-left: 6px;
  font-size: 11px;
  color: var(--color-text-soft);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity .15s;
}
.token-detail-link:hover {
  opacity: 1;
  color: var(--color-primary);
}

/* Copy toast notification */
.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1), opacity .25s;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
}
.copy-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.copy-toast.error { background: #b91c1c; }

/* Checkbox row — pro form-row s checkboxem + víceřádkový label */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

/* ====================================================================
   Public results page (rc59) — vylepšení
   - Tabler trophy ikony místo emoji 🥇🥈🥉
   - Confetti pro top 1
   - Vylepšený share button (vždy viditelný copy URL fallback)
   - Vylepšený 404 a empty stav
   - Stats karty s ikonami
   ==================================================================== */

/* Trophy ikona uvnitř medal area (nahrazuje emoji 🥇🥈🥉) */
.vp-medal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-text-soft);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) inset;
}
.vp-podium-card.gold .vp-medal-icon {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #fff;
  width: 72px;
  height: 72px;
  margin-top: -8px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}
.vp-podium-card.silver .vp-medal-icon {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(148, 163, 184, 0.3);
}
.vp-podium-card.bronze .vp-medal-icon {
  background: linear-gradient(135deg, #f97316 0%, #b45309 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(180, 83, 9, 0.3);
}

/* Section title bez emoji */
.vp-section-title-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.vp-section-title-icon .icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

/* Confetti container */
.vp-confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Stats karty — vylepšení */
.vp-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.vp-summary-stat {
  background: #fff;
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.vp-summary-stat .stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}
.vp-summary-stat strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.vp-summary-stat small {
  font-size: 12px;
  color: var(--color-text-soft);
  line-height: 1.3;
}

/* Share section — vylepšený */
.vp-share-section {
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.vp-share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.vp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-primary);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--color-primary) 35%, transparent);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.vp-share-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-primary) 45%, transparent);
}
.vp-share-btn:active { transform: scale(0.97); }
.vp-share-btn.secondary {
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.vp-share-btn.secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.vp-share-btn.copied {
  background: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* Organizer card — vylepšený footer */
.vp-organizer-card {
  margin: 24px auto 0;
  padding: 20px 24px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.vp-organizer-card img.organizer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.vp-organizer-card .organizer-text {
  flex: 1;
  min-width: 0;
}
.vp-organizer-card .organizer-text small {
  display: block;
  font-size: 11px;
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}
.vp-organizer-card .organizer-text strong {
  font-size: 15px;
  color: var(--color-text);
  display: block;
  margin-top: 2px;
}

/* App branding — jemný link */
.vp-app-branding {
  margin: 24px 0 8px;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-soft);
  opacity: 0.6;
}
.vp-app-branding a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.vp-app-branding a:hover {
  color: var(--color-primary);
}

/* 404 / empty state vylepšení */
.vp-error {
  text-align: center;
  padding: 60px 20px;
  max-width: 480px;
  margin: 40px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.vp-error-icon {
  display: inline-flex;
  width: 80px;
  height: 80px;
  background: var(--color-surface-2, #f3f4f6);
  color: var(--color-text-soft);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.vp-error h2 {
  font-size: 22px;
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--color-text);
}
.vp-error p {
  font-size: 14px;
  color: var(--color-text-soft);
  max-width: 360px;
  margin: 0 auto 12px;
  line-height: 1.5;
}
.vp-error-meta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  color: var(--color-text-soft);
}
.vp-error-meta strong {
  color: var(--color-text);
}

/* Empty state pro top 3 (akce bez výsledků) */
.vp-no-results {
  background: #fff;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  margin: 24px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.vp-no-results .icon-wrap {
  display: inline-flex;
  width: 64px;
  height: 64px;
  background: var(--color-surface-2, #f3f4f6);
  color: var(--color-text-soft);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.vp-no-results h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--color-text);
}
.vp-no-results p {
  font-size: 14px;
  color: var(--color-text-soft);
  margin: 0;
}

/* Toast pro share copy (reuse pattern z rc58 tokens copy-toast) */
.vp-copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1), opacity .25s;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vp-copy-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* rc61: voter ticket context (QR přivede s ?ticket=serial) */
.voter-ticket-context {
  background: var(--color-primary-soft, #fef9f1);
  border: 1px solid var(--color-primary-border, #fde8c4);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.voter-ticket-context .voter-ticket-label {
  color: var(--color-text-soft);
  font-weight: 500;
}
.voter-ticket-context .voter-ticket-serial {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}
.voter-ticket-context .voter-ticket-warn {
  color: #b91c1c;
  font-weight: 600;
  font-size: 12px;
}
