@font-face {
  font-family: "Yellowtail";
  src: url("fonts/yellowtail.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("fonts/oswald-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --red: #c8102e;
  --red-dark: #9c0c24;
  --gold: #d4a017;
  --ink: #1d1d1f;
  --muted: #6b6b73;
  --bg: #f5f3ef;
  --surface: #ffffff;
  --line: #e4e0d8;
  --open: #1f8f4e;
  --few: #d98a00;
  --full: #c8102e;
  --past: #b8b5ae;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.05);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--ink);
  line-height: 1.4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

h1 {
  font-size: 1.35rem;
}
h2 {
  font-size: 1.2rem;
}
h3 {
  font-size: 1.05rem;
}
h4 {
  font-size: 0.95rem;
}

.muted {
  color: var(--muted);
}
.small {
  font-size: 0.85rem;
}
.error {
  color: var(--red);
  font-size: 0.9rem;
  min-height: 1.2em;
  margin: 0.25rem 0;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

input,
select {
  font: inherit;
  font-weight: 400;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  width: 100%;
}

input:focus,
select:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  background: transparent;
  color: inherit;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--red-dark);
}
.btn-ghost {
  border-color: var(--line);
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--muted);
}
.btn-danger {
  color: var(--red);
  border-color: #f0c2ca;
  background: #fff;
}
.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.82rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
}

.row-end {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

/* Marca */
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.brand > div {
  display: flex;
  flex-direction: column;
}
.brand-mark {
  width: 34px;
  height: 44px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.brand-lg .brand-mark {
  width: 46px;
  height: 60px;
}

/* Login */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: linear-gradient(
    160deg,
    var(--red) 0%,
    var(--red-dark) 55%,
    #3a0610 100%
  );
}
.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
}
.login-card .brand {
  margin-bottom: 0.8rem;
}
.login-card p {
  margin: 0 0 0.9rem;
}

