:root {
  /* Cool-neutral near-black -- matches the marketing site's ink family, vivid orange pops harder against it. */
  --bg: #121016;
  --bg-soft: #17141c;
  --panel: #1c1922;
  --panel-2: #242030;
  --panel-border: #332d3d;
  --panel-border-soft: #2a2632;
  --text: #f5f3f7;
  --text-dim: #b3abc0;
  --text-mute: #7d7688;

  /* Primary accent -- vivid brand orange, used for actions and the one thing per view that matters. */
  --accent: #ff5a1f;
  --accent-strong: #e2450f;
  --accent-bright: #ff8a54;
  --accent-soft: rgba(255, 90, 31, 0.16);
  --accent-ink: #2a0f04;

  /* Secondary accent -- teal, complementary to the orange. Used more freely here for visual variety. */
  --accent-2: #3fa79c;
  --accent-2-strong: #2c8279;
  --accent-2-soft: rgba(63, 167, 156, 0.18);
  --accent-2-ink: #05201d;

  /* Tertiary -- gold, for "featured/premium" moments and a third accent color for variety. */
  --gold: #f0b84e;
  --gold-soft: rgba(240, 184, 78, 0.18);

  --success: #3ecf82;
  --success-soft: rgba(62, 207, 130, 0.16);
  --danger: #ff5c56;
  --danger-soft: rgba(255, 92, 86, 0.16);
  --warning: #f0ad3f;
  --warning-soft: rgba(240, 173, 63, 0.16);

  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 8px 20px -14px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(.2,.7,.2,1);

  --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', sans-serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

/* ---------- App shell (sidebar layout) ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 1.4rem 1.4rem 1.2rem;
  border-bottom: 1px solid var(--panel-border);
  background: radial-gradient(180px 90px at 15% 0%, var(--accent-soft), transparent);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-mark-icon.large {
  width: 54px;
  height: 54px;
  margin-bottom: 1rem;
}

.brand-mark-text { display: flex; flex-direction: column; }

.sidebar-brand .brand-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.15;
}

.sidebar-brand .brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-search {
  position: relative;
  margin: 0.9rem 1.1rem 0;
  display: flex;
  align-items: center;
}

.sidebar-search svg {
  position: absolute;
  left: 0.8rem;
  width: 15px;
  height: 15px;
  color: var(--text-mute);
  pointer-events: none;
}

.sidebar-search input[type="text"] {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 0.5rem 0.7rem 0.5rem 2.3rem;
  font-size: 0.85rem;
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.sidebar-search input[type="text"]::placeholder { color: var(--text-mute); }
.sidebar-search input[type="text"]:focus { border-color: var(--accent); background: var(--panel); outline: none; box-shadow: none; }

.sidebar-nav {
  flex: 1;
  padding: 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.sidebar-nav a:hover { padding-left: 1rem; }

.sidebar-nav a:hover { background: var(--panel-2); color: var(--text); }

.sidebar-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-cta {
  margin: 0.4rem 0.7rem 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--accent);
  color: var(--accent-ink);
}

.sidebar-cta:hover { background: var(--accent-strong); color: var(--accent-ink); }

.sidebar-foot {
  border-top: 1px solid var(--panel-border);
  padding: 1rem 1.4rem;
}

.sidebar-user {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.main-area { flex: 1; min-width: 0; }

.main-area {
  background:
    radial-gradient(900px 420px at 15% -8%, rgba(255,90,31,0.09), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(63,167,156,0.05), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

.main-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.2rem 2rem 4rem;
  animation: fadeInUp 0.35s var(--ease);
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-head h1 { font-family: var(--font-display); margin: 0 0 0.3rem; font-size: 1.9rem; letter-spacing: -0.01em; font-weight: 600; text-wrap: balance; }
.page-head .page-sub { color: var(--text-dim); font-size: 0.92rem; margin: 0; }
.lb-page-tools { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lb-page-tools .btn-ghost { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---------- Stat grid ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-soft);
}

.stat-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  color: var(--text-dim);
}

.stat-icon svg { width: 19px; height: 19px; }

.stat-card-foot { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }

.stat-value { font-family: var(--font-display); font-size: 1.85rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label {
  color: var(--text-dim);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.trend-chip svg { width: 11px; height: 11px; }

.trend-up { background: var(--success-soft); color: var(--success); }
.trend-down { background: var(--danger-soft); color: var(--danger); }

.stat-label .hint { font-size: 0.72rem; }
/* One color signal per accented card, not three: a hairline top bar plus a
   tinted icon glyph. The number itself stays neutral so five stat cards in a
   row read as one family, not five competing colors. */
.stat-accent { position: relative; overflow: hidden; }
.stat-accent .stat-icon { background: var(--panel-2); color: var(--accent); }
.stat-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.stat-accent-2 { position: relative; overflow: hidden; }
.stat-accent-2 .stat-icon { background: var(--panel-2); color: var(--accent-2); }
.stat-accent-2::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent-2-strong));
}

.stat-accent-gold { position: relative; overflow: hidden; }
.stat-accent-gold .stat-icon { background: var(--panel-2); color: var(--gold); }
.stat-accent-gold::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--accent-strong));
}

/* ---------- Cards / sections ---------- */

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.panel-head h2 { font-family: var(--font-body); font-weight: 700; margin: 0; font-size: 1.1rem; letter-spacing: -0.005em; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 780px) {
  /* panels already carry their own bottom margin once stacked */
  .two-col { grid-template-columns: 1fr; gap: 0; }
}

.hint { color: var(--text-mute); font-size: 0.88rem; }

/* ---------- Tables ---------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--panel-border);
  font-size: 0.88rem;
}

.data-table th {
  color: var(--text-mute);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--panel-2);
  border-bottom: 1px solid var(--panel-border);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.data-table thead th:first-child { border-top-left-radius: 10px; }
.data-table thead th:last-child { border-top-right-radius: 10px; }

/* Numeric/currency columns: right-align, tabular figures so digits line up
   in a column instead of ragging left like text. */
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.data-table tbody tr { transition: background 0.15s var(--ease); }
.data-table tbody tr:hover { background: var(--panel-border-soft); }

.search-form {
  display: flex;
  gap: 0.7rem;
}

.search-form input[type="text"] { flex: 1; }

.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr.clickable-row { transition: background 0.15s var(--ease), transform 0.15s var(--ease); }
.data-table tr.clickable-row:hover { background: var(--panel-2); cursor: pointer; }
.data-table td a { font-weight: 600; }

/* ---------- Plans (Tarify) ---------- */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.plan-card {
  transition: border-color 0.2s var(--ease);
}

.plan-card:hover { border-color: var(--accent-soft); }

.plan-card .panel-head { align-items: center; }

.plan-name-input {
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  padding: 0;
  width: auto;
  max-width: 55%;
}

.plan-name-input:focus { outline: none; box-shadow: none; border-bottom: 1px solid var(--accent); }

/* ---------- Warning panel ---------- */

.panel-warning {
  border-color: var(--warning);
  background: linear-gradient(180deg, var(--warning-soft), var(--panel) 60%);
}

/* ---------- Badges ---------- */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--panel-2);
  color: var(--text-dim);
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-active, .status-issued, .status-resolved, .status-paid { background: var(--success-soft); color: var(--success); }
.status-open, .status-in_progress, .status-past_due { background: var(--warning-soft); color: var(--warning); }
.status-paused, .status-cancelled, .status-canceled, .status-void, .status-closed { background: var(--danger-soft); color: var(--danger); }
.status-stubbed, .status-draft { background: var(--panel-2); color: var(--text-mute); }

/* Ours/Petr's own "are we working on this demo" toggle -- 3 small traffic-
   light dots (red = not started, orange = in progress, green = done). Only
   the current one is fully lit; the others sit dim until clicked. */
.status-dot-row { display: inline-flex; gap: 0.4rem; align-items: center; }
.status-dot-form { display: inline-flex; margin: 0; }
.status-dot {
  width: 15px;
  height: 15px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: none;
  opacity: 0.3;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.status-dot:hover { opacity: 0.65; transform: scale(1.12); }
.status-dot.active { opacity: 1; border-color: rgba(255, 255, 255, 0.45); transform: scale(1.08); }
.status-dot-idle { background: var(--danger); }
.status-dot-progress { background: var(--warning); }
.status-dot-done { background: var(--success); }

.type-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-2-soft);
  color: var(--accent-2);
}

/* ---------- Forms ---------- */

form.stack label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

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

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], textarea, select {
  padding: 0.6rem 0.75rem;
  border-radius: 11px;
  border: 1px solid var(--panel-border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

textarea { resize: vertical; min-height: 90px; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[type="file"] {
  font-size: 0.82rem;
  color: var(--text-mute);
  padding: 0;
  border: none;
  background: none;
}

input[type="file"]::file-selector-button {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  margin-right: 0.7rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

input[type="file"]::file-selector-button:hover {
  background: var(--panel-border);
  border-color: var(--accent);
}

.checkbox-row {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
}
.checkbox-row input { width: auto; }

/* ---------- Buttons ---------- */

button, .btn {
  position: relative;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent-strong);
  border-radius: 10px;
  padding: 0.62rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

button:hover, .btn:hover {
  background: var(--accent-strong);
}
button:active, .btn:active { background: var(--accent-strong); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
button:disabled, .btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-ghost {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--panel-border);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--panel-border-soft); color: var(--text); border-color: var(--panel-border); filter: none; box-shadow: none; }

.btn-danger { background: var(--danger); color: #fff; border-color: #d63f38; }
.btn-danger:hover { background: #d63f38; }

/* Ghost-danger: for destructive actions that shouldn't out-shout the primary
   actions next to them -- recedes until hovered, then commits to red. */
.btn-danger-ghost { background: var(--panel-2); color: var(--danger); border: 1px solid var(--panel-border); box-shadow: none; }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); filter: none; box-shadow: none; transform: none; }

.btn-sm { padding: 0.44rem 0.85rem; font-size: 0.78rem; border-radius: 12px; }

/* A literal "+" glyph in a button label sits on the wrong baseline and reads
   as placeholder text. This is the real icon used for every "create new X"
   action instead. */
.btn-icon { width: 14px; height: 14px; flex-shrink: 0; }
.btn-sm .btn-icon { width: 12px; height: 12px; }

.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

.link-btn {
  background: none;
  border: none;
  box-shadow: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 600;
}
.link-btn:hover { color: var(--accent-strong); background: none; transform: none; box-shadow: none; filter: none; }

/* ---------- Auth page v2 (split panel, unified login) ---------- */

.auth-page-v2 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}

.auth-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: 100%;
  max-width: 880px;
  min-height: 520px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.auth-brand-panel {
  position: relative;
  background: linear-gradient(165deg, #0c0a12 0%, #14111c 45%, var(--bg) 100%);
  padding: 2.6rem 2.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.auth-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(440px 280px at 15% 15%, rgba(255,90,31,0.22), transparent 60%),
    radial-gradient(340px 240px at 85% 75%, rgba(63,167,156,0.16), transparent 60%);
  pointer-events: none;
}

.auth-brand-content { position: relative; z-index: 1; }

.auth-brand-content h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.9rem;
  color: var(--text);
}

.auth-tagline {
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  max-width: 260px;
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  color: var(--text-mute);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-form-panel {
  padding: 3rem 2.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-panel h1 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin: 0 0 0.4rem; }

.auth-form-panel form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
}

.auth-form-panel button { width: 100%; margin-top: 0.4rem; }

/* registration / verification / password reset (routes/account.js) */
.auth-sub { margin: 0 0 1.4rem; }
.auth-text { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; margin: 0.2rem 0 1.1rem; }
.auth-text strong { color: var(--text); }
.auth-switch { text-align: center; margin-top: 1.3rem; color: var(--text-mute); font-size: 0.9rem; }
.auth-switch a, .auth-inline-link a { color: var(--accent-bright); font-weight: 600; }
.auth-inline-link { margin: -0.5rem 0 1rem; text-align: right; font-size: 0.85rem; }
.auth-legal { color: var(--text-mute); font-size: 0.78rem; line-height: 1.5; margin: 0.9rem 0 0; text-align: center; }
form label.auth-consent { display: flex; flex-direction: row; align-items: flex-start; gap: 0.7rem; margin: 0.3rem 0 1.1rem; font-size: 0.87rem; font-weight: 500; line-height: 1.5; color: var(--text-dim); cursor: pointer; text-transform: none; letter-spacing: 0; }
form label.auth-consent input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; min-height: 0; margin: 0.1rem 0 0; padding: 0; accent-color: var(--accent); cursor: pointer; box-shadow: none; }
form label.auth-consent a { color: var(--accent-bright); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.auth-steps { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 0.5rem; }
.auth-steps li { position: relative; padding-left: 1.2rem; color: var(--text-dim); font-size: 0.88rem; line-height: 1.5; }
.auth-steps li::before { content: ""; position: absolute; left: 0.2rem; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.auth-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-bright); margin-bottom: 1.1rem; }
.auth-icon svg { width: 26px; height: 26px; }
.auth-icon.is-error { background: var(--danger-soft); color: var(--danger); }
.auth-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.auth-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
.label-opt { font-weight: 500; color: var(--text-mute); font-size: 0.78rem; }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pw-field { position: relative; display: block; }
.pw-field input { width: 100%; padding-right: 5.2rem; }
.auth-form-panel .pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: auto; margin: 0; padding: 0.3rem 0.65rem; font-size: 0.75rem; font-weight: 600;
  background: transparent; color: var(--text-dim); border: 1px solid var(--panel-border); border-radius: 8px; box-shadow: none;
}
.auth-form-panel .pw-toggle:hover { background: var(--panel-2); color: var(--text); filter: none; }
.pw-meter { display: block; height: 4px; border-radius: 4px; background: var(--panel-border-soft); overflow: hidden; margin-top: 0.15rem; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--danger); transition: width .35s var(--ease), background .35s; }
.pw-meter[data-level="1"] i { width: 20%; background: var(--danger); }
.pw-meter[data-level="2"] i { width: 50%; background: var(--warning); }
.pw-meter[data-level="3"] i { width: 75%; background: var(--success); }
.pw-meter[data-level="4"] i { width: 100%; background: var(--success); }
.pw-hint { font-weight: 500; font-size: 0.78rem; color: var(--text-mute); }
.pw-hint.is-ok { color: var(--success); }
.pw-hint.is-bad { color: var(--warning); }

/* portal: welcome card for a freshly registered account with no website yet */
.onboard-card { background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--panel); border: 1px solid var(--panel-border); border-radius: 16px; padding: 1.6rem 1.7rem; margin-bottom: 1.5rem; }
.onboard-card h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 0.5rem; }
.onboard-card p { color: var(--text-dim); margin: 0 0 1.1rem; max-width: 60ch; line-height: 1.6; }

/* Phone: the brand side becomes a short starfield header above the form
   instead of disappearing, so login/registration still feel like Klaudio. */
@media (max-width: 760px) {
  .auth-page-v2 { min-height: 100dvh; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
  .auth-split { grid-template-columns: 1fr; max-width: 460px; min-height: 0; border-radius: 20px; }
  .auth-brand-panel { flex-direction: row; align-items: center; min-height: 118px; padding: 1.3rem 1.4rem; }
  .auth-brand-content { display: grid; grid-template-columns: auto 1fr; column-gap: 0.9rem; align-items: center; }
  .auth-brand-content .brand-mark-icon.large { width: 46px; height: 46px; margin: 0; grid-row: span 2; }
  .auth-brand-content h2 { font-size: 1.2rem; margin: 0 0 0.15rem; }
  .auth-tagline { font-size: 0.86rem; line-height: 1.35; margin: 0; max-width: none; }
  .auth-brand-foot { display: none; }
  .auth-form-panel { padding: 1.6rem 1.35rem 1.8rem; }
  .auth-form-panel h1 { font-size: 1.3rem; }
  .auth-form-panel form label { margin-bottom: 1rem; }
  .auth-form-panel button[type="submit"] { min-height: 48px; justify-content: center; font-size: 0.95rem; }
  .auth-actions .btn { min-height: 46px; }
}

/* ---------- Pricing cards (Tarify) ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 1.4rem;
  margin-bottom: 1.75rem;
}

/* Admin gets a roomier version of the same grid/cards -- there's no need
   to fit this next to a sidebar-cramped customer viewport, and the bigger
   type is easier to scan while managing tarifs. */
.pricing-grid-admin { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.7rem; }
.pricing-grid-admin .pricing-card { padding: 2.3rem 2rem 1.9rem; }
.pricing-grid-admin .pricing-amount { font-size: 3.1rem; }
.pricing-grid-admin .pricing-amount-text { font-size: 1.75rem; }
.pricing-grid-admin .pricing-name { font-size: 1.15rem; }
.pricing-grid-admin .pricing-features { font-size: 0.95rem; }

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 2rem 1.7rem 1.6rem;
  box-shadow: var(--shadow-soft);
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-strong), var(--shadow);
}

.pricing-card.inactive { opacity: 0.55; }

.pricing-ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--accent-ink);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.32rem 0.95rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  margin-bottom: 0.7rem;
}

/* min-height keeps this row the same height on every card regardless of
   whether it holds a big number+currency+period or just the shorter
   "Individuální" text, so everything below it (badge, features, button)
   lines up at the same y-position across the whole row. */
