@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --blue-900: #0a1a34;
  --blue-800: #112a54;
  --blue-700: #1b3b77;
  --blue-600: #2b56a8;
  --blue-500: #3a6bc9;
  --blue-300: #86aee9;
  --gray-900: #151515;
  --gray-700: #4b4b4b;
  --gray-400: #9a9a9a;
  --white: #ffffff;
  --shadow: 0 28px 70px rgba(10, 26, 52, 0.28);
}

*,
*::before,
*::after { 
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--gray-900);
  background:
    radial-gradient(circle at 12% 12%, rgba(58, 107, 201, 0.3), transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(27, 59, 119, 0.35), transparent 46%),
    radial-gradient(circle at 50% 85%, rgba(134, 174, 233, 0.35), transparent 48%),
    linear-gradient(160deg, #e7edf8 0%, #f4f6fb 52%, #e9edf4 100%);
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("images/logo-seguridad-moderna.png"),
    url("images/logo-seguridad-moderna.png"),
    url("images/logo-seguridad-moderna.png");
  background-size: 320px, 260px, 220px;
  background-repeat: no-repeat;
  background-position: 8% 18%, 75% 12%, 82% 78%;
  opacity: 0.08;
  filter: grayscale(1) brightness(1.1);
  mix-blend-mode: multiply;
  z-index: 0;
  pointer-events: none;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.nova-logo {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  width: min(920px, 100%);
  padding: 0 12px;
}

.nova-logo img {
  width: min(520px, 90%);
  height: auto;
  filter: drop-shadow(0 12px 26px rgba(10, 26, 52, 0.25));
  animation: nova-glow 4.5s ease-in-out infinite;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 60px;
  background: linear-gradient(140deg, rgba(58, 107, 201, 0.28), rgba(10, 26, 52, 0.12));
  transform: rotate(25deg);
  z-index: 0;
  filter: blur(2px);
}

.page::before {
  top: -180px;
  left: -140px;
}

.page::after {
  bottom: -200px;
  right: -160px;
}

.card {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(280px, 1fr);
  width: min(980px, 100%);
  background: var(--white);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: rise 800ms ease-out;
}

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

@keyframes nova-glow {
  0% {
    filter: drop-shadow(0 10px 22px rgba(10, 26, 52, 0.25))
      drop-shadow(0 0 0 rgba(58, 107, 201, 0));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 14px 28px rgba(10, 26, 52, 0.3))
      drop-shadow(0 0 18px rgba(58, 107, 201, 0.45));
    transform: scale(1.01);
  }
  100% {
    filter: drop-shadow(0 10px 22px rgba(10, 26, 52, 0.25))
      drop-shadow(0 0 0 rgba(58, 107, 201, 0));
    transform: scale(1);
  }
}

.brand {
  padding: 48px;
  background: linear-gradient(160deg, var(--blue-900), var(--blue-600));
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.logo-wrap {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 14px 18px;
  width: fit-content;
  border: 1px solid rgba(27, 59, 119, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.logo-wrap img {
  display: block;
  width: 170px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(10, 26, 52, 0.25));
}

.brand h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.5px;
}

.brand p {
  margin: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.brand-stats {
  display: flex;
  gap: 24px;
  margin-top: auto;
}

.brand-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.auth {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}

.auth-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.auth-head p {
  margin: 0;
  color: var(--gray-700);
}

.auth-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-700);
}

.field input {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d6dbe4;
  font-size: 15px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.field input:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(58, 107, 201, 0.18);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-700);
}

.check input {
  accent-color: var(--blue-600);
}

.btn {
  border: none;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: var(--white);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(27, 59, 119, 0.32);
}

.link {
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.support {
  margin: 0;
  color: var(--gray-700);
  font-size: 14px;
}

@media (max-width: 900px) {
  .card {
    grid-template-columns: 1fr;
  }

  .brand {
    align-items: center;
    text-align: center;
  }

  .brand-stats {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .brand,
  .auth {
    padding: 32px 24px;
  }

  .logo-wrap img {
    width: 140px;
  }
}

/* App dashboard */
.app-shell {
  min-height: 100vh;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.app-header {
  width: min(1100px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.app-logos {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-nova {
  width: clamp(160px, 20vw, 220px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(10, 26, 52, 0.2));
}

.logo-smc {
  width: clamp(120px, 16vw, 180px);
  height: auto;
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(27, 59, 119, 0.18);
  box-shadow: 0 6px 16px rgba(10, 26, 52, 0.12);
}

.app-divider {
  width: 2px;
  height: 48px;
  background: linear-gradient(180deg, transparent, rgba(27, 59, 119, 0.4), transparent);
}

.app-title h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.4vw, 32px);
}

.app-title p {
  margin: 0;
  color: var(--gray-700);
}

.menu-grid {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.menu-card {
  text-decoration: none;
  color: var(--gray-900);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 246, 255, 0.9));
  border-radius: 22px;
  padding: 26px 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 130px;
  box-shadow:
    0 18px 34px rgba(10, 26, 52, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(27, 59, 119, 0.12);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  position: relative;
  overflow: hidden;
  animation: card-float 7s ease-in-out infinite;
}

.menu-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 26px 48px rgba(10, 26, 52, 0.28),
    0 0 24px rgba(58, 107, 201, 0.22);
  border-color: rgba(27, 59, 119, 0.28);
}

.menu-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(58, 107, 201, 0.18), transparent 50%);
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.menu-card:hover::after {
  opacity: 0.95;
}

.menu-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.5) 45%, transparent 70%);
  opacity: 0.25;
  transform: translateX(-120%);
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
}

.menu-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--blue-900), var(--blue-500));
  color: var(--white);
  box-shadow:
    0 12px 22px rgba(10, 26, 52, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 220ms ease, box-shadow 220ms ease;
  animation: icon-pulse 4s ease-in-out infinite;
}

.menu-card:hover .menu-icon {
  transform: rotate(-4deg) scale(1.04);
  box-shadow:
    0 16px 26px rgba(10, 26, 52, 0.3),
    0 0 18px rgba(58, 107, 201, 0.35);
}

.menu-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.menu-text {
  display: grid;
  gap: 4px;
}

.menu-text strong {
  font-size: 18px;
}

.menu-text small {
  color: var(--gray-700);
  font-size: 14px;
}

@keyframes card-float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-120%);
  }
  50% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@keyframes icon-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

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

@media (max-width: 600px) {
  .app-header {
    padding: 20px;
  }

  .app-logos {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-divider {
    width: 100%;
    height: 1px;
  }
}