/* Barra superior */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.7rem 16px;
  background: linear-gradient(
    100deg,
    #0b0b0d 0%,
    #1f0a10 38%,
    #6e0a1d 72%,
    #b30f2a 100%
  );
  color: #fff;
  border-bottom: 2px solid var(--gold);
}
.topbar strong {
  font-family: "Oswald", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.topbar .muted {
  color: #d9c9a0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.topbar .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.topbar .btn-ghost:hover {
  border-color: #fff;
}
.topbar-brand {
  gap: 0.6rem;
  min-width: 0;
}
/* Logotipo del patrocinante en blanco, directamente sobre el fondo de la barra */
.sponsor-logo {
  height: 30px;
  width: auto;
  flex: none;
  filter: brightness(0) invert(1);
}
.topbar-brand .brand-mark {
  width: 26px;
  height: 34px;
}
.brand-sep {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 1.6rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1;
}
.topbar-brand strong {
  font-size: 1.05rem;
  white-space: nowrap;
}

/* Menú desplegable del administrador */
.admin-menu {
  position: relative;
}
.menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.menu-toggle .caret {
  font-size: 0.75rem;
  transition: transform 150ms ease;
}
.menu-toggle[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}
.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  z-index: 20;
  animation: menu-in 140ms ease both;
}
.menu-list button {
  font: inherit;
  font-weight: 600;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.menu-list button:hover,
.menu-list button:focus-visible {
  background: #f4efe4;
  outline: none;
}
.menu-list .menu-danger {
  color: var(--red);
  border-top: 1px solid var(--line);
  border-radius: 0 0 7px 7px;
  margin-top: 0.2rem;
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.menu-icon {
  display: none;
  font-size: 1.1rem;
  line-height: 1;
}
@media (max-width: 560px) {
  .topbar {
    flex-wrap: nowrap;
    padding: 0.6rem 12px;
    gap: 0.5rem;
  }
  .sponsor-logo {
    height: 20px;
  }
  /* En el teléfono el menú del admin se reduce a un ícono */
  #user-label {
    display: none;
  }
  .menu-icon {
    display: inline;
  }
  .menu-toggle,
  .btn-logout {
    padding: 0.4rem 0.6rem;
  }
  .topbar-brand {
    gap: 0.4rem;
  }
  .topbar-brand .brand-mark {
    width: 20px;
    height: 26px;
  }
  .topbar-brand strong {
    font-size: 0.85rem;
  }
  .brand-sep {
    font-size: 1.2rem;
  }
}

/* Diseño principal */
/* Calendario a la izquierda y resumen a la derecha */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 1.2rem;
  padding: 1.2rem 16px 2rem;
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
@media (max-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.section-head {
  margin-bottom: 1rem;
}
.section-head p {
  margin: 0 0 0.6rem;
}

.legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.legend li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-open {
  background: var(--open);
}
.dot-few {
  background: var(--few);
}
.dot-full {
  background: var(--full);
}
/* Calendario (un mes a la vez) */
.month.big {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 1.2rem;
  overflow: hidden;
}
.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.month-head h3 {
  margin: 0;
  font-family: "Oswald", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}
.month-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--red);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-bottom: 4px;
}
.month-arrow:hover:not(:disabled) {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.month-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}
.month-tabs {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.7rem 0 1rem;
}
.month-tabs button {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.month-tabs button.active {
  background: linear-gradient(100deg, #1f0a10, var(--red));
  color: #fff;
  border-color: transparent;
}
.tab-count {
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 0 0.4rem;
}
.month-tabs button.active .tab-count {
  background: var(--gold);
  color: var(--ink);
}
.weekdays,
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.weekdays span {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 0.3rem;
}
.day {
  min-height: 104px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  padding: 1.4rem 0.3rem 0.5rem;
  border: 1px solid #efebe3;
  background: #faf8f4;
  font-family: inherit;
  color: var(--muted);
}
.day.empty {
  background: none;
  border-color: transparent;
}
.day .num {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.day.today {
  border-color: var(--ink);
}
.day.today .num::after {
  content: " · hoy";
  font-size: 0.65rem;
  color: var(--red);
}
.day.game {
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 5px solid var(--open);
  color: var(--ink);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease;
}
.day.game .num {
  color: var(--ink);
  font-weight: 800;
}
.day.game.few {
  border-bottom-color: var(--few);
}
.day.game.full {
  border-bottom-color: var(--full);
}
.day.game.past {
  border-bottom-color: var(--past);
  background: #f7f5f1;
}
/* Juegos que ya pasaron: el escudo del rival en gris */
.day.game.past .logo-cell,
.seat-row.past .logo-sm {
  filter: grayscale(1);
  opacity: 0.45;
}
/* Si hoy hay juego, el escudo late suavemente */
.day.game.today:not(.past) .logo-cell {
  animation: logo-beat 2.4s ease-in-out infinite;
}
@keyframes logo-beat {
  0%,
  40%,
  100% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.12);
  }
}
.day.game:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.day.game.selected {
  outline: 3px solid var(--red);
  outline-offset: 1px;
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.25);
}
.day .star {
  position: absolute;
  top: 4px;
  right: 7px;
  color: var(--gold);
  font-size: 1rem;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}