.pricing-price { display: flex; align-items: flex-end; gap: 0.3rem; margin-bottom: 0.4rem; min-height: 3.3rem; }
.pricing-amount { font-family: var(--font-display); font-size: 2.7rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pricing-amount-text { font-size: 1.55rem; font-weight: 700; letter-spacing: normal; color: var(--text); }
.pricing-currency { font-size: 1.15rem; font-weight: 700; color: var(--text-dim); }
.pricing-period { font-size: 0.82rem; color: var(--text-mute); }

/* ---------- Pricing feature info tooltips ----------
   A floating popover (not an inline accordion) on purpose -- it overlays
   the card instead of pushing its own height, so opening one never shifts
   neighbouring cards or the button below it out of alignment. */
.info-tip { position: relative; flex: none; margin-left: auto; }
.feature-info-btn {
  width: 18px; height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: none;
  color: var(--text-mute);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.feature-info-btn svg { width: 12px; height: 12px; }
.feature-info-btn:hover, .info-tip.open .feature-info-btn { border-color: var(--accent); color: var(--accent); }
.info-tip-bubble {
  position: absolute;
  z-index: 45;
  top: calc(100% + 8px);
  right: -8px;
  width: 240px;
  background: rgba(36, 32, 48, 0.7);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0.8rem 0.95rem;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}
/* Hover is the primary way to open it (no click needed); the .open class
   (toggled in JS) is the fallback for touch devices, where :hover doesn't
   really exist. */
.info-tip:hover .info-tip-bubble,
.info-tip:focus-within .info-tip-bubble,
.info-tip.open .info-tip-bubble {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1);
}
@media (max-width: 400px) { .info-tip-bubble { width: 200px; right: -40px; } }

/* ---------- Portal analytics: KPI tile compare text ---------- */
.stat-compare { color: var(--text-mute); font-weight: 400; }

/* ---------- Portal analytics bar chart (pure CSS, no chart library) ---------- */
.chart-bars {
  display: flex; align-items: flex-end; gap: 0.6rem; height: 180px;
  padding: 1rem 0.5rem 0; margin-top: 0.25rem;
  border-bottom: 1px solid var(--panel-border);
}
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 0.6rem; min-width: 0; }
.chart-bar {
  width: 100%; max-width: 26px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-radius: 5px 5px 0 0; min-height: 3px;
  transition: height 0.4s var(--ease), opacity 0.2s var(--ease);
}
.chart-bar-col:hover .chart-bar { opacity: 0.8; }
.chart-bar-label { font-size: 0.68rem; color: var(--text-mute); white-space: nowrap; }

/* ---------- Portal analytics: top pages (bar-in-row) ---------- */
.toppages-list { display: flex; flex-direction: column; gap: 0.5rem; }
.toppages-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--panel-2);
  overflow: hidden;
}
.toppages-bar {
  position: absolute; inset: 0; right: auto;
  background: var(--accent-soft);
  border-radius: 10px;
  transition: width 0.5s var(--ease);
}
.toppages-path { position: relative; z-index: 1; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.toppages-views { position: relative; z-index: 1; font-size: 0.88rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ---------- Custom-quote request dialog textarea ----------
   The "Individuální" pricing card is otherwise identical to the other
   three (see premium-ui.js customQuoteDialog) -- this just sizes the
   textarea inside that popup dialog. */
.cq-textarea { width: 100%; font-size: 0.9rem; resize: vertical; min-height: 5rem; margin: 0.75rem 0 1.25rem; }

/* The 4th card (custom quote) keeps the exact same layout as the other
   three -- just a soft, translucent warm-gradient fill and a gold-tinted
   border instead of the flat solid panel, so it quietly reads as "extra
   premium" without any attention-grabbing animation. */
.pricing-card.custom-quote {
  background: linear-gradient(165deg, rgba(240, 184, 78, 0.09), rgba(255, 90, 31, 0.05) 55%, transparent);
  border-color: rgba(240, 184, 78, 0.4);
}

.pricing-limit {
  display: inline-block;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  margin: 0 0 1.3rem;
}

.pricing-includes {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.pricing-check { flex-shrink: 0; width: 17px; height: 17px; color: var(--success); margin-top: 0.15rem; }

.pricing-edit { margin-top: auto; border-top: 1px solid var(--panel-border); padding-top: 1rem; }

.pricing-edit summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-mute);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.pricing-edit summary::-webkit-details-marker { display: none; }
.pricing-edit summary:hover { color: var(--accent); }

.pricing-edit summary::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
}

.pricing-edit[open] summary::after { transform: rotate(-135deg); }
.pricing-edit form { margin-top: 1rem; }

/* ---------- Backup codes ---------- */

.backup-codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.backup-code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: var(--bg-soft);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  text-align: center;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.success {
  color: var(--success);
  background: var(--success-soft);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.credential-reveal {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.credential-reveal .cred-label { font-size: 0.78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.credential-reveal .cred-value { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 1.05rem; font-weight: 700; color: var(--text); }

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-mute);
  font-size: 0.9rem;
}


.qr-frame {
  display: inline-block;
  max-width: 220px;
  width: 100%;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

/* ---------- Big CTA (portal) ---------- */

.cta-big {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.3rem 1.6rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}

.cta-big:hover {
  color: var(--text);
  border-color: var(--accent);
}

.cta-big-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--text); }
.cta-big-sub { font-size: 0.85rem; font-weight: 600; letter-spacing: 0; color: var(--accent); }

/* ---------- Ticket progress stepper ---------- */

.ticket-progress {
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 84px;
}

.progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid var(--panel-border);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.progress-step.done .progress-dot {
  background: var(--accent);
  border-color: var(--accent);
}

.progress-step.current .progress-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-mute);
}

.progress-step.done .progress-label,
.progress-step.current .progress-label {
  color: var(--text);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--panel-border);
  margin: 0 -4px;
  margin-bottom: 1.6rem;
  transition: background 0.3s var(--ease);
}

.progress-line.done { background: var(--accent); }

/* ---------- Ticket card (single cohesive panel, replaces stacked panels) ---------- */

.ticket-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.ticket-card-section {
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--panel-border);
}

.ticket-card-section:last-child { border-bottom: none; }

.ticket-card-section.tight { padding-top: 1rem; padding-bottom: 1rem; }

.ticket-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.ticket-description { color: var(--text-dim); line-height: 1.55; margin: 0; }

.ticket-card-chat { background: var(--bg-soft); }

/* ---------- Chat thread ---------- */

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.chat-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-end;
  animation: fadeInUp 0.25s var(--ease);
}

.chat-row.mine { flex-direction: row-reverse; }

.chat-avatar {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.avatar-admin { background: var(--accent); color: var(--accent-ink); }
.avatar-customer { background: var(--panel-border); color: var(--text); }

.chat-bubble {
  max-width: 70%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

.chat-bubble.mine {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-bottom-right-radius: 3px;
}

.chat-bubble.theirs { border-bottom-left-radius: 3px; }

.chat-bubble.internal {
  background: var(--warning-soft);
  border-color: var(--warning);
}

.chat-meta {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

.chat-bubble.mine .chat-meta { color: var(--accent-ink); }

.chat-text { font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; }

.chat-photos {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.chat-photo {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  transition: transform 0.15s var(--ease);
}

.chat-photo:hover { transform: scale(1.04); }

/* ---------- Composer ---------- */

.chat-composer { margin-top: 1.1rem; }

.composer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-mute);
  margin-bottom: 0.7rem;
  cursor: pointer;
  user-select: none;
}
.composer-toggle input { width: auto; margin: 0; accent-color: var(--warning); }
.composer-toggle:hover { color: var(--text-dim); }

.composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 0.4rem 0.5rem 0.4rem 0.5rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.composer-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.composer-attach,
.composer-send {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.composer-attach {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-mute);
  box-shadow: none;
}
.composer-attach:hover { background: var(--panel-border-soft); color: var(--text); filter: none; transform: none; box-shadow: none; }
.composer-attach svg { width: 18px; height: 18px; }

.composer-send svg { width: 17px; height: 17px; }

.composer-input {
  flex: 1;
  resize: none;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.5rem 0.2rem !important;
  min-height: 24px;
  max-height: 140px;
  line-height: 1.4;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text);
}

.composer-input:focus { outline: none; }

.photo-picker { margin-bottom: 1rem; }

.photo-picker-previews {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.1rem 0.1rem 0.7rem;
}

.photo-picker-previews[hidden] { display: none; }

.photo-chip {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: visible;
  animation: fadeInUp 0.2s var(--ease);
}

.photo-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  display: block;
}

.photo-chip-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--bg-soft);
  font-size: 11px;
  line-height: 1;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}
.photo-chip-remove:hover { filter: brightness(1.1); transform: none; }

@media (max-width: 600px) {
  .chat-bubble { max-width: 85%; }
}

/* ---------- Activity feed ---------- */

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-feed li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--panel-border);
  font-size: 0.88rem;
}

.activity-feed li:last-child { border-bottom: none; }

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
/* Semantic by action type, not uniformly brand-orange -- so the feed itself
   carries information (what kind of thing happened) at a glance. */
.activity-dot-success { background: var(--success); }
.activity-dot-danger { background: var(--danger); }
.activity-dot-warning { background: var(--warning); }
.activity-dot-accent-2 { background: var(--accent-2); }
.activity-dot-neutral { background: var(--text-mute); }

.activity-time { margin-left: auto; white-space: nowrap; font-size: 0.78rem; }

/* ---------- Empty states ---------- */

.empty-state-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 0.9rem;
  color: var(--text-mute);
  opacity: 0.6;
}

.empty-state h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dim);
  margin: 0 0 0.35rem;
}

.empty-state p { margin: 0 0 1.1rem; }
.empty-state .btn, .empty-state .btn-ghost { margin-top: 0.2rem; }

/* ---------- Confirm modal (replaces native confirm()) ---------- */

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 6, 10, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.confirm-overlay.open { opacity: 1; }

.confirm-dialog {
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1.7rem;
  max-width: 380px;
  width: 100%;
  transform: translateY(10px) scale(0.97);
  transition: transform 0.22s var(--ease);
}

.confirm-overlay.open .confirm-dialog { transform: translateY(0) scale(1); }
.confirm-dialog p { margin: 0 0 1.2rem; color: var(--text); font-size: 0.95rem; line-height: 1.5; }
.confirm-dialog .btn-row { justify-content: flex-end; }
.confirm-skip {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0 0 1.4rem; font-size: 0.86rem; color: var(--text-dim); cursor: pointer;
}
.confirm-skip input { margin: 0; }

/* ---------- Toast ---------- */

.toast-stack {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  max-width: min(340px, calc(100vw - 2rem));
}

.toast {
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.86rem;
  color: var(--text);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toastIn 0.3s var(--ease) both;
}

.toast.toast-out { animation: toastOut 0.22s var(--ease) both; }
.toast-error { border-color: rgba(255,92,86,0.4); }
.toast-success { border-color: rgba(62,207,130,0.4); }
.toast::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text-mute); flex-shrink: 0; }
.toast-error::before { background: var(--danger); }
.toast-success::before { background: var(--success); }

@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ---------- Button loading state (submit feedback, prevents double-submit) ---------- */

button.is-loading, .btn.is-loading { pointer-events: none; opacity: 0.72; }
button.is-loading::after, .btn.is-loading::after {
  content: '';
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: btnSpin 0.6s linear infinite;
  flex-shrink: 0;
}

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

/* ---------- Impersonation banner (admin previewing the client portal) ---------- */

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem 2rem;
  background: var(--warning-soft);
  border-bottom: 1px solid var(--warning);
  font-size: 0.85rem;
  color: var(--text);
}
.impersonation-banner form { margin: 0; }

/* ---------- Public booking page shell (the widget itself ships its own CSS
   in reservation-widget.css, kept independent so it can be embedded on any
   customer site regardless of this app's theme) ---------- */

.booking-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--bg);
}

.booking-shell {
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.booking-shell h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.booking-shell .page-sub { margin: 0 0 1.5rem; }
.booking-shell .kw-widget { text-align: left; margin: 0 auto; }

/* ---------- Reservations (portal + admin) ---------- */

.reservation-row-pending { box-shadow: inset 3px 0 0 var(--warning); }

/* Toggle switch -- friendlier than a bare checkbox for on/off settings a
   non-technical restaurant owner has to configure themselves. */
.switch { position: relative; display: inline-flex; width: 44px; height: 26px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-track {
  position: absolute;
  inset: 0;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.switch-track::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.switch input:checked + .switch-track { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked + .switch-track::before { transform: translate(18px, -50%); background: var(--accent); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.switch-sm { width: 36px; height: 21px; }
.switch-sm .switch-track::before { width: 15px; height: 15px; }
.switch-sm input:checked + .switch-track::before { transform: translate(15px, -50%); }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--panel-border-soft);
}
.switch-row:last-of-type { border-bottom: none; }
.switch-row-text { display: flex; flex-direction: column; gap: 0.15rem; }
.switch-row-title { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.switch-row-desc { font-size: 0.8rem; color: var(--text-mute); }

.day-hours-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--panel-border-soft);
}
.day-hours-row:last-child { border-bottom: none; }
.day-hours-row .day-name { width: 90px; flex-shrink: 0; font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
.day-hours-row input[type="time"] { width: 110px; }
.day-hours-row input[type="time"]:disabled { opacity: 0.4; }
.day-hours-row .day-status { margin-left: auto; width: 70px; text-align: right; }

.date-chip-list { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 1.7rem; align-items: center; }
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.5rem 0.3rem 0.75rem;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-dim);
}
.date-chip button {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--text-mute);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.date-chip button:hover { background: var(--danger-soft); color: var(--danger); transform: none; filter: none; }

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.68rem;
  font-weight: 800;
  margin-left: auto;
}

/* ---------- Demo preview (toggle between device sizes, animated) ---------- */

.preview-toggle {
  display: inline-flex;
  background: var(--panel-2);
  border-radius: 999px;
  padding: 0.22rem;
  gap: 0.15rem;
}
.preview-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.preview-toggle-btn:hover { background: var(--panel-border-soft); color: var(--text); transform: none; filter: none; }
.preview-toggle-btn.active { background: var(--accent); color: var(--accent-ink); }
.preview-toggle-btn.active:hover { background: var(--accent); color: var(--accent-ink); }

.preview-stage {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0 0.5rem;
}

.preview-viewport-wrap {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: var(--shadow-soft);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.45s ease, border-width 0.45s ease, border-color 0.45s ease;
}
.preview-viewport-wrap.mode-desktop {
  width: min(100%, 1040px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}
.preview-viewport-wrap.mode-mobile {
  width: min(100%, 640px);
  border: 10px solid #17141c;
  border-radius: 36px;
}

.preview-iframe {
  border: 0;
  display: block;
  transform-origin: top left;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lista mobilniho prohlizece (jako Chrome na telefonu) — vidi jen v
   rezimu Mobil, aby nahled pusobil jako skutecny telefon s prohlizecem
   a adresnim radkem, ne jen holy oramovany ramecek. */
.preview-browser-bar {
  display: none;
  align-items: center;
  gap: 0.6rem;
  height: 40px;
  padding: 0 0.7rem;
  background: #f1f3f4;
  border-bottom: 1px solid #e0e2e4;
}
.preview-viewport-wrap.mode-mobile .preview-browser-bar { display: flex; }
.preview-browser-dots { display: flex; gap: 0.3rem; flex-shrink: 0; }
.preview-browser-dots span { width: 6px; height: 6px; border-radius: 50%; background: #c4c7c9; }
.preview-browser-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 26px;
  padding: 0 0.7rem;
  background: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  color: #4c5257;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.preview-browser-lock { width: 12px; height: 12px; flex-shrink: 0; color: #1e8e3e; }
#preview-browser-url-text { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 700px) {
  .preview-viewport-wrap.mode-desktop { width: 100%; }
  .preview-viewport-wrap.mode-mobile { width: min(100%, 400px); }
}

/* ---------- Demo notes (ukazky) ---------- */
.note-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid var(--panel-border-soft);
}
.note-row:last-child { border-bottom: none; }
.note-row.note-done .note-text { text-decoration: line-through; color: var(--text-mute); }
.note-check {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  color: var(--accent-bright);
  box-shadow: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.note-row.note-done .note-check { background: var(--accent-soft); border-color: var(--accent); }
.note-body { flex: 1; min-width: 0; }
.note-text { white-space: pre-wrap; word-break: break-word; }
.note-meta { color: var(--text-mute); font-size: 0.78rem; margin-top: 0.2rem; }
.note-composer {
  display: flex;
  gap: 0.6rem;
  align-items: flex-end;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--panel-border-soft);
}
.note-composer textarea { flex: 1; resize: vertical; }

/* ---------- Onboarding guide (short animated walkthrough, "liquid glass") ---------- */

.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(6, 5, 9, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(.16,1,.3,1);
}
.guide-overlay.open { opacity: 1; }

.guide-dialog {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Deliberately thin/dark, not a near-opaque card -- backdrop-filter does
     the actual "frosted glass" work, this just tints it. */
  background: rgba(22, 17, 26, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  padding: 2.6rem 2.2rem 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(42px) saturate(200%);
  -webkit-backdrop-filter: blur(42px) saturate(200%);
  box-shadow:
    0 50px 120px -24px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  transform: translateY(32px) scale(0.9);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(.16,1,.3,1), opacity 0.5s cubic-bezier(.16,1,.3,1);
}
.guide-overlay.open .guide-dialog { transform: translateY(0) scale(1); opacity: 1; }

/* The "liquid" in liquid glass: two soft color blobs slowly drifting behind
   the frosted panel. Both are plain children in normal flow (no z-index
   tricks that could push them behind the dialog's own background), and the
   real content is a sibling wrapper raised above them with z-index -- that
   ordering is what actually keeps them visible *and* behind the text. */
.guide-dialog::before,
.guide-dialog::after {
  content: '';
  position: absolute;
  width: 65%;
  height: 65%;
  border-radius: 50%;
  filter: blur(36px);
  pointer-events: none;
}
.guide-dialog::before {
  top: -30%;
  left: -18%;
  background: radial-gradient(circle, rgba(240, 184, 78, 0.5), transparent 70%);
  animation: guideDrift1 8s ease-in-out infinite alternate;
}
.guide-dialog::after {
  bottom: -32%;
  right: -18%;
  background: radial-gradient(circle, rgba(63, 167, 156, 0.4), transparent 70%);
  animation: guideDrift2 11s ease-in-out infinite alternate;
}
@keyframes guideDrift1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(20%, 16%) scale(1.3); }
}
@keyframes guideDrift2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-16%, -14%) scale(1.25); }
}

