/*!
 * AuthManagerTools Bundle
 * Direitos autorais (c) 2025 Ronaldo Figueiredo (AuthManager)
 */
/** 
 * Início de css/AuthManager.core.css 
 */
/* =====================================
   AuthManagerTools - Core Theme
   Arquivo: AuthManager.core.css
   ===================================== */

:root {
  /* Cores principais */
  --am-color-bg: #f5f7fb;
  --am-color-surface: #ffffff;
  --am-color-primary: #3f51b5;
  --am-color-primary-soft: #e8eaf6;
  --am-color-accent: #ff9800;
  --am-color-text: #111827;
  --am-color-text-muted: #6b7280;
  --am-color-border: #d0d4e4;

  /* Tipografia */
  --am-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --am-font-size-base: 14px;
  --am-font-size-sm: 12px;
  --am-font-size-lg: 16px;

  /* Radius e sombra */
  --am-radius-sm: 4px;
  --am-radius-md: 8px;
  --am-radius-lg: 12px;

  --am-shadow-soft: 0 2px 6px rgba(15, 23, 42, 0.08);

  /* Espaçamentos */
  --am-spacing-xs: 4px;
  --am-spacing-sm: 8px;
  --am-spacing-md: 12px;
  --am-spacing-lg: 16px;
}

body {
  font-family: var(--am-font-family);
  font-size: var(--am-font-size-base);
  background: var(--am-color-bg);
  color: var(--am-color-text);
  margin: 0;
  padding: 16px;
}

/* Container base de “card” do framework */
.am-card {
  background: var(--am-color-surface);
  border-radius: var(--am-radius-md);
  box-shadow: var(--am-shadow-soft);
  padding: var(--am-spacing-md);
  border: 1px solid var(--am-color-border);
}

/* Título padrão de seção */
.am-title {
  margin: 0 0 var(--am-spacing-sm);
  font-size: var(--am-font-size-lg);
  font-weight: 600;
}

/* Botão padrão */
.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: var(--am-radius-sm);
  font-size: var(--am-font-size-base);
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--am-color-primary);
  color: #fff;
  gap: 6px;
}

.am-btn.secondary {
  background: var(--am-color-primary-soft);
  color: var(--am-color-primary);
}

.am-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Utilitários simples */
.am-text-right  { text-align: right; }
.am-text-center { text-align: center; }
.am-text-left   { text-align: left; }

/* GRID SIMPLES COMPATÍVEL COM row / col-X */

/* GRID SIMPLES COMPATÍVEL COM row / col-X */

.row {
  display: flex;
  flex-wrap: wrap;
  box-sizing: border-box;
}

/* opcional: espaçamento horizontal entre colunas */
.row > [class^="col-"] {
  box-sizing: border-box;
  padding: 4px;           /* você pode mudar ou remover */
}

/* colunas em 12 partes (estilo bootstrap) */
.col-1  { flex: 0 0 8.3333%;  max-width: 8.3333%; }
.col-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
.col-3  { flex: 0 0 25%;      max-width: 25%; }
.col-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-6  { flex: 0 0 50%;      max-width: 50%; }
.col-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-9  { flex: 0 0 75%;      max-width: 75%; }
.col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.col-12 { flex: 0 0 100%;     max-width: 100%; }


/** 
 * Fim de css/AuthManager.core.css 
 */
/** 
 * Início de css/AuthManager.modal.css 
 */
/* =====================================
   AuthManagerTools - Modal
   Arquivo: AuthManager.modal.css
   ===================================== */

.am-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9990;
}

.am-modal-container {
  max-height: 100%;
  max-width: 100%;
  padding: 16px;
  box-sizing: border-box;
}

.am-modal-dialog {
  background: var(--am-color-surface, #ffffff);
  border-radius: var(--am-radius-lg, 12px);
  box-shadow: var(--am-shadow-soft, 0 2px 6px rgba(15, 23, 42, 0.08));
  border: 1px solid var(--am-color-border, #d0d4e4);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
}

/* Tamanhos */
.am-modal-sm  { width: 360px;  max-width: 100%; }
.am-modal-md  { width: 480px;  max-width: 100%; }
.am-modal-lg  { width: 720px;  max-width: 100%; }
.am-modal-xl  { width: 960px;  max-width: 100%; }
.am-modal-full{
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* Header */
.am-modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--am-color-border, #d0d4e4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.am-modal-title {
  margin: 0;
  font-size: var(--am-font-size-lg, 16px);
  font-weight: 600;
}

.am-modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--am-color-text-muted, #6b7280);
}

/* Body */
.am-modal-body {
  padding: 12px 16px;
  overflow: auto;
}

/* Footer */
.am-modal-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--am-color-border, #d0d4e4);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Botões variantes extra para modal */
.am-btn.danger {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}

.am-btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--am-color-text, #111827);
}

