/* ==========================================================================
   CMS VISUAL INLINE (IN-PLACE WYSIWYG) + PAINEL ADMIN / SEO COPILOT NVIDIA
   ========================================================================== */

body.cms-edit-active [data-cms-key] {
  outline: 1px dashed rgba(255, 185, 34, 0.55);
  outline-offset: 4px;
  border-radius: 4px;
  cursor: text;
  transition: outline-color 0.15s ease, background-color 0.15s ease;
}

body.cms-edit-active [data-cms-key]:hover {
  outline: 2px dashed #FFB922;
  background-color: rgba(255, 185, 34, 0.08);
}

body.cms-edit-active [data-cms-key]:focus {
  outline: 2px solid #FFB922;
  background-color: rgba(255, 185, 34, 0.14);
}

body.cms-edit-active .section-light [data-cms-key] {
  outline-color: rgba(180, 105, 0, 0.65);
}

body.cms-edit-active .section-light [data-cms-key]:hover,
body.cms-edit-active .section-light [data-cms-key]:focus {
  outline-color: #d97706;
  background-color: rgba(255, 185, 34, 0.22);
}

.section-light .cms-add-card-slot {
  color: #9a5800;
  border-color: rgba(217, 119, 6, 0.55);
  background: rgba(255, 185, 34, 0.08);
}

/* Overlay para troca rápida de imagem inline */
.cms-img-wrapper {
  position: relative;
}

.cms-img-edit-btn {
  display: none;
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.88);
  color: #FFB922;
  border: 1px solid #FFB922;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  align-items: center;
  gap: 6px;
}

body.cms-edit-active .cms-img-edit-btn {
  display: inline-flex;
}

/* Controles inline em cada Card */
.cms-card-controls {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 25;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 185, 34, 0.55);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55);
}

body.cms-edit-active .cms-card-controls {
  display: flex;
}

.cms-mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.cms-mini-btn:hover {
  background: #FFB922;
  color: #000;
}

.cms-mini-btn.danger:hover {
  background: #ef4444;
  color: #fff;
}

/* Botão + Adicionar Novo Card direto no grid */
.cms-add-card-slot {
  display: none;
  min-height: 220px;
  border: 2px dashed rgba(255, 185, 34, 0.45);
  border-radius: 16px;
  background: rgba(255, 185, 34, 0.04);
  color: #FFB922;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body.cms-edit-active .cms-add-card-slot {
  display: flex;
}

.cms-add-card-slot:hover {
  background: rgba(255, 185, 34, 0.12);
  border-color: #FFB922;
  transform: translateY(-2px);
}

/* Barra Flutuante de Administração (1 linha fixa sem quebra + SVGs) */
.cms-toolbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: rgba(8, 10, 15, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 185, 34, 0.55);
  border-radius: 14px;
  padding: 6px 10px;
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  width: max-content;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
  gap: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.78);
}

.cms-toolbar::-webkit-scrollbar {
  display: none;
}

.cms-toolbar.hidden {
  display: none;
}

.cms-tb-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  color: #FFB922;
  padding: 0 10px 0 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  flex-shrink: 0;
}

.cms-tb-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.cms-tb-btn svg {
  flex-shrink: 0;
}

.cms-tb-btn:hover {
  border-color: #FFB922;
  color: #FFB922;
}

.cms-tb-btn.active {
  background: rgba(255, 185, 34, 0.2);
  border-color: #FFB922;
  color: #FFB922;
}

.cms-tb-btn.save {
  background: #25D366;
  color: #000;
  border-color: #25D366;
  font-weight: 800;
}

.cms-tb-btn.save.dirty {
  animation: pulseDot 1.6s infinite;
}

/* CRUD Inline de Marcas (Peças & Manutenção Multimarcas) */
body.cms-edit-active .brand-chip-editable {
  border-color: rgba(255, 185, 34, 0.45);
  background: rgba(255, 185, 34, 0.08);
  padding: 5px 8px 5px 11px;
}

.brand-chip-name {
  outline: none;
}

body.cms-edit-active .brand-chip-name {
  cursor: text;
  color: #ffffff;
}

body.cms-edit-active .brand-chip-name:focus {
  background: rgba(255, 185, 34, 0.2);
  border-radius: 4px;
  padding: 0 4px;
}

.brand-chip-actions {
  display: none;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
}

body.cms-edit-active .brand-chip-actions {
  display: inline-flex;
}

.brand-mini-btn {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.55);
  color: #d1d5db;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
}

.brand-mini-btn:hover {
  background: #FFB922;
  border-color: #FFB922;
  color: #000000;
}

.brand-mini-btn.danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.brand-add-inline {
  display: none;
  align-items: center;
  gap: 6px;
}

