/* ============================================
   sck-forms Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #FDF6E3;
  color: #1F2937;
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* --- A. Page Header (Slim 48px bar) --- */
.header {
  background: #1E40AF;
  color: white;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  margin: -24px -20px 24px -20px;
  width: calc(100% + 40px);
}
.header h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.header .subtitle {
  font-size: 12px;
  opacity: 0.85;
  margin-left: 12px;
  font-weight: 400;
}
.header .header-link {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 150ms;
}
.header .header-link:hover {
  color: white;
  background: rgba(255,255,255,0.15);
}

/* --- Messages --- */
.message {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
}
.message.error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.message.info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.message.success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }

/* --- B. Breadcrumb Navigation --- */
.nav-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  align-items: center;
  font-size: 14px;
}
.nav-bar a {
  text-decoration: none;
  color: #2563EB;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-bar a:hover { text-decoration: underline; }
.nav-bar .sep {
  color: #6B7280;
  font-size: 12px;
}
.nav-bar .current-page {
  color: #374151;
  font-weight: 500;
}

/* --- C. Draft Header Card --- */
.draft-header {
  background: #FEFBF1;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.draft-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.draft-header .bsc-number {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}
.draft-header .meta {
  font-size: 12px;
  color: #374151;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.draft-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* --- Pill Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 9999px;
}
.badge.draft { background: #FEF3C7; color: #92400E; }
.badge.confirmed { background: #D1FAE5; color: #065F46; }
.badge.submitted { background: #DBEAFE; color: #1E40AF; }
.badge.brand-sck { background: #DBEAFE; color: #1E40AF; }
.badge.brand-global { background: #EDE9FE; color: #5B21B6; }

/* --- Buttons --- */
.btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: #2563EB; color: white; }
.btn-primary:hover { background: #1D4ED8; }
.btn-outline {
  background: transparent;
  color: #2563EB;
  border: 1px solid #2563EB;
}
.btn-outline:hover {
  background: #EFF6FF;
}
.btn-danger { background: #DC2626; color: white; }
.btn-danger:hover { background: #B91C1C; }
.btn-success { background: #059669; color: white; }
.btn-success:hover { background: #047857; }
.btn-secondary { background: #EEE8D5; color: #374151; border: 1px solid #DDD6C1; }
.btn-secondary:hover { background: #DDD6C1; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* --- H. Icon Buttons --- */
.icon-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  background: transparent;
  color: #4B5563;
  font-size: 14px;
  cursor: pointer;
  transition: all 150ms ease;
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
  line-height: 1;
}
.icon-btn:hover { background: #EEE8D5; }
.icon-btn:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

.icon-btn.download:hover {
  color: #2563EB;
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.icon-btn.remove:hover {
  color: #DC2626;
  background: #FEF2F2;
  border-color: #FECACA;
}
.icon-btn.upload:hover {
  color: #059669;
  background: #ECFDF5;
  border-color: #A7F3D0;
}
.icon-btn.delete-draft {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #6B7280;
}
.icon-btn.delete-draft:hover {
  color: #DC2626;
  background: #FEF2F2;
  border-color: #FECACA;
}

/* --- D. Importer Search Bar --- */
.importer-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.importer-search-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}
.importer-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7280;
  font-size: 14px;
  pointer-events: none;
}
.section-body .importer-search-wrap input[type="text"],
.importer-search-wrap input {
  width: 100%;
  height: 40px;
  padding: 8px 12px 8px 36px;
  border: 1px solid #DDD6C1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #FEFBF1;
  transition: border-color 150ms, box-shadow 150ms;
}
.section-body .importer-search-wrap input[type="text"]:focus,
.importer-search-wrap input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}
.importer-search-wrap input::placeholder { color: #6B7280; }
.search-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #DDD6C1;
  background: #FEFBF1;
  color: #4B5563;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 150ms;
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
}
.search-action-btn.text-btn {
  width: auto;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.search-action-btn:hover {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #2563EB;
}
.importer-search-status {
  font-size: 12px;
  color: #4B5563;
  margin-left: 4px;
}

/* Importer error banner */
.importer-banner {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.importer-banner.error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}
.importer-banner.searching {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

/* --- E. Section Cards --- */
.section {
  background: #FAF5E4;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  overflow: hidden;
}
.section.readonly {
  background: #EEE8D5;
}
.section.readonly .section-header { border-left: 4px solid #94A3B8; }
.section.editable .section-header { border-left: 4px solid #2563EB; }
.section.list-section .section-header { border-left: 4px solid #059669; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 150ms;
  background: #FEFBF1;
}
.section-header:hover { background: #FAF5E4; }
.section-header h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1F2937;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header .section-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.section.editable .section-dot { background: #2563EB; }
.section.list-section .section-dot { background: #059669; }
.section.readonly .section-dot { background: #CBD5E1; }
.section-header .count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: #D1D5DB;
  color: #1F2937;
  font-size: 11px;
  font-weight: 600;
}
.section-header .chevron {
  color: #6B7280;
  font-size: 14px;
  transition: transform 200ms ease;
  flex-shrink: 0;
}
.section-header .chevron.collapsed {
  transform: rotate(-90deg);
}

.section-body {
  padding: 20px 16px;
  border-top: 1px solid #DDD6C1;
}
.section-body.collapsed { display: none; }

/* --- F. Read-Only Data Grid (Importer) --- */
.importer-compact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px;
}
.importer-compact .imp-field {
  padding: 6px 0;
}
.importer-compact .imp-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9CA3AF;
  margin-bottom: 3px;
  display: block;
}
.importer-compact .imp-val {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}
.importer-compact .imp-val.empty-val {
  color: #D1D5DB;
  font-style: italic;
  font-weight: 400;
}

/* --- Search Results List --- */
.search-results-section {
  margin-top: 16px;
  border-top: 1px solid #E5E7EB;
  padding-top: 12px;
}
.sr-header {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
  user-select: none;
  padding: 4px 0;
}
.sr-header:hover { color: #374151; }
.sr-toggle { font-size: 10px; margin-right: 4px; }
.sr-count { font-weight: 400; color: #9CA3AF; }
.sr-body { margin-top: 8px; }
.sr-body.hidden { display: none; }
.search-result-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  margin-bottom: 6px;
  background: #FAFAFA;
  gap: 4px 12px;
}
.search-result-row.selected {
  border-color: #3B82F6;
  background: #EFF6FF;
}
.sr-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.sr-name {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.sr-name:hover {
  text-decoration: underline;
  color: #2563EB;
}
.sr-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.sr-badge.selected {
  background: #DBEAFE;
  color: #1D4ED8;
}
.sr-details {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #6B7280;
  flex-shrink: 0;
}
.sr-account { font-family: monospace; }
.sr-score {
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 11px;
}
.sr-score.high { background: #D1FAE5; color: #065F46; }
.sr-score.mid { background: #FEF3C7; color: #92400E; }
.sr-score.low { background: #FEE2E2; color: #991B1B; }
.sr-select-btn {
  font-size: 11px;
  padding: 3px 10px;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
}
.sr-select-btn:hover {
  background: #F3F4F6;
  border-color: #9CA3AF;
}
.sr-select-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- G. Editable Form Grids --- */
.grid-2col {
  display: grid;
  grid-template-columns: 100px 1fr 100px 1fr;
  gap: 14px 16px;
  align-items: start;
}
.grid-2col .span-rest {
  grid-column: 2 / -1;
}

.data-grid {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px 12px;
  align-items: center;
}

.data-label {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-top: 10px;
}

.section-body input[type="text"],
.section-body input[type="number"],
.section-body select,
.section-body textarea {
  padding: 9px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: white;
  width: 100%;
  transition: border-color 150ms, box-shadow 150ms;
  appearance: none;
  -webkit-appearance: none;
}
.section-body input[type="text"]:focus,
.section-body input[type="number"]:focus,
.section-body select:focus,
.section-body textarea:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}
.section-body input[readonly] {
  background: #EEE8D5;
  color: #374151;
  cursor: default;
  border-color: #DDD6C1;
}
.section-body input::placeholder { color: #6B7280; }
.section-body textarea::placeholder { color: #6B7280; }

.section-body textarea {
  resize: none;
  overflow: hidden;
  min-height: 38px;
  line-height: 1.5;
  field-sizing: content;
}

/* Custom select arrow */
.section-body select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

/* --- Roadmap Side-by-Side --- */
.roadmap-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}
.roadmap-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: #1F2937;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #DDD6C1;
}
.roadmap-col .data-grid {
  grid-template-columns: 70px 1fr;
}

/* --- I. Dynamic List Items (Invoice Items, Containers) --- */
.dynamic-list-item {
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  padding: 16px 16px;
  margin-bottom: 10px;
  background: white;
  position: relative;
}
.dynamic-list-item .delete-row-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}
.dynamic-list-item .grid-2col {
  padding-right: 40px;
}

/* --- J. Add Buttons (Ghost/Dashed) --- */
.add-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 40px;
  border: 1px dashed #9CA3AF;
  border-radius: 6px;
  background: transparent;
  color: #4B5563;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 150ms ease;
  margin-top: 8px;
}
.add-item-btn:hover {
  border-color: #93C5FD;
  color: #2563EB;
  background: #EFF6FF;
}
.add-item-btn .plus {
  font-size: 16px;
  font-weight: 600;
}

/* --- K. Clear Button (inline in input) --- */
.input-with-clear {
  position: relative;
  flex: 1;
}
.input-with-clear input {
  padding-right: 32px !important;
}
.input-with-clear .clear-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #6B7280;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 150ms;
  padding: 0;
}
.input-with-clear .clear-btn:hover {
  color: #4B5563;
  background: #EEE8D5;
}

/* --- L. Document Tables --- */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.doc-table th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
  background: #EEE8D5;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #DDD6C1;
}
.doc-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #DDD6C1;
  vertical-align: middle;
}
.doc-table tr:hover td { background: #FAF5E4; }

.doc-table .doc-label {
  font-weight: 600;
  color: #1F2937;
  font-size: 13px;
  white-space: nowrap;
}
.doc-table input[type="text"] {
  border: 1px solid #D1D5DB;
  background: white;
  padding: 6px 8px !important;
  font-size: 13px !important;
  border-radius: 6px;
  transition: all 150ms;
}
.doc-table input[type="text"]:focus {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.doc-file-cell {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}
.file-link {
  font-size: 12px;
  color: #2563EB;
  text-decoration: none;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.file-link:hover { text-decoration: underline; }
.no-file {
  font-size: 12px;
  color: #6B7280;
  font-style: italic;
}

/* --- M. Drafts Listing Table --- */
.draft-list-table {
  width: 100%;
  background: #FEFBF1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.draft-list-table th {
  background: #EEE8D5;
  font-size: 11px;
  padding: 10px 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid #DDD6C1;
}
.draft-list-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid #E6DFCA;
}
.draft-list-table tbody tr {
  cursor: pointer;
  transition: all 150ms;
}
.draft-list-table tbody tr:hover td {
  background: #EEE8D5;
}
.draft-list-table tbody tr:hover .row-chevron {
  transform: translateX(2px);
  color: #2563EB;
}
.row-chevron {
  color: #9CA3AF;
  font-size: 14px;
  transition: all 150ms;
}

/* --- List Search --- */
.list-search {
  margin-bottom: 12px;
}
.list-search input {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid #DDD6C1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #FEFBF1;
  transition: border-color 150ms, box-shadow 150ms;
}
.list-search input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}
.list-search input::placeholder {
  color: #6B7280;
}

/* --- N. Filter Dropdowns --- */
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.filters .filter-label {
  font-size: 12px;
  color: #374151;
  font-weight: 600;
}
.filters select {
  padding: 7px 32px 7px 12px;
  border: 1px solid #DDD6C1;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #1F2937;
  background: #FEFBF1;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  transition: border-color 150ms;
}
.filters select:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}

/* --- Checkbox --- */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2563EB;
}
.checkbox-row span {
  font-size: 13px;
  color: #374151;
}

/* --- Auto-save indicator --- */
.save-indicator {
  font-size: 12px;
  color: #4B5563;
  display: flex;
  align-items: center;
  gap: 4px;
}
.save-indicator.saving { color: #D97706; }
.save-indicator.saved { color: #059669; }
.save-indicator.error { color: #DC2626; }

/* --- Invoice file slot inline --- */
.inline-file-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 8px 0;
}
.inline-file-slot .slot-label {
  font-weight: 600;
  color: #1F2937;
  font-size: 13px;
}

/* --- Empty state --- */
.empty-list {
  text-align: center;
  padding: 24px;
  color: #4B5563;
  font-size: 14px;
}

/* --- Conditional fields --- */
.conditional-fields { margin-top: 8px; }
.conditional-fields.hidden-field { display: none; }

/* --- Loading --- */
.loading-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
}

/* --- Spinner --- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #DDD6C1;
  border-top-color: #2563EB;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
.spinner.lg { width: 32px; height: 32px; border-width: 3px; }

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

/* --- Utility --- */
.hidden { display: none !important; }

/* --- Focus Accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* --- Search/Revision Styles (revise.html compat) --- */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #DDD6C1;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  transition: border-color 150ms, box-shadow 150ms;
}
.search-bar input:focus {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}
.search-bar button {
  padding: 10px 24px;
  background: #2563EB;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms;
}
.search-bar button:hover { background: #1D4ED8; }
.search-bar button:disabled { background: #9CA3AF; cursor: not-allowed; }

/* BSC header (revision page) */
.bsc-header {
  background: #FEFBF1;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.bsc-header .bsc-number {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}
.bsc-header .meta-info {
  font-size: 12px;
  color: #4B5563;
}

/* Section (revision page compat) */
.section-header .badge.captured { background: #D1FAE5; color: #065F46; }
.section-header .badge.partial { background: #FEF3C7; color: #92400E; }
.section-header .badge.failed { background: #FEF2F2; color: #991B1B; }
.section-header .badge.skipped { background: #EEE8D5; color: #6B7280; }

/* ISO badges */
.iso-badge { font-size: 11px; padding: 2px 8px; border-radius: 9999px; font-weight: 600; }
.iso-badge.iso-yes { background: #D1FAE5; color: #065F46; }
.iso-badge.iso-no { background: #FEF2F2; color: #991B1B; }

/* Data value */
.data-value {
  color: #111827;
  font-size: 14px;
  word-break: break-word;
}
.data-value.empty { color: #9CA3AF; }

/* Read-only fields */
.read-only .data-value {
  background: #EEE8D5;
  color: #6B7280;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #DDD6C1;
}

/* Search field indicator */
.search-field {
  background: #FFFBEB;
  border: 1px dashed #F59E0B;
  padding: 4px 8px;
  border-radius: 4px;
  font-style: italic;
}
.search-field::before { content: ""; }
.field-note {
  font-size: 11px;
  color: #6B7280;
  font-style: italic;
  margin-top: 2px;
  display: block;
}

/* Edit field (revision compat) */
.edit-field {
  display: none;
  gap: 6px;
  align-items: center;
}
.edit-field input, .edit-field select {
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  max-width: 250px;
}
.edit-field input:focus, .edit-field select:focus {
  border-color: #2563EB;
  outline: none;
}
.editing .edit-field { display: flex; }
.editing .data-value.editable-value { display: none; }
.edit-toggle {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  background: #FEFBF1;
  cursor: pointer;
  color: #6B7280;
  font-family: inherit;
  transition: all 150ms;
}
.edit-toggle:hover { border-color: #2563EB; color: #2563EB; }
.edit-toggle.active { background: #2563EB; color: white; border-color: #2563EB; }

/* Tables (general, revision compat) */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 12px; text-align: left; }
th {
  background: #EEE8D5;
  font-weight: 700;
  color: #374151;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #DDD6C1;
}
td { border-bottom: 1px solid #E6DFCA; }

/* Submit bar (revision) */
.submit-bar {
  position: sticky;
  bottom: 20px;
  background: #FEFBF1;
  border-radius: 8px;
  padding: 14px 20px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}
.submit-bar .changes-summary { font-size: 14px; color: #6B7280; }
.submit-bar button {
  padding: 10px 24px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms;
}
.submit-bar button:hover { background: #047857; }
.submit-bar button:disabled { background: #9CA3AF; cursor: not-allowed; }

/* Job card (revision) */
.job-card {
  background: #FEFBF1;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-top: 16px;
}
.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.job-label { font-weight: 700; font-size: 16px; color: #111827; }
.badge.queued { background: #FEF3C7; color: #92400E; }
.badge.running { background: #DBEAFE; color: #1E40AF; }
.badge.completed { background: #D1FAE5; color: #065F46; }

#jobDetails { font-size: 14px; color: #6B7280; margin-bottom: 12px; }
#jobActions { display: flex; gap: 10px; }
#jobActions button {
  padding: 10px 20px;
  background: #2563EB;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
#jobActions button.secondary { background: #EEE8D5; color: #374151; }
#jobActions button:hover { opacity: 0.9; }

/* Cell editing (revision compat) */
.cell-value { display: inline; }
.cell-edit {
  display: none;
  padding: 4px 8px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  min-width: 80px;
}
.cell-edit:focus { border-color: #2563EB; outline: none; }
.editing .cell-value { display: none; }
.editing .cell-edit { display: block; }

/* Add container form (revision compat) */
.add-container-form {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #DDD6C1;
}
.editing .add-container-form { display: block; }
.add-container-form h4 {
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
  margin-bottom: 8px;
}
.add-container-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.add-container-inputs input {
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  flex: 1;
  min-width: 120px;
}
.add-container-inputs input:focus { border-color: #2563EB; outline: none; }
.add-container-inputs button {
  padding: 6px 16px;
  background: #2563EB;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.add-container-inputs button:hover { background: #1D4ED8; }

/* Pending table (revision compat) */
.pending-table {
  margin-top: 12px;
  background: #FFFBEB;
  border-radius: 6px;
}
.pending-table td, .pending-table th { padding: 6px 10px; font-size: 12px; }
.pending-table th { background: #FEF3C7; color: #92400E; }
.remove-btn {
  font-size: 11px;
  padding: 2px 10px;
  border: 1px solid #FECACA;
  border-radius: 4px;
  background: white;
  color: #DC2626;
  cursor: pointer;
  font-family: inherit;
}
.remove-btn:hover { background: #FEF2F2; }

/* Doc file upload (revision compat) */
.doc-file-upload {
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-file-upload input[type="file"] {
  font-size: 12px;
  max-width: 180px;
  border: none;
  padding: 0;
  min-width: auto;
}
.upload-status {
  font-size: 11px;
  color: #059669;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.file-indicator { font-size: 12px; color: #4B5563; }
.empty { color: #9CA3AF; }

/* ============================================
   TAB BAR & RAW DATA VIEWER
   ============================================ */

/* Tab bar */
.tab-bar {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid #DDD6C1;
}
.tab-btn {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #6B7280;
  cursor: pointer;
  transition: all 150ms;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tab-btn:hover {
  color: #374151;
  background: #EEE8D5;
}
.tab-btn.active {
  color: #1E40AF;
  border-bottom-color: #2563EB;
  background: transparent;
}

/* Raw data container */
.raw-data-container {
  background: #FEFBF1;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}
.raw-data-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #EEE8D5;
  border-bottom: 1px solid #DDD6C1;
}
.raw-data-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #374151;
}
.raw-data-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6B7280;
  font-size: 14px;
  font-style: italic;
}

/* JSON viewer */
.json-viewer {
  margin: 0;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #586E75;
  background: #FDF6E3;
  tab-size: 2;
  white-space: pre;
  word-wrap: normal;
}
.json-viewer code {
  font-family: inherit;
}

/* Solarized-inspired syntax colors */
.json-key { color: #268BD2; font-weight: 600; }
.json-string { color: #111827; }
.json-number { color: #D33682; }
.json-boolean { color: #B58900; font-weight: 600; }
.json-null { color: #93A1A1; font-style: italic; }

/* ============================================
   PHASE 2: CONFIRM / SUBMIT
   ============================================ */

/* Confirm button */
.btn-confirm {
  padding: 6px 16px;
  background: #D97706;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.btn-confirm:hover { background: #B45309; }

/* Submit button */
.btn-submit {
  padding: 6px 16px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.btn-submit:hover { background: #047857; }
.btn-submit:disabled { background: #9CA3AF; cursor: not-allowed; opacity: 0.7; }
.btn-submit:disabled:hover { background: #9CA3AF; }

/* Submit error banner */
.submit-error-banner {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.5;
}
.submit-error-banner.hidden { display: none; }

/* Submission history banner */
.submission-history-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.7;
}
.submission-history-banner.hidden { display: none; }

/* Warning modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.hidden { display: none; }

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.modal-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.modal-desc {
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 16px;
}

.warning-list {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
}
.warning-list li {
  padding: 6px 10px;
  font-size: 13px;
  color: #92400E;
  background: #FFFBEB;
  border-left: 3px solid #F59E0B;
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Report issue modal */
#reportIssueText {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  resize: vertical;
  margin-bottom: 12px;
}
#reportIssueText:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
  outline: none;
}
.report-screenshots { margin-bottom: 16px; }
.drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 2px dashed #D1D5DB;
  border-radius: 8px;
  color: #6B7280;
  font-size: 13px;
  cursor: pointer;
  transition: all 150ms;
  padding: 10px;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: #93C5FD;
  background: #EFF6FF;
  color: #2563EB;
}
#screenshotPreviews {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.screenshot-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #D1D5DB;
}
.screenshot-thumb-wrap {
  position: relative;
  display: inline-block;
}
.screenshot-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #EF4444;
  color: #fff;
  border: none;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  padding: 0;
  cursor: pointer;
}
.btn-report {
  color: #D97706;
  border-color: #D97706;
}
.btn-report:hover {
  background: #FFFBEB;
}

/* ============================================
   CHANGES TIMELINE
   ============================================ */

.changes-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6B7280;
  font-size: 14px;
  font-style: italic;
}

.changes-timeline {
  padding: 0;
}

.changes-day-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6B7280;
  padding: 16px 0 8px 0;
  border-bottom: 1px solid #DDD6C1;
  margin-bottom: 12px;
}
.changes-day-header:first-child {
  padding-top: 4px;
}

.changes-item {
  background: #FEFBF1;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border-left: 3px solid #3B82F6;
}
.changes-item-n8n {
  border-left-color: #D97706;
}
.changes-item-operator {
  border-left-color: #3B82F6;
}

.changes-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.changes-time {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
}

.changes-source-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 9999px;
}
.changes-source-badge.source-operator {
  background: #DBEAFE;
  color: #1E40AF;
}
.changes-source-badge.source-n8n {
  background: #FEF3C7;
  color: #92400E;
}

.changes-section-label {
  font-size: 13px;
  font-weight: 600;
  color: #1F2937;
}

.changes-fields {
  padding-left: 4px;
}

.changes-field {
  padding: 3px 0;
  font-size: 13px;
  line-height: 1.5;
}

.changes-field-label {
  font-weight: 600;
  color: #374151;
  margin-right: 6px;
}
.changes-field-label::after {
  content: ':';
}

.changes-value-old {
  color: #DC2626;
  text-decoration: line-through;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 12px;
}

.changes-value-new {
  color: #059669;
  font-weight: 500;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  font-size: 12px;
}

.changes-value-empty {
  color: #9CA3AF;
  font-style: italic;
  font-size: 12px;
}

.changes-arrow {
  color: #9CA3AF;
  font-size: 12px;
  margin: 0 2px;
}

/* ============================================
   JOB QUEUE LOG VIEWER
   ============================================ */

/* Queue status banner */
.queue-status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 16px;
  border-left: 4px solid #D1D5DB;
  background: #FEFBF1;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.queue-status-banner.idle { border-left-color: #059669; }
.queue-status-banner.running { border-left-color: #D97706; background: #FFFBEB; }
.queue-status-banner.queued { border-left-color: #2563EB; background: #EFF6FF; }

.queue-status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: #EEE8D5;
  color: #374151;
}
.queue-status-banner.idle .queue-status-icon { background: #D1FAE5; color: #065F46; }
.queue-status-banner.running .queue-status-icon { background: #FEF3C7; color: #92400E; }
.queue-status-banner.queued .queue-status-icon { background: #DBEAFE; color: #1E40AF; }

.queue-status-label {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}
.queue-status-detail {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
}

/* Recent jobs mini-log (drafts page) — warm theme */
.recent-jobs-log {
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  background: #FEFBF1;
  border: 1px solid #DDD6C1;
}
.recent-jobs-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #EEE8D5;
  border-bottom: 1px solid #DDD6C1;
}
.recent-jobs-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #374151;
}
.recent-jobs-link {
  font-size: 11px;
  color: #2563EB;
  text-decoration: none;
  font-weight: 500;
}
.recent-jobs-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}
.recent-jobs-entries {
  padding: 2px 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
}
.recent-jobs-entries .log-entry {
  padding: 5px 16px;
  border-bottom: 1px solid #E6DFCA;
  background: transparent;
}
.recent-jobs-entries .log-entry:last-child { border-bottom: none; }
.recent-jobs-entries .log-entry:hover { background: #EEE8D5; }
.recent-jobs-entries .log-ts { color: #6B7280; }
.recent-jobs-entries .log-bsc { color: #7C3AED; font-weight: 600; }
.recent-jobs-entries .log-ticket { color: #4B5563; }
.recent-jobs-entries .log-brand { color: #6B7280; }
.recent-jobs-entries .log-duration { color: #B45309; }
.recent-jobs-entries .log-error { color: #DC2626; padding-left: 92px; }

/* Type badges — light theme overrides */
.recent-jobs-entries .log-type-create { background: #1E40AF; color: #fff; }
.recent-jobs-entries .log-type-draft-reserve { background: #2563EB; color: #fff; }
.recent-jobs-entries .log-type-draft-submit { background: #7C3AED; color: #fff; }
.recent-jobs-entries .log-type-revision { background: #B45309; color: #fff; }
.recent-jobs-entries .log-type-importer-search { background: #0E7490; color: #fff; }

/* Status badges — light theme overrides */
.recent-jobs-entries .log-status-completed { background: #D1FAE5; color: #065F46; }
.recent-jobs-entries .log-status-queued { background: #FEF3C7; color: #92400E; }
.recent-jobs-entries .log-status-running { background: #DBEAFE; color: #1E40AF; }
.recent-jobs-entries .log-status-failed { background: #FEE2E2; color: #991B1B; }

/* Log container — terminal style */
.job-log-container {
  background: #1F2937;
  border-radius: 8px;
  padding: 4px 0;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 12.5px;
  line-height: 1.6;
}

.log-empty {
  text-align: center;
  padding: 40px 20px;
  color: #9CA3AF;
  font-size: 14px;
  font-style: italic;
}

/* Log entry row */
.log-entry {
  padding: 6px 16px;
  border-bottom: 1px solid #374151;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.log-entry:last-child { border-bottom: none; }
.log-entry:hover { background: #283547; }

/* Timestamp */
.log-ts {
  color: #6B7280;
  flex-shrink: 0;
  font-size: 12px;
}

/* Job type badge */
.log-type {
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.log-type-create { background: #1E40AF; color: #BFDBFE; }
.log-type-draft-reserve { background: #065F46; color: #A7F3D0; }
.log-type-draft-submit { background: #7C3AED; color: #DDD6FE; }
.log-type-revision { background: #B45309; color: #FEF3C7; }
.log-type-importer-search { background: #0F766E; color: #CCFBF1; }

/* Status badge */
.log-status {
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.log-status-queued { background: #92400E; color: #FEF3C7; }
.log-status-running { background: #1E40AF; color: #BFDBFE; }
.log-status-completed { background: #065F46; color: #A7F3D0; }
.log-status-failed { background: #991B1B; color: #FEE2E2; }

/* Detail spans */
.log-details {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
}
.log-bsc { color: #A78BFA; font-weight: 600; }
.log-ticket { color: #6EE7B7; }
.log-brand { color: #93C5FD; }
.log-duration { color: #FCD34D; }

/* Error line */
.log-error {
  width: 100%;
  color: #F87171;
  font-size: 12px;
  padding-left: 92px;
  word-break: break-all;
  margin-top: -2px;
  padding-bottom: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 960px) {
  .grid-2col {
    grid-template-columns: 100px 1fr;
  }
  .roadmap-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .importer-compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .container { padding: 16px 12px; }
  .header {
    margin: -16px -12px 16px -12px;
    width: calc(100% + 24px);
  }
  .grid-2col {
    grid-template-columns: 1fr;
    gap: 6px 0;
  }
  .grid-2col .data-label {
    text-align: left;
    margin-top: 4px;
  }
  .data-grid {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }
  .data-grid .data-label {
    text-align: left;
  }
  .importer-compact {
    grid-template-columns: 1fr;
  }
  .draft-header-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .draft-header-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .doc-table thead { display: none; }
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td {
    display: block;
    width: 100%;
  }
  .doc-table tr {
    padding: 10px;
    border: 1px solid #DDD6C1;
    border-radius: 8px;
    margin-bottom: 8px;
  }
  .doc-table td {
    border-bottom: none;
    padding: 4px 0;
  }
  .doc-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6B7280;
    margin-bottom: 2px;
  }
}
