@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══════════════════════════════════════════════════════
   CSS VARIABLES
═══════════════════════════════════════════════════════ */
:root {
  /* Brand, firemní identita BEDR v4 (stejné hodnoty jako bedr.cz) */
  --primary:       #036180;   /* primární teal */
  --primary-d:     #024d66;   /* darker, hover & active */
  --primary-l:     #ddf3f9;   /* pale teal, backgrounds */
  --primary-light: #4fb8d4;   /* světlejší teal (gradient linie) */
  --accent:        #F2A82A;   /* amber, hlavní výzvy k akci */
  --accent-d:      #d98f14;   /* darker accent, hover */
  --dark:          #0f2a35;   /* tmavá, text, patička */
  --gradient-line: linear-gradient(90deg, #036180, #4fb8d4);
  --font: 'Nunito', 'Segoe UI', Arial, sans-serif;

  /* Status */
  --success: #22c55e;
  --warning: #d97706;
  --danger:  #ef4444;

  /* Neutrals, sjednoceno s bedr.cz */
  --bg:     #ffffff;
  --bg-alt: #f8fafb;
  --card:   #ffffff;
  --text:   #0f2a35;
  --muted:  #5a7080;
  --border: #d6e4eb;

  /* Radii */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 18px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 2px 8px rgba(0,0,0,.09), 0 1px 3px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.11), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.16), 0 4px 12px rgba(0,0,0,.08);
}