body.cms-edit-active .brand-add-inline {
  display: inline-flex;
}

.cms-brand-input {
  height: 30px;
  width: 145px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px dashed rgba(255, 185, 34, 0.55);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 12px;
  font-family: inherit;
}

.cms-brand-input:focus {
  outline: none;
  border-style: solid;
  border-color: #FFB922;
}

.cms-brand-add-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: none;
  background: #FFB922;
  color: #000000;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cms-brand-add-btn:hover {
  background: #ffc94d;
}

/* Modais / Central Administrativa App Shell */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-backdrop.open {
  display: flex;
}

.admin-modal {
  width: 100%;
  max-width: 440px;
  background: #0d1118;
  border: 1px solid rgba(255, 185, 34, 0.45);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85);
  color: #fff;
  max-height: 92vh;
  overflow-y: auto;
}

.admin-modal.admin-shell {
  max-width: 1180px;
  width: 100%;
  height: 88vh;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  background: #0b0f17;
  border: 1px solid rgba(255, 185, 34, 0.3);
  border-radius: 20px;
}

.admin-sidebar {
  background: #070a10;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  min-height: 0;
}

.admin-sidebar-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-sidebar-brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 185, 34, 0.14);
  border: 1px solid rgba(255, 185, 34, 0.38);
  color: #FFB922;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-sidebar-head strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  color: #ffffff;
}

.admin-sidebar-head span {
  display: block;
  font-size: 11.5px;
  color: #9ca3af;
}

.admin-sidebar-health {
  margin: 14px 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #cbd5e1;
}

.health-row strong {
  font-family: var(--font-display);
  color: #25D366;
  font-size: 13px;
}

.health-row.sub {
  justify-content: flex-start;
  gap: 7px;
  margin-top: 7px;
  font-size: 11.5px;
  color: #9ca3af;
}

.health-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.7);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.admin-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 10px;
  padding: 11px 12px;
  color: #9ca3af;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.admin-nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.admin-nav-btn.active {
  background: rgba(255, 185, 34, 0.12);
  border-left-color: #FFB922;
  color: #FFB922;
}

.admin-sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-esc-hint {
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 10px;
}

.admin-esc-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  padding: 1px 5px;
  color: #e5e7eb;
  font-family: inherit;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.admin-main-topbar {
  padding: 18px 26px;
  background: #0d121c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-main-topbar h2 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0;
  color: #ffffff;
}

.admin-main-topbar p {
  font-size: 12.5px;
  color: #9ca3af;
  margin: 3px 0 0;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}

.admin-close-btn:hover {
  border-color: #FFB922;
  color: #FFB922;
}

.admin-main-body {
  padding: 24px 26px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.admin-split-seo {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: start;
}

.admin-sticky-col {
  position: sticky;
  top: 0;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-kpi-grid.admin-kpi-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-kpi-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 16px 18px;
}

.kpi-label {
  display: block;
  font-size: 11.5px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.kpi-value {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #FFB922;
  margin: 6px 0 2px;
}

.admin-kpi-card small {
  font-size: 11.5px;
  color: #6b7280;
}

.admin-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}

.admin-card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.admin-card-head-row h4 {
  margin: 0;
}

.admin-card h4 {
  font-family: var(--font-display);
  margin: 0 0 12px;
  font-size: 15px;
  color: #FFB922;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.label-row label {
  margin: 0;
}

.meter-counter {
  font-size: 12px;
  font-weight: 700;
  color: #FFB922;
}

.seo-meter-bar {
  margin-top: 7px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.seo-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #25D366;
  transition: width 0.2s ease, background-color 0.2s ease;
}

/* SERP Preview (Simulador Google) */
.google-serp-preview {
  background: #ffffff;
  color: #202124;
  border-radius: 12px;
  padding: 18px 20px;
  font-family: Arial, sans-serif;
}

.serp-url {
  font-size: 12px;
  color: #202124;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.serp-favicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  object-fit: cover;
}

.serp-title,
.admin-card .serp-title {
  color: #1a0dab;
  font-family: Arial, sans-serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 4px;
}

.serp-desc {
  color: #4d5156;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

/* Keyword Chips */
.kw-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.kw-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 185, 34, 0.14);
  border: 1px solid rgba(255, 185, 34, 0.4);
  color: #ffd36b;
  font-size: 12px;
  font-weight: 600;
}

.kw-chip button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

/* SEO Audit Score */
.seo-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid #25D366;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #25D366;
  flex-shrink: 0;
}

.seo-check-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

/* Copiloto de SEO */
.copilot-box {
  background: linear-gradient(155deg, rgba(16, 26, 20, 0.9), rgba(11, 15, 22, 0.96));
  border: 1px solid rgba(118, 185, 0, 0.42);
  border-radius: 16px;
  padding: 22px;
}

