/* =========================================================
   WIRTZ MAYORISTA · LOGIN
   ========================================================= */

:root {
  --auth-bg: #f5f5f5;
  --auth-surface: #ffffff;
  --auth-panel: #131313;
  --auth-panel-soft: #1b1b1b;

  --auth-text: #111111;
  --auth-text-soft: #5f5f5f;
  --auth-text-muted: #8a8a8a;

  --auth-light: #ffffff;
  --auth-light-soft: rgba(255, 255, 255, 0.7);
  --auth-light-muted: rgba(255, 255, 255, 0.46);

  --auth-line: #dddddd;
  --auth-line-soft: #ececec;
  --auth-line-dark: rgba(255, 255, 255, 0.12);

  --auth-accent: #e51d2a;
  --auth-accent-hover: #c91521;
  --auth-accent-soft: rgba(229, 29, 42, 0.08);

  --auth-danger: #c71d28;
  --auth-danger-bg: #fff4f5;
  --auth-danger-line: #f0c9cd;

  --auth-radius-sm: 8px;
  --auth-radius-md: 12px;
  --auth-radius-lg: 18px;

  --auth-shadow:
    0 24px 70px rgba(0, 0, 0, 0.08);

  --auth-transition:
    160ms ease;
}

/* =========================================================
   RESET
   ========================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--auth-bg);
}

body {
  min-height: 100vh;
  margin: 0;

  font-family:
    "DM Sans",
    Arial,
    sans-serif;

  background:
    var(--auth-bg);

  color:
    var(--auth-text);

  -webkit-font-smoothing:
    antialiased;

  text-rendering:
    optimizeLegibility;
}

button,
input,
a {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.auth-page {
  min-height: 100vh;
  padding: 24px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 48px));

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(420px, 0.82fr);

  overflow: hidden;

  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-lg);

  background: var(--auth-surface);

  box-shadow: var(--auth-shadow);
}

/* =========================================================
   PANEL DE MARCA
   ========================================================= */

.auth-brand-panel {
  position: relative;
  min-height: 100%;

  padding: 42px;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  color: var(--auth-light);

  background:
    linear-gradient(
      145deg,
      #111111 0%,
      #171717 52%,
      #0d0d0d 100%
    );
}

