/* style.css - Rennovata Móveis: Interface Administrativa de Gestão de Contratos */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #c29958;
  --primary-hover: #b08745;
  --primary-light: rgba(194, 153, 88, 0.12);
  --dark-bg: #0b1120;
  --dark-surface: #1e293b;
  --dark-card: #243048;
  --dark-border: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --editor-bg: #f8fafc;
  --editor-card: #ffffff;
  --editor-border: #e2e8f0;
  --editor-text: #1e293b;
  
  --success: #10b981;
  --info: #0284c7;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #f1f5f9;
  color: var(--editor-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================
   BARRA SUPERIOR (HEADER ADMINISTRATIVO)
   ========================================================== */
.admin-navbar {
  background: linear-gradient(135deg, #0b1120 0%, #1e293b 100%);
  color: var(--text-main);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-nav-logo {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(194, 153, 88, 0.4);
}

.admin-nav-logo .logo-main {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 3px;
  color: #ffffff;
  line-height: 1;
}

.admin-nav-logo .logo-main strong {
  font-weight: 800;
  color: var(--primary);
}

.admin-nav-logo .logo-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 5.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: #cbd5e1;
  margin-top: 3px;
  text-transform: uppercase;
}

.brand-title-area h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-title-area p {
  font-size: 11.5px;
  color: var(--text-muted);
}

.contract-status-pill {
  background: rgba(194, 153, 88, 0.2);
  border: 1px solid var(--primary);
  color: #facc15;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* Ações Rápidas no Header */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #c29958 0%, #b08745 100%);
  color: #0b1120;
  box-shadow: 0 2px 6px rgba(194, 153, 88, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d4af37 0%, #c29958 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(194, 153, 88, 0.4);
}

.btn-outline {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid #475569;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #94a3b8;
  color: #ffffff;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-icon {
  padding: 8px 11px;
}

/* ==========================================================
   BARRA DE SUB-AÇÕES E MODO DE EXIBIÇÃO
   ========================================================== */
.view-mode-bar {
  background: #1e293b;
  color: #cbd5e1;
  padding: 8px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
  font-size: 13px;
}

.mode-switches {
  display: flex;
  background: #0f172a;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
}

.mode-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.mode-btn.active {
  background: var(--primary);
  color: #0b1120;
}

.doc-info-summary {
  display: flex;
  gap: 20px;
  font-size: 12.5px;
}

.doc-info-item strong {
  color: #ffffff;
}

/* ==========================================================
   CONTEÚDO PRINCIPAL - WORKSPACE AMPLO
   ========================================================== */
.workspace-container {
  flex: 1;
  display: flex;
  position: relative;
  overflow-x: hidden;
}

/* MODO EDITOR - Expandido e Confortável em Telas Largas */
.editor-panel {
  flex: 1;
  max-width: 1520px;
  margin: 20px auto 40px auto;
  padding: 0 24px;
  width: 100%;
}

/* Abas de Navegação do Editor */
.editor-tabs-nav {
  display: flex;
  background: #ffffff;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid var(--editor-border);
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 12px 0 12px;
}

.editor-tabs-nav::-webkit-scrollbar {
  height: 5px;
}
.editor-tabs-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.editor-tab-btn {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
}

.editor-tab-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.editor-tab-btn.active {
  color: #b08745;
  border-bottom-color: #c29958;
  background: #fdfbf7;
  font-weight: 800;
}

/* Cartão de Conteúdo da Aba */
.editor-tab-content {
  background: #ffffff;
  border: 1px solid var(--editor-border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: none;
  animation: fadeIn 0.2s ease;
}

.editor-tab-content.active {
  display: block;
}

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

/* Agrupamentos em Cartões com Borda Suave */
.editor-sub-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.editor-sub-card.highlight {
  border-left: 4px solid var(--primary);
  background: #fdfaf5;
}

/* Seções e Títulos */
.form-section-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }

@media (max-width: 900px) {
  .col-8, .col-6, .col-4, .col-3, .col-2 { grid-column: span 12; }
}

/* Inputs e Labels */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  color: #1e293b;
  transition: all 0.2s;
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: #c29958;
  box-shadow: 0 0 0 3px rgba(194, 153, 88, 0.18);
}

.form-control[readonly] {
  background: #f1f5f9;
  cursor: not-allowed;
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
  line-height: 1.45;
}

/* Alertas & Dicas no Editor */
.editor-tip-box {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  font-size: 13px;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================
   TABELA DE AMBIENTES NO EDITOR
   ========================================================== */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.admin-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-data-table th {
  background: #f8fafc;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: #334155;
  border-bottom: 2px solid #e2e8f0;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.5px;
}

.admin-data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.admin-data-table tr:hover {
  background: #fdfaf5;
}

.table-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13px;
  background: #ffffff;
}

.table-input:focus {
  outline: none;
  border-color: #c29958;
}

.btn-danger-sm {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-danger-sm:hover {
  background: #dc2626;
  color: white;
}

/* Cartão de Resumo Financeiro */
.financial-summary-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  border-radius: var(--radius-md);
  padding: 22px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--primary);
}

.financial-summary-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.financial-summary-card .stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #38bdf8;
}