.day .avail {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--open);
  white-space: nowrap;
}
.day.few .avail {
  color: var(--few);
}
.day.full .avail {
  color: var(--full);
}
.day.past .avail {
  color: var(--muted);
}
.logo-cell {
  width: 46px;
  height: 46px;
}
.logo-cell.logo-empty {
  background: #f2efe8;
  color: var(--muted);
  border-color: var(--past);
  font-size: 1.1rem;
}
.days.slide-next {
  animation: month-next 320ms ease both;
}
.days.slide-prev {
  animation: month-prev 320ms ease both;
}
@keyframes month-next {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
}
@keyframes month-prev {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
}
.legend-star {
  color: var(--gold);
  font-size: 0.9rem;
}
@media (max-width: 700px) {
  .month.big {
    padding: 0.8rem 0.6rem 1rem;
  }
  .month-head h3 {
    font-size: 1.25rem;
  }
  .weekdays,
  .days {
    gap: 3px;
  }
  .weekdays span {
    font-size: 0.62rem;
    letter-spacing: 0;
  }
  .day {
    min-height: 64px;
    padding: 1rem 0.1rem 0.3rem;
    border-radius: 7px;
  }
  .day .num {
    top: 3px;
    left: 5px;
    font-size: 0.72rem;
  }
  .day.today .num::after {
    content: "";
  }
  .day .star {
    top: 1px;
    right: 3px;
    font-size: 0.75rem;
  }
  .logo-cell {
    width: 28px;
    height: 28px;
  }
  .day .avail {
    font-size: 0.58rem;
  }
  .day.game {
    border-bottom-width: 4px;
  }
  .avail-word {
    display: none;
  }
  .day .avail b {
    font-size: 0.72rem;
  }
  .month-tabs {
    gap: 0.25rem;
  }
  .month-tabs button {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
  .tab-count {
    display: none;
  }
}

/* Detalle del juego */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--gold);
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.capacity {
  margin: 0.6rem 0 1rem;
}
.bar {
  height: 10px;
  background: #eee9df;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.bar > span {
  display: block;
  height: 100%;
  background: var(--red);
}
.notice {
  background: #f7f4ee;
  border-left: 4px solid var(--past);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.notice.full {
  border-left-color: var(--red);
}

.res-list,
.my-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.res-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
}
.res-item .row-between {
  align-items: flex-start;
}
.res-item .count {
  font-weight: 800;
  color: var(--red);
  white-space: nowrap;
}
.res-item ol {
  margin: 0.4rem 0 0.5rem;
  padding-left: 1.3rem;
  font-size: 0.88rem;
}
.res-item .blank {
  color: var(--past);
  font-style: italic;
}
.res-actions {
  display: flex;
  gap: 0.4rem;
}

.reserve-form h4 {
  margin-bottom: 0.7rem;
}
/* Asistentes: recuadro de altura fija con desplazamiento propio */
.guests-field {
  margin-bottom: 0.6rem;
}
.guests-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.guests-title {
  font-size: 0.88rem;
  font-weight: 600;
}
.guests-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: #f2efe8;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
}
.guests {
  height: 214px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #faf8f4;
  scrollbar-width: thin;
  scrollbar-color: #cfc8ba transparent;
}
.guests::-webkit-scrollbar {
  width: 6px;
}
.guests::-webkit-scrollbar-thumb {
  background: #cfc8ba;
  border-radius: 999px;
}
.guests .guest-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
}
.guests .guest-num {
  width: 24px;
  height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}
.guests input {
  font-size: 0.88rem;
  padding: 0.42rem 0.6rem;
  background: #fff;
}
.guests .guest-row.is-new {
  animation: guest-in 260ms ease both;
}
@keyframes guest-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.guests-hint {
  margin: 0.3rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
@media (max-width: 700px) {
  .guests {
    height: 178px;
  }
}

.my-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.45rem;
}
.my-list li button {
  background: none;
  border: none;
  color: var(--red);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-transform: capitalize;
}

