* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0b0b0b;
  --panel: #121212;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f5f5;
  --muted: #bdbdbd;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

.split-layout {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  overflow: hidden;
  position: relative;
  background: #000;
}

/* =========================
   LADO IMAGEN
========================= */
.visual-side {
  position: relative;
  width: 52%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #ececec);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.visual-side img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(100%) contrast(108%);
}

.visual-side::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.06)),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.10));
  pointer-events: none;
}

/* =========================
   LADO LOGIN
========================= */
.form-side {
  width: 48%;
  height: 100%;
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  position: relative;
  z-index: 2;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 28%),
    linear-gradient(135deg, #050505 0%, #0d0d0d 40%, #141414 100%);
}

.login-box {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 34px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(12, 12, 12, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  position: relative;
}

.login-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand .mini {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.brand h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.95;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 8px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

input {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 0 16px;
  outline: none;
  font-size: 14px;
  transition: 0.2s ease;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

button {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.12);
}

button:active {
  transform: scale(0.99);
}

#step2 {
  display: none;
  margin-top: 14px;
}

#msg {
  min-height: 22px;
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: #d6d6d6;
}

.loader {
  width: 26px;
  height: 26px;
  margin: 14px auto 8px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.grupo-oficial {
  margin-top: 14px;
  text-align: center;
}

.grupo-oficial a {
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 2px;
  transition: 0.2s ease;
}

.grupo-oficial a:hover {
  opacity: 0.75;
}

#notificaciones {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
}

/* =========================
   TABLET
========================= */
@media (max-width: 980px) {
  .visual-side {
    width: 50%;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
  }

  .form-side {
    width: 50%;
  }

  .login-box {
    max-width: 390px;
    padding: 28px 22px;
  }
}

/* =========================
   MOVIL
========================= */
@media (max-width: 768px) {
  .split-layout {
    flex-direction: column;
  }

  .visual-side {
    width: 100%;
    height: 40%;
    clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%);
  }

  .form-side {
    width: 100%;
    height: 60%;
    margin-top: -26px;
    padding: 14px;
  }

  .login-box {
    max-width: 100%;
    padding: 24px 18px;
  }
}

@media (max-width: 480px) {
  .visual-side {
    height: 34%;
  }

  .form-side {
    height: 66%;
    margin-top: -18px;
  }

  input,
  button {
    height: 48px;
  }
}