/* ==========================================================================
   10xAI BUSINESS DNA & BRAND GUIDELINES MODULE
   Clean Fullscreen White Theme matching 10xAI Dreamer & Virality
   ========================================================================== */

/* --- Fullscreen View Container --- */
.view-container.business-dna-view-wrap {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f8fafc;
  overflow-y: auto;
  overflow-x: hidden;
  flex-direction: column;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #0f172a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.view-container.business-dna-view-wrap.is-active {
  display: flex !important;
}

.business-dna-view-wrap * {
  box-sizing: border-box;
}

.business-dna-view-wrap ::selection {
  background: #bafa1b;
  color: #000;
}

/* --- Top Navigation Bar --- */
.business-dna-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  background: #0e0e11;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  flex-wrap: wrap;
  gap: 12px;
}

.dna-top-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: 99px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.15s ease;
  text-decoration: none;
}

.dna-top-back:hover {
  background: rgba(186, 250, 27, 0.15) !important;
  border-color: rgba(186, 250, 27, 0.5) !important;
  color: #bafa1b !important;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(186, 250, 27, 0.25);
}

.dna-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dna-engine-pill {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2.5px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* Tab Segmented Control in Header */
.dna-tabs-segmented {
  display: flex;
  align-items: center;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}

.dna-tab-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.dna-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.dna-tab-btn.is-active {
  background: #ffffff;
  color: #09090b;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Topbar Actions */
.btn-dna-action {
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-dna-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.btn-dna-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-dna-primary {
  background: #bafa1b;
  border: 1px solid #bafa1b;
  color: #09090b;
  font-weight: 800;
}

.btn-dna-primary:hover {
  background: #d4ff4d;
  border-color: #d4ff4d;
  box-shadow: 0 0 16px rgba(186, 250, 27, 0.4);
  transform: translateY(-1px);
}

/* --- Container Canvas --- */
.dna-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Hero Title Block */
.dna-hero {
  margin-bottom: 28px;
}

.dna-hero h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dna-hero p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  max-width: 760px;
}

/* --- Clean White Cards --- */
.dna-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: all 0.2s ease;
}

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

.dna-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dna-card-title h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.dna-card-desc {
  font-size: 12.5px;
  color: #64748b;
  margin: 2px 0 0 0;
}

/* Form Layouts */
.dna-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dna-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .dna-grid-2, .dna-grid-3 {
    grid-template-columns: 1fr;
  }
}

.dna-form-group {
  margin-bottom: 16px;
}

.dna-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
  margin-bottom: 6px;
}

.dna-label small {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
  text-transform: none;
  letter-spacing: normal;
  margin-left: 6px;
}

.dna-input, .dna-select, .dna-textarea {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.dna-input:focus, .dna-select:focus, .dna-textarea:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.dna-textarea {
  resize: vertical;
  min-height: 85px;
  line-height: 1.6;
}

/* Color Palette Picker Widget */
.dna-color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.dna-color-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dna-color-preview {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dna-color-native-input {
  position: absolute;
  inset: -10px;
  opacity: 0;
  cursor: pointer;
  width: 200%;
  height: 200%;
}

.dna-color-info {
  flex: 1;
  min-width: 0;
}

.dna-color-label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
}

.dna-color-hex-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 4px;
  width: 90px;
}

.dna-color-hex-input:focus {
  background: #ffffff;
  border-color: #cbd5e1;
}

/* Guardrails (Must-Use vs Banned Words) */
.dna-guardrail-card {
  border-radius: 12px;
  padding: 16px;
}

.dna-guardrail-card.must-use {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
}

.dna-guardrail-card.banned {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
}

/* Drag and Drop File Vault */
.dna-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dna-upload-zone:hover, .dna-upload-zone.dragover {
  background: #f0fdf4;
  border-color: #22c55e;
}

.dna-upload-zone .upload-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

.dna-upload-zone h3 {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.dna-upload-zone p {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
}

/* Files Vault Grid */
.dna-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.dna-file-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.dna-file-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.dna-file-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.dna-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dna-file-info {
  flex: 1;
  min-width: 0;
}

.dna-file-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 2px 0;
}

.dna-file-meta {
  font-size: 11.5px;
  color: #64748b;
}

.dna-file-preview-box {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #475569;
  max-height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 12px;
  line-height: 1.5;
}

.dna-file-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
  font-size: 12px;
}

.dna-file-btn {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.dna-file-btn.download {
  color: #0284c7;
}

.dna-file-btn.download:hover {
  background: #e0f2fe;
}

.dna-file-btn.delete {
  color: #ef4444;
}

.dna-file-btn.delete:hover {
  background: #fee2e2;
}

/* Prompt Context Box */
.dna-prompt-box {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 18px 20px;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  max-height: 480px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-top: 14px;
}

/* --- Manage Integration Modal Styles --- */
.integration-manage-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.integration-manage-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.int-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.int-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.int-status-badge.connected {
  background: #dcfce7;
  color: #15803d;
}

.int-status-badge.disconnected {
  background: #f1f5f9;
  color: #64748b;
}

.int-status-badge.action {
  background: #fef9c3;
  color: #854d0e;
}

.int-account-line {
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
}

.int-account-line strong {
  color: #0f172a;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.int-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-int-action {
  flex: 1;
  min-width: 100px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