/* Diálogos */
dialog {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
dialog.wide {
  width: min(760px, calc(100vw - 32px));
}
dialog::backdrop {
  background: rgba(20, 10, 12, 0.5);
}
.dialog-body {
  padding: 1.2rem;
}
.table-wrap {
  overflow-x: auto;
  margin: 0.6rem 0 1rem;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.users-table th,
.users-table td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.users-table td .res-actions {
  justify-content: flex-end;
}
.inactive {
  color: var(--past);
}
.user-form {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.8rem;
}
@media (max-width: 560px) {
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Avisos: verde (éxito), rojo (error), oscuro (información) */
.toast {
  position: fixed;
  inset: auto auto 20px 50%;
  margin: 0;
  border: 0;
  overflow: visible;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border-left: 5px solid var(--muted);
  background: #fff;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  z-index: 1000;
  animation: toast-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.toast-icon {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background: var(--muted);
}
.toast-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.toast-text strong {
  font-size: 0.92rem;
}
.toast-success {
  border-left-color: var(--open);
}
.toast-success .toast-icon {
  background: var(--open);
}
.toast-error {
  border-left-color: var(--red);
}
.toast-error .toast-icon {
  background: var(--red);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

/* Ventana de confirmación (cancelar / rechazar) */
dialog.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  animation: dialog-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.confirm-body {
  padding: 1.4rem 1.4rem 1.2rem;
  text-align: center;
}
.confirm-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fbe5e8;
  color: var(--red);
  font-size: 1.5rem;
  font-weight: 800;
}
.confirm-body h3 {
  margin-bottom: 0.4rem;
  font-size: 1.15rem;
}
.confirm-message {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.confirm-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.3rem 0.8rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: #f7f4ee;
  text-align: left;
  font-size: 0.86rem;
}
.confirm-details dt {
  color: var(--muted);
  font-weight: 600;
}
.confirm-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.confirm-reason {
  text-align: left;
  margin-bottom: 1rem;
}
.confirm-reason textarea {
  font: inherit;
  font-weight: 400;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  width: 100%;
}
.confirm-reason textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.confirm-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.confirm-actions .btn {
  min-width: 140px;
}
.btn-danger-solid {
  background: var(--red);
  color: #fff;
}
.btn-danger-solid:hover {
  background: var(--red-dark);
}
@media (max-width: 480px) {
  .confirm-actions {
    flex-direction: column-reverse;
  }
  .confirm-actions .btn {
    width: 100%;
  }
}

/* --- Banner de patrocinio ------------------------------------------------ */
:root {
  --night: #0b0b0d;
  --navy: #1b2a6b;
}

/* Logotipo de Alimentos Mary arriba del bloque de patrocinio */
.login-logotipo {
  display: block;
  width: 100%;
  max-width: 252px; /* 5% más grande que el tamaño anterior (240px) */
  height: auto;
  margin: 0.2rem auto 0.8rem;
}
/* "Calendario" junto al logotipo, con la tipografía deportiva de la plataforma */
.login-card .login-title {
  margin: 0 0 0.15rem;
  text-align: center;
  font-family: "Oswald", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c8102e;
  /* compensa el espacio de la última letra para que quede centrado */
  padding-left: 0.22em;
}
/* Temporada debajo de "Calendario", con el estilo y el gris que tenía en el bloque */
.login-card .login-season {
  margin: 0 0 0.9rem;
  text-align: center;
  font-family: "Oswald", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.login-card label.remember {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  margin: -0.2rem 0 0.2rem;
}
.remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red);
  cursor: pointer;
}
/* Bloque de patrocinio: el mismo diseño de la cabecera de la app (escudo a la
   izquierda y texto al lado), a escala de la tarjeta y sobre fondo blanco. */
.login-banner {
  margin: 0 0 1rem;
  padding: 0.8rem 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* En blanco, "Leones del Caracas" pasa de blanco a rojo y el subtítulo a gris
   para que se lean; el resto conserva los colores de la cabecera. */
.login-banner .hero-script {
  color: var(--red);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12);
}
.login-banner .hero-escudo {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}
.login-banner .hero-row {
  flex-direction: row;
  gap: 0.9rem;
}
.login-banner .hero-escudo {
  height: 59px; /* 5% más pequeño que antes (62px) */
}
.login-banner .hero-text {
  align-items: flex-start;
  text-align: left;
}
.login-banner .hero-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.26em;
}
.login-banner .hero-script {
  font-size: 1.25rem;
  margin: 0.1rem 0.8rem 0.35rem;
}

.hero {
  background: radial-gradient(ellipse at 50% 40%, #1d1d24 0%, var(--night) 70%);
  border-bottom: 3px solid var(--gold);
  color: #fff;
  overflow: hidden;
}
/* Logotipo arriba al centro; debajo, el banner y el texto en una fila */
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 16px 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
}
/* Escudo de los Leones junto al texto de patrocinio */
.hero-escudo {
  width: auto;
  height: 88px;
  flex: none;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.55));
  animation: hero-in 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: hero-in 900ms 200ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
/* Logotipo de Alimentos Mary en blanco sobre el fondo oscuro */
.hero-logotipo {
  width: 340px;
  max-width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
  animation: hero-in 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hero-kicker,
.hero-sub {
  font-family: "Oswald", system-ui, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
}
.hero-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.15rem;
}
.hero-script {
  font-family: "Yellowtail", "Brush Script MT", cursive;
  font-size: 2.5rem;
  line-height: 1.1;
  color: #fff;
  transform: rotate(-4deg);
  margin: 0.3rem 0 0.35rem;
  text-shadow:
    2px 2px 0 var(--red),
    3px 3px 0 rgba(0, 0, 0, 0.6);
}
.hero-sub {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: #cfc6b0;
}
@media (max-width: 760px) {
  .hero-row {
    flex-direction: column;
    gap: 0.4rem;
  }
  .hero-escudo {
    height: 66px;
  }
  .hero-text {
    align-items: center;
    text-align: center;
  }
  .hero-logotipo {
    width: 250px;
  }
  .hero-kicker {
    font-size: 0.72rem;
  }
  .hero-script {
    font-size: 2rem;
  }
  .hero-sub {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }
}

/* --- Escudos y enfrentamiento -------------------------------------------- */
.logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex: none;
}
.logo-fallback,
.logo-empty {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #2b2b33;
  color: var(--gold);
  font-weight: 800;
  font-size: 0.85rem;
  border: 2px solid var(--gold);
}
.logo-empty {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-style: dashed;
}
.logo-lg {
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}
.logo-lg.logo-fallback,
.logo-lg.logo-empty {
  font-size: 1.6rem;
}
@media (max-width: 560px) {
  .logo-lg {
    width: 72px;
    height: 72px;
  }
}

.matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}
.team-name {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.15;
}
.vs {
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: vs-pop 700ms 350ms cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.team-home .logo-lg {
  animation:
    slide-left 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both,
    float 4s 700ms ease-in-out infinite;
}
.team-away .logo-lg {
  animation:
    slide-right 650ms 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both,
    float 4s 1.4s ease-in-out infinite;
}
.matchup.compact .logo-lg {
  width: 64px;
  height: 64px;
}
.matchup.compact .team-name {
  font-size: 0.78rem;
}

.detail-hero {
  margin: -1.1rem -1.2rem 1rem;
  padding: 0.9rem 1.2rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(150deg, #16161b 0%, #3a0610 55%, var(--red) 100%);
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
.detail-hero .tag {
  margin-bottom: 0.7rem;
}
.detail-hero h3 {
  margin: 0.8rem 0 0;
  text-align: center;
}
@keyframes slide-left {
  from {
    opacity: 0;
    transform: translateX(-40px) scale(0.8);
  }
}
@keyframes slide-right {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.8);
  }
}
@keyframes vs-pop {
  from {
    opacity: 0;
    transform: scale(0.2) rotate(-12deg);
  }
}
@keyframes float {
  50% {
    transform: translateY(-4px);
  }
}
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}

/* --- Panel de resumen ---------------------------------------------------- */
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  width: 100%;
  margin-top: 0.8rem;
}
.btn-gold:hover {
  filter: brightness(1.08);
}
.next-hero .tag {
  display: table;
  margin: 0 auto 0.7rem;
}
.next-when {
  text-align: center;
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: #f1dfe2;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.stats div {
  background: #f7f4ee;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
}
.stats strong {
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--red);
}
.stats span {
  font-size: 0.78rem;
  color: var(--muted);
}
.seat-list {
  list-style: none;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.seat-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--open);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.seat-row:hover {
  background: #fbf8f2;
}
.seat-row.few {
  border-left-color: var(--few);
}
.seat-row.full {
  border-left-color: var(--full);
}
.seat-row.past {
  border-left-color: var(--past);
}
.logo-sm {
  width: 30px;
  height: 30px;
}
.logo-sm.logo-empty {
  background: #f2efe8;
  color: var(--muted);
  border-color: var(--past);
}
.seat-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  line-height: 1.25;
}
.seat-info .muted {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-sm {
  height: 5px;
  margin-top: 0.25rem;
}
.seat-free {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--open);
  white-space: nowrap;
}
.seat-row.few .seat-free {
  color: var(--few);
}
.seat-row.full .seat-free {
  color: var(--full);
}
.seat-row.past .seat-free {
  color: var(--muted);
}
.hint {
  text-align: center;
  margin: 0;
}
.close-detail {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
}
.close-detail:hover {
  background: rgba(255, 255, 255, 0.25);
}
.detail-hero .row-between {
  margin-bottom: 0.6rem;
}
.detail-hero .row-between .tag {
  margin-bottom: 0;
}

