:root {
  color-scheme: light;
  --cmc-navy: #043eb3;
  --cmc-blue: #015be5;
  --cmc-azure: #0a9bf1;
  --cmc-cyan: #19cdeb;
  --cmc-midnight: #0b1f3a;
  --cmc-ice: #f3faff;
  --cmc-cloud-gray: #d8e5f4;
}

html, body, button, input, textarea, select {
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body { color: var(--cmc-midnight); }

*:focus-visible {
  outline: 3px solid var(--cmc-azure);
  outline-offset: 3px;
}

.loader {
  border-color: var(--cmc-cloud-gray) !important;
  border-right-color: var(--cmc-blue) !important;
}

/* CMC Tracking login */
body main {
  position: relative;
  isolation: isolate;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 84% 12%, rgb(25 205 235 / 18%), transparent 25rem),
    linear-gradient(145deg, #f8fcff 0%, var(--cmc-ice) 58%, #e8f6ff 100%);
}

body main::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: clamp(12rem, 29vw, 35rem);
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgb(243 250 255 / 0%), rgb(243 250 255 / 5%)),
    url('/tracking-cloud-banner.png');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
}

body main > div:first-child {
  position: relative;
  isolation: isolate;
  width: clamp(22rem, 36vw, 34rem);
  overflow: hidden;
  padding: 2.5rem;
  background: radial-gradient(circle at 18% 82%, rgb(25 205 235 / 48%), transparent 17rem),
    linear-gradient(150deg, var(--cmc-navy) 0%, var(--cmc-blue) 48%, var(--cmc-azure) 100%);
  z-index: 1;
}

body main > div:first-child::before,
body main > div:first-child::after {
  content: '';
  position: absolute;
  z-index: -1;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
}

body main > div:first-child::before {
  width: 24rem; height: 24rem; top: -12rem; left: -9rem;
}

body main > div:first-child::after {
  width: 18rem; height: 18rem; right: -9rem; bottom: -8rem;
}

body main > div:first-child img {
  width: min(100%, 25rem);
  max-width: 100%;
  max-height: 17rem;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1rem 2rem rgb(0 30 100 / 20%));
}

body main > .MuiPaper-root {
  min-width: 0;
  padding: 0 !important;
  background: transparent;
  box-shadow: none;
  z-index: 1;
}

body main form {
  position: relative;
  box-sizing: border-box;
  width: min(calc(100% - 3rem), 31rem);
  max-width: none;
  margin: 5rem auto 2rem;
  padding: clamp(2rem, 5vw, 3.5rem);
  overflow: visible;
  border: 1px solid rgb(1 91 229 / 10%);
  border-radius: 1.75rem;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 1.5rem 4rem rgb(11 31 58 / 14%);
  backdrop-filter: blur(18px);
}

body main form::before {
  content: 'CMC TRACKING';
  display: block;
  margin: 2.75rem 0 0.6rem;
  color: var(--cmc-blue);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-align: center;
}

body main form > div:nth-of-type(2)::before {
  content: 'Monitorea vehículos y activos desde un solo lugar';
  order: -1;
  margin: 0 0 1.25rem;
  color: #49617a;
  font-size: 0.98rem;
  font-weight: 450;
  line-height: 1.55;
  text-align: center;
}

body main form .MuiButton-containedSecondary {
  min-height: 3.4rem;
  border-radius: 0.9rem;
  background: linear-gradient(110deg, var(--cmc-blue), var(--cmc-azure) 62%, var(--cmc-cyan));
  box-shadow: 0 0.8rem 1.8rem rgb(1 91 229 / 24%);
  color: #fff;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-transform: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
  font-size: 0;
}

body main form .MuiButton-containedSecondary::after {
  content: 'Iniciar sesión con Mi Nube CMC';
  font-size: 0.875rem;
}

body main form .MuiButton-containedSecondary:hover {
  background: linear-gradient(110deg, var(--cmc-navy), var(--cmc-blue) 58%, var(--cmc-azure));
  box-shadow: 0 1rem 2.2rem rgb(1 91 229 / 32%);
  transform: translateY(-2px);
}

body main form > div:first-of-type {
  position: absolute !important;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  justify-content: flex-end;
}

/* La autenticación y el segundo factor se administran centralmente en Mi Nube CMC. */
body main form > div:first-of-type > button:first-child {
  display: none !important;
}

@media (max-width: 1199.98px) {
  body main { align-items: center; justify-content: center; padding: 1.25rem; }
  body main > div:first-child { display: none; }
  body main > .MuiPaper-root { width: 100%; }
  body main form { margin: 3.5rem auto 1rem; }
  body main form > div:nth-of-type(2) img {
    order: -2;
    width: min(16rem, 72vw);
    max-height: 8.5rem;
    margin: 0 auto 0.5rem;
    object-fit: contain;
  }
}

@media (max-width: 599.98px) {
  body main {
    padding: 0.75rem;
    background: radial-gradient(circle at 100% 0%, rgb(25 205 235 / 24%), transparent 17rem), var(--cmc-ice);
  }
  body main form {
    width: calc(100vw - 1.5rem);
    max-width: calc(100vw - 1.5rem);
    margin: 3.75rem auto 0.5rem;
    padding: 1.75rem 1.25rem 2rem;
    border-radius: 1.35rem;
  }
  body main form::before { font-size: 1.75rem; }
  body main form > div:nth-of-type(2)::before { font-size: 0.92rem; }
  body main form .MuiButton-containedSecondary {
    width: 100%; min-height: 3.25rem; padding-inline: 1rem;
  }
  body main::after {
    height: 10rem;
    opacity: 0.58;
    background-size: cover;
  }
}

@media (prefers-reduced-motion: reduce) {
  body main form .MuiButton-containedSecondary { transition: none; }
}


