:root {
  --ink: #111411;
  --ink-soft: #20251f;
  --cream: #f3efe4;
  --paper: #fffdf7;
  --red: #d33c36;
  --red-dark: #a82424;
  --green: #237657;
  --muted: #6a6c64;
  --line: rgba(17, 20, 17, 0.14);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: white;
  background:
    radial-gradient(circle at 0 0, rgba(211, 60, 54, 0.74), transparent 31%),
    radial-gradient(circle at 100% 24%, rgba(35, 118, 87, 0.76), transparent 31%),
    linear-gradient(145deg, #171b16, #282019 52%, #101410);
  background-attachment: fixed;
  font-family: var(--sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 10px max(16px, calc((100% - 1120px) / 2));
  background: rgba(10, 13, 10, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  line-height: 1;
}

.brand-logo {
  width: 48px;
  height: 48px;
  overflow: hidden;
  background: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(2.2) translateY(4%);
}

.brand > span:last-child {
  display: grid;
}

.brand strong {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 5px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.logout-button {
  padding: 9px 13px;
  color: white;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.login-view {
  display: grid;
  min-height: calc(100vh - 76px);
  padding: 40px 16px;
  place-items: center;
}

.login-card {
  width: min(440px, 100%);
  padding: 38px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.lock-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 24px;
  place-items: center;
  color: white;
  background: var(--red);
  border: 9px solid #f4d6d2;
  border-radius: 50%;
  font-size: 8px;
}

.eyebrow,
.section-title p {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-card h1,
.dashboard-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 8vw, 62px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.login-copy {
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: 14px;
}

.login-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-card input {
  width: 100%;
  padding: 14px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 0.2em;
  outline: 0;
}

.login-card input:focus {
  border-color: var(--red);
}

.primary-button {
  width: 100%;
  min-height: 54px;
  margin-top: 22px;
  color: white;
  background: var(--red);
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-error,
.admin-message {
  padding: 11px 13px;
  color: #7b1718;
  background: #f9dfdc;
  border-left: 3px solid var(--red);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
}

.admin-message[data-type="success"] {
  color: #15573f;
  background: #ddf2e9;
  border-left-color: var(--green);
}

.admin-message[data-type="neutral"] {
  color: #5c4a20;
  background: #f5ecd4;
  border-left-color: #c3922e;
}

.form-error {
  margin: 14px 0 -8px;
}

.public-link {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dashboard {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
  padding: 58px 0 90px;
}

.dashboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}

.dashboard-heading h1 {
  font-size: clamp(46px, 6vw, 72px);
}

.public-link-light {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.72);
}

.dashboard-links {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-links .public-link-light {
  margin: 0;
}

.date-toolbar {
  display: grid;
  grid-template-columns: 52px minmax(180px, 1fr) 52px;
  max-width: 500px;
  min-height: 60px;
  margin-inline: auto;
  color: var(--ink);
  background: white;
  border-radius: 15px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.date-toolbar > button {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.date-toolbar > button:first-child {
  border-right: 1px solid var(--line);
}

.date-toolbar > button:last-child {
  border-left: 1px solid var(--line);
}

.date-toolbar label {
  position: relative;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.date-toolbar label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.date-toolbar input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.date-toolbar strong {
  font-family: var(--serif);
  font-size: 19px;
  pointer-events: none;
}

.today-link {
  display: block;
  margin: 10px auto 30px;
  padding: 4px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: 0;
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 26px;
}

.summary-grid article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  padding: 20px 24px;
  color: var(--ink);
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.15);
}

.summary-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-grid strong {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
}

.admin-message {
  margin-bottom: 20px;
}

.management-section {
  margin-top: 20px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.section-title p,
.section-title h2 {
  margin: 0;
}

.section-title h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
}

.section-title > span {
  display: grid;
  min-width: 32px;
  height: 32px;
  padding-inline: 8px;
  place-items: center;
  color: white;
  background: var(--red);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.admin-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.admin-booking {
  display: grid;
  grid-template-columns: 140px minmax(120px, 1fr) minmax(140px, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 88px;
  padding: 18px 24px;
  background: white;
}

.admin-booking > div {
  min-width: 0;
}

.admin-booking small,
.admin-booking strong {
  display: block;
}

.admin-booking small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-booking strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-time strong {
  font-family: var(--serif);
  font-size: 19px;
}

.delete-button {
  padding: 9px 12px;
  color: var(--red-dark);
  background: #f9e3e0;
  border: 1px solid rgba(211, 60, 54, 0.2);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.delete-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.admin-change-note {
  grid-column: 1 / -1;
  margin: -8px 0 0;
  padding: 9px 11px;
  color: #5c4a20;
  background: #f5ecd4;
  border-radius: 7px;
  font-size: 10px;
}

.history-section .section-title > span {
  background: var(--ink-soft);
}

.history-item {
  grid-template-columns: 140px minmax(130px, 1fr) minmax(170px, 1fr) minmax(170px, 1fr);
  opacity: 0.8;
}

.empty-list {
  padding: 38px 24px;
  color: var(--muted);
  background: white;
  font-size: 13px;
  text-align: center;
}

:focus-visible {
  outline: 3px solid rgba(211, 60, 54, 0.45);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .admin-header {
    min-height: 68px;
  }

  .brand-logo {
    width: 43px;
    height: 43px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand small {
    font-size: 7px;
  }

  .login-card {
    padding: 30px 24px;
  }

  .dashboard {
    padding-top: 42px;
  }

  .dashboard-heading {
    align-items: start;
    flex-direction: column;
  }

  .public-link-light {
    margin-top: 0;
  }

  .dashboard-links {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid {
    gap: 10px;
  }

  .summary-grid article {
    align-items: start;
    flex-direction: column;
    min-height: 105px;
    padding: 16px;
  }

  .admin-booking,
  .history-item {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 17px;
  }

  .delete-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 390px) {
  .logout-button {
    padding-inline: 9px;
    font-size: 9px;
  }

  .dashboard-heading h1 {
    font-size: 44px;
  }

  .section-title {
    padding-inline: 18px;
  }
}

/* v2 · socios y torneos */
:root {
  --green: #a66f20;
}

body {
  background:
    radial-gradient(circle at 0 0, rgba(211, 60, 54, 0.56), transparent 31%),
    radial-gradient(circle at 100% 24%, rgba(193, 139, 55, 0.34), transparent 31%),
    linear-gradient(145deg, #242526, #332821 52%, #18191a);
}

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

.member-form {
  display: grid;
  gap: 8px;
  padding: 22px;
  background: #f3ede3;
  border-bottom: 1px solid var(--line);
}

.member-form label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.member-form > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.member-form input,
.member-item input {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid #c7beb2;
  border-radius: 8px;
  outline: 0;
}

.member-form input:focus,
.member-item input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(211, 60, 54, 0.12);
}

.member-form .primary-button {
  width: auto;
  min-height: 46px;
  margin: 0;
  padding: 0 22px;
}

.member-list {
  display: grid;
}

.member-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  background: white;
  border-bottom: 1px solid var(--line);
}

.member-item:last-child {
  border-bottom: 0;
}

.member-item.inactive {
  background: #f4f1ec;
  opacity: 0.72;
}

.member-status {
  padding: 6px 9px;
  color: #6d4917;
  background: #f2dfbc;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.member-item > div {
  display: flex;
  gap: 7px;
}

.member-item button,
.secondary-admin-button {
  min-height: 38px;
  padding: 8px 11px;
  color: var(--ink);
  background: #f1ece4;
  border: 1px solid #c9c0b4;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
  cursor: pointer;
}

.member-item .member-disable {
  color: var(--red-dark);
  background: #f8e2df;
  border-color: #e7b2ad;
}

.member-item .member-enable {
  color: #6d4917;
  background: #f2dfbc;
  border-color: #d5b579;
}

.section-note {
  margin: 0;
  padding: 13px 20px;
  color: #685a47;
  background: #f5ead6;
  border-bottom: 1px solid #dfceb0;
  font-size: 10px;
}

.tournament-registration {
  grid-template-columns: 150px minmax(180px, 1fr) minmax(130px, 0.6fr) auto;
}

.tournament-registration .secondary-admin-button {
  align-self: center;
}

@media (max-width: 900px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .member-item > div {
    grid-column: 1 / -1;
  }

  .tournament-registration {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .member-form > div,
  .member-item,
  .tournament-registration {
    grid-template-columns: 1fr;
  }

  .member-form .primary-button,
  .member-item button {
    width: 100%;
  }

  .member-item > div {
    grid-column: auto;
    flex-direction: column;
  }
}
