/* Admin - Sidebar com barra separadora */
.admin-sidebar {
  border-right: 1px solid rgba(148, 163, 184, 0.35);
}
.admin-sidebar-header {
  background: #fafafa;
}
.admin-sidebar-footer {
  background: #fafafa;
}
.admin-nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.admin-nav-link .admin-nav-chevron {
  color: #94a3b8;
  opacity: 0.6;
}

/* Sidebar - item ativo (visual pill + borda) */
.admin-nav-link.active {
  margin-left: 0.25rem;
  margin-right: 0.25rem;
  background: #ecfdf5;
  color: #166534;
  font-weight: 600;
  border-radius: 9999px;
  border: 2px solid rgba(22, 101, 52, 0.4);
}
.admin-nav-link.active i:not(.admin-nav-chevron) { color: #166534; }
.admin-nav-link.active .admin-nav-chevron {
  color: #166534;
  opacity: 1;
}

/* Animação suave em todo o painel admin */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.admin-view:not([hidden]) {
  animation: fadeIn 0.4s ease-out;
}
#admin-login-view:not([hidden]) > div > div {
  animation: fadeInUp 0.45s ease-out 0.1s both;
}
#admin-dashboard-view:not([hidden]) .admin-sidebar {
  animation: fadeIn 0.4s ease-out 0.05s both;
}
#admin-dashboard-view:not([hidden]) main {
  animation: fadeInUp 0.5s ease-out 0.1s both;
}
.admin-tab:not(.hidden) {
  animation: fadeInUp 0.35s ease-out;
}
.admin-modal:not([hidden]) .admin-modal-backdrop {
  animation: fadeIn 0.25s ease-out;
}
.admin-modal:not([hidden]) .admin-modal-content {
  animation: fadeInUp 0.3s ease-out 0.05s both;
}

/* Admin - Views e modais (complementa Tailwind) */
.admin-view[hidden] { display: none !important; }
#admin-dashboard-view.hidden { display: none !important; }
#admin-dashboard-view:not(.hidden) { display: flex; }

.admin-tab.hidden { display: none !important; }
.admin-tab:not(.hidden) { display: block; }

/* Modal overlay e backdrop */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.admin-modal[hidden] { display: none !important; pointer-events: none; }
.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  cursor: pointer;
}
.admin-modal-content {
  position: relative;
}

/* Tabela - linhas e células */
#tabela-produtos tr,
#tabela-representantes tr,
#tabela-cadastros tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.15s;
  animation: fadeIn 0.3s ease-out;
}
#tabela-produtos tbody tr:hover,
#tabela-representantes tbody tr:hover,
#tabela-cadastros tbody tr:hover {
  background: #f0fdf4;
}
#tabela-produtos td,
#tabela-representantes td,
#tabela-cadastros td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
}

/* Modal cadastro - dl/dt/dd */
#modal-cadastro-body dl { margin: 0; display: grid; gap: 0.5rem; }
#modal-cadastro-body dt { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
#modal-cadastro-body dd { margin: 0; font-size: 0.9375rem; color: #0f172a; }