/* --- Ventana de reservación ---------------------------------------------- */
dialog.reserve-dialog {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  animation: dialog-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
dialog.reserve-dialog::backdrop {
  background: rgba(10, 4, 6, 0.6);
  backdrop-filter: blur(2px);
}
.reserve-dialog .detail {
  box-shadow: none;
  border-radius: 0;
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
}
@media (max-width: 700px) {
  dialog.reserve-dialog {
    max-height: calc(100vh - 16px);
  }
}
.detail .detail-hero {
  padding-bottom: 0.8rem;
}
.detail .detail-hero h3 {
  margin-top: 0.5rem;
}
.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
  gap: 1.4rem;
  align-items: start;
}
/* Formulario en dos columnas: datos | asistentes. La lista de asistentes
   ocupa el alto de la columna de datos, así la ventana no necesita scroll. */
.form-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.2rem;
}
.form-cols .stepper-field {
  margin-bottom: 0;
}
.form-cols .guests-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.form-cols .guests {
  flex: 1 1 0;
  height: auto;
  min-height: 200px;
}
.form-actions {
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
}
.form-actions .approval-note {
  margin: 0;
  text-align: left;
  flex: 1;
}
@media (max-width: 1000px) {
  .detail-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
  .form-cols {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-cols .guests {
    flex: none;
    height: 214px;
  }
}
.detail-info .capacity {
  margin-top: 0;
}
.detail-form {
  border-left: 1px solid var(--line);
  padding-left: 1.4rem;
}
@media (max-width: 700px) {
  .detail-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.4rem;
  }
  .detail-form {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
  }
}

/* Reservas resumidas: una línea por reserva */
.res-list.compact {
  gap: 0.35rem;
  max-height: 340px;
  overflow-y: auto;
}
.res-list.compact .res-item {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
}
.res-item.mine {
  border-color: var(--gold);
  background: #fdf9ee;
}
.res-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.res-who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.res-line .count {
  font-size: 0.85rem;
}
.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}
.res-guests {
  margin-top: 0.25rem;
  font-size: 0.82rem;
}
.res-guests summary {
  cursor: pointer;
  color: var(--muted);
}
.res-guests ol {
  margin: 0.3rem 0 0.2rem;
}
.res-list.compact .res-actions {
  margin-top: 0.35rem;
}
@media (max-width: 700px) {
  .res-who {
    white-space: normal;
  }
}