/* Everything real sits in this wrapper, raised above the two blobs. */
.guide-content { position: relative; z-index: 1; }

.guide-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-mute);
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.guide-close:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }

/* ---- Visual area: either a circular icon chip, or a richer mockup like
   the browser-address-bar visual (see guide-browser below) -- whichever a
   given step provides via its `visual` HTML fills .guide-visual. ---- */

.guide-visual { margin: 0 auto 1.5rem; }

.guide-icon-chip {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 28%, rgba(240, 184, 78, 0.3), rgba(255, 255, 255, 0.04) 72%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 16px 36px -14px rgba(0, 0, 0, 0.6);
}

/* Featured/premium moment -- gold, same accent already reserved for that
   elsewhere in the theme -- with the icon line-drawing itself in via
   stroke-dasharray/offset each time a step renders (.guide-icon.anim is
   toggled off and back on in JS to replay it per step). */
.guide-icon { width: 46px; height: 46px; color: var(--gold); filter: drop-shadow(0 0 10px rgba(240, 184, 78, 0.5)); }
.guide-icon svg { width: 100%; height: 100%; overflow: visible; }
.guide-icon .guide-draw { stroke-dasharray: 60; stroke-dashoffset: 60; }
.guide-icon.anim .guide-draw { animation: guideDraw 0.9s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes guideDraw { to { stroke-dashoffset: 0; } }

/* Concrete "here's what a domain actually is" mockup -- a tiny browser
   chrome with the domain sitting in the address bar, exactly where a
   customer would actually see it day to day. */
.guide-browser {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 20px 44px -20px rgba(0, 0, 0, 0.55);
}
.guide-browser-top {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.gb-dot { width: 8px; height: 8px; border-radius: 50%; opacity: 0.9; }
.guide-browser-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; }
.gb-lock { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }
.gb-domain { position: relative; color: var(--text); font-weight: 600; font-size: 0.86rem; }
.gb-domain::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
}
.guide-dialog.step-in .gb-domain::after { animation: gbUnderline 0.7s cubic-bezier(.16,1,.3,1) 0.5s forwards; }
@keyframes gbUnderline { to { transform: scaleX(1); } }

.guide-dots { display: flex; justify-content: center; gap: 0.45rem; margin-bottom: 1.2rem; }
.guide-dot { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); transition: background 0.3s var(--ease), width 0.3s var(--ease); }
.guide-dot.active { background: var(--gold); width: 18px; }

.guide-title { font-family: var(--font-body); font-size: 1.3rem; font-weight: 700; margin: 0 0 0.65rem; color: var(--text); letter-spacing: -0.01em; }
.guide-body { font-size: 0.95rem; color: var(--text-dim); line-height: 1.6; margin: 0 0 1.8rem; }

.guide-actions { display: flex; align-items: center; gap: 0.8rem; }
.guide-actions .guide-next { flex: 1; }
.guide-actions .guide-next {
  background: linear-gradient(165deg, var(--gold), var(--accent-strong));
  color: #241505;
  font-weight: 700;
  box-shadow: 0 14px 30px -12px rgba(240, 184, 78, 0.55);
}
.guide-actions .guide-next:hover { filter: brightness(1.06); }
.guide-actions .guide-next:active { transform: scale(0.97); }

/* Each step's elements fade/lift in with a small stagger instead of
   appearing all at once -- JS toggles .step-in off and back on (forcing a
   reflow in between) on every render() call so this replays per step. */
.guide-dots, .guide-visual, .guide-title, .guide-body, .guide-actions {
  opacity: 0;
  transform: translateY(14px);
}
.guide-dialog.step-in .guide-dots { animation: guideItemIn 0.6s cubic-bezier(.16,1,.3,1) 0s forwards; }
.guide-dialog.step-in .guide-visual { animation: guideItemIn 0.65s cubic-bezier(.16,1,.3,1) 0.07s forwards; }
.guide-dialog.step-in .guide-title { animation: guideItemIn 0.6s cubic-bezier(.16,1,.3,1) 0.16s forwards; }
.guide-dialog.step-in .guide-body { animation: guideItemIn 0.6s cubic-bezier(.16,1,.3,1) 0.24s forwards; }
.guide-dialog.step-in .guide-actions { animation: guideItemIn 0.6s cubic-bezier(.16,1,.3,1) 0.32s forwards; }
@keyframes guideItemIn { to { opacity: 1; transform: translateY(0); } }

.guide-dialog.step-out .guide-dots,
.guide-dialog.step-out .guide-visual,
.guide-dialog.step-out .guide-title,
.guide-dialog.step-out .guide-body,
.guide-dialog.step-out .guide-actions {
  transition: opacity 0.18s ease, transform 0.18s ease;
  opacity: 0;
  transform: translateY(-10px);
}

/* ---------- Secure card (credential handover -- domain transfer, etc.) ---------- */

.secure-card {
  position: relative;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.3rem 1.4rem 1.4rem;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 12px 30px -20px rgba(0, 0, 0, 0.7);
}
.secure-card-head { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 1.15rem; }
.secure-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(240, 184, 78, 0.35);
}
.secure-icon svg { width: 21px; height: 21px; }
.secure-card-title { display: block; font-weight: 700; font-size: 0.92rem; color: var(--text); margin-bottom: 0.3rem; }
.secure-card-desc { display: block; font-size: 0.8rem; color: var(--text-mute); line-height: 1.55; }
.secure-card label { margin-bottom: 0.85rem !important; }
.secure-card label:last-child { margin-bottom: 0 !important; }

/* ---------- Choice cards (branching yes/no questions, e.g. domain setup) ---------- */

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 1.1rem; }
@media (max-width: 600px) { .choice-row { grid-template-columns: 1fr; } }

.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--panel-border);
  border-radius: 14px;
  background: var(--bg-soft);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.choice-card input { position: absolute; opacity: 0; }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.choice-card-title { font-weight: 700; font-size: 0.92rem; color: var(--text); }

/* ---------- Order (payment method) choice overlay ---------- */
.order-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(8, 6, 10, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.order-overlay.open { opacity: 1; }

.order-dialog {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.9rem;
  max-width: 440px;
  width: 100%;
  transform: translateY(10px) scale(0.97);
  transition: transform 0.22s var(--ease);
}
.order-overlay.open .order-dialog { transform: translateY(0) scale(1); }

.order-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.order-close:hover { color: var(--text); background: var(--panel-border-soft); }

.order-title { font-family: var(--font-body); font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 0 0 0.2rem; padding-right: 2rem; }
.order-sub { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 1.3rem; }

.order-options { display: flex; flex-direction: column; gap: 0.7rem; }

.order-option {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1.5px solid var(--panel-border);
  border-radius: 14px;
  background: var(--bg-soft);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit;
  opacity: 0;
  transform: translateY(12px);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.order-overlay.open .order-option { animation: guideItemIn 0.5s cubic-bezier(.16,1,.3,1) forwards; }
.order-overlay.open .order-option:nth-of-type(1) { animation-delay: 0.05s; }
.order-overlay.open .order-option:nth-of-type(2) { animation-delay: 0.13s; }

.order-option:hover, .order-option:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  outline: none;
}

.order-option-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-border-soft);
  color: var(--text-dim);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.order-option:hover .order-option-icon { background: var(--accent-soft); color: var(--accent); }
.order-option-icon svg { width: 22px; height: 22px; }

.order-option-body { display: flex; flex-direction: column; gap: 0.15rem; }
.order-option-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.order-option-desc { font-size: 0.8rem; color: var(--text-dim); line-height: 1.45; }

/* ---------- Invoice list filter + bulk download ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.filter-form { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.js-bulk-download-btn { transition: opacity 0.2s var(--ease); }
.js-bulk-download-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Premium custom select (replaces native <select> in filters) ---------- */
.pselect { position: relative; display: inline-block; }

.pselect-trigger {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.9rem;
  background: var(--panel-2);
  border: 1.5px solid var(--panel-border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.pselect-trigger:hover { border-color: var(--accent); }
.pselect.open .pselect-trigger { border-color: var(--accent); background: var(--accent-soft); }

.pselect-chevron { width: 15px; height: 15px; color: var(--text-dim); transition: transform 0.22s var(--ease); flex: none; }
.pselect.open .pselect-chevron { transform: rotate(180deg); color: var(--accent); }

.pselect-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 170px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.4rem;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform-origin: top left;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}
.pselect.open .pselect-menu { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.pselect-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.7rem;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.pselect-option:hover, .pselect-option:focus-visible { background: var(--panel-border-soft); outline: none; }
.pselect-option.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.choice-card-desc { font-size: 0.8rem; color: var(--text-mute); line-height: 1.45; }

/* ---------- Demo list (/admin/ukazky) ---------- */
/* One wide bar per demo: header, then "Důležité zprávy" + "Opravit" | "Info". */
.lb-search { width: 260px; max-width: 100%; }

.lb { display: flex; flex-direction: column; gap: 1.1rem; }

.lb-bar {
  --lb-color: var(--danger);
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 36px -28px rgba(0, 0, 0, 0.75);
  transition: border-color 0.2s var(--ease);
}
.lb-bar::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--lb-color);
}
.lb-bar.lb-in_progress { --lb-color: var(--warning); }
.lb-bar.lb-done { --lb-color: var(--success); }
.lb-bar:hover { border-color: #3d3648; }

/* Header */
.lb-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1rem 1.4rem 1rem 1.75rem;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(90deg, color-mix(in srgb, var(--lb-color) 7%, transparent), transparent 55%);
}
.lb-title-wrap { display: flex; align-items: baseline; gap: 1.1rem; flex-wrap: wrap; min-width: 0; }
.lb-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text) !important; }
.lb-title:hover { color: var(--accent-bright) !important; }
.lb-links { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; color: var(--text-mute); }
.lb-links a { font-weight: 600; color: var(--text-dim) !important; }
.lb-links a:hover { color: var(--text) !important; text-decoration: underline; text-underline-offset: 3px; }
.lb-links form { display: inline; margin: 0; }
.lb-head-right { display: flex; align-items: center; gap: 0.9rem; }
.lb-meta { font-size: 0.82rem; color: var(--text-mute); white-space: nowrap; }

select.lb-status {
  appearance: none; -webkit-appearance: none;
  width: auto; min-width: 0; height: 34px;
  padding: 0 2.1rem 0 1rem;
  border-radius: 999px;
  font-size: 0.84rem; font-weight: 700; cursor: pointer;
  color: var(--lb-color);
  background-color: color-mix(in srgb, var(--lb-color) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--lb-color) 45%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3abc0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 12px;
}
select.lb-status:focus { box-shadow: none; outline: 2px solid var(--accent-bright); outline-offset: 2px; }
select.lb-status option { background: var(--panel); color: var(--text); }

/* Body: two columns */
.lb-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); }
.lb-main { padding: 1.1rem 1.4rem 1.25rem 1.75rem; display: flex; flex-direction: column; gap: 1.2rem; }
.lb-info { padding: 1.1rem 1.4rem 1.25rem; border-left: 1px solid var(--panel-border); background: rgba(0, 0, 0, 0.12); }

.lb-label {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 0 0 0.6rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-mute);
}
.lb-label-count {
  font-size: 0.72rem; letter-spacing: 0; color: var(--accent-bright);
  background: var(--accent-soft); border-radius: 999px; padding: 0.05rem 0.5rem;
}
.lb-muted { color: var(--text-mute); font-size: 0.88rem; margin: 0; }

/* Důležité zprávy */
textarea.lb-msg {
  width: 100%; min-height: 46px; height: 46px; resize: vertical;
  font-size: 0.93rem; line-height: 1.5;
  background: var(--bg-soft);
  border-radius: 10px;
}
textarea.lb-msg:not(:placeholder-shown) {
  border-color: color-mix(in srgb, var(--gold) 45%, var(--panel-border));
  background: color-mix(in srgb, var(--gold) 6%, var(--bg-soft));
}
.lb-msg-meta { margin-top: 0.3rem; font-size: 0.76rem; color: var(--text-mute); }
.lb-msg-meta:empty { display: none; }

/* Opravit */
.lb-notes { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-direction: column; }
.lb-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto 24px;
  column-gap: 0.75rem;
  align-items: start;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--panel-border-soft);
  transition: opacity 0.3s var(--ease);
}
.lb-note:last-child { border-bottom: none; }
.lb-note form { margin: 0; display: flex; }
.lb-check {
  width: 20px; height: 20px; padding: 0; margin-top: 0.05rem;
  border-radius: 6px;
  background: transparent;
  border: 1.5px solid var(--text-mute);
  justify-content: center;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.lb-check:hover { border-color: var(--success); background: var(--success-soft); }
.lb-note.is-done .lb-check { background: var(--success); border-color: var(--success); }
.lb-note.is-done .lb-check::after { content: '✓'; color: #07170f; font-size: 0.78rem; font-weight: 800; line-height: 1; }
.lb-note.is-done .lb-note-text { text-decoration: line-through; color: var(--text-mute); }
.lb-note.is-removing { opacity: 0.3; }
.lb-note-text { font-size: 0.93rem; line-height: 1.45; color: var(--text); word-break: break-word; }
.lb-note-meta { font-size: 0.76rem; color: var(--text-mute); white-space: nowrap; padding-top: 0.15rem; }
.lb-del {
  width: 24px; height: 22px; padding: 0;
  background: transparent; border: none;
  color: var(--text-mute); font-size: 1.1rem; line-height: 1;
  justify-content: center;
  opacity: 0; transition: opacity 0.15s var(--ease), color 0.15s var(--ease);
}
.lb-note:hover .lb-del, .lb-del:focus-visible { opacity: 1; }
.lb-del:hover, .lb-del:active { background: transparent; color: var(--danger); }
@media (hover: none) { .lb-del { opacity: 0.6; } }
.lb-empty { margin-bottom: 0.6rem; }

.lb-add { margin: 0; }
.lb-add input[type="text"] {
  width: 100%; height: 38px; font-size: 0.9rem;
  background: transparent;
  border-style: dashed;
}
.lb-add input[type="text"]:focus { border-style: solid; background: var(--bg-soft); }

/* Info */
.lb-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.55rem 1rem; margin: 0; }
.lb-dl dt { font-size: 0.8rem; color: var(--text-mute); padding-top: 0.05rem; }
.lb-dl dd { margin: 0; font-size: 0.88rem; color: var(--text); word-break: break-word; }
.lb-dl dd a { color: var(--text) !important; font-weight: 500; }
.lb-dl dd a:hover { color: var(--accent-bright) !important; }
.lb-info-note { margin-top: 0.8rem; font-size: 0.8rem; }

.lb-none { padding: 1rem 0; }

/* Toolbar: filter by status, sort, layout */
.lb-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.6rem; flex-wrap: wrap; margin: -0.4rem 0 1.2rem; }
.lb-filtergroup { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.lb-group-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-mute); flex: 0 0 auto; }
.lb-filter, .lb-view { display: inline-flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--panel-border); }
.lb-filter button, .lb-view button {
  display: inline-flex; align-items: center; gap: 0.45rem;
  height: 32px; padding: 0 0.95rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-dim); font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.lb-filter button:hover, .lb-view button:hover { color: var(--text); background: var(--panel-border-soft); }
