/* Painel Admin - Layout premium */
:root {
  --admin-primary: #3b82f6;
  --admin-primary-hover: #2563eb;
}
body.admin-panel {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8fafc;
  min-height: 100vh;
}

.admin-wrap {
  display: flex;
  min-height: 100vh;
}

/* Sidebar escura - fixa */
.admin-sidebar-new {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: #1a202c;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  border-radius: 0 33px 33px 0;
  transition: width 0.3s ease, transform 0.3s ease;
}
.admin-sidebar-new.collapsed {
  width: 72px;
}
.admin-sidebar-new.collapsed .admin-logo-collapsed {
  display: flex;
}
.admin-sidebar-new.collapsed .admin-logo-expanded {
  display: none;
}
.admin-sidebar-new.collapsed .nav-link-text {
  display: none;
}
.admin-sidebar-new.collapsed .nav-link {
  justify-content: center;
  padding: 0.75rem;
}

/* Área principal - margem para não ficar atrás da sidebar */
.admin-main {
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}
.admin-wrap.sidebar-collapsed .admin-main {
  margin-left: 72px;
}

.admin-logo {
  padding: 1.25rem 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 72px;
}
.admin-logo-collapsed {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.admin-logo-expanded {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}
.admin-sidebar-new.collapsed .admin-logo {
  justify-content: center;
  padding: 1rem;
}
.admin-logo-favicon {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}
.admin-logo-icon {
  font-size: 2rem;
  color: var(--admin-primary);
}
.admin-logo-img {
  max-height: 64px;
  width: auto;
  object-fit: contain;
}
.admin-nav {
  flex: 1;
  padding: 1rem 0.5rem;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.admin-nav::-webkit-scrollbar {
  display: none;
}
.admin-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.85);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-bottom: 2px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.admin-sidebar-new.collapsed .admin-nav {
  padding: 1rem 0.25rem;
}
.admin-sidebar-new.collapsed .admin-nav .nav-link {
  justify-content: center;
}
/* Configurações recolhido: esconder seta, alinhar ícone com submenu */
.admin-sidebar-new.collapsed .nav-link-config .nav-config-chevron {
  display: none;
}
.admin-sidebar-new.collapsed .nav-link-config {
  justify-content: center;
  padding: 0.4rem;
}
.admin-sidebar-new.collapsed .nav-link-config .nav-link-inner {
  display: flex;
  justify-content: center;
  margin: 0;
}
.admin-sidebar-new.collapsed .nav-link-config .nav-link-inner .me-2 {
  margin-right: 0 !important;
}
.admin-nav .nav-link i {
  font-size: 1.25rem;
  opacity: 0.9;
  flex-shrink: 0;
}
.admin-nav .nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 100px;
}
.admin-nav .nav-link.active {
  background: var(--admin-primary);
  color: #fff;
  border-radius: 100px;
}
.admin-subnav {
  margin: 0.25rem 0 0.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.admin-sidebar-new.collapsed .admin-subnav {
  margin: 0.25rem 0 0.5rem 0;
  align-items: center;
}
.admin-subnav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  padding: 0.3rem 0.5rem;
  padding-left: 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  width: 100%;
}
.admin-sidebar-new.collapsed .admin-subnav-link {
  justify-content: center;
  padding: 0.4rem;
  width: auto;
}
.admin-sidebar-new.collapsed .admin-subnav-link .admin-subnav-text {
  display: none;
}
.admin-subnav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.admin-subnav-link.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.nav-link-config-hidden {
  display: none !important;
}
.admin-sidebar-bottom {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.admin-sidebar-bottom .nav-link {
  color: rgba(255,255,255,0.85);
}

/* Overlay para mobile */
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1035;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.admin-sidebar-overlay.show {
  display: block;
  opacity: 1;
}
.admin-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: background 0.2s, border-color 0.2s;
}
.admin-menu-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #374151;
}
.admin-menu-toggle .admin-menu-icon {
  font-size: 1.25rem;
  color: #6b7280;
}

