/* Přehled v50.3: krátká provozní první obrazovka, podrobnosti až na vyžádání. */
.overview-dashboard,
.parent-home {
  max-width: 1120px;
  margin: 0 auto;
  gap: 24px;
}

/* Původní prostor pro volitelné widgety zůstává jen jako neutrální kontejner
   pro nový přehled; žádný starý hero panel ani editor se už nad ním nekreslí. */
.dashboard-grid:has(> .overview-dashboard),
.dashboard-grid:has(> .parent-home) {
  display: block;
}

.overview-intro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.overview-intro-card .eyebrow { margin: 0; color: #fca5a5; }
.overview-intro-card h3 { margin: 4px 0; color: #fff; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.overview-intro-card p:last-child { margin: 0; color: rgba(255, 255, 255, .72); }
.overview-attendance-action { flex: 0 0 auto; min-height: 48px; }

.overview-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.overview-metric {
  display: grid;
  min-height: 132px;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(15, 24, 34, .06);
  color: var(--ink);
  text-align: left;
  transition: transform .16s ease, border-color .16s ease;
}

.overview-metric:hover { border-color: color-mix(in srgb, var(--brand) 42%, var(--line)); transform: translateY(-1px); }
.overview-metric span { color: var(--muted); font-size: .76rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.overview-metric strong { align-self: end; color: var(--ink); font-family: "Bricolage Grotesque", sans-serif; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1; }
.overview-metric small { color: var(--muted); font-size: .78rem; font-weight: 700; }
.overview-metric-members { border-top: 4px solid var(--brand); }
.overview-metric-clock { border-top: 4px solid #2563eb; }
.overview-metric-notice { border-top: 4px solid #d97706; }
.overview-metric-attention { border-top: 4px solid var(--success); }

.overview-section,
.parent-home-section { display: grid; gap: 10px; }
.overview-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.overview-section-heading h3 { margin: 0; color: var(--ink); font-size: clamp(1.22rem, 2.3vw, 1.55rem); }
.overview-section-heading .text-button { color: var(--brand); font-weight: 900; }

.overview-training-list,
.overview-activity-list,
.parent-recent-activity-list,
.parent-need-list { display: grid; gap: 10px; }

.overview-training-card {
  display: grid;
  grid-template-columns: minmax(64px, .42fr) minmax(0, 1.6fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid #3b82f6;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 6px 15px rgba(15, 24, 34, .05);
}

.overview-training-card.status-complete { border-left-color: var(--success); }
.overview-training-card.status-pending { border-left-color: #fbbf24; }
.overview-training-card time { color: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: 1.12rem; font-weight: 900; }
.overview-training-card div { display: grid; min-width: 0; gap: 4px; }
.overview-training-card strong { overflow: hidden; color: var(--ink); font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.overview-training-card small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.overview-status-dot { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-weight: 900; }
.status-complete .overview-status-dot { background: #dcfce7; color: #15803d; }
.status-pending .overview-status-dot { background: #fef3c7; color: #b45309; }

.overview-activity-card,
.parent-recent-activity {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-left: 5px solid #3b82f6;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 6px 15px rgba(15, 24, 34, .05);
}

.overview-activity-card.tone-success,
.parent-recent-activity.tone-success { border-left-color: var(--success); }
.overview-activity-card.tone-notice { border-left-color: #d97706; }
.overview-activity-card.tone-muted { border-left-color: #94a3b8; }
.parent-recent-activity.tone-result { border-left-color: #c25d05; }
.overview-activity-card time,
.parent-recent-activity time { display: grid; justify-items: center; gap: 1px; }
.overview-activity-card time strong,
.parent-recent-activity time strong { color: var(--ink); font-family: "Bricolage Grotesque", sans-serif; font-size: 1.45rem; line-height: 1; }
.overview-activity-card time small,
.parent-recent-activity time small { color: var(--muted); font-size: .65rem; font-weight: 900; }
.overview-activity-card div,
.parent-recent-activity div { display: grid; min-width: 0; gap: 4px; }
.overview-activity-card div strong,
.parent-recent-activity div strong { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.overview-activity-card div small,
.parent-recent-activity div small { overflow: hidden; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.overview-activity-card .tag,
.parent-recent-activity .tag { color: #1d4ed8; background: #dbeafe; }
.overview-activity-more { margin-top: 8px; }
.overview-activity-more > summary { color: var(--brand); cursor: pointer; font-size: .85rem; font-weight: 900; }
.overview-activity-more .overview-activity-list { margin-top: 10px; }

.overview-more-details,
.parent-more-details,
.parent-excuse-drawer {
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.overview-more-details > summary,
.parent-more-details > summary,
.parent-excuse-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.overview-more-details > summary small,
.parent-more-details > summary small { color: var(--muted); font-size: .76rem; font-weight: 700; }
.overview-more-details[open] > summary,
.parent-more-details[open] > summary,
.parent-excuse-drawer[open] > summary { border-bottom: 1px solid var(--line); }
.overview-more-note { margin: 14px 16px 0; color: var(--muted); font-size: .86rem; }
.overview-extended-grid { margin: 14px; }

/* Rodič vidí vždy jen jedno dítě a potřebné informace pro dnešek. */
.parent-home { max-width: 720px; }
.parent-child-summary {
  position: relative;
  overflow: hidden;
  padding: 26px 78px 20px 28px;
  border-radius: 20px;
  background: #2864dd;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .25);
  color: #fff;
  touch-action: pan-y;
}

.parent-evidence-quick-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 16px;
  background: rgba(255,255,255,.16);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 24, 34, .14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.parent-evidence-quick-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.parent-evidence-quick-button.is-disabled {
  opacity: .45;
}

.parent-child-summary .eyebrow { margin: 0 0 8px; color: #dbeafe; }
.parent-child-summary h3 { margin: 0; color: #fff; font-size: clamp(1.7rem, 6vw, 2.25rem); }
.parent-child-summary > p:not(.eyebrow) { margin: 5px 0 0; color: #dbeafe; font-size: .88rem; }
.parent-child-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.parent-child-metrics span { display: grid; gap: 3px; min-width: 0; }
.parent-child-metrics strong { overflow: hidden; color: #fff; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.5rem; text-overflow: ellipsis; white-space: nowrap; }
.parent-child-metrics small { color: #dbeafe; font-size: .75rem; }
.parent-child-arrow { position: absolute; z-index: 1; top: 50%; width: 34px; min-width: 34px; height: 34px; min-height: 34px; border: 1px solid rgba(255,255,255,.32); border-radius: 50%; background: rgba(15, 24, 34, .18); color: #fff; font-size: 1.5rem; line-height: 1; transform: translateY(-50%); }
.parent-child-arrow.previous { left: 10px; }
.parent-child-arrow.next { right: 10px; }
.parent-child-dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.parent-child-dots button { width: 7px; min-width: 7px; height: 7px; min-height: 7px; padding: 0; border: 0; border-radius: 20px; background: rgba(255,255,255,.42); }
.parent-child-dots button.active { width: 22px; background: #fff; }

.parent-next-training-card { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 7px 16px rgba(15, 24, 34, .06); }
.parent-training-days { display: grid; justify-items: center; gap: 2px; color: var(--brand); }
.parent-training-days strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 2.2rem; line-height: 1; }
.parent-training-days span { color: var(--muted); font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.parent-next-training-card > div:nth-child(2) { display: grid; min-width: 0; gap: 5px; }
.parent-next-training-card > div:nth-child(2) strong { color: var(--ink); font-size: 1.05rem; }
.parent-next-training-card > div:nth-child(2) small { color: var(--muted); }
.parent-excuse-button { min-height: 40px; padding: 8px 15px; border: 0; border-radius: 999px; background: #fef3c7; color: #b45309; font-weight: 900; }
.parent-excuse-button:disabled { opacity: .55; cursor: not-allowed; }
.parent-excuse-drawer .parent-excuse-range {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px;
  box-sizing: border-box;
}
.parent-excuse-drawer .parent-excuse-range label,
.parent-excuse-drawer .parent-excuse-range input,
.parent-excuse-drawer .parent-excuse-range button {
  min-width: 0;
  box-sizing: border-box;
}
.parent-excuse-drawer .parent-excuse-range input,
.parent-excuse-drawer .parent-excuse-range button {
  width: 100%;
  max-width: 100%;
}

.parent-need-card { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid #d97706; border-radius: 16px; background: var(--surface); box-shadow: 0 6px 15px rgba(15, 24, 34, .05); }
.parent-need-card.ok { border-left-color: var(--success); }
.parent-need-card > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #fef3c7; color: #b45309; font-weight: 900; }
.parent-need-card.ok > span { background: #dcfce7; color: #15803d; }
.parent-need-card div { display: grid; gap: 2px; }
.parent-need-card strong { color: var(--ink); font-size: .9rem; }
.parent-need-card small { color: var(--muted); font-size: .78rem; }
.parent-more-details .parent-overview-grid { padding: 0 14px 14px; }

.parent-more-details {
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 8px 18px rgba(15, 24, 34, .055);
}

.parent-more-details > summary {
  min-height: 70px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
}

.parent-more-details > summary::-webkit-details-marker { display: none; }

.parent-more-details > summary::after {
  content: "⌄";
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 950;
  transition: transform .18s ease;
}

.parent-more-details[open] > summary::after { transform: rotate(180deg); }

/* Přihlášky: pracovní fronta, která ukáže podstatné údaje bez dlouhých karet. */
.registration-filter-bar { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.registration-filter-bar::-webkit-scrollbar { display: none; }
.registration-filter { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 900; }
.registration-filter span { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 20px; background: var(--surface-soft); color: var(--muted); font-size: .72rem; }
.registration-filter.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.registration-filter.active span { background: rgba(255,255,255,.2); color: #fff; }
.web-registration-list { display: grid; gap: 12px; }
.web-registration-card { display: grid; gap: 14px; padding: 17px; border: 1px solid var(--line); border-left: 6px solid #d97706; border-radius: 18px; background: var(--surface); box-shadow: 0 7px 16px rgba(15, 24, 34, .055); }
.web-registration-card.registration-status-processed,
.web-registration-card.registration-status-converted { border-left-color: var(--success); }
.web-registration-card.registration-status-archived { border-left-color: #94a3b8; }
.web-registration-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.web-registration-card h4 { margin: 0; color: var(--ink); font-size: 1.12rem; }
.web-registration-card header p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.registration-status-pill { flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; background: #fef3c7; color: #b45309; font-size: .76rem; font-weight: 900; }
.registration-status-processed .registration-status-pill,
.registration-status-converted .registration-status-pill { background: #dcfce7; color: #15803d; }
.registration-status-archived .registration-status-pill { background: #e2e8f0; color: #475569; }
.registration-card-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.registration-card-facts div { display: flex; min-width: 0; gap: 5px; }
.registration-card-facts dt { flex: 0 0 auto; color: var(--ink); font-weight: 900; }
.registration-card-facts dd { min-width: 0; margin: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.registration-duplicate { margin: -3px 0 0; }
.registration-card-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.registration-detail { position: relative; }
.registration-detail > summary { min-height: 38px; padding: 8px 13px; border-radius: 999px; background: var(--surface-soft); color: var(--ink); cursor: pointer; font-weight: 900; }
.registration-detail > div { position: absolute; z-index: 4; right: 0; top: calc(100% + 8px); display: grid; width: min(340px, calc(100vw - 64px)); gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 16px 34px rgba(15, 24, 34, .18); }
.registration-detail p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.registration-detail label { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.danger-text { justify-self: start; color: #dc2626; }

/* Nástěnka: první pohled zůstává krátký, celý text je vždy k dispozici. */
.news-card-compact { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 16px; padding: 16px; }
.news-date-block { display: grid; align-content: start; gap: 7px; padding-right: 14px; border-right: 1px solid var(--line); }
.news-date-block strong { color: var(--ink); font-family: "Bricolage Grotesque", sans-serif; font-size: .94rem; line-height: 1.25; }
.news-date-block span { color: var(--brand); font-size: .73rem; font-weight: 900; text-transform: uppercase; }
.news-card-compact .card-topline { min-height: 0; margin: 0 0 3px; }
.news-card-compact .card-actions { margin-left: auto; }
.news-card-compact p { color: var(--muted); font-size: .9rem; }
.news-detail { margin-top: 9px; }
.news-detail > summary { color: var(--brand); cursor: pointer; font-size: .82rem; font-weight: 900; }
.news-detail > p { margin: 9px 0 0; white-space: pre-line; }
.news-show-more { justify-self: start; margin-top: 2px; }

/* Docházka: trenér má kontakt po ruce, bez sportovních údajů navíc. */
.attendance-member-info { display: grid; min-width: 0; gap: 4px; }
.attendance-member-info > strong { color: var(--ink); }
.attendance-member-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-height: 20px; }
.attendance-contact { display: inline-flex; align-items: center; min-height: 30px; color: var(--brand); font-size: .82rem; font-weight: 900; text-decoration: none; }
.attendance-contact:hover { text-decoration: underline; }
.attendance-no-contact { color: var(--muted); font-size: .76rem; }

/* Kalendář: datum a typ jsou čitelné hned, dlouhé instrukce až na vyžádání. */
.calendar-card-compact { align-items: start; }
.calendar-card-compact .date-badge { margin-top: 1px; }
.calendar-event-content { min-width: 0; }
.calendar-event-content h3 { color: var(--ink); }
.calendar-card-compact .calendar-note-preview { margin-bottom: 0; color: var(--muted); font-size: .9rem; }
.calendar-note-detail { margin-top: 7px; }
.calendar-note-detail > summary { color: var(--brand); cursor: pointer; font-size: .82rem; font-weight: 900; }
.calendar-note-detail > p { margin: 8px 0 0; color: var(--muted); white-space: pre-line; }

.attention-workspace { display: grid; min-width: 0; gap: 10px; }
.attention-filter-strip { display: flex; max-width: 100%; gap: 6px; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: thin; }
.attention-filter-chip { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: .78rem; font-weight: 850; }
.attention-filter-chip strong { display: grid; min-width: 22px; height: 22px; place-items: center; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); font-size: .7rem; }
.attention-filter-chip.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--brand); }
.attention-filter-chip.active strong { background: var(--brand); color: #fff; }
.attention-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .76rem; }
.attention-result-heading strong { color: var(--ink); }
.trainer-attention-list { display: grid; gap: 8px; }
.trainer-attention-row { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) 34px; align-items: start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; }
.trainer-attention-row:hover, .trainer-attention-row:focus-visible { border-color: var(--brand); }
.trainer-attention-row > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.trainer-attention-row small { color: var(--muted); overflow-wrap: anywhere; }
.trainer-attention-indicator { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); font-weight: 900; }
.trainer-attention-row.tone-danger .trainer-attention-indicator { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.attention-row-content { display: grid; min-width: 0; gap: 3px; }
.attention-issue-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.attention-issue { display: inline-flex; max-width: 100%; min-height: 25px; align-items: center; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--warning) 10%, var(--surface)); color: color-mix(in srgb, var(--warning) 82%, var(--ink)); font-size: .72rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.attention-issue.tone-danger { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: color-mix(in srgb, var(--danger) 82%, var(--ink)); }
.attention-row-action { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--brand); cursor: pointer; font-size: 1.15rem; font-weight: 900; }
.attention-row-action:hover, .attention-row-action:focus-visible { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); outline: none; }
.attention-expand-button { justify-self: start; min-height: 38px; padding: 7px 11px; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--brand) 7%, var(--surface)); color: var(--brand); cursor: pointer; font-size: .78rem; font-weight: 900; }
.attention-clear { display: grid; gap: 3px; }
.attention-clear span { color: var(--muted); }

.calendar-toolbar { align-items: end; }
.calendar-mode-switch, .calendar-month-navigation { display: flex; align-items: center; gap: 6px; }
.calendar-mode-switch .active { background: var(--brand); border-color: var(--brand); color: white; }
.calendar-training-toggle[hidden] { display: none; }
.calendar-training-section { display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; border: 1px solid color-mix(in srgb, #27845d 35%, var(--line)); border-radius: 14px; background: color-mix(in srgb, #27845d 5%, var(--surface)); }
.calendar-training-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calendar-training-heading > div { display: grid; gap: 2px; }
.calendar-training-heading small { color: var(--muted); font-size: .76rem; }
.training-tag { border-color: color-mix(in srgb, #27845d 38%, var(--line)); background: color-mix(in srgb, #27845d 14%, var(--surface)); color: #216c4d; }
.calendar-training-list { display: grid; }
.calendar-training-row { display: grid; grid-template-columns: minmax(105px, auto) minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 54px; padding: 8px 0; border-top: 1px solid var(--line); }
.calendar-training-row time, .calendar-training-row > div { display: grid; gap: 2px; min-width: 0; }
.calendar-training-row small { color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.calendar-training-more { justify-self: start; }
.calendar-month-navigation #calendarCurrentMonth { min-width: 150px; text-transform: capitalize; }
.calendar-month-navigation > .secondary-action { width: 38px; padding-inline: 0; font-size: 1.25rem; }
.calendar-month-view { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.calendar-weekdays, .calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays span { padding: 8px; color: var(--muted); font-size: .75rem; font-weight: 800; text-align: center; }
.calendar-month-day { min-width: 0; min-height: 108px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.calendar-month-day:nth-child(7n) { border-right: 0; }
.calendar-month-day:hover, .calendar-month-day:focus-visible, .calendar-month-day.selected { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); outline: none; }
.calendar-month-day.outside { opacity: .42; }
.calendar-day-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 850; }
.calendar-month-day.today .calendar-day-number { background: var(--brand); color: white; }
.calendar-day-items { display: grid; grid-template-rows: repeat(3, minmax(8px, 19px)); gap: 3px; min-width: 0; }
.calendar-dot { display: block; min-height: 19px; padding: 3px 5px; border-left: 3px solid var(--brand); border-radius: 4px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--ink); font-size: .68rem; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-dot > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.calendar-dot.training, .calendar-day-entry.training { border-color: #27845d; }
.calendar-dot.training { background: color-mix(in srgb, #27845d 18%, var(--surface)); }
.calendar-dot.competition, .calendar-day-entry.competition { border-color: #c68416; }
.calendar-dot.competition { background: color-mix(in srgb, #c68416 20%, var(--surface)); }
.calendar-dot.camp, .calendar-day-entry.camp { border-color: #7654c6; }
.calendar-dot.camp { background: color-mix(in srgb, #7654c6 20%, var(--surface)); }
.calendar-dot.multi-day { margin-inline: -8px; border-left: 0; border-radius: 0; }
.calendar-dot.multi-day.segment-start { margin-left: 0; padding-left: 6px; border-radius: 5px 0 0 5px; }
.calendar-dot.multi-day.segment-end { margin-right: 0; border-radius: 0 5px 5px 0; }
.calendar-dot.multi-day.segment-start.segment-end { margin-inline: 0; border-radius: 5px; }
.calendar-day-items small { grid-row: 4; color: var(--muted); font-size: .65rem; }
.calendar-day-detail { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.calendar-day-detail-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendar-day-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-left: 4px solid var(--brand); border-bottom: 1px solid var(--line); }
.calendar-day-entry:last-child { border-bottom: 0; }
.calendar-day-entry > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 8px; min-width: 0; }
.calendar-day-entry small { grid-column: 2; color: var(--muted); }

@media (max-width: 720px) {
  .calendar-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-month-navigation { grid-column: 1 / -1; justify-content: space-between; order: -1; }
  .calendar-mode-switch { grid-column: 1 / -1; }
  .calendar-training-toggle { grid-column: 1 / -1; }
  .calendar-month-day { min-height: 64px; padding: 5px; }
  .calendar-dot { width: auto; min-height: 8px; padding: 0 2px; border: 0; border-radius: 3px; font-size: .52rem; line-height: 8px; }
  .calendar-dot:not(.multi-day) { width: 8px; color: transparent; }
  .calendar-dot.multi-day { margin-inline: -5px; }
  .calendar-dot.multi-day.segment-start { margin-left: 0; padding-left: 3px; }
  .calendar-dot.multi-day.segment-end { margin-right: 0; }
  .calendar-day-items { grid-template-rows: repeat(3, 8px); gap: 3px; }
  .calendar-day-items small { width: 100%; }
  .calendar-day-entry { align-items: flex-start; }
  .calendar-day-entry > div { grid-template-columns: 1fr; }
  .calendar-day-entry small { grid-column: 1; }
  .calendar-training-row { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .calendar-training-row time { grid-column: 1; }
  .calendar-training-row > div { grid-column: 1; }
  .calendar-training-row > button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* Závody: rodičovský zájem je přehledná souhrnná lišta, seznam zůstává na jeden dotyk. */
.event-registration-panel { overflow: hidden; }
.event-registration-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 14px 16px; color: var(--ink); cursor: pointer; list-style: none; }
.event-registration-panel > summary::-webkit-details-marker { display: none; }
.event-registration-panel > summary > span:first-child { display: grid; gap: 3px; }
.event-registration-panel > summary strong { font-size: 1rem; }
.event-registration-panel > summary small { color: var(--muted); font-size: .78rem; font-weight: 700; }
.event-registration-panel[open] > summary { border-bottom: 1px solid var(--line); }
.event-registration-panel-body { display: grid; gap: 12px; padding: 14px; }
.event-registration-panel-body .panel-heading { margin: 0; }
.event-registration-panel-body .panel-heading p { color: var(--muted); }

/* Správa skupin: hromadné generování je méně častý krok, proto nepřekáží v liště. */
.groups-primary-toolbar { align-items: center; }
.group-generation-panel { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.group-generation-panel > summary { min-height: 44px; padding: 10px 13px; color: var(--ink); cursor: pointer; font-size: .85rem; font-weight: 900; }
.group-generation-panel[open] > summary { border-bottom: 1px solid var(--line); }
.group-generation-panel > div { display: flex; align-items: end; gap: 10px; padding: 12px; }
.group-generation-panel label { min-width: 135px; }

/* Členové: přidání zůstává vepředu, importy a filtry nezakrývají seznam. */
.members-primary-toolbar { align-items: center; }
.member-import-panel,
.member-filter-panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.member-import-panel > summary,
.member-filter-panel > summary { min-height: 42px; padding: 10px 13px; color: var(--ink); cursor: pointer; font-size: .84rem; font-weight: 900; }
.member-import-panel[open] > summary,
.member-filter-panel[open] > summary { border-bottom: 1px solid var(--line); }
.member-import-panel > div { display: flex; align-items: end; gap: 10px; padding: 12px; }
.member-search-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; margin: 12px 0 6px; }
.member-search-bar > input { min-height: 44px; }
.member-filter-panel { min-width: 150px; }
.member-filter-fields { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 8px; padding: 12px; }

/* Komunikace: psaní zprávy je hlavní pracovní krok, další nástroje se otevřou podle potřeby. */
.communication-module { padding: 0; overflow: hidden; }
.communication-module > summary { display: flex; align-items: center; min-height: 66px; padding: 14px 18px; color: var(--ink); cursor: pointer; list-style: none; }
.communication-module > summary::-webkit-details-marker { display: none; }
.communication-module > summary > span { display: grid; gap: 3px; }
.communication-module > summary strong { font-size: 1rem; }
.communication-module > summary small { color: var(--muted); font-size: .8rem; font-weight: 700; }
.communication-module > summary::after { content: "+"; margin-left: auto; color: var(--brand); font-size: 1.35rem; font-weight: 700; }
.communication-module[open] > summary { border-bottom: 1px solid var(--line); }
.communication-module[open] > summary::after { content: "−"; }
.communication-module-body { display: grid; gap: 14px; padding: 16px 18px 18px; }

/* Profily: běžný profil je nahoře, nastavení zařízení a Firebase až na vyžádání. */
.profile-management-module { padding: 0; overflow: hidden; }
.profile-management-module > summary { display: flex; align-items: center; min-height: 66px; padding: 14px 18px; color: var(--ink); cursor: pointer; list-style: none; }
.profile-management-module > summary::-webkit-details-marker { display: none; }
.profile-management-module > summary > span { display: grid; gap: 3px; }
.profile-management-module > summary strong { font-size: 1rem; }
.profile-management-module > summary small { color: var(--muted); font-size: .8rem; font-weight: 700; }
.profile-management-module > summary::after { content: "+"; margin-left: auto; color: var(--brand); font-size: 1.35rem; font-weight: 700; }
.profile-management-module[open] > summary { border-bottom: 1px solid var(--line); }
.profile-management-module[open] > summary::after { content: "−"; }
.profile-management-body { display: grid; gap: 14px; padding: 16px 18px 18px; }
.profile-management-body > .panel-heading { margin: 0; }

/* Exporty: nejčastější záloha a XLSX jsou vždy po ruce, zbytek je tematicky rozdělený. */
.export-primary-actions { margin-bottom: 12px; }
.export-module { overflow: hidden; margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.export-module > summary { display: flex; align-items: center; min-height: 62px; padding: 13px 16px; color: var(--ink); cursor: pointer; list-style: none; }
.export-module > summary::-webkit-details-marker { display: none; }
.export-module > summary > span { display: grid; gap: 3px; }
.export-module > summary strong { font-size: .95rem; }
.export-module > summary small { color: var(--muted); font-size: .77rem; font-weight: 700; }
.export-module > summary::after { content: "+"; margin-left: auto; color: var(--brand); font-size: 1.3rem; font-weight: 700; }
.export-module[open] > summary { border-bottom: 1px solid var(--line); }
.export-module[open] > summary::after { content: "−"; }
.export-module-body { margin: 0; padding: 14px 16px; }
.export-maintenance-module > summary::after { color: #dc2626; }

/* Sekundární historie: funkce zůstávají dostupné, ale hlavní pohled nepůsobí jako dlouhý report. */
.secondary-data-module { padding: 0; overflow: hidden; }
.secondary-data-module > summary { display: flex; align-items: center; min-height: 66px; padding: 14px 18px; color: var(--ink); cursor: pointer; list-style: none; }
.secondary-data-module > summary::-webkit-details-marker { display: none; }
.secondary-data-module > summary > span { display: grid; gap: 3px; }
.secondary-data-module > summary strong { font-size: 1rem; }
.secondary-data-module > summary small { color: var(--muted); font-size: .8rem; font-weight: 700; }
.secondary-data-module > summary::after { content: "+"; margin-left: auto; color: var(--brand); font-size: 1.35rem; font-weight: 700; }
.secondary-data-module[open] > summary { border-bottom: 1px solid var(--line); }
.secondary-data-module[open] > summary::after { content: "−"; }
.secondary-data-body { display: grid; gap: 12px; padding: 16px 18px 18px; }

:root[data-theme="dark"] .overview-intro-card { background: #0b1118; border-color: rgba(255,255,255,.12); }
:root[data-theme="dark"] .overview-metric,
:root[data-theme="dark"] .overview-training-card,
:root[data-theme="dark"] .overview-activity-card,
:root[data-theme="dark"] .parent-next-training-card,
:root[data-theme="dark"] .parent-recent-activity,
:root[data-theme="dark"] .parent-need-card,
:root[data-theme="dark"] .overview-more-details,
:root[data-theme="dark"] .parent-more-details,
:root[data-theme="dark"] .parent-excuse-drawer { background: var(--surface); box-shadow: 0 8px 18px rgba(0,0,0,.2); }
:root[data-theme="dark"] .overview-status-dot { background: rgba(59,130,246,.22); color: #93c5fd; }
:root[data-theme="dark"] .status-complete .overview-status-dot { background: rgba(34,197,94,.2); color: #86efac; }
:root[data-theme="dark"] .status-pending .overview-status-dot,
:root[data-theme="dark"] .parent-excuse-button { background: rgba(245,158,11,.18); color: #fde68a; }
:root[data-theme="dark"] .overview-activity-card .tag,
:root[data-theme="dark"] .parent-recent-activity .tag { background: rgba(59,130,246,.22); color: #bfdbfe; }
:root[data-theme="dark"] .parent-child-summary { background: #1d4ed8; box-shadow: 0 14px 28px rgba(0,0,0,.28); }
:root[data-theme="dark"] .parent-need-card > span { background: rgba(245,158,11,.2); color: #fde68a; }
:root[data-theme="dark"] .parent-need-card.ok > span { background: rgba(34,197,94,.2); color: #bbf7d0; }
:root[data-theme="dark"] .registration-filter,
:root[data-theme="dark"] .web-registration-card,
:root[data-theme="dark"] .registration-detail > div { background: var(--surface); box-shadow: 0 8px 18px rgba(0,0,0,.22); }
:root[data-theme="dark"] .registration-filter span,
:root[data-theme="dark"] .registration-detail > summary { background: var(--surface-soft); }
:root[data-theme="dark"] .registration-status-pill { background: rgba(245,158,11,.2); color: #fde68a; }
:root[data-theme="dark"] .registration-status-processed .registration-status-pill,
:root[data-theme="dark"] .registration-status-converted .registration-status-pill { background: rgba(34,197,94,.2); color: #bbf7d0; }
:root[data-theme="dark"] .attendance-contact { color: #93c5fd; }
:root[data-theme="dark"] .group-generation-panel { background: var(--surface); }
:root[data-theme="dark"] .member-import-panel,
:root[data-theme="dark"] .member-filter-panel { background: var(--surface); }
:root[data-theme="dark"] .export-module { background: var(--surface); }

@media (max-width: 760px) {
  .overview-dashboard,
  .parent-home { gap: 18px; }
  .overview-intro-card { align-items: flex-start; padding: 20px; }
  .overview-attendance-action { min-height: 42px; padding-inline: 13px; font-size: .8rem; }
  .overview-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .overview-metric { min-height: 112px; padding: 14px; }
  .overview-training-card { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; padding: 13px; }
  .overview-training-card time { font-size: 1rem; }
  .overview-training-card strong { font-size: .92rem; }
  .overview-training-card small { font-size: .74rem; }
  .overview-activity-card,
  .parent-recent-activity { grid-template-columns: 48px minmax(0, 1fr); gap: 9px; }
  .overview-activity-card .tag,
  .parent-recent-activity .tag { grid-column: 2; justify-self: start; }
  .attention-filter-strip { margin-right: -2px; }
  .attention-filter-chip { min-height: 34px; padding: 5px 9px; }
  .trainer-attention-row { grid-template-columns: 24px minmax(0, 1fr) 32px; gap: 8px; padding: 9px 10px; }
  .trainer-attention-indicator { width: 24px; height: 24px; }
  .attention-row-action { width: 32px; height: 32px; }
  .attention-issue { font-size: .68rem; }
  .overview-extended-grid { grid-template-columns: 1fr; }
  .parent-child-summary { padding: 24px 72px 18px 22px; }
  .parent-child-arrow { display: none; }
  .parent-next-training-card { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 15px; }
  .parent-excuse-button { grid-column: 2; justify-self: start; }
  .parent-excuse-drawer .parent-excuse-range { grid-template-columns: 1fr; }
  .parent-training-days strong { font-size: 1.85rem; }
  .registration-card-facts { gap: 8px 12px; }
  .registration-card-facts div { display: grid; gap: 1px; }
  .registration-card-facts dd { white-space: normal; }
  .registration-detail > div { position: static; width: auto; margin-top: 8px; box-shadow: none; }
  .news-card-compact { grid-template-columns: 1fr; gap: 9px; }
  .news-date-block { display: flex; align-items: center; gap: 9px; padding: 0; border: 0; }
  .news-card-compact .card-actions { margin-left: 0; }
  .event-registration-panel-body .panel-heading { align-items: flex-start; }
  .group-generation-panel { flex-basis: 100%; }
  .group-generation-panel > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
  .group-generation-panel > div .secondary-action { grid-column: 1 / -1; }
  .member-import-panel { flex-basis: 100%; }
  .member-import-panel > div { display: grid; grid-template-columns: 1fr; }
  .member-search-bar { grid-template-columns: 1fr; }
  .member-filter-panel { width: 100%; }
  .member-filter-fields { grid-template-columns: 1fr; }
  .communication-module > summary { min-height: 58px; padding: 13px 14px; }
  .communication-module-body { padding: 14px; }
  .profile-management-module > summary { min-height: 58px; padding: 13px 14px; }
  .profile-management-body { padding: 14px; }
  .export-module > summary { min-height: 58px; padding: 13px 14px; }
  .export-module-body { padding: 12px 14px; }
  .secondary-data-module > summary { min-height: 58px; padding: 13px 14px; }
  .secondary-data-body { padding: 14px; }
}

@media (max-width: 430px) {
  .overview-intro-card { gap: 12px; padding: 17px; }
  .overview-intro-card h3 { font-size: 1.35rem; }
  .overview-attendance-action { padding-inline: 10px; font-size: .72rem; }
  .overview-metric strong { font-size: 1.65rem; }
  .parent-child-metrics { gap: 9px; }
  .parent-child-metrics strong { font-size: 1.3rem; }
}

/* Detail člena: dlouhý formulář zůstává kompletní, ale čte se jako několik jasných bloků. */
.member-detail-shell { display: grid; gap: 14px; }
.member-detail-shell .member-fact-grid { margin: 0; }
.member-detail-shell .member-fact-grid > div { min-height: 66px; padding: 11px 12px; border-radius: 14px; background: var(--surface); box-shadow: 0 5px 12px rgba(15, 24, 34, .045); }
.member-detail-shell .member-fact-grid dt { font-size: .7rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.member-detail-shell .member-fact-grid dd { margin-top: 5px; color: var(--ink); font-size: .94rem; font-weight: 900; line-height: 1.25; }
.member-detail-sections { display: grid; gap: 10px; }
.member-detail-sections .collapsible-card,
.member-detail-sections .member-documents { margin-top: 0; padding: 0; overflow: hidden; border-radius: 16px; background: var(--surface); box-shadow: 0 6px 15px rgba(15, 24, 34, .045); }
.member-detail-sections .sport-profile-head { min-height: 66px; padding: 14px 16px; }
.member-detail-sections .sport-profile-head strong { color: var(--ink); font-size: .98rem; }
.member-detail-sections .sport-profile-head .meta { max-width: 42rem; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.member-detail-sections .collapsible-card > summary::after { padding-left: 10px; color: var(--brand); }
.member-detail-sections .collapsible-card[open] > summary { border-bottom: 1px solid var(--line); }
.member-detail-sections .medical-section > :not(summary),
.member-detail-sections .attendance-profile > :not(summary),
.member-detail-sections .photo-section > :not(summary),
.member-detail-sections .member-documents > :not(summary),
.member-detail-sections .sport-profile > :not(summary) { margin-left: 16px; margin-right: 16px; }
.member-detail-sections .medical-section > :last-child,
.member-detail-sections .attendance-profile > :last-child,
.member-detail-sections .photo-section > :last-child,
.member-detail-sections .member-documents > :last-child,
.member-detail-sections .sport-profile > :last-child { margin-bottom: 16px; }
.member-detail-sections .sport-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.member-detail-sections .sport-summary-grid article { min-height: 62px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.member-detail-sections .document-list { gap: 7px; }
.member-detail-sections .document-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.member-detail-actions { justify-content: flex-start; padding: 4px 0 0; }
.member-detail-actions .danger-action { margin-left: auto; }

.parent-module-drawers { display: grid; grid-template-columns: 1fr; gap: 8px; }
.parent-module-drawer { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.parent-module-drawer > summary { display: flex; align-items: center; min-height: 58px; padding: 11px 14px; cursor: pointer; list-style: none; }
.parent-module-drawer > summary::-webkit-details-marker { display: none; }
.parent-module-drawer > summary > span { display: grid; gap: 2px; min-width: 0; }
.parent-module-drawer > summary strong { color: var(--ink); font-size: .92rem; }
.parent-module-drawer > summary small { color: var(--muted); font-size: .72rem; }
.parent-module-drawer > summary::after { content: "›"; margin-left: auto; color: var(--brand); font-size: 1.45rem; font-weight: 900; transform: rotate(90deg); transition: transform .16s ease; }
.parent-module-drawer[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.parent-module-drawer[open] > summary::after { transform: rotate(-90deg); }
.parent-module-drawer-body > .parent-info-card { margin: 0; border: 0; border-radius: 0; box-shadow: none; }

/* Jeden editační dialog pro celý systém: čitelná hlavička, přehled polí a pevné akce. */
#editorDialog { max-height: min(820px, calc(100dvh - 28px)); overflow: hidden; border-radius: 20px; background: var(--surface); color: var(--ink); }
.dialog-card { display: grid; max-height: inherit; padding: 0; }
.dialog-heading { position: relative; display: grid; gap: 4px; padding: 20px 22px 17px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, var(--surface) 0%, var(--surface-soft) 100%); }
.dialog-heading > span { color: var(--brand); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.dialog-heading h2 { margin: 0; color: var(--ink); font-family: "Bricolage Grotesque", sans-serif; font-size: clamp(1.3rem, 4vw, 1.65rem); line-height: 1.15; }
#dialogFields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; max-height: min(590px, calc(100dvh - 240px)); overflow-y: auto; padding: 18px 22px; overscroll-behavior: contain; }
.dialog-field { display: grid; min-width: 0; gap: 6px; margin: 0; color: var(--muted); font-size: .78rem; font-weight: 900; }
.dialog-field > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog-field input,
.dialog-field select,
.dialog-field textarea { min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); box-shadow: inset 0 1px 1px rgba(15, 24, 34, .025); font: inherit; font-weight: 700; }
.dialog-field input:focus,
.dialog-field select:focus,
.dialog-field textarea:focus { border-color: var(--brand); outline: 3px solid rgba(220, 38, 38, .12); }
.dialog-field-textarea,
.dialog-field-multiselect,
.checkbox-field { grid-column: 1 / -1; }
.dialog-field textarea { min-height: 104px; resize: vertical; }
.dialog-field-multiselect { min-inline-size: 0; padding: 0; border: 0; }
.dialog-field-multiselect legend { margin-bottom: 6px; color: var(--muted); font-size: .78rem; font-weight: 900; }
.dialog-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 7px; }
.dialog-choice { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--ink); cursor: pointer; }
.dialog-choice:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.dialog-choice input { flex: 0 0 auto; width: 17px; min-height: 17px; margin: 0; accent-color: var(--brand); }
.dialog-choice span { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.dialog-field small { margin-top: -1px; font-size: .7rem; line-height: 1.3; }
.dialog-card .checkbox-field { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--ink); }
.dialog-card .checkbox-field input { flex: 0 0 auto; width: 18px; min-height: 18px; margin: 0; accent-color: var(--brand); }
.dialog-card menu { position: relative; z-index: 1; min-height: 70px; margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.dialog-card menu .primary-action { min-width: 112px; }
.group-workspace-tabs { width: min(100%, 420px); margin: 0 0 14px; }
[data-group-workspace-panel][hidden] { display: none !important; }
#editorDialog.dialog-very-dense #dialogFields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#editorDialog.dialog-very-dense .dialog-field-textarea,
#editorDialog.dialog-very-dense .dialog-field-multiselect,
#editorDialog.dialog-very-dense .checkbox-field { grid-column: 1 / -1; }

/* Sklad: počet je pracovní hodnota, proto je čitelný a stav zásoby je patrný na první pohled. */
.stock-table { gap: 8px; }
.stock-header { padding: 9px 12px; border-radius: 13px; }
.stock-row { min-height: 62px; padding: 10px 12px; border-radius: 14px; box-shadow: 0 5px 12px rgba(15, 24, 34, .035); transition: border-color .16s ease, box-shadow .16s ease; }
.stock-row:hover { border-color: rgba(220, 38, 38, .28); box-shadow: 0 9px 18px rgba(15, 24, 34, .075); }
.stock-row-available { border-left: 4px solid #16a34a; }
.stock-row-empty { border-left: 4px solid #dc2626; background: color-mix(in srgb, var(--surface) 94%, #fee2e2); }
.stock-category { color: var(--ink); }
.stock-code { color: var(--muted); font-size: .78rem; }
.stock-count { position: relative; }
.stock-count input { min-height: 38px; border-radius: 10px; background: var(--surface-soft); color: var(--ink); }
.stock-count.stock-ok input { border-color: rgba(22, 163, 74, .34); color: #15803d; }
.stock-count.stock-empty input { border-color: rgba(220, 38, 38, .34); color: #b91c1c; }
.stock-row .inline-actions { justify-content: flex-end; }
.issue-row { border-radius: 15px; box-shadow: 0 5px 12px rgba(15, 24, 34, .035); }

:root[data-theme="dark"] .member-detail-shell .member-fact-grid > div,
:root[data-theme="dark"] .member-detail-sections .collapsible-card,
:root[data-theme="dark"] .member-detail-sections .member-documents,
:root[data-theme="dark"] #editorDialog,
:root[data-theme="dark"] .dialog-card menu { background: var(--surface); box-shadow: 0 8px 20px rgba(0,0,0,.2); }
:root[data-theme="dark"] .dialog-heading { background: linear-gradient(110deg, var(--surface) 0%, var(--surface-soft) 100%); }
:root[data-theme="dark"] .dialog-field input,
:root[data-theme="dark"] .dialog-field select,
:root[data-theme="dark"] .dialog-field textarea { background: #0f1822; }
:root[data-theme="dark"] .dialog-card .checkbox-field,
:root[data-theme="dark"] .dialog-choice,
:root[data-theme="dark"] .member-detail-sections .sport-summary-grid article,
:root[data-theme="dark"] .member-detail-sections .document-item,
:root[data-theme="dark"] .stock-count input { background: var(--surface-soft); }
:root[data-theme="dark"] .stock-row-empty { background: color-mix(in srgb, var(--surface) 90%, #7f1d1d); }
:root[data-theme="dark"] .stock-count.stock-ok input { color: #86efac; }
:root[data-theme="dark"] .stock-count.stock-empty input { color: #fca5a5; }

@media (max-width: 760px) {
  .member-detail-shell { gap: 10px; }
  .member-detail-shell .member-fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .member-detail-shell .member-fact-grid > div { min-height: 58px; padding: 9px 10px; border-radius: 12px; }
  .member-detail-shell .member-fact-grid dt { font-size: .63rem; }
  .member-detail-shell .member-fact-grid dd { margin-top: 3px; font-size: .83rem; }
  .member-detail-sections { gap: 8px; }
  .member-detail-sections .sport-profile-head { min-height: 58px; padding: 12px; }
  .member-detail-sections .sport-profile-head .meta { max-width: 54vw; font-size: .72rem; }
  .member-detail-sections .sport-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 12px; }
  .member-detail-sections .medical-section > :not(summary),
  .member-detail-sections .attendance-profile > :not(summary),
  .member-detail-sections .photo-section > :not(summary),
  .member-detail-sections .member-documents > :not(summary),
  .member-detail-sections .sport-profile > :not(summary) { margin-left: 12px; margin-right: 12px; }
  .member-detail-sections .medical-section > :last-child,
  .member-detail-sections .attendance-profile > :last-child,
  .member-detail-sections .photo-section > :last-child,
  .member-detail-sections .member-documents > :last-child,
  .member-detail-sections .sport-profile > :last-child { margin-bottom: 12px; }
  .member-detail-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .member-detail-actions > * { width: 100%; min-width: 0; }
  .member-detail-actions .danger-action { margin-left: 0; }
  #editorDialog { width: 100%; max-height: calc(100dvh - 8px); margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .dialog-heading { padding: 17px 18px 14px; }
  .dialog-heading::before { content: ""; justify-self: center; width: 38px; height: 4px; margin-bottom: 4px; border-radius: 999px; background: var(--line); }
  #dialogFields,
  #editorDialog.dialog-very-dense #dialogFields { grid-template-columns: 1fr; max-height: calc(100dvh - 210px); gap: 11px; padding: 15px 18px; }
  .dialog-field-textarea,
  .dialog-field-multiselect,
  .checkbox-field { grid-column: auto; }
  /* iOS automaticky přibližuje formulář při velikosti písma pod 16px. */
  #editorDialog .dialog-field input,
  #editorDialog .dialog-field select,
  #editorDialog .dialog-field textarea { font-size: 16px; }
  .dialog-card menu { min-height: 66px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
  .dialog-card menu .primary-action { flex: 1; }
  .stock-row { min-height: 0; padding: 11px; border-radius: 13px; }
  .stock-row .inline-actions { justify-content: flex-start; padding-top: 4px; }
  .stock-count input { min-height: 40px; }
}
