/* ===== StageTimer Custom Styles — BSTicket colour scheme ===== */

/* ── Design tokens ────────────────────────────────────────────── */
:root {
  /* Brand */
  --st-amber:        #f59e0b;
  --st-amber-light:  #fbbf24;
  --st-amber-dark:   #d97706;

  /* Dark-mode surfaces */
  --st-navy-900:     #0d1b2e;
  --st-navy-800:     #112240;
  --st-navy-700:     #162032;
  --st-navy-600:     #1e2d42;
  --st-navy-500:     #1a3a5c;
  --st-navy-400:     #2a4a6e;

  /* Sidebar (always dark) */
  --st-sidebar-bg:   #0d1b2e;
  --st-sidebar-hover:#162032;

  /* Text */
  --st-text-muted-dark: #7a9ab5;
  --st-text-dim-dark:   #4a6a85;

  /* Primary override – amber replaces blue */
  --bs-primary:        #f59e0b;
  --bs-primary-rgb:    245,158,11;
  --bs-link-color:     #ffc451;
  --bs-link-hover-color: #f59e0b;
}

/* ── Light-mode link colour (navy instead of amber) ──────────── */
[data-bs-theme="light"] {
  --bs-link-color:       #0d1b2e;
  --bs-link-hover-color: #112240;
}

/* ── Page Loader ──────────────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  transition: opacity 0.25s ease;
}
[data-bs-theme="dark"] #page-loader { background: #0d1b2e; }
#page-loader .loader-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}
#page-loader .loader-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid rgba(245,158,11,0.25);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: loader-spin 0.7s linear infinite;
}
@keyframes loader-spin { to { transform: rotate(360deg); } }
#page-loader.loader-hidden { opacity: 0; pointer-events: none; }

/* ── General ──────────────────────────────────────────────────── */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --bs-nav-link-color: #fff;
  --bs-nav-link-hover-color: #fbbf24;
}
a { color: var(--st-amber); }
a:hover { color: var(--st-amber-dark); }

/* Bootstrap primary override (buttons, focus rings) */
.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #d97706;
  color: #0d1b2e;
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-color: #f59e0b;
  color: #0d1b2e;
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(245,158,11,0.4);
}
.btn-outline-primary {
  border-color: #f59e0b;
  color: #f59e0b;
}
.btn-outline-primary:hover {
  background: #f59e0b;
  color: #0d1b2e;
}

/* ── Navbar ───────────────────────────────────────────────────── */
.navbar-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}
.navbar-brand span {
  line-height: 1;
  display: block;
}
.mobile-menu-toggler { cursor: pointer; opacity: 0.8; }
.mobile-menu-toggler:hover { opacity: 1; }

