body.is-auth-mode {
  display: grid;
  place-items: center;
}

.auth-shell {
  min-height: calc(100vh - 44px);
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.auth-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-card__logo {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel-3) 100%);
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(22, 33, 58, 0.98) 100%), url('../img/logo_sgac_transparente.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 58px;
}

.auth-card__eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-card__title {
  font-size: 1.85rem;
  line-height: 1.15;
  margin-bottom: 8px;
}

.auth-card__description {
  color: var(--text-soft);
  line-height: 1.55;
}

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

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.auth-field input {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 0 16px;
  background: var(--panel-soft);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.auth-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: #fff;
}

.auth-message {
  min-height: 22px;
  font-size: 0.94rem;
  color: var(--text-soft);
}

.auth-message.is-error {
  color: var(--danger);
}

.auth-message.is-success {
  color: var(--success);
}

.auth-submit {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), opacity var(--transition);
}

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

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

.sidebar__footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.14);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar__session {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.88rem;
}

.sidebar__session strong {
  color: #fff;
  font-size: 0.92rem;
}

.sidebar__session span {
  overflow-wrap: anywhere;
}

.sidebar__logout {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.sidebar__logout:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .auth-shell {
    min-height: calc(100dvh - 28px);
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 22px;
    border-radius: 24px;
    gap: 18px;
  }

  .auth-card__brand {
    align-items: flex-start;
  }

  .auth-card__logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background-size: 46px;
  }

  .auth-card__title {
    font-size: 1.5rem;
  }
}

.sidebar__session[hidden] {
  display: none;
}