.financial-summary-card .stat-value.gold {
  color: #facc15;
}

/* ==========================================================
   ABA 4: DETALHAMENTO CONSTRUTIVO - DESIGN REORGANIZADO
   ========================================================== */
.detalhe-ambiente-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 22px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s;
}

.detalhe-ambiente-card:hover {
  border-color: #cbd5e1;
}

.detalhe-ambiente-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.detalhe-ambiente-badge-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.amb-code-badge {
  background: #0f172a;
  color: var(--primary);
  font-weight: 800;
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.amb-title-name {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.amb-meta-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.amb-price-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.btn-replicate-spec {
  background: #fdfaf5;
  border: 1px solid var(--primary);
  color: #b08745;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-replicate-spec:hover {
  background: var(--primary);
  color: #0b1120;
}

/* Grid Harmonioso 3 Colunas x 2 Linhas */
.detalhe-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .detalhe-spec-grid {
    grid-template-columns: 1fr;
  }
}

.spec-input-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-input-box.highlight {
  border-color: #cbd5e1;
  background: #ffffff;
}

.spec-box-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-box-label .spec-icon {
  font-size: 14px;
}

.spec-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  height: 75px;
  resize: vertical;
  background: #ffffff;
  color: #0f172a;
}

.spec-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(194, 153, 88, 0.15);
}

/* ==========================================================
   ABA 6: CLÁUSULAS CONTRATUAIS - LEITURA ELEGANTE E EDICÃO
   ========================================================== */
.clauses-control-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.clauses-search-input {
  flex: 1;
  max-width: 450px;
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.clause-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.clause-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.clause-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.clause-item-container {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.clause-item-container:hover {
  background: #fdfaf5;
}

.clause-reading-view {
  font-size: 14.5px;
  line-height: 1.65;
  color: #1e293b;
  text-align: justify;
}

.clause-item-num-badge {
  font-weight: 800;
  color: #0f172a;
  margin-right: 6px;
  display: inline-block;
  background: #e2e8f0;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 12.5px;
}

.clause-edit-textarea {
  width: 100%;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #0f172a;
  overflow: hidden;
  resize: none;
}

/* ==========================================================
   PAINEL DE VISUALIZAÇÃO DO CONTRATO (PREVIEW A4) E ZOOM
   ========================================================== */
.preview-panel {
  display: none;
  width: 100%;
}

.preview-panel.active {
  display: block !important;
}

.preview-controls-bar {
  background: #1e293b;
  color: white;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 62px;
  z-index: 900;
  border-bottom: 1px solid #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid #334155;
}

.zoom-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.zoom-level-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  min-width: 44px;
  text-align: center;
}

/* Modal de Contratos Salvos */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(3px);
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  background: #0f172a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

.saved-contract-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  transition: all 0.2s;
}

.saved-contract-item:hover {
  border-color: var(--primary);
  background: #fdfaf5;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0f172a;
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--primary);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================
   ABA 5: CADERNO DE IMAGENS DO PROJETO 3D POR AMBIENTE
   ========================================================== */