.auth-brand-panel::before {
  content: "";

  position: absolute;
  top: -140px;
  right: -160px;

  width: 420px;
  height: 420px;

  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.auth-brand-panel::after {
  content: "";

  position: absolute;
  left: -180px;
  bottom: -210px;

  width: 500px;
  height: 500px;

  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.auth-brand,
.auth-brand-content,
.auth-brand-features,
.auth-brand-footer {
  position: relative;
  z-index: 1;
}

.auth-brand {
  width: max-content;

  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-brand-logo {
  min-width: 95px;
  height: 50px;

  padding: 8px 14px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border-radius: 6px;

  background: #ffffff;
  color: #111111;
}

.auth-brand-logo span {
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -1px;
}

.auth-brand-logo small {
  margin-top: 2px;

  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.auth-brand-divider {
  width: 1px;
  height: 34px;

  background: var(--auth-line-dark);
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-brand-text strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.auth-brand-text span {
  font-size: 12px;
  color: var(--auth-light-muted);
}

.auth-brand-content {
  max-width: 540px;
  margin-top: auto;
  padding-top: 80px;
}

.auth-eyebrow,
.auth-form-kicker {
  display: block;

  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.auth-eyebrow {
  margin-bottom: 18px;

  color: #ff6872;
}

.auth-brand-content h1 {
  max-width: 520px;
  margin: 0;

  font-size: clamp(38px, 4vw, 58px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -2.6px;
}

.auth-brand-content p {
  max-width: 530px;
  margin: 24px 0 0;

  font-size: 16px;
  line-height: 1.7;

  color: var(--auth-light-soft);
}

.auth-brand-features {
  margin-top: 48px;

  display: grid;
  gap: 16px;
}

.auth-feature {
  padding: 16px 0;

  display: flex;
  align-items: flex-start;
  gap: 14px;

  border-top: 1px solid var(--auth-line-dark);
}

.auth-feature-icon {
  width: 38px;
  height: 38px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border: 1px solid var(--auth-line-dark);
  border-radius: var(--auth-radius-sm);
}

.auth-feature-icon svg {
  width: 18px;
  height: 18px;
}

.auth-feature > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-feature strong {
  font-size: 14px;
  font-weight: 700;
}

.auth-feature span {
  font-size: 12px;
  line-height: 1.5;

  color: var(--auth-light-muted);
}

.auth-brand-footer {
  margin-top: auto;
  padding-top: 50px;

  display: flex;
  justify-content: space-between;
  gap: 24px;

  font-size: 11px;
  color: var(--auth-light-muted);
}

/* =========================================================
   PANEL DEL FORMULARIO
   ========================================================= */

.auth-form-panel {
  min-width: 0;

  padding: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--auth-surface);
}

.auth-form-container {
  width: min(420px, 100%);
}

.auth-back-link {
  width: max-content;

  margin-bottom: 54px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  font-size: 13px;
  font-weight: 600;

  color: var(--auth-text-soft);

  transition:
    color var(--auth-transition),
    transform var(--auth-transition);
}

.auth-back-link:hover {
  color: var(--auth-text);
  transform: translateX(-2px);
}

.auth-back-link svg {
  width: 17px;
  height: 17px;
}

.auth-form-header {
  margin-bottom: 30px;
}

.auth-form-kicker {
  margin-bottom: 12px;

  color: var(--auth-accent);
}

.auth-form-header h2 {
  margin: 0;

  font-size: 38px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.8px;
}

.auth-form-header p {
  margin: 14px 0 0;

  font-size: 14px;
  line-height: 1.6;

  color: var(--auth-text-soft);
}

/* =========================================================
   ALERTA
   ========================================================= */

.auth-alert {
  margin-bottom: 22px;
  padding: 14px;

  display: flex;
  align-items: flex-start;
  gap: 12px;

  border: 1px solid var(--auth-danger-line);
  border-radius: var(--auth-radius-md);

  background: var(--auth-danger-bg);
  color: var(--auth-danger);
}

.auth-alert-icon {
  width: 30px;
  height: 30px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;
}

.auth-alert-icon svg {
  width: 18px;
  height: 18px;
}

.auth-alert-content {
  min-width: 0;
  flex: 1;

  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-alert-content strong {
  font-size: 13px;
  font-weight: 800;
}

.auth-alert-content span {
  font-size: 12px;
  line-height: 1.45;
}

.auth-alert-close {
  width: 28px;
  height: 28px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 6px;

  background: transparent;
  color: currentColor;

  cursor: pointer;
}

.auth-alert-close:hover {
  background: rgba(199, 29, 40, 0.08);
}

.auth-alert-close svg {
  width: 15px;
  height: 15px;
}

/* =========================================================
   FORMULARIO
   ========================================================= */

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

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 700;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.auth-label-row a {
  font-size: 12px;
  font-weight: 700;

  color: var(--auth-accent);
}

.auth-label-row a:hover {
  text-decoration: underline;
}

.auth-input-wrapper {
  position: relative;

  width: 100%;
}

.auth-input-wrapper input {
  width: 100%;
  height: 52px;

  padding:
    0
    48px
    0
    46px;

  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-sm);

  outline: none;

  background: #ffffff;
  color: var(--auth-text);

  font-size: 14px;

  transition:
    border-color var(--auth-transition),
    box-shadow var(--auth-transition),
    background-color var(--auth-transition);
}

.auth-input-wrapper input::placeholder {
  color: #a1a1a1;
}

.auth-input-wrapper input:hover {
  border-color: #c5c5c5;
}

.auth-input-wrapper input:focus {
  border-color: #878787;

  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.04);
}

.auth-input-wrapper input.is-invalid {
  border-color: var(--auth-danger);

  background: var(--auth-danger-bg);
}

.auth-input-icon {
  position: absolute;
  top: 50%;
  left: 16px;

  width: 18px;
  height: 18px;

  transform: translateY(-50%);

  color: #8a8a8a;

  pointer-events: none;
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;

  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  transform: translateY(-50%);

  border-radius: 6px;

  background: transparent;
  color: #737373;

  cursor: pointer;

  transition:
    background-color var(--auth-transition),
    color var(--auth-transition);
}

.auth-password-toggle:hover {
  background: #f2f2f2;
  color: #111111;
}

.auth-password-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-field-error {
  min-height: 16px;

  font-size: 11px;
  font-weight: 600;

  color: var(--auth-danger);
}

/* =========================================================
   CHECKBOX
   ========================================================= */

.auth-form-options {
  margin-top: -4px;
}

.auth-checkbox {
  width: max-content;

  display: inline-flex;
  align-items: center;
  gap: 9px;

  cursor: pointer;
  user-select: none;
}

.auth-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-checkbox-box {
  width: 18px;
  height: 18px;

  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border: 1px solid #bdbdbd;
  border-radius: 4px;

  background: #ffffff;

  transition:
    background-color var(--auth-transition),
    border-color var(--auth-transition);
}

.auth-checkbox-box svg {
  width: 13px;
  height: 13px;

  opacity: 0;

  color: #ffffff;
}

.auth-checkbox input:checked + .auth-checkbox-box {
  border-color: #111111;
  background: #111111;
}

.auth-checkbox input:checked + .auth-checkbox-box svg {
  opacity: 1;
}

.auth-checkbox > span:last-child {
  font-size: 12px;
  color: var(--auth-text-soft);
}

/* =========================================================
   BOTÓN
   ========================================================= */

.auth-submit {
  width: 100%;
  height: 54px;

  margin-top: 2px;
  padding: 0 18px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border-radius: var(--auth-radius-sm);

  background: #111111;
  color: #ffffff;

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;

  transition:
    background-color var(--auth-transition),
    transform var(--auth-transition),
    opacity var(--auth-transition);
}

.auth-submit:hover:not(:disabled) {
  background: #282828;
}

.auth-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.auth-submit svg {
  width: 18px;
  height: 18px;
}

.auth-submit-loading {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.auth-spinner {
  width: 16px;
  height: 16px;

  display: inline-block;

  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;

  animation:
    auth-spin 700ms linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   REGISTRO Y SOPORTE
   ========================================================= */

.auth-register {
  margin-top: 24px;
  padding-top: 22px;

  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;

  border-top: 1px solid var(--auth-line-soft);

  font-size: 12px;
  color: var(--auth-text-soft);
}

.auth-register a {
  font-weight: 800;
  color: var(--auth-text);
}

.auth-register a:hover {
  text-decoration: underline;
}

.auth-support {
  margin-top: 28px;
  padding: 15px;

  display: flex;
  align-items: flex-start;
  gap: 12px;

  border: 1px solid var(--auth-line-soft);
  border-radius: var(--auth-radius-md);

  background: #fafafa;
}

.auth-support > svg {
  width: 18px;
  height: 18px;

  flex: 0 0 auto;

  color: var(--auth-text-soft);
}

.auth-support > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-support span {
  font-size: 11px;
  color: var(--auth-text-muted);
}

.auth-support a {
  font-size: 12px;
  font-weight: 700;

  color: var(--auth-text);
}

.auth-support a:hover {
  text-decoration: underline;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
  .auth-page {
    padding: 0;
  }

  .auth-shell {
    min-height: 100vh;

    grid-template-columns: 1fr;

    border: 0;
    border-radius: 0;
  }

  .auth-brand-panel {
    min-height: auto;
    padding: 30px;
  }

  .auth-brand-content {
    margin-top: 60px;
    padding-top: 0;
  }

  .auth-brand-content h1 {
    max-width: 650px;
  }

  .auth-brand-features {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .auth-brand-footer {
    padding-top: 28px;
  }

  .auth-form-panel {
    padding: 50px 30px;
  }

  .auth-form-container {
    width: min(520px, 100%);
  }
}

@media (max-width: 720px) {
  .auth-brand-panel {
    padding: 24px;
  }

  .auth-brand-content {
    margin-top: 50px;
  }

  .auth-brand-content h1 {
    font-size: 40px;
    letter-spacing: -2px;
  }

  .auth-brand-features {
    grid-template-columns: 1fr;
  }

  .auth-brand-footer {
    flex-direction: column;
    gap: 8px;
  }

  .auth-form-panel {
    padding: 42px 22px;
  }

  .auth-back-link {
    margin-bottom: 38px;
  }

  .auth-form-header h2 {
    font-size: 34px;
  }
}

@media (max-width: 460px) {
  .auth-brand {
    gap: 10px;
  }

  .auth-brand-logo {
    min-width: 80px;
  }

  .auth-brand-text {
    display: none;
  }

  .auth-brand-divider {
    display: none;
  }

  .auth-brand-content h1 {
    font-size: 34px;
  }

  .auth-brand-content p {
    font-size: 14px;
  }

  .auth-form-panel {
    padding: 36px 18px;
  }

  .auth-label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}