@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f4f7fb;
  --text: #172033;
  --muted: #5f6b7a;
  --card: rgba(255, 255, 255, 0.88);
  --card-border: rgba(15, 23, 42, 0.10);
  --btn: rgba(15, 23, 42, 0.06);
  --btn-hover: rgba(15, 23, 42, 0.11);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html[data-theme="dark"] {
  --bg: #07111f;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.12);
  --btn: rgba(255, 255, 255, 0.08);
  --btn-hover: rgba(255, 255, 255, 0.16);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

body {
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.20), transparent 35%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.20), transparent 35%),
    var(--bg);
}

body, .card, .logo-box, button {
    transition: all 0.35s ease;
}

.page-wrapper {
  width: min(1280px, 94%);
  margin: 0 auto;
  padding: 38px 0 24px;
}

.header {
  text-align: center;
  margin-bottom: 34px;
  position: relative;
}

.logo-box {
  width: 273px;
  height: 153px;
  margin: 0 auto 26px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.logo {
  max-width: 250px;
  max-height: 250px;
  object-fit: contain;
  transition: opacity .35s ease, transform .35s ease;
}

.env-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34,197,94,.15);
    color: #22c55e;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
}

.env-badge.production {
    background: rgba(34,197,94,.15);
    color: #22c55e;
}

.env-badge.qa {
    background: rgba(234,179,8,.15);
    color: #eab308;
}

.env-badge.dev {
    background: rgba(239,68,68,.15);
    color: #ef4444;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 12px auto 16px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34,197,94,.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(34,197,94,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34,197,94,0);
    }
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.online {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.status-badge.online .status-dot {
    background: #22c55e;
}

.status-badge.warning {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
}

.status-badge.warning .status-dot {
    background: #eab308;
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.status-badge.offline .status-dot {
    background: #ef4444;
}

.header h1 {
  font-size: clamp(1.4rem, 2.6vw, 2.3rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.header p {
  color: var(--muted);
  font-size: 1rem;
}

.theme-toggle {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.theme-toggle button {
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  padding: 10px 15px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  box-shadow: var(--shadow);
}

#cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* Cuándo sean más de tres plataformas a mostrar:
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); */
  gap: 26px;
}

.card {
  min-height: 360px;
  border-radius: 24px;
  background: var(--card-border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,.18);
}

#cards:hover > .card {
  background: radial-gradient(
    450px circle at var(--mouse-x) var(--mouse-y),
    hsl(var(--color) / 0.95),
    var(--card-border) 42%
  );
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    520px circle at var(--mouse-x) var(--mouse-y),
    hsl(var(--color) / 0.35),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
}

#cards:hover > .card::before {
  opacity: 1;
}

.card-content {
  position: absolute;
  inset: 1px;
  padding: 30px;
  border-radius: inherit;
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.icon-box {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: hsl(var(--color) / 0.14);
  color: hsl(var(--color));
  margin-bottom: 22px;
}

.icon-box i {
  font-size: 2.7rem;
}

.card h2 {
  font-size: 1.45rem;
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
  flex: 1;
}

.card a {
  width: 100%;
  text-decoration: none;
  color: var(--text);
  background: var(--btn);
  border: 1px solid var(--card-border);
  padding: 13px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: 0.25s ease;
  position: relative;
  z-index: 2;
}

.card a:hover {
  background: var(--btn-hover);
  transform: translateY(-2px);
  background: rgba(255,255,255,.15);
}
html[data-theme="light"] .card a:hover {
    background: rgba(0,0,0,.05);
}

.card-admin {
  --color: 210 90% 56%;
}

.card-monitoring {
  --color: 145 70% 45%;
}

.card-planning {
  --color: 32 90% 55%;
}

footer {
  text-align: center;
  margin-top: 34px;
  color: var(--muted);
}

footer p {
  font-weight: 500;
}

@media (max-width: 920px) {
  #cards {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 320px;
  }

  .theme-toggle {
    justify-content: center;
  }
}