/* =========================================================
   LOGIN
   ========================================================= */

.auth-body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(214, 161, 47, 0.08),
      transparent 32%
    ),
    var(--workspace-bg);
}

.auth-center {
  width: 100%;
  min-height: 100vh;
  padding: 28px;

  display: grid;
  place-items: center;
}

.auth-login-card {
  width: min(100%, 410px);
  padding: 30px;

  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-login-header {
  margin-bottom: 24px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  margin-bottom: 28px;
}

.auth-logo-mark {
  width: 46px;
  height: 46px;

  display: grid;
  place-items: center;

  color: #0b1018;
  background:
    linear-gradient(
      135deg,
      var(--gold),
      var(--gold-2)
    );

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

  clip-path:
    polygon(
      50% 0%,
      94% 24%,
      94% 76%,
      50% 100%,
      6% 76%,
      6% 24%
    );

  box-shadow:
    0 12px 26px
    rgba(214, 161, 47, 0.18);
}

.auth-logo-copy {
  min-width: 0;
}

.auth-logo-name {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.17em;
}

.auth-logo-name span {
  color: var(--gold);
}

.auth-logo-subtitle {
  margin-top: 6px;

  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-heading {
  text-align: center;
}

.auth-heading > span {
  display: block;
  margin-bottom: 8px;

  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.auth-heading h1 {
  margin: 0 0 8px;

  color: var(--text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.auth-heading p {
  margin: 0;

  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field label {
  display: block;
  margin-bottom: 7px;

  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.auth-field .form-control,
.auth-field input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 13px;

  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;

  color: var(--text);
  background: var(--field-bg);

  font-size: 13px;

  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.auth-field .form-control:focus,
.auth-field input:focus {
  border-color: rgba(214, 161, 47, 0.55);

  box-shadow:
    0 0 0 3px
    rgba(214, 161, 47, 0.09);
}

.auth-field input::placeholder {
  color: var(--muted-2);
}

.auth-field-errors {
  margin-top: 6px;

  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
}

.auth-field-errors span {
  display: block;
}

.auth-login-button {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;

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

  border: 0;
  border-radius: 10px;

  color: #0b1018;
  background:
    linear-gradient(
      135deg,
      var(--gold),
      var(--gold-2)
    );

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

  box-shadow:
    0 10px 22px
    rgba(214, 161, 47, 0.14);

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.auth-login-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);

  box-shadow:
    0 13px 26px
    rgba(214, 161, 47, 0.2);
}

.auth-login-button:active {
  transform: translateY(0);
}

.auth-login-button:focus-visible {
  outline: 2px solid rgba(214, 161, 47, 0.6);
  outline-offset: 3px;
}

.auth-login-footer {
  margin-top: 22px;
  padding-top: 18px;

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

  color: var(--muted-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.auth-messages {
  margin-bottom: 18px;
}

.auth-message {
  padding: 10px 12px;

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

  color: var(--text);
  background: var(--surface-2);

  font-size: 12px;
  line-height: 1.45;
}

.auth-message.success {
  color: var(--success);
  border-color: rgba(6, 118, 71, 0.25);
  background: rgba(6, 118, 71, 0.08);
}

.auth-message.error {
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.25);
  background: rgba(180, 35, 24, 0.08);
}

.auth-form-error {
  margin-bottom: 18px;
  padding: 11px 12px;

  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: 9px;

  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);

  font-size: 12px;
  line-height: 1.45;
}

.auth-form-error p {
  margin: 0;
}

/* Oculta el diseño anterior de dos columnas */

.auth-shell,
.auth-brand-panel,
.auth-form-panel,
.auth-card {
  all: unset;
}

/* =========================================================
   CERRAR SESIÓN EN SIDEBAR
   ========================================================= */

.session-logout {
  width: 100%;
  min-height: 39px;
  margin-top: 8px;
  padding: 0 10px;

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

  border: 1px solid transparent;
  border-radius: 9px;

  color: var(--sidebar-muted);
  background: transparent;

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

  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

.session-logout-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;

  color: var(--sidebar-muted);
  background: rgba(255, 255, 255, 0.025);
}

.session-logout-icon svg {
  width: 15px;
  height: 15px;

  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.session-logout:hover {
  color: #ffffff;

  border-color: rgba(214, 161, 47, 0.13);
  background: rgba(214, 161, 47, 0.06);
}

.session-logout:hover .session-logout-icon {
  color: var(--gold-2);

  border-color: rgba(214, 161, 47, 0.2);
  background: rgba(214, 161, 47, 0.08);
}

.session-logout:focus-visible {
  outline: 2px solid rgba(214, 161, 47, 0.45);
  outline-offset: 2px;
}

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

@media (max-width: 520px) {
  .auth-center {
    padding: 18px;
  }

  .auth-login-card {
    padding: 24px 20px;
    border-radius: 15px;
  }

  .auth-logo {
    margin-bottom: 24px;
  }

  .auth-heading h1 {
    font-size: 23px;
  }
}

/* Identidad oficial SYSIUS */

.auth-logo {
  min-height: 66px;
  margin-bottom: 26px;
}

.auth-logo-mark,
.auth-logo-copy {
  display: none;
}