/* Responsivo - mobile */
@media (max-width: 991px) {
  .admin-sidebar-new {
    transform: translateX(-100%);
    width: 260px;
  }
  .admin-sidebar-new.collapsed {
    transform: translateX(-100%);
    width: 260px;
  }
  .admin-sidebar-new:not(.collapsed) {
    transform: translateX(0);
  }
  .admin-sidebar-new:not(.collapsed) .admin-logo-collapsed {
    display: none;
  }
  .admin-sidebar-new:not(.collapsed) .admin-logo-expanded {
    display: flex;
  }
  .admin-sidebar-new:not(.collapsed) .nav-link-text {
    display: inline;
  }
  .admin-sidebar-new:not(.collapsed) .nav-link {
    justify-content: flex-start;
    padding: 0.6rem 1rem;
  }
  .admin-main {
    margin-left: 0 !important;
  }
  .admin-wrap.sidebar-collapsed .admin-main {
    margin-left: 0 !important;
  }
  .admin-menu-toggle {
    display: flex !important;
    align-items: center;
  }
}

/* Área principal */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top bar clara - fixa ao rolar */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-greeting {
  font-size: 1rem;
  color: #374151;
  font-weight: 500;
}
.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-topbar-right .btn-outline-primary {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
  font-size: 0.875rem;
  border-radius: 100px;
}
.admin-notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: #ef4444;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-notif-dropdown {
  min-width: 280px;
  max-height: 360px;
  overflow-y: auto;
}
.admin-notif-dropdown .dropdown-item {
  white-space: normal;
}
.admin-topbar-right .btn-outline-primary:hover {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}
/* Dropdown do usuário */
.admin-user-dropdown {
  position: relative;
}
.admin-user-menu.dropdown-toggle::after {
  display: none;
}
.admin-user-menu.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: 100px;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}
.admin-user-menu.dropdown-toggle:hover {
  background: #f3f4f6;
  color: #111827;
  border-radius: 100px;
}
.admin-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.admin-user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.admin-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-user-dropdown-menu {
  min-width: 240px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.5rem 0;
}
.admin-user-dropdown-header {
  background: transparent;
}
.admin-user-dropdown-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.admin-user-dropdown-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--admin-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.admin-user-dropdown-menu .dropdown-item {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}
.admin-user-dropdown-menu .dropdown-item:hover {
  background: #f8fafc;
}
.admin-user-dropdown-menu .dropdown-item i {
  font-size: 1rem;
  opacity: 0.8;
}
.admin-user-chevron {
  font-size: 0.7rem;
  color: #9ca3af;
  transition: transform 0.2s ease;
  margin-left: 0.25rem;
}
.admin-user-dropdown.show .admin-user-chevron {
  transform: rotate(180deg);
}

/* Página perfil */
.admin-perfil-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e7eb;
}
.admin-perfil-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

