/* Auth pages — standalone, visual limpo e centralizado */
:root {
  --auth-bg: #f4f5f7;
  --auth-card: #ffffff;
  --auth-border: #e5e7eb;
  --auth-text: #111827;
  --auth-muted: #6b7280;
  --auth-primary: #111827;
  --auth-primary-hover: #1f2937;
  --auth-focus: #2563eb;
  --auth-danger-bg: #fef2f2;
  --auth-danger-text: #991b1b;
  --auth-danger-border: #fecaca;
  --auth-ok-bg: #f0fdf4;
  --auth-ok-text: #166534;
  --auth-ok-border: #bbf7d0;
  --auth-radius: 16px;
  --auth-shadow: 0 16px 40px rgba(17, 24, 39, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body.auth-body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--auth-text);
  background:
    radial-gradient(900px 480px at 50% -20%, #e8eef8, transparent 60%),
    var(--auth-bg);
}

.auth-shell {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.auth-brand img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.auth-card {
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  padding: 1.75rem 1.5rem;
}

.auth-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
}

.auth-subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--auth-muted);
  text-align: center;
}

.auth-form {
  margin-top: 1.35rem;
  display: grid;
  gap: 1rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--auth-text);
}

.auth-input {
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  background: #fff;
  color: var(--auth-text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
  border-color: var(--auth-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.auth-input::placeholder {
  color: #9ca3af;
}

/* E-mail: parte local + domínio corporativo fixo */
.auth-email-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 2.75rem;
}

.auth-email-group__input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border-radius: 10px 0 0 10px;
  border-right: none;
}

.auth-email-group__input:focus {
  z-index: 1;
  position: relative;
}

.auth-email-group__suffix {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 0.85rem;
  border: 1px solid var(--auth-border);
  border-radius: 0 10px 10px 0;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  user-select: none;
}

.auth-email-group:focus-within .auth-email-group__suffix {
  border-color: var(--auth-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--auth-muted);
}

.auth-hint strong {
  color: var(--auth-text);
  font-weight: 650;
}

.auth-error {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--auth-danger-text);
}

.auth-alert {
  border-radius: 10px;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.auth-alert--error {
  background: var(--auth-danger-bg);
  color: var(--auth-danger-text);
  border-color: var(--auth-danger-border);
}

.auth-alert--success {
  background: var(--auth-ok-bg);
  color: var(--auth-ok-text);
  border-color: var(--auth-ok-border);
}

.auth-alert--info {
  background: #f9fafb;
  color: var(--auth-muted);
  border-color: var(--auth-border);
}

.auth-actions-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.25rem;
}

.auth-link {
  color: #2563eb;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 2.85rem;
  border: none;
  border-radius: 10px;
  background: var(--auth-primary);
  color: #f9fafb;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease;
}

.auth-btn:hover {
  background: var(--auth-primary-hover);
  color: #f9fafb;
}

.auth-btn:active {
  transform: translateY(1px);
}

.auth-btn--secondary {
  background: #fff;
  color: var(--auth-text);
  border: 1px solid var(--auth-border);
}

.auth-btn--secondary:hover {
  background: #f9fafb;
  color: var(--auth-text);
}

.auth-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--auth-muted);
}

.auth-stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.auth-icon-wrap {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: var(--auth-text);
  font-size: 1.15rem;
}

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

/* —— Auth panel: um único card (form + ilustração desktop) —— */
.auth-login {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.auth-login__panel {
  width: 100%;
  max-width: 420px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  overflow: hidden;
  animation: auth-card-in 0.4s ease-out both;
}

@media (min-width: 860px) {
  .auth-login__panel {
    max-width: 900px;
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  }
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-login__form {
  padding: 2rem 1.6rem 1.5rem;
}

.auth-login__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.auth-login__logo img {
  height: 68px;
  width: auto;
  object-fit: contain;
}

.auth-login__card-head {
  text-align: center;
}

.auth-login__card-head h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-login__card-head p {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--auth-muted);
  line-height: 1.45;
}

/* Ilustração só no desktop */
.auth-login__art {
  display: none;
}

@media (min-width: 860px) {
  .auth-login__art {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.75rem;
    background: #f8fafc;
    border-left: 1px solid var(--auth-border);
  }
}

.auth-login__art img {
  width: min(100%, 380px);
  height: auto;
  display: block;
}

.auth-login__art-caption {
  margin: 0.85rem 0 0;
  max-width: 28ch;
  font-size: 0.9rem;
  color: var(--auth-muted);
  line-height: 1.4;
}

.auth-login__card-foot {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--auth-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--auth-muted);
}

.auth-login__card-foot a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

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

/* —— Acesso negado (fora da rede) —— */
body.auth-body--denied {
  background:
    radial-gradient(900px 520px at 50% -18%, #fee2e2, transparent 58%),
    radial-gradient(700px 400px at 100% 100%, #eef2ff, transparent 50%),
    var(--auth-bg);
}

.auth-denied__panel {
  max-width: 420px;
}

@media (min-width: 860px) {
  .auth-denied__panel {
    max-width: 920px;
  }
}

.auth-denied__illu-mobile {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 1rem;
}

.auth-denied__illu-mobile img {
  width: min(100%, 220px);
  height: auto;
}

@media (min-width: 860px) {
  .auth-denied__illu-mobile {
    display: none;
  }
}

.auth-denied__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 auto 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-denied__badge i {
  font-size: 0.8rem;
}

.auth-denied__head {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-denied__head h1 {
  color: #111827;
}

.auth-denied__hints {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.auth-denied__hints li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--auth-border);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #374151;
}

.auth-denied__hints i {
  margin-top: 0.15rem;
  color: #2563eb;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.auth-denied__actions {
  margin-top: 1.35rem;
}

.auth-denied__art {
  background:
    linear-gradient(165deg, #fff7f7 0%, #f8fafc 48%, #eef2ff 100%);
}

.auth-denied__art img {
  width: min(100%, 320px);
}

.auth-denied__art .auth-login__art-caption a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.auth-denied__art .auth-login__art-caption a:hover {
  text-decoration: underline;
}