/* Admin topbar hamburger (adapts to theme) */
.admin-mobile-toggler {
  cursor: pointer;
  line-height: 1;
  color: #112240;
  opacity: 0.75;
}
.admin-mobile-toggler:hover { opacity: 1; }
[data-bs-theme="dark"] .admin-mobile-toggler { color: #e2e8f0; }

/* Active nav link in mobile drawer */
.mobile-nav-link.active {
  color: #ffc451;
  background: rgba(245,158,11,0.1);
}

/* ── Mobile nav drawer (offcanvas) ────────────────────────────── */
.mobile-nav-drawer {
  background: #0d1b2e;
  max-width: 280px;
  border-left: 1px solid rgba(245,158,11,0.2);
}
.mobile-nav-drawer .offcanvas-header {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 1.25rem;
}
.mobile-nav-drawer .navbar-brand img { width: 30px; height: 30px; }

@keyframes mobileNavIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.mobile-nav-link {
  display: block;
  padding: 0.9rem 1rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  opacity: 0;
  transform: translateX(20px);
}
.mobile-nav-link:hover,
.mobile-nav-link:focus { background: rgba(255,255,255,0.07); color: #ffc451; }
.mobile-nav-cta,
.mobile-nav-cta:hover,
.mobile-nav-cta:focus { color: #0d1b2e; background: #f59e0b; }

/* ── Theme toggle button ──────────────────────────────────────── */
.btn-theme-toggle,
.btn-lang-toggle {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

/* ── Hero section ─────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #0d1b2e 0%, #112240 55%, #1a3a5c 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(245,158,11,0.35);
}
.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
}
.hero-title .text-accent { color: #f59e0b; }
.hero-sub {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
}
.hero-badge {
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.4);
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 1rem;
}

/* ── Feature cards ────────────────────────────────────────────── */
.feature-card {
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 2rem;
  height: 100%;
  transition: box-shadow 0.2s, transform 0.2s;
  background: #fff;
}
.feature-card:hover {
  box-shadow: 0 8px 32px rgba(245,158,11,0.1);
  transform: translateY(-3px);
}
.feature-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #ffd47a, #ffc451);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: #0d1b2e;
}

/* ── Section backgrounds ──────────────────────────────────────── */
.features-section   { background: #f8fafc; }
.howitworks-section { background: #fff; }

/* ── How it works steps ───────────────────────────────────────── */
.step-number {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ffd47a, #ffc451);
  color: #0d1b2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Auth pages ───────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e8edf3 100%);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 2.5rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.10);
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
}
.password-requirements li {
  font-size: 0.82rem;
  margin-bottom: 2px;
  color: #94a3b8;
}
.password-requirements li i { color: #94a3b8; width: 16px; }
.password-requirements li.valid       { color: #059669; }
.password-requirements li.valid i     { color: #059669; }

/* ── Admin pages ──────────────────────────────────────────────── */
.admin-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--st-sidebar-bg);
  color: #e2e8f0;
  flex-shrink: 0;
}
.admin-sidebar .nav-link {
  color: var(--st-text-muted-dark);
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  margin: 2px 8px;
  transition: background 0.15s, color 0.15s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(245,158,11,0.15);
  color: #fbbf24;
}
.admin-sidebar .nav-link i { width: 20px; margin-right: 8px; }

/* ── Navy outline button ──────────────────────────────────────── */
.btn-navy-outline {
  color: #0d1b2e;
  border: 1px solid #0d1b2e;
  background: transparent;
}
.btn-navy-outline:hover,
.btn-navy-outline:focus {
  background: #0d1b2e;
  color: #fff;
  border-color: #0d1b2e;
}

/* ── Light-mode sidebar ───────────────────────────────────────── */
[data-bs-theme="light"] .admin-brand span { color: #ffc451; }
[data-bs-theme="light"] .admin-sidebar {
  background: var(--st-navy-400);
  color: #c8ddf0;
}
[data-bs-theme="light"] .admin-sidebar .nav-link {
  color: #a8c4de;
}
[data-bs-theme="light"] .admin-sidebar .nav-link:hover,
[data-bs-theme="light"] .admin-sidebar .nav-link.active {
  background: rgba(245,158,11,0.20);
  color: #fbbf24;
}
[data-bs-theme="light"] .admin-brand {
  border-bottom-color: rgba(255,255,255,0.12);
}
[data-bs-theme="light"] .admin-sidebar .btn-outline-secondary {
  color: #a8c4de;
  border-color: rgba(255,255,255,0.20);
}
[data-bs-theme="light"] .admin-sidebar .btn-outline-secondary:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
}
[data-bs-theme="light"] .admin-sidebar .text-muted {
  color: #7aa8c8 !important;
}

.admin-brand {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}
.admin-brand span {
  font-weight: 700;
  color: #ffc451;
  font-size: 1.05rem;
}
.admin-main {
  flex: 1;
  background: #f8fafc;
  min-height: 100vh;
  overflow-x: hidden;
}
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-topbar h5 {
  margin: 0;
  font-weight: 700;
  color: #112240;
}
.admin-content { padding: 1.75rem; }

/* ── Avatar upload card ───────────────────────────────────────── */
.avatar-upload-area {
  position: relative;
  width: 130px;
  height: 130px;
  cursor: pointer;
  flex-shrink: 0;
}
.avatar-preview {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border: 3px solid rgba(245,158,11,0.35);
  transition: border-color 0.2s;
  display: block;
}
.avatar-upload-area:hover .avatar-preview {
  border-color: #f59e0b;
}
.avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.avatar-upload-area:hover .avatar-overlay { opacity: 1; }

/* ── Events list (card layout) ───────────────────────────────── */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.event-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 0;
  transition: background 0.15s;
}
.event-card:first-child { border-radius: 14px 14px 0 0; }
.event-card:last-child  { border-radius: 0 0 14px 14px; }
.event-card:only-child  { border-radius: 14px; }
.event-card + .event-card { border-top: none; }
.event-card:hover { background: #f8fafc; }

.event-card-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  min-height: 72px;
}
.event-card-left { flex-shrink: 0; display: flex; align-items: center; }
.event-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}
.event-card-info { flex: 1; min-width: 0; }
.event-card-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: #112240;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
  transition: color 0.15s;
}
.event-card-name:hover { color: #f59e0b; }
.event-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  font-size: 0.8rem;
  color: #64748b;
}
.event-card-meta-item { display: flex; align-items: center; gap: 0.3rem; }
.event-card-meta-item i { font-size: 0.75rem; opacity: 0.7; }
.event-card-meta-sep { color: #94a3b8; font-size: 0.75rem; }

.event-card-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.event-card-actions {
  display: flex;
  gap: 0.3rem;
}
.event-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.event-card-btn:hover {
  background: #f1f5f9;
  color: #112240;
  border-color: #cbd5e1;
}
.event-card-btn--display:hover { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.event-card-btn--danger:hover  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

/* Dark mode — event cards */
[data-bs-theme="dark"] .event-card {
  background: #112240;
  border-color: rgba(255,255,255,0.06);
}
[data-bs-theme="dark"] .event-card:hover { background: #162c4a; }
[data-bs-theme="dark"] .event-card-name  { color: #f1f5f9; }
[data-bs-theme="dark"] .event-card-name:hover { color: #f59e0b; }
[data-bs-theme="dark"] .event-card-meta  { color: #7a9ab5; }
[data-bs-theme="dark"] .event-card-meta-sep { color: #4a6a85; }
[data-bs-theme="dark"] .event-card-btn {
  border-color: rgba(255,255,255,0.1);
  color: #7a9ab5;
}
[data-bs-theme="dark"] .event-card-btn:hover {
  background: rgba(245,158,11,0.12);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.35);
}
[data-bs-theme="dark"] .event-card-btn--display:hover {
  background: rgba(52,211,153,0.12);
  color: #34d399;
  border-color: rgba(52,211,153,0.35);
}
[data-bs-theme="dark"] .event-card-btn--danger:hover {
  background: rgba(239,68,68,0.12);
  color: #f87171;
  border-color: rgba(239,68,68,0.35);
}

/* ── Delegated badge ──────────────────────────────────────────── */
.badge-delegated {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2em 0.55em;
  border-radius: 6px;
  background: rgba(245,158,11,0.12);
  color: #b45309;
  border: 1px solid rgba(245,158,11,0.3);
  white-space: nowrap;
  line-height: 1.4;
}
[data-bs-theme="dark"] .badge-delegated {
  background: rgba(245,158,11,0.1);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.25);
}

/* ── Status badges ────────────────────────────────────────────── */
.badge-active   { background-color: #d1fae5; color: #065f46; }
.badge-archived { background-color: #f1f5f9; color: #64748b; }
.badge-upcoming { background-color: #fef3c7; color: #92400e; }
.badge-ongoing  { background-color: #fde68a; color: #78350f; }
.badge-past     { background-color: #fce7f3; color: #9d174d; }

/* ── Timeline table ───────────────────────────────────────────── */
.timeline-point-past    { opacity: 0.5; text-decoration: line-through; }
.timeline-point-current { background: #fef3c7 !important; font-weight: 600; }
.timeline-point-next    { background: #fffbeb !important; }

/* ── Display page ─────────────────────────────────────────────── */
body.display-mode {
  background: #000;
  color: #fff;
  overflow: hidden;
  max-width: 100%;
}
#display-wrapper {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #080f1a;
  position: relative;
  opacity: 0;
  transition: opacity 0.55s ease;
}
#display-wrapper.revealed { opacity: 1; }

/* Monospaced clock font — applied to all numeric displays */
#display-clock,
#upcoming-clock,
#countdown-value,
.upcoming-item .point-time,
.upcoming-item .point-countdown {
  font-family: 'Roboto Mono', 'Courier New', monospace;
}

/* Style 1: Clock */
#display-clock {
  font-size: min(40vh, 20vw); /* 8 znaků HH:MM:SS × 0.6em = 4.8em → max 100/4.8≈20vw */
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  color: #f59e0b;
}
#display-date {
  font-size: clamp(1.4rem, 4vw, 3rem);
  color: rgba(245,158,11,0.55);
  margin-top: 0.5rem;
  letter-spacing: 2px;
}
#clock-now-item {
  font-size: clamp(3rem, 8.75vw, 6.25rem);
  color: rgba(255,255,255,0.8);
  margin-top: 1rem;
  letter-spacing: 1px;
  min-height: 1.2em;
}

/* ── Patička stylů 1 a 3 ──────────────────────────────────────── */
#display-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: rgba(8,15,26,0.75);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(245,158,11,0.15);
  z-index: 50;
  gap: 1rem;
}
#footer-event-info {
  font-size: clamp(0.8rem, 1.5vw, 1.1rem);
  font-weight: 600;
  color: #f59e0b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#footer-organizer {
  font-size: clamp(0.75rem, 1.3vw, 1rem);
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  flex-shrink: 0;
}
#footer-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.01em;
}
#footer-brand span { color: #ffc451; }
#footer-brand:hover { text-decoration: none; opacity: 0.8; }
[data-bs-theme="light"] #display-footer {
  background: rgba(240,244,255,0.85);
  border-top-color: rgba(245,158,11,0.3);
}
[data-bs-theme="light"] #footer-event-info { color: #d97706; }
[data-bs-theme="light"] #footer-organizer  { color: rgba(13,27,46,0.5); }
[data-bs-theme="light"] #footer-brand      { color: #0d1b2e; }
[data-bs-theme="light"] #footer-brand span { color: #0d1b2e; }

/* Style 2: Upcoming list */
#display-upcoming-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.upcoming-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem 0.75rem;
  border-bottom: 1px solid rgba(245,158,11,0.18);
  margin-bottom: 0.5rem;
  gap: 1rem;
}
.upcoming-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
#upcoming-event-name {
  font-size: clamp(1rem, 2.2vw, 1.6rem);
  font-weight: 700;
  color: #f59e0b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50vw;
}
#upcoming-event-place {
  font-size: clamp(0.75rem, 1.4vw, 1rem);
  color: rgba(245,158,11,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50vw;
}
.upcoming-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
}
#upcoming-event-organizer {
  font-size: clamp(0.75rem, 1.4vw, 1rem);
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}
.upcoming-header-label {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,158,11,0.55);
}
#upcoming-clock {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #f59e0b;
  line-height: 1;
}
#display-upcoming {
  width: 100%;
  max-width: 900px;
  padding: 1.25rem 2rem 2rem;
}
.upcoming-item {
  display: flex;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.12);
  transition: all 0.3s;
}
.upcoming-item.upcoming-current {
  background: rgba(245,158,11,0.18);
  border-color: rgba(245,158,11,0.5);
  font-size: 1.15em;
}
.upcoming-item .point-time {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  min-width: 100px;
  font-variant-numeric: tabular-nums;
  color: #f59e0b;
}
.upcoming-item .point-name {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  flex: 1;
  padding-left: 1.5rem;
}
.upcoming-item .point-countdown {
  font-size: clamp(0.85rem, 1.8vw, 1.1rem);
  color: rgba(245,158,11,0.5);
  font-variant-numeric: tabular-nums;
}
.upcoming-empty { color: rgba(255,255,255,0.35); }

