/*
 * Design tokens — change :root below to retheme the portal.
 * --brand and --radius-button are the main controls for CTAs.
 */
/* Let's Fight — light UI: white + light gray surfaces, black chrome, brand CTAs */
:root {
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --text: #171717;
  --text-muted: #525252;
  --white: #ffffff;
  --gray-page: #f0f0f2;
  --gray-subtle: #e8e8eb;
  --border: #d4d4d8;

  /* Brand (single source of truth for orange) */
  --brand: #ffa018;
  --accent-light: var(--brand);
  --accent-ring: rgba(255, 160, 24, 0.25);

  /* Buttons — shared chrome */
  --radius-button: 5px;
  --button-border-default: 1px solid #000000;
  --button-fg-on-brand: #ffffff;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --ok: #16a34a;
  --ok-bg: #f0fdf4;

  /* Header / nav (lf-scraper–style dark bar) */
  --nav-bg: #1a1a2e;
  --nav-border: #1f2937;
  --nav-link: #d1d5db;
  --nav-link-hover-bg: #1f2937;
  --nav-muted: #9ca3af;
  --nav-muted-hover-fg: #e5e7eb;

  /* Content width — matches lf-scraper Tailwind max-w-7xl */
  --layout-max: 80rem;

  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--gray-page);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