.copilot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.copilot-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.copilot-action-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.16s ease;
}

.copilot-action-card svg {
  flex-shrink: 0;
  color: #FFB922;
  margin-top: 2px;
}

.copilot-action-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  color: #ffffff;
}

.copilot-action-card span {
  display: block;
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 2px;
}

.copilot-action-card:hover:not(:disabled) {
  background: rgba(255, 185, 34, 0.1);
  border-color: rgba(255, 185, 34, 0.48);
  transform: translateY(-1px);
}

.copilot-output {
  margin-top: 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  min-height: 150px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  color: #e5e7eb;
  white-space: pre-wrap;
}

.copilot-output-lg {
  min-height: 240px;
  max-height: 380px;
}

/* Mockup de Aba do Navegador & Banco SQLite */
.browser-tab-mockup {
  background: #06080d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px 0;
}

.browser-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  background: #141923;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 8px 14px;
  font-size: 12px;
  color: #e5e7eb;
}

.browser-tab-pill img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}

.browser-tab-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.db-stat-item {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
}

.db-stat-item small {
  display: block;
  font-size: 11px;
  color: #9ca3af;
}

.db-stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13.5px;
  color: #ffffff;
  margin-top: 2px;
}

.revisions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.revision-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.revision-row strong {
  display: block;
  color: #e5e7eb;
}

.revision-row span {
  display: block;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.feed-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #86efac;
  font-size: 12px;
  font-weight: 600;
}

.seo-check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.seo-check-icon.pass {
  background: rgba(37, 211, 102, 0.16);
  color: #25D366;
}

.seo-check-icon.warn {
  background: rgba(255, 185, 34, 0.16);
  color: #FFB922;
}

.copilot-output.is-thinking {
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(255, 185, 34, 0.45);
  background: linear-gradient(135deg, rgba(255, 185, 34, 0.06), rgba(118, 185, 0, 0.06), rgba(0, 0, 0, 0.55));
  white-space: normal;
}

.copilot-thinking-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 4px;
}

.copilot-thinking-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.copilot-spinner {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 185, 34, 0.22);
  border-top-color: #FFB922;
  border-right-color: #9be521;
  animation: copilotSpin 0.85s linear infinite;
}

.copilot-thinking-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #FFB922;
  display: flex;
  align-items: center;
  gap: 6px;
}

.copilot-thinking-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.copilot-thinking-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #FFB922;
  animation: copilotDotBounce 1.2s infinite ease-in-out;
}

.copilot-thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.copilot-thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.copilot-thinking-step {
  font-size: 12.5px;
  color: #cbd5e1;
  margin-top: 2px;
}

.copilot-thinking-bar {
  position: relative;
  height: 5px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.copilot-thinking-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #FFB922, #9be521, transparent);
  animation: copilotProgressSweep 1.35s ease-in-out infinite;
}

.copilot-thinking-timer {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copilot-box button:disabled,
.copilot-box input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@keyframes copilotSpin {
  to { transform: rotate(360deg); }
}

@keyframes copilotDotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

@keyframes copilotProgressSweep {
  0% { left: -40%; }
  100% { left: 100%; }
}

/* Tabela de Imagens WebP */
.img-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.img-opt-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  overflow: hidden;
}

.img-opt-thumb {
  height: 125px;
  background: #05070a;
}

.img-opt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-opt-meta {
  padding: 12px;
  font-size: 12px;
}

/* Toast Notification */
.cms-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 4000;
  background: #111621;
  border: 1px solid #FFB922;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.65);
  display: none;
}

.cms-toast.show {
  display: block;
}

@media (max-width: 900px) {
  .admin-modal.admin-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    height: 92vh;
  }

  .admin-sidebar {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 14px;
  }

  .admin-main {
    min-width: 0;
    max-width: 100%;
  }

  .admin-main-topbar {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .admin-main-body {
    padding: 16px;
  }

  .admin-sidebar-health,
  .admin-sidebar-footer {
    display: none;
  }

  .admin-nav {
    flex-direction: row;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    gap: 6px;
    padding: 10px 0 4px;
  }

  .admin-nav-btn {
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
  }

  .admin-nav-btn.active {
    border-left-color: transparent;
    border-bottom-color: #FFB922;
  }

  .admin-grid-2,
  .admin-split-seo,
  .admin-kpi-grid,
  .admin-kpi-grid.admin-kpi-3,
  .copilot-actions-grid,
  .db-status-grid {
    grid-template-columns: 1fr;
  }

  .admin-sticky-col {
    position: static;
  }
}
