.ccch-brevets-admin {
  --ccch-border: #d9d9d9;
  --ccch-bg: #ffffff;
  --ccch-muted: #666;
  --ccch-soft: #f6f6f6;
  --ccch-success-bg: #edf7ed;
  --ccch-success-border: #b7dfb9;
  --ccch-danger-bg: #fdeeee;
  --ccch-danger-border: #efb5b5;

  margin: 0 auto;
  max-width: 980px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.35;
}

.ccch-brevets-admin * {
  box-sizing: border-box;
  min-width: 0;
}

.ccch-brevets-admin__topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ccch-brevets-admin__title {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.1;
}

.ccch-brevets-admin__filter {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
}

.ccch-brevets-admin__filter label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.ccch-brevets-admin__filter input[type="number"] {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--ccch-border);
  background: #fff;
  border-radius: 0;
  font-size: 14px;
}

.ccch-brevets-admin__notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--ccch-success-border);
  background: var(--ccch-success-bg);
}

.ccch-brevets-admin__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--ccch-danger-border);
  background: var(--ccch-danger-bg);
}

.ccch-brevet-card {
  border: 1px solid var(--ccch-border);
  background: var(--ccch-bg);
  margin-bottom: 12px;
  overflow: hidden;
}

.ccch-brevet-card__head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ccch-border);
  background: var(--ccch-soft);
}

.ccch-brevet-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.ccch-brevet-card__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ccch-muted);
}

.ccch-brevet-form {
  padding: 10px 12px 12px;
}

.ccch-brevet-form__section-title {
  margin: 16px 0 8px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}

.ccch-brevet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: start;
  width: 100%;
}

.ccch-brevet-grid--inscripcion {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
}

.ccch-brevet-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.ccch-brevet-field--span-2 {
  grid-column: span 2;
}

.ccch-brevet-field--span-4 {
  grid-column: 1 / -1;
}

.ccch-brevet-field label,
.ccch-brevet-checks__title {
  display: block;
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  color: #333;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.ccch-brevet-field input[type="text"],
.ccch-brevet-field input[type="number"],
.ccch-brevet-field input[type="url"],
.ccch-brevet-field input[type="email"],
.ccch-brevet-field input[type="datetime-local"],
.ccch-brevet-field select,
.ccch-brevet-field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--ccch-border);
  background: #fff;
  border-radius: 0;
  font-size: 14px;
  line-height: 1.2;
  padding: 8px 10px;
}

.ccch-brevet-field input[type="text"],
.ccch-brevet-field input[type="number"],
.ccch-brevet-field input[type="url"],
.ccch-brevet-field input[type="email"],
.ccch-brevet-field input[type="datetime-local"],
.ccch-brevet-field select {
  height: 38px;
}

.ccch-brevet-field select {
  appearance: auto;
}

.ccch-brevet-field input[type="datetime-local"] {
  min-width: 0;
}

.ccch-brevet-field textarea {
  min-height: 90px;
  resize: vertical;
}

.ccch-brevet-checks {
  grid-column: 1 / -1;
  border-top: 1px solid var(--ccch-border);
  padding-top: 10px;
  margin-top: 4px;
}

.ccch-brevet-checks__items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 6px;
}

.ccch-brevet-checks__items label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.ccch-brevet-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.ccch-brevet-actions .button,
.ccch-brevets-admin__filter .button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #222;
  background: #222;
  color: #fff;
  cursor: pointer;
}

.ccch-brevet-actions .button:hover,
.ccch-brevets-admin__filter .button:hover {
  background: #000;
  border-color: #000;
}

@media (max-width: 980px) {
  .ccch-brevet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ccch-brevet-grid--inscripcion {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ccch-brevet-field--span-4 {
    grid-column: 1 / -1;
  }

  .ccch-brevet-checks {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .ccch-brevets-admin {
    padding: 8px;
    font-size: 13px;
  }

  .ccch-brevet-grid,
  .ccch-brevet-grid--inscripcion {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ccch-brevet-field--span-2,
  .ccch-brevet-field--span-4,
  .ccch-brevet-checks {
    grid-column: auto;
  }

  .ccch-brevet-card__head,
  .ccch-brevet-form {
    padding: 10px;
  }

  .ccch-brevet-actions {
    justify-content: stretch;
  }

  .ccch-brevet-actions .button {
    width: 100%;
  }
}
/* =========================================================
   Inscripciones admin: tabla compacta y gestión de pagos
   ========================================================= */

.ccch-brevets-admin-list {
  font-size: 13px;
  line-height: 1.25;
}

.ccch-brevets-admin-list .ccch-brevets-admin-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-end;
  margin-bottom: 10px;
}

.ccch-brevets-admin-list .ccch-brevets-admin-filter .ccch-field {
  min-width: 180px;
}

.ccch-brevets-admin-list .ccch-brevets-admin-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ccch-brevets-admin-list .ccch-brevets-admin-filter-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.ccch-brevets-table-wrap {
  overflow-x: auto;
}

.ccch-brevets-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.2;
  table-layout: auto;
}

.ccch-brevets-admin-table th,
.ccch-brevets-admin-table td {
  border: 1px solid var(--ccch-border);
  padding: 4px 6px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ccch-brevets-admin-table th {
  background: var(--ccch-soft);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ccch-brevets-admin-table td {
  background: #fff;
}

.ccch-brevets-admin-table td:nth-child(7),
.ccch-brevets-admin-table td:nth-child(8),
.ccch-brevets-admin-table td:nth-child(9),
.ccch-brevets-admin-table td:nth-child(10),
.ccch-brevets-admin-table td:nth-child(11) {
  white-space: nowrap;
}

.ccch-brevets-admin-table td:nth-child(12),
.ccch-brevets-admin-table td:nth-child(13) {
  white-space: nowrap;
}

.ccch-brevet-pago-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.ccch-brevet-pago-form select,
.ccch-brevet-pago-form input[type="text"] {
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 3px 6px;
  border: 1px solid var(--ccch-border);
  background: #fff;
  font-size: 12px;
  line-height: 1.2;
  box-sizing: border-box;
}

.ccch-brevet-pago-form button {
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid #222;
  background: #222;
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.ccch-brevet-pago-form button:hover {
  background: #000;
  border-color: #000;
}

@media (max-width: 900px) {
  .ccch-brevets-admin-table {
    font-size: 11px;
  }

  .ccch-brevets-admin-table th,
  .ccch-brevets-admin-table td {
    padding: 4px 5px;
  }

  .ccch-brevet-pago-form {
    min-width: 130px;
  }
}