:root {
  --bg-page: #ececf4;
  --bg-card: #ffffff;
  --ink: #171336;
  --ink-soft: #676680;
  --line: #dedff0;
  --line-soft: #eaebf8;
  --brand-navy: #18106b;
  --brand-navy-2: #251080;
  --brand-pink: #f61f79;
  --brand-pink-2: #ff3f92;
  --mint: #2cd6a5;
  --shadow-soft: 0 10px 24px rgba(12, 10, 54, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(860px 380px at 0% -20%, #ffffff 8%, transparent 70%),
    linear-gradient(180deg, #f8f8fd, #ebedf8 45%, #e7e8f4);
  padding: 10px 14px 24px;
}

.app {
  margin: 0 auto;
  max-width: 980px;
  position: relative;
}

.home-logo-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(236, 232, 255, 0.88);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(8, 6, 36, 0.35);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 0;
  color: #fff;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
}

.home-logo-btn:hover {
  border-color: rgba(255, 112, 189, 0.68);
}

.home-logo-img {
  width: 76%;
  height: 76%;
  object-fit: contain;
  display: block;
}

.view {
  display: none;
  animation: reveal 240ms ease;
}

.view.active {
  display: block;
}

.cover-shell {
  position: relative;
  min-height: min(86vh, 920px);
  border-radius: 28px;
  overflow: hidden;
  padding: 18px 20px 28px;
  color: #f6f2ff;
  background:
    radial-gradient(620px 360px at -8% 68%, rgba(255, 47, 149, 0.34), transparent 66%),
    radial-gradient(720px 380px at 112% 74%, rgba(64, 76, 255, 0.34), transparent 64%),
    linear-gradient(165deg, #1a0c6e, #1b0e78 40%, #180b67 68%, #14095d);
  box-shadow: 0 18px 46px rgba(12, 7, 53, 0.34);
}

.cover-shell::before,
.cover-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 56%;
  height: 340px;
  opacity: 0.38;
  pointer-events: none;
  border-radius: 50%;
}

.cover-shell::before {
  left: -120px;
  bottom: 110px;
  background: repeating-radial-gradient(circle at 30% 70%, transparent 0 18px, rgba(255, 61, 169, 0.24) 19px 21px);
}

.cover-shell::after {
  right: -120px;
  bottom: 96px;
  background: repeating-radial-gradient(circle at 76% 74%, transparent 0 18px, rgba(79, 97, 255, 0.24) 19px 21px);
}

.cover-hero {
  text-align: center;
  padding: 54px 8px 30px;
}

.cover-logo {
  width: 296px;
  height: 296px;
  margin: 0 auto 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 3rem;
  background: radial-gradient(circle at 36% 36%, rgba(246, 243, 255, 0.52), rgba(212, 206, 255, 0.3));
  border: 1px solid rgba(246, 243, 255, 0.42);
}

.cover-logo-img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  display: block;
}

.cover-hero h1 {
  margin: 14px 0 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(2rem, 4vw + 1rem, 4.2rem);
  line-height: 0.95;
}

.cover-hero h1 span {
  color: #ff4aa8;
}

.cover-hero p {
  margin: 10px 0 0;
  letter-spacing: 0.22em;
  font-size: 0.94rem;
  color: rgba(240, 234, 255, 0.92);
}

.cover-cards {
  margin: 14px auto 0;
  max-width: 860px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cover-card {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: center;
  gap: 16px;
  text-align: left;
  color: #f4f0ff;
  border-radius: 28px;
  border: 1px solid rgba(191, 171, 255, 0.26);
  background: linear-gradient(160deg, rgba(81, 40, 197, 0.34), rgba(34, 20, 133, 0.4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 28px rgba(8, 3, 47, 0.3);
  padding: 22px;
}

.cover-card:hover {
  border-color: rgba(255, 112, 189, 0.54);
}

.cover-card-icon {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  border: 2px solid rgba(198, 147, 255, 0.66);
  background: radial-gradient(circle at 32% 32%, rgba(255, 89, 174, 0.28), rgba(101, 78, 255, 0.08));
}

.cover-card-copy strong {
  display: block;
  font-size: clamp(1.25rem, 1.4vw + 0.7rem, 2rem);
  margin-bottom: 4px;
  font-family: "Bricolage Grotesque", sans-serif;
}

.cover-card-copy small {
  color: rgba(228, 220, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.3;
}

.cover-card-arrow {
  font-size: 2.1rem;
  line-height: 1;
  color: rgba(255, 116, 194, 0.94);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.masthead {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 10px;
}

.album-top {
  background: linear-gradient(128deg, #190d68, #220f86 58%, #1b0d67);
  border-radius: 0 0 22px 22px;
  margin: -10px -14px 10px;
  padding: 8px 14px 10px;
  box-shadow: 0 12px 28px rgba(18, 12, 66, 0.28);
}

.brand-wordmark {
  text-align: center;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 3.6vw, 3.1rem);
  letter-spacing: 0.04em;
  color: #f4f7ff;
  line-height: 0.95;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.26);
  padding: 10px 16px;
  border-radius: 14px;
  background: transparent;
  position: relative;
}

.brand-wordmark span {
  color: var(--brand-pink-2);
}

.brand-wordmark small {
  display: block;
  margin-top: 6px;
  font-size: 0.34em;
  letter-spacing: 0;
  color: #f2ecff;
  opacity: 0.92;
}

.hero {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(14, 14, 58, 0.1);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 10px;
  overflow: hidden;
}

.hero-main {
  color: #f8f7ff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(120deg, #1f0f73 2%, #28107f 48%, #180c64 100%);
}

.hero-kicker {
  font-family: "Bricolage Grotesque", sans-serif;
  letter-spacing: 0.11em;
  font-weight: 700;
  font-size: 0.7rem;
  opacity: 0.88;
}

.hero h1 {
  margin: 8px 0 12px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.26rem, 1.9vw + 0.8rem, 2.1rem);
}

.progress-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.big-number {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1;
  font-weight: 800;
}

.big-number span {
  margin-left: 4px;
  font-size: 0.54em;
  opacity: 0.75;
}

.progress-info {
  text-align: right;
}

.progress-info strong {
  font-size: 1.35rem;
  font-family: "Bricolage Grotesque", sans-serif;
}

.tiny {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.hero-main .tiny {
  color: #e8e2ff;
  opacity: 0.86;
}

.progress-bar {
  margin-top: 10px;
  border-radius: 999px;
  height: 9px;
  background: rgba(232, 223, 255, 0.2);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff2d86, #ef1f7a);
  transition: width 240ms ease;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  margin-bottom: 12px;
}

.sync-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(110deg, #201086, #170d6a 72%, #1b1268);
  border: 0;
  color: #fff;
}

.sync-strip strong {
  display: block;
  font-size: 0.96rem;
}

.sync-strip .tiny {
  color: rgba(248, 244, 255, 0.84);
}

.sync-login {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--brand-pink), var(--brand-pink-2));
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.mode-switch,
.confed-filter,
.sticker-filter,
.action-grid {
  display: grid;
  gap: 8px;
}

.mode-switch,
.action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f6f7fd);
  padding: 10px;
  text-align: center;
  color: var(--ink);
  min-height: 90px;
}

.action-card strong,
.action-card small,
.action-card span {
  display: block;
}

.action-icon {
  width: 30px;
  height: 30px;
  margin: 0 auto 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #27108a, #1a0f6f);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.86rem;
}

.action-card strong {
  font-size: 0.9rem;
}

.action-card small {
  margin-top: 3px;
  font-size: 0.71rem;
  color: var(--ink-soft);
}

.action-card.active {
  border-color: rgba(246, 31, 121, 0.36);
  box-shadow: 0 6px 16px rgba(246, 31, 121, 0.14);
}

.action-card.active .action-icon {
  background: linear-gradient(135deg, #f61f79, #ff4ea6);
}

.action-card-info {
  cursor: default;
  border-color: #d9dbef;
  background: linear-gradient(180deg, #f7f8ff, #f0f2ff);
}

.action-card-info .action-icon {
  background: linear-gradient(135deg, #14106a, #2a2099);
}

button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 8px 10px;
  cursor: pointer;
}

button:hover {
  border-color: #cacde7;
}

button.active {
  border-color: #3532a0;
  background: #eff0fd;
  color: #272284;
}

.section-title {
  margin: 14px 0 10px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.13rem;
  color: #2d2a6f;
}

.section-title span {
  font-size: 0.94em;
  color: #5b5a77;
  font-weight: 600;
}

.search-box {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  margin-bottom: 10px;
}

.search-box input {
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: var(--ink);
}

.confed-filter {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: 10px;
}

.confed-filter button {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 8px;
  white-space: nowrap;
  text-transform: uppercase;
}

.teams-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.team-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
}

.team-badge {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.team-flag {
  width: 26px;
  height: 18px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid rgba(18, 18, 77, 0.12);
}

.team-code {
  min-width: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #15b36d, #149f5f);
  color: #fff;
  font-size: 0.58rem;
  text-align: center;
  padding: 2px 5px;
  font-weight: 700;
}

.team-name {
  font-weight: 700;
}

.team-meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.team-right {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.team-right strong {
  color: #272475;
  font-size: 0.98rem;
}

.team-chevron {
  color: #a0a4be;
  font-size: 1.4rem;
  line-height: 1;
}

.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-flag {
  width: 56px;
  height: 38px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(17, 16, 77, 0.14);
}

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

.stickers-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.sticker-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
}

.sticker-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sticker-photo {
  width: 80px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(18, 18, 77, 0.13);
  background: #f4f5fd;
  flex: 0 0 auto;
}

.sticker-photo-empty {
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sticker-num {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  color: var(--ink-soft);
}

.have-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #4f4e68;
}

.have-check input {
  width: 18px;
  height: 18px;
  accent-color: #2c2fa7;
}

.qty-state {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.me-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbff;
  color: #1d1d4b;
  padding: 10px;
}

@media (max-width: 860px) {
  .cover-cards {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

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

  .sticker-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    padding: 10px 10px 24px;
  }

  .home-logo-btn {
    width: 46px;
    height: 46px;
    top: 8px;
    left: 8px;
  }

  .cover-shell {
    border-radius: 20px;
    min-height: 84vh;
    padding: 12px 12px 18px;
  }

  .cover-hero {
    padding-top: 36px;
  }

  .cover-logo {
    width: 234px;
    height: 234px;
    font-size: 2.4rem;
    margin-bottom: 30px;
  }

  .cover-hero p {
    letter-spacing: 0.14em;
    font-size: 0.8rem;
  }

  .cover-card {
    grid-template-columns: 64px 1fr auto;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
  }

  .cover-card-icon {
    width: 64px;
    height: 64px;
    font-size: 1.6rem;
  }

  .cover-card-copy strong {
    font-size: 1.3rem;
  }

  .cover-card-copy small {
    font-size: 0.8rem;
  }

  .album-top {
    margin: -10px -10px 10px;
    padding: 8px 10px 10px;
    border-radius: 0 0 18px 18px;
  }

  .mode-switch,
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-wordmark {
    font-size: 2rem;
  }

  .sync-strip {
    padding: 12px;
  }

  .sync-login {
    padding: 10px 12px;
    font-size: 0.86rem;
  }

  .team-card {
    grid-template-columns: 36px 1fr auto;
    padding: 8px 10px;
  }

  .team-meta {
    font-size: 0.78rem;
  }

}

/* Login and Admin Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 10px;
  min-height: 60vh;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(18, 18, 77, 0.05);
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.form-group input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fafbff;
  color: #1d1d4b;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #2c2fa7;
}

.login-error-msg {
  background: #fff0f0;
  color: #c0392b;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid #fbc4c4;
}

.users-table-container {
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.users-table th,
.users-table td {
  padding: 12px;
  font-size: 0.9rem;
}

.users-table th {
  background: #faf5f8;
  color: var(--ink-soft);
  font-weight: 700;
}

.user-role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.user-role-badge.admin {
  background: #e8f8f5;
  color: #117864;
  border: 1px solid #a3e4d7;
}

.user-role-badge.collector {
  background: #ebf5fb;
  color: #2471a3;
  border: 1px solid #aed6f1;
}

.btn-mini {
  padding: 4px 8px;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-mini.btn-edit {
  background: #f4f6f7;
  color: #5d6d7e;
  border: 1px solid #d5dbdb;
}

.btn-mini.btn-edit:hover {
  background: #eaeded;
}

.btn-mini.btn-danger {
  background: #fdfefe;
  color: #c0392b;
  border: 1px solid #f5b7b1;
}

.btn-mini.btn-danger:hover {
  background: #fdedec;
}
