/* ============================================================
   BUSCADORA ASTRAL - PAINEL DA ESCRITORA (DESIGN AMIGÁVEL)
   ============================================================ */

.admin-body {
  background-color: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: rgba(20, 7, 33, 0.95);
  border-bottom: 1px solid rgba(229, 195, 101, 0.25);
  padding: 1.2rem 0;
  backdrop-filter: blur(12px);
}

.admin-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-container {
  max-width: 1050px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  flex: 1;
}

/* Tela de Login */
.login-box {
  background: var(--card-bg-glass);
  border: 1px solid rgba(229, 195, 101, 0.3);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 450px;
  margin: 4rem auto;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--violet-glow);
  backdrop-filter: blur(16px);
}

.login-box .icon {
  font-size: 3rem;
  margin-bottom: 0.8rem;
  display: inline-block;
}

.login-box h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.login-box p {
  color: var(--white-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.6rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.form-control {
  width: 100%;
  background: rgba(13, 4, 20, 0.85);
  border: 1px solid rgba(229, 195, 101, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.2rem;
  color: var(--white-pure);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px var(--gold-glow);
}

/* Painel Principal */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2.5rem;
}

@media (max-width: 880px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.admin-card {
  background: var(--card-bg-glass);
  border: 1px solid rgba(229, 195, 101, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.admin-card h3 {
  font-size: 1.45rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Barra de Ferramentas Visual Estilo Editor de Texto */
.visual-toolbar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  background: rgba(13, 4, 20, 0.9);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid rgba(229, 195, 101, 0.3);
  border-bottom: none;
}

.vtool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(229, 195, 101, 0.2);
  color: var(--white-pure);
  padding: 0.45rem 0.85rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-sans);
  transition: var(--transition-smooth);
}

.vtool-btn:hover {
  background: rgba(229, 195, 101, 0.25);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

/* Caixa de Edição WYSIWYG Visual */
.visual-editor-box {
  width: 100%;
  min-height: 250px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--parchment-bg);
  color: var(--parchment-text);
  border: 1px solid rgba(229, 195, 101, 0.3);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
  outline: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition-smooth);
}

.visual-editor-box:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(229, 195, 101, 0.25);
}

.visual-editor-box:empty:before {
  content: attr(placeholder);
  color: #8c7660;
  font-style: italic;
  display: block;
}

/* Estilos de elementos formatados dentro do editor */
.visual-editor-box p {
  margin-bottom: 1rem;
}

.visual-editor-box h3 {
  font-size: 1.35rem;
  color: #3b092b;
  margin: 1.2rem 0 0.6rem;
  text-shadow: none;
}

.visual-editor-box blockquote {
  font-family: var(--font-serif-sub);
  font-size: 1.2rem;
  font-style: italic;
  color: #3d0c2e;
  border-left: 3px solid #aa852b;
  padding-left: 1rem;
  margin: 1.2rem 0;
  background: rgba(170, 133, 43, 0.08);
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.visual-editor-box ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.visual-editor-box li {
  margin-bottom: 0.3rem;
}

/* Lista de Artigos Postados */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-height: 480px;
  overflow-y: auto;
}

.post-item {
  background: rgba(13, 4, 20, 0.6);
  border: 1px solid rgba(229, 195, 101, 0.15);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.post-item:hover {
  border-color: var(--gold-primary);
  background: rgba(20, 7, 33, 0.9);
}

.post-item-info h5 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--white-pure);
  margin-bottom: 0.2rem;
}

.post-item-info span {
  font-size: 0.78rem;
  color: var(--coral-light);
}

.post-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  background: rgba(255, 111, 89, 0.2);
  border-color: var(--coral-accent);
  color: #ff6f59;
}

/* Alertas */
.alert-success {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid #25D366;
  color: #a3f7c2;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  display: none;
  font-size: 0.95rem;
}

.alert-success.active {
  display: block;
}
