/*
 * NexoU v0.2.2
 * Sistema visual inicial.
 */

:root {
  font-family: Inter, ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", sans-serif;
  color: #15213b;
  background: #f4f6fb;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button, input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .65;
  cursor: wait;
}

/* AUTENTICACIÓN */

.auth-layout {
  display: grid;
  grid-template-columns:
    minmax(350px, 1fr)
    minmax(380px, 1fr);
  min-height: 100vh;
}

.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 47px clamp(30px, 6vw, 95px);
  background:
    radial-gradient(
      circle at 84% 20%,
      #435ba9 0,
      transparent 39%
    ),
    linear-gradient(145deg, #172653, #0c1734);
  color: white;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #6277dc;
  color: white;
  font-size: 25px;
  font-weight: 900;
}

.aside-content {
  max-width: 590px;
  margin: auto 0;
  padding: 65px 0;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #b3c2ff;
}

.aside-content h1 {
  font-size: clamp(42px, 5vw, 73px);
  line-height: 1.07;
  margin: 18px 0 20px;
  letter-spacing: -2.5px;
}

.aside-content h1 span {
  color: #a9b8ff;
}

.aside-content > p:not(.eyebrow) {
  color: #d4daf1;
  font-size: 18px;
  line-height: 1.65;
}

.feature-line {
  font-size: 14px;
  margin-top: 21px;
  color: #e3e8fc;
}

.feature-line span {
  color: #b1c2ff;
  font-weight: 900;
  margin-right: 9px;
}

.aside-foot {
  font-size: 12px;
  color: #bac5e6;
}

.auth-main {
  display: grid;
  place-items: center;
  padding: 38px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.mobile-brand {
  display: none;
}

.tag {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 50px;
  background: #e8ecff;
  color: #5164c7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
}

.auth-card h2 {
  margin: 20px 0 7px;
  font-size: 33px;
  letter-spacing: -1.2px;
}

.subtitle {
  color: #66728a;
  line-height: 1.65;
}

.auth-card > .subtitle {
  margin: 0 0 29px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin: 17px 0 8px;
}

input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid #d8ddeb;
  background: white;
  color: #18243d;
}

input:focus {
  outline: 2px solid #9fb0ff;
  outline-offset: 1px;
  border-color: #6678d3;
}

.primary {
  padding: 12px 19px;
  min-height: 47px;
  border: 0;
  border-radius: 11px;
  background: #5369d1;
  color: white;
  font-weight: 750;
}

.primary:hover {
  background: #4258c1;
}

.primary.full {
  margin-top: 27px;
  width: 100%;
}

.secondary {
  min-height: 42px;
  padding: 10px 15px;
  background: white;
  color: #263657;
  border: 1px solid #d8ddeb;
  border-radius: 10px;
  font-weight: 700;
}

.switch-text {
  margin: 26px 0 10px;
  text-align: center;
  font-size: 14px;
}

.link-button {
  padding: 5px;
  border: 0;
  background: transparent;
  color: #4960c4;
  font-weight: 800;
}

.fine-print {
  margin-top: 29px;
  color: #8b95a9;
  text-align: center;
  font-size: 12px;
}

/* CARGA Y NOTIFICACIONES */

.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 85vh;
  color: #66728a;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e0e5fb;
  border-top-color: #5369d1;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  position: fixed;
  z-index: 99;
  right: 24px;
  bottom: 24px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #192747;
  color: #fff;
  box-shadow: 0 12px 35px #15213b35;
  max-width: min(430px, calc(100% - 48px));
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ESPACIO PERSONAL */

.workspace {
  min-height: 100vh;
}

.topbar {
  background: white;
  border-bottom: 1px solid #e4e8f2;
  padding:
    16px max(24px, calc((100vw - 1030px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.home {
  max-width: 1030px;
  margin: 0 auto;
  padding: 58px 24px;
}

.eyebrow-dark {
  color: #556bce;
}

.home h1 {
  font-size: clamp(29px, 5vw, 47px);
  letter-spacing: -1.5px;
  margin: 10px 0;
}

.success {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  background: #e5f6eb;
  color: #1e7048;
  padding: 13px 16px;
  margin: 22px 0;
  font-size: 13px;
  font-weight: 750;
}

.success-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ca261;
}

.panel {
  padding: 25px 28px;
  margin: 18px 0;
  border: 1px solid #e1e6f0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 25px #15213b08;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 21px;
}

.data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f2f8;
}

.data-row:last-child {
  border-bottom: 0;
}

.data-row span {
  color: #66728a;
}

.data-row strong {
  overflow-wrap: anywhere;
  text-align: right;
}

/* ERRORES */

.startup-error {
  max-width: 650px;
  margin: 10vh auto;
  padding: 30px;
  border: 1px solid #e1e6f0;
  border-radius: 18px;
  background: white;
}

.startup-error pre {
  padding: 16px;
  border-radius: 12px;
  background: #f1f3f9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.startup-error button {
  margin: 7px 8px 0 0;
}

/* RESPONSIVIDAD */

@media (max-width: 800px) {
  .auth-layout {
    display: block;
  }

  .auth-aside {
    display: none;
  }

  .auth-main {
    min-height: 100vh;
    padding: 28px 23px;
  }

  .mobile-brand {
    display: inline-flex;
    margin-bottom: 35px;
  }

  .auth-card h2 {
    font-size: 29px;
  }

  .topbar {
    padding: 13px 18px;
  }

  .home {
    padding: 36px 20px;
  }

  .data-row {
    align-items: flex-start;
  }
}