/* Stav "akce skončila" pro styl 2 — centrovaný prázdný screen */
#display-upcoming-panel.event-ended {
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
}
.display-event-ended {
  font-size: clamp(1.6rem, 5vw, 3.5rem);
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-align: center;
  padding: 2rem;
  letter-spacing: 0.02em;
}
[data-bs-theme="light"] .display-event-ended { color: rgba(13,27,46,0.35); }

/* Style 3: Countdown */
#countdown-value {
  font-size: min(40vh, 33vw); /* MM:SS (5 znaků × 0.6 = 3em → max 100/3≈33vw) */
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -4px;
  color: #f59e0b;
}
#countdown-value.long-format {
  font-size: min(40vh, 20vw); /* HH:MM:SS (8 znaků × 0.6 = 4.8em → max 100/4.8≈20vw) */
}
#countdown-label {
  font-size: clamp(5.25rem, 16.875vw, 12rem);
  color: rgba(255,255,255,0.85);
  margin-top: 0.5rem;
  max-width: 80vw;
  text-align: center;
}
#countdown-next-label {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  margin-top: clamp(0.75rem, 2vh, 1.5rem);
  font-size: clamp(1.1rem, 3vw, 2rem);
  color: rgba(245,158,11,0.75);
}
.countdown-next-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(245,158,11,0.9);
  min-width: 5ch;
  text-align: right;
  flex-shrink: 0;
}
.countdown-next-name {
  text-align: left;
}

