:root {
  --cdm-green: #009C3B;
  --cdm-yellow: #FFDF00;
  --cdm-blue: #002776;
  --cdm-white: #FFFFFF;
  --cdm-light: #F5F5F5;
  --cdm-dark: #1A1A1A;
  --cdm-green-dark: #007a2e;
  --cdm-blue-dark: #001a4d;
  --cdm-radius: 10px;
  --cdm-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.cdm-matches {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.cdm-matches .cdm-matches__title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  color: #007a2e;
}
.cdm-matches .cdm-matches__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow: auto;
  min-height: 0;
}
.cdm-matches .cdm-matches__empty {
  opacity: 0.7;
  font-style: italic;
  font-size: 0.85rem;
}
.cdm-matches .cdm-match {
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: rgba(0, 0, 0, 0.05);
  border-left: 3px solid #009C3B;
}
.cdm-matches .cdm-match--live {
  border-left-color: #FFDF00;
  background: rgba(255, 223, 0, 0.14);
}
.cdm-matches .cdm-match__time {
  font-size: 0.7rem;
  opacity: 0.75;
}
.cdm-matches .cdm-match__teams {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0.12rem 0;
}
.cdm-matches .cdm-match__team {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cdm-matches .cdm-match__team--away {
  text-align: right;
}
.cdm-matches .cdm-match__score {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  min-width: 46px;
  text-align: center;
}
.cdm-matches .cdm-match__meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.66rem;
  opacity: 0.9;
}
.cdm-matches .cdm-match__status {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.04rem 0.35rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.1);
}
.cdm-matches .cdm-match__status--live {
  background: #FFDF00;
  color: #001a4d;
}
.cdm-matches .cdm-match__venue {
  opacity: 0.8;
}
.cdm-matches .cdm-match__link {
  margin-left: auto;
  white-space: nowrap;
  font-weight: 700;
}