.lb-filter button.active, .lb-view button.active { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--panel-border), var(--shadow-soft); }
.lb-count { font-size: 0.74rem; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.lb-filter button.active .lb-count { color: var(--accent-bright); }
.lb-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.lb-dot-in_progress { background: var(--warning); }
.lb-dot-idle { background: var(--danger); }
.lb-dot-done { background: var(--success); }
.lb-tools-right { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.lb-sort { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-mute); margin: 0; }
.lb-sort select { width: auto; height: 36px; padding: 0 0.8rem; font-size: 0.84rem; border-radius: 10px; }
.lb-view button { width: 38px; padding: 0; justify-content: center; }
.lb-view svg { width: 17px; height: 17px; fill: currentColor; }

/* Ukázky use the whole width of the screen */
.main-content:has(#demo-board) { max-width: none; padding-left: clamp(1rem, 2.2vw, 2.4rem); padding-right: clamp(1rem, 2.2vw, 2.4rem); }

.lb-quick { display: inline-flex; gap: 0.4rem; flex-wrap: wrap; }
.lb-quick button {
  height: 32px; padding: 0 0.9rem; border-radius: 999px; border: 1px dashed var(--panel-border);
  background: transparent; color: var(--text-dim); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.lb-quick button:hover { color: var(--text); border-color: var(--text-mute); }
.lb-quick button.active { border-style: solid; border-color: var(--accent); color: var(--accent-bright); background: var(--accent-soft); }

.lb-priority {
  display: flex; align-items: center; gap: 0.7rem; width: 100%; margin: 0 0 0.9rem; padding: 0.65rem 1rem;
  border-radius: 12px; border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent);
  background: var(--warning-soft); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.lb-priority:hover { filter: brightness(1.08); }
.lb-priority-ic { font-size: 1.05rem; flex: 0 0 auto; }
.lb-priority-text { flex: 1; font-weight: 600; font-size: 0.88rem; }
.lb-priority-go { flex: 0 0 auto; font-weight: 700; font-size: 0.82rem; color: var(--warning); }
.lb-summary { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: -0.5rem 0 1rem; font-size: 0.82rem; color: var(--text-mute); }
.lb-summary b { color: var(--text); font-weight: 700; }
.lb-keys { margin-left: auto; }
.lb-keys kbd { font: inherit; font-size: 0.74rem; padding: 0.05rem 0.4rem; border-radius: 5px; border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text-dim); }

/* ---------- Slozky (folder grouping on /admin/ukazky) ---------- */
.lb-folders-bar { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; margin: -0.2rem 0 0.9rem; }
.lb-folders-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-mute); }
.lb-folder-add { margin: 0 0 0 auto; }
.lb-folder-add input[type="text"] {
  width: 200px; max-width: 100%; height: 34px;
  padding: 0 0.9rem; font-size: 0.84rem;
  border-radius: 999px; border-style: dashed;
  background: transparent; color: var(--text-dim);
}
.lb-folder-add input[type="text"]:focus { border-style: solid; background: var(--bg-soft); color: var(--text); }
.lb-folder-add input[type="text"]::placeholder { color: var(--text-mute); }

/* Chips: jump straight to one folder without scrolling the list to find it. */
.lb-folder-chips { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.lb-folder-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 30px; padding: 0 0.8rem;
  border-radius: 999px; border: 1px solid var(--panel-border); background: var(--bg-soft);
  font-size: 0.8rem; font-weight: 600; color: var(--text-dim); cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
.lb-folder-chip:hover { color: var(--text); border-color: var(--text-mute); }
.lb-folder-chip.active { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-soft); }
.lb-folder-chip .lb-folder-count { background: rgba(255, 255, 255, 0.08); }
.lb-folder-chip.active .lb-folder-count { background: rgba(255, 90, 31, 0.16); color: var(--accent-bright); }

.lb-folder-section + .lb-folder-section { margin-top: 1.7rem; }
.lb-folder-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.8rem 1.2rem; flex-wrap: wrap;
  padding-bottom: 0.5rem; margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--panel-border);
}
.lb-folder-head.is-collapsed { margin-bottom: 0; }
.lb-folder-title { font-size: 1rem; font-weight: 700; color: var(--text); display: flex; align-items: baseline; gap: 0.55rem; }
.lb-folder-count { font-size: 0.78rem; font-weight: 700; color: var(--text-mute); background: var(--bg-soft); border-radius: 999px; padding: 0.1rem 0.55rem; }
.lb-folder-tools { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-mute); }
.lb-folder-tools form { display: inline; margin: 0; }
.lb-folder-rename-input { height: 30px; font-size: 0.92rem; font-weight: 700; padding: 0 0.6rem; max-width: 280px; }
.lb-folder-items { display: flex; flex-direction: column; gap: 1.1rem; }
.lb-folder-empty { margin: 0 0 0.4rem; }

.lb-folder-collapse {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0;
  border: 0; background: none; padding: 0; margin-right: -0.1rem; cursor: pointer;
  color: var(--text-mute); border-radius: 6px;
  transition: transform 0.2s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
.lb-folder-collapse:hover { color: var(--text); background: var(--panel-border-soft); }
.lb-folder-collapse svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lb-folder-head.is-collapsed .lb-folder-collapse { transform: rotate(-90deg); }

.lb-folder-move {
  border: 0; background: none; padding: 0 0.15rem; font-size: 0.7rem; line-height: 1;
  color: var(--text-mute); cursor: pointer; transition: color 0.15s var(--ease);
}
.lb-folder-move:hover:not(:disabled) { color: var(--text); }
.lb-folder-move:disabled { opacity: 0.25; cursor: default; }

select.lb-folder-select {
  appearance: none; -webkit-appearance: none;
  width: auto; min-width: 0; height: 34px;
  padding: 0 2.1rem 0 1rem;
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  color: var(--text-dim);
  background-color: var(--bg-soft);
  border: 1px solid var(--panel-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b3abc0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 12px;
}
select.lb-folder-select:focus { box-shadow: none; outline: 2px solid var(--accent-bright); outline-offset: 2px; }
select.lb-folder-select option { background: var(--panel); color: var(--text); }

.lb-copy { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.lb-copy:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.lb-visit { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--text-mute); white-space: nowrap; }
.lb-visit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lb-visit.is-fresh { color: var(--success); font-weight: 700; }
.lb-visit.is-fresh::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(62, 207, 130, 0.6); animation: lbPulse 1.8s infinite; }
.lb-visit.is-none { font-style: italic; opacity: 0.7; }
@keyframes lbPulse { 70% { box-shadow: 0 0 0 7px rgba(62, 207, 130, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 130, 0); } }

.lb-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 3000; translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: 0.7rem 1.2rem; border-radius: 999px; background: var(--panel); border: 1px solid var(--panel-border);
  color: var(--text); font-weight: 600; font-size: 0.88rem; box-shadow: var(--shadow);
  transition: opacity 0.2s var(--ease), translate 0.25s var(--ease);
}
.lb-toast.show { opacity: 1; translate: -50% 0; }

