:root {
  --bg: #081a31;
  --bg-soft: #0f2f56;
  --surface: #f7fbff;
  --surface-alt: #ffffff;
  --ink: #0d1b2a;
  --muted: #4e5d72;
  --primary: #1e64b0;
  --primary-strong: #174d88;
  --primary-soft: #dbeeff;
  --accent: #14b8a6;
  --line: #d8e4f2;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --success: #0f7a43;
  --success-soft: #ecfdf3;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-lg: 0 18px 36px rgba(7, 22, 40, 0.24);
  --shadow-md: 0 10px 24px rgba(10, 33, 60, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Verdana, Geneva, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, rgba(30, 100, 176, 0.35) 0%, transparent 35%),
    radial-gradient(circle at 90% 12%, rgba(20, 184, 166, 0.2) 0%, transparent 30%),
    linear-gradient(135deg, #071325 0%, var(--bg) 42%, var(--bg-soft) 100%);
  min-height: 100vh;
}

.bg-shape {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(54px);
  opacity: 0.42;
}

.bg-shape-a {
  width: 300px;
  height: 300px;
  top: -90px;
  right: -60px;
  background: #2dd4bf;
}

.bg-shape-b {
  width: 330px;
  height: 330px;
  left: -140px;
  bottom: -120px;
  background: #60a5fa;
}

.layout {
  position: relative;
  z-index: 1;
  width: min(1220px, 95vw);
  margin: 24px auto 42px;
  display: grid;
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.98));
  border: 1px solid rgba(196, 214, 233, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 18px;
}

