/* Shell de navegação compartilhado pelos painéis administrativos
   (pages_admin/*.html). Ver Assets/scripts/admin-shell.js — a sidebar e a
   barra superior aqui definidas são montadas por JS assim que o cargo do
   usuário é confirmado, então este CSS só cuida da aparência/animações. */

.admin-sidebar {
  position: fixed;
  inset-block: 0;
  left: 0;
  width: 272px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: rgba(8, 11, 16, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(-100%);
  transition: transform 0.25s ease, width 0.25s ease;
}

.admin-sidebar.open { transform: translateX(0); }

@media (min-width: 768px) {
  .admin-sidebar { transform: translateX(0); }
  .admin-sidebar.collapsed { width: 84px; }
}

.admin-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.admin-sidebar-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

.admin-nav-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5a6b;
  padding: 0 0.9rem;
  margin: 1.1rem 0 0.4rem;
  white-space: nowrap;
}

.admin-sidebar-scroll > .admin-nav-section-label:first-child { margin-top: 0.5rem; }

.admin-sidebar.collapsed .admin-nav-section-label,
.admin-sidebar.collapsed .admin-nav-label,
.admin-sidebar.collapsed .admin-nav-badge,
.admin-sidebar.collapsed .admin-user-meta,
.admin-sidebar.collapsed .admin-sidebar-brand-text {
  display: none;
}

.admin-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.15rem 0.6rem;
  padding: 0.62rem 0.75rem;
  border-radius: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.admin-nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }

.admin-nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.16), rgba(37, 99, 235, 0.12));
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.25);
}

.admin-nav-item.active .admin-nav-icon { color: #00e5ff; }

.admin-nav-icon {
  flex-shrink: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.admin-nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-sidebar-divider { border-top: 1px solid rgba(255, 255, 255, 0.06); margin: 0.75rem 0.9rem 0; }

.admin-sidebar-collapse-btn {
  display: none;
}
@media (min-width: 768px) {
  .admin-sidebar-collapse-btn { display: flex; }
}

/* Barra superior sticky de cada página (dentro de #content-panel) */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: -1rem -1rem 1.5rem;
  padding: 0.85rem 1rem;
  background: rgba(8, 11, 16, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 1.1rem 1.1rem;
}

@media (min-width: 640px) { .admin-topbar { margin: -1.5rem -1.5rem 1.75rem; padding: 0.85rem 1.5rem; } }
@media (min-width: 768px) { .admin-topbar { margin: -2.5rem -2.5rem 2rem; padding: 0.9rem 1.75rem; } }

.admin-topbar-crumb {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.admin-topbar-crumb .eyebrow { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #4b5a6b; }
.admin-topbar-crumb .title { font-size: 0.95rem; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.admin-topbar-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.admin-topbar-btn:hover { color: #fff; border-color: rgba(0, 229, 255, 0.35); background: rgba(0, 229, 255, 0.08); }

.admin-hamburger { display: inline-flex; }
@media (min-width: 768px) { .admin-hamburger { display: none; } }

/* Paleta de comandos (Ctrl+K) */
.admin-palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(3, 5, 9, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 1rem 1rem;
}

.admin-palette {
  width: 100%;
  max-width: 34rem;
}

.admin-palette-input-wrap { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.admin-palette-input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 0.95rem; }
.admin-palette-input::placeholder { color: #64748b; }

.admin-palette-list { max-height: 22rem; overflow-y: auto; padding: 0.5rem; }

.admin-palette-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.admin-palette-item .sub { color: #64748b; font-weight: 500; font-size: 0.72rem; margin-left: auto; }
.admin-palette-item.active { background: rgba(0, 229, 255, 0.12); color: #fff; }
.admin-palette-item .material-symbols-rounded { color: #00e5ff; font-size: 1.15rem; }

.admin-palette-empty { padding: 2rem 1rem; text-align: center; color: #64748b; font-size: 0.85rem; }

kbd.admin-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
}