/* ═══════════════════════════════════════════════════════
   BASE
═══════════════════════════════════════════════════════ */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg); color: var(--text);
  min-height: 100vh; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .page-title {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.25;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4cdd8; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ═══════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════ */
nav {
  position: sticky; top: 0; z-index: 200;
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 64px;
  box-shadow: 0 2px 12px rgba(3,97,128,.08);
  border-bottom: 3px solid transparent;
  border-image: var(--gradient-line) 1;
}

nav .logo { display: flex; align-items: center; gap: .4rem; text-decoration: none; }
nav .logo-img { height: 36px; width: auto; display: block; border-radius: 6px; }
/* Logo BEDR = textová značka (Nunito 900, teal + amber tečka), stejně jako na bedr.cz */
.brand-wordmark {
  font-family: var(--font); font-weight: 900; color: var(--primary);
  letter-spacing: 1px; line-height: 1; white-space: nowrap; text-decoration: none;
}
.brand-wordmark .brand-dot { color: var(--accent); }
nav .brand-wordmark { font-size: 1.65rem; }
.auth-box h1 .brand-wordmark { font-size: 2.9rem; letter-spacing: 2px; }
.footer .brand-wordmark { display: block; color: #fff; font-size: 1.9rem; margin-bottom: 12px; }
nav .logo-admin-label {
  font-family: var(--font); font-size: .7rem; font-weight: 800;
  color: var(--primary); letter-spacing: .8px; text-transform: uppercase; opacity: .7;
}

/* nav-links is the flex row that holds all links + the user chip */
nav .nav-links { display: flex; align-items: center; gap: 1.25rem; }
nav .nav-links a {
  display: inline-flex; align-items: center;
  color: var(--muted); text-decoration: none;
  font-size: .9rem; font-weight: 500;
  white-space: nowrap; transition: all .2s;
  padding: .35rem .7rem; border-radius: 6px;
}
nav .nav-links a:hover { color: var(--primary); background: rgba(3,97,128,.07); }
nav .nav-links a.active { color: var(--primary); font-weight: 600; }
nav .nav-links a.logout { color: var(--danger); }

/* ── Nav user chip ────────────────────────────────────── */
.nav-user-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  cursor: pointer; position: relative;
  padding: .28rem .65rem; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  transition: background .15s, box-shadow .15s, border-color .15s;
  user-select: none; margin-left: .25rem;
}
.nav-user-chip:hover {
  background: var(--primary-l);
  border-color: rgba(3,97,128,.4);
  box-shadow: 0 2px 8px rgba(3,97,128,.12);
}
.nav-user-chip .nav-user-name {
  font-size: .82rem; font-weight: 600; color: var(--text);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-user-chip .nav-user-role { font-size: .67rem; color: var(--muted); }
.nav-user-chip .nav-chevron { font-size: .68rem; color: var(--muted); transition: transform .2s; }
.nav-user-chip.open .nav-chevron { transform: rotate(180deg); }

/* ── Dropdown ─────────────────────────────────────────── */
.nav-user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 230px; overflow: hidden; z-index: 9999;
  opacity: 0; transform: translateY(-6px) scale(.98);
  pointer-events: none; transition: opacity .15s, transform .15s;
}
.nav-user-chip.open .nav-user-dropdown {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: all;
}
.nav-user-dropdown .nud-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .75rem;
  background: linear-gradient(135deg, var(--primary-l) 0%, #e8f4f8 100%);
}
.nav-user-dropdown .nud-info { flex: 1; min-width: 0; }
.nav-user-dropdown .nud-name {
  font-weight: 700; font-size: .9rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-user-dropdown .nud-email {
  font-size: .72rem; color: var(--muted); margin-top: .1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-user-dropdown .nud-role-badge {
  font-size: .64rem; font-weight: 700; padding: .15rem .45rem; border-radius: 999px;
  background: var(--primary); color: #fff; margin-top: .25rem; display: inline-block;
}
.nav-user-dropdown a, .nav-user-dropdown button.nud-btn {
  display: flex; align-items: center; gap: .65rem;
  padding: .68rem 1.25rem .68rem 1.5rem; font-size: .875rem; color: var(--text);
  text-decoration: none; background: transparent; border: none; width: 100%;
  cursor: pointer; transition: background .12s; text-align: left; font-family: inherit;
}
/* ikony v položkách, fixní šířka zajistí zarovnání pod sebou */
.nav-user-dropdown a > span:first-child,
.nav-user-dropdown button.nud-btn > span:first-child {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.3rem; flex-shrink: 0; font-size: 1rem;
}
.nav-user-dropdown a:hover,
.nav-user-dropdown button.nud-btn:hover { background: var(--primary-l); }
.nav-user-dropdown .nud-separator { height: 1px; background: var(--border); margin: .25rem 0; }
.nav-user-dropdown .nud-logout { color: var(--danger); }
.nav-user-dropdown .nud-logout:hover { background: #fff1f1; color: var(--danger); }

/* ── Studio switcher ──────────────────────────────────── */
.nav-studio-wrap { display: flex; align-items: center; }
.studio-sel {
  background: rgba(3,97,128,.07); color: var(--primary);
  border: 1px solid rgba(3,97,128,.25); border-radius: var(--radius-sm);
  padding: 4px 8px; font-size: .82rem; font-weight: 600;
  cursor: pointer; outline: none; transition: background .15s;
}
.studio-sel:hover { background: rgba(3,97,128,.13); }
.studio-sel option { background: #fff; color: var(--primary); }
.studio-label { color: var(--primary); font-size: .82rem; font-weight: 600; padding: 4px 8px; }
.studio-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--primary); color: #fff; border-radius: 999px;
  padding: 3px 12px; font-size: .75rem; font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════ */
.container { max-width: 960px; margin: 2rem auto; padding: 0 1.25rem; }
.page-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--primary); }

/* ═══════════════════════════════════════════════════════
   CARD
═══════════════════════════════════════════════════════ */
.card {
  background: var(--card); border-radius: 16px;
  border: none;
  box-shadow: 0 4px 16px rgba(3,97,128,.10);
  padding: 1.5rem; margin-bottom: 1rem;
  transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: 0 8px 32px rgba(3,97,128,.14); transform: translateY(-2px); }
.card h3 { margin-bottom: .75rem; color: var(--primary); }

/* Scroll offset pro sticky nav při scrollIntoView */
#customer-detail { scroll-margin-top: 72px; }

/* ═══════════════════════════════════════════════════════
   GRID
═══════════════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════
   FORM
═══════════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; }
label {
  font-size: .88rem; font-weight: 600; color: var(--muted);
  letter-spacing: .2px;
}
input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: .65rem .9rem;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-size: .95rem; font-family: inherit; background: #fff; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  line-height: 1.5;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(3,97,128,.15);
}
input:disabled, select:disabled {
  background: #f3f4f6; color: var(--muted); cursor: not-allowed;
}
textarea { resize: vertical; min-height: 70px; }

/* ═══════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.5rem; border: none; border-radius: 100px;
  cursor: pointer; font-size: .9rem; font-weight: 800;
  font-family: inherit; text-decoration: none;
  transition: all .25s ease;
  white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--accent); color: var(--dark); }
.btn-primary:hover:not(:disabled) {
  background: var(--accent-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(242,168,42,.35);
}
.btn-accent { background: var(--accent); color: var(--dark); }
.btn-accent:hover:not(:disabled) {
  background: var(--accent-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(242,168,42,.35);
}
.btn-secondary { background: var(--primary); color: #fff; }
.btn-secondary:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3,97,128,.35);
}
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary); color: #fff; }
.btn-sm { padding: .4rem 1rem; font-size: .82rem; }
.btn:disabled { opacity: .44; cursor: not-allowed; filter: none !important; box-shadow: none !important; }

/* ═══════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .18rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 700;
}
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: #f3f4f6; color: #6b7280; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-blue   { background: #dbeafe; color: #1e40af; }

/* ═══════════════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════════════ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th {
  background: var(--primary); color: #fff;
  padding: .65rem 1rem; text-align: left;
  font-size: .77rem; text-transform: uppercase;
  letter-spacing: .5px; font-weight: 700;
}
td {
  padding: .6rem 1rem; border-bottom: 1px solid #f0f2f5;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td:not(.wc-closed):not(.wc-outside) { background: #f7fafc; }

/* ═══════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════ */
.tabs {
  display: flex; gap: .5rem; margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}
.tab {
  padding: .6rem 1.25rem; cursor: pointer; font-weight: 600;
  color: var(--muted); border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: color .18s; font-size: .9rem;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.sub-tabs {
  display: flex; gap: .35rem; margin-bottom: 1.25rem;
  border-bottom: 1.5px solid var(--border); flex-wrap: wrap;
}
.sub-tab {
  padding: .45rem 1rem; cursor: pointer; font-weight: 600;
  font-size: .88rem; color: var(--muted);
  border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; transition: color .18s;
}
.sub-tab:hover { color: var(--primary); }
.sub-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ═══════════════════════════════════════════════════════
   PROFILE TABS  (zákaznický profil)
═══════════════════════════════════════════════════════ */
.profile-tabs {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border); padding-bottom: .75rem;
}
.profile-tab {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem 1rem; border: 1.5px solid var(--border); border-radius: 999px;
  background: #fff; cursor: pointer; font-size: .875rem; font-family: inherit;
  color: var(--muted); transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.profile-tab:hover {
  background: var(--primary-l); border-color: rgba(3,97,128,.35); color: var(--primary);
}
.profile-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   BADGE CARDS  (odznaky, profil)
═══════════════════════════════════════════════════════ */
.badges-section-title {
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin: 0 0 .75rem; display: flex; align-items: center; gap: .4rem;
}

.badge-card {
  display: flex; align-items: center; gap: 1rem;
  padding: .9rem 1.1rem; margin-bottom: .6rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s;
}
.badge-card.earned { border-left: 4px solid var(--success); }
.badge-card.locked { opacity: .6; }
.badge-card:hover  { box-shadow: var(--shadow); }

.badge-card-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.55rem; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.badge-card-icon.locked {
  filter: grayscale(1); opacity: .65;
}

.badge-card-body { flex: 1; min-width: 0; }
.badge-card-name { font-weight: 700; font-size: .95rem; color: var(--text); }
.badge-card-desc { font-size: .83rem; color: var(--muted); margin-top: .15rem; line-height: 1.4; }
.badge-card-date { font-size: .78rem; color: var(--success); font-weight: 600; margin-top: .3rem; }
.badge-card-cond { font-size: .78rem; color: var(--muted); margin-top: .3rem; font-style: italic; }

/* Progress bar (uvnitř locked badge) */
.badge-card-progress {
  display: flex; align-items: center; gap: .6rem; margin-top: .45rem;
}
.badge-progress-bar {
  flex: 1; height: 6px; background: #e5e7eb; border-radius: 99px; overflow: hidden;
}
.badge-progress-fill {
  height: 100%; background: var(--primary); border-radius: 99px;
  transition: width .4s ease;
}
.badge-progress-label {
  font-size: .75rem; color: var(--muted); white-space: nowrap; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   GREETING ROW  (pozdrav + odznaky)
═══════════════════════════════════════════════════════ */
.greeting-row {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
}
.greeting-row .page-title { margin: 0; }
.greeting-badge {
  font-size: 1.5rem; text-decoration: none;
  cursor: pointer; transition: transform .15s;
  display: inline-block;
}
.greeting-badge:hover { transform: scale(1.25); }

/* ═══════════════════════════════════════════════════════
   BADGE TEASER  (dashboard widget)
═══════════════════════════════════════════════════════ */
.badge-teaser-card {
  display: flex; align-items: center; gap: 1.25rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: .9rem 1.25rem;
}
.badge-teaser-left {
  display: flex; flex-direction: column; align-items: center;
  gap: .1rem; min-width: 52px;
}
.badge-teaser-count {
  font-family: var(--font); font-size: 2rem; font-weight: 900;
  color: var(--primary); line-height: 1;
}
.badge-teaser-label {
  font-size: .68rem; color: var(--muted); text-align: center; line-height: 1.3;
}
.badge-teaser-middle {
  flex: 1; min-width: 0;
}
.badge-teaser-emojis {
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .4rem;
}
.badge-teaser-next {
  display: flex; align-items: center; gap: .6rem;
}
.badge-teaser-link { flex-shrink: 0; }

@media (max-width: 520px) {
  .badge-teaser-card { flex-wrap: wrap; }
  .badge-teaser-link { width: 100%; text-align: center; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════
   OFFER CARDS  (speciální nabídky)
═══════════════════════════════════════════════════════ */
.offer-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin-bottom: .75rem;
  background: #fff; position: relative;
  box-shadow: var(--shadow-sm); transition: box-shadow .18s;
}
.offer-card:hover { box-shadow: var(--shadow); }
.offer-card.unread { border-left: 4px solid var(--primary); background: #f7fbff; }
.offer-card .offer-title {
  font-weight: 600; font-size: 1rem; margin-bottom: .25rem;
  display: flex; align-items: center; gap: .35rem;
}
.offer-card .offer-perex {
  color: var(--muted); font-size: .88rem;
  margin-bottom: .5rem; line-height: 1.5;
}
.offer-badge {
  display: inline-flex; align-items: center;
  padding: .2rem .55rem; border-radius: 99px;
  font-size: .77rem; font-weight: 700;
}
.offer-badge.percent { background: #dbeafe; color: #1d4ed8; }
.offer-badge.fixed   { background: #dcfce7; color: #15803d; }
.offer-badge.free    { background: #fef9c3; color: #854d0e; }
.offer-badge.info    { background: #f3f4f6; color: #374151; }

.offer-promo-box {
  margin-top: .65rem; background: #f8fafc;
  border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  padding: .55rem .75rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap;
}
.offer-promo-code {
  font-family: 'Courier New', monospace;
  font-size: 1rem; font-weight: 700; letter-spacing: .08em; color: #1d4ed8;
}
.new-dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--primary); flex-shrink: 0;
}
.offer-card.redeemed {
  opacity: .75; border-left: 4px solid #10b981; background: #f0fdf4;
}
.offer-card.redeemed:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   REFERRAL  (doporuč kamaráda)
═══════════════════════════════════════════════════════ */
.referral-code-box {
  background: var(--primary-l); border: 2px dashed #93c5fd;
  border-radius: var(--radius); padding: 1.25rem;
  text-align: center; margin: 1rem 0;
}
.referral-code {
  font-family: 'Courier New', monospace;
  font-size: 1.5rem; font-weight: 700; letter-spacing: .12em; color: var(--primary-d);
}
.referral-stats-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: .75rem; margin: 1rem 0;
}
.referral-stat-box {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: .85rem .75rem; text-align: center; box-shadow: var(--shadow-sm);
}
.referral-stat-value {
  font-size: 1.6rem; font-weight: 700; color: var(--primary); line-height: 1.1;
}
.referral-stat-label { font-size: .73rem; color: var(--muted); margin-top: .25rem; line-height: 1.3; }
@media (max-width: 480px) { .referral-stats-grid { grid-template-columns: 1fr; } }

/* ── Referral share buttons ──────────────────────────────── */
.referral-share-buttons {
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.btn-share {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .85rem;
  border: none; border-radius: var(--radius);
  font-size: .82rem; font-weight: 500;
  cursor: pointer; transition: opacity .18s;
  color: #fff; line-height: 1;
}
.btn-share:hover { opacity: .85; }
.btn-share-link      { background: #6b7280; color: #fff; }
.btn-share-facebook  { background: #1877F2; }
.btn-share-whatsapp  { background: #25D366; }
.btn-share-x         { background: #000; }

/* Platform tab buttons */
.share-platform-tab.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}
.share-platform-tab:not(.active):hover {
  background: #f3f4f6 !important;
}

/* ═══════════════════════════════════════════════════════
   AUTH PAGE
═══════════════════════════════════════════════════════ */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 1rem;
  background:
    radial-gradient(circle at 10% 14%, rgba(242,168,42,.22) 0, rgba(242,168,42,.22) 150px, transparent 151px),
    radial-gradient(circle at 20% 30%, rgba(3,97,128,.08) 0, rgba(3,97,128,.08) 90px, transparent 91px),
    radial-gradient(circle at 90% 86%, rgba(3,97,128,.12) 0, rgba(3,97,128,.12) 220px, transparent 221px),
    radial-gradient(circle at 82% 12%, rgba(79,184,212,.20) 0, rgba(79,184,212,.20) 100px, transparent 101px),
    var(--primary-l);
}
/* Odznak „Funguje s vaším AI asistentem · MCP“ pod přihlašovací kartou */
.auth-wrap { flex-direction: column; }
.ai-badge-wrap { margin-top: 24px; text-align: center; max-width: 420px; width: 100%; }
.ai-badge-wrap a { display: inline-block; line-height: 0; border-radius: 20px; }
.ai-badge-wrap a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.ai-badge-wrap img { width: 260px; max-width: 100%; height: auto; }
.ai-badge-wrap p { margin: 8px auto 0; max-width: 340px; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.auth-box {
  background: #fff; border-radius: 24px;
  padding: 2.5rem; width: 100%; max-width: 420px;
  box-shadow: 0 8px 32px rgba(3,97,128,.14);
  border-top: 5px solid var(--accent);
}
.auth-box h1 { text-align: center; margin-bottom: .25rem; }
.auth-box h1 .auth-logo { height: 56px; width: auto; display: inline-block; border-radius: 8px; }
.auth-box .subtitle { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.auth-toggle { text-align: center; margin-top: 1rem; font-size: .9rem; }
.auth-toggle a { color: var(--primary); cursor: pointer; font-weight: 600; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }

/* ── OAuth buttons ──────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.25rem 0;
  color: var(--muted); font-size: .82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.oauth-buttons {
  display: flex; flex-direction: column; gap: .6rem;
}

.btn-oauth {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; padding: .65rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--text);
  font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: all .18s;
}
.btn-oauth:hover {
  border-color: var(--primary); background: var(--primary-l, #f0f7ff);
}
.btn-oauth svg { flex-shrink: 0; }

.btn-google:hover { border-color: #4285F4; background: #f0f7ff; }
.btn-meta:hover   { border-color: #1877F2; background: #f0f5ff; }

/* ═══════════════════════════════════════════════════════
   SLOTS
═══════════════════════════════════════════════════════ */
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px,1fr)); gap: .5rem; margin-top: 1rem; }
.slot {
  padding: .45rem; text-align: center;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  cursor: pointer; font-size: .9rem; transition: all .18s;
}
.slot.available:hover { border-color: var(--primary); background: var(--primary-l); }
.slot.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.slot.unavailable { background: #f3f4f6; color: #b0b7c3; cursor: not-allowed; text-decoration: line-through; }

/* ═══════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════ */
.alert {
  padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem;
  font-size: .9rem; border: 1px solid;
}
.alert-error   { background: #fff1f1; color: #991b1b; border-color: #fca5a5; }
.alert-success { background: #f0fdf4; color: #166534; border-color: #86efac; }
.alert-info    { background: #eff6ff; color: #1e40af; border-color: #93c5fd; }
.alert-warning { background: #fff3d6; color: var(--dark); border-color: var(--accent); line-height: 1.5; }
.alert-warning a { color: var(--primary); font-weight: 700; overflow-wrap: anywhere; }

/* ═══════════════════════════════════════════════════════
   RESERVATION CARD
═══════════════════════════════════════════════════════ */
.res-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; margin-bottom: .6rem;
  box-shadow: var(--shadow-sm); transition: box-shadow .18s;
}
.res-card:hover { box-shadow: var(--shadow); }
.res-card .res-info .date { font-weight: 700; font-size: 1rem; }
.res-card .res-info .meta { font-size: .85rem; color: var(--muted); }
.res-card .res-actions { display: flex; gap: .5rem; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   CALENDAR
═══════════════════════════════════════════════════════ */
.cal-nav { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.cal-nav .cal-month { font-weight: 700; font-size: 1.05rem; min-width: 160px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day-header {
  text-align: center; font-size: .73rem; font-weight: 700;
  color: var(--muted); padding: .3rem 0; text-transform: uppercase;
}
.cal-day {
  text-align: center; padding: .5rem .3rem; border-radius: var(--radius-sm);
  cursor: pointer; font-size: .88rem; transition: background .15s;
}
.cal-day:hover:not(.empty):not(.past) { background: var(--primary-l); }
.cal-day.today { background: var(--primary); color: #fff; font-weight: 700; }
.cal-day.selected { background: var(--accent); color: #fff; }
.cal-day.empty, .cal-day.past { color: #c8d0db; cursor: default; }
.cal-day.closed { color: #9aa5b4; text-decoration: line-through; background: repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 3px,#e9ecf0 3px,#e9ecf0 7px); }
.cal-day.closed.selected { background: #9aa5b4; color: #fff; text-decoration: none; }
.cal-legend { grid-column: 1 / -1; display: flex; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .75rem; color: var(--muted); }
.cal-legend-swatch { width: 14px; height: 14px; border-radius: 3px; background: repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 3px,#d9dee5 3px,#d9dee5 7px); border: 1px solid #d9dee5; }
.cal-closed-note { padding: .7rem .9rem; border-radius: var(--radius-sm); background: #f3f4f6; color: #4b5563; font-size: .9rem; font-weight: 600; }
.cal-day.has-res { position: relative; }
.cal-day.has-res::after {
  content: ''; position: absolute; bottom: 3px; left: 50%;
  transform: translateX(-50%); width: 5px; height: 5px;
  background: var(--accent); border-radius: 50%;
}

/* ═══════════════════════════════════════════════════════
   SPINNER
═══════════════════════════════════════════════════════ */
.spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 3px solid #e5e7eb; border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: .4; }

/* ═══════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════ */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; background: #fff; border-radius: 16px;
  padding: 1.75rem; width: 95%; max-width: 580px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-header h3 { color: var(--primary); font-size: 1.15rem; }
.modal-close {
  background: none; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .28rem .7rem; cursor: pointer; font-size: .85rem; transition: background .15s;
}
.modal-close:hover { background: #f3f4f6; }

/* ═══════════════════════════════════════════════════════
   PAYMENT MODAL
═══════════════════════════════════════════════════════ */
.payment-method-btn {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1.15rem; border: 2px solid var(--border); border-radius: var(--radius-lg);
  background: #fff; cursor: pointer; transition: all .15s;
  font-family: inherit; font-weight: 600; font-size: .88rem; color: var(--text);
}
.payment-method-btn:hover {
  border-color: var(--primary); background: var(--primary-l);
}
.payment-method-btn.selected {
  border-color: var(--primary); background: var(--primary-l);
  box-shadow: 0 0 0 3px rgba(3,97,128,.15);
}

/* ═══════════════════════════════════════════════════════
   WEEKLY CALENDAR  (admin)
═══════════════════════════════════════════════════════ */
.week-cal-outer { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
/* Pevná šířka sloupců (jako Reservanto): sloupce se neroztahují podle jmen, dlouhé jméno končí třemi tečkami */
.week-cal-table { border-collapse: collapse; font-size: .72rem; white-space: nowrap; table-layout: fixed; }
.week-cal-table th, .week-cal-table td { border: 1px solid #e5e7eb; padding: 0; }
.week-cal-table thead tr { border-bottom: 3px solid var(--primary); }
.week-cal-table tbody tr { border-bottom: 2px solid #94a3b8; }
.wc-corner { width: 72px; min-width: 72px; background: var(--primary); position: sticky; left: 0; z-index: 6; }
.wc-time-th { width: 140px; min-width: 140px; max-width: 140px; text-align: center; padding: 5px 2px; background: #f8f9fa; font-weight: 600; line-height: 1.2; overflow: hidden; }
.wc-th-start { display: block; font-size: .82rem; color: var(--text); }
.wc-th-end   { display: block; font-size: .68rem; color: var(--muted); }
.wc-day-td { width: 72px; min-width: 72px; height: 72px; padding: 4px 6px; background: #f8f9fa; position: sticky; left: 0; z-index: 5; border-right: 2px solid var(--border); vertical-align: middle; text-align: center; display: table-cell; }
.wc-day-abbr  { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; line-height: 1.2; }
.wc-day-num   { display: block; font-size: 1.45rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.wc-day-month { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); line-height: 1.2; }
.wc-cell { width: 140px; min-width: 140px; height: 72px; cursor: pointer; text-align: center; vertical-align: top; overflow: hidden; }
.wc-cell:hover:not(.wc-outside):not(.wc-closed) { box-shadow: inset 0 0 0 9999px rgba(0,0,0,.07); }
.wc-outside { background: repeating-linear-gradient(45deg,#e5e7eb,#e5e7eb 3px,#f3f4f6 3px,#f3f4f6 8px); cursor: default; position: relative; z-index: 2; }
.wc-closed  { background: repeating-linear-gradient(-45deg,#d1d5db,#d1d5db 3px,#f3f4f6 3px,#f3f4f6 8px); cursor: pointer; position: relative; z-index: 2; }
.wc-outside.wc-outside-bookable { cursor: pointer; }
.wc-outside.wc-outside-bookable:hover { box-shadow: inset 0 0 0 9999px rgba(0,0,0,.07); }
.wc-day-holiday { display: inline-block; margin-top: 2px; padding: 0 4px; border-radius: 4px; background: #fee2e2; color: #991b1b; font-size: .62rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.wc-closed-day { background: #f3f4f6; color: var(--muted); text-align: center; font-size: .8rem; padding: 8px; font-style: italic; }
.wc-cell-inner { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; height: 72px; gap: 0; padding: 4px 6px; min-width: 0; max-width: 100%; overflow: hidden; }
.wc-name { display: flex; align-items: center; gap: 3px; font-size: .74rem; line-height: 1.35; width: 100%; min-width: 0; text-align: left; color: #1e293b; font-weight: 600; cursor: grab; }
.wc-name[draggable="true"]:active { cursor: grabbing; }
.wc-name-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-name + .wc-name { border-top: 1px solid rgba(0,0,0,.12); margin-top: 3px; padding-top: 3px; }
.wc-count { font-size: .68rem; font-weight: 700; line-height: 1; flex-shrink: 0; }
.wc-tdot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.wc-pay-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-left: 3px; vertical-align: middle; flex-shrink: 0; }
.wc-dragging { opacity: 0.45; }
.wc-drag-over { box-shadow: inset 0 0 0 9999px rgba(99,102,241,.18) !important; outline: 2px solid var(--primary); outline-offset: -2px; }
/* Úvodní trénink (60 min): výrazný oranžový rámeček */
.wc-type-b { outline: 4px solid #f97316; outline-offset: -4px; background-color: #fff7ed; }
.wc-name-done .wc-name-text { text-decoration: line-through; opacity: .6; }
.wc-quick-done {
  display: flex; width: 15px; height: 15px; border-radius: 50%;
  background: #e5e7eb; color: #6b7280; font-size: .6rem; font-weight: 900;
  cursor: pointer; flex-shrink: 0; align-items: center; justify-content: center;
  border: none; padding: 0; line-height: 1; transition: background .12s, opacity .12s;
  opacity: 0; pointer-events: none;
}
.wc-name:hover .wc-quick-done { opacity: 1; pointer-events: auto; }
.wc-quick-done.wc-qd-done { opacity: 1; pointer-events: auto; background: #16a34a; color: #fff; }
.wc-quick-done:hover { background: #16a34a !important; color: #fff !important; }

/* ═══════════════════════════════════════════════════════
   CALENDAR VIEW TOGGLE (Dnes / Týden)
═══════════════════════════════════════════════════════ */
.cal-view-toggle { display: flex; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cvt-btn { padding: .4rem 1rem; font-size: .88rem; font-weight: 600; border: none; background: transparent; cursor: pointer; color: var(--muted); transition: all .15s; white-space: nowrap; }
.cvt-btn + .cvt-btn { border-left: 1.5px solid var(--border); }
.cvt-btn.active { background: var(--primary); color: #fff; }
.cvt-btn:not(.active):hover { background: var(--primary-l); color: var(--primary); }

/* ═══════════════════════════════════════════════════════
   TODAY VIEW
═══════════════════════════════════════════════════════ */
.today-view { max-width: 780px; }
.today-view-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  padding: .6rem 0 .75rem; margin-bottom: .75rem; border-bottom: 2px solid var(--primary);
}
.today-header-left { display: flex; align-items: baseline; gap: .6rem; }
.today-header-day  { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.today-header-date { font-size: .92rem; color: var(--muted); }
.today-header-stats { display: flex; align-items: baseline; gap: .3rem; }
.today-stat-done  { font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.today-stat-label { font-size: .78rem; color: var(--muted); }

.today-slot-item {
  display: flex; margin-bottom: .4rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: #fff; overflow: hidden;
  transition: box-shadow .12s; min-height: 82px; align-items: stretch;
}
.today-slot-item:hover { box-shadow: var(--shadow); }
.tsi-current { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.tsi-past { opacity: .5; }
.tsi-closed { opacity: .35; }
.tsi-type-b { border-color: #f97316; border-width: 4px; background: #fff7ed; }
.mobile-slot-type-b { border-left: 6px solid #f97316 !important; background: #fff7ed; }
.today-slot-item.today-drag-over { background: #f0fdf4; border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.3); }

.today-time-col {
  width: 68px; min-width: 68px; padding: .5rem .4rem; background: #f8f9fa;
  text-align: center; border-right: 1.5px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.tts { font-size: .98rem; font-weight: 800; color: var(--primary); }
.tte { font-size: .65rem; color: var(--muted); }
.today-now-badge { font-size: .58rem; font-weight: 800; color: var(--primary); background: var(--primary-l); border-radius: 3px; padding: 1px 3px; margin-top: 2px; }

/* Čtvercové buttony trenéra */
.today-sq-col {
  display: flex; flex-direction: row; gap: 5px; justify-content: center; align-items: center;
  padding: .4rem .5rem; border-left: 1px solid var(--border); background: #f8fafc;
  width: 110px; min-width: 110px;
}
.tsq-trainer {
  width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 800; color: #fff; letter-spacing: .03em;
  position: relative; flex-shrink: 0; user-select: none; border: none;
}
.tsq-trainer-btn { cursor: pointer; touch-action: manipulation; transition: opacity .12s; }
.tsq-trainer-btn:hover { opacity: .75; }
.tsq-trainer.tsq-empty {
  background: #e2e8f0; color: #94a3b8;
  background-image: repeating-linear-gradient(
    135deg, transparent, transparent 6px, rgba(148,163,184,.35) 6px, rgba(148,163,184,.35) 7px
  );
}
.tsq-ja {
  width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; cursor: pointer; border: 2px solid var(--primary);
  background: var(--primary); color: #fff; touch-action: manipulation; flex-shrink: 0;
  transition: opacity .12s;
}
.tsq-ja:hover { opacity: .85; }
.tsq-ja.tsq-ja-sub { background: #fff; color: #64748b; border-color: #cbd5e1; }
.tsq-ja.tsq-ja-sub:hover { background: #f1f5f9; border-color: #94a3b8; }

.today-body { flex: 1; padding: .4rem .55rem; min-width: 0; overflow: hidden; }
.today-empty-row { color: var(--muted); font-size: .84rem; font-style: italic; display: flex; align-items: center; justify-content: space-between; padding: .25rem 0; }

.today-client-row {
  display: flex; align-items: center; gap: .5rem; padding: .3rem .45rem;
  border-radius: 6px; background: #f9fafb; margin-bottom: .25rem;
  transition: background .12s; cursor: pointer;
}
.today-client-row:hover { background: #eff6ff; }
.today-client-row:last-child { margin-bottom: 0; }
.tci-done { background: #f0fdf4; }
.tci-done:hover { background: #dcfce7; }
.today-client-info { flex: 1; min-width: 0; }
.today-client-name { font-size: .88rem; font-weight: 700; display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.today-client-meta { font-size: .7rem; color: var(--muted); margin-top: 1px; }
.today-rem-badge { font-size: .65rem; font-weight: 700; color: #fff; background: var(--primary); border-radius: 99px; padding: 1px 6px; }
.today-rem-badge.low { background: #dc2626; }
.today-xy-count { font-size: .72rem; color: var(--muted); font-weight: 600; }

/* Platební badge, oba pohledy */
.pay-badge { font-size: .72rem; font-weight: 700; border-radius: 3px; padding: 1px 4px; white-space: nowrap; }
.pay-ok  { color: #15803d; background: #dcfce7; }
.pay-no  { color: #dc2626; background: #fee2e2; }

.today-complete-btn {
  flex-shrink: 0; padding: .5rem .9rem; border: 2px solid #22c55e; border-radius: var(--radius);
  font-size: .82rem; font-weight: 700; cursor: pointer; background: #fff; color: #16a34a;
  transition: all .15s; white-space: nowrap;
}
.today-complete-btn:hover:not(:disabled) { background: #16a34a; color: #fff; }
.today-complete-btn.done { background: #16a34a; color: #fff; border-color: #16a34a; }
.today-complete-btn.done:hover:not(:disabled) { background: #15803d; border-color: #15803d; }
.today-complete-btn:disabled { opacity: .5; cursor: default; }

/* Hover popover na rezervaci v kalendáři (Reservanto-style) */
#wc-popover {
  display: none; position: fixed; z-index: 9999; min-width: 240px; max-width: 300px;
  background: #fff; border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); overflow: visible;
  font-size: .82rem; line-height: 1.5; text-align: left;
  pointer-events: none;
}
#wc-popover.visible { display: block; }
#wc-popover .pop-arrow {
  position: absolute; border-top: 8px solid transparent; border-bottom: 8px solid transparent;
  transform: translateY(-50%);
}
/* Arrow points LEFT (popover is to the right of the name) */
#wc-popover .pop-arrow.arrow-left  { left: -8px; border-right: 8px solid var(--primary); }
/* Arrow points RIGHT (popover is to the left of the name) */
#wc-popover .pop-arrow.arrow-right { right: -8px; border-left: 8px solid var(--primary); }
#wc-popover .pop-inner { border-radius: 8px; overflow: hidden; }
#wc-popover .pop-header {
  background: var(--primary); color: #fff; padding: 6px 12px;
  font-weight: 700; font-size: .82rem;
}
#wc-popover .pop-body { padding: 8px 12px; }
#wc-popover .pop-row { display: flex; justify-content: space-between; align-items: center; padding: 2px 0; }
#wc-popover .pop-label { color: var(--muted); font-size: .76rem; }
#wc-popover .pop-val { font-weight: 600; font-size: .82rem; }
#wc-popover .pop-client {
  background: #f1f5f9; border-radius: 4px; padding: 4px 8px; margin: 5px 0;
  font-weight: 700; font-size: .85rem;
}
#wc-popover .pop-pay { font-weight: 600; font-size: .78rem; }
#wc-popover .pop-pay.paid { color: #16a34a; }
#wc-popover .pop-pay.unpaid { color: #e84545; }
#wc-popover .pop-pay.partial { color: #d97706; }
#wc-popover .pop-sep { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* ═══════════════════════════════════════════════════════
   TRAINER
═══════════════════════════════════════════════════════ */
.trainer-swatch {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-block; vertical-align: middle; margin-right: .4rem;
  border: 2px solid rgba(0,0,0,.12);
}

/* ═══════════════════════════════════════════════════════
   SLOT DETAIL RESERVATION CARD
═══════════════════════════════════════════════════════ */
.slot-res-card {
  display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .65rem 1rem; margin-bottom: .5rem; background: #fafafa;
}
.slot-res-card .info { display: flex; flex-direction: column; gap: 1px; }
.slot-res-card .info strong { display: block; font-size: .9rem; }
.slot-res-card .info small { color: var(--muted); font-size: .8rem; display: block; }
.slot-trainer-avatar { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   AVATAR  (profil)
═══════════════════════════════════════════════════════ */
#profile-avatar-preview { transition: opacity .15s; cursor: pointer; }
#profile-avatar-preview:hover { opacity: .83; }
#profile-avatar-picker { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════════════════
   HAMBURGER NAVIGACE
═══════════════════════════════════════════════════════ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .22s, opacity .22s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay (zatmavení pozadí) při otevřeném menu */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 198;
}
.nav-overlay.open { display: block; }

/* ═══════════════════════════════════════════════════════
   MOBILNÍ BREAKPOINTY
═══════════════════════════════════════════════════════ */

/* ── 768 px: tablet/mobil ── */
@media (max-width: 768px) {

  /* NAV, hamburger layout */
  nav { padding: 0 1rem; }

  .nav-hamburger { display: flex; }

  #nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 3px solid var(--primary);
    box-shadow: var(--shadow-md);
    padding: .75rem 1.25rem 1rem;
    z-index: 199;
    flex-direction: column;
    gap: 0;
  }
  nav { position: relative; }
  nav.nav-open #nav-links { display: flex; }

  /* Studio wrap v mobilním menu */
  #nav-links .nav-studio-wrap { order: -1; margin-bottom: .75rem; padding-bottom: .65rem; border-bottom: 1px solid var(--border); }

  /* Navigační linky v mobilním menu */
  #nav-links > a {
    padding: .7rem .25rem;
    font-size: .95rem;
    border-bottom: 1px solid #f0f2f5;
  }
  #nav-links > a:last-of-type { border-bottom: none; }

  /* User chip, celá šířka */
  .nav-user-chip {
    width: 100%;
    margin: .65rem 0 0;
    border-radius: var(--radius);
    padding: .5rem .85rem;
  }
  .nav-user-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0; right: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    min-width: 0;
    max-height: 85vh;
    overflow-y: auto;
  }

  /* LAYOUT */
  .container { padding: 0 .85rem; margin: 1.25rem auto; }

  /* GRIDS */
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  /* PAGE TITLE */
  .page-title { font-size: 1.25rem; }

  /* TABS, scrollovat vodorovně místo wrappování */
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: .25rem;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex-shrink: 0; padding: .55rem .9rem; font-size: .83rem; }

  .sub-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sub-tabs::-webkit-scrollbar { display: none; }
  .sub-tab { white-space: nowrap; flex-shrink: 0; }

  /* Profile tabs, scrollovat */
  .profile-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .5rem;
    gap: .35rem;
  }
  .profile-tabs::-webkit-scrollbar { display: none; }
  .profile-tab { flex-shrink: 0; }

  /* MODÁLY, fullscreen na mobilu */
  .modal-box {
    width: 100%;
    max-width: 100%;
    max-height: 100dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: auto 0 0;
    overflow-y: auto;
    padding: 1.25rem 1rem 2rem;
  }
  .modal { align-items: flex-end; }

  /* Rezervační modal v dashboard.html (inline styled) */
  #slot-modal > div.card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 92dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: auto 0 0;
    padding: 1rem .85rem 1.5rem;
  }

  /* GRID-2 uvnitř modálního kalendáře */
  .modal-box .grid-2,
  .modal-box > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr;
  }

  /* TABLE, horizontální scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap::after {
    content: '← →';
    display: block;
    text-align: right;
    font-size: .68rem;
    color: var(--muted);
    padding: .2rem .5rem;
    opacity: .7;
  }

  /* RES-CARD, stack na mobilu */
  .res-card { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .res-card .res-actions { width: 100%; justify-content: flex-end; }

  /* Slot detail card */
  .slot-res-card { flex-wrap: wrap; }

  /* Autentizační stránka */
  .auth-box { padding: 1.75rem 1.1rem; }

  /* Admin: přepsat inline max-width:1300px na full-width */
  .container[style*="max-width:1300px"],
  .container[style*="max-width: 1300px"] {
    max-width: 100% !important;
  }

  /* Greeting badge row */
  .greeting-row { gap: .4rem; }

  /* Admin studio selector wrap */
  div[style*="display:flex"][style*="STUDIO"] {
    flex-wrap: wrap; gap: .5rem;
  }
}

/* ── 480 px: malý telefon ── */
@media (max-width: 480px) {

  /* Gridy → 1 sloupec */
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }

  /* Inputy, zabránit automatickému zoomu na iOS */
  input, select, textarea { font-size: 16px !important; }

  /* Tlačítka v řadě, zabalit na nový řádek */
  .modal-box > div[style*="display:flex"][style*="gap"] { flex-wrap: wrap; }

  /* Card */
  .card { padding: 1rem .85rem; }

  /* Badge teaser */
  .badge-teaser-card { flex-direction: column; gap: .75rem; }

  /* Auth box */
  .auth-box { margin: 0; border-radius: 0; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
  .auth-wrap { padding: 0; align-items: stretch; }
  .ai-badge-wrap { max-width: none; padding: 0 16px 24px; box-sizing: border-box; }

  /* Grids in admin reports */
  div[style*="grid-template-columns:1fr 1fr"] { display: flex !important; flex-direction: column !important; }
}

/* ── Mobilní týdenní kalendář (list view), vždy skryt, na mobilu se zobrazuje desktopová tabulka ── */
.mobile-cal-wrap { display: none !important; }

.mobile-day-block {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.mobile-day-header {
  background: var(--primary);
  color: #fff;
  padding: .5rem 1rem;
  font-weight: 700;
  font-size: .88rem;
}
.mobile-slot-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .55rem 1rem;
  border-bottom: 1px solid #f0f2f5;
  cursor: pointer;
  transition: background .12s;
}
.mobile-slot-row:last-child { border-bottom: none; }
.mobile-slot-row:hover { background: var(--primary-l); }
.mobile-slot-row.slot-closed { background: #f3f4f6; cursor: pointer; opacity: .75; }
.mobile-slot-row.slot-outside { background: repeating-linear-gradient(45deg,#f3f4f6,#f3f4f6 3px,#e5e7eb 3px,#e5e7eb 8px); cursor: default; pointer-events: none; }
.mobile-slot-row.slot-outside.slot-outside-bookable { cursor: pointer; pointer-events: auto; }
.mobile-slot-time { font-size: .88rem; font-weight: 700; color: var(--primary); min-width: 60px; padding-top: 2px; line-height: 1.25; }
.mobile-slot-end-time { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); }
.mobile-slot-body { flex: 1; min-width: 0; }
.mobile-slot-names { font-size: .85rem; font-weight: 600; }
.mobile-slot-trainer { font-size: .75rem; color: var(--muted); margin-top: .1rem; }
.mobile-slot-empty { font-size: .8rem; color: var(--muted); font-style: italic; }

/* ── Otevírací doba, toggle switch + řádky ──────────────────────────────── */
.oh-row {
  display: grid;
  grid-template-columns: 88px 46px 68px 1fr;
  align-items: center;
  gap: .6rem;
  padding: .3rem .75rem;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.oh-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.oh-row.oh-closed { opacity: .45; }
.oh-day { font-weight: 600; font-size: .88rem; }
.oh-day.oh-weekend { color: var(--muted); }

/* Toggle switch */
.oh-toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.oh-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.oh-knob {
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 99px;
  transition: background .2s;
  flex-shrink: 0;
}
.oh-knob::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.oh-toggle input:checked ~ .oh-knob { background: var(--success); }
.oh-toggle input:checked ~ .oh-knob::after { transform: translateX(18px); }

.oh-status {
  font-size: .78rem;
  font-weight: 600;
  color: var(--success);
}
.oh-status.closed { color: var(--muted); }

.oh-times {
  display: flex; align-items: center; gap: .4rem; flex-wrap: nowrap;
  transition: opacity .2s;
}
.oh-times input[type="time"] { width: 118px; }

@media (max-width: 640px) {
  .oh-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "day  toggle"
      "times times";
    gap: .4rem;
  }
  .oh-day    { grid-area: day; }
  .oh-toggle { grid-area: toggle; justify-self: end; }
  .oh-status { display: none; }
  .oh-times  { grid-area: times; }
}

/* ── Quill WYSIWYG editor, integrace do designu BEDR ─────────────────────── */
.ql-toolbar.ql-snow {
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: #f9fafb;
  font-family: inherit;
}
.ql-container.ql-snow {
  border: 1.5px solid var(--border);
  border-radius: 0 0 6px 6px;
  font-family: inherit;
  font-size: .9rem;
}
.ql-editor { min-height: 220px; }
.ql-editor p { margin-bottom: .4rem; }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle-switch:has(input:checked) {
  background: var(--primary);
}
.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch:has(input:checked) .toggle-knob {
  transform: translateX(16px);
}

/* Blinking indicator for tasks */
@keyframes blink-red {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .2; }
}

/* ═══════════════════════════════════════════════════════
   FOOTER (stejný jako bedr.cz)
═══════════════════════════════════════════════════════ */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.8);
  padding: 60px 5% 30px;
  margin-top: 3rem;
}
.footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto 48px;
}
.footer-brand p { font-size: .9rem; line-height: 1.7; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: .9rem; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-contact-item { display: flex; align-items: flex-start; gap: 8px; font-size: .9rem; margin-bottom: 8px; }
.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: .85rem;
  opacity: .6;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}


/* Odznaky: řádek se sérií (přehled i profil) */
.badge-streak-line { font-size: .82rem; color: var(--text); margin: .35rem 0 .1rem; line-height: 1.35; }
#badges-streak .badge-streak-line { padding: .6rem .8rem; background: var(--bg, #f8fafc); border: 1px solid var(--border); border-radius: var(--radius); }

/* ── Partnerský program (B2B) na přehledu klienta ─────────────────────────── */
.b2b-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 1.1rem;
  margin: .25rem 0 1rem; padding: 1rem 1.25rem;
  border-radius: 14px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #0b7ea3 0%, #036180 45%, #0f2a35 100%);
  box-shadow: 0 6px 18px rgba(3, 97, 128, .22);
}
.b2b-card::after {             /* jemný lesk */
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 55%; height: 180%;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.10) 50%, transparent 60%);
  transform: rotate(8deg); pointer-events: none;
}
.b2b-card-seal {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  background: linear-gradient(145deg, #f7c65a, #F2A82A 55%, #d98f14);
  color: #2b1a00; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.25);
  font-weight: 900; line-height: 1;
}
.b2b-card-seal b { font-size: 1.25rem; letter-spacing: -.02em; }
.b2b-card-seal small { font-size: .55rem; font-weight: 800; letter-spacing: .08em; margin-top: .15rem; }
.b2b-card-body { min-width: 0; flex: 1; position: relative; z-index: 1; }
.b2b-card-label { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #ffd98a; }
.b2b-card-title { font-size: 1.25rem; font-weight: 900; margin: .1rem 0 .2rem; line-height: 1.2; }
.b2b-card-title .x { color: #ffd98a; font-weight: 700; margin: 0 .3rem; }
.b2b-card-text { font-size: .86rem; color: #d7eef5; line-height: 1.45; }
.b2b-card.is-new { animation: b2bPop .7s cubic-bezier(.2,.9,.3,1.3) both; }
.b2b-card.is-new .b2b-card-seal { animation: b2bSpin 1.1s ease-out .2s both; }
@keyframes b2bPop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes b2bSpin { from { transform: rotate(-200deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 520px) {
  .b2b-card { gap: .8rem; padding: .85rem 1rem; }
  .b2b-card-seal { width: 52px; height: 52px; }
  .b2b-card-seal b { font-size: 1.05rem; }
  .b2b-card-title { font-size: 1.08rem; }
}
@media (prefers-reduced-motion: reduce) { .b2b-card.is-new, .b2b-card.is-new .b2b-card-seal { animation: none; } }

/* ─── Dárkový poukaz: volby jako dlaždice, zaškrtávátka ─── */
.gv-seg { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.gv-opt { position: relative; display: block; margin: 0; cursor: pointer; }
.gv-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; border: 0; pointer-events: none; }
.gv-opt > span {
  display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; height: 100%;
  padding: .5rem .6rem; border: 2px solid var(--border); border-radius: var(--radius); background: #fff;
  font-size: .88rem; font-weight: 500; color: var(--text); text-align: center; line-height: 1.25;
  text-transform: none; letter-spacing: 0; transition: border-color .15s, background .15s, color .15s;
}
.gv-opt:hover > span { border-color: #b9c6cf; }
.gv-opt input:checked + span { border-color: var(--primary); background: rgba(3,97,128,.07); color: var(--primary); font-weight: 600; }
.gv-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(3,97,128,.2); }
.gv-designs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.gv-design > span { flex-direction: column; justify-content: flex-start; gap: .35rem; padding: .4rem .4rem .5rem; font-size: .8rem; }
.gv-sw { display: flex; align-items: center; justify-content: center; width: 100%; height: 34px; border-radius: 6px; font-size: 1.05rem; }
.gv-check {
  display: flex; align-items: center; gap: .6rem; margin: 0; cursor: pointer;
  font-size: .9rem; font-weight: 400; color: var(--text); text-transform: none; letter-spacing: 0;
}
.gv-check input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--primary); cursor: pointer; }
@media (max-width: 480px) { .gv-designs { grid-template-columns: repeat(2, 1fr); } }

/* ─── Kruhový trénink: oranžová, ať je oddělený od EMS ─── */
:root { --cx: #ea7a1a; --cx-dark: #c2410c; --cx-bg: #fff6ed; --cx-border: #fbd5b0; }
.tab.tab-circuit { color: var(--cx-dark); }
.tab.tab-circuit.active { border-bottom-color: var(--cx); color: var(--cx-dark); }
.cx-pill { display: inline-block; background: var(--cx); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .08em; padding: .18rem .55rem; border-radius: 999px; }
.btn.cx-btn { background: var(--cx); color: #fff; border: 2px solid var(--cx); }
.btn.cx-btn:hover { background: var(--cx-dark); border-color: var(--cx-dark); }
.btn.cx-btn:disabled { opacity: .55; cursor: not-allowed; }
.cx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--cx-bg), #fff); border: 1px solid var(--cx-border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.cx-nav { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cx-day { margin-bottom: 1.25rem; }
.cx-day-title { font-weight: 800; text-transform: capitalize; color: var(--cx-dark); margin-bottom: .5rem; }
.cx-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .75rem; }
.cx-card { background: #fff; border: 1.5px solid var(--cx-border); border-left: 5px solid var(--cx); border-radius: var(--radius); padding: .8rem .9rem; }
.cx-card.cx-past { opacity: .8; }
.cx-card.cx-cancelled { border-color: var(--border); border-left-color: #cbd5e1; opacity: .6; }
.cx-card-top { display: flex; justify-content: space-between; gap: .5rem; }
.cx-time { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.cx-count { font-size: 1.2rem; font-weight: 800; color: var(--cx-dark); }
.cx-sub { font-size: .78rem; color: var(--muted); }
.cx-bar { height: 6px; background: #f1f5f9; border-radius: 99px; overflow: hidden; margin: .5rem 0; }
.cx-bar span { display: block; height: 100%; background: var(--cx); border-radius: 99px; }
.cx-people { list-style: none; margin: .35rem 0; padding: 0; }
.cx-people li { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .3rem 0; border-top: 1px dashed #f1e2d3; font-size: .88rem; }
.cx-people li.cx-no .cx-name { text-decoration: line-through; color: var(--muted); }
.cx-name { font-weight: 600; color: var(--text); text-decoration: none; }
.cx-name:hover { color: var(--cx-dark); }
.cx-acts { margin-left: auto; display: flex; gap: .2rem; }
.cx-mini { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: .05rem .4rem; cursor: pointer; font-size: .8rem; line-height: 1.4; }
.cx-mini:hover { border-color: var(--cx); }
.cx-tag { font-size: .68rem; font-weight: 700; border-radius: 999px; padding: .05rem .45rem; }
.cx-tag-wait { background: #fef3c7; color: #92400e; }
.cx-tag-no { background: #fee2e2; color: #991b1b; }
.cx-card-actions { display: flex; gap: .4rem; margin-top: .5rem; }
.cx-empty { text-align: center; color: var(--muted); padding: 2rem 1rem; border: 2px dashed var(--cx-border); border-radius: var(--radius); background: var(--cx-bg); }
.cx-dows { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.cx-dows .gv-opt > span { min-height: 38px; padding: .3rem; }
.cx-dows .gv-opt input:checked + span { border-color: var(--cx); background: var(--cx-bg); color: var(--cx-dark); }
.cx-pick { padding: .45rem .6rem; border: 1.5px solid var(--border); border-radius: 8px; margin-bottom: .3rem; cursor: pointer; }
.cx-pick.on, .cx-pick:hover { border-color: var(--cx); background: var(--cx-bg); }
/* Přepínač EMS / Kruhový trénink v Přehledu a Koupit (stejné rozvržení, jiný typ) */
.kind-tabs { display: inline-flex; gap: .25rem; padding: .25rem; background: #f1f5f9; border-radius: 999px; margin: 0 0 1rem; }
.kind-tab { padding: .45rem 1.1rem; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--muted); text-decoration: none; transition: background .15s, color .15s; }
.kind-tab:hover { color: var(--text); }
.kind-tab.active { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.kind-tab-circuit.active { color: var(--cx-dark); }

/* Kruhový trénink: stejné stránky, oranžový motiv (EMS zůstává modré) */
body.kind-circuit { --primary: #c2410c; --primary-d: #9a3412; --primary-l: #fff1e6; --primary-light: #fb923c; --gradient-line: linear-gradient(90deg, #ea7a1a, #fb923c); }
body.kind-circuit nav { --primary: #036180; --primary-d: #024d66; --primary-l: #ddf3f9; --primary-light: #4fb8d4; --gradient-line: linear-gradient(90deg, #036180, #4fb8d4); }
body.kind-circuit .cal-day.selected { background: #ea7a1a; }
.cx-tag-ok { background: #dcfce7; color: #166534; }
.cx-mini.cx-mini-on { background: #16a34a; border-color: #16a34a; color: #fff; }

/* ─── Pan Lorenc (AI průvodce, admin) ─── */
.lz-head { display: flex; gap: 1rem; align-items: flex-start; background: linear-gradient(135deg, #f1f5f9, #fff); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.lz-avatar { font-size: 2.6rem; line-height: 1; background: #fff; border: 2px solid var(--border); border-radius: 50%; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; flex: 0 0 64px; }
.lz-sub { margin: .4rem 0 0; font-size: .8rem; color: var(--muted); }
.lz-prompts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1rem; }
.lz-prompts-label { font-size: .82rem; color: var(--muted); margin-right: .25rem; }
.lz-chip { display: inline-flex; align-items: stretch; border: 1.5px solid var(--primary); border-radius: 999px; overflow: hidden; }
.lz-chip-run { background: var(--primary-l); color: var(--primary); border: 0; padding: .3rem .75rem; font-weight: 700; font-size: .84rem; cursor: pointer; }
.lz-chip-run:hover { background: var(--primary); color: #fff; }
.lz-chip-del { background: #fff; color: var(--muted); border: 0; border-left: 1px solid var(--border); padding: 0 .5rem; cursor: pointer; }
.lz-chip-del:hover { color: var(--danger); }
.lz-chat { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.lz-empty { color: var(--muted); font-size: .9rem; padding: 1rem; border: 2px dashed var(--border); border-radius: var(--radius); text-align: center; }
.lz-q { align-self: flex-end; max-width: 85%; background: var(--primary); color: #fff; padding: .6rem .9rem; border-radius: 14px 14px 4px 14px; font-size: .92rem; }
.lz-q-label { font-weight: 700; }
.lz-a { align-self: flex-start; max-width: 100%; width: 100%; background: #fff; border: 1px solid var(--border); padding: .8rem 1rem; border-radius: 14px 14px 14px 4px; }
.lz-thinking { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .9rem; }
.lz-md p { margin: .35rem 0; line-height: 1.55; }
.lz-md h3, .lz-md h4, .lz-md h5 { margin: .8rem 0 .3rem; font-size: 1rem; color: var(--primary); }
.lz-md ul, .lz-md ol { margin: .3rem 0 .3rem 1.2rem; padding: 0; }
.lz-md li { margin: .15rem 0; line-height: 1.5; }
.lz-md code { background: #f1f5f9; padding: .05rem .3rem; border-radius: 4px; font-size: .86em; }
.lz-md pre, .lz-query pre { background: #0f172a; color: #e2e8f0; padding: .6rem .8rem; border-radius: 8px; overflow-x: auto; font-size: .8rem; white-space: pre-wrap; }
.lz-table-wrap { overflow-x: auto; margin: .5rem 0; }
.lz-table { border-collapse: collapse; font-size: .88rem; min-width: 50%; }
.lz-table th, .lz-table td { border: 1px solid var(--border); padding: .35rem .6rem; text-align: left; }
.lz-table th { background: #f8fafc; }
.lz-table td.num { text-align: right; white-space: nowrap; }
.lz-queries { margin-top: .6rem; font-size: .82rem; color: var(--muted); }
.lz-queries summary { cursor: pointer; }
.lz-query { margin-top: .5rem; }
.lz-query-purpose { font-weight: 600; margin-bottom: .2rem; }
.lz-ask textarea { width: 100%; resize: vertical; }
.lz-ask-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .5rem; }
.lz-pavel { position: relative; flex: 0 0 76px; }
.lz-pavel img { width: 76px; height: 76px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18); display: block; }
.lz-pavel-bubble { position: absolute; right: -14px; top: -8px; background: #fff; border: 1.5px solid var(--border); border-radius: 12px 12px 12px 2px; padding: .05rem .45rem; font-size: .72rem; font-weight: 800; color: var(--primary); white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.lz-q-row { align-self: flex-end; display: flex; align-items: flex-end; gap: .45rem; max-width: 85%; }
.lz-q-row .lz-q { max-width: none; }
.lz-q-face { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.lz-step { font-size: .8rem; color: var(--muted); margin-top: .15rem; }

/* ── Bedrino: přepínač a štítky studií ─────────────────────────────────────── */
.studio-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #f1f5f9; border-radius: 999px; }
.studio-switch button { border: 0; background: transparent; padding: .45rem 1rem; border-radius: 999px; font-size: .9rem; font-weight: 600; color: #475569; cursor: pointer; transition: background .15s, color .15s; }
.studio-switch button:hover { color: var(--sc, var(--primary)); }
.studio-switch button.active { background: var(--sc, var(--primary)); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.studio-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--sc, var(--primary)); background: color-mix(in srgb, var(--sc, var(--primary)) 12%, #fff); border: 1px solid color-mix(in srgb, var(--sc, var(--primary)) 35%, #fff); white-space: nowrap; }
#admin-studio-bar { background: transparent !important; border: 0 !important; padding: 0 !important; }
@media (max-width: 600px) { .studio-switch button { padding: .4rem .75rem; font-size: .85rem; } }
.my-studio-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; font-size: .9rem; color: var(--muted); }
.my-studio-change { font-size: .8rem; color: var(--muted); text-decoration: underline; }
.my-studio-hint { flex-basis: 100%; font-size: .78rem; }
.res-studio { margin: .2rem 0 .15rem; }
.modal-studio-label { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.modal-studio-addr { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.modal-studio-other { font-size: .8rem; color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 8px; padding: .35rem .6rem; margin-top: .45rem; }
/* Bedrino: studia pod logem na přihlášení */
.auth-box .brand-studios { margin: -1.15rem 0 1.25rem; text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .03em; color: var(--muted); }
/* Bedrino: žlutá tečka nad „i“ (bez tečky na konci) */
.brand-wordmark .brand-i { position: relative; display: inline-block; }
.brand-wordmark .brand-i::after { content: ''; position: absolute; left: 50%; top: .1em; width: .21em; height: .21em; border-radius: 50%; background: var(--accent); transform: translateX(-50%); }
/* Bedrino: klient z Reservanta v kalendáři */
.rv-ext { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: #7c2d12; background: #fff7ed; border: 1px dashed #fdba74; border-radius: 8px; padding: .25rem .5rem; margin: .15rem 0; }
.rv-ext-tag { font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #c2410c; border-radius: 4px; padding: .05rem .3rem; }
.rv-ext-wc { color: #7c2d12 !important; background: #fff7ed; border-radius: 4px; }


/* ═══════════════════════════════════════════════════════
   BEDRINO: vzhled systému a studií
   html[data-theme="bedrino"]  vzhled systému (přihlášení, admin) = barvy jako rezervace.bedr.cz (výchozí :root)
   html[data-theme="bedr"]     studio se značkou BEDR (výchozí hodnoty :root)
   html[data-theme="neutral"]  studio bez značky BEDR; barvy dodá nastavení studia (--studio-primary/--studio-accent)
═══════════════════════════════════════════════════════ */
html[data-theme="neutral"] {
  --primary: var(--studio-primary, #1d5e63); --accent: var(--studio-accent, #8fd6c2);
}
html[data-theme="neutral"] {
  --primary-d: color-mix(in srgb, var(--primary) 82%, #000);
  --primary-l: color-mix(in srgb, var(--primary) 12%, #fff);
  --primary-light: color-mix(in srgb, var(--primary) 55%, #fff);
  --accent-d: color-mix(in srgb, var(--accent) 82%, #000);
  --gradient-line: linear-gradient(90deg, var(--primary), var(--primary-light));
}
/* Logo Bedrina: tečka nad i v barvě akcentu */
.bedrino-mark { font-weight: 900; color: #036180; white-space: nowrap; }
.bedrino-mark .brand-i::after { background: #F2A82A !important; }
/* Název neutrálního studia jako logo */
.studio-wordmark { font-family: var(--font); font-weight: 900; color: var(--primary); white-space: nowrap; }
nav .studio-wordmark { font-size: 1.35rem; }
/* Pasivní přepínač studia v hlavičce: obě studia stejně */
.nav-studio-wrap select.studio-sel { font: inherit; font-size: .85rem; font-weight: 600; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .3rem .75rem; cursor: pointer; }
.footer-operator { font-size: .82rem; line-height: 1.6; }
.auth-operator { margin-top: 18px; text-align: center; font-size: .8rem; color: var(--muted); }

/* Název a adresa studia v hlavičce */
nav .logo .studio-addr { margin-left: .6rem; padding-left: .6rem; border-left: 1px solid var(--border); font-size: .82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) { nav .logo .studio-addr { display: none; } }
.footer .studio-wordmark { display: block; color: #fff; font-size: 1.6rem; margin-bottom: 10px; }

/* Hlavička: logo Bedrino + studio */
nav .logo .bedrino-mark { font-size: 1.45rem; }
nav .logo .nav-studio-sep { width: 1px; height: 1.4rem; background: var(--border); margin: 0 .7rem; }
@media (max-width: 600px) { nav .logo .bedrino-mark { font-size: 1.15rem; } nav .logo .nav-studio-sep { margin: 0 .45rem; } nav .studio-wordmark { font-size: 1.05rem; } }