/* Conteúdo */
.admin-content {
  flex: 1;
  padding: 1.5rem;
  background: #f3f4f6;
}
.admin-footer {
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  color: #6b7280;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  text-align: right;
}
.admin-footer a {
  color: #9ca3af;
  text-decoration: none;
}
.admin-footer a:hover { text-decoration: underline; color: #6b7280; }
.admin-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.25rem;
}
.admin-page-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* Dashboard moderno */
.dashboard-hero {
  padding: 0.5rem 0;
}
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding: 0 1.5rem 1rem;
}
@media (max-width: 1200px) {
  .dashboard-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .dashboard-stats-grid { grid-template-columns: repeat(2, 1fr); margin-left: -1rem; margin-right: -1rem; padding-left: 1rem; padding-right: 1rem; }
}
@media (max-width: 480px) {
  .dashboard-stats-grid { grid-template-columns: 1fr; }
}
.dashboard-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}
.dashboard-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.dashboard-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  flex-shrink: 0;
}
.dashboard-stat-card.stat-recados .dashboard-stat-icon { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.dashboard-stat-card.stat-noticias .dashboard-stat-icon { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.dashboard-stat-card.stat-pedidos .dashboard-stat-icon { background: linear-gradient(135deg, #ec4899, #f472b6); }
.dashboard-stat-card.stat-comentarios .dashboard-stat-icon { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.dashboard-stat-card.stat-visitas .dashboard-stat-icon { background: linear-gradient(135deg, #10b981, #34d399); }
/* Portal Resolvi — denúncias */
.dashboard-stat-card.stat-pendentes .dashboard-stat-icon { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.dashboard-stat-card.stat-total .dashboard-stat-icon { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.dashboard-stat-card.stat-andamento .dashboard-stat-icon { background: linear-gradient(135deg, #ec4899, #f472b6); }
.dashboard-stat-card.stat-rejeitadas .dashboard-stat-icon { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.dashboard-stat-card.stat-resolvidas .dashboard-stat-icon { background: linear-gradient(135deg, #10b981, #34d399); }
.admin-logo-text { color: #fff; }
.admin-greeting-wrap { min-width: 0; }
.admin-topbar-right { flex-shrink: 0; }
.admin-title-icon { color: var(--admin-primary); }
.badge-status-pendente { background: #fef2f2; color: #dc2626; }
.badge-status-em_andamento { background: #fffbeb; color: #d97706; }
.badge-status-resolvido { background: #f0fdf4; color: #16a34a; }
.badge-status-rejeitado { background: #f3f4f6; color: #6b7280; }
.admin-content .admin-quick-actions .btn-primary {
  background: var(--admin-primary) !important;
  border-color: var(--admin-primary) !important;
  color: #fff !important;
}
.admin-content .admin-quick-actions .btn-outline-primary {
  border-color: #e5e7eb !important;
  color: #374151 !important;
  background: #fff !important;
}
.admin-content .admin-quick-actions .btn-outline-primary:hover {
  background: #fef2f2 !important;
  border-color: var(--admin-primary) !important;
  color: var(--admin-primary) !important;
}
.admin-card .list-group-item { border-color: #f1f5f9; }
.dashboard-stat-content {
  flex: 1;
  min-width: 0;
}
.dashboard-stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}
.dashboard-stat-label {
  font-size: 0.85rem;
  color: #6b7280;
}
.dashboard-stat-arrow {
  color: #d1d5db;
  font-size: 1.25rem;
}
.dashboard-mini-stat {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.dashboard-mini-stat a {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.2s;
}
.dashboard-mini-stat a:hover {
  background: #f8fafc;
}
.dashboard-mini-stat strong { display: block; font-size: 1.1rem; color: #111827; }
.dashboard-mini-stat span:not(.dashboard-mini-icon) { font-size: 0.85rem; color: #6b7280; }
.dashboard-mini-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f1f5f9;
  color: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Cards de estatísticas (legado) */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s, transform 0.2s;
}
.admin-stat-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.admin-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.75rem;
  background: #10b981;
}
.admin-stat-card:nth-child(1) .admin-stat-icon { background: #10b981; }
.admin-stat-card:nth-child(2) .admin-stat-icon { background: #3b82f6; }
.admin-stat-card:nth-child(3) .admin-stat-icon { background: #8b5cf6; }
.admin-stat-card:nth-child(4) .admin-stat-icon { background: #f59e0b; }
.admin-stat-card:nth-child(5) .admin-stat-icon { background: #06b6d4; }
.admin-stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}
.admin-stat-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.25rem;
}
.admin-stat-card .btn {
  margin-top: 0.75rem;
  font-size: 0.8rem;
}

/* Card de conteúdo (tabelas, formulários) */
.admin-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.admin-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-card-body {
  padding: 1.25rem;
}
.admin-card-body .table {
  margin: 0;
}
.admin-card-body .table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
}
.admin-card-body .table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  color: #374151;
}
.admin-card-body .table tbody tr:hover {
  background: #f9fafb;
}

/* Tabela clean (fundo claro) */
.admin-table-clean thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}
.admin-table-clean tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  color: #374151;
  border-bottom: 1px solid #f1f5f9;
}
.admin-table-clean tbody tr:hover td {
  background: #f8fafc;
}
.slider-table-thumb {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}
.slider-table-placeholder {
  width: 60px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 1.25rem;
}
/* Botões de ação na tabela - ícone e texto lado a lado em todo o painel */
.admin-table-actions .btn,
.admin-table-actions form .btn,
.admin-table-clean td .btn,
.admin-table-clean td a.btn {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 100px;
}
.admin-table-actions {
  flex-wrap: nowrap;
}

/* Ações rápidas */
.admin-quick-actions .btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: left;
}
.admin-quick-actions .btn-primary {
  background: #3b82f6;
  border-color: #3b82f6;
}
.admin-quick-actions .btn-outline-primary {
  border-color: #e5e7eb;
  color: #374151;
}
.admin-quick-actions .btn-outline-primary:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #111827;
}

/* Override botões e formulários nas páginas internas do admin */
.admin-content .card.bg-dark {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.admin-content .card.bg-dark .card-body,
.admin-content .card.bg-dark .card-title,
.admin-content .card.bg-dark .form-label {
  color: #374151 !important;
}
.admin-content .form-control.bg-dark,
.admin-content .form-select.bg-dark {
  background: #fff !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}
.admin-content .table-dark {
  --bs-table-bg: #fff;
  --bs-table-color: #374151;
  --bs-table-border-color: #e5e7eb;
}
.admin-content .alert-success {
  background: #d1fae5;
  color: #065f46;
  border-radius: 8px;
}
/* Botões - cor primária #3b82f6 e border-radius 100px (pill) */
.admin-content .btn {
  font-family: 'Poppins', sans-serif;
}
.admin-content .form-control,
.admin-content .form-select,
.admin-content input[type="file"] {
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
}
.admin-content .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  border-radius: 100px;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
}
.admin-content .btn-primary:hover {
  background: var(--admin-primary-hover);
  border-color: var(--admin-primary-hover);
}
.admin-content .btn-danger {
  background: #dc3545;
  border-color: #dc3545;
  border-radius: 100px;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
}
.admin-content .btn-danger:hover {
  background: #bb2d3b;
  border-color: #bb2d3b;
}
.admin-content .btn-outline-danger {
  border-radius: 100px;
  border-color: #dc3545;
  color: #dc3545;
}
.admin-content .btn-outline-danger:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.admin-content .btn-outline-primary {
  border-radius: 100px;
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}
.admin-content .btn-outline-primary:hover {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}
.admin-content .form-control,
.admin-content .form-select {
  padding: 0.5rem 1rem;
}

/* Top 10 - tabela moderna, sem fundo preto */
.table-top10 {
  --bs-table-bg: transparent;
  --bs-table-color: #374151;
  --bs-table-border-color: #e5e7eb;
}
.table-top10 thead th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e2e8f0;
}
.table-top10 tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}
.table-top10 tbody tr:hover td {
  background: #f8fafc;
}
.table-top10 .form-control {
  background: #fff;
  border-color: #e2e8f0;
  color: #111827;
}
.table-top10 .form-control:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--admin-primary) 15%, transparent);
}
.top10-capa-atual {
  min-width: 60px;
}
.top10-capa-thumb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  display: block;
  background: #f1f5f9;
}
.top10-capa-atual a:hover .top10-capa-thumb {
  border-color: var(--admin-primary);
  opacity: 0.9;
}

/* Editor de texto rico (Quill) - notícias */
.editor-noticia {
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  overflow: hidden;
  background: #fff;
}
.editor-noticia .ql-toolbar {
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.editor-noticia .ql-container {
  border: none;
  font-size: 0.95rem;
}

/* Checkboxes alinhados - formulários admin */
.admin-form-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.admin-form-check-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-form-check-item .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex-shrink: 0;
}
.admin-form-check-item .form-check-label {
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0;
}
.admin-form-check-item:last-child {
  flex-wrap: wrap;
}
.admin-form-check-item:last-child .form-check-label {
  color: var(--admin-primary);
  font-weight: 600;
}
.admin-form-check-hint {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin: 0.25rem 0 0 1.6rem;
  line-height: 1.35;
  width: 100%;
}

/* ===== Modo escuro (data-admin-theme="dark") ===== */
[data-admin-theme="dark"] body.admin-panel {
  background: #0f172a;
}
[data-admin-theme="dark"] .admin-topbar {
  background: #1e293b;
  border-bottom-color: #334155;
}
[data-admin-theme="dark"] .admin-greeting {
  color: #f1f5f9;
}
[data-admin-theme="dark"] .admin-menu-toggle {
  background: #334155;
  border-color: #475569;
  color: #94a3b8;
}
[data-admin-theme="dark"] .admin-menu-toggle:hover {
  background: #475569;
  border-color: #64748b;
  color: #f1f5f9;
}
[data-admin-theme="dark"] .admin-theme-btn {
  color: #94a3b8 !important;
}
[data-admin-theme="dark"] .admin-theme-btn:hover {
  color: #f1f5f9 !important;
}
[data-admin-theme="dark"] .admin-content {
  background: #0f172a;
}
[data-admin-theme="dark"] .admin-footer {
  background: #1e293b;
  border-top-color: #334155;
  color: #94a3b8;
}
[data-admin-theme="dark"] .admin-footer a {
  color: #94a3b8;
}
[data-admin-theme="dark"] .admin-footer a:hover {
  color: #cbd5e1;
}
[data-admin-theme="dark"] .admin-page-title {
  color: #f1f5f9;
}
[data-admin-theme="dark"] .admin-page-subtitle {
  color: #94a3b8;
}
[data-admin-theme="dark"] .admin-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
[data-admin-theme="dark"] .admin-card-header {
  border-bottom-color: #334155;
}
[data-admin-theme="dark"] .admin-card-title {
  color: #f1f5f9;
}
[data-admin-theme="dark"] .admin-table-clean thead th {
  background: #0f172a;
  color: #94a3b8;
  border-bottom-color: #334155;
}
[data-admin-theme="dark"] .admin-table-clean tbody td {
  color: #e2e8f0;
  border-bottom-color: #334155;
}
[data-admin-theme="dark"] .admin-table-clean tbody tr:hover td {
  background: #334155;
}
[data-admin-theme="dark"] .admin-card-body .table th {
  color: #94a3b8;
  border-bottom-color: #334155;
}
[data-admin-theme="dark"] .admin-card-body .table td {
  color: #e2e8f0;
}
[data-admin-theme="dark"] .admin-card-body .table tbody tr:hover {
  background: #334155;
}
[data-admin-theme="dark"] .dashboard-stat-card,
[data-admin-theme="dark"] .admin-stat-card {
  background: #1e293b;
  border-color: #334155;
}
[data-admin-theme="dark"] .dashboard-stat-card:hover,
[data-admin-theme="dark"] .admin-stat-card:hover {
  background: #334155;
}
[data-admin-theme="dark"] .dashboard-stat-num,
[data-admin-theme="dark"] .admin-stat-number {
  color: #f1f5f9;
}
[data-admin-theme="dark"] .dashboard-stat-label,
[data-admin-theme="dark"] .admin-stat-label {
  color: #94a3b8;
}
[data-admin-theme="dark"] .dashboard-mini-stat {
  background: #1e293b;
  border-color: #334155;
}
[data-admin-theme="dark"] .dashboard-mini-stat a:hover {
  background: #334155;
}
[data-admin-theme="dark"] .dashboard-mini-stat strong {
  color: #f1f5f9;
}
[data-admin-theme="dark"] .dashboard-mini-stat span:not(.dashboard-mini-icon) {
  color: #94a3b8;
}
[data-admin-theme="dark"] .dashboard-mini-icon {
  background: #334155;
}
[data-admin-theme="dark"] .admin-user-menu.dropdown-toggle {
  color: #e2e8f0;
}
[data-admin-theme="dark"] .admin-user-menu.dropdown-toggle:hover {
  background: #334155;
  color: #f1f5f9;
}
[data-admin-theme="dark"] .slider-table-placeholder {
  background: #334155;
  color: #64748b;
}
[data-admin-theme="dark"] .admin-content .card.bg-dark {
  background: #1e293b !important;
  border-color: #334155 !important;
}
[data-admin-theme="dark"] .admin-content .card.bg-dark .card-body,
[data-admin-theme="dark"] .admin-content .card.bg-dark .card-title,
[data-admin-theme="dark"] .admin-content .card.bg-dark .form-label {
  color: #e2e8f0 !important;
}
[data-admin-theme="dark"] .admin-content .form-control.bg-dark,
[data-admin-theme="dark"] .admin-content .form-select.bg-dark {
  background: #334155 !important;
  color: #f1f5f9 !important;
  border-color: #475569 !important;
}
[data-admin-theme="dark"] .admin-content .alert-success {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
[data-admin-theme="dark"] .admin-content .alert {
  color: #e2e8f0;
}
[data-admin-theme="dark"] .admin-content .form-control,
[data-admin-theme="dark"] .admin-content .form-select,
[data-admin-theme="dark"] .admin-content input[type="text"],
[data-admin-theme="dark"] .admin-content input[type="email"],
[data-admin-theme="dark"] .admin-content input[type="number"],
[data-admin-theme="dark"] .admin-content input[type="url"],
[data-admin-theme="dark"] .admin-content textarea {
  background: #334155;
  border-color: #475569;
  color: #f1f5f9;
}
[data-admin-theme="dark"] .admin-content .form-control::placeholder,
[data-admin-theme="dark"] .admin-content .form-control::-webkit-input-placeholder {
  color: #64748b;
}
[data-admin-theme="dark"] .admin-content .form-label,
[data-admin-theme="dark"] .admin-content label {
  color: #e2e8f0 !important;
}
[data-admin-theme="dark"] .admin-content .text-muted {
  color: #94a3b8 !important;
}
[data-admin-theme="dark"] .admin-content .text-secondary {
  color: #94a3b8 !important;
}
[data-admin-theme="dark"] .table-top10 thead th {
  background: #0f172a;
  color: #94a3b8;
  border-bottom-color: #334155;
}
[data-admin-theme="dark"] .table-top10 tbody td {
  background: #1e293b;
  border-bottom-color: #334155;
  color: #e2e8f0;
}
[data-admin-theme="dark"] .table-top10 tbody tr:hover td {
  background: #334155;
}
[data-admin-theme="dark"] .table-top10 .form-control {
  background: #334155;
  border-color: #475569;
  color: #f1f5f9;
}
[data-admin-theme="dark"] .top10-capa-thumb {
  border-color: #475569;
  background: #334155;
}
[data-admin-theme="dark"] .editor-noticia {
  border-color: #334155;
  background: #1e293b;
}
[data-admin-theme="dark"] .editor-noticia .ql-toolbar {
  border-bottom-color: #334155;
  background: #0f172a;
}
[data-admin-theme="dark"] .editor-noticia .ql-container {
  color: #f1f5f9;
}
[data-admin-theme="dark"] .editor-noticia .ql-editor {
  color: #f1f5f9;
}
[data-admin-theme="dark"] .admin-form-checks {
  background: rgba(51, 65, 85, 0.5);
  border-color: #334155;
}
[data-admin-theme="dark"] .dropdown-menu {
  background: #1e293b;
  border-color: #334155;
}
[data-admin-theme="dark"] .dropdown-item {
  color: #e2e8f0;
}
[data-admin-theme="dark"] .dropdown-item:hover {
  background: #334155;
  color: #f1f5f9;
}
[data-admin-theme="dark"] .admin-notif-dropdown .dropdown-item {
  color: #e2e8f0;
}
[data-admin-theme="dark"] .admin-user-dropdown-header {
  background: transparent;
}
[data-admin-theme="dark"] .admin-user-dropdown .dropdown-divider {
  border-color: #334155;
}
[data-admin-theme="dark"] .p-5.text-center.text-muted,
[data-admin-theme="dark"] .p-5.text-muted {
  color: #94a3b8 !important;
}
[data-admin-theme="dark"] .admin-content input[type="file"] {
  background: #334155;
  color: #f1f5f9;
  border-color: #475569;
}
[data-admin-theme="dark"] .admin-content .border {
  border-color: #334155 !important;
}
[data-admin-theme="dark"] .admin-content small.text-muted {
  color: #64748b !important;
}
[data-admin-theme="dark"] .admin-content .list-unstyled li {
  color: #e2e8f0;
}
[data-admin-theme="dark"] .admin-content code {
  background: #334155;
  color: #94a3b8;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}
[data-admin-theme="dark"] .admin-title-icon {
  color: #f87171;
}

/* PWA / telas com recorte (notch) */
body.admin-panel {
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

@supports (padding: max(0px)) {
  .admin-panel .admin-topbar {
    padding-top: max(0.5rem, env(safe-area-inset-top));
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
  }

  .admin-panel .admin-main {
    padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
  }

  .admin-panel .admin-footer {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }
}
