/**
 * ═══════════════════════════════════════════════════════════════════════════
 * ORION BUSINESS SUITE — SITES & LANDING PAGES — ESTILOS
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────────────────────
   CONTAINER PRINCIPAL
   ───────────────────────────────────────────────────────────────────────── */
.sites-module {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f8fafc;
}

/* ─────────────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────────────── */
.sites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.sites-header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.sites-header h1 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
}

.sites-header h1 i {
  color: #3b82f6;
}

/* TABS */
.sites-tabs {
  display: flex;
  gap: 0.5rem;
}

.sites-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sites-tab:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.sites-tab.active {
  background: #3b82f6;
  color: white;
}

/* ACTIONS */
.sites-header-actions {
  display: flex;
  gap: 0.75rem;
}

/* ─────────────────────────────────────────────────────────────────────────
   BODY
   ───────────────────────────────────────────────────────────────────────── */
.sites-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

/* ─────────────────────────────────────────────────────────────────────────
   ESTATÍSTICAS
   ───────────────────────────────────────────────────────────────────────── */
.sites-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  color: white;
  font-size: 1.5rem;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────────────────
   GRID DE PÁGINAS
   ───────────────────────────────────────────────────────────────────────── */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.pagina-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.pagina-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.pagina-preview {
  position: relative;
  width: 100%;
  height: 180px;
  background: #f1f5f9;
  overflow: hidden;
}

.pagina-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 3rem;
  color: #cbd5e1;
}

.pagina-status {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.375rem 0.875rem;
  background: #3b82f6;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pagina-info {
  padding: 1.25rem;
}

.pagina-info h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.pagina-cliente,
.pagina-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: #64748b;
}

.pagina-cliente i,
.pagina-url i {
  color: #94a3b8;
  font-size: 0.75rem;
}

.pagina-metricas {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.metrica {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.metrica i {
  color: #94a3b8;
}

.metrica span {
  font-weight: 600;
  color: #1e293b;
}

.pagina-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.btn-icon {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  background: white;
  color: #64748b;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

.btn-icon.btn-danger:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

/* ─────────────────────────────────────────────────────────────────────────
   TEMPLATES VIEW
   ───────────────────────────────────────────────────────────────────────── */
.templates-view {
  max-width: 1200px;
  margin: 0 auto;
}

.templates-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.templates-intro h2 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
}

.templates-intro p {
  margin: 0;
  font-size: 1.125rem;
  color: #64748b;
}

.template-categoria {
  margin-bottom: 3rem;
}

.template-categoria h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  text-transform: capitalize;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.template-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.template-preview {
  width: 100%;
  height: 160px;
  background: #f8fafc;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.template-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.template-tipo {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  color: #64748b;
}

/* ─────────────────────────────────────────────────────────────────────────
   EDITOR LAYOUT
   ───────────────────────────────────────────────────────────────────────── */
.editor-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  height: calc(100vh - 200px);
}

/* SIDEBAR */
.editor-sidebar {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

.blocos-disponiveis {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bloco-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid #e2e8f0;
  background: white;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 0.5rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.bloco-btn:hover {
  background: #f8fafc;
  border-color: #3b82f6;
  color: #3b82f6;
}

.bloco-btn i {
  font-size: 1.125rem;
  width: 1.5rem;
  text-align: center;
}

/* CONFIG FORM */
.config-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.config-form label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
}

.config-form input,
.config-form textarea,
.config-form select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.9rem;
  color: #1e293b;
  background: white;
  transition: all 0.2s;
}

.config-form input:focus,
.config-form textarea:focus,
.config-form select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* CANVAS */
.editor-canvas {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.canvas-toolbar {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.canvas-preview {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  background: #f8fafc;
}

.canvas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94a3b8;
  text-align: center;
}

.canvas-empty i {
  margin-bottom: 1rem;
}

.canvas-empty p {
  margin: 0;
  font-size: 1.125rem;
}

/* ─────────────────────────────────────────────────────────────────────────
   BLOCOS NO EDITOR
   ───────────────────────────────────────────────────────────────────────── */
.editor-bloco {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: all 0.2s;
}

.editor-bloco:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.bloco-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.bloco-tipo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
}

.bloco-tipo i {
  color: #3b82f6;
}

.bloco-actions {
  display: flex;
  gap: 0.375rem;
}

.bloco-actions button {
  padding: 0.375rem 0.625rem;
  border: 1px solid #cbd5e1;
  background: white;
  color: #64748b;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.bloco-actions button:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

.bloco-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bloco-actions button.btn-danger:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.bloco-preview {
  padding: 2rem;
  min-height: 200px;
}

/* ─────────────────────────────────────────────────────────────────────────
   PREVIEWS DE BLOCOS
   ───────────────────────────────────────────────────────────────────────── */
.preview-hero {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 0.5rem;
}

.preview-hero h1 {
  margin: 0 0 1rem 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.preview-hero p {
  margin: 0 0 2rem 0;
  font-size: 1.25rem;
  opacity: 0.95;
}

.preview-cta {
  padding: 1rem 2.5rem;
  border: none;
  background: white;
  color: #667eea;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
}

.preview-beneficios {
  padding: 2rem;
}

.preview-beneficios h2 {
  margin: 0 0 2rem 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.preview-card {
  padding: 1.5rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.preview-card i {
  font-size: 2.5rem;
  color: #3b82f6;
  margin-bottom: 1rem;
}

.preview-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.preview-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.preview-faq {
  padding: 2rem;
}

.preview-faq h2 {
  margin: 0 0 2rem 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
}

.preview-faq-item {
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.preview-faq-item strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #1e293b;
  font-size: 1rem;
}

.preview-faq-item p {
  margin: 0;
  color: #64748b;
  font-size: 0.95rem;
}

.preview-formulario {
  padding: 2rem;
  background: #f8fafc;
  border-radius: 0.5rem;
}

.preview-formulario h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
}

.preview-formulario form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.preview-formulario input {
  padding: 0.875rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.95rem;
}

.preview-formulario button {
  padding: 1rem;
  border: none;
  background: #3b82f6;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
}

.preview-generico {
  padding: 3rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  text-align: center;
  color: #94a3b8;
}

/* ─────────────────────────────────────────────────────────────────────────
   ESTADOS
   ───────────────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  color: #64748b;
}

.empty-state i {
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

.empty-state h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #475569;
}

.empty-state p {
  margin: 0 0 2rem 0;
  font-size: 1rem;
  color: #64748b;
}

.empty-actions {
  display: flex;
  gap: 1rem;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  font-size: 1.125rem;
  color: #64748b;
}

.loading-state i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #3b82f6;
}

/* ─────────────────────────────────────────────────────────────────────────
   BOTÕES
   ───────────────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  background: #3b82f6;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid #cbd5e1;
  background: white;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e293b;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVO
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .editor-layout {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 992px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    max-height: 300px;
  }
}

@media (max-width: 768px) {
  .sites-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .sites-header-left {
    flex-direction: column;
    gap: 1rem;
  }

  .sites-stats {
    grid-template-columns: 1fr;
  }

  .sites-grid {
    grid-template-columns: 1fr;
  }

  .templates-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIM DOS ESTILOS
   ═══════════════════════════════════════════════════════════════════════════ */