/* ── Display effects ──────────────────────────────────────────── */
@keyframes effectBlink     { 0%,100%{opacity:1} 50%{opacity:0.15} }
@keyframes effectBlinkFast { 0%,100%{opacity:1} 50%{opacity:0} }
.effect-blink      { animation: effectBlink 1s infinite; }
.effect-blink-fast { animation: effectBlinkFast 0.4s infinite; }

/* ── Sync error indicator ─────────────────────────────────────── */
#sync-error-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ef4444;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 16px rgba(239,68,68,0.5);
  z-index: 9999;
  cursor: pointer;
  animation: effectBlink 2s infinite;
}
#sync-error-indicator.visible { display: flex; }

/* ── Display config modal (dark — default) ────────────────────── */
#config-modal .effect-row {
  background: rgba(245,158,11,0.04);
  border: 1px solid rgba(245,158,11,0.1);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
#config-modal .config-divider { border-color: rgba(245,158,11,0.12); }
#config-modal .form-control,
#config-modal .form-select {
  background: #0d1b2e;
  border-color: rgba(245,158,11,0.2);
  color: #e2e8f0;
}
#config-modal .form-control:focus,
#config-modal .form-select:focus {
  background: #0d1b2e;
  border-color: #f59e0b;
  color: #e2e8f0;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.2);
}