/* --- Selector de cantidad de personas ------------------------------------ */
.stepper-field {
  margin-bottom: 0.9rem;
}
.stepper-label {
  display: inline;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.4rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #faf8f4 100%);
}
.stepper:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2);
}
.stepper-btn {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(200, 16, 46, 0.3);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}
.stepper-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(200, 16, 46, 0.35);
}
.stepper-btn:active:not(:disabled) {
  transform: scale(0.92);
}
.stepper-btn:disabled {
  background: #e7e3db;
  color: #a9a59d;
  box-shadow: none;
  cursor: not-allowed;
}
.stepper-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.stepper-center {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
}
.stepper .stepper-value {
  width: 2.6ch;
  padding: 0;
  border: none;
  background: transparent;
  text-align: center;
  font-family: "Oswald", system-ui, sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.stepper .stepper-value:focus {
  outline: none;
  border: none;
}
.stepper .stepper-value::-webkit-outer-spin-button,
.stepper .stepper-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.stepper-unit {
  font-size: 0.85rem;
  color: var(--muted);
}
.seat-dots {
  display: grid;
  grid-template-columns: repeat(var(--seats, 17), minmax(0, 14px));
  justify-content: center;
  gap: 4px;
  margin-top: 0.55rem;
}
.seat-dots button {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 4px 4px 2px 2px;
  border: 1px solid var(--line);
  background: #f2efe8;
  cursor: pointer;
  transition:
    background 150ms ease,
    transform 150ms ease;
}
.seat-dots button:hover {
  transform: translateY(-2px);
}
.seat-dots button.on {
  background: var(--gold);
  border-color: #b98b10;
}

/* --- Solicitudes y aprobación ------------------------------------------- */
.req {
  color: var(--red);
  font-weight: 700;
}
.approval-note {
  margin: 0.7rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}

/* Estado de la solicitud */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pendiente {
  background: #fff3dc;
  color: #9a6200;
}
.status-preaprobada {
  background: #e6eefc;
  color: #2a4f9c;
}
.status-aprobada {
  background: #e3f4ea;
  color: #1a7a43;
}
.status-rechazada {
  background: #fbe5e8;
  color: #a50d26;
}
.res-status {
  margin-top: 0.3rem;
}
.res-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.35rem;
  color: var(--ink);
}
.res-meta b {
  font-weight: 600;
  color: var(--muted);
}
.decision {
  margin-top: 0.3rem;
}

/* Barra de cupo: aprobados (rojo) y en solicitud (dorado) */
.bar-split {
  display: flex;
}
.bar-split > span {
  flex: none;
}
.bar-split > .seg-pending {
  background: repeating-linear-gradient(
    -45deg,
    var(--gold),
    var(--gold) 4px,
    #e6c45e 4px,
    #e6c45e 8px
  );
}
.bar-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.bar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.bar-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--red);
}
.bar-legend i.seg-pending {
  background: var(--gold);
}

/* Mis reservas con estado */
.my-res-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  text-align: right;
}

/* Botón de aprobaciones en la barra */
.btn-approvals {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.approvals-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}

/* Ventana de aprobaciones */
.approvals-dialog .dialog-body {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.approvals-dialog h3 {
  margin-bottom: 0.1rem;
}
.approvals-section {
  margin: 1rem 0 0.6rem;
}
.approval-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.approval-card {
  border: 1px solid var(--line);
  border-left: 5px solid #d98a00;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  background: #fff;
}
.approval-card.status-card-preaprobada {
  border-left-color: #2a4f9c;
}
.approval-card.status-card-aprobada {
  border-left-color: var(--open);
}
.approval-card.status-card-rechazada {
  border-left-color: var(--red);
}
.approval-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.approval-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.approval-data {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.25rem 0.8rem;
  margin: 0.7rem 0 0.4rem;
  font-size: 0.88rem;
}
.approval-data dt {
  font-weight: 600;
  color: var(--muted);
}
.approval-data dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.approval-actions {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
}
.reject-reason {
  margin-bottom: 0.5rem;
}
.approvals-history {
  margin-top: 1.2rem;
}
.approvals-history > summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
@media (max-width: 560px) {
  .approval-head {
    flex-wrap: wrap;
  }
  .approval-data {
    grid-template-columns: minmax(0, 1fr);
  }
  .approval-data dd {
    margin-bottom: 0.3rem;
  }
}
