/**
 * SOVEREIGN COMMAND CENTER — DATA EDITOR & PRE-FLIGHT VERIFIER STYLES
 * Classical Venetian Gold & Ebru Navy Luxury Palette
 */

.data-editor-modal-wrapper {
  max-width: 1040px !important;
  width: 95vw !important;
}

.data-editor-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.data-editor-tabs-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 0.6rem;
  background: rgba(10, 17, 24, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.data-editor-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  font-family: var(--font-classical);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.data-editor-tab-btn:hover {
  color: var(--text-parchment);
  background: rgba(255, 255, 255, 0.04);
}

.data-editor-tab-btn.active {
  background: rgba(197, 160, 89, 0.15);
  border-color: var(--gold-border);
  color: var(--gold-bright);
}

.data-editor-tab-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.editor-section-card {
  background: linear-gradient(135deg, rgba(22, 37, 54, 0.6) 0%, rgba(16, 28, 42, 0.7) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.editor-section-title {
  font-family: var(--font-serif-title);
  font-size: 1.05rem;
  color: var(--text-parchment);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(229, 193, 88, 0.18);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.editor-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.editor-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.editor-data-table th {
  background: rgba(10, 17, 24, 0.85);
  color: var(--gold-bright);
  font-family: var(--font-classical);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.6rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--gold-border);
}

.editor-data-table td {
  padding: 0.4rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table-cell-input {
  width: 100%;
  background: rgba(10, 17, 24, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-parchment);
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.table-cell-input:focus {
  border-color: var(--gold-bright);
  outline: none;
}

.btn-table-delete {
  background: transparent;
  border: none;
  color: #f87171;
  cursor: pointer;
  padding: 0.25rem 0.45rem;
  border-radius: 3px;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.btn-table-delete:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* =========================================================================
   PRE-FLIGHT FACTUAL VERIFICATION CONSOLE
   ========================================================================= */
.preflight-audit-card {
  background: linear-gradient(135deg, rgba(16, 28, 42, 0.95) 0%, rgba(22, 37, 54, 0.95) 100%);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.audit-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(229, 193, 88, 0.2);
}

.audit-score-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.audit-score-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--gold-bright);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 17, 24, 0.9);
  color: var(--gold-bright);
  font-weight: 700;
  font-family: var(--font-mono);
  box-shadow: 0 0 16px rgba(229, 193, 88, 0.25);
}

.audit-stats-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.audit-stat-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.audit-stat-pill.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.audit-stat-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.audit-stat-pill.verified {
  background: rgba(82, 196, 156, 0.15);
  color: #86efac;
  border: 1px solid rgba(82, 196, 156, 0.35);
}

.audit-issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.audit-issue-card {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(10, 17, 24, 0.65);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.audit-issue-card.error {
  border-left: 3px solid #ef4444;
}

.audit-issue-card.warning {
  border-left: 3px solid #f59e0b;
}

.audit-issue-card.verified {
  border-left: 3px solid #52c49c;
}

.issue-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.issue-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.issue-badge.error { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.issue-badge.warning { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.issue-badge.verified { background: rgba(82, 196, 156, 0.2); color: #86efac; }

.issue-detail {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn-fix-field {
  align-self: flex-start;
  margin-top: 0.35rem;
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--gold-bright);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-fix-field:hover {
  background: rgba(229, 193, 88, 0.15);
}

/* =========================================================================
   PACKAGE DOSSIER DRAFT STYLES (SPECS VIEW)
   ========================================================================= */
.dossier-draft-banner {
  background: linear-gradient(135deg, rgba(27, 51, 74, 0.4) 0%, rgba(14, 27, 41, 0.7) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.draft-forms-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.draft-form-item {
  background: rgba(16, 28, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.draft-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.draft-form-code-badge {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(229, 193, 88, 0.12);
  border: 1px solid var(--gold-border);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.draft-form-actions-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-pdf-download {
  background: linear-gradient(135deg, #e5c158 0%, #c5a059 100%);
  color: #0a1118 !important;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pdf-download:hover {
  box-shadow: 0 0 12px rgba(229, 193, 88, 0.45);
}

.btn-json-export {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  color: var(--text-parchment);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-json-export:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-bright);
}