/* Prompt input */
.am-modal-prompt p {
  margin: 0 0 8px;
  font-size: var(--am-font-size-base, 14px);
}

.am-modal-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: var(--am-radius-sm, 4px);
  border: 1px solid var(--am-color-border, #d0d4e4);
  font-size: var(--am-font-size-base, 14px);
}

/** 
 * Fim de css/AuthManager.modal.css 
 */
/** 
 * Início de css/AuthManager.layout.css 
 */
/* =====================================
   AuthManagerTools - Layout
   Arquivo: AuthManager.layout.css
   ===================================== */

html, body {
  height: 100%;
}

body {
  margin: 0;
}

/* Layout raiz */
.am-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: var(--am-color-bg, #f5f7fb);
  color: var(--am-color-text, #111827);
  font-family: var(--am-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif);
}

/* Sidebar (modo menu lateral) */
.am-layout-sidebar {
  width: 230px;
  max-width: 260px;
  min-width: 200px;
  background: #020617;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
}

/* Brand */
.am-layout-brand {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.am-layout-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--am-color-primary, #3f51b5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #e5e7eb;
}

.am-layout-brand-text {
  display: flex;
  flex-direction: column;
}

.am-layout-brand-title {
  font-size: 14px;
  font-weight: 600;
}

.am-layout-brand-subtitle {
  font-size: 11px;
  color: #9ca3af;
}

/* Menu lateral */
.am-layout-menu {
  padding: 8px 6px;
  flex: 1;
  overflow-y: auto;
}

.am-layout-menu-group-label {
  padding: 8px 10px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.am-layout-menu-item {
  border-radius: 6px;
  margin: 2px 4px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #e5e7eb;
}

.am-layout-menu-item:hover {
  background: rgba(148, 163, 184, 0.2);
}

.am-layout-menu-item.active {
  background: rgba(59, 130, 246, 0.2);
  color: #ffffff;
}

.am-layout-menu-icon {
  width: 18px;
  text-align: center;
}

/* Rodapé da sidebar (usuário) */
.am-layout-sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.am-layout-user-name {
  font-weight: 500;
}

.am-layout-user-role {
  font-size: 11px;
  color: #9ca3af;
}

.am-layout-user-info {
  display: flex;
  flex-direction: column;
}

.am-layout-logout-btn {
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 2px 8px;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
}

/* Área principal */
.am-layout-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.am-layout-header {
  position: relative;
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--am-color-border, #d0d4e4);
  background: var(--am-color-surface, #ffffff);
  z-index: 10;
}

/* Header: esquerda (título) */
.am-layout-header-left {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

/* Header: título / subtítulo */
.am-layout-header-title {
  font-size: 15px;
  font-weight: 600;
}

.am-layout-header-subtitle {
  font-size: 12px;
  color: var(--am-color-text-muted, #6b7280);
}

/* Header: menu no topo (modo menu top) */
.am-layout-header-menu {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 16px;
}

/* Wrapper de item de menu no topo (simples ou dropdown) */
.am-layout-header-menu-wrapper {
  position: relative;
}

/* Botão simples do menu top */
.am-layout-header-menu-item {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  color: var(--am-color-text-muted, #6b7280);
  white-space: nowrap;
}

.am-layout-header-menu-item:hover {
  background: var(--am-color-border-soft, #e5e7eb);
  color: var(--am-color-text, #111827);
}

.am-layout-header-menu-item.active {
  background: var(--am-color-primary-soft, #e8eaf6);
  color: var(--am-color-primary, #3f51b5);
  font-weight: 600;
}

/* Dropdown: botão raiz + seta */
.am-layout-header-menu-item-root {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Seta do dropdown */
.am-layout-header-menu-caret {
  font-size: 10px;
}

/* Wrapper específico de dropdown */
.am-layout-header-menu-dropdown {
  position: relative;
}

/* Submenu dropdown */
.am-layout-header-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: var(--am-color-surface, #ffffff);
  border-radius: 8px;
  border: 1px solid var(--am-color-border, #d0d4e4);
  box-shadow: var(--am-shadow-soft, 0 4px 10px rgba(15, 23, 42, 0.12));
  min-width: 180px;
  padding: 4px 0;
  display: none;
  z-index: 999;
}

.am-layout-header-menu-dropdown.open .am-layout-header-submenu {
  display: block;
}

/* Itens do submenu */
.am-layout-header-submenu-item {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 12px;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--am-color-text, #111827);
}

.am-layout-header-submenu-item:hover {
  background: var(--am-color-border-soft, #e5e7eb);
}

/* Item ativo no submenu (opcional destaque) */
.am-layout-header-submenu-item.active {
  background: var(--am-color-primary-soft, #e8eaf6);
  color: var(--am-color-primary, #3f51b5);
}

/* Header: direita (ações) */
.am-layout-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* Conteúdo */
.am-layout-content {
  flex: 1;
  padding: 12px 16px;
  overflow: auto;
}

/* Responsivo básico: encolher sidebar em telas menores (apenas modo side) */
@media (max-width: 900px) {
  .am-layout-sidebar {
    width: 190px;
  }
}

@media (max-width: 700px) {
  .am-layout {
    flex-direction: column;
  }
  .am-layout-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: stretch;
  }
  .am-layout-menu {
    display: flex;
    flex-wrap: wrap;
    padding: 4px;
  }
  .am-layout-menu-item {
    flex: 1 1 120px;
  }
  .am-layout-sidebar-footer {
    display: none;
  }
}

/** 
 * Fim de css/AuthManager.layout.css 
 */
/** 
 * Início de css/AuthManager.ui.css 
 */
/* ===========================
   BOTÕES
   =========================== */

.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.am-btn-block {
  width: 100%;
}

/* Tamanhos */
.am-btn-size-sm {
  font-size: 12px;
  padding: 4px 10px;
}

.am-btn-size-md {
  font-size: 13px;
  padding: 6px 12px;
}

.am-btn-size-lg {
  font-size: 14px;
  padding: 8px 14px;
}

/* Temas */
.am-btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.am-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.am-btn-secondary {
  background: #6b7280;
  border-color: #6b7280;
  color: #ffffff;
}

.am-btn-secondary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

.am-btn-success {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.am-btn-success:hover {
  background: #15803d;
  border-color: #15803d;
}

.am-btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.am-btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.am-btn-warning {
  background: #f97316;
  border-color: #f97316;
  color: #111827;
}

.am-btn-warning:hover {
  background: #ea580c;
  border-color: #ea580c;
}

.am-btn-info {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #0f172a;
}

.am-btn-info:hover {
  background: #0284c7;
  border-color: #0284c7;
}

.am-btn-light {
  background: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.am-btn-light:hover {
  background: #f9fafb;
}

.am-btn-dark {
  background: #111827;
  border-color: #111827;
  color: #f9fafb;
}

.am-btn-dark:hover {
  background: #020617;
}

/* Estado disabled */
.am-btn:disabled,
.am-btn-disabled {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* Ícones */
.am-btn-icon-left,
.am-btn-icon-right {
  display: inline-flex;
  align-items: center;
}

/* ===========================
   BORDAS ARREDONDADAS
   =========================== */

.am-rounded-sm {
  border-radius: 4px;
}

.am-rounded-md {
  border-radius: 6px;
}

.am-rounded-lg {
  border-radius: 999px; /* estilo pill */
}

.am-rounded-full {
  border-radius: 9999px;
}

/* ===========================
   INPUTS / SELECTS
   =========================== */

.am-input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.am-input-label {
  font-size: 11px;
  font-weight: 500;
  color: #4b5563;
  margin-bottom: 3px;
}

.am-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.am-input,
.am-select {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
  color: #111827;
  outline: none;
}

/* Tamanhos */
.am-input-size-sm {
  font-size: 12px;
  padding: 4px 6px;
}

.am-input-size-md {
  font-size: 13px;
  padding: 6px 8px;
}

.am-input-size-lg {
  font-size: 14px;
  padding: 8px 10px;
}

/* Temas */
.am-input-theme-default {
  /* já padrão */
}

.am-input-theme-light {
  background-color: #f9fafb;
}

.am-input-theme-underline {
  border: none;
  border-bottom: 1px solid #d1d5db;
  border-radius: 0;
}

/* Focus */
.am-input:focus,
.am-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* Ícones de input */
.am-input-icon-left,
.am-input-icon-right {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #9ca3af;
  pointer-events: none;
}

.am-input-icon-left {
  left: 8px;
}

.am-input-icon-right {
  right: 8px;
}

/* Se tiver ícone, dá padding extra no input */
.am-input-wrapper .am-input {
  padding-left: 8px;
  padding-right: 8px;
}

.am-input-wrapper .am-input-icon-left + .am-input {
  padding-left: 24px;
}

.am-input-wrapper .am-input + .am-input-icon-right {
  margin-left: -24px;
}

.am-input-wrapper .am-input-icon-left + .am-input + .am-input-icon-right {
  padding-right: 24px;
}

/* ===========================
   DATE / TIME
   =========================== */

.am-input-date::-webkit-calendar-picker-indicator,
.am-input-time::-webkit-calendar-picker-indicator {
  cursor: pointer;
}

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

.am-checkbox-wrapper {
  margin-bottom: 8px;
}

.am-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
}

/* Esconde o input nativo visualmente */
.am-checkbox-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Caixinha custom */
.am-checkbox-box {
  width: 16px;
  height: 16px;
  border: 1px solid #9ca3af;
  background: #ffffff;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Marcação (check) */
.am-checkbox-input:checked + .am-checkbox-box {
  background: #2563eb;
  border-color: #2563eb;
}

.am-checkbox-input:checked + .am-checkbox-box::after {
  content: '✓';
  font-size: 11px;
  color: #ffffff;
}

/* Texto */
.am-checkbox-text {
  font-size: 13px;
}

/* Curvatura diferente se quiser */
.am-checkbox-input.am-rounded-sm + .am-checkbox-box {
  border-radius: 4px;
}
.am-checkbox-input.am-rounded-md + .am-checkbox-box {
  border-radius: 6px;
}
.am-checkbox-input.am-rounded-lg + .am-checkbox-box,
.am-checkbox-input.am-rounded-full + .am-checkbox-box {
  border-radius: 999px;
}

/* ===== GRID NATIVO ===== */
.am-row {
  display: flex;
  flex-wrap: wrap;
}

/* gaps (em rem) */
.am-gap-0 { gap: 0; }
.am-gap-1 { gap: 0.25rem; }
.am-gap-2 { gap: 0.5rem; }
.am-gap-3 { gap: 0.75rem; }
.am-gap-4 { gap: 1rem; }
.am-gap-5 { gap: 1.25rem; }
.am-gap-6 { gap: 1.5rem; }

/* col padrão: ocupa o espaço disponível */
.am-col {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
}

/* col numéricas em 12 colunas */
.am-col-1  { flex: 0 0 8.3333%;  max-width: 8.3333%; }
.am-col-2  { flex: 0 0 16.6667%; max-width: 16.6667%; }
.am-col-3  { flex: 0 0 25%;      max-width: 25%; }
.am-col-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
.am-col-5  { flex: 0 0 41.6667%; max-width: 41.6667%; }
.am-col-6  { flex: 0 0 50%;      max-width: 50%; }
.am-col-7  { flex: 0 0 58.3333%; max-width: 58.3333%; }
.am-col-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
.am-col-9  { flex: 0 0 75%;      max-width: 75%; }
.am-col-10 { flex: 0 0 83.3333%; max-width: 83.3333%; }
.am-col-11 { flex: 0 0 91.6667%; max-width: 91.6667%; }
.am-col-12 { flex: 0 0 100%;     max-width: 100%; }

/* ===== CARDS / PAINÉIS / HEADER ===== */
.am-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.am-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.am-card-header-main {
  display: flex;
  flex-direction: column;
}

.am-card-title {
  font-size: 15px;
  font-weight: 600;
}

.am-card-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.am-card-header-actions {
  display: flex;
  gap: 8px;
}

.am-card-body {
  font-size: 13px;
}

.am-card-footer {
  margin-top: 12px;
  font-size: 12px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
}

/* painel com destaque lateral */
.am-panel {
  border-left: 3px solid #2563eb;
}

/* header de página */
.am-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.am-page-header-main {
  display: flex;
  flex-direction: column;
}

.am-page-title {
  font-size: 20px;
  font-weight: 600;
}

.am-page-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
}

.am-page-header-actions {
  display: flex;
  gap: 8px;
}

/* ===========================
   AUTOSUGGEST / AUTOCOMPLETE
   =========================== */

.am-autosuggest {
  position: relative;
}

.am-autosuggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
  border: 1px solid #e5e7eb;
  z-index: 30;
  font-size: 13px;
  display: none;
}

.am-autosuggest-item {
  padding: 6px 8px;
  cursor: pointer;
}

.am-autosuggest-item:hover {
  background: #e5e7eb;
}

.am-autosuggest-empty {
  padding: 6px 8px;
  font-size: 12px;
  color: #6b7280;
}

/* =====================================================================
   AuthManagerTools - Progress Modal (Integrado ao AuthManager.ui.css)
   ===================================================================== */

.sva-progress-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.sva-progress-card {
    width: min(520px, 92vw);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
    max-height: 90vh;
    box-sizing: border-box;
}

.sva-progress-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 600;
}

.sva-progress-header p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
}

/* Barra de progresso */
.sva-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.sva-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #22d3ee);
    transition: width 0.2s ease;
}

/* Log */
.sva-progress-log {
    flex: 1;
    min-height: 140px;
    max-height: 280px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    overflow-y: auto;
    font-size: 0.85rem;
    color: #334155;
}

.sva-progress-log .entry {
    margin-bottom: 6px;
}

.sva-progress-log .entry.error {
    color: #b91c1c;
}

.sva-progress-log .entry.success {
    color: #15803d;
}

/* Resumo final */
.sva-progress-summary {
    font-size: 0.9rem;
    color: #0f172a;
    font-weight: 600;
}

/* Rodapé / botão fechar */
.sva-progress-footer {
    display: none;
    justify-content: flex-end;
    margin-top: 8px;
}

/** 
 * Fim de css/AuthManager.ui.css 
 */
/** 
 * Início de css/AuthManager.form.css 
 */
/* =====================================
   AuthManagerTools - Form
   Arquivo: AuthManager.form.css
   ===================================== */

.am-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--am-font-family, system-ui);
  font-size: var(--am-font-size-base, 14px);
}

/* Linha de formulário (pode ser usada em grid futuramente) */
.am-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.am-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 180px;
}

/* Label */
.am-form-label {
  font-weight: 500;
  color: var(--am-color-text, #111827);
}

/* Campo obrigatório */
.am-form-label .am-form-required {
  color: #dc2626;
  margin-left: 4px;
}

/* Inputs base */
.am-form-control,
.am-form-select,
.am-form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border-radius: var(--am-radius-sm, 4px);
  border: 1px solid var(--am-color-border, #d0d4e4);
  font-size: var(--am-font-size-base, 14px);
  font-family: inherit;
  background: #ffffff;
  color: var(--am-color-text, #111827);
}

.am-form-control:focus,
.am-form-select:focus,
.am-form-textarea:focus {
  outline: none;
  border-color: var(--am-color-primary, #3f51b5);
  box-shadow: 0 0 0 1px var(--am-color-primary-soft, #e8eaf6);
}

/* Textarea */
.am-form-textarea {
  min-height: 70px;
  resize: vertical;
}

/* Mensagem de ajuda */
.am-form-help {
  font-size: var(--am-font-size-sm, 12px);
  color: var(--am-color-text-muted, #6b7280);
}

/* Mensagem de erro */
.am-form-error {
  font-size: var(--am-font-size-sm, 12px);
  color: #dc2626;
}

/* Grupo com erro */
.am-form-group.has-error .am-form-control,
.am-form-group.has-error .am-form-select,
.am-form-group.has-error .am-form-textarea {
  border-color: #dc2626;
}

/* Linha de ações (botões) */
.am-form-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.am-input-error {
  border-color: #dc2626 !important;
  background: #fee2e2 !important;
}

.am-input-valid {
  border-color: #16a34a !important;
  background: #ecfdf3 !important;
}

/** 
 * Fim de css/AuthManager.form.css 
 */
/** 
 * Início de css/AuthManager.table.css 
 */
/* =====================================
   AuthManagerTools - Dynamic Table
   Arquivo: AuthManager.table.css
   ===================================== */

.am-table-wrapper {
  margin-top: var(--am-spacing-sm);
  overflow-x: auto;
}

/* Tabela */
.am-table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  background: var(--am-color-surface);
  border-radius: var(--am-radius-md);
  box-shadow: var(--am-shadow-soft);
}

.am-table th,
.am-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Cabeçalho */
.am-table thead th {
  background: var(--am-color-primary-soft);
  border-bottom: 1px solid var(--am-color-border);
  padding: var(--am-spacing-sm) var(--am-spacing-md);
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

/* Corpo */
.am-table tbody td {
  border-bottom: 1px solid var(--am-color-border);
  padding: var(--am-spacing-sm) var(--am-spacing-md);
}

/* Zebra */
.am-table tbody tr:nth-child(even) {
  background: #f9fbff;
}

/* Hover */
.am-table tbody tr:hover {
  background: #eef2ff;
}

.am-table tbody tr {
  cursor: pointer;
}

/* Linha selecionada */
.am-row-selected {
  background: #dbeafe !important;
}

/* Rodapé */
.am-table tfoot td {
  background: #f3f4f6;
  padding: var(--am-spacing-sm) var(--am-spacing-md);
  font-weight: 600;
  border-top: 1px solid var(--am-color-border);
}

/* Paginação */
.am-pagination {
  margin-top: var(--am-spacing-sm);
  font-size: var(--am-font-size-sm);
  display: flex;
  align-items: center;
  gap: var(--am-spacing-sm);
}

/* Filtros */
.am-table-filters th {
  background: #eef2ff;
  border-bottom: 1px solid var(--am-color-border);
  padding: var(--am-spacing-xs) calc(var(--am-spacing-sm) + 2px);
}

.am-input-filter{
  width: calc(100% - 4px);
  max-width: 90%;
  box-sizing: border-box;
  font-size: var(--am-font-size-sm);
  padding: 3px 6px;
  border-radius: var(--am-radius-sm);
  border: 1px solid #94a3b8;
  background: #ffffff;
  margin: 0 2px;
}

.am-table-filter-input,
.am-table-filter-select {
  width: calc(100% - 4px);
  max-width: 90%;
  box-sizing: border-box;
  font-size: var(--am-font-size-sm);
  padding: 3px 6px;
  border-radius: var(--am-radius-sm);
  border: 1px solid #94a3b8;
  background: #ffffff;
  margin: 0 2px;
}

.am-table-filter-input {
  margin-right: 2px;
}

/* =====================================
   Sticky Header
   ===================================== */

.am-table-fixed-header {
  border-collapse: separate;
  border-spacing: 0;
}

.am-table-fixed-header thead {
  position: sticky;
  top: 0;
  z-index: 3;
}

.am-table-fixed-header thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--am-color-primary-soft, #e5e7ff);
}

/* =====================================
   Sticky Footer
   ===================================== */

.am-table-fixed-footer {
  border-collapse: separate;
  border-spacing: 0;
}

.am-table-fixed-footer tfoot {
  position: sticky;
  bottom: 0;
  z-index: 3;
}

.am-table-fixed-footer tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #f3f4f6;
}

/* =====================================
   Badge / animação de rodapé do AuthManager
   ===================================== */

.am-table-brand-banner {
  position: fixed;
  bottom: 8px;
  right: 16px;
  font-size: 10pt;
  font-family: var(--am-font-family, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif);

  background: #2563eb; /* azul */
  color: #ffffff;      /* texto branco */
  border: 1px solid rgba(15, 23, 42, 0.4);
  border-radius: 6px;

  padding: 4px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
  z-index: 9999;
  pointer-events: none;

  /* começa fora da tela, à direita */
  transform: translateX(120%);
  opacity: 0;

  /* transição suave, sem afetar layout (sem overflow) */
  transition: transform 0.35s ease-out, opacity 0.35s ease-out;
}

.am-table-brand-banner--visible {
  transform: translateX(0);
  opacity: 1;
}

.am-table-brand-banner--hide {
  transform: translateX(140%);
  opacity: 0;
}

/** 
 * Fim de css/AuthManager.table.css 
 */
/** 
 * Início de css/AuthManager.progress.css 
 */
/* ===============================
   AuthManagerTools - Progress Modal
   Arquivo: AuthManager.progress.css
   =============================== */

.sva-progress-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.sva-progress-card {
    width: min(520px, 92vw);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
    max-height: 90vh;
    box-sizing: border-box;
}

.sva-progress-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.sva-progress-header p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
}

/* Barra de progresso */
.sva-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.sva-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #22d3ee);
    transition: width 0.2s ease;
}

/* Log */
.sva-progress-log {
    flex: 1;
    min-height: 140px;
    max-height: 280px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    overflow-y: auto;
    font-size: 0.85rem;
}

.sva-progress-log .entry {
    margin-bottom: 6px;
    color: #334155;
}

.sva-progress-log .entry.error {
    color: #b91c1c;
}

.sva-progress-log .entry.success {
    color: #15803d;
}

/* Resumo final */
.sva-progress-summary {
    font-size: 0.9rem;
    color: #0f172a;
    font-weight: 600;
}

/* Rodapé / botão fechar */
.sva-progress-footer {
    display: none;
    justify-content: flex-end;
    margin-top: 8px;
}

/** 
 * Fim de css/AuthManager.progress.css 
 */