/* Config: style option rows */
#config-modal .effect-row[style*="cursor"] {
  background: rgba(245,158,11,0.04);
  border: 1px solid rgba(245,158,11,0.12);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.4rem;
  transition: border-color 0.15s, background 0.15s;
}
#config-modal .effect-row[style*="cursor"]:has(input:checked) {
  border-color: #f59e0b;
  background: rgba(245,158,11,0.12);
}

/* Config modal: light mode */
[data-bs-theme="light"] #config-modal .modal-content {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
}
[data-bs-theme="light"] #config-modal .modal-title { color: #0d1b2e; }
[data-bs-theme="light"] #config-modal .form-control,
[data-bs-theme="light"] #config-modal .form-select {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.18);
  color: #0d1b2e;
}
[data-bs-theme="light"] #config-modal .form-control:focus,
[data-bs-theme="light"] #config-modal .form-select:focus {
  background: #fff;
  border-color: #f59e0b;
  color: #0d1b2e;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.18);
}
[data-bs-theme="light"] #config-modal .effect-row {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.1);
}
[data-bs-theme="light"] #config-modal .config-divider { border-color: rgba(0,0,0,0.08); }
[data-bs-theme="light"] #config-modal .effect-row[style*="cursor"] {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.12);
  color: #0d1b2e;
}
[data-bs-theme="light"] #config-modal .effect-row[style*="cursor"] .fw-semibold { color: #0d1b2e; }
[data-bs-theme="light"] #config-modal .effect-row[style*="cursor"]:has(input:checked) {
  border-color: #f59e0b;
  background: #fffbeb;
}
[data-bs-theme="light"] #config-modal [data-lang].active {
  background: #0d1b2e;
  color: #fff;
  border-color: #0d1b2e;
}

/* ── Display wrapper: light mode ──────────────────────────────── */
[data-bs-theme="light"] #display-wrapper    { background: #f8fafc; color: #112240; }
[data-bs-theme="light"] #display-clock      { color: #0d1b2e; }
[data-bs-theme="light"] #display-date       { color: #92400e; }
[data-bs-theme="light"] #clock-now-item     { color: rgba(13,27,46,0.75); }
[data-bs-theme="light"] .upcoming-item {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.2);
  color: #112240;
}
[data-bs-theme="light"] .upcoming-item.upcoming-current {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.5);
}
[data-bs-theme="light"] .upcoming-item .point-time      { color: #d97706; }
[data-bs-theme="light"] .upcoming-item .point-countdown { color: rgba(180,130,0,0.6); }
[data-bs-theme="light"] .upcoming-empty                 { color: rgba(0,0,0,0.35); }
[data-bs-theme="light"] .upcoming-header-label          { color: #ffc451; }
[data-bs-theme="light"] #upcoming-event-name            { color: #d97706; }
[data-bs-theme="light"] #upcoming-event-place           { color: rgba(180,120,0,0.7); }
[data-bs-theme="light"] #upcoming-event-organizer       { color: rgba(13,27,46,0.5); }
[data-bs-theme="light"] #upcoming-clock                 { color: #0d1b2e; }
[data-bs-theme="light"] #countdown-label                { color: #0d1b2e; }
[data-bs-theme="light"] #countdown-next-label           { color: rgba(13,27,46,0.75); }
[data-bs-theme="light"] .countdown-next-time            { color: #0d1b2e; }
[data-bs-theme="light"] .countdown-next-name            { color: rgba(13,27,46,0.75); }
[data-bs-theme="light"] #countdown-value                { color: #d97706; }

/* ── Theme toggle on display screen ──────────────────────────── */
.display-top-controls {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* ── Sdílené základy pro všechna 3 display tlačítka ─────────── */
.display-theme-btn,
.display-lang-btn,
.display-fullscreen-btn,
#display-config-btn {
  border-radius: 10px;
  background: rgba(245,158,11,0.1);
  border: 1.5px solid rgba(245,158,11,0.35);
  color: #f59e0b;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, background 0.2s, border-color 0.2s;
  box-shadow: none;
}
.display-top-controls.visible .display-theme-btn,
.display-top-controls.visible .display-lang-btn,
.display-top-controls.visible .display-fullscreen-btn,
.display-top-controls.visible #display-config-btn {
  opacity: 1;
  pointer-events: auto;
}
.display-theme-btn:hover,
.display-lang-btn:hover,
.display-lang-btn:focus,
.display-fullscreen-btn:hover,
#display-config-btn:hover {
  background: rgba(245,158,11,0.22);
  border-color: rgba(245,158,11,0.65);
  color: #fbbf24;
  box-shadow: none;
}

.display-fullscreen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1.05rem;
  cursor: pointer;
}
.display-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1.1rem;
}
.display-lang-btn {
  height: 42px;
  padding: 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
#display-config-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 1.15rem;
  text-decoration: none;
}