html.cdm-login {
  --cdm-p: var(--cdm-login-primary, #009C3B);
  --cdm-a: var(--cdm-login-accent, #FFDF00);
}
html.cdm-login body::before {
  content: "";
  position: fixed;
  inset: 0;
  border: 6px solid transparent;
  border-image: linear-gradient(90deg, var(--cdm-p) 0 40%, var(--cdm-a) 40% 60%, #002776 60% 100%) 1;
  pointer-events: none;
  z-index: 10;
}
html.cdm-login body {
  min-height: 100vh;
  background-attachment: fixed;
  background-color: #001a4d;
}
html.cdm-login.cdm-login-bg-stadiumnight body {
  background-image: linear-gradient(180deg, rgba(0, 26, 77, 0.3) 0%, rgba(0, 26, 77, 0.45) 100%), url("/plugins/copadomundofifa/img/stadium-night.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
html.cdm-login.cdm-login-bg-pitchtop body {
  background-image: linear-gradient(180deg, rgba(0, 26, 77, 0.3) 0%, rgba(0, 26, 77, 0.45) 100%), url("/plugins/copadomundofifa/img/pitch-top.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
html.cdm-login.cdm-login-bg-aerial body {
  background-image: linear-gradient(180deg, rgba(0, 26, 77, 0.58) 0%, rgba(0, 26, 77, 0.72) 100%), url("/plugins/copadomundofifa/img/stadium-aerial.svg?v=2");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
html.cdm-login.cdm-login-bg-flagimg body {
  background-image: linear-gradient(180deg, rgba(0, 26, 77, 0.35) 0%, rgba(0, 26, 77, 0.55) 100%), url("/plugins/copadomundofifa/img/flag-brazil.svg?v=2");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
html.cdm-login.cdm-login-bg-custom body {
  background-image: linear-gradient(180deg, rgba(0, 26, 77, 0.5) 0%, rgba(0, 26, 77, 0.66) 100%), var(--cdm-login-bg-image, url("/plugins/copadomundofifa/img/stadium-aerial.svg?v=2"));
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
html.cdm-login.cdm-login-bg-stadium body {
  background-image: radial-gradient(ellipse at 20% -10%, rgba(255, 223, 0, 0.22) 0%, transparent 45%), radial-gradient(ellipse at 85% 0%, rgba(29, 185, 84, 0.18) 0%, transparent 50%), linear-gradient(0deg, rgba(0, 122, 46, 0.55) 0%, transparent 30%), linear-gradient(135deg, #002776 0%, #001a4d 60%, #1A1A1A 100%);
}
html.cdm-login.cdm-login-bg-green body {
  background-image: linear-gradient(135deg, #009C3B 0%, #007a2e 100%);
}
html.cdm-login.cdm-login-bg-blue body {
  background-image: linear-gradient(135deg, #002776 0%, #001a4d 100%);
}
html.cdm-login.cdm-login-bg-flag body {
  background-image: linear-gradient(135deg, #009C3B 0%, #009C3B 33%, #FFDF00 33%, #FFDF00 66%, #002776 66%, #002776 100%);
}
html.cdm-login .card {
  position: relative;
  border: 0;
  border-radius: var(--cdm-radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
html.cdm-login .card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 6px;
  background: linear-gradient(90deg, var(--cdm-p) 0 40%, var(--cdm-a) 40% 60%, #002776 60% 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}
html.cdm-login .card-header,
html.cdm-login .card-body,
html.cdm-login .card-footer {
  background-color: transparent;
}
html.cdm-login .glpi-logo {
  margin-bottom: 0.5rem;
  padding: 10px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
html.cdm-login .cdm-login-head {
  text-align: center;
  margin: 0.25rem 0 1rem;
}
html.cdm-login .cdm-login-hexa {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: var(--cdm-p);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}
html.cdm-login .cdm-login-hexa__stars {
  color: var(--cdm-a);
  letter-spacing: 0.05em;
}
html.cdm-login .cdm-login-welcome {
  font-size: 1.35rem;
  font-weight: 800;
  color: #002776;
  margin: 0 0 0.35rem;
}
html.cdm-login .cdm-login-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cdm-p);
  line-height: 1.4;
}
html.cdm-login .cdm-login-flag {
  display: inline-block;
  margin: 0.25rem 0;
}
html.cdm-login .cdm-login-flag img {
  display: block;
  width: 54px;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
html.cdm-login.cdm-flag-classic .cdm-login-flag img {
  border-radius: 4px;
}
html.cdm-login.cdm-flag-circle .cdm-login-flag img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--cdm-a);
}
html.cdm-login.cdm-flag-ribbon .cdm-login-flag img {
  border-radius: 4px;
  transform: skewX(-8deg);
}
html.cdm-login.cdm-flag-wave .cdm-login-flag img {
  border-radius: 4px;
  animation: cdm-wave 2.4s ease-in-out infinite;
  transform-origin: left center;
}
@keyframes cdm-wave {
  0%, 100% {
    transform: rotate(-1.5deg) skewY(-1deg);
  }
  50% {
    transform: rotate(1.5deg) skewY(1deg);
  }
}
html.cdm-login .cdm-login-countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: 0.8rem auto 0;
  padding: 0.5rem 0.7rem;
  max-width: max-content;
  border-radius: 10px;
  background: linear-gradient(90deg, #009C3B 0 42%, #007a2e 58% 100%);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #009C3B 0 45%, #FFDF00 45% 55%, #002776 55% 100%) 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
html.cdm-login .cdm-login-countdown .cdm-countdown__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 0.18rem 0.35rem;
  background: rgba(0, 26, 77, 0.35);
  border: 1px solid rgba(255, 223, 0, 0.55);
  border-radius: 6px;
  line-height: 1;
}
html.cdm-login .cdm-login-countdown .cdm-countdown__num {
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFDF00;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
html.cdm-login .cdm-login-countdown .cdm-countdown__label {
  margin-top: 0.12rem;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFFFFF;
  opacity: 0.92;
}
html.cdm-login .btn-primary {
  background: linear-gradient(95deg, var(--cdm-p), #007a2e);
  border: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: filter 0.15s ease, transform 0.05s ease;
}
html.cdm-login .btn-primary:focus-visible {
  outline: 3px solid rgba(255, 223, 0, 0.9);
  outline-offset: 2px;
}
html.cdm-login .btn-primary:hover {
  filter: brightness(1.08);
}
html.cdm-login .btn-primary:active {
  transform: translateY(1px);
}
html.cdm-login .cdm-login-matches {
  position: fixed;
  right: 18px;
  bottom: 54px;
  width: min(360px, 90vw);
  max-height: 60vh;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--cdm-radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  z-index: 11;
  display: flex;
  flex-direction: column;
}
html.cdm-login .cdm-login-matches.cdm-matches {
  padding: 0.75rem 0.9rem;
  color: #1A1A1A;
}
html.cdm-login .cdm-login-matches__title {
  background: linear-gradient(95deg, var(--cdm-p), #002776);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 0.8rem;
}
html.cdm-login .cdm-login-matches__frame {
  border: 0;
  width: 100%;
  height: 320px;
  background: #fff;
}
html.cdm-login .cdm-login-footer {
  position: fixed;
  inset: auto 0 0 0;
  padding: 0.4rem 1rem;
  text-align: center;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  z-index: 10;
  pointer-events: none;
}
html.cdm-login .cdm-login-footer .cdm-footer__line1 {
  font-size: 0.8rem;
  font-weight: 700;
}
html.cdm-login .cdm-login-footer .cdm-footer__credit {
  display: block;
  font-size: 0.72rem;
  opacity: 0.92;
}
html.cdm-login .cdm-login-footer__stars {
  color: var(--cdm-a);
  margin-left: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  html.cdm-login.cdm-flag-wave .cdm-login-flag img {
    animation: none;
  }
}
@media (max-width: 576px) {
  html.cdm-login .cdm-login-welcome {
    font-size: 1.15rem;
  }
  html.cdm-login .cdm-login-subtitle {
    font-size: 0.85rem;
  }
  html.cdm-login .cdm-login-matches {
    right: 8px;
    left: 8px;
    width: auto;
  }
}