.hero {
  padding: 22px;
  box-shadow: var(--shadow-lg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: center;
}

.hero-kicker {
  margin: 0 0 8px;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #0f5da8;
}

.hero h1 {
  margin: 0;
  font-family: Verdana, Geneva, sans-serif;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  line-height: 1.13;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-media img {
  width: 100%;
  max-width: 620px;
  border-radius: 16px;
  border: 1px solid #c9def4;
  display: block;
}

.brand-logos {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-logo {
  width: 170px;
  max-width: 42vw;
  border-radius: 10px;
  border: 1px solid #d6e5f5;
  background: #fff;
  padding: 8px 9px;
  box-shadow: 0 6px 14px rgba(12, 39, 72, 0.12);
}

.hero-features {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.feature-chip {
  border: 1px solid #cce0f6;
  background: linear-gradient(180deg, #f9fcff, #edf5ff);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.feature-chip img {
  width: 28px;
  height: 28px;
}

.feature-chip strong {
  display: block;
  margin-bottom: 3px;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.92rem;
}

.feature-chip span {
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 22px;
  border-top: 5px solid #1b5da2;
  box-shadow: var(--shadow-lg);
}

.login-kicker {
  margin: 0 0 6px;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  font-weight: 700;
  color: #1b5da2;
}

.auth-card h2 {
  margin-bottom: 14px;
}

.login-brand-strip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbe7f4;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.login-brand-strip img {
  width: 140px;
  max-width: 38vw;
  border: 1px solid #d5e3f2;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

h2 {
  margin: 0 0 12px;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1.2rem;
}

form {
  display: grid;
  gap: 8px;
}

label {
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: #223a57;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  min-height: 40px;
  background: #fff;
}

input:focus,
select:focus {
  outline: none;
  border-color: #4f9ae5;
  box-shadow: 0 0 0 3px rgba(30, 100, 176, 0.15);
}

button {
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e64b0, #0f5da8);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

button:hover {
  filter: brightness(0.97);
}

button.small {
  padding: 7px 10px;
  font-size: 0.78rem;
  font-family: Verdana, Geneva, sans-serif;
}

button.danger {
  background: linear-gradient(135deg, #c62b1f, #a91d14);
}

.app-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 4px solid #1d5fa8;
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.navbar-right {
  position: relative;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 700;
  color: #0c3562;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #59d9ff 0%, #1e64b0 70%);
}

.scope-box {
  background: #f2f7ff;
  border: 1px solid #cedff4;
  padding: 8px 10px;
  border-radius: 10px;
}

#scope-organization-select {
  min-width: 260px;
}

.scope-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-family: Verdana, Geneva, sans-serif;
  color: #355377;
}

.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c8dcf2;
  background: #f5faff;
  color: #163b66;
  padding: 7px 10px;
  border-radius: 999px;
  min-height: 0;
}

.menu-avatar {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #145ca7, #0e4b89);
  color: #fff;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.menu-user-copy {
  display: grid;
  text-align: left;
  line-height: 1.1;
}

#user-name {
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.84rem;
}

#user-role {
  font-size: 0.72rem;
  color: #426081;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  background: #ffffff;
  border: 1px solid #cce0f5;
  border-radius: 12px;
  box-shadow: 0 18px 28px rgba(10, 32, 58, 0.22);
  padding: 8px;
  z-index: 20;
}

.user-menu button {
  width: 100%;
  text-align: left;
  background: #fff;
  color: #1c3553;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px;
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 600;
}

.user-menu a {
  width: 100%;
  display: block;
  text-decoration: none;
  color: #1c3553;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px;
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 600;
}

.user-menu button:hover {
  background: #edf5ff;
}

.user-menu a:hover {
  background: #edf5ff;
}

.user-menu hr {
  border: none;
  border-top: 1px solid #dbe7f3;
  margin: 6px 0;
}

.user-menu .menu-logout {
  color: #b42318;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-family: Verdana, Geneva, sans-serif;
  font-weight: 600;
  color: #114a86;
  background: #dcedff;
}

.org-pill {
  color: #0d5a53;
  background: #d8fbf7;
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-left: 4px solid #1d62ad;
}

.dashboard-kicker {
  margin: 0;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: #1a5fa8;
}

.dashboard-head h2 {
  margin: 4px 0 6px;
  font-size: 1.14rem;
}

.dashboard-head p {
  margin: 0;
  color: #50647d;
}

.dashboard-brand-logos {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-brand-logos img {
  width: 150px;
  max-width: 42vw;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d7e5f4;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(10, 40, 72, 0.12);
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1.8fr repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stats-card {
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(63, 105, 153, 0.4);
  background: linear-gradient(145deg, rgba(8, 20, 36, 0.96), rgba(11, 30, 54, 0.94));
  box-shadow: 0 16px 30px rgba(5, 16, 30, 0.3);
  color: #f2f7ff;
  min-height: 108px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.stats-card-match {
  background:
    linear-gradient(145deg, rgba(7, 18, 33, 0.97), rgba(11, 31, 56, 0.95)),
    radial-gradient(circle at 90% 0%, rgba(20, 184, 166, 0.25), transparent 45%);
}

.stats-label {
  margin: 0;
  color: #77a7e2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
}

.stats-card strong {
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  line-height: 1.15;
  color: #ffffff;
}

.stats-card-match strong {
  font-size: clamp(0.92rem, 1.6vw, 1.16rem);
}

.stats-card span {
  color: #d6e6fa;
  font-size: 0.9rem;
  line-height: 1.35;
}

.tabs-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
}

.awards-board {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.award-card {
  border-radius: 14px;
  border: 1px solid rgba(58, 95, 140, 0.48);
  background:
    linear-gradient(145deg, rgba(8, 20, 36, 0.97), rgba(13, 32, 56, 0.95)),
    radial-gradient(circle at 100% 0%, rgba(30, 100, 176, 0.32), transparent 52%);
  color: #f3f8ff;
  min-height: 150px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  box-shadow: 0 15px 30px rgba(6, 17, 31, 0.33);
}

.award-card-first {
  grid-column: 1 / -1;
}

.award-rank-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 700;
  color: #18273a;
  background: linear-gradient(150deg, #ffe390 0%, #ffd249 52%, #f1b500 100%);
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 18px rgba(2, 11, 21, 0.35);
}

.award-rank-label {
  margin: 0;
  color: #8fbaf2;
  font-size: 0.88rem;
}

.award-card strong {
  display: block;
  margin-top: 3px;
  color: #ffffff;
  font-size: clamp(1.15rem, 2.2vw, 1.9rem);
  line-height: 1.2;
}

.award-card-second strong {
  font-size: clamp(1.02rem, 1.8vw, 1.45rem);
}

.award-winner {
  display: block;
  margin-top: 9px;
  color: #d6e9ff;
  font-size: 0.88rem;
}

.tab-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #c7dbf2;
  background: #f4f9ff;
  color: #214265;
  border-radius: 10px;
  padding: 8px 11px;
  min-height: 0;
}

.tab-trigger img {
  width: 20px;
  height: 20px;
}

.tab-trigger.active {
  background: linear-gradient(135deg, #1d62ad, #0e4d8d);
  color: #fff;
  border-color: #1d62ad;
}

.tab-pane {
  animation: pane-in 220ms ease;
}

.matches-calendar-pager {
  margin: 8px 0 12px;
  padding: 10px;
  border: 1px solid #d5e4f4;
  border-radius: 12px;
  background: #f4f9ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-nav-block,
.calendar-picker-block {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-nav-block strong {
  color: #123f6f;
  font-size: 0.9rem;
}

.calendar-picker-block label {
  margin: 0;
  font-size: 0.78rem;
}

#matches-date-picker {
  min-height: 34px;
  padding: 6px 8px;
}

#matches-stage-filter {
  min-height: 34px;
  padding: 6px 8px;
  min-width: 180px;
}

.calendar-btn {
  min-height: 0;
  background: #e4effd;
  color: #174a82;
  border-color: #c8dbf2;
}

.calendar-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.calendar-status {
  font-size: 0.8rem;
  color: #355377;
}

.stage-separator-row td {
  background: #edf4ff;
  color: #184c83;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #d3e3f4;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #c8dbf2;
  background: #f4f9ff;
  color: #174a82;
  font-size: 0.72rem;
  font-weight: 700;
}

.countries-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.country-card {
  border: 1px solid #d8e6f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f2f8ff);
  padding: 12px;
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 122px;
  box-shadow: 0 8px 16px rgba(14, 55, 97, 0.1);
}

.country-flag {
  width: 74px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #d2e2f4;
  box-shadow: 0 4px 10px rgba(12, 51, 90, 0.12);
  background: #ffffff;
}

.country-flag-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.country-card h3 {
  margin: 4px 0 0;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.95rem;
}

.country-confed {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dfefff;
  color: #0f4f8e;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

code {
  font-family: Verdana, Geneva, sans-serif;
  background: #eef4fb;
  border: 1px solid #d2e0f0;
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 0.85em;
}

@keyframes pane-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-grid,
.grid,
.admin-grid {
  display: grid;
  gap: 12px;
}

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

.admin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.admin-tabs-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-tab-trigger {
  border: 1px solid #c7dbf2;
  background: #f3f8ff;
  color: #214265;
  border-radius: 10px;
  padding: 8px 11px;
  min-height: 0;
}

.admin-tab-trigger.active {
  background: linear-gradient(135deg, #1d62ad, #0e4d8d);
  color: #fff;
  border-color: #1d62ad;
}

.admin-tab-pane {
  animation: pane-in 220ms ease;
}

.admin-users-table-wrap {
  margin-top: 12px;
}

.profile-form,
.admin-form {
  border: 1px solid #d8e5f3;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.profile-form h3,
.admin-form h3,
.section-head h2 {
  margin: 0;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1rem;
}

.profile-form input[readonly] {
  background: #f3f7fc;
  color: #5b6d83;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 530px;
}

th,
td {
  border-bottom: 1px solid #e2ebf5;
  text-align: left;
  padding: 11px 8px;
  font-size: 0.92rem;
  white-space: nowrap;
}

th {
  color: #4e5d72;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.predict-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.predict-controls input {
  width: 56px;
  min-height: 34px;
  padding: 6px;
}

.highlight-row {
  background: #e8f5ff;
}

.message {
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #d4e3f5;
  background: #edf4ff;
  color: #234064;
}

.message.error {
  border-color: #f9d0cc;
  background: var(--danger-soft);
  color: var(--danger);
}

.message.success {
  border-color: #b6f0d1;
  background: var(--success-soft);
  color: var(--success);
}

.hint {
  margin: 2px 0 6px;
  color: #5c6f86;
  font-size: 0.84rem;
}

.inline-link {
  color: #145ca7;
  font-weight: 700;
}

.inline-link:hover {
  color: #0f4d8c;
}

.reglamento-text {
  margin-top: 8px;
  border: 1px solid #d7e5f4;
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px;
  white-space: normal;
  line-height: 1.6;
  color: #2a3f5a;
}

.reglamento-text br + br {
  content: "";
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-grid,
  .hero-features,
  .profile-grid,
  .grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .dashboard-brand-logos {
    justify-content: flex-start;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .awards-board {
    grid-template-columns: 1fr;
  }

  .award-card-first {
    grid-column: auto;
  }

  .brand-logo {
    max-width: 100%;
  }

  .auth-card {
    width: min(520px, 100%);
  }
}

@media (max-width: 760px) {
  .layout {
    width: min(1220px, 96vw);
    margin-top: 14px;
  }

  .card,
  .hero {
    padding: 14px;
  }

  #scope-organization-select {
    min-width: 220px;
  }
}