/* Light mode overrides */
[data-bs-theme="light"] .display-theme-btn,
[data-bs-theme="light"] .display-lang-btn,
[data-bs-theme="light"] .display-fullscreen-btn,
[data-bs-theme="light"] #display-config-btn {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.5);
  color: #d97706;
}
[data-bs-theme="light"] .display-theme-btn:hover,
[data-bs-theme="light"] .display-lang-btn:hover,
[data-bs-theme="light"] .display-lang-btn:focus,
[data-bs-theme="light"] .display-fullscreen-btn:hover,
[data-bs-theme="light"] #display-config-btn:hover {
  background: rgba(245,158,11,0.25);
  border-color: rgba(245,158,11,0.75);
  color: #b45309;
}

.display-lang-dropdown .dropdown-menu {
  min-width: 130px;
  font-size: 0.88rem;
}

/* ── Responsive — admin + homepage ───────────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .hero-title    { font-size: 2.2rem; }
  .admin-content { padding: 1rem; }
}

/* ═══════════════════════════════════════════════════════════════
   DISPLAY PAGE — MOBILNÍ / TABLETOVÉ ZOBRAZENÍ
   Tabletový výchozí stav: 577 – 768 px (landscape mobil, tablet portrait)
   Telefonní zobrazení: ≤ 576 px
═══════════════════════════════════════════════════════════════ */

/* ── Tabletový breakpoint (≤ 768 px) ─────────────────────────── */
@media (max-width: 768px) {

  /* Styl 2: Upcoming list – hlavička */
  .upcoming-header-bar {
    padding: 0.75rem 1.1rem 0.5rem;
  }
  .upcoming-header-label {
    font-size: clamp(0.65rem, 2vw, 0.85rem);
    letter-spacing: 0.08em;
  }
  #upcoming-clock {
    font-size: clamp(1.8rem, 7vw, 3.5rem);
  }

  /* Styl 2: seznam */
  #display-upcoming {
    padding: 0.75rem 1rem 1.5rem;
    max-width: 100%;
  }
  .upcoming-item {
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.45rem;
    border-radius: 10px;
  }
  .upcoming-item .point-time {
    min-width: 80px;
    font-size: clamp(0.85rem, 3.5vw, 1.3rem);
  }
  .upcoming-item .point-name {
    font-size: clamp(0.9rem, 3.5vw, 1.3rem);
    padding-left: 0.75rem;
  }
  .upcoming-item .point-countdown {
    font-size: clamp(0.75rem, 2.5vw, 1rem);
  }

  /* Styl 3: Odpočet – vedlejší text přizpůsoben */
  #countdown-next-label {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    max-width: 92vw;
    gap: 0.4rem 1rem;
  }
  .countdown-next-time { text-align: center; }

  /* Config modal: přetečení efektových řad na tabletu */
  #config-modal .modal-dialog {
    margin: 0.75rem auto;
  }
  #config-modal .row.g-2 {
    flex-wrap: wrap;
  }
}

