:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #637083;
  --line: #d6dde7;
  --surface: #ffffff;
  --page: #eef3f7;
  --accent: #087f8c;
  --accent-dark: #06606a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--page);
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 32px;
  background: #f8fbfd;
  border-bottom: 1px solid var(--line);
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 32px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.app-nav button,
.wizard-steps button {
  background: #dfe8ef;
  color: var(--ink);
}

.app-nav button.active,
.wizard-steps button.active {
  background: var(--accent);
  color: #fff;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

p, #session {
  color: var(--muted);
}

.session-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-bar button {
  white-space: nowrap;
}

main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
  padding: 24px 32px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.admin-section {
  width: 100%;
  min-width: 0;
  margin-bottom: 6px;
}

.admin-section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #edf2f6;
}

.wide {
  grid-column: 1 / -1;
}

.simulation-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #f97316;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

.customer-portal-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid > .wide-field {
  grid-column: 1 / -1;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.view-toggle,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.export-toolbar {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.export-toolbar button {
  background: #2563a8;
}

.export-toolbar button:hover {
  background: #1e4f86;
}

.view-toggle button {
  color: var(--ink);
  background: #dfe8ef;
}

.view-toggle button.active {
  color: #fff;
  background: var(--accent);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input, select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background: #94a3b8;
}

.button-link {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.button-link:hover {
  background: var(--accent-dark);
}

pre {
  min-height: 72px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  color: #233044;
  background: #f4f7fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: pre-wrap;
}

.message-box:empty,
.message-box[hidden] {
  display: none;
}

.message-box {
  min-height: 0;
  margin-top: 12px;
}

.debug-section {
  border-style: dashed;
}

.debug-json[hidden] {
  display: none;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.summary-item {
  padding: 12px;
  background: #f4f7fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(24, 33, 47, 0.04);
}

.summary-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

.availability-result {
  display: block;
  width: 100%;
  margin-top: 16px;
}

.availability-summary {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.availability-summary .summary-item {
  min-height: 78px;
  border-left: 4px solid #2563a8;
}

.availability-summary .summary-item:first-child {
  grid-column: span 2;
  border-left-color: #16835f;
}

.availability-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
}

.availability-status::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
}

.availability-status.is-ok {
  color: #16835f;
}

.availability-status.is-blocked {
  color: #bf2b2b;
}

.blocking-panel,
.ok-panel {
  margin: 12px 0;
  padding: 12px;
  border-radius: 6px;
}

.blocking-panel {
  color: #7a271a;
  background: #fff4ed;
  border: 1px solid #fdba74;
}

.blocking-panel h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.ok-panel {
  color: #0f5132;
  background: #ecfdf3;
  border: 1px solid #86efac;
}

.details-panel {
  margin-top: 12px;
}

.details-panel summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #f8fbfd;
  cursor: pointer;
  font-weight: 700;
}

.section-summary h3,
.recap-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.compact-summary {
  margin-top: 8px;
}

.recap-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.payment-card {
  margin-top: 12px;
}

.payment-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.payment-form label {
  flex: 1 1 180px;
}

.booking-payments-table th,
.booking-payments-table td {
  white-space: nowrap;
}

table {
  width: 100%;
  margin: 12px 0 16px;
  border-collapse: collapse;
  background: #fff;
}

th, td {
  padding: 8px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f4f7fa;
  color: var(--muted);
  font-size: 13px;
}

td input[type="text"] {
  width: 100%;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.admin-table-scroll {
  max-height: 760px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-table-scroll table {
  margin: 0;
}

.admin-table-scroll th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.wide-table-scroll {
  overscroll-behavior-x: contain;
}

.table-scroll-hint {
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.table-compact {
  table-layout: fixed;
  font-size: 13px;
}

.table-compact th,
.table-compact td {
  padding: 6px 8px;
  white-space: nowrap;
}

.table-compact .history-cell,
.table-compact .history-cell div {
  white-space: normal;
  line-height: 1.35;
}

.table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  align-items: stretch;
  gap: 6px;
  min-width: 260px;
  white-space: normal;
}

.table-actions button,
.table-actions select,
.table-actions input {
  min-width: 90px;
  min-height: 32px;
  width: 100%;
  font-size: 12px;
}

.table-actions .badge,
.table-actions .inline-payment-row,
.table-actions .ffck-verification-checks {
  grid-column: 1 / -1;
}

.table-actions .inline-payment-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(90px, 1fr);
  gap: 6px;
}

.table-actions .ffck-verification-checks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.sticky-left,
.admin-table.reservations-table th:nth-child(-n+3),
.admin-table.reservations-table td:nth-child(-n+3),
.admin-table.ffck-day-cards-table th:nth-child(1),
.admin-table.ffck-day-cards-table td:nth-child(1),
.admin-table.ffck-day-cards-table th:nth-child(3),
.admin-table.ffck-day-cards-table td:nth-child(3) {
  position: sticky;
  background: #fff;
  z-index: 3;
}

.admin-table.reservations-table th:nth-child(-n+3),
.admin-table.ffck-day-cards-table th:nth-child(1),
.admin-table.ffck-day-cards-table th:nth-child(3) {
  background: #f4f7fa;
  z-index: 5;
}

.admin-table.reservations-table th:nth-child(1),
.admin-table.reservations-table td:nth-child(1) {
  left: 0;
}

.admin-table.reservations-table th:nth-child(2),
.admin-table.reservations-table td:nth-child(2) {
  left: 110px;
}

.admin-table.reservations-table th:nth-child(3),
.admin-table.reservations-table td:nth-child(3) {
  left: 270px;
  box-shadow: 5px 0 8px -8px rgba(15, 23, 42, 0.65);
}

.admin-table.ffck-day-cards-table th:nth-child(1),
.admin-table.ffck-day-cards-table td:nth-child(1) {
  left: 0;
}

.admin-table.ffck-day-cards-table th:nth-child(3),
.admin-table.ffck-day-cards-table td:nth-child(3) {
  left: 90px;
  box-shadow: 5px 0 8px -8px rgba(15, 23, 42, 0.65);
}

.admin-table.reservations-table th:last-child,
.admin-table.reservations-table td:last-child,
.admin-table.ffck-day-cards-table th:last-child,
.admin-table.ffck-day-cards-table td:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 4;
  box-shadow: -5px 0 8px -8px rgba(15, 23, 42, 0.65);
}

.admin-table.reservations-table th:last-child,
.admin-table.ffck-day-cards-table th:last-child {
  background: #f4f7fa;
  z-index: 6;
}

.users-panel {
  min-width: 0;
}

.users-table {
  min-width: 920px;
  table-layout: fixed;
}

.admin-table {
  min-width: 860px;
  table-layout: fixed;
}

.reservations-table {
  min-width: 1870px;
}

.reservations-col-date { width: 110px; }
.reservations-col-slot { width: 160px; }
.reservations-col-client { width: 220px; }
.reservations-col-count { width: 64px; }
.reservations-col-status { width: 120px; }
.reservations-col-money { width: 110px; }
.reservations-col-payment { width: 120px; }
.reservations-col-ffck { width: 120px; }
.reservations-col-actions { width: 300px; }

.ffck-day-cards-table {
  min-width: 2110px;
}

.ffck-col-booking { width: 90px; }
.ffck-col-validity { width: 120px; }
.ffck-col-participant { width: 180px; }
.ffck-col-civility { width: 100px; }
.ffck-col-name { width: 150px; }
.ffck-col-firstname { width: 150px; }
.ffck-col-email { width: 220px; }
.ffck-col-birth { width: 130px; }
.ffck-col-swim { width: 120px; }
.ffck-col-attestation { width: 150px; }
.ffck-col-payment { width: 140px; }
.ffck-col-cost { width: 150px; }
.ffck-col-status { width: 150px; }
.ffck-col-history { width: 180px; }
.ffck-col-reference { width: 160px; }
.ffck-col-actions { width: 300px; }

.boats-table {
  min-width: 980px;
}

.slots-table,
.animators-table,
.club-animators-table {
  min-width: 900px;
}

.animators-table {
  min-width: 1160px;
}

.club-animators-table {
  min-width: 1080px;
}

.volunteer-campaigns-table,
.volunteer-responses-table,
.withdrawal-requests-table,
.club-responsibles-table,
.slot-opening-table,
.statistics-table {
  min-width: 1050px;
}

.animator-inactive {
  background: #fff0f0;
  color: #6f6666;
}

.animator-inactive input,
.animator-inactive select {
  color: #6f6666;
}

.animator-name-cell {
  display: grid;
  gap: 6px;
}

.rates-table {
  min-width: 1280px;
}

.base-rates-table {
  min-width: 1240px;
}

.participants-table,
.availability-boats-table {
  min-width: 880px;
}

.ffck-day-cards-table {
  min-width: 1850px;
}

.ffck-verification-checks {
  display: grid;
  gap: 5px;
  min-width: 210px;
}

.ffck-alert {
  margin-top: 5px;
  color: #9b2525;
  font-size: 12px;
}

.ffck-booking-alerts {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.ffck-booking-alert {
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.ffck-booking-alert.danger {
  color: #8f2020;
  border-color: #d66d6d;
  background: #fff0f0;
}

.ffck-booking-alert.warning {
  color: #76520c;
  border-color: #d5aa4c;
  background: #fff8e5;
}

.ffck-booking-alert.success {
  color: #14663c;
  border-color: #6bb58d;
  background: #effaf4;
}

.terrain-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.terrain-booking {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.terrain-booking-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.2fr) auto;
  gap: 12px;
  align-items: center;
}

.terrain-booking-row.selected {
  border-color: #2c7a7b;
  background: #effafa;
}
.terrain-booking-row.is-cancelled {
  border-color: #cfd5dd;
  background: #f3f4f6;
  color: #596273;
}

.terrain-booking-row.is-cancelled .primary-action {
  background: #5d6b7a;
  border-color: #5d6b7a;
}

.terrain-workflow-card.is-readonly {
  border-color: #cfd5dd;
  background: #fafafa;
}

.terrain-readonly-banner {
  margin: 12px 0;
  padding: 10px 12px;
  color: #596273;
  border: 1px solid #d3d8df;
  border-radius: 8px;
  background: #f3f4f6;
}

.terrain-reschedule-panel {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.terrain-reschedule-panel.is-open {
  border-color: #b7ccd5;
  background: #ffffff;
}

.terrain-toggle-reschedule-btn {
  min-height: 40px;
}

.terrain-reschedule-body {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.terrain-reschedule-body[hidden] {
  display: none !important;
}

.terrain-reschedule-controls,
.terrain-reschedule-options {
  display: grid;
  gap: 10px;
}

.terrain-reschedule-controls {
  grid-template-columns: minmax(140px, 0.7fr) minmax(150px, 0.8fr) minmax(180px, 1fr) auto;
  align-items: end;
}

.terrain-reschedule-slot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d6e3ea;
  border-radius: 8px;
  background: #fff;
}

.terrain-reschedule-slot div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.terrain-reschedule-slot small {
  flex-basis: 100%;
  color: var(--muted);
}

@media (max-width: 720px) {
  .terrain-reschedule-controls,
  .terrain-reschedule-slot {
    grid-template-columns: 1fr;
  }
}

.terrain-booking-main,
.terrain-booking-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.terrain-booking-main strong {
  min-width: 96px;
}

.terrain-layout {
  display: grid;
  gap: 16px;
}

.terrain-workflow-card {
  scroll-margin-top: 18px;
  padding: 16px;
  border: 1px solid #b7ccd5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.terrain-workflow-header,
.terrain-workflow-footer,
.terrain-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.terrain-workflow-header h3,
.terrain-workflow-header p {
  margin: 0;
}

.terrain-workflow-step {
  display: grid;
  gap: 14px;
}

.terrain-workflow-step[hidden] {
  display: none !important;
}

.terrain-participant-list {
  display: grid;
  gap: 10px;
}

.terrain-participant-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.terrain-participant-identity {
  display: grid;
  gap: 3px;
}

.terrain-participant-edit-form {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.terrain-participant-edit-form[hidden] {
  display: none !important;
}

.terrain-participant-form-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.terrain-add-participant-panel {
  padding: 12px;
  border: 1px dashed #9fb9c2;
  border-radius: 8px;
  background: #fbfdff;
}

.terrain-add-participant-panel summary {
  cursor: pointer;
  font-weight: 700;
}

.terrain-present-participants,
.terrain-boat-options {
  display: grid;
  gap: 10px;
}

.terrain-present-participants {
  grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
  align-items: center;
}

.terrain-boat-options {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.terrain-boat-option-btn {
  display: grid;
  gap: 5px;
  text-align: left;
}

.terrain-boat-option-btn.disabled {
  opacity: 0.65;
}

.terrain-slot-alternatives {
  display: grid;
  gap: 10px;
}

.terrain-slot-alternative {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.terrain-slot-alternative div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.success-line {
  color: #14663c;
  font-weight: 700;
}

.operation-form {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
}

.operation-form[hidden] {
  display: none;
}

.terrain-booking header,
.terrain-metrics,
.terrain-payment {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.terrain-payment {
  justify-content: flex-start;
}

.operation-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.operation-actions button {
  min-height: 58px;
  font-size: 17px;
  font-weight: 700;
}

.operation-arrival-btn { background: #dbeafe; color: #174ea6; }
.operation-departure-btn { background: #dcfce7; color: #166534; }
.operation-return-btn { background: #ffedd5; color: #9a3412; }
.operation-finish-btn { background: #e5e7eb; color: #374151; }

.operation-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 5px;
  background: #e8eef3;
  font-weight: 700;
}

.operation-controls,
.equipment-check-panel,
.incident-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.equipment-check-grid {
  display: grid;
  gap: 8px;
}
.terrain-phone-link {
  color: #176b6d;
  font-weight: 700;
  text-decoration: none;
}

.terrain-phone-link:hover,
.terrain-phone-link:focus-visible {
  text-decoration: underline;
}

.equipment-check-table-wrap {
  overflow-x: auto;
}

.equipment-check-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.equipment-check-table th,
.equipment-check-table td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.equipment-check-table th {
  background: #eef7f6;
}

.equipment-present-label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 6px;
  align-items: center;
}

.equipment-present-label small {
  grid-column: 2;
  color: var(--muted);
}

.equipment-check-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) 90px 90px 100px 110px minmax(160px, 2fr);
  gap: 8px;
  align-items: end;
}

@media (max-width: 760px) {
  .operation-actions { grid-template-columns: repeat(2, 1fr); }
  .equipment-check-row { grid-template-columns: 1fr 1fr; }
  .terrain-booking-row,
  .terrain-participant-row,
  .terrain-slot-alternative,
}

.new-booking-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.admin-booking-shell {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.walk-in-wizard-form {
  margin-top: 16px;
}

.walk-in-shell {
  width: min(980px, 100%);
}

.admin-booking-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.walk-in-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-booking-step {
  display: grid;
  gap: 14px;
}

.walk-in-step {
  display: grid;
  gap: 14px;
}

.admin-booking-step[hidden],
.walk-in-step[hidden],
.wizard-field[hidden],
.wizard-action[hidden],
.walk-in-action[hidden] {
  display: none !important;
}

.admin-booking-step h3 {
  margin: 0;
  font-size: 18px;
}

.public-grid,
.admin-booking-grid {
  display: grid;
  gap: 12px;
}

.admin-booking-grid label,
.participant-entry label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.wide-field {
  grid-column: 1 / -1;
}

.slot-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.slot-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 14px;
  color: var(--ink);
  border-color: var(--line);
  background: #f8fbfd;
  text-align: left;
}

.slot-choice.selected,
.composition-option.selected {
  border-color: var(--accent);
  background: #dff3f4;
}

.badge-exceptional {
  background: #eef2ff;
  color: #3730a3;
}

.walk-in-slot-choice,
.walk-in-boat-option {
  min-height: 72px;
}

.slot-choice strong,
.slot-choice small {
  display: block;
}

.admin-slot-choice-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.admin-booking-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.advanced-options-panel {
  background: #f8fbfd;
  border-color: var(--line);
}

.admin-ffck-preview .summary {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.compact-preview {
  background: #fff;
}

.muted-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 720px) {
  .admin-booking-shell {
    padding: 24px;
  }

  .admin-booking-grid,
  .participant-entry-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-booking-steps,
  .walk-in-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slot-choice {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-slot-choice-meta {
    justify-items: start;
    text-align: left;
  }
}

.participant-editor {
  width: 100%;
}

.participant-editor-grid {
  display: grid;
  gap: 12px;
}

.participant-entry {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.participant-entry h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.participant-entry-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.participant-entry .wide-field {
  grid-column: 1 / -1;
}

.swim-warning {
  grid-column: 1 / -1;
  padding: 10px;
  border: 1px solid #c73535;
  border-radius: 6px;
  color: #8f2020;
  background: #fff0f0;
}

.swim-warning label {
  color: #8f2020;
}

.reservations-table {
  min-width: 0;
  table-layout: fixed;
}

.reservations-table th,
.reservations-table td {
  padding: 5px 6px;
  font-size: 12px;
  line-height: 1.2;
}

.reservations-table .compact-col {
  width: 35px;
  text-align: center;
}

.reservations-table th:nth-child(1),
.reservations-table td:nth-child(1) {
  width: 90px;
  white-space: nowrap;
}

.reservations-table th:nth-child(2),
.reservations-table td:nth-child(2) {
  width: 170px;
  white-space: nowrap;
}

.reservations-table th:nth-child(3),
.reservations-table td:nth-child(3) {
  width: auto;
}

.reservations-table td:nth-child(4),
.reservations-table td:nth-child(5),
.reservations-table td:nth-child(6) {
  text-align: center;
}

.reservations-table th:nth-child(4),
.reservations-table td:nth-child(4),
.reservations-table th:nth-child(5),
.reservations-table td:nth-child(5) {
  width: 35px;
}

.reservations-table th:nth-child(6),
.reservations-table td:nth-child(6) {
  width: 40px;
}

.reservations-table th:nth-child(7),
.reservations-table td:nth-child(7) {
  width: 126px;
}

.reservations-table th:nth-child(8),
.reservations-table td:nth-child(8),
.reservations-table th:nth-child(9),
.reservations-table td:nth-child(9) {
  width: 70px;
  white-space: nowrap;
}

.reservations-table th:nth-child(10),
.reservations-table td:nth-child(10) {
  width: 70px;
  text-align: center;
}

.reservations-table th:nth-child(11),
.reservations-table td:nth-child(11) {
  width: 250px;
  min-width: 250px;
  text-align: right;
  white-space: nowrap;
}

.reservations-table .badge {
  min-width: 0;
  width: auto;
  white-space: nowrap;
  padding: 4px 7px;
  font-size: 11px;
}

.reservations-table .actions-cell {
  gap: 5px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.reservations-table .actions-cell button {
  min-height: 30px;
  flex: 0 0 auto;
  padding: 5px 8px;
  font-size: 12px;
}

.reservations-table .actions-cell select {
  min-height: 30px;
  width: 96px;
  padding: 5px 7px;
  font-size: 12px;
}

.sortable-header {
  cursor: pointer;
}

.planning-table {
  min-width: 1280px;
}

.planning-board {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.planning-day {
  display: grid;
  gap: 12px;
}

.planning-day h3,
.planning-table-section h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.planning-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.planning-slot-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 6px solid #16835f;
  border-radius: 8px;
  background: #fff;
}

.planning-slot-card.is-warning {
  border-left-color: #d77806;
}

.planning-slot-card.is-danger {
  border-left-color: #bf2b2b;
}

.planning-slot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f6;
}

.planning-slot-header strong,
.planning-slot-header span:not(.badge) {
  display: block;
}

.planning-slot-header span:not(.badge) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.planning-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.planning-metrics div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfd;
}

.planning-metrics strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.planning-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.planning-facts div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
}

.planning-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.planning-facts dd {
  margin: 0;
}

.planning-details {
  margin-top: 12px;
}

.planning-detail-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.planning-detail-grid h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.planning-detail-table {
  min-width: 760px;
}

.planning-detail-table th,
.planning-detail-table td {
  padding: 6px;
  font-size: 12px;
}

.planning-table-section {
  margin-top: 22px;
}

.agenda-week-label {
  margin: 12px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.agenda-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.agenda-day {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  overflow: hidden;
}

.agenda-day header {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: #edf3f7;
  border-bottom: 1px solid var(--line);
}

.agenda-day header strong {
  text-transform: capitalize;
}

.agenda-day header span {
  color: var(--muted);
  font-size: 12px;
}

.agenda-day-slots {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.agenda-slot-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.agenda-slot-card:focus {
  outline: 3px solid rgba(8, 127, 140, 0.22);
  outline-offset: 2px;
}

.agenda-slot-card.is-open {
  border-color: #b7dfc8;
  background: #eefaf2;
}

.agenda-slot-card.is-blocked {
  border-color: #efc2c2;
  background: #fff0f0;
}

.agenda-slot-card.is-attention {
  border-color: #edc983;
  background: #fff8e8;
}

.agenda-slot-card.is-admin-closed {
  border-color: #d9dde5;
  background: #f1f3f5;
}

.agenda-slot-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.agenda-slot-main strong {
  line-height: 1.25;
}

.agenda-slot-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.agenda-slot-counts span {
  padding: 5px;
  border-radius: 6px;
  color: #304156;
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  text-align: center;
}

.agenda-slot-facts {
  display: grid;
  gap: 5px;
  margin: 0;
  font-size: 12px;
}

.agenda-slot-facts div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px;
}

.agenda-slot-facts dt {
  color: var(--muted);
}

.agenda-slot-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.agenda-detail-btn {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.agenda-detail-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.agenda-detail-panel[hidden] {
  display: none;
}

.agenda-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.agenda-detail-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.agenda-detail-header span {
  color: var(--muted);
  font-size: 13px;
}

.agenda-detail-grid {
  grid-template-columns: minmax(0, 1fr);
}

.admin-slots-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.admin-slots-day h3 {
  margin: 0;
  padding: 10px 12px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}

.admin-slot-card {
  cursor: default;
}

.admin-slot-card .actions-cell {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 6px;
}

.slot-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.slot-edit-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.slot-edit-grid input,
.slot-edit-grid select {
  width: 100%;
  min-width: 0;
}

.statistics-summary .summary-item {
  min-height: 82px;
}

.statistics-tables {
  display: grid;
  gap: 20px;
  margin-top: 18px;
}

.statistics-tables section {
  min-width: 0;
}

.statistics-tables h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.admin-table th:first-child,
.admin-table td:first-child {
  width: 64px;
}

.admin-table input:not([type="checkbox"]),
.admin-table select {
  width: 100%;
}

.boats-table input[type="number"] {
  min-width: 76px;
}

.users-table .col-id {
  width: 56px;
}

.users-table .col-user {
  width: 170px;
}

.users-table .col-role {
  width: 140px;
}

.users-table .col-active {
  width: 76px;
}

.users-table .col-created {
  width: 160px;
}

.users-table .col-password {
  width: 210px;
}

.users-table .col-actions {
  width: 210px;
}

.users-table select,
.users-table input[type="password"] {
  width: 100%;
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.actions-cell button {
  flex: 1 1 92px;
  padding-inline: 10px;
}

.reservation-actions {
  min-width: 240px;
}

.reservation-actions select {
  flex: 1 1 118px;
}

.admin-table.reservations-table th:first-child,
.admin-table.reservations-table td:first-child {
  width: 90px;
}

.reservations-table .reservation-actions {
  min-width: 330px;
  flex-wrap: wrap;
}

.reservations-table .reservation-actions select {
  flex: 0 0 96px;
  width: 96px;
}

.inline-payment-row {
  display: flex;
  flex: 1 1 100%;
  gap: 8px;
}

.inline-payment-row select {
  flex: 1 1 110px;
}

.inline-payment-row input {
  flex: 1 1 90px;
  min-width: 80px;
}

/* Large operational tables: final overrides for readability at 100% zoom. */
.admin-table.reservations-table {
  min-width: 1870px;
  table-layout: fixed;
}

.admin-table.ffck-day-cards-table {
  min-width: 2110px;
  table-layout: fixed;
}

.admin-table.reservations-table th,
.admin-table.reservations-table td,
.admin-table.ffck-day-cards-table th,
.admin-table.ffck-day-cards-table td {
  padding: 6px 8px;
  font-size: 13px;
  line-height: 1.25;
}

.admin-table.reservations-table .actions-cell.table-actions,
.admin-table.ffck-day-cards-table .actions-cell.table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 6px;
  min-width: 260px;
  white-space: normal;
  text-align: left;
  justify-content: stretch;
}

.admin-table.reservations-table .actions-cell.table-actions button,
.admin-table.reservations-table .actions-cell.table-actions select,
.admin-table.reservations-table .actions-cell.table-actions input,
.admin-table.ffck-day-cards-table .actions-cell.table-actions button,
.admin-table.ffck-day-cards-table .actions-cell.table-actions select,
.admin-table.ffck-day-cards-table .actions-cell.table-actions input {
  flex: initial;
  min-width: 90px;
  width: 100%;
}

.admin-table.reservations-table .actions-cell.table-actions .badge,
.admin-table.reservations-table .actions-cell.table-actions .inline-payment-row,
.admin-table.ffck-day-cards-table .actions-cell.table-actions .ffck-verification-checks {
  grid-column: 1 / -1;
}

.admin-table.reservations-table .actions-cell.table-actions .inline-payment-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(90px, 1fr);
  gap: 6px;
}

.admin-table.ffck-day-cards-table .actions-cell.table-actions .ffck-verification-checks {
  display: grid;
  gap: 4px;
}

.admin-table.ffck-day-cards-table .history-cell,
.admin-table.ffck-day-cards-table .history-cell div {
  white-space: normal;
}

.slot-opening-col-slot {
  width: 130px;
}

.slot-cell {
  width: 130px;
  min-width: 130px;
  white-space: nowrap;
}

.slot-date-line,
.slot-time-line {
  display: block;
  white-space: nowrap;
}

.slot-time-line {
  color: var(--muted);
  font-size: 12px;
}

.volunteer-presence-table {
  min-width: 620px;
}

.volunteer-presence-col-name {
  width: 220px;
}

.volunteer-presence-col-small {
  width: 120px;
  max-width: 120px;
}

.volunteer-name-cell {
  min-width: 220px;
  white-space: nowrap;
}

.numeric-small-cell {
  max-width: 120px;
  text-align: center;
  white-space: nowrap;
}

.admin-table.reservations-table .payment-status-cell,
.admin-table.reservations-table .ffck-status-cell {
  width: 120px;
  min-width: 110px;
  max-width: 130px;
  text-align: center;
}

.admin-table.reservations-table th:nth-child(11),
.admin-table.reservations-table th:nth-child(12),
.admin-table.reservations-table td:nth-child(11),
.admin-table.reservations-table td:nth-child(12) {
  width: 120px;
  min-width: 110px;
  max-width: 130px;
  text-align: center;
}

.admin-table.reservations-table th:nth-child(13),
.admin-table.reservations-table td:nth-child(13) {
  width: 300px;
  min-width: 260px;
}

.admin-table.reservations-table .payment-status-cell .badge,
.admin-table.reservations-table .ffck-status-cell .badge {
  min-width: 90px;
  width: auto;
}

.animator-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.animator-group-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.group-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f6;
}

.group-card-header strong,
.group-card-header span {
  display: block;
}

.group-card-header span:not(.badge) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.badge-stack {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.animator-list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.animator-list li {
  margin: 6px 0;
}

.animator-list li span {
  color: var(--muted);
  font-size: 12px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  color: var(--ink);
}

.inline-fieldset {
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  padding: 10px 12px;
}

.inline-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 700;
}

.nested-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe5ec;
  border-radius: 8px;
  background: #f8fbfc;
}

.slot-template-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 180px)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.slot-template-row button {
  min-height: 38px;
}

@media (max-width: 720px) {
  .slot-template-row {
    grid-template-columns: 1fr;
  }
}

.badge {
  display: inline-block;
  min-width: 78px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.status-booking-brouillon {
  background: #6b7280;
}

.status-booking-en_attente_acompte {
  background: #d77806;
}

.status-booking-confirmee {
  background: #16835f;
}

.status-booking-terminee {
  background: #2563a8;
}

.status-booking-annulee {
  background: #bf2b2b;
}

.badge-ok {
  background: #16835f;
}

.badge-attention {
  background: #d77806;
}

.badge-missing {
  background: #bf2b2b;
}

.badge-info {
  background: #2563a8;
}

.badge-neutral {
  background: #6b7280;
}

.badge-muted {
  background: #6b7280;
}

.opening-badge {
  display: inline-block;
  min-width: 86px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.opening-open {
  background: #16835f;
}

.opening-missing-volunteer {
  background: #bf2b2b;
}

.opening-missing-autonomous {
  background: #d77806;
}

.opening-missing-transport {
  background: #7f1d1d;
}

.opening-missing-equipment {
  background: #7c3aed;
}

.opening-closed-admin {
  background: #6b7280;
}

.blocking-list {
  margin: 12px 0;
  padding-left: 22px;
  color: #7a271a;
}

.muted-line {
  margin: 12px 0;
}

.volunteer-page {
  background: #f4f7fa;
}

.volunteer-main {
  display: block;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

.volunteer-panel h1 {
  margin-bottom: 8px;
  font-size: 24px;
}

.volunteer-slot-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.volunteer-slot-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.volunteer-slot-card.is-locked {
  border-color: #e2a33a;
  background: #fff8ec;
}

.volunteer-slot-card strong,
.volunteer-slot-card span:not(.badge) {
  display: block;
}

.volunteer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.volunteer-actions button {
  min-height: 52px;
  font-size: 16px;
  font-weight: 700;
}

.volunteer-withdrawal-btn {
  grid-column: 1 / -1;
  background: #d77806;
}

@media (max-width: 560px) {
  header {
    padding: 16px;
  }

  main {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .volunteer-actions {
    grid-template-columns: 1fr;
  }
}

.status-badge {
  display: inline-block;
  min-width: 110px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.status-green {
  background: #16835f;
}

.status-orange {
  background: #d77806;
}

.status-red {
  background: #bf2b2b;
}

@media (max-width: 720px) {
  header {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  main {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .agenda-week {
    grid-template-columns: 1fr;
  }

  .agenda-slot-counts {
    grid-template-columns: 1fr;
  }

  .agenda-detail-header {
    flex-direction: column;
  }

  .agenda-detail-header button {
    width: 100%;
  }
}
