:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #172033;
  background: #f6f7f9;
  --ink: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --soft-line: #e7ebf1;
  --surface: #ffffff;
  --header: #102033;
  --accent: #2f6fed;
  --accent-strong: #2456bd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f6f7f9;
}

header {
  background: var(--header);
  color: #fff;
  padding: 22px 28px;
  border-bottom: 4px solid #f3c623;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
}

.brand p {
  margin: 7px 0 0;
  color: #d7deea;
  font-size: 14px;
}

nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #d7deea;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

nav a[aria-current="page"] {
  background: #fff;
  border-color: #fff;
  color: var(--header);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(170px, auto)) auto auto;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(16, 32, 51, 0.05);
}

input,
select,
button {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(47, 111, 237, 0.18);
  border-color: var(--accent);
}

button {
  width: auto;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

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

button.secondary {
  background: #fff;
  border-color: #cfd7e3;
  color: var(--ink);
}

button.secondary:hover {
  background: #f4f7fb;
}

.search {
  min-width: 0;
}

.counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(16, 32, 51, 0.04);
}

.stat b {
  color: var(--ink);
}

.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.08);
}

.album-board {
  display: grid;
  gap: 18px;
}

.team-section {
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.07);
}

.team-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 15px 16px;
  background: #f9fafc;
  border-bottom: 1px solid var(--soft-line);
}

.team-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.team-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.team-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.team-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.collapse-team {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.team-section.is-collapsed .team-heading {
  border-bottom: 0;
}

.team-section.is-collapsed .sticker-grid {
  display: none;
}

.mini-stat {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 14px;
}

.sticker-card {
  position: relative;
  min-height: 226px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(16, 32, 51, 0.08);
  overflow: hidden;
}

.sticker-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(23, 32, 51, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.sticker-card.CONVOCADO {
  border-color: #98dfb1;
  background: #f2fbf5;
}

.sticker-card.PRELISTA {
  border-color: #cab9ff;
  background: #f7f3ff;
}

.sticker-card.NO_CONVOCADO {
  border-color: #ffb5b5;
  background: #fff5f5;
}

.sticker-card.SIN_INFORMACION {
  border-color: #b8d5fa;
  background: #f3f8ff;
}

.sticker-top,
.sticker-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sticker-code,
.sticker-pos {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 32, 51, 0.1);
  font-size: 11px;
  font-weight: 900;
  color: #344054;
}

.sticker-silhouette {
  position: relative;
  width: 78px;
  height: 92px;
  margin: 8px auto 2px;
}

.sticker-silhouette .head {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border-radius: 50%;
  background: #1f2a3d;
}

.sticker-silhouette .body {
  width: 72px;
  height: 52px;
  margin: 6px auto 0;
  border-radius: 34px 34px 12px 12px;
  background: #1f2a3d;
}

.sticker-card.CONVOCADO .head,
.sticker-card.CONVOCADO .body {
  background: #197246;
}

.sticker-card.PRELISTA .head,
.sticker-card.PRELISTA .body {
  background: #6d43be;
}

.sticker-card.NO_CONVOCADO .head,
.sticker-card.NO_CONVOCADO .body {
  background: #ae3131;
}

.sticker-card.SIN_INFORMACION .head,
.sticker-card.SIN_INFORMACION .body {
  background: #316da8;
}

.sticker-player {
  position: relative;
  color: var(--ink);
  font-weight: 900;
  text-align: center;
  line-height: 1.16;
  min-height: 38px;
}

.sticker-meta {
  position: relative;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.sticker-footer {
  margin-top: auto;
  justify-content: center;
  flex-wrap: wrap;
}

.sticker-footer .badge {
  font-size: 10px;
  min-height: 22px;
  padding: 3px 7px;
}

.empty-state {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fafc;
  color: #475467;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
}

tbody tr:hover {
  background: #f8fbff;
}

td:nth-child(3),
td:nth-child(4),
td:nth-child(6) {
  white-space: normal;
  min-width: 170px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.PEGAR,
.CONVOCADO {
  background: #dff7e7;
  color: #14643a;
}

.ESPERAR_LISTA_FINAL,
.PRELISTA {
  background: #eee7ff;
  color: #5d36a6;
}

.NO_PEGAR,
.NO_CONVOCADO {
  background: #ffe3e3;
  color: #a92a2a;
}

.ESPERAR_CONVOCATORIA,
.SIN_INFORMACION {
  background: #e4f0ff;
  color: #275a99;
}

.status-select {
  min-width: 150px;
  font-weight: 700;
}

.error {
  color: #991b1b;
  margin: 12px 0;
  font-weight: 700;
}

.login-panel {
  max-width: 420px;
  margin: 36px auto;
  display: grid;
  gap: 12px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.08);
}

.login-panel h2 {
  margin: 0;
  font-size: 22px;
}

.login-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.login-panel button {
  width: 100%;
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }
}

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

  main {
    padding: 12px;
  }

  .brand h1 {
    font-size: 24px;
  }

  .controls {
    grid-template-columns: 1fr;
  }

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

  .team-summary {
    justify-content: flex-start;
  }

  .team-actions {
    justify-content: flex-start;
  }

  .sticker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .sticker-card {
    min-height: 216px;
  }

  button {
    width: 100%;
  }
}