/* "Kontrola webu" badge + list */
.lb-health { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 700; white-space: nowrap; border-radius: 999px; padding: 0.15rem 0.6rem; border: 1px solid transparent; background: none; font-family: inherit; }
.lb-health.is-ok { color: var(--success); opacity: 0.8; margin: 0; }
.lb-health.is-warn { color: var(--warning); background: var(--warning-soft); cursor: pointer; }
.lb-health.is-error { color: var(--danger); background: var(--danger-soft); cursor: pointer; }
button.lb-health:hover { border-color: currentColor; }
.lb-issues { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--panel-border); }
.lb-issues ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.lb-issues li { position: relative; padding-left: 1.1rem; font-size: 0.85rem; line-height: 1.4; color: var(--text-dim); word-break: break-word; }
.lb-issues li::before { content: ''; position: absolute; left: 0; top: 0.45em; width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.lb-issues li.lb-issue-error::before { background: var(--danger); }
.lb-issues-hint { font-size: 0.76rem; margin-top: 0.7rem; }

/* done notes */
.lb-done-toggle { margin-left: auto; border: 0; background: none; padding: 0; font: inherit; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: none; font-weight: 600; color: var(--text-mute); cursor: pointer; }
.lb-done-toggle:hover { color: var(--text); text-decoration: underline; }
.lb-notes-done { opacity: 0.75; }
.lb-notes-done .lb-note-text { text-decoration: line-through; color: var(--text-mute); }

/* Preview drawer */
.lb-drawer { position: fixed; inset: 0; z-index: 2500; }
.lb-drawer[hidden] { display: none; }
.lb-drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 6, 12, 0.6); opacity: 0; transition: opacity 0.25s var(--ease); }
.lb-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(1500px, 94vw);
  display: flex; flex-direction: column; background: var(--bg); border-left: 1px solid var(--panel-border);
  box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.7); translate: 100% 0; transition: translate 0.3s var(--ease);
}
.lb-drawer.show .lb-drawer-backdrop { opacity: 1; }
.lb-drawer.show .lb-drawer-panel { translate: 0 0; }
html.lb-drawer-open { overflow: hidden; }
.lb-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--panel-border); background: var(--panel); }
.lb-drawer-title-wrap { display: flex; align-items: baseline; gap: 0.8rem; min-width: 0; }
.lb-drawer-head h2 { margin: 0; font-size: 1.2rem; }
.lb-drawer-url { font-size: 0.82rem; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-drawer-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.lb-drawer-tools .lb-view button { width: auto; padding: 0 0.8rem; font-size: 0.8rem; }
.lb-drawer-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--panel-border); background: transparent; color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.lb-drawer-close:hover { background: var(--panel-border-soft); }
.lb-drawer-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; }
.lb-drawer-stage {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; background: repeating-linear-gradient(45deg, var(--bg-soft) 0 12px, var(--bg) 12px 24px);
}
.lb-phone-body { display: flex; flex-direction: column; overflow: hidden; }
.lb-screen { position: relative; overflow: hidden; background: #fff; border-radius: 10px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8); }
.lb-screen iframe { border: 0; background: #fff; transform-origin: top center; flex-shrink: 0; pointer-events: none; }
/* Clicking the preview -- iframe content itself can't bubble clicks out to
   this page, so this transparent overlay sits on top and takes you to the
   full detail page instead (the small drawer is just a quick look). */
.lb-screen-link {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 9, 13, 0); transition: background 0.2s var(--ease);
}
.lb-screen-link span {
  opacity: 0; transform: translateY(6px) scale(0.97);
  padding: 0.6rem 1.1rem; border-radius: 999px;
  background: rgba(22, 19, 27, 0.92); color: var(--text); font-size: 0.86rem; font-weight: 700;
  box-shadow: var(--shadow); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.lb-screen-link:hover { background: rgba(10, 9, 13, 0.35); }
.lb-screen-link:hover span { opacity: 1; transform: translateY(0) scale(1); }
/* Desktop: no fake chrome, just the plain rounded browser-less screenshot. */
.lb-drawer-stage[data-device="mobile"] .lb-screen, .lb-drawer-stage[data-device="tablet"] .lb-screen { border-radius: 0; box-shadow: none; }
.lb-drawer-stage[data-device="tablet"] .lb-phone-body { border: 12px solid #0b0a0e; border-radius: 22px; box-shadow: 0 0 0 2px #3a3444, 0 24px 60px -24px rgba(0, 0, 0, 0.85); }
.lb-drawer-stage[data-device="mobile"] .lb-phone-body { border: 11px solid #0b0a0e; border-radius: 30px; box-shadow: 0 0 0 2px #3a3444, 0 24px 60px -24px rgba(0, 0, 0, 0.85); }
.lb-phone-top, .lb-phone-bottom { flex-shrink: 0; background: #f4f4f6; color: #0b0a0e; }
.lb-phone-top[hidden], .lb-phone-bottom[hidden] { display: none; }
.lb-statusbar {
  position: relative; height: 28px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.lb-drawer-stage[data-device="tablet"] .lb-statusbar { height: 22px; font-size: 10px; padding: 0 20px; }
.lb-time { flex-shrink: 0; }
.lb-island { position: absolute; top: 5px; left: 50%; translate: -50% 0; width: 74px; height: 18px; border-radius: 10px; background: #0b0a0e; }
.lb-statusicons { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.lb-addressbar {
  height: 23px; margin: 0 10px 6px; display: flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 7px; background: rgba(120, 120, 128, 0.14); color: #3a3a3c; font-size: 10px; font-weight: 600;
}
.lb-drawer-stage[data-device="tablet"] .lb-addressbar { margin: 0 16px 6px; }
.lb-addressbar span { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-phone-toolbar {
  height: 44px; display: flex; align-items: center; justify-content: space-around;
  background: rgba(244, 244, 246, 0.94); border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.lb-phone-toolbar button { border: 0; background: none; padding: 6px; margin: 0; height: auto; width: auto; color: inherit; display: flex; cursor: default; box-shadow: none; }
.lb-phone-toolbar button.is-off { opacity: 0.3; }
.lb-drawer-side { overflow-y: auto; padding: 1.1rem 1.2rem 2rem; border-left: 1px solid var(--panel-border); background: var(--panel); }
.lb-drawer-side .lb-section { margin-bottom: 1.4rem; }
@media (max-width: 1000px) {
  .lb-drawer-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lb-drawer-side { max-height: 38vh; border-left: none; border-top: 1px solid var(--panel-border); }
}

/* ================= Demo detail (/admin/ukazky/:slug) ================= */
.main-content:has(#dd) { max-width: none; padding-left: clamp(1rem, 2.2vw, 2.4rem); padding-right: clamp(1rem, 2.2vw, 2.4rem); }
.dd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.dd-title { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.dd-back {
  display: inline-flex; align-items: center; gap: 0.4rem; align-self: flex-start;
  margin-bottom: 0.5rem; padding: 0.4rem 0.85rem 0.4rem 0.65rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 700; color: var(--text-dim) !important;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.dd-back svg { flex-shrink: 0; transition: transform 0.2s var(--ease); }
.dd-back:hover {
  color: var(--text) !important; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateX(-2px);
}
.dd-back:hover svg { transform: translateX(-2px); }
.dd-title h1 { font-family: var(--font-display); margin: 0; font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.01em; font-weight: 600; }
.dd-url { font-size: 0.86rem; color: var(--text-dim) !important; word-break: break-all; }
.dd-url:hover { color: var(--accent-bright) !important; }
.dd-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.dd-status { display: inline-flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--panel-border); }
.dd-status button { display: inline-flex; align-items: center; gap: 0.45rem; height: 32px; padding: 0 0.9rem; border: 0; border-radius: 999px; background: transparent; color: var(--text-dim); font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; }
.dd-status button:hover { color: var(--text); background: var(--panel-border-soft); }
.dd-status button.active[data-status="in_progress"] { background: var(--warning-soft); color: var(--warning); }
.dd-status button.active[data-status="idle"] { background: var(--danger-soft); color: var(--danger); }
.dd-status button.active[data-status="done"] { background: var(--success-soft); color: var(--success); }

.dd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 0.8rem; margin-bottom: 1.3rem; }
.dd-stat { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.9rem 1.1rem; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-border); min-width: 0; }
.dd-stat-k { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.dd-stat-v { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-stat-s { font-size: 0.78rem; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-stat.is-good .dd-stat-v { color: var(--success); }
.dd-stat.is-warn .dd-stat-v { color: var(--warning); }
.dd-stat.is-bad .dd-stat-v { color: var(--danger); }

.dd-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.2rem; align-items: start; margin-bottom: 1.3rem; }
.dd-preview { padding: 0; overflow: hidden; margin: 0; position: sticky; top: 1rem; }
@media (max-width: 1200px) { .dd-preview { position: static; } }
.dd-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; padding: 0.8rem 1rem; border-bottom: 1px solid var(--panel-border); }
.dd-devices button { width: auto; padding: 0 0.95rem; font-size: 0.82rem; }
.dd-preview-tools { display: flex; align-items: center; gap: 0.8rem; }
.dd-scale { font-size: 0.78rem; color: var(--text-mute); }
.dd-stage {
  height: max(560px, calc(100vh - 250px));
  display: flex; align-items: flex-start; justify-content: center; gap: 28px; padding: 22px;
  background: repeating-linear-gradient(45deg, var(--bg-soft) 0 12px, var(--bg) 12px 24px);
  overflow: hidden;
}
.dd-stage[data-mode="all"] { align-items: center; }
.dd-stage[data-mode="tablet"], .dd-stage[data-mode="mobile"] { align-items: center; }
.dd-device { margin: 0; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.dd-screen { position: relative; overflow: hidden; background: #fff; }
.dd-screen iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; background: #fff; }
.dd-desktop { border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.85); border: 1px solid #2c2834; }
.dd-chrome { align-self: stretch; height: 34px; display: flex; align-items: center; gap: 0.8rem; padding: 0 0.8rem; background: #25212c; }
.dd-dots { display: flex; gap: 6px; }
.dd-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.dd-dots i:nth-child(2) { background: #febc2e; }
.dd-dots i:nth-child(3) { background: #28c840; }
.dd-addr { flex: 1; max-width: 420px; height: 22px; display: flex; align-items: center; padding: 0 0.7rem; border-radius: 6px; background: #17141c; color: var(--text-dim); font-size: 0.72rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Phone/tablet mockups: a "chassis" wrapper (bezel + rounded corners) that
   holds the fake Safari chrome above/below the actual scaled .dd-screen, so
   the preview reads as "this site, open in Safari on the device" instead of
   a bare rounded rectangle of webpage. */
/* .dd-phone-frame is the layout-sized clipper (JS sets its width/height to
   the true scaled footprint every fit()); .dd-phone-body inside it always
   renders at real 1x size and is shrunk purely visually via transform, so
   this frame is what "all" mode's gap/centering actually measures instead
   of the unscaled (and much bigger) natural size of the body. */
.dd-phone-frame { position: relative; overflow: hidden; align-self: stretch; }
.dd-phone-body { display: flex; flex-direction: column; overflow: hidden; background: #f4f4f6; }
.dd-mobile .dd-phone-body { border: 11px solid #0b0a0e; border-radius: 30px; box-shadow: 0 0 0 2px #3a3444, 0 24px 60px -24px rgba(0, 0, 0, 0.85); }
.dd-tablet .dd-phone-body { border: 13px solid #0b0a0e; border-radius: 22px; box-shadow: 0 0 0 2px #3a3444, 0 24px 60px -24px rgba(0, 0, 0, 0.85); }
.dd-statusbar {
  position: relative; flex-shrink: 0; height: 28px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: #f4f4f6; color: #0b0a0e; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.dd-tablet .dd-statusbar { height: 22px; font-size: 10px; padding: 0 20px; }
.dd-time { flex-shrink: 0; }
.dd-island { position: absolute; top: 5px; left: 50%; translate: -50% 0; width: 74px; height: 18px; border-radius: 10px; background: #0b0a0e; }
.dd-statusicons { display: flex; align-items: center; gap: 4px; color: #0b0a0e; flex-shrink: 0; }
.dd-addressbar {
  flex-shrink: 0; height: 23px; margin: 0 10px 6px; display: flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 7px; background: rgba(120, 120, 128, 0.14); color: #3a3a3c; font-size: 10px; font-weight: 600;
}
.dd-tablet .dd-addressbar { margin: 0 16px 6px; }
.dd-addressbar span { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-toolbar {
  flex-shrink: 0; height: 44px; display: flex; align-items: center; justify-content: space-around;
  background: rgba(244, 244, 246, 0.94); border-top: 1px solid rgba(0, 0, 0, 0.08); color: #0b0a0e;
}
.dd-toolbar button { border: 0; background: none; padding: 6px; margin: 0; height: auto; width: auto; color: inherit; display: flex; cursor: default; box-shadow: none; }
.dd-toolbar button.is-off { opacity: 0.3; }
.dd-device figcaption { margin-top: 0.55rem; font-size: 0.78rem; font-weight: 700; color: var(--text-mute); letter-spacing: 0.06em; text-transform: uppercase; }

.dd-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.dd-card { margin: 0; padding: 1.1rem 1.2rem; }
.dd-card textarea.lb-msg { width: 100%; }
.dd-card .lb-dl code { font-size: 0.78rem; word-break: break-all; }

.dd-visits { margin: 0; }
.dd-visits .panel-head { flex-wrap: wrap; gap: 0.3rem 1rem; }
.dd-visits .panel-head .hint { margin: 0; }
.dd-visits-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; margin: 0.4rem 0 1.4rem; }
.dd-chart { display: flex; flex-direction: column; }
.dd-chart, .dd-visitors { background: var(--bg-soft); border: 1px solid var(--panel-border); border-radius: 12px; padding: 1rem 1.1rem; min-width: 0; }
.dd-chart-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 0.8rem; }
.dd-bars { flex: 1; display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; min-height: 170px; align-items: end; }
.dd-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.dd-bar i { display: block; width: 100%; max-width: 34px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--accent-bright), var(--accent)); }
.dd-bar-n { font-size: 0.72rem; font-weight: 700; color: var(--text-dim); min-height: 1em; }
.dd-bar-l { font-size: 0.7rem; color: var(--text-mute); }
.dd-visitors ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dd-visitors li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--panel-border-soft); }
.dd-visitors li:last-child { border-bottom: none; }
.dd-v-count { font-weight: 800; color: var(--accent-bright); font-variant-numeric: tabular-nums; }
.dd-v-main { display: flex; flex-direction: column; min-width: 0; }
.dd-v-main b { font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-v-main small { font-size: 0.75rem; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-v-when { font-size: 0.78rem; color: var(--text-mute); white-space: nowrap; }
/* visit list: fixed columns, long values get cut with "…" instead of breaking the box */
.dd-vlist { border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; }
.dd-vrow { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 1.2fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; padding: 0.6rem 1rem; font-size: 0.86rem; border-bottom: 1px solid var(--panel-border-soft); }
.dd-vrow:last-child { border-bottom: none; }
.dd-vrow:not(.dd-vrow-head):hover { background: var(--panel-border-soft); }
.dd-vrow > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-vrow-head { background: var(--bg-soft); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.dd-ua { color: var(--text-dim); }
.dd-ip { font-variant-numeric: tabular-nums; color: var(--text-mute); }
.dd-more { margin-top: 0.8rem; }

@media (max-width: 1200px) {
  .dd-main { grid-template-columns: 1fr; }
  .dd-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 800px) {
  .dd-visits-top { grid-template-columns: 1fr; }
  .dd-vrow { grid-template-columns: 1fr 1fr; }
  .dd-vrow-head { display: none; }
  .dd-stage { height: 70vh; }
}

/* ---------- Detail: další krok, poslat klientovi, QR, historie ---------- */
.dd-follow-note { width: 100%; margin-top: 0.5rem; height: 38px; font-size: 0.88rem; }
#dd-follow .lb-follow-row input[type="date"] { flex: 1; width: auto; }
.dd-follow-meta { margin-top: 0.5rem; font-size: 0.76rem; }
.dd-tpl { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.6rem; }
.dd-tpl button { border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text-dim); font: inherit; font-size: 0.78rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 999px; cursor: pointer; }
.dd-tpl button.active { background: var(--accent-soft); color: var(--accent-bright); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.dd-send-text { width: 100%; font-size: 0.85rem; line-height: 1.5; resize: vertical; }
.dd-send-to { display: flex; align-items: center; gap: 0.6rem; margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--text-mute); }
.dd-send-to select { flex: 1; min-width: 0; height: 36px; font-size: 0.84rem; }
.dd-send-note { margin-top: 0.5rem; font-size: 0.8rem; }
.dd-send-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.dd-qr-wrap { display: flex; gap: 1rem; align-items: center; }
.dd-qr-wrap img { width: 130px; height: 130px; border-radius: 10px; background: #fff; padding: 6px; flex-shrink: 0; }
.dd-qr-wrap p { font-size: 0.82rem; margin: 0; }
.dd-history { margin: 0 0 1.3rem; }
.dd-history .panel-head { flex-wrap: wrap; gap: 0.3rem 1rem; }
.dd-history .panel-head .hint { margin: 0; }
.dd-timeline { list-style: none; margin: 0.3rem 0 0; padding: 0; position: relative; }
.dd-timeline::before { content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--panel-border); }
.dd-ev { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; padding: 0.45rem 0; }
.dd-ev-icon { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 0.85rem; font-weight: 800; background: var(--bg-soft); border: 1px solid var(--panel-border); color: var(--text-dim); }
.dd-ev-note_done .dd-ev-icon { color: var(--success); border-color: color-mix(in srgb, var(--success) 45%, transparent); }
.dd-ev-note_add .dd-ev-icon, .dd-ev-status .dd-ev-icon { color: var(--accent-bright); }
.dd-ev-visit .dd-ev-icon { font-size: 0.8rem; }
.dd-ev-text { font-size: 0.9rem; color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-ev-text b { color: var(--text); }
.dd-ev time { font-size: 0.78rem; color: var(--text-mute); white-space: nowrap; }
@media (max-width: 700px) { .dd-ev-text { white-space: normal; } .dd-qr-wrap { flex-direction: column; align-items: flex-start; } }

/* ---------- Další krok ---------- */
.lb-follow-row { display: flex; gap: 0.5rem; align-items: center; }
.lb-follow-row input[type="date"] { width: 160px; flex-shrink: 0; height: 38px; padding: 0 0.6rem; font-size: 0.86rem; color-scheme: dark; }
.lb-follow-row input[type="text"] { flex: 1; min-width: 0; height: 38px; font-size: 0.88rem; }
.lb-follow-clear { opacity: 0.7; }
.lb-follow-quick { display: flex; gap: 0.35rem; margin-top: 0.45rem; }
.lb-follow-quick button { border: 1px dashed var(--panel-border); background: none; color: var(--text-mute); font: inherit; font-size: 0.74rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 999px; cursor: pointer; }
.lb-follow-quick button:hover { color: var(--text); border-color: var(--text-mute); }
.lb-follow-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; font-weight: 700; white-space: nowrap; padding: 0.12rem 0.55rem; border-radius: 999px; background: var(--bg-soft); color: var(--text-dim); border: 1px solid var(--panel-border); text-transform: none; letter-spacing: 0; }
.lb-follow-badge.is-soon { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.lb-follow-badge.is-today { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.lb-follow-badge.is-late { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.lb-sum-alert { color: var(--warning) !important; }
.lb-sum-alert b { color: var(--warning) !important; }
@media (max-width: 600px) { .lb-follow-row { flex-wrap: wrap; } .lb-follow-row input[type="date"] { width: 100%; } }

/* ---------- Diagnostika webu ---------- */
.lb-diag-badge { display: inline-flex; align-items: center; gap: 0.4rem; font: inherit; font-size: 0.78rem; font-weight: 700; white-space: nowrap; border-radius: 999px; padding: 0.15rem 0.65rem 0.15rem 0.3rem; border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text-dim); cursor: pointer; --c: var(--text-mute); }
.lb-diag-badge:hover { border-color: var(--c); color: var(--text); }
.lb-diag-badge.is-good { --c: var(--success); }
.lb-diag-badge.is-mid { --c: var(--warning); }
.lb-diag-badge.is-bad { --c: var(--danger); }
.lb-diag-ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--panel-border) 0); -webkit-mask: radial-gradient(circle, transparent 5px, #000 5.5px); mask: radial-gradient(circle, transparent 5px, #000 5.5px); }
.lb-diag-panel { width: min(860px, 96vw); }
.lb-help-panel { width: min(600px, 94vw); }
.lb-help-body { padding: 1.4rem 1.6rem 3rem; overflow-y: auto; }
.lb-help-sec { margin-bottom: 1.5rem; }
.lb-help-sec:last-child { margin-bottom: 0; }
.lb-help-sec h3 { margin: 0 0 0.4rem; font-size: 0.98rem; font-weight: 700; }
.lb-help-sec p { margin: 0; color: var(--text-dim); font-size: 0.92rem; line-height: 1.55; }
.lb-help-sec p b { color: var(--text); }
.lb-help-sec .lb-dot { margin: 0 0.15rem 0 0.5rem; }
.lb-help-sec .lb-keys { display: inline-flex; margin: 0 0.1rem; }
.lb-contacts-list { display: grid; gap: 0.7rem; }
.lb-contact-card { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0.9rem; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); }
.lb-contact-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--accent-soft); color: var(--accent-bright, var(--accent)); font-weight: 700; font-size: 0.9rem; }
.lb-contact-info { min-width: 0; flex: 1; }
.lb-contact-info b { display: block; font-size: 0.94rem; }
.lb-contact-info span { display: block; font-size: 0.82rem; color: var(--text-mute); }
.lb-contact-role { font-size: 0.78rem; color: var(--text-mute); }
.lb-contact-acts { display: flex; gap: 0.4rem; flex: 0 0 auto; }
.lb-contact-acts a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--panel-border); color: var(--text-dim); transition: background 0.2s, color 0.2s; }
.lb-contact-acts a:hover { background: var(--accent-soft); color: var(--accent-bright, var(--accent)); }
.lb-contact-acts svg { width: 15px; height: 15px; }
.lb-diag-body { flex: 1; overflow-y: auto; padding: 1.4rem 1.6rem 2.4rem; }
.lb-diag-loading { padding: 2rem 0; text-align: center; }
.lb-diag-top { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.6rem; padding: 1.2rem; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-border); }
.lb-diag-score { --c: var(--text-mute); flex-shrink: 0; width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; grid-auto-flow: column; align-items: baseline; gap: 2px;
  background: radial-gradient(circle, var(--panel) 62%, transparent 63%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--panel-border) 0); }
.lb-diag-score strong { font-size: 2.2rem; font-weight: 800; color: var(--c); line-height: 1; }
.lb-diag-score span { font-size: 0.95rem; color: var(--text-mute); font-weight: 700; }
.lb-diag-score.is-good { --c: var(--success); }
.lb-diag-score.is-mid { --c: var(--warning); }
.lb-diag-score.is-bad { --c: var(--danger); }
.lb-diag-summary { min-width: 0; }
.lb-diag-verdict { margin: 0 0 0.35rem; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.lb-diag-groups { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.lb-diag-groups span { font-size: 0.78rem; color: var(--text-dim); padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--panel-border); }
.lb-diag-groups span.is-full { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.lb-diag-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.lb-diag-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; padding: 0.8rem 1rem; border-radius: 12px; background: var(--panel); border: 1px solid var(--panel-border); border-left: 4px solid var(--c, var(--panel-border)); }
.lb-diag-item.prio-high { --c: var(--danger); }
.lb-diag-item.prio-mid { --c: var(--warning); }
.lb-diag-item.prio-low { --c: var(--text-mute); }
.lb-diag-prio { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); }
.lb-diag-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.lb-diag-text b { font-size: 0.95rem; }
.lb-diag-text span { font-size: 0.86rem; color: var(--text-dim); line-height: 1.45; }
.lb-diag-text small { font-size: 0.72rem; color: var(--text-mute); }
.lb-diag-item button[disabled] { opacity: 0.6; cursor: default; }
.lb-diag-oktoggle { margin: 0.4rem 0 0.6rem; font-size: 0.82rem; }
.lb-diag-oklist { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.35rem 1rem; font-size: 0.85rem; color: var(--success); }
.lb-diag-note { margin-top: 1.2rem; font-size: 0.78rem; }
#lb-diag-addall[disabled] { opacity: 0.6; cursor: default; }
@media (max-width: 640px) {
  .lb-diag-top { flex-direction: column; align-items: flex-start; }
  .lb-diag-item { grid-template-columns: 1fr; }
}

/* ================= Polish: card header, tabs, calendar, dialogs ================= */
.lb-head { align-items: center; gap: 0.8rem 1.2rem; }
.lb-title-wrap { flex-direction: column; align-items: flex-start; gap: 0.55rem; }
.lb-title-row { display: flex; align-items: baseline; gap: 0.4rem 1.1rem; flex-wrap: wrap; min-width: 0; }
.lb-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.lb-badges > * {
  height: 26px; display: inline-flex; align-items: center; gap: 0.35rem; margin: 0;
  padding: 0 0.65rem; border-radius: 999px; font: inherit; font-size: 0.76rem; font-weight: 700; line-height: 1;
  white-space: nowrap; border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text-dim);
}
.lb-badges > .lb-diag-badge { padding-left: 0.3rem; }
.lb-badges > .lb-health.is-ok { color: var(--success); opacity: 1; }
.lb-badges > .lb-health.is-warn, .lb-badges > .lb-health.is-error, .lb-badges > .lb-follow-badge.is-today, .lb-badges > .lb-follow-badge.is-late { border-color: transparent; }
.lb-badges > .lb-visit.is-fresh { color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.lb-badges > .lb-visit.is-none { font-weight: 600; }
.lb-head-right { align-self: center; flex-wrap: wrap; justify-content: flex-end; }
.lb-links { flex-basis: 100%; flex-wrap: wrap; align-items: baseline; margin: 0.1rem 0 0 2.05rem; font-size: 0.8rem; opacity: 0.85; }
.lb-event-badge { cursor: pointer; }
.lb-event-badge small { font-size: 0.7rem; color: var(--text-mute); font-weight: 600; }
.lb-event-badge:hover { color: var(--text); border-color: var(--text-mute) !important; }
.lb-event-badge.is-next { color: var(--accent-bright); border-color: color-mix(in srgb, var(--accent) 40%, transparent) !important; }
.lb-event-badge.oc-good { color: var(--success); }
.lb-event-badge.oc-bad { color: var(--danger); }
.lb-event-badge.oc-mid { color: var(--warning); }
.lb-section + .lb-section { padding-top: 1.1rem; border-top: 1px dashed var(--panel-border-soft); }
.lb-main { gap: 1.1rem; }
.lb.view-compact .lb-title-wrap { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0.4rem 1rem; }
.lb.view-compact .lb-badges { gap: 0.3rem; }
.lb.view-compact .lb-badges > * { height: 22px; font-size: 0.72rem; padding: 0 0.5rem; }
.lb.view-compact .lb-badges > .lb-diag-badge { padding-left: 0.25rem; }
.lb.view-compact .lb-diag-ring { width: 15px; height: 15px; }
.lb.view-compact .lb-compact-msg { max-width: 240px; }
.lb.view-compact .lb-head { flex-wrap: nowrap; }
.lb.view-compact .lb-title-wrap { flex: 1; min-width: 0; }
.lb.view-compact .lb-head-right { flex-wrap: nowrap; flex-shrink: 0; }
.lb.view-compact .lb-bar:not(.is-open) .lb-meta { display: none; }
.lb.view-compact .lb-links { font-size: 0.76rem; gap: 0.35rem; }
@media (max-width: 900px) { .lb.view-compact .lb-head { flex-wrap: wrap; } }

.lb-tabs { display: inline-flex; gap: 0.25rem; padding: 0.3rem; margin: -0.3rem 0 1.2rem; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--panel-border); }
.lb-tabs button { height: 38px; padding: 0 1.2rem; border: 0; border-radius: 10px; background: transparent; color: var(--text-dim); font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; }
.lb-tabs button:hover { color: var(--text); background: var(--panel-border-soft); }
.lb-tabs button.active { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--panel-border), var(--shadow-soft); }

/* calendar */
.kc-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; }
.kc-nav { display: flex; align-items: center; gap: 0.5rem; }
.kc-month { margin: 0 0.4rem; min-width: 190px; text-align: center; font-size: 1.35rem; text-transform: capitalize; font-family: var(--font-body); font-weight: 800; }
.kc-filter button { height: 32px; }
.kc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.kc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--panel-border); border-radius: 16px; overflow: hidden; background: var(--panel-border); gap: 1px; }
.kc-dow { background: var(--bg-soft); padding: 0.55rem 0.7rem; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.kc-day { background: var(--panel); min-height: 118px; padding: 0.45rem 0.5rem 0.55rem; display: flex; flex-direction: column; gap: 0.3rem; cursor: pointer; min-width: 0; transition: background 0.15s var(--ease); }
.kc-day:hover { background: color-mix(in srgb, var(--panel) 85%, var(--accent) 4%); }
.kc-day.is-out { background: var(--bg-soft); }
.kc-day.is-out .kc-num { color: var(--text-mute); opacity: 0.6; }
.kc-day.is-weekend:not(.is-out) { background: color-mix(in srgb, var(--panel) 92%, #000 8%); }
.kc-day-head { display: flex; align-items: center; justify-content: space-between; }
.kc-num { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 0.84rem; font-weight: 700; color: var(--text-dim); }
.kc-day.is-today .kc-num { background: var(--accent); color: var(--accent-ink); }
.kc-add { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--panel-border); background: transparent; color: var(--text-mute); font-size: 1rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.kc-day:hover .kc-add, .kc-add:focus-visible { opacity: 1; }
.kc-add:hover { color: var(--text); border-color: var(--text-mute); }
.kc-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kc-chip { display: flex; align-items: center; gap: 0.3rem; width: 100%; min-width: 0; padding: 0.2rem 0.4rem; border-radius: 6px; border: 0; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--text); font: inherit; font-size: 0.74rem; text-align: left; cursor: pointer; }
.kc-chip b { font-weight: 700; color: var(--text-dim); }
.kc-chip .kc-ic { font-size: 0.72rem; }
.kc-chip .kc-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-chip.kc-meeting { border-left-color: #6ea8ff; background: rgba(110, 168, 255, 0.14); }
.kc-chip.kc-email { border-left-color: var(--gold); background: var(--gold-soft); }
.kc-chip.kc-other { border-left-color: var(--text-mute); background: var(--panel-border-soft); }
.kc-chip.kc-follow { border-left-color: var(--warning); background: transparent; border: 1px dashed color-mix(in srgb, var(--warning) 50%, transparent); border-left: 3px solid var(--warning); }
.kc-chip.kc-follow.is-late { border-left-color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.kc-chip.oc-good { box-shadow: inset -3px 0 0 var(--success); }
.kc-chip.oc-bad { box-shadow: inset -3px 0 0 var(--danger); }
.kc-chip:hover { filter: brightness(1.2); }
.kc-more { border: 0; background: none; color: var(--text-mute); font: inherit; font-size: 0.72rem; font-weight: 700; text-align: left; padding: 0.1rem 0.3rem; cursor: pointer; }
.kc-side { display: flex; flex-direction: column; gap: 1rem; }
.kc-card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px; padding: 1rem 1.1rem; }
.kc-card.kc-late { border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.kc-agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.kc-agenda li + li { border-top: 1px solid var(--panel-border-soft); }
.kc-agenda button { width: 100%; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.55rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.kc-agenda button:hover .kc-a-main b { color: var(--accent-bright); }
.kc-a-date { font-size: 0.78rem; font-weight: 700; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.kc-a-main { display: flex; flex-direction: column; min-width: 0; }
.kc-a-main b { font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-a-main small { font-size: 0.76rem; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-oc { font-size: 0.7rem; font-weight: 800; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; background: var(--panel-border-soft); color: var(--text-dim); }
.kc-oc.oc-good { background: var(--success-soft); color: var(--success); }
.kc-oc.oc-mid { background: var(--warning-soft); color: var(--warning); }
.kc-oc.oc-bad { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 1100px) { .kc-layout { grid-template-columns: 1fr; } .kc-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
@media (max-width: 700px) { .kc-day { min-height: 70px; } .kc-chip .kc-t, .kc-chip b { display: none; } .kc-month { min-width: 0; font-size: 1.1rem; } }

/* add / edit dialog */
.ke-modal { position: fixed; inset: 0; z-index: 2600; display: grid; place-items: center; padding: 1rem; }
.ke-backdrop { position: absolute; inset: 0; background: rgba(8, 6, 12, 0.65); opacity: 0; transition: opacity 0.2s var(--ease); }
.ke-dialog { position: relative; width: min(560px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 18px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.85); opacity: 0; translate: 0 16px; transition: opacity 0.2s var(--ease), translate 0.25s var(--ease); margin: 0; }
.ke-modal.show .ke-backdrop { opacity: 1; }
.ke-modal.show .ke-dialog { opacity: 1; translate: 0 0; }
.ke-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--panel-border); }
.ke-head h2 { margin: 0; font-size: 1.1rem; font-family: var(--font-body); font-weight: 800; }
.ke-body { overflow-y: auto; padding: 1.1rem 1.2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1rem; }
.ke-field { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.78rem; font-weight: 700; color: var(--text-mute); margin: 0; }
.ke-field small { font-weight: 500; }
.ke-field input, .ke-field select, .ke-field textarea { width: 100%; font-size: 0.92rem; color-scheme: dark; }
.ke-field input, .ke-field select { height: 44px; box-sizing: border-box; }
.ke-field input[type="date"], .ke-field input[type="time"] { padding: 0 0.8rem; font-family: inherit; }
.ke-full { grid-column: 1 / -1; }
.ke-kinds { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ke-kinds label { margin: 0; cursor: pointer; }
.ke-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.ke-kinds span { display: inline-flex; align-items: center; gap: 0.3rem; height: 34px; padding: 0 0.85rem; border-radius: 999px; border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text-dim); font-size: 0.84rem; font-weight: 700; }
.ke-kinds input:checked + span { background: var(--accent-soft); color: var(--accent-bright); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.ke-kinds input:focus-visible + span { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.ke-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.9rem 1.2rem; border-top: 1px solid var(--panel-border); }
.ke-foot-right { display: flex; gap: 0.5rem; }
.ke-delete:hover { color: var(--danger) !important; }
@media (max-width: 520px) { .ke-body { grid-template-columns: 1fr; } }

/* detail: calls list + site info */
.dd-evt-group { margin: 0.2rem 0 0.35rem; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.dd-evts { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.dd-evts button { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 0.6rem; align-items: start; padding: 0.55rem 0.6rem; border-radius: 10px; border: 1px solid var(--panel-border-soft); background: var(--bg-soft); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dd-evts button:hover { border-color: var(--panel-border); }
.dd-evt.is-next button { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.dd-evt-ic { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); }
.dd-evt-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.dd-evt-main b { font-size: 0.88rem; }
.dd-evt-main small { font-size: 0.75rem; color: var(--text-mute); }
.dd-evt-notes { font-size: 0.8rem; color: var(--text-dim); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 0.15rem; }
.dd-evts .kc-oc { margin-top: 0.2rem; }
.dd-webinfo-dl dd { font-size: 0.84rem; }
.dd-palette { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.dd-palette i { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.15); display: inline-block; }
.dd-tag { display: inline-block; font-size: 0.74rem; padding: 0.1rem 0.5rem; margin: 0 0.2rem 0.25rem 0; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--panel-border); color: var(--text-dim); }
.dd-font { display: inline-block; margin-right: 0.5rem; font-size: 0.95rem; color: var(--text); }
.dd-sections { display: inline-flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; }
.dd-sections a { font-size: 0.8rem; color: var(--text-dim) !important; }
.dd-sections a:hover { color: var(--accent-bright) !important; }
.dd-card .lb-label { display: flex; align-items: center; }
.dd-side .dd-card { border-radius: 16px; }
.dd-stat { transition: border-color 0.15s var(--ease); }
.dd-stat:hover { border-color: #3d3648; }

/* drawer: badges + diagnosis list */
.lb-drawer-badges { margin-bottom: 1.1rem; }
.lb-drawer-side .lb-section + .lb-section, .lb-drawer-side .lb-section { margin-bottom: 0; }
.lb-drawer-side > .lb-section { padding-bottom: 1.1rem; }
.lb-drawer-side > .lb-section + .lb-section { padding-top: 1.1rem; border-top: 1px dashed var(--panel-border); }
.lb-dd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.lb-dd-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; padding: 0.55rem 0.7rem; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--panel-border-soft); border-left: 3px solid var(--c, var(--panel-border)); }
.lb-dd-item.prio-high { --c: var(--danger); }
.lb-dd-item.prio-mid { --c: var(--warning); }
.lb-dd-item.prio-low { --c: var(--text-mute); }
.lb-dd-item div { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.lb-dd-item b { font-size: 0.85rem; }
.lb-dd-item span { font-size: 0.78rem; color: var(--text-dim); line-height: 1.4; }
.lb-dd-item button { white-space: nowrap; }
.lb-dd-item button[disabled] { opacity: 0.55; }
#dd-diag .lb-dd-list { margin-top: 0.9rem; }
.dd-diag-top { display: flex; gap: 1rem; align-items: center; }
.dd-diag-top .lb-diag-score { width: 84px; height: 84px; }
.dd-diag-top .lb-diag-score strong { font-size: 1.7rem; }
.dd-diag-top .lb-diag-verdict { font-size: 0.95rem; margin-bottom: 0.15rem; }
.dd-diag-top .lb-muted { font-size: 0.8rem; margin-bottom: 0.5rem; }

/* Only shown in the compact layout */
.lb-compact-sum { display: none; }

/* Layout: side by side */
.lb.view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); align-items: start; }
.lb.view-grid .lb-cols { grid-template-columns: 1fr; }
.lb.view-grid .lb-info { border-left: none; border-top: 1px solid var(--panel-border); }
.lb.view-grid .lb-none { grid-column: 1 / -1; }

/* Layout: compact -- just the header row of each demo */
.lb.view-compact { gap: 0.45rem; }
.lb.view-compact .lb-bar { border-radius: 10px; box-shadow: none; }
.lb.view-compact .lb-bar::before { width: 4px; }
.lb.view-compact .lb-cols { display: none; }
.lb.view-compact .lb-bar { cursor: pointer; }
.lb.view-compact .lb-bar.is-open { cursor: default; box-shadow: var(--shadow); margin: 0.35rem 0; }
.lb.view-compact .lb-bar.is-open .lb-cols { display: grid; }
.lb.view-compact .lb-bar.is-open .lb-head { border-bottom: 1px solid var(--panel-border); cursor: pointer; }
.lb.view-compact .lb-bar.is-open .lb-compact-sum { display: none; }
.lb.view-compact .lb-head { padding: 0.55rem 0.9rem 0.55rem 1.3rem; border-bottom: none; }
.lb.view-compact .lb-title { font-size: 1rem; }
.lb.view-compact .lb-links { font-size: 0.78rem; }
.lb.view-compact select.lb-status { height: 28px; font-size: 0.78rem; padding: 0 1.9rem 0 0.8rem; }
.lb.view-compact .lb-compact-sum { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
.lb-compact-msg { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; color: var(--text-dim); }

@media (max-width: 700px) {
  .lb-toolbar, .lb-tools-right { width: 100%; }
  .lb-filter { width: 100%; overflow-x: auto; }
  .lb-filter button { flex: 1 0 auto; padding: 0 0.7rem; }
  .lb-compact-msg { display: none; }
  .lb-keys { display: none; }
  .lb-folders-bar { width: 100%; }
  .lb-folder-add input[type="text"] { width: 100%; }
}

@media (max-width: 900px) {
  .lb-cols { grid-template-columns: 1fr; }
  .lb-info { border-left: none; border-top: 1px solid var(--panel-border); }
}
@media (max-width: 600px) {
  .lb-head, .lb-main, .lb-info { padding-left: 1.25rem; padding-right: 1rem; }
  .lb-head-right { width: 100%; justify-content: space-between; }
  .lb-note { grid-template-columns: 20px minmax(0, 1fr) 24px; }
  .lb-note-meta { grid-column: 2; grid-row: 2; }
  .lb-note form { grid-column: 3; grid-row: 1; }
}

/* Detail page: labelled status control. */
.demo-seg {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--panel-2); border: 1px solid var(--panel-border);
  border-radius: 10px; padding: 3px; gap: 3px;
}
.demo-seg form { margin: 0; display: flex; }
.demo-seg-btn {
  flex: 1; justify-content: center;
  background: transparent; border: 1px solid transparent; color: var(--text-mute);
  border-radius: 7px; padding: 0.4rem 0.3rem; font-size: 0.8rem; font-weight: 600;
}
.demo-seg-btn:hover, .demo-seg-btn:active { background: var(--panel-border-soft); color: var(--text); }
.demo-seg-btn.active.seg-idle { background: var(--panel); color: var(--text); border-color: var(--panel-border); }
.demo-seg-btn.active.seg-in_progress { background: var(--warning-soft); color: var(--warning); }
.demo-seg-btn.active.seg-done { background: var(--success-soft); color: var(--success); }
.demo-seg-detail { max-width: 420px; margin-bottom: 1.5rem; }

/* ---------- "Jak jsme oslovili" (contact channels) ---------- */
.lb-chan-toggles { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.lb-chan { --ch: var(--text-mute); height: 30px; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0 0.7rem; border-radius: 999px; border: 1px dashed var(--panel-border); background: transparent; color: var(--text-mute); font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease); }
.lb-chan:hover { color: var(--text); border-color: var(--text-mute); }
.lb-chan.is-on { border-style: solid; border-color: color-mix(in srgb, var(--ch) 55%, transparent); background: color-mix(in srgb, var(--ch) 18%, transparent); color: var(--ch); }
.ch-call { --ch: var(--success); }
.ch-email { --ch: var(--gold); }
.ch-sms { --ch: #4fd1c5; }
.ch-instagram { --ch: #e46bd0; }
.ch-facebook { --ch: #6ea8ff; }
.ch-person { --ch: var(--accent-bright, var(--accent)); }
.ch-other { --ch: var(--text-dim); }
.lb-badges > .lb-chan-badge { color: var(--ch, var(--text-dim)); background: color-mix(in srgb, var(--ch, var(--text-mute)) 16%, transparent); border-color: color-mix(in srgb, var(--ch, var(--text-mute)) 45%, transparent); }
.lb-badges > .lb-chan-badge.is-none, .lb-chan-badge.is-none { --ch: var(--danger); color: var(--danger); cursor: pointer; border-style: dashed; }
.lb-label .lb-chan-badge.is-none { font-size: 0.72rem; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--danger) 50%, transparent); text-transform: none; letter-spacing: 0; }
.lb-chans.is-flash { animation: lbChanFlash 1.2s var(--ease); border-radius: 12px; }
@keyframes lbChanFlash { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
.dd-chan-hint { margin: 0.6rem 0 0; font-size: 0.76rem; }

/* ---------- calendar: phones + drag & drop ---------- */
.kc-hint { margin: -0.4rem 0 0.9rem; font-size: 0.78rem; color: var(--text-mute); }
.kc-chip[data-drag] { cursor: grab; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.kc-chip .kc-phone { margin-left: auto; padding-left: 0.3rem; font-size: 0.68rem; font-weight: 700; color: var(--success); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 1300px) { .kc-chip .kc-phone { display: none; } }
.kc-chip.is-dragging { opacity: 0.35; }
.kc-ghost { position: fixed; z-index: 3100; pointer-events: none; cursor: grabbing; transform: rotate(-2deg) scale(1.04); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.7); opacity: 0.95; }
.kc-dragging, .kc-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.kc-day.is-drop { background: color-mix(in srgb, var(--panel) 70%, var(--accent) 16%) !important; box-shadow: inset 0 0 0 2px var(--accent); }
.kc-a-phones { display: flex; flex-wrap: wrap; gap: 0.25rem 0.8rem; padding: 0 0 0.55rem calc(62px + 0.6rem); margin-top: -0.3rem; }
.kc-a-phones a { font-size: 0.8rem; font-weight: 700; color: var(--success); text-decoration: none; font-variant-numeric: tabular-nums; }
.kc-a-phones a:hover { text-decoration: underline; }
.kc-a-phones.is-none { font-size: 0.74rem; color: var(--text-mute); font-style: italic; }
.kc-toast { display: flex; align-items: center; gap: 0.9rem; pointer-events: none; }
.kc-toast.show { pointer-events: auto; }
.kc-undo { border: 0; background: var(--accent-soft); color: var(--accent-bright, var(--accent)); font: inherit; font-weight: 800; font-size: 0.82rem; padding: 0.25rem 0.75rem; border-radius: 999px; cursor: pointer; }
.kc-undo:hover { background: var(--accent); color: var(--accent-ink); }

/* event dialog: contact of the selected demo */
.ke-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; padding: 0.65rem 0.8rem; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--panel-border); font-size: 0.88rem; }
.ke-contact-label { width: 100%; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); }
.ke-contact a { color: var(--text); font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; }
.ke-contact a.ke-contact-phone { color: var(--success); }
.ke-contact a:hover { text-decoration: underline; }
.ke-contact-none { color: var(--text-mute); font-style: italic; font-size: 0.82rem; }

/* "Další krok": explicit confirm */
.lb-follow-save { flex-shrink: 0; height: 38px; white-space: nowrap; }
.lb-follow-save:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.lb-follow.is-dirty .lb-follow-row input, #dd-follow.is-dirty input { border-color: var(--warning); box-shadow: 0 0 0 2px var(--warning-soft); }
.lb-follow.is-dirty .lb-follow-save:not(:disabled), #dd-follow.is-dirty .lb-follow-save:not(:disabled) { animation: lbFollowNudge 1.6s var(--ease) infinite; }
@keyframes lbFollowNudge { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
.lb-follow-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.lb-follow-state { font-size: 0.74rem; font-weight: 700; color: var(--warning); }
.dd-follow-actions { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.6rem; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .lb-follow-save { animation: none !important; } }

/* ---------- date picker (replaces the browser's date input in Ukázky) ---------- */
.kd-field { display: inline-flex; align-items: center; gap: 0.5rem; height: 38px; padding: 0 0.8rem; min-width: 0; border-radius: 10px; border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; text-align: left; white-space: nowrap; transition: border-color 0.15s var(--ease), background 0.15s var(--ease); }
.kd-field:hover { border-color: var(--text-mute); }
.kd-field:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.kd-field .kd-ic { font-size: 0.9rem; }
.kd-field .kd-val { overflow: hidden; text-overflow: ellipsis; }
.kd-field .kd-val.is-empty { color: var(--text-mute); font-weight: 500; }
.lb-follow-row .kd-field { width: 190px; flex-shrink: 0; }
#dd-follow .lb-follow-row .kd-field { flex: 1; width: auto; }
.ke-field .kd-field { width: 100%; height: 44px; font-size: 0.95rem; }
.ke-next-body .kd-field { width: 100%; height: 44px; }
@media (max-width: 600px) { .lb-follow-row .kd-field { width: 100%; } }

.kd-pop { position: fixed; z-index: 2800; width: 300px; padding: 0.75rem; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.85); animation: kdIn 0.16s var(--ease); }
@keyframes kdIn { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } }
.kd-pop.is-sheet { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; border-radius: 18px 18px 0 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); animation-name: kdSheet; }
@keyframes kdSheet { from { translate: 0 30px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.kd-quick { display: flex; flex-wrap: wrap; gap: 0.3rem; padding-bottom: 0.65rem; margin-bottom: 0.55rem; border-bottom: 1px solid var(--panel-border-soft); }
.kd-quick button { border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text-dim); font: inherit; font-size: 0.76rem; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: 999px; cursor: pointer; }
.kd-quick button:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.kd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.kd-head b { font-size: 0.92rem; text-transform: capitalize; }
.kd-nav { width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--text-dim); font-size: 1.2rem; cursor: pointer; }
.kd-nav:hover { background: var(--panel-border-soft); color: var(--text); }
.kd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.kd-dow { text-align: center; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); padding: 0.2rem 0 0.35rem; }
.kd-day { position: relative; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.kd-day:hover { background: var(--panel-border-soft); }
.kd-day:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: -2px; }
.kd-day.is-out { color: var(--text-mute); opacity: 0.5; }
.kd-day.is-weekend:not(.is-sel) { color: var(--text-dim); }
.kd-day.is-today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.kd-day.is-sel { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.kd-dots { position: absolute; left: 0; right: 0; bottom: 2px; font-style: normal; font-size: 0.55rem; line-height: 1; letter-spacing: 1px; color: var(--success); pointer-events: none; }
.kd-day.is-sel .kd-dots { color: var(--accent-ink); }
.kd-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.55rem; padding-top: 0.5rem; border-top: 1px solid var(--panel-border-soft); }
.kd-legend { font-size: 0.7rem; color: var(--text-mute); display: inline-flex; align-items: center; gap: 0.35rem; }
.kd-legend i { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.kd-clear { border: 0; background: none; color: var(--text-mute); font: inherit; font-size: 0.76rem; font-weight: 700; cursor: pointer; }
.kd-clear:hover { color: var(--danger); }

/* ---------- event dialog: time chips, day info, outcome pills, next step ---------- */
.ke-times { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; align-items: center; }
.ke-times button { height: 32px; padding: 0 0.65rem; border-radius: 999px; border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text-dim); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.ke-times button:hover { color: var(--text); border-color: var(--text-mute); }
.ke-times button.is-on { background: var(--accent-soft); color: var(--accent-bright); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.ke-field .ke-times input[type="time"] { width: 104px; height: 32px; border-radius: 999px; padding: 0 0.6rem; font-size: 0.8rem; }
.ke-times input.is-on { border-color: var(--accent); color: var(--accent-bright); }
.ke-dayinfo { margin-top: 0.45rem; font-size: 0.78rem; font-weight: 600; color: var(--text-mute); min-height: 1.1em; }
.ke-dayinfo.is-clash { color: var(--warning); }
.ke-outcomes { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ke-outcomes label { margin: 0; cursor: pointer; }
.ke-outcomes input { position: absolute; opacity: 0; pointer-events: none; }
.ke-outcomes span { display: inline-flex; align-items: center; height: 32px; padding: 0 0.75rem; border-radius: 999px; border: 1px solid var(--panel-border); background: var(--bg-soft); color: var(--text-dim); font-size: 0.8rem; font-weight: 700; }
.ke-outcomes input:checked + span { background: var(--panel-border-soft); color: var(--text); border-color: var(--text-mute); }
.ke-outcomes input:checked + span.oc-good { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 50%, transparent); }
.ke-outcomes input:checked + span.oc-mid { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 50%, transparent); }
.ke-outcomes input:checked + span.oc-bad { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.ke-outcomes input:focus-visible + span { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.ke-next { padding: 0.75rem 0.85rem; border-radius: 12px; border: 1px dashed var(--panel-border); }
.ke-check { display: flex; align-items: center; gap: 0.55rem; margin: 0; font-size: 0.86rem; color: var(--text-dim); cursor: pointer; }
.ke-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.ke-next-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.5rem; margin-top: 0.65rem; }
.ke-next-body input[type="text"] { height: 44px; font-size: 0.9rem; }
.ke-next-now { grid-column: 1 / -1; margin: 0; font-size: 0.74rem; color: var(--text-mute); }
.ke-next-now:empty { display: none; }
@media (max-width: 560px) { .ke-next-body { grid-template-columns: 1fr; } }

/* ---------- calendar: toolbar, week view, "Dnes volat" ---------- */
.kc-bar .kc-search { width: 170px; height: 34px; }
.kc-viewsw button { height: 32px; padding: 0 0.8rem; font-size: 0.8rem; font-weight: 700; width: auto; }
.kc-week { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kw-day { min-height: 340px; }
.kw-dname { display: inline-flex; align-items: baseline; gap: 0.35rem; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); }
.kw-dname small { font-size: 0.68rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.kw-empty { font-size: 0.72rem; color: var(--text-mute); opacity: 0.5; padding: 0.3rem 0.1rem; }
.kw-ev { border-radius: 10px; border-left: 3px solid var(--accent); background: var(--accent-soft); cursor: grab; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.kw-ev.kc-meeting { border-left-color: #6ea8ff; background: rgba(110, 168, 255, 0.14); }
.kw-ev.kc-email { border-left-color: var(--gold); background: var(--gold-soft); }
.kw-ev.kc-other { border-left-color: var(--text-mute); background: var(--panel-border-soft); }
.kw-ev.is-dragging { opacity: 0.35; }
.kw-open { width: 100%; display: flex; flex-direction: column; gap: 0.15rem; padding: 0.45rem 0.5rem 0.4rem; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: inherit; }
.kw-top { display: flex; align-items: center; justify-content: space-between; gap: 0.3rem; font-size: 0.72rem; color: var(--text-dim); }
.kw-top .kc-oc { font-size: 0.62rem; padding: 0.1rem 0.4rem; }
.kw-label { font-size: 0.8rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-title { font-size: 0.72rem; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-phones { display: flex; flex-direction: column; gap: 0.1rem; padding: 0 0.5rem 0.45rem; }
.kw-phones a { font-size: 0.72rem; font-weight: 700; color: var(--success); text-decoration: none; font-variant-numeric: tabular-nums; }
.kw-phones a:hover { text-decoration: underline; }
@media (max-width: 900px) { .kc-week { grid-template-columns: 1fr; } .kw-day { min-height: 0; } }

.kc-card.kc-today { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.kc-qo { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0 0 0.6rem calc(62px + 0.6rem); }
.kc-qo button { border: 1px solid transparent; font: inherit; font-size: 0.68rem; cursor: pointer; }
.kc-qo button:hover { border-color: currentColor; }
.kc-fu-acts { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0 0 0.6rem calc(62px + 0.6rem); }
.kc-fu-acts button { border: 1px dashed var(--panel-border); background: none; color: var(--text-dim); font: inherit; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; cursor: pointer; }
.kc-fu-acts button:hover { color: var(--text); border-color: var(--text-mute); }
@media (prefers-reduced-motion: reduce) { .kd-pop { animation: none; } }
.ke-outcomes input { width: auto; height: auto; }
/* agenda rows style every <button> as a full-width row -- the small action pills must stay pills */
.kc-agenda .kc-qo button, .kc-agenda .kc-fu-acts button { width: auto; display: inline-flex; align-items: center; grid-template-columns: none; gap: 0; padding: 0.2rem 0.6rem; border-radius: 999px; line-height: 1.2; }
.kc-agenda .kc-qo button { padding: 0.15rem 0.5rem; font-size: 0.68rem; font-weight: 800; }
@media (max-width: 1700px) { .kc-chip .kc-phone { display: none; } }
.kw-open { align-items: stretch; }
.kw-top { justify-content: space-between; }

/* ============================================================
   Ukázky board — liquid glass refresh
   Frosted sticky toolbar, glass cards with a status glow, and a
   floating bulk-action bar. Same blur/tint recipe already used by
   .guide-dialog and .info-tip-bubble elsewhere in this admin, just
   applied to a dense, fast-moving worklist instead of a one-off modal.
   ============================================================ */

/* Sticky glass toolbar: folder chips + filters/sort/view stay put while
   scrolling a long board, so switching a filter mid-scroll never means
   a trip back to the top. */
.lb-sticky-tools {
  position: sticky;
  top: var(--dt-tabs-h, 0px); /* stacks right below the open-tabs strip, when present */
  z-index: 30;
  margin: -0.4rem -0.2rem 1rem;
  padding: 0.85rem 0.2rem 0.75rem;
  /* Solid, not glass: position:sticky + backdrop-filter renders as a blank
     white slab in some browsers/GPUs, so this bar stays a plain solid panel
     matching the rest of the dark theme instead. */
  background: var(--bg-soft);
  border-bottom: 1px solid var(--panel-border);
}
.lb-sticky-tools .lb-folders-bar { margin-bottom: 0.75rem; }
.lb-sticky-tools .lb-toolbar { margin: 0; }

/* Filter / quick filters / view switch / tabs -- solid pills matching the
   rest of the dark admin theme (same reasoning as .lb-sticky-tools above:
   no backdrop-filter here, it's rendered as solid white for some people). */
.lb-filter, .lb-view, .lb-quick, .lb-tabs, .lb-sort {
  background: var(--bg-soft);
  border-color: var(--panel-border);
}
.lb-filter button.active, .lb-view button.active, .lb-tabs button.active {
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--panel-border), var(--shadow-soft);
}
.lb-quick button.active {
  background: var(--accent-soft);
  color: var(--accent-bright);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Cards: frosted glass surface, colored ambient glow instead of a flat
   strip, gentle lift on hover so the currently-relevant row pops. */
.lb-bar {
  background: rgba(30, 27, 37, 0.58);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 22px 50px -32px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.lb-bar::before { width: 4px; box-shadow: 0 0 18px 1px var(--lb-color); opacity: 0.9; }
.lb-bar:hover { border-color: rgba(255, 255, 255, 0.14); box-shadow: 0 28px 64px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.lb-bar.is-selected {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), 0 22px 50px -32px rgba(0, 0, 0, 0.75);
}
.lb-head {
  background: linear-gradient(90deg, color-mix(in srgb, var(--lb-color) 9%, transparent), transparent 60%), rgba(255, 255, 255, 0.012);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}
.lb-info { background: rgba(0, 0, 0, 0.14); border-left-color: rgba(255, 255, 255, 0.07); }
.lb-folder-head { background: rgba(255, 255, 255, 0.02); border-radius: 12px; padding: 0.5rem 0.7rem; margin: 0 0 0.6rem; }

/* Row-select checkbox -- same rounded-square language as .lb-check
   (the note checkbox) but in the accent colour, since it's a workflow
   pick rather than a "done" mark. */
.lb-pick { display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.lb-pick input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.lb-pick span {
  width: 19px; height: 19px; border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.lb-pick:hover span { border-color: var(--accent-bright); }
.lb-pick input:checked + span { background: var(--accent); border-color: var(--accent); }
.lb-pick input:checked + span::after { content: '✓'; color: var(--accent-ink); font-size: 0.72rem; font-weight: 800; line-height: 1; }
.lb-pick input:focus-visible + span { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* Floating bulk-action bar -- appears once at least one card is picked. */
.lb-bulkbar {
  position: fixed;
  left: 50%;
  bottom: 5.4rem; /* clears .lb-toast, which pops up centered at bottom:28px */
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.8rem 0.7rem 1.1rem;
  border-radius: 999px;
  background: rgba(24, 20, 28, 0.7);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: lbBulkIn 0.25s var(--ease);
}
@keyframes lbBulkIn { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
.lb-bulk-count { font-size: 0.86rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.lb-bulk-count strong { color: var(--accent-bright); font-variant-numeric: tabular-nums; }
.lb-bulk-field { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; }
.lb-bulk-field select {
  width: auto; height: 34px; padding: 0 1.9rem 0 0.75rem; font-size: 0.82rem; font-weight: 600;
  border-radius: 999px; background-color: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16);
}
.lb-bulkbar .btn-ghost { border-radius: 999px; }
@media (max-width: 760px) {
  .lb-bulkbar { left: 0.7rem; right: 0.7rem; bottom: 5rem; transform: none; flex-wrap: wrap; border-radius: 20px; justify-content: center; }
  @keyframes lbBulkIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
}

/* Drawers / diagnostics overlay: frosted backdrop + glass header so the
   preview panel feels like the same product as the board underneath. */
.lb-drawer-backdrop { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.lb-drawer-head, .lb-diag-panel .lb-drawer-head {
  background: rgba(20, 17, 24, 0.75);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.lb-drawer-panel, .lb-diag-panel {
  background: rgba(18, 16, 22, 0.92);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-left-color: rgba(255, 255, 255, 0.08);
}
.lb-drawer-side { background: rgba(255, 255, 255, 0.015); border-left-color: rgba(255, 255, 255, 0.07); }

@media (prefers-reduced-motion: reduce) {
  .lb-bulkbar { animation: none; }
}
.kc-month.is-week { text-transform: none; min-width: 0; }

/* ============================================================
   Open-tabs strip (/admin/ukazky*) -- browser-tab-style quick
   switching between demo sites you've already opened, so you don't
   have to go back to the board and search again each time.
   ============================================================ */
.dt-tabs {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: -0.4rem -0.2rem 1.2rem;
  padding: 0.55rem 0.5rem;
  /* Solid, not glass: position:sticky + backdrop-filter renders blank/white
     in some browsers, same reason .lb-sticky-tools dropped it too. */
  background: var(--bg-soft);
  border-bottom: 1px solid var(--panel-border);
  scrollbar-width: thin;
}
.dt-tabs[hidden] { display: none; }
.dt-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.4rem 0.4rem 0.8rem;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  cursor: grab;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease), opacity 0.15s var(--ease);
}
.dt-tab:active { cursor: grabbing; }
.dt-tab:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); }
.dt-tab.is-active {
  background: var(--panel);
  border-color: var(--panel-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 8px 18px -12px rgba(0, 0, 0, 0.6);
}
.dt-tab.is-active::before {
  content: ''; position: absolute; left: 10px; right: 10px; top: -1px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-bright));
}
.dt-tab.is-dragging { opacity: 0.35; }
.dt-tab-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-mute);
}
.dt-tab.is-active .dt-tab-dot { background: var(--accent-bright); box-shadow: 0 0 0 3px var(--accent-soft); }
.dt-tab a {
  font-size: 0.8rem; font-weight: 600; color: var(--text-dim) !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.dt-tab.is-active a { color: var(--text) !important; }
.dt-tab-close {
  width: 18px; height: 18px; padding: 0; border-radius: 6px; border: 0;
  background: transparent; color: var(--text-mute); font-size: 0.85rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.dt-tab-close:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.dt-tabs-clear {
  flex-shrink: 0; font-size: 0.74rem; font-weight: 600; color: var(--text-mute);
  background: none; border: none; cursor: pointer; padding: 0.3rem 0.6rem; white-space: nowrap;
}
.dt-tabs-clear:hover { color: var(--text); text-decoration: underline; }


/* ================================================================
   Phone & tablet layout (admin + portal)
   ≤900px: sidebar turns into a top bar + compact menu panel under it
   ≤640px: tighter spacing, wide tables become cards, forms full width
   Helpers live in /static/js/mobile.js (menu toggle, table labels).
   ================================================================ */
.m-topbar, .m-nav-backdrop { display: none; }

@media (max-width: 900px) {
  :root { --m-top: calc(58px + env(safe-area-inset-top, 0px)); }
  .app-shell { display: block; min-height: 100vh; }

  .m-topbar {
    position: sticky; top: 0; z-index: 900;
    display: flex; align-items: center; gap: 0.45rem;
    height: var(--m-top);
    padding: env(safe-area-inset-top, 0px) max(0.7rem, env(safe-area-inset-right, 0px)) 0 max(1rem, env(safe-area-inset-left, 0px));
    background: var(--panel);
    border-bottom: 1px solid var(--panel-border);
  }
  .m-brand { display: flex; align-items: center; gap: 0.55rem; margin-right: auto; min-width: 0; color: var(--text); }
  .m-brand:hover { color: var(--text); }
  .m-brand img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
  .m-brand span { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
  .m-brand small {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent); background: var(--accent-soft); padding: 0.18rem 0.5rem; border-radius: 999px; white-space: nowrap;
  }
  .m-icon-btn {
    width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
    border-radius: 12px; color: var(--text-dim);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
  }
  .m-icon-btn:hover, .m-icon-btn:active { background: var(--panel-2); color: var(--text); }
  .m-icon-btn svg { width: 20px; height: 20px; }
  .m-icon-cta { width: 38px; height: 38px; margin-right: 0.2rem; background: var(--accent); color: var(--accent-ink); border-radius: 11px; }
  .m-icon-cta:hover, .m-icon-cta:active { background: var(--accent-strong); color: var(--accent-ink); }

  .m-menu-btn {
    position: relative; flex-shrink: 0;
    width: 44px; height: 42px; padding: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: var(--panel-2); border: 1px solid var(--panel-border); border-radius: 12px; color: var(--text);
  }
  .m-menu-btn:hover, .m-menu-btn:active { background: var(--panel-border-soft); }
  .m-menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }
  .m-nav-open .m-menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .m-nav-open .m-menu-btn span:nth-child(2) { opacity: 0; }
  .m-nav-open .m-menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .m-menu-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel-2); }
  .m-nav-open .m-menu-dot { display: none; }

  /* The sidebar itself becomes the menu panel -- same links, no duplicate markup. */
  .sidebar {
    position: fixed; top: var(--m-top); left: 0; right: 0; z-index: 890;
    width: auto; height: auto; max-height: calc(100dvh - var(--m-top));
    overflow-y: auto; overscroll-behavior: contain;
    border-right: 0; border-bottom: 1px solid var(--panel-border);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 34px 70px -24px rgba(0, 0, 0, 0.75);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  }
  .m-nav-open .sidebar { opacity: 1; visibility: visible; transform: none; }
  .sidebar-brand { display: none; }
  .sidebar-search { margin: 0.9rem 0.9rem 0; }
  .sidebar-search input[type="text"] { padding-top: 0.7rem; padding-bottom: 0.7rem; }
  .sidebar-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; padding: 0.9rem; flex: none; }
  .sidebar-nav a {
    padding: 0.8rem 0.85rem; min-height: 48px;
    background: rgba(255, 255, 255, 0.025); border: 1px solid var(--panel-border-soft); border-radius: 12px;
    font-size: 0.9rem;
  }
  .sidebar-nav a:hover { padding-left: 0.85rem; }
  .sidebar-nav a.active { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
  .sidebar-cta { margin: 0 0.9rem 0.9rem; padding: 0.85rem; }
  .sidebar-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom, 0px));
  }
  .sidebar-user { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .m-nav-backdrop { position: fixed; inset: var(--m-top) 0 0 0; z-index: 880; background: rgba(8, 6, 10, 0.55); }
  .m-nav-backdrop:not([hidden]) { display: block; animation: mFade 0.2s var(--ease); }
  html.m-nav-open, html.m-nav-open body { overflow: hidden; }

  .main-area { min-height: calc(100vh - var(--m-top)); }
  .main-content { padding: 1.4rem 1.2rem 3rem; }
  .impersonation-banner { padding: 0.6rem 1rem; }

  /* sticky strips on the demo pages sit under the top bar, not behind it */
  .dt-tabs { top: var(--m-top); }
  .lb-sticky-tools { top: calc(var(--m-top) + var(--dt-tabs-h, 0px)); }

  /* iOS zooms into any field under 16px -- keep typing comfortable */
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"],
  input[type="search"], input[type="date"], input[type="time"], input[type="url"], textarea, select { font-size: 16px; }

  .dd-side, .kc-side { grid-template-columns: 1fr; }
}
@keyframes mFade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .main-content { padding: 1.1rem 0.9rem 2.6rem; }
  .main-content:has(#demo-board), .main-content:has(#dd) { padding-left: 0.9rem; padding-right: 0.9rem; }

  .page-head { margin-bottom: 1.1rem; gap: 0.8rem; }
  .page-head > div:first-child { min-width: 0; }
  .page-head h1 { font-size: 1.45rem; }
  .page-head > .btn-row, .page-head > .lb-page-tools, .page-head > .an-top { width: 100%; }
  .page-head > .btn-row > a, .page-head > .btn-row > button, .page-head > .btn-row > form { flex: 1 1 auto; }
  .page-head > .btn-row > a, .page-head > .btn-row > button, .page-head > .btn-row > form > button { justify-content: center; width: 100%; }

  .panel { padding: 1.1rem 1rem; margin-bottom: 1rem; }
  .panel-head { flex-wrap: wrap; gap: 0.4rem 0.8rem; margin-bottom: 0.85rem; }
  .panel-head h2 { font-size: 1.02rem; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1.2rem; }
  .stat-grid > .stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 0.55rem; padding: 0.95rem 1rem; }
  .stat-icon { width: 34px; height: 34px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-value { font-size: 1.3rem; overflow-wrap: anywhere; }

  .btn-row > form { display: flex; }
  .search-form { flex-wrap: wrap; }
  .search-form input[type="text"] { flex: 1 1 100%; }
  .search-form button { flex: 1; justify-content: center; }
  .filter-bar > *, .filter-form { width: 100%; }
  .filter-form > * { flex: 1 1 auto; }
  .onboard-card { padding: 1.3rem 1.15rem; }
  .onboard-card .btn-row > * { flex: 1 1 auto; justify-content: center; }
  .cta-big { padding: 1.1rem 1.15rem; }
  .credential-reveal .cred-value { word-break: break-all; }
  .empty-state { padding: 1.8rem 0.6rem; }

  .activity-feed li { flex-wrap: wrap; align-items: flex-start; gap: 0.25rem 0.7rem; }
  .activity-feed li > span:nth-child(2) { flex: 1; min-width: 0; }
  .activity-dot { margin-top: 0.45rem; }
  .activity-time { flex-basis: 100%; padding-left: calc(7px + 0.7rem); margin-left: 0; }

  /* dialogs / toasts */
  .toast-stack { left: 0.8rem; right: 0.8rem; bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px)); max-width: none; align-items: stretch; }
  .confirm-overlay, .order-overlay, .guide-overlay { padding: 1rem; }
  .confirm-dialog { padding: 1.35rem; }
  .confirm-dialog .btn-row > * { flex: 1; justify-content: center; }
  .order-dialog { padding: 1.4rem 1.2rem; }
  .guide-dialog { padding: 2.1rem 1.3rem 1.5rem; border-radius: 22px; }

  /* tickets */
  .ticket-card-section { padding: 1.1rem 1rem; }
  .ticket-progress { overflow-x: auto; }
  .progress-step { min-width: 60px; }
  .progress-label { font-size: 0.7rem; text-align: center; }
  .chat-thread { max-height: 60vh; }

  /* pricing */
  .pricing-grid, .pricing-grid-admin { gap: 1.3rem; }
  .pricing-grid-admin .pricing-card { padding: 1.9rem 1.3rem 1.4rem; }
  .pricing-grid-admin .pricing-amount { font-size: 2.5rem; }

  /* reservations settings */
  .day-hours-row { flex-wrap: wrap; row-gap: 0.4rem; }
  .day-hours-row .day-name { width: 100%; }
  .day-hours-row input[type="time"] { flex: 1; width: auto; min-width: 0; }
  .switch-row { align-items: flex-start; }

  .note-composer { flex-wrap: wrap; }
  .note-composer textarea { flex-basis: 100%; }

  /* ---- tables ---- */
  .data-table th, .data-table td { padding: 0.65rem 0.6rem; }
  .data-table td { overflow-wrap: anywhere; }
  .data-table .status-badge, .data-table .type-badge, .data-table .btn, .data-table button { white-space: nowrap; overflow-wrap: normal; }
  /* two-column lists (dashboard): the badge column hugs its content */
  .data-table:not(.m-cards):not(.m-kv) td:last-child:not(:first-child) { width: 1%; text-align: right; }

  /* key/value tables: label above value */
  .data-table.m-kv tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--panel-border); }
  .data-table.m-kv tr:last-child { border-bottom: 0; }
  .data-table.m-kv th, .data-table.m-kv td { display: block; padding: 0; border: 0; background: none; border-radius: 0; }
  .data-table.m-kv th { margin-bottom: 0.2rem; font-size: 0.68rem; }
  .data-table.m-kv tbody tr:hover { background: none; }

  /* multi-column tables: one card per row, "label ... value" lines */
  .data-table.m-cards, .data-table.m-cards tbody, .data-table.m-cards tr, .data-table.m-cards td { display: block; width: 100%; }
  .data-table.m-cards thead { display: none; }
  .data-table.m-cards tbody { display: flex; flex-direction: column; gap: 0.6rem; }
  .data-table.m-cards tbody tr {
    position: relative;
    padding: 0.25rem 0.95rem;
    background: var(--bg-soft); border: 1px solid var(--panel-border); border-radius: 12px;
  }
  .data-table.m-cards tr:hover, .data-table.m-cards tr.clickable-row:hover { background: var(--bg-soft); }
  .data-table.m-cards tr.clickable-row:active { background: var(--panel-2); }
  .data-table.m-cards tr.reservation-row-pending { box-shadow: inset 3px 0 0 var(--warning); }
  .data-table.m-cards td {
    display: flow-root; /* contains the floated label */
    padding: 0.55rem 0; text-align: right; font-size: 0.88rem;
    border-bottom: 1px solid var(--panel-border-soft);
  }
  .data-table.m-cards td:last-child { border-bottom: 0; }
  .data-table.m-cards td::before {
    content: attr(data-label);
    float: left; max-width: 46%; margin-right: 0.9rem;
    text-align: left; color: var(--text-mute);
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.9;
  }
  .data-table.m-cards td.m-title { text-align: left; font-size: 0.97rem; font-weight: 600; padding-top: 0.7rem; }
  .data-table.m-cards td.m-title::before, .data-table.m-cards td.m-nolabel::before { display: none; }
  .data-table.m-cards td.m-empty { display: none; }
  .data-table.m-cards td > form { display: inline-flex; margin: 0; }
  .data-table.m-cards td .btn-row { justify-content: flex-end; }
  .data-table.m-cards .num { text-align: right; }
  .data-table.m-cards td[style*="text-align"] { text-align: right !important; }
  /* row checkbox pinned to the card's top-right corner */
  .data-table.m-cards tr.m-has-check { padding-right: 2.8rem; }
  .data-table.m-cards td.m-check { position: absolute; top: 0.75rem; right: 0.9rem; width: auto; padding: 0; border: 0; }
  .data-table.m-cards td.m-check::before { display: none; }
  .data-table.m-cards td.m-check input { width: 20px; height: 20px; }
  .data-table.m-has-headcheck thead { display: block; margin-bottom: 0.6rem; }
  .data-table.m-has-headcheck thead tr { display: flex; }
  .data-table.m-has-headcheck thead th { display: none; }
  .data-table.m-has-headcheck thead th.m-check-head {
    display: flex; align-items: center; gap: 0.55rem; width: 100%;
    padding: 0.55rem 0.95rem; border-radius: 10px; text-transform: none; letter-spacing: 0; font-size: 0.82rem;
  }
  .data-table.m-has-headcheck thead th.m-check-head::after { content: 'Vybrat vše'; color: var(--text-dim); }
  .data-table.m-has-headcheck thead th.m-check-head input { width: 20px; height: 20px; margin: 0; }
  .data-table.m-cards tr.m-full td { text-align: center; }
  .data-table.m-cards tr.m-full td::before { display: none; }
  .an-table-wrap { overflow-x: visible; }
  .an-msg { max-width: none; }

  /* analytics page */
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .an-kpi { padding: 0.9rem 0.95rem; border-radius: 14px; }
  .an-kpi .v { font-size: 1.3rem; }
  .an-seg { display: flex; width: 100%; }
  .an-seg button { flex: 1; padding: 0.55rem 0.3rem; }
  .an-search { max-width: none; }
  .lv { border-radius: 18px; }
  .lv-side { padding: 1.2rem 1.1rem; }
  .lv-legend { flex-wrap: wrap; gap: 0.4rem 1rem; }
  .an-chart { height: 170px; gap: 2px; }
  .an-xl { gap: 2px; }
  .an-xl span { font-size: 0.58rem; overflow: hidden; }

  /* demo board header links wrap instead of running off-screen */
  .dd-actions { width: 100%; }
  .dd-status { width: 100%; }
  .dd-status button { flex: 1; justify-content: center; padding: 0 0.5rem; }
}

@media (max-width: 380px) {
  .stat-grid, .an-kpis { grid-template-columns: 1fr; }
  .sidebar-nav a { font-size: 0.85rem; padding: 0.75rem 0.7rem; }
  .m-brand small { display: none; }
}

/* Touch screens have no hover -- show controls that are hover-only on desktop. */
@media (hover: none) {
  .kc-add { opacity: 1; }
  .sidebar-nav a:hover { padding-left: 0.8rem; }
}
/* Ukázky board on a phone: the tool strip scrolls away with the page
   (pinned it would cover half the screen) and chip rows swipe sideways. */
@media (max-width: 700px) {
  .lb-sticky-tools { position: static; }
  .lb-page-tools .lb-search { flex: 1 1 100%; width: 100%; }
  .lb-page-tools .btn-ghost { flex: 1; justify-content: center; }
  .lb-tabs { display: flex; width: 100%; }
  .lb-tabs button { flex: 1; padding: 0 0.6rem; }
  .lb-quick, .lb-folder-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .lb-quick::-webkit-scrollbar, .lb-folder-chips::-webkit-scrollbar, .lb-filter::-webkit-scrollbar { display: none; }
  .lb-quick button, .lb-folder-chip { flex-shrink: 0; }
  .lb-tools-right { justify-content: space-between; }
  .lb-sort { flex: 1; }
  .lb-sort select { flex: 1; width: 100%; }
  .lb-folder-add { margin-left: 0; width: 100%; }
  .kc-bar { flex-direction: column; align-items: stretch; }
  .kc-nav { justify-content: space-between; }
}
@media (max-width: 640px) {
  .page-head h1, .page-sub, .ticket-description, .chat-text, .lb-dl dd, .hint { overflow-wrap: anywhere; }
  .ticket-card-row .btn-row { width: 100%; }
  .ticket-card-row .btn-row > form { flex: 1; }
  .ticket-card-row .btn-row button { width: 100%; justify-content: center; }
  /* safety net: nothing inside the content column may push the page sideways */
  .main-area { overflow-x: clip; }
  pre, code { white-space: pre-wrap; word-break: break-word; }
}

/* lb-filtergroup on a phone: label on its own line, chips swipe sideways */
@media (max-width: 700px) {
  .lb-filtergroup { width: 100%; flex-wrap: wrap; gap: 0.4rem; }
  .lb-group-label { flex-basis: 100%; }
  .lb-filtergroup > .lb-filter, .lb-filtergroup > .lb-quick { flex: 1 1 100%; min-width: 0; }
  .lb-priority { flex-wrap: wrap; }
  .lb-priority-text { flex-basis: calc(100% - 2rem); }
}

/* Ukázky – detail: Přístupy (admin / klient / tester) */
.dd-acc { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .6rem; }
.dd-acc li { padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--line, rgba(0,0,0,.08)); background: rgba(127,127,127,.05); }
.dd-acc-h { display: flex; align-items: center; gap: .6rem; margin-bottom: .35rem; }
.dd-acc-h b { flex: 1; }
.dd-acc-open { font-size: .82rem; white-space: nowrap; }
.dd-acc-row { display: grid; grid-template-columns: 3.4rem 1fr auto auto; align-items: center; gap: .4rem; margin-top: .25rem; font-size: .85rem; }
.dd-acc-row span { opacity: .65; font-size: .78rem; }
.dd-acc-row code { font-size: .8rem; word-break: break-all; padding: .2rem .45rem; border-radius: 7px; background: rgba(127,127,127,.1); }
.dd-acc-note { margin: .35rem 0 0; font-size: .8rem; }
.dd-acc-add summary { cursor: pointer; font-size: .88rem; opacity: .8; }
.dd-acc-add form { display: grid; gap: .45rem; margin-top: .6rem; }
.dd-acc-add input { width: 100%; }