/* Logged-in top bar (layout + colors aligned with lf-scraper nav) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}

.site-header__inner {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .site-header__inner {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .site-header__inner {
    padding: 0 2rem;
  }
}

.site-header__start {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-width: 0;
  flex: 1;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.site-brand:hover .site-brand__name {
  filter: brightness(1.08);
}

.site-brand__logo {
  display: block;
  height: 2rem;
  width: auto;
  object-fit: contain;
}

.site-brand__mark {
  display: none;
  font-size: 1.35rem;
  line-height: 1;
}

.site-brand__mark--visible {
  display: inline;
}

.site-brand__name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 1rem;
  row-gap: 0.25rem;
}

.site-nav__link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nav-link);
  text-decoration: none;
}

.site-nav__link:hover {
  background: var(--nav-link-hover-bg);
  color: var(--nav-link);
}

.site-nav__link--active {
  background: var(--nav-link-hover-bg);
  color: var(--brand);
}

.site-header__end {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.site-header__logout {
  margin: 0;
}

.site-header__logout-btn {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--nav-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.site-header__logout-btn:hover {
  background: var(--nav-link-hover-bg);
  color: var(--nav-muted-hover-fg);
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-wrap: wrap;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .site-header__start {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
}

/* Admin “Zarządzanie” — secondary strip under main header */
.admin-manage-subnav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.admin-manage-subnav__inner {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

@media (min-width: 640px) {
  .admin-manage-subnav__inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .admin-manage-subnav__inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.admin-manage-subnav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
}

.admin-manage-subnav__link {
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-button);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.admin-manage-subnav__link:hover {
  background: var(--gray-subtle);
  color: var(--text);
}

.admin-manage-subnav__link--active {
  background: var(--gray-page);
  color: var(--ink);
  border-color: var(--border);
}

/* Main column: sits on light gray page (same max width + horizontal padding as lf-scraper main) */
.main {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

@media (min-width: 640px) {
  .main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .main {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Cards / forms: white “main parts” */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.panel--narrow {
  max-width: 420px;
  margin: 2rem auto;
}

/* Flush panel: no outer padding (section headers / lists manage their own) */
.panel--flush {
  padding: 0;
}

/* Page layout blocks (lf-scraper cities–style stacking) */
.page-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

h1.page-hero__title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.page-hero__lead {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.page-hero__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.page-hero__title-row .page-hero__title {
  flex: 1 1 auto;
  min-width: 0;
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Club detail — scraper-style: header + address on page bg, main block in card */
.club-page__header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.club-page__heading {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.club-page__back {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  width: fit-content;
}

.club-page__back:hover {
  color: var(--brand);
}

.club-page__title {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.club-page__address {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
  max-width: 48rem;
}

.club-page__wp-panel .club-wp-panel__inner {
  max-width: 40rem;
}

.club-page__wp-panel .club-wp-panel__hint {
  font-size: 0.9rem;
  line-height: 1.45;
}

.club-page__address--empty {
  color: var(--text-muted);
  font-style: italic;
}

/* Club card — scraper-style bar (title + actions) + padded body */
.club-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-subtle);
}

.club-panel__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.club-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.club-panel__body {
  padding: 1.5rem 1.25rem;
}

.club-body__subtitle {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Contact panel body — slight contrast so tiles read clearly */
.club-panel__body--contact {
  background: var(--gray-page);
}

.club-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 720px) {
  .club-contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.25rem;
  }

  .club-contact__item--full {
    grid-column: 1 / -1;
  }
}

.club-contact__item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  min-width: 0;
}

.club-contact__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.club-contact__value {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
  word-break: break-word;
}

.club-contact__value--lead {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.club-contact__value--multiline {
  /* pre-line: real line breaks from data; no huge blank area from template/indent whitespace */
  white-space: pre-line;
}

.club-contact__value a {
  color: var(--brand);
  font-weight: 500;
}

.club-contact__value a:hover {
  text-decoration: underline;
}

.club-contact__empty {
  color: var(--text-muted);
  font-style: italic;
}

.club-contact__hint {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  font-style: normal;
  text-transform: none;
  letter-spacing: normal;
}

/* Inline contact edit: author display (e.g. .stack { display:flex }) can override [hidden] */
.club-page__contact-card:not(.club-page__contact-card--editing) .club-contact-head--edit {
  display: none !important;
}

.club-page__contact-card.club-page__contact-card--editing .club-contact-head--view {
  display: none !important;
}

.club-contact:not(.club-contact--editing) .club-contact__edit-only {
  display: none !important;
}

.club-contact.club-contact--editing .club-contact__view-only {
  display: none !important;
}

.club-contact__control {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.1rem 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
  min-width: 0;
}

/* In edit mode, controls read as real fields (border, hover, cursor) */
.club-contact.club-contact--editing .club-contact__control {
  cursor: text;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.club-contact.club-contact--editing .club-contact__control:hover:not(:focus) {
  border-color: #a3a3a8;
}

.club-contact__control--lead {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.club-contact__control--multiline {
  min-height: 3.5em;
  resize: vertical;
  white-space: pre-line;
  padding: 0.15rem 0;
}

.club-contact.club-contact--editing .club-contact__control--multiline {
  padding: 0.5rem 0.65rem;
  min-height: 4.25em;
}

.club-contact.club-contact--editing .club-contact__control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-ring);
  background: var(--white);
}

.club-contact.club-contact--editing select.club-contact__control {
  cursor: pointer;
}

.club-contact__muted-edit-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.club-contact__list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}

.club-contact__list--tight {
  margin-top: 0.35rem;
}

.club-contact__list--tight li {
  margin-bottom: 0.2rem;
}

.club-contact__value--sub {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.club-contact__pricing-type {
  font-weight: 600;
  color: var(--ink-soft);
}

.club-contact__pricing-line {
  font-weight: 500;
}

.club-contact__pricing-desc {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: pre-line;
}

.club-pricing__radios {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.25rem;
}

.club-pricing__checks {
  margin-top: 0.5rem;
}

/* Show accepted-card checkboxes only when „Przyjmuje karty” (cards_not_supported = false) is selected */
.club-pricing-accepted-cards {
  display: none;
}

.club-pricing-cards-edit:has(input[name="cards_not_supported"][value="false"]:checked) .club-pricing-accepted-cards {
  display: block;
}

.club-pricing-editor {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.club-pricing-editor__add {
  align-self: flex-start;
  margin-top: 0.25rem;
}

.club-pricing-editor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.club-pricing-editor-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  flex: 1 1 12rem;
  min-width: 0;
}

.club-pricing-editor-row__fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  flex: 1 1 100%;
}

.club-pricing-editor-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  min-width: 0;
  flex: 1 1 7rem;
}

.club-pricing-editor-field--price {
  flex: 1 1 9rem;
}

.club-pricing-editor-field__lab {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.club-pricing-editor-price-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.club-pricing-editor-price-wrap .club-contact__control {
  flex: 1 1 4rem;
  min-width: 0;
}

.club-pricing-editor-pln {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.club-pricing-editor-cell {
  font-size: 0.9rem;
  color: var(--text);
}

.club-pricing-editor-cell--name {
  font-weight: 600;
  color: var(--ink);
  flex: 1 1 8rem;
  min-width: 0;
}

.club-pricing-editor-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.club-pricing-editor-row__actions .button {
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
}


/* Cities / users admin — add form row; clubs list — filters panel title */
.cities-add__title,
.users-add__title,
.clubs-filters__title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.cities-add-form,
.users-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.cities-add-form__field,
.users-add-form__field {
  flex: 1 1 14rem;
  min-width: 0;
}

.cities-add-form__field--wp,
.users-add-form__field--role {
  flex: 1 1 10rem;
  max-width: 14rem;
}

.cities-add-form__actions,
.users-add-form__actions {
  flex-shrink: 0;
}

/* Cities / users / clubs list card */
.cities-list__header,
.users-list__header,
.clubs-list__header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--gray-subtle);
}

.cities-list__header h2,
.users-list__header h2,
.clubs-list__header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

.cities-list__body,
.users-list__body,
.clubs-list__body {
  display: flex;
  flex-direction: column;
}

.users-list__body .table-wrap,
.clubs-list__body .table-wrap {
  padding: 0 1.25rem 1.5rem;
}

/* Chats list: full-width table; section title keeps horizontal padding via .clubs-list__header */
.chats-list-panel .clubs-list__body .table-wrap {
  padding-left: 0;
  padding-right: 0;
}

.clubs-list__body .table th.clubs-list__rating-col,
.clubs-list__body .table td.clubs-list__rating-col {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cities-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--gray-subtle);
}

.cities-row:last-child {
  border-bottom: none;
}

.cities-row__primary {
  min-width: 0;
}

.cities-row__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.cities-row__slug {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cities-row__slug code {
  font-size: inherit;
  color: inherit;
}

.cities-row__aside {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.cities-row__wp {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.cities-row__wp--empty {
  color: var(--text-muted);
  opacity: 0.85;
}

.cities-row__delete {
  margin: 0;
  padding: 0.35rem 0.6rem;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #dc2626;
  cursor: pointer;
}

.cities-row__delete:hover {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}

.city-delete-dialog {
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0;
  border: none;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.22);
}

.city-delete-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

/* One of blocked vs confirm is visible; the other uses --hidden (not only [hidden] on <form>). */
.city-delete-dialog__surface--hidden {
  display: none !important;
}

.city-delete-dialog__blocked {
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.city-delete-dialog__form {
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.city-delete-dialog__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.city-delete-dialog__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.45;
}

.city-delete-dialog__expected {
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: var(--gray-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.city-delete-dialog__expected-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.city-delete-dialog__name {
  display: block;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.city-delete-dialog__field {
  margin: 0;
}

.city-delete-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.button.city-delete-dialog__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button.city-delete-dialog__submit:not(:disabled) {
  background-color: #dc2626;
  color: #fff;
  border: 1px solid #0a0a0a;
  font-weight: 700;
}

.button.city-delete-dialog__submit:not(:disabled):hover {
  background-color: #fff;
  border-color: #dc2626;
  color: #dc2626;
}

.cities-empty,
.users-empty,
.clubs-empty {
  padding: 3rem 1.5rem;
  text-align: center;
}

.cities-empty__icon,
.users-empty__icon,
.clubs-empty__icon {
  font-size: 2.5rem;
  line-height: 1;
  margin: 0 0 1rem;
}

.cities-empty__text,
.users-empty__text,
.clubs-empty__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* In-panel section titles — dark bar feel without extra markup */
.panel h1,
.panel h2 {
  color: var(--ink);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.lead {
  font-size: 1.05rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.muted {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stack--tight {
  gap: 0.4rem;
}

.stack--loose {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-subtle);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field__label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

input,
select,
textarea {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
  min-height: 2.75rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-button);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font-weight: 500;
}

.button:hover {
  border-color: var(--text-muted);
  background: var(--gray-page);
}

.button--primary {
  background-color: var(--brand);
  color: var(--button-fg-on-brand);
  border: var(--button-border-default);
  border-radius: var(--radius-button);
  font-weight: 700;
}

.button--primary:hover {
  background-color: var(--white);
  border: 1px solid var(--brand);
  color: var(--brand);
}

.button--secondary {
  background: transparent;
  border-radius: var(--radius-button);
  border: 1px solid var(--brand);
  color: var(--brand);
}

.button--secondary:hover {
  background: rgba(255, 160, 24, 0.08);
  color: var(--brand);
}

.link-button {
  background: none;
  border: none;
  color: #a3a3a3;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: var(--accent-light);
}

.alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin: 0 0 1rem;
}

.alert--error {
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert--ok {
  background: var(--ok-bg);
  border: 1px solid #bbf7d0;
  color: #166534;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--gray-subtle);
}

.table th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--gray-page);
}

.table tbody tr:hover {
  background: rgba(255, 160, 24, 0.06);
}

.store-catalog__check-col {
  width: 2rem;
  vertical-align: middle;
  text-align: center;
}

.store-catalog-bulk__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  padding: 0.75rem 1rem;
  background: var(--gray-page);
  border-bottom: 1px solid var(--gray-subtle);
}

.store-catalog-bulk__hint {
  margin: 0;
  padding: 0.5rem 1rem 0.75rem;
  font-size: 0.85rem;
}

.store-catalog__thumb-col {
  width: 56px;
  vertical-align: middle;
}

img.store-catalog-thumb {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--gray-page);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

/* Club equipment /equipment — filters: row on desktop, collapsible + grid on mobile */
.club-equipment-filters__details {
  border: 0;
  padding: 0;
  margin: 0;
}

.club-equipment-filters__body {
  padding-top: 0.5rem;
}

.club-equipment-filters__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.club-equipment-filters__selects-pair {
  display: contents;
}

.club-equipment-filters__search {
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 22rem;
}

.club-equipment-filters__field-brand,
.club-equipment-filters__field-category {
  flex: 0 1 12rem;
  min-width: 0;
}

.club-equipment-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
}

@media (max-width: 767px) {
  .club-equipment-filters__heading-desktop {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .club-equipment-filters__summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
  }

  .club-equipment-filters__summary::-webkit-details-marker {
    display: none;
  }

  .club-equipment-filters__summary-start {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-width: 0;
  }

  .club-equipment-filters__summary-label {
    line-height: 1.3;
  }

  .club-equipment-filters__summary-chevron {
    flex-shrink: 0;
    width: 0.65rem;
    height: 0.65rem;
    border-right: 2px solid var(--text-muted, #6b7280);
    border-bottom: 2px solid var(--text-muted, #6b7280);
    transform: rotate(45deg);
    margin-bottom: 0.2rem;
    opacity: 0.85;
    transition: transform 0.2s ease;
  }

  .club-equipment-filters__details[open] .club-equipment-filters__summary-chevron {
    transform: rotate(225deg);
    margin-bottom: -0.15rem;
  }

  .club-equipment-filters__body {
    padding-top: 0.75rem;
  }

  .club-equipment-filters__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .club-equipment-filters__selects-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: end;
  }

  .club-equipment-filters__field-brand,
  .club-equipment-filters__field-category {
    flex: none;
    min-width: 0;
  }

  .club-equipment-filters__search {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .club-equipment-filters__search input,
  .club-equipment-filters__field-brand select,
  .club-equipment-filters__field-category select {
    width: 100%;
    box-sizing: border-box;
    max-width: none;
  }

  .club-equipment-filters__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .club-equipment-filters__actions .button {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

@media (min-width: 768px) {
  .club-equipment-filters__summary {
    display: none;
  }

  .club-equipment-filters__body {
    padding-top: 0;
  }
}

.field--inline .field__label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.checkbox-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.check-label {
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.detail-dl {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}

.detail-dl dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.detail-dl dd {
  margin: 0;
}

.json-pre,
.error-pre {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.8rem;
  overflow-x: auto;
  max-height: 20rem;
}

.json-heading {
  font-size: 0.95rem;
  margin: 1rem 0 0.35rem;
}

.json-textarea {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.8rem;
}

.sync-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: var(--gray-subtle);
  color: var(--text-muted);
}

.sync-badge--synced {
  background: var(--ok-bg);
  color: #166534;
}

.sync-badge--sync_failed {
  background: var(--danger-bg);
  color: #991b1b;
}

.sync-badge--not_synced {
  background: #fefce8;
  color: #854d0e;
}

/* Chats list — same palette as sync badges, normal case for Polish phrases */
.chats-status-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: none;
}

.chats-status-badge--attention {
  background: var(--danger-bg);
  color: #991b1b;
}

.chats-status-badge--ok {
  background: var(--ok-bg);
  color: #166534;
}

.chats-list-panel .table tbody tr.chats-table__row,
.cer-requests-list-panel .table tbody tr.chats-table__row {
  cursor: pointer;
}

.chats-list-panel .table td.chats-table__action-cell,
.cer-requests-list-panel .table td.chats-table__action-cell {
  text-align: right;
  vertical-align: middle;
  width: 1%;
  white-space: nowrap;
}

.chats-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--gray-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.chats-open-btn:hover {
  background: var(--gray-subtle);
}

.chats-open-btn:focus-visible {
  outline: 2px solid var(--accent, #f97316);
  outline-offset: 2px;
}

.chats-open-btn__icon {
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .chats-open-btn__text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .chats-open-btn {
    position: relative;
    padding: 0.45rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
  }
}

.small {
  font-size: 0.85rem;
}

.prose {
  white-space: pre-wrap;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.inline-form {
  display: inline;
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.club-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  min-height: 4rem;
}

.club-photo-gallery--readonly {
  margin-top: 0.25rem;
}

.club-photo-thumb {
  position: relative;
  display: block;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface-muted, #f4f4f5);
}

.club-photo-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.club-photo-thumb__badge {
  position: absolute;
  bottom: 0.35rem;
  left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--brand, #2563eb);
  color: #fff;
}

.club-photo-item {
  position: relative;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
  cursor: grab;
}

.club-photo-item:active {
  cursor: grabbing;
}

.club-photo-item__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  vertical-align: middle;
}

.club-photo-item__del {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.75rem;
  height: 1.75rem;
  border: none;
  border-radius: 999px;
  background: rgba(185, 28, 28, 0.92);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.club-photo-item:hover .club-photo-item__del {
  opacity: 1;
}

.club-photo-item__badge {
  position: absolute;
  bottom: 0.35rem;
  left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--brand, #2563eb);
  color: #fff;
}

.club-photos__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.club-photos__hint {
  margin: 0 0 0.75rem;
}

.club-crop-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
}

.club-crop-modal--open {
  display: flex;
}

.club-crop-modal__box {
  width: 100%;
  max-width: 52rem;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface, #fff);
  border-radius: var(--radius, 10px);
  border: 1px solid var(--border, #e5e7eb);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.club-crop-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.club-crop-modal__title {
  margin: 0;
  font-size: 1.1rem;
}

.club-crop-modal__close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted, #71717a);
}

.club-crop-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.75rem 1.25rem;
  background: #111827;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.club-crop-modal__crop-wrap {
  width: 100%;
  max-width: 100%;
  max-height: min(62vh, calc(90dvh - 11rem));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.club-crop-modal__img {
  display: block;
  max-width: 100%;
  max-height: min(62vh, calc(90dvh - 11rem));
  width: auto;
  height: auto;
}

.club-crop-modal__crop-wrap .cropper-container {
  max-width: 100% !important;
  max-height: min(62vh, calc(90dvh - 11rem)) !important;
}

.club-crop-modal__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border, #e5e7eb);
}

.club-crop-modal__foot-end {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Fill viewport so message list can grow (desktop + mobile). */
body:has(.main .chat-page) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.main:has(.chat-page) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
  /* Flex + margin:auto on main shrinks width to min-content; restore full column width. */
  width: min(100%, var(--layout-max));
  max-width: var(--layout-max);
  margin-inline: auto;
  box-sizing: border-box;
}

.chat-page {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.chat-page__header {
  display: grid;
  gap: 0.5rem;
  flex-shrink: 0;
}

.chat-page__subtitle {
  margin: 0;
}

.chat-discipline-pill {
  margin: 0.85rem 0.85rem 0.35rem;
  align-self: stretch;
  text-align: center;
  font-weight: 700;
}

.chat-toolbar {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #f4f4f5;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.chat-toolbar--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-toolbar--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chat-toolbar__btn {
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  border-radius: 10px;
  padding: 0.55rem 0.5rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
  min-height: 48px;
}

.chat-toolbar__btn:hover {
  border-color: #cbd5e1;
}

.chat-toolbar__btn--active {
  border-color: var(--brand, #2563eb);
  color: var(--brand, #2563eb);
  background: #eef6ff;
}

.chat-toolbar__btn--external {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.chat-toolbar__newtab-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.chat-toolbar__btn[hidden] {
  display: none !important;
}

.chat-composer-wrap {
  border-top: 1px solid var(--border, #e5e7eb);
  background: #fff;
  flex-shrink: 0;
}

.chat-equipment-cta {
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: 0.88rem;
}

.chat-messages-stack {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fafafa;
}

.chat-messages__cta {
  flex-shrink: 0;
  padding: 0.75rem;
  border-top: 1px dashed #d1d5db;
  background: #fafafa;
}

.chat-page__title {
  margin: 0;
}

.chat-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-tab-panel--hidden {
  display: none !important;
}

.chat-tab-panel--chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-tab-panel--equipment:not(.chat-tab-panel--hidden) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chat-equipment-body {
  flex: 1;
  min-height: 0;
  padding: 0.75rem;
  overflow: auto;
}

.chat-equipment-section {
  margin-bottom: 1.25rem;
}

.chat-equipment-section__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.chat-equipment-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

.chat-equipment-card {
  padding: 0.65rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: #fff;
}

.chat-equipment-card--linked {
  padding: 0;
}

.chat-equipment-card__hit {
  display: block;
  padding: 0.65rem;
  border-radius: 11px;
  text-decoration: none;
  color: inherit;
  outline-offset: 2px;
}

.chat-equipment-card__hit:hover {
  background: #fafafa;
}

.chat-equipment-card__hit:hover .chat-equipment-card__img {
  opacity: 0.92;
}

.chat-equipment-card__hit:focus-visible {
  outline: 2px solid var(--brand);
}

.chat-equipment-card__top {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.chat-equipment-card__img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f4f4f5;
  display: block;
}

.chat-equipment-card__img--placeholder {
  border: 1px dashed var(--border, #e5e7eb);
}

.chat-equipment-card__text {
  flex: 1;
  min-width: 0;
}

.chat-equipment-card__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  line-height: 1.25;
}

.chat-equipment-card__facets {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.3;
}

.chat-equipment-card__meta {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted, #6b7280);
  white-space: pre-wrap;
}

.chat-equipment-card__shop-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem 0.43rem;
  margin-top: 0.2rem;
}

.chat-equipment-card__price {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--surface-muted, #f4f4f5);
  color: var(--text);
  line-height: 1.2;
}

.chat-equipment-card__shop-cta {
  display: inline-block;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--brand);
}

.chat-equipment-card__hit:hover .chat-equipment-card__shop-cta {
  text-decoration: underline;
}

.chat-equipment-card__no-link {
  display: inline-block;
  font-size: 0.85rem;
}

.chat-equipment-card__footer {
  padding: 0 0.65rem 0.65rem;
}

.chat-equipment-card--linked .chat-equipment-card__footer {
  border-top: 1px solid var(--border, #e5e7eb);
  padding-top: 0.5rem;
  margin-top: 0;
}

.chat-equipment-card__offer-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1.5px solid #e89a28;
  background: #fff0e0;
  color: var(--ink-soft);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-family: inherit;
  cursor: pointer;
  appearance: none;
}

.chat-equipment-card:hover .chat-equipment-card__offer-cta {
  border-color: var(--brand);
  background: #ffedd5;
  box-shadow: 0 2px 8px rgba(255, 160, 24, 0.22);
}

.ce-request-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.ce-request-modal[hidden] {
  display: none !important;
}

.ce-request-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.ce-request-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  max-height: min(90vh, 36rem);
  overflow: auto;
  padding: 1.25rem 1.35rem;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.ce-request-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.ce-request-modal__summary {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.ce-request-modal__error {
  margin: 0.75rem 0 0;
}

.ce-request-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.1rem;
}

.chat-equipment-section__more-wrap {
  margin-top: 0.65rem;
}

.chat-equipment-section__more {
  width: 100%;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.chat-equipment-section__more-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.chat-equipment-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.chat-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.chat-tab {
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #fff);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
}

.chat-tab--active {
  border-color: var(--brand, #2563eb);
  color: var(--brand, #2563eb);
}

.chat-messages {
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
  justify-items: start;
  grid-auto-rows: max-content;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fafafa;
}

.chat-message {
  width: fit-content;
  max-width: min(85%, 40rem);
  padding: 0.45rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
}

.chat-message--me {
  justify-self: end;
  margin-left: 0;
  background: #eef6ff;
  border-color: #cfe5ff;
}

.chat-message__meta {
  display: flex;
  gap: 0.4rem;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 0.15rem;
}

.chat-message__body {
  margin: 0;
  white-space: pre-wrap;
}

.chat-composer {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fff;
}

@media (max-width: 768px) {
  .chat-messages-stack {
    min-height: 0;
  }
  .chat-messages {
    max-height: none;
  }
  .chat-equipment-body {
    max-height: none;
  }
  .chat-composer {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}

@media (min-width: 520px) {
  .chat-equipment-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.clubs-filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface-muted, #f4f4f5);
  font-size: 0.85rem;
}

.store-product-detail__overview-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 640px) {
  .store-product-detail__overview-grid {
    grid-template-columns: auto 1fr;
  }
}

.store-product-detail__image-wrap {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border, #e5e7eb);
  width: fit-content;
}

.store-product-detail__image {
  display: block;
  width: 200px;
  height: 200px;
  object-fit: contain;
  background: #fafafa;
}

.store-product-detail__image-placeholder {
  padding: 2rem;
  border-radius: 12px;
  border: 1px dashed var(--border, #e5e7eb);
  text-align: center;
  max-width: 12rem;
}

.store-product-detail__raw-json {
  margin-top: 0.75rem;
  padding: 0.75rem;
  max-height: 28rem;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.4;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
}

.cer-detail-dl {
  display: grid;
  grid-template-columns: minmax(7rem, 11rem) 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0;
  font-size: 0.92rem;
}

.cer-detail-dl dt {
  margin: 0;
  color: var(--text-muted, #525252);
  font-weight: 500;
}

.cer-detail-dl dd {
  margin: 0;
  min-width: 0;
}

.cer-status {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cer-status--open {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.cer-status--sent {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
}

.cer-status--ordered {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.cer-status--canceled {
  background: rgba(107, 114, 128, 0.18);
  color: #4b5563;
}

.cer-status-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 0.35rem;
}

.cer-status-form__field {
  margin: 0;
  min-width: 12rem;
}

.cer-status-form__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ce-request-modal__success {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  background: var(--ok-bg, #f0fdf4);
  border: 1px solid rgba(22, 163, 74, 0.25);
  color: var(--text);
  font-size: 0.95rem;
}