.env-images-bar-wrapper {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 16px;
}

.env-selector-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
}

.env-pills-scroll-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}

.env-pills-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.env-pills-scroll-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.env-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 20px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.env-pill-btn:hover {
  border-color: var(--primary);
  background: #fdfaf5;
  color: #0f172a;
}

.env-pill-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.env-pill-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  background: #e2e8f0;
  color: #475569;
}

.env-pill-btn.active .env-pill-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.env-pill-badge.full {
  background: #dcfce7;
  color: #15803d;
}

.env-pill-btn.active .env-pill-badge.full {
  background: #10b981;
  color: #ffffff;
}

/* Banner do Ambiente Ativo */
.active-env-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #e2e8f0;
  border-left: 5px solid #0284c7;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.active-env-info h3 {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.active-env-info p {
  font-size: 11.5px;
  color: #64748b;
}

.active-env-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Grid com os 6 Slots de Imagens */
.project-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

@media (max-width: 1150px) {
  .project-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .project-slots-grid {
    grid-template-columns: 1fr;
  }
}

.slot-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.slot-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.slot-card.has-image {
  border-color: #0284c7;
}

.slot-card.drag-over {
  border-color: var(--primary) !important;
  background: #fdfaf5 !important;
  border-style: dashed !important;
  transform: scale(1.01);
}

.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.slot-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slot-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}

.slot-toggle-label:hover {
  background: #e2e8f0;
}

.slot-toggle-label.active {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.slot-toggle-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: #16a34a;
  width: 14px;
  height: 14px;
  margin: 0;
}

.slot-status-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #64748b;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.slot-status-pill.ready {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.slot-status-pill.paused {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.slot-status-pill.pending {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.slot-card.disabled-slot {
  opacity: 0.78;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.slot-card.disabled-slot:hover {
  opacity: 1;
}

.slot-disabled-watermark {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: #fde047;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 5;
  pointer-events: none;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.slot-title-custom-input {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  width: 170px;
  transition: all 0.2s;
}

.slot-title-custom-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(180, 125, 60, 0.2);
}


/* Área de Dropzone e Preview */
.slot-dropzone {
  position: relative;
  height: 185px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.slot-dropzone:hover .empty-drop-box {
  border-color: var(--primary);
  background: #fdfaf5;
}

.empty-drop-box {
  width: 100%;
  height: 100%;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  transition: all 0.2s ease;
  background: #ffffff;
}

.empty-drop-box .upload-icon {
  font-size: 28px;
  margin-bottom: 6px;
  opacity: 0.8;
}

.empty-drop-box .upload-main-text {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 3px;
}

.empty-drop-box .upload-sub-text {
  font-size: 10.5px;
  color: #94a3b8;
}

.slot-image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  background: #0f172a;
}

/* Overlay de Ações sobre a Imagem */
.slot-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 10px;
}

.slot-dropzone:hover .slot-hover-overlay {
  opacity: 1;
}

.overlay-action-btn {
  background: #ffffff;
  color: #0f172a;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.overlay-action-btn:hover {
  transform: scale(1.05);
}

.overlay-action-btn.btn-remove {
  background: #ef4444;
  color: #ffffff;
}

/* Rodapé do Card do Slot com Legenda */
.slot-footer {
  padding: 10px 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slot-caption-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.slot-caption-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s;
}

.slot-caption-input:focus {
  border-color: var(--primary);
}

/* Barra de Dicas no Rodapé da Aba */
.env-tips-footer {
  display: flex;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 12px;
  color: #475569;
  flex-wrap: wrap;
}

.env-tip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 280px;
}

.env-tip-item code {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 700;
  color: #0f172a;
}

/* ==========================================================
   MODAL DE ZOOM DE IMAGEM
   ========================================================== */
.modal-zoom-card {
  background: #0b1120;
  max-width: 92vw;
  max-height: 92vh;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid #334155;
  animation: zoomInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomInModal {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-zoom-header {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}

.modal-zoom-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: #020617;
}

#modalZoomImg {
  max-width: 88vw;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-zoom-caption {
  color: #e2e8f0;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  max-width: 800px;
  font-weight: 500;
}
