/* ==========================================================================
   PAINEL DE ADMINISTRAÇÃO E EDIÇÃO EM TEMPO REAL (admin.css)
   ========================================================================== */

#admin-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: var(--bg-book);
  overflow: hidden;
}

.admin-header {
  height: 65px;
  background: #15353E;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  border-bottom: 3px solid var(--accent-sertao);
  z-index: 100;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-brand h1 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: #FFF;
}

.admin-workspace {
  flex: 1;
  display: flex;
  height: calc(100vh - 65px);
  overflow: hidden;
}

/* Painel Esquerdo: Manuscrito com Zoom */
.admin-pane-left {
  flex: 1;
  background: #12100E;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 2px solid var(--border-color);
  overflow: hidden;
}

/* Painel Direito: Editor de Texto MySQL */
.admin-pane-right {
  flex: 1.2;
  background: #FFF;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-editor-toolbar {
  padding: 15px 25px;
  background: var(--bg-book-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.admin-page-select-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-select {
  padding: 8px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  background: #FFF;
  color: var(--text-main);
  outline: none;
}

.admin-editor-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 25px;
  overflow-y: auto;
  gap: 15px;
}

.editor-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-label-row label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-header);
}

.tag-helper-btns {
  display: flex;
  gap: 8px;
}

.tag-btn {
  background: rgba(226, 135, 67, 0.15);
  color: var(--accent-sertao-hover);
  border: 1px solid var(--accent-sertao);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tag-btn:hover {
  background: var(--accent-sertao);
  color: #FFF;
}

.admin-textarea {
  width: 100%;
  height: 220px;
  padding: 15px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  resize: vertical;
  background: var(--bg-book);
}

.admin-textarea:focus {
  border-color: var(--accent-sertao);
  box-shadow: 0 0 0 3px rgba(226, 135, 67, 0.15);
  outline: none;
}

.admin-preview-box {
  background: var(--bg-book);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  max-height: 250px;
  overflow-y: auto;
}

.admin-footer-actions {
  padding: 15px 25px;
  background: var(--bg-book-subtle);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-save-mysql {
  background: #2E7D32;
  color: #FFF;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
  transition: all var(--transition-fast);
}

.btn-save-mysql:hover {
  background: #1B5E20;
  transform: translateY(-1px);
}

/* Toast de Notificação Admin */
.admin-toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #2E7D32;
  color: #FFF;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 10000;
  display: none;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
