/* ==========================================================================
   AMOR D+ | ESTILOS DO SISTEMA DE AUTENTICAÇÃO, AUDITORIA & PAINEL DEV
   ========================================================================== */

/* Fullscreen Auth Barrier Overlay */
#auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(12px);
}

#auth-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.auth-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: 480px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: authCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authCardPop {
  from {
    transform: translateY(20px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.auth-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-full);
  margin-bottom: 0.25rem;
}

.auth-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-600);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
}

.auth-brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-900);
}

.auth-brand-name .plus {
  color: var(--brand-600);
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-900);
  margin: 0;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 1rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--primary-900);
  background: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-input:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.auth-password-toggle {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-password-toggle:hover {
  color: var(--primary-900);
}

.auth-error-alert {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  align-items: center;
  gap: 0.5rem;
}

.auth-error-alert.show {
  display: flex;
}

.auth-btn-submit {
  width: 100%;
  padding: 0.85rem;
  background: var(--brand-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.4);
}

/* Quick Demo Profile Selectors */
.auth-quick-selector {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.auth-quick-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.auth-quick-btn {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.auth-quick-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.auth-quick-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.auth-quick-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-quick-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-quick-role {
  font-size: 0.65rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Topbar User Indicator & Logout */
.topbar-user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.6rem 0.25rem 0.35rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
}

.topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}

.topbar-user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-900);
}

.topbar-user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.btn-logout {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #ef4444;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-logout:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Sidebar Dev Nav Item Highlight */
.nav-item-dev {
  position: relative;
  background: rgba(15, 23, 42, 0.04);
  border: 1px dashed rgba(15, 23, 42, 0.2);
}

.nav-item-dev .nav-badge-dev {
  background: #0f172a;
  color: #38bdf8;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  margin-left: auto;
}