/* ── Telefonní breakpoint (≤ 576 px) ─────────────────────────── */
@media (max-width: 576px) {

  /* Styl 1: Hodiny – přesně na šířku obrazovky (8 znaků Roboto Mono ≈ 0.6em každý → 4.8em celkem → font = vw/4.8 ≈ 20vw) */
  #display-clock {
    font-size: clamp(3rem, 20vw, 8rem);
  }
  #display-date {
    font-size: clamp(0.95rem, 4.5vw, 1.6rem);
    letter-spacing: 1px;
    margin-top: 0.35rem;
  }
  #clock-now-item {
    font-size: clamp(1rem, 4.5vw, 1.5rem);
    padding: 0 1rem;
    text-align: center;
  }

  /* Styl 2: hlavička */
  .upcoming-header-bar {
    padding: 0.6rem 0.85rem 0.4rem;
    gap: 0.5rem;
  }
  .upcoming-header-label {
    font-size: clamp(0.6rem, 2.5vw, 0.78rem);
    letter-spacing: 0.06em;
  }
  #upcoming-clock {
    font-size: clamp(1.5rem, 9vw, 2.6rem);
  }
  #display-upcoming {
    padding: 0.5rem 0.75rem 1.25rem;
  }

  /* Styl 2: položky – vertikální layout na telefonu */
  .upcoming-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.65rem 0.85rem;
    gap: 0.15rem;
    margin-bottom: 0.4rem;
  }
  .upcoming-item .point-time {
    min-width: unset;
    font-size: clamp(0.78rem, 3.5vw, 1rem);
  }
  .upcoming-item .point-name {
    padding-left: 0;
    font-size: clamp(1rem, 4.5vw, 1.25rem);
    font-weight: 500;
  }
  .upcoming-item .point-countdown {
    align-self: flex-end;
    font-size: clamp(0.72rem, 3.2vw, 0.9rem);
  }

  /* Styl 2: panel scrollovatelný při přeplnění */
  #display-upcoming-panel {
    overflow-y: auto;
    height: 100vh;
    height: 100dvh;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem; /* prostor pro patičku */
  }

  /* Styl 2: event-ended — centrovací layout funguje i na mobilu */
  #display-upcoming-panel.event-ended {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 0;
  }

  /* Styl 3: Odpočet — MM:SS (5 znaků) vs HH:MM:SS (8 znaků) */
  #countdown-value {
    font-size: clamp(3rem, 31vw, 12rem);   /* MM:SS: 5×0.6=3em → 100/3≈33vw */
    letter-spacing: -2px;
  }
  #countdown-value.long-format {
    font-size: clamp(2.5rem, 20vw, 8rem);  /* HH:MM:SS: 8×0.6=4.8em → 100/4.8≈21vw */
  }
  #countdown-label {
    font-size: clamp(1rem, 5vw, 2rem);
    padding: 0 1rem;
    line-height: 1.3;
    word-break: break-word;
  }
  #countdown-next-label {
    font-size: clamp(0.85rem, 4vw, 1.5rem);
    gap: 0.25rem 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 3rem; /* prostor nad patičkou */
    max-width: 90vw;
    text-align: center;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Styl 1 + 3: prostor pro patičku (position: fixed) */
  #display-wrapper {
    padding-bottom: 3rem;
  }

  /* Styl 1: název právě probíhajícího bodu — zalomení na více řádků */
  #clock-now-item {
    font-size: clamp(1rem, 5vw, 1.75rem);
    line-height: 1.3;
    word-break: break-word;
    max-width: 90vw;
  }

  /* Patička — kompaktnější na malém displeji */
  #display-footer {
    padding: 0.35rem 0.7rem;
    gap: 0.4rem;
  }
  #footer-brand {
    display: none; /* na malém displeji není místo pro brand uprostřed */
  }
  #footer-event-info {
    font-size: clamp(0.7rem, 3.5vw, 0.9rem);
  }
  #footer-organizer {
    font-size: clamp(0.65rem, 3vw, 0.82rem);
  }

  /* Config modal: plná šířka + efektové řady wrappují */
  #config-modal .modal-dialog {
    margin: 0.25rem;
  }
  #config-modal input[type="number"].form-control-sm {
    width: 68px !important;
  }
  #config-modal select.form-select-sm {
    width: auto !important;
    flex: 1;
    min-width: 90px;
    max-width: 48%;
  }

  /* Ovládací tlačítka (ozubené kolo, lang) – malinko menší na telefonu */
  .display-top-controls {
    top: 0.5rem;
    right: 0.5rem;
    gap: 0.3rem;
  }
  .display-theme-btn,
  #display-config-btn {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
  }
  .display-lang-btn {
    height: 30px;
    padding: 0 7px;
    font-size: 0.75rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE OVERRIDES
══════════════════════════════════════════════════════════════ */

/* ── Homepage footer ──────────────────────────────────────────── */
.home-footer {
  background: #0f172a;
  color: #475569;
}
.home-footer-brand {
  font-weight: 700;
  text-decoration: none;
  color: rgba(255,255,255,0.85);
}
.home-footer-brand span { color: #ffc451; }
.home-footer-brand:hover { opacity: 0.75; text-decoration: none; color: rgba(255,255,255,0.85); }
.home-footer-link {
  text-decoration: none;
  color: #475569;
}
.home-footer-link:hover { opacity: 0.75; text-decoration: none; color: #475569; }
[data-bs-theme="light"] .home-footer            { background: #f1f5f9; color: #0d1b2e; }
[data-bs-theme="light"] .home-footer-brand      { color: #0d1b2e; }
[data-bs-theme="light"] .home-footer-brand span { color: #0d1b2e; }
[data-bs-theme="light"] .home-footer-brand:hover { color: #0d1b2e; }
[data-bs-theme="light"] .home-footer-link        { color: #0d1b2e; }
[data-bs-theme="light"] .home-footer-link:hover  { color: #0d1b2e; }

/* ── Landing sections ─────────────────────────────────────────── */
[data-bs-theme="dark"] .features-section   { background: #0d1420; }
[data-bs-theme="dark"] .howitworks-section { background: #0d1b2e; }

/* ── Feature cards ────────────────────────────────────────────── */
[data-bs-theme="dark"] .feature-card {
  background: #112240;
  border-color: rgba(245,158,11,0.12);
}
[data-bs-theme="dark"] .feature-card:hover {
  box-shadow: 0 8px 32px rgba(245,158,11,0.1);
}

/* ── Auth ─────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .auth-wrapper {
  background: linear-gradient(135deg, #0d1b2e 0%, #112240 100%);
}
[data-bs-theme="dark"] .auth-card {
  background: #112240;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  border: 1px solid rgba(245,158,11,0.15);
}
[data-bs-theme="dark"] .password-requirements li       { color: var(--st-text-muted-dark); }
[data-bs-theme="dark"] .password-requirements li i     { color: var(--st-text-dim-dark); }
[data-bs-theme="dark"] .password-requirements li.valid { color: #34d399; }
[data-bs-theme="dark"] .password-requirements li.valid i { color: #34d399; }

/* ── Admin main area ──────────────────────────────────────────── */
[data-bs-theme="dark"] .admin-main    { background: #0d1420; }
[data-bs-theme="dark"] .admin-topbar  {
  background: #112240;
  border-bottom-color: rgba(245,158,11,0.12);
}
[data-bs-theme="dark"] .admin-topbar h5 { color: #f1f5f9; }
[data-bs-theme="dark"] .btn-navy-outline {
  color: #ffc451;
  border-color: #ffc451;
}
[data-bs-theme="dark"] .btn-navy-outline:hover,
[data-bs-theme="dark"] .btn-navy-outline:focus {
  background: #ffc451;
  color: #0d1b2e;
  border-color: #ffc451;
}

/* ── Cards ────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .card-header.bg-white { background-color: var(--bs-card-bg) !important; }

/* ── Status badges (dark) ─────────────────────────────────────── */
[data-bs-theme="dark"] .badge-active   { background-color: #064e3b; color: #6ee7b7; }
[data-bs-theme="dark"] .badge-archived { background-color: #1e2d42; color: #7a9ab5; }
[data-bs-theme="dark"] .badge-upcoming { background-color: #451a03; color: #fbbf24; }
[data-bs-theme="dark"] .badge-ongoing  { background-color: #78350f; color: #fde68a; }
[data-bs-theme="dark"] .badge-past     { background-color: #4c0519; color: #fda4af; }

/* ── Timeline highlights (dark) ───────────────────────────────── */
[data-bs-theme="dark"] .timeline-point-current { background: #451a03 !important; color: #fbbf24; }
[data-bs-theme="dark"] .timeline-point-next    { background: #1a2d45 !important; }

/* ── Toast (light) ────────────────────────────────────────────── */
.api-toast-light {
  background: #fff;
  color: #112240;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.api-toast-light .btn-close    { filter: none; }
.api-toast-light .toast-countdown { color: rgba(0,0,0,.45); }

/* ── Toast (dark) ─────────────────────────────────────────────── */
.api-toast-dark {
  background: #112240;
  color: #f1f5f9;
  border: 1px solid rgba(245,158,11,0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.api-toast-dark .btn-close      { filter: invert(1) grayscale(1); }
.api-toast-dark .toast-countdown { color: rgba(245,158,11,0.5); }
