/* PL: Układ panelu personelu (motyw w theme.css). / EN: Staff panel layout (theme lives in theme.css). */
.panel-layout { display: flex; min-height: 100vh; }
.panel-sidebar { --bs-offcanvas-width: 260px; --bs-offcanvas-bg: #080706; background: #080706; border-right: 1px solid #2c180b; }
@media (min-width: 992px) {
  .panel-sidebar { width: 260px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.panel-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 16px; }
.panel-sidebar-head a { text-decoration: none; }
.panel-nav { display: flex; flex-direction: column; padding: 0 12px 24px; }
.panel-nav .nav-link { color: var(--brand-text); padding: 9px 12px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.panel-nav .nav-link:hover { background: #ffffff08; color: #fff; }
.panel-nav .nav-link.active, .panel-nav .nav-link.up-current { background: #2a1a0e; color: var(--brand-accent); box-shadow: inset 3px 0 0 var(--brand-accent); }
.panel-nav .nav-link.disabled { color: #6f5f53; }
.panel-nav .nav-link small { font-size: 10px; margin-left: 4px; text-transform: uppercase; letter-spacing: 1px; }
.panel-nav-section { margin: 18px 12px 6px; font-size: 10px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--brand-accent); }

.panel-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid #2c180b; background: #0b0807; position: sticky; top: 0; z-index: 10; }
.location-name { font-weight: 700; color: var(--brand-text-muted); }
.location-switch .form-select { min-width: 200px; }
.user-menu { color: var(--brand-text); text-decoration: none; font-weight: 700; }
.user-menu small { color: var(--brand-text-muted); font-weight: 500; margin-left: 4px; }
.panel-main { padding: 28px 24px 48px; }
@media (max-width: 575.98px) {
  .panel-topbar { padding: 10px 16px; }
  /* PL: Na telefonie bez roli i z obcięciem długiego imienia. / EN: On phones: no role, long names truncated. */
  .user-menu small { display: none; }
  .user-menu { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .panel-main { padding: 20px 16px 40px; }
  .location-switch .form-select { min-width: 0; }
}

.messages { padding: 0 24px; }
.messages:not(:empty) { padding-top: 16px; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); }

.panel-card { background: var(--brand-surface); border: 1px solid var(--brand-border); border-radius: 12px; padding: 24px; }
.panel-card-narrow { max-width: 720px; }
.stat { height: 100%; }
.stat span { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand-text-muted); font-weight: 800; }
.stat strong { display: block; font-family: 'DM Sans', Arial, sans-serif; font-size: 36px; font-weight: 900; color: var(--brand-accent); }
.stat small { color: #8a786b; }
.stat-upcoming strong { color: #6f5f53; }

.assignment-row { border-bottom: 1px dashed var(--brand-border); padding-bottom: 12px; margin-bottom: 12px; }


.today-hours { color: var(--brand-text-muted); }
.today-hours strong { color: var(--brand-accent); }

/* PL: Ustawienia / EN: Settings */
.settings-scope { min-width: 260px; }
.setting-row { border-bottom: 1px dashed var(--brand-border); padding-bottom: 8px; margin-bottom: 16px; }
.setting-row:last-of-type { border-bottom: 0; }
.setting-inherit { margin: -8px 0 8px; font-size: 13px; color: var(--brand-text-muted); }
.setting-row.is-inherited > .mb-3 { opacity: .45; }

/* PL: Godziny otwarcia / EN: Opening hours */
.hours-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--brand-border); }
.hours-day { font-weight: 700; }
.hours-times { display: flex; align-items: center; gap: 8px; max-width: 300px; }
.hours-row.is-closed .hours-times { opacity: .35; }
.hours-errors { grid-column: 1 / -1; }
@media (max-width: 575.98px) { .hours-row { grid-template-columns: 1fr auto; } .hours-times { grid-column: 1 / -1; grid-row: 2; } }
.closed-day { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--brand-border); }

/* PL: Strefy / EN: Zones */
.zone-card.is-inactive { opacity: .6; }
.access-points { margin: 16px 0 12px; }
.access-points li { padding: 6px 0; border-bottom: 1px dashed var(--brand-border); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.access-points a { font-weight: 700; text-decoration: none; }

/* PL: Klienci / EN: Members */
.member-search { display: grid; grid-template-columns: 1fr 200px; gap: 12px; margin-bottom: 20px; }
@media (max-width: 575.98px) { .member-search { grid-template-columns: 1fr; } }
.member-link { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-text); text-decoration: none; }
.member-link:hover strong { color: var(--brand-accent); }
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.avatar-initials { background: #2a1a0e; color: var(--brand-accent); font-weight: 800; text-transform: uppercase; border: 1px solid var(--brand-border); }
.page-header .eyebrow a { color: inherit; text-decoration: none; }
.page-header .eyebrow a.full-page-link { color: var(--brand-text-muted); letter-spacing: 1px; }
/* PL: Na pełnej stronie link do „pełnego widoku” jest zbędny. / EN: The full-view link is redundant on the full page. */
up-modal .full-page-link { display: inline; }
.full-page-link { display: none; }
.data-list { display: grid; grid-template-columns: 210px 1fr; gap: 8px 16px; margin: 0; }
.data-list dt { color: var(--brand-text-muted); font-weight: 600; }
.data-list dd { margin: 0; }
.data-list-compact { grid-template-columns: 110px 1fr; font-size: 14px; }
@media (max-width: 575.98px) { .data-list { grid-template-columns: 1fr; gap: 2px; } .data-list dd { margin-bottom: 8px; } }
.member-notes { margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--brand-accent); background: var(--brand-surface-2); }
.card-qr { background: #fff; border-radius: 10px; padding: 8px; width: 220px; margin: 0 auto 16px; }
.card-qr svg { width: 100%; height: auto; display: block; }
.card-qr.is-blocked { opacity: .3; }
.card-history li { padding: 4px 0; border-bottom: 1px dashed var(--brand-border); }
.stat-link { display: block; text-decoration: none; color: inherit; } .stat-link:hover { border-color: var(--brand-accent); }

/* PL: Oferta i karnety / EN: Products and passes */
.window-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 8px 0; border-bottom: 1px dashed var(--brand-border); }
.window-times { display: flex; align-items: center; gap: 8px; width: 260px; }
.window-errors { flex-basis: 100%; }
.entitlement { padding: 12px 0; border-bottom: 1px dashed var(--brand-border); }
.entitlement:last-of-type { border-bottom: 0; }
.freeze-line { margin-top: 6px; color: #9fd3ff; }
.history-line { padding: 4px 0; border-bottom: 1px dashed var(--brand-border); }
.badge.state-active { background: #198754; }
.badge.state-upcoming { background: #0d6efd; }
.badge.state-frozen { background: #2b7bb9; }
.badge.state-used_up, .badge.state-expired { background: #5c4a3e; }
.badge.state-cancelled { background: #8b2a2a; }
.expiring-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--brand-border); }

/* PL: Wejścia / EN: Access */
.access-event { display: flex; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--brand-border); border-left: 4px solid transparent; }
.access-event.is-granted { border-left-color: #198754; }
.access-event.is-denied { border-left-color: #dc3545; background: #dc354510; }
.access-event-body { min-width: 0; }
.access-event-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.access-event-name { font-weight: 800; font-size: 17px; color: #fff; text-decoration: none; }
.access-event-message { color: var(--brand-text-muted); }
.manual-open { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--brand-border); }
.event-filters { display: grid; grid-template-columns: 200px 200px 1fr; gap: 12px; margin-bottom: 8px; }
@media (max-width: 767.98px) { .event-filters { grid-template-columns: 1fr; } }
.simulator-result.is-granted { border-color: #198754; }
.simulator-result.is-denied { border-color: #dc3545; }
.simulator-verdict { font-family: 'DM Sans', Arial, sans-serif; font-weight: 900; font-size: 34px; }
.is-granted .simulator-verdict { color: #4ade80; }
.is-denied .simulator-verdict { color: #f87171; }

/* PL: Płatności / EN: Payments */
.charge-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--brand-border); }
.charge-row:last-of-type { border-bottom: 0; }

/* PL: Zajęcia / EN: Classes */
.week-label { font-weight: 800; min-width: 130px; text-align: center; }
.schedule-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1199.98px) { .schedule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .schedule-grid { grid-template-columns: 1fr; } }
.schedule-day { background: var(--brand-surface); border: 1px solid var(--brand-border); border-radius: 12px; padding: 10px; min-height: 120px; }
.schedule-day.is-today { border-color: var(--brand-accent); }
.schedule-day-head { font-weight: 800; font-size: 13px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.schedule-day-head span { color: var(--brand-text-muted); font-weight: 600; }
.schedule-item { display: block; position: relative; padding: 8px 10px 8px 12px; margin-bottom: 8px; border-radius: 8px; background: var(--brand-surface-2); border-left: 4px solid var(--class-color, var(--brand-accent)); text-decoration: none; color: var(--brand-text); }
.schedule-item:hover { background: #2a1a0e; }
.schedule-item strong { display: block; font-size: 14px; }
.schedule-item span { display: block; font-size: 12px; color: var(--brand-text-muted); }
.schedule-item .schedule-seats { font-weight: 800; color: var(--brand-text); }
.schedule-item.is-cancelled { opacity: .45; text-decoration: line-through; }
.schedule-empty { color: #6f5f53; text-align: center; padding: 12px 0; }
.booking-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--brand-border); }
.booking-row:last-child { border-bottom: 0; }
.booking-name { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.badge.booking-booked { background: #0d6efd; }
.badge.booking-attended { background: #198754; }
.badge.booking-no_show, .badge.booking-late_cancel { background: #8b2a2a; }
.badge.booking-excused { background: #2b7bb9; }
.badge.booking-cancelled { background: #5c4a3e; }
.badge.booking-waitlist { background: #6f42c1; }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }

/* PL: Raporty – wykres kolumnowy (jedna seria). Kolor słupka sprawdzony walidatorem (ciemne tło #19100d).
   EN: Reports – column chart (single series). Bar colour validated against the dark surface #19100d. */
:root { --chart-mark: #c97520; --chart-mark-hover: #d9822a; --chart-grid: #3a2618; }
.report-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.report-filters .mb-3 { margin-bottom: 0 !important; }
.report-filter-check { padding-bottom: 6px; }
.report-presets { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 4px; }
.report-hero { margin-bottom: 20px; }
.report-hero span { display: block; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand-text-muted); font-weight: 800; }
.report-hero strong { display: block; font-family: 'DM Sans', Arial, sans-serif; font-size: 48px; font-weight: 800; line-height: 1.1; color: #fff; }
.report-hero small { color: var(--brand-text-muted); }
.report-table td, .report-table th { font-variant-numeric: tabular-nums; }
.col-chart { margin: 0; }
.weekday-picker { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.weekday-picker .btn { padding: 2px 9px; }
/* PL: Mapa cieplna – jeden odcień marki, kroki jasności od tła. EN: Heat map – one brand hue, lightness steps from the surface. */
.heatmap-grid { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 11px; }
.heatmap-grid th { color: var(--brand-text-muted); font-weight: 400; text-align: center; padding: 0 2px; }
.heatmap-grid tbody th { text-align: left; padding-right: 8px; white-space: nowrap; }
.heatmap-grid td { position: relative; height: 26px; min-width: 18px; border-radius: 3px; outline: none; }
.heatmap-grid td:hover, .heatmap-grid td:focus-visible { box-shadow: inset 0 0 0 1px var(--brand-text); }
.heatmap-grid td:hover .col-chart-tip, .heatmap-grid td:focus .col-chart-tip { display: block; }
.heatmap-grid tr td:nth-last-child(-n+4) .col-chart-tip { left: auto; right: 0; transform: none; }
.heat-0 { background: #24170f; }
.heat-1 { background: #4a2c14; }
.heat-2 { background: #6e4018; }
.heat-3 { background: #97561b; }
.heat-4 { background: #c97520; }
.heat-5 { background: #f0a24a; }
.heatmap-legend { display: flex; align-items: center; gap: 3px; margin-top: 10px; }
.heatmap-legend i { display: inline-block; width: 16px; height: 12px; border-radius: 2px; }
.col-chart-title { font-weight: 800; margin-bottom: 14px; }
.col-chart-plot { position: relative; height: 220px; margin: 18px 0 0 56px; }
.col-chart-grid span { position: absolute; left: -56px; right: 0; border-bottom: 1px solid var(--chart-grid); font-size: 11px; color: var(--brand-text-muted); line-height: 0; text-align: left; width: calc(100% + 56px); }
.col-chart-grid span::before { content: ""; }
.col-chart-bars { position: absolute; inset: 0; display: grid; align-items: end; gap: 2px; }
.col-chart-slot { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.col-chart-bar { position: relative; width: 100%; max-width: 24px; min-height: 1px; background: var(--chart-mark); border-radius: 4px 4px 0 0; }
.col-chart-slot:hover .col-chart-bar, .col-chart-slot:focus-visible .col-chart-bar { background: var(--chart-mark-hover); }
.col-chart-slot:focus-visible { box-shadow: inset 0 0 0 1px var(--brand-text-muted); border-radius: 4px; }
.col-chart-peak { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font-size: 11px; font-weight: 700; color: var(--brand-text); white-space: nowrap; }
.col-chart-tip { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5; white-space: nowrap; background: #080706; border: 1px solid var(--chart-grid); border-radius: 6px; padding: 5px 9px; font-size: 12px; color: var(--brand-text-muted); pointer-events: none; }
.col-chart-tip strong { color: #fff; margin-right: 4px; }
.col-chart-slot:hover .col-chart-tip, .col-chart-slot:focus .col-chart-tip { display: block; }
.col-chart-axis { display: grid; gap: 2px; margin: 6px 0 0 56px; font-size: 11px; color: var(--brand-text-muted); }
.col-chart-axis span { text-align: center; white-space: nowrap; overflow: visible; }

.audit-changes del { color: #8a786b; }
.audit-changes div { word-break: break-word; }

/* PL: Poprawki wykresu: zero bez słupka, etykiety osi nad linią, podpowiedź i etykieta maksimum przy krawędziach
       wyrównane do środka wykresu (nie wychodzą poza kartę).
   EN: Chart fixes: no bar for zero, axis labels above the line, tooltip and peak label at the edges aligned
       towards the plot (they never leave the card). */
.col-chart-bar.is-zero { display: none; }
.col-chart-grid span { line-height: normal; height: 0; }
.col-chart-grid em { position: absolute; left: 0; bottom: 3px; font-style: normal; }
.col-chart-slot:nth-last-child(-n+3) .col-chart-tip, .col-chart-slot:nth-last-child(-n+3) .col-chart-peak { left: auto; right: 0; transform: none; }
.col-chart-slot:nth-child(-n+3) .col-chart-tip { left: 0; transform: none; }
.col-chart-slot:hover .col-chart-peak, .col-chart-slot:focus .col-chart-peak { visibility: hidden; }

/* PL: Grafik – filtry i widok dnia z kolumnami sal. / EN: Schedule – filters and day view with room columns. */
.schedule-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.schedule-filters .form-select { width: auto; min-width: 180px; }
a.schedule-day-head { display: block; color: var(--brand-text); text-decoration: none; }
a.schedule-day-head:hover { color: var(--brand-accent); }
.day-board { --hour: 64px; overflow-x: auto; }
.day-board-head, .day-board-body { display: grid; grid-template-columns: 56px repeat(auto-fit, minmax(160px, 1fr)); min-width: 520px; }
.day-board-head { border-bottom: 1px solid var(--brand-border); }
.day-board-room { padding: 12px; font-weight: 800; border-left: 1px solid var(--brand-border); }
.day-board-room span { font-weight: 500; font-size: 12px; color: var(--brand-text-muted); }
.day-board-body { height: calc(var(--hours) * var(--hour)); position: relative; }
.day-board-gutter { position: relative; }
.day-board-gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--brand-text-muted); }
.day-board-gutter span:first-child { transform: none; }
.day-board-col { position: relative; border-left: 1px solid var(--brand-border); }
.day-board-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--chart-grid); }
.day-block { position: absolute; left: 6px; right: 6px; overflow: hidden; padding: 6px 8px; border-radius: 8px; background: var(--brand-surface-2); border-left: 4px solid var(--class-color); text-decoration: none; color: var(--brand-text); font-size: 12px; box-shadow: 0 0 0 2px var(--brand-surface); }
.day-block:hover { background: #2a1a0e; z-index: 2; }
.day-block strong { display: block; font-size: 13px; }
.day-block span { color: var(--brand-text-muted); }
.day-block.is-cancelled { opacity: .45; text-decoration: line-through; }
.day-board-body { margin-bottom: 14px; }
