/* Reset and base */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #c9d1d9;
  background: #0d1117;
}
a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: #161b22;
  border-right: 1px solid #30363d;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.logo {
  padding: 20px 16px;
  font-size: 20px;
  font-weight: 600;
  color: #c9d1d9;
  border-bottom: 1px solid #30363d;
}
.nav-items {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}
.nav-items li a,
.nav-items li span {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: #c9d1d9;
  text-decoration: none;
  transition: background 0.15s;
}
.nav-items li a:hover {
  background: #21262d;
  text-decoration: none;
}
.nav-items li.active a {
  background: #21262d;
  border-left: 2px solid #58a6ff;
  padding-left: 14px;
}
.nav-items li.disabled span {
  color: #6e7681;
  cursor: not-allowed;
}
.nav-items li.disabled span::after {
  content: 'Coming soon';
  font-size: 10px;
  background: #30363d;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}

/* Main content */
.content {
  flex: 1;
  background: #0d1117;
  padding: 24px;
  overflow-y: auto;
}

/* Page header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.page-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

/* Cards */
.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
}
.card-header {
  padding: 16px;
  border-bottom: 1px solid #30363d;
  font-weight: 600;
}
.card-body {
  padding: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}
.btn-primary {
  background: #238636;
  color: white;
}
.btn-primary:hover {
  background: #2ea043;
}
.btn-secondary {
  background: transparent;
  color: #c9d1d9;
  border: 1px solid #30363d;
}
.btn-secondary:hover {
  background: #21262d;
}
.btn-danger {
  background: #da3633;
  color: white;
}
.btn-danger:hover {
  background: #f85149;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.badge-in-progress {
  background: #d29922;
  color: #0d1117;
}
.badge-completed {
  background: #238636;
  color: white;
}
.badge-failed {
  background: #da3633;
  color: white;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #30363d;
  color: #8b949e;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #21262d;
}
.table tbody tr:hover {
  background: #161b22;
}
.table tbody tr[hx-get] {
  cursor: pointer;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px;
  color: #8b949e;
}
.empty-state p {
  margin: 8px 0;
}

/* File upload */
.file-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #238636;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
.file-upload-label:hover {
  background: #2ea043;
}

/* Spinner */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #30363d;
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner-message {
  color: #8b949e;
}

/* Detail page layout */
.detail-container {
  display: flex;
  gap: 16px;
  height: calc(100vh - 120px);
}
.pdf-panel {
  flex: 1;
  min-width: 300px;
  max-width: 800px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
  resize: horizontal;
}
.pdf-panel iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.data-panel {
  flex: 1;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow-y: auto;
}
.panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #30363d;
}
.panel-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}
.panel-body {
  padding: 16px;
}

/* Data list */
.data-list {
  display: grid;
  gap: 12px;
}
.data-list dt {
  font-size: 12px;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-list dd {
  margin: 4px 0 0 0;
  color: #c9d1d9;
}

/* HTMX loading indicator */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: inline-block;
}
.htmx-request.htmx-indicator {
  display: inline-block;
}

/* Invoice detail components */
.invoice-section {
  margin-bottom: 24px;
}
.invoice-section:last-child {
  margin-bottom: 0;
}
.section-header {
  font-size: 11px;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #30363d;
}

/* Invoice header grid */
.invoice-header-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .invoice-header-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Parties grid */
.parties-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 700px) {
  .parties-grid {
    grid-template-columns: 1fr;
  }
}

/* Party card */
.party-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px;
}
.party-card-title {
  font-size: 11px;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.party-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #c9d1d9;
  margin-bottom: 8px;
}
.party-card-address {
  color: #8b949e;
  white-space: pre-line;
  margin-bottom: 12px;
  line-height: 1.4;
}
.party-card-field {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}
.party-card-field-label {
  color: #6e7681;
  min-width: 70px;
}
.party-card-field-value {
  color: #c9d1d9;
}

/* Field styling */
.field-group {
  margin-bottom: 12px;
}
.field-group:last-child {
  margin-bottom: 0;
}
.field-label {
  font-size: 11px;
  font-weight: 500;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.field-value {
  color: #c9d1d9;
  font-size: 14px;
}
.field-value.monospace {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}
.field-value.na {
  color: #6e7681;
  font-style: italic;
}
.field-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 4px;
  color: #8b949e;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.copy-btn:hover {
  background: #21262d;
  color: #c9d1d9;
}
.copy-btn.copied {
  background: #238636;
  border-color: #238636;
  color: white;
}
.copy-btn svg {
  width: 14px;
  height: 14px;
}
.copy-btn .check-icon {
  display: none;
}
.copy-btn.copied .copy-icon {
  display: none;
}
.copy-btn.copied .check-icon {
  display: block;
}

/* Confidence badge */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.confidence-badge.high {
  background: rgba(35, 134, 54, 0.2);
  color: #3fb950;
}
.confidence-badge.medium {
  background: rgba(210, 153, 34, 0.2);
  color: #d29922;
}
.confidence-badge.low {
  background: rgba(218, 54, 51, 0.2);
  color: #f85149;
}

/* Line items table */
.line-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.line-items-table th {
  text-align: left;
  padding: 10px 12px;
  background: #0d1117;
  border-bottom: 1px solid #30363d;
  color: #8b949e;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.line-items-table th.numeric {
  text-align: right;
}
.line-items-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #21262d;
  color: #c9d1d9;
}
.line-items-table td.numeric {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}
.line-items-table tbody tr:nth-child(even) {
  background: rgba(22, 27, 34, 0.5);
}
.line-items-table tbody tr:hover {
  background: #161b22;
}

/* Financial summary */
.financial-summary {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px;
  max-width: 320px;
  margin-left: auto;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.summary-row-label {
  color: #8b949e;
}
.summary-row-value {
  color: #c9d1d9;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}
.summary-row-value.discount {
  color: #3fb950;
}
.summary-row.total {
  border-top: 1px solid #30363d;
  margin-top: 8px;
  padding-top: 12px;
}
.summary-row.total .summary-row-label {
  font-weight: 600;
  color: #c9d1d9;
}
.summary-row.total .summary-row-value {
  font-size: 16px;
  font-weight: 600;
  color: #58a6ff;
}

/* Payment details */
.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 700px) {
  .payment-grid {
    grid-template-columns: 1fr;
  }
}
.payment-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px;
}
.payment-card-title {
  font-size: 11px;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Collapsible sections */
.collapsible-section .section-body {
  overflow: visible;
}
.collapsible-section.collapsed .section-body {
  display: none;
}
.section-header-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.section-header-toggle:hover {
  color: #c9d1d9;
}
.section-header-toggle .chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease-out;
  color: #6e7681;
}
.collapsible-section.collapsed .chevron {
  transform: rotate(-90deg);
}

/* Empty state placeholder */
.empty-placeholder {
  color: #6e7681;
  font-style: italic;
  padding: 12px 0;
}
.party-card.empty {
  min-height: 80px;
}

/* Email connection banner */
.email-connection-banner {
  background: linear-gradient(135deg, #161b22 0%, #1c2128 100%);
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}
.email-connection-banner.warning {
  border-color: #d29922;
  background: linear-gradient(135deg, #1c1a14 0%, #211f17 100%);
}
.email-connection-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.email-connection-banner-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #21262d;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b949e;
}
.email-connection-banner.warning .email-connection-banner-icon {
  background: rgba(210, 153, 34, 0.2);
  color: #d29922;
}
.email-connection-banner-text {
  flex: 1;
}
.email-connection-banner-title {
  font-size: 16px;
  font-weight: 600;
  color: #c9d1d9;
  margin-bottom: 8px;
}
.email-connection-banner-description {
  color: #8b949e;
  margin-bottom: 16px;
  line-height: 1.5;
}
.email-connection-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-outlook {
  background: #0078d4;
  color: white;
}
.btn-outlook:hover {
  background: #106ebe;
}
.btn-gmail {
  background: #ea4335;
  color: white;
}
.btn-gmail:hover {
  background: #d93025;
}

/* Master Data Sections */
.master-data-section {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}
.master-data-section h2 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 600;
}

/* Upload Zone */
.upload-zone {
  margin-bottom: 20px;
}
.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px;
  border: 2px dashed #30363d;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.upload-dropzone:hover {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.02);
}

/* Upload spinner (HTMX indicator) */
.upload-spinner {
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 16px;
}
.htmx-request .upload-spinner.htmx-indicator,
.upload-spinner.htmx-indicator.htmx-request {
  display: flex;
}

/* Dataset info */
.dataset-info {
  border-top: 1px solid #30363d;
  padding-top: 16px;
}
.dataset-meta {
  margin-bottom: 16px;
  color: #8b949e;
  font-size: 13px;
}

/* Error section */
.master-data-section.error {
  border-left: 3px solid #da3633;
  background: rgba(218, 54, 51, 0.1);
}
.validation-errors p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.validation-errors ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.validation-errors li {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(218, 54, 51, 0.1);
  border-left: 2px solid #da3633;
  border-radius: 4px;
  font-size: 13px;
}

/* Success toast */
.success-toast {
  background: rgba(35, 134, 54, 0.1);
  border-left: 3px solid #238636;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #3fb950;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Scrollable table container */
.table-container {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #30363d;
  border-radius: 6px;
}
.table-container .table {
  margin: 0;
  border: none;
}
.table-container thead {
  position: sticky;
  top: 0;
  background: #161b22;
  z-index: 1;
}
.master-data-section .table-container {
  max-width: 600px;
}

/* Sortable table headers */
.table.sortable th {
  cursor: pointer;
  user-select: none;
}
.table.sortable th:hover {
  background: #21262d;
}
.table.sortable th iconify-icon {
  opacity: 0.5;
  margin-left: 4px;
}
.table.sortable th:hover iconify-icon,
.table.sortable th.sort-active iconify-icon {
  opacity: 1;
}
.table.sortable th.htmx-request {
  opacity: 0.6;
}

/* Accounts & Cost Center Components */

/* Reasoning toggle */
.reasoning-container {
  margin-top: 8px;
}
.reasoning-toggle {
  background: transparent;
  border: none;
  color: #58a6ff;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.reasoning-toggle:hover {
  text-decoration: underline;
}
.reasoning-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.2s ease-out;
  font-size: 12px;
  color: #8b949e;
  line-height: 1.5;
  background: #0d1117;
  border-radius: 4px;
}
.reasoning-text.expanded {
  max-height: 200px;
  padding: 12px;
  margin-top: 8px;
  overflow-y: auto;
}

/* Account card (inline in line items) */
.account-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 8px 12px;
  min-width: 180px;
}
.account-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-number {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  color: #58a6ff;
  font-weight: 600;
  font-size: 13px;
}
.account-name {
  color: #c9d1d9;
  font-size: 13px;
}
.account-card .confidence-badge {
  margin-left: auto;
}

/* Cost center card */
.cost-center-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px;
}
.cost-center-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.cost-center-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cost-center-number {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  color: #58a6ff;
  font-weight: 600;
  font-size: 16px;
}
.cost-center-name {
  color: #c9d1d9;
  font-size: 15px;
  font-weight: 500;
}
.cost-center-employee {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.cost-center-employee .label {
  color: #6e7681;
}
.cost-center-employee .employee-name {
  color: #c9d1d9;
}

/* Accrual badge */
.accrual-badge-container {
  min-width: 140px;
}
.accrual-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.accrual-type-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}
.accrual-type-badge.single-period {
  background: rgba(139, 148, 158, 0.2);
  color: #8b949e;
}
.accrual-type-badge.multi-month {
  background: rgba(88, 166, 255, 0.2);
  color: #58a6ff;
}
.accrual-type-badge.multi-year {
  background: rgba(163, 113, 247, 0.2);
  color: #a371f7;
}
.accrual-period-count {
  font-size: 12px;
  color: #6e7681;
}
.accrual-periods {
  margin-top: 8px;
  padding: 8px;
  background: #0d1117;
  border-radius: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 4px;
}
.accrual-period {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 2px 0;
}
.period-label {
  color: #8b949e;
}
.period-amount {
  color: #c9d1d9;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}
.accrual-period.more {
  color: #6e7681;
  font-style: italic;
  grid-column: 1 / -1;
}

/* Service category badge */
.service-category-badge {
  display: inline-block;
}
.service-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.category-label.goods { background: #1f3d1f; color: #3fb950; }
.category-label.services { background: #1d3a4e; color: #58a6ff; }
.category-label.consulting { background: #3d2c4e; color: #a371f7; }
.category-label.software { background: #2d3a2d; color: #7ee787; }
.category-label.insurance { background: #3d3a1f; color: #d29922; }
.category-label.travel { background: #1f3d3d; color: #3dd6d6; }
.category-label.other { background: #2d2d2d; color: #8b949e; }

/* BU code badge */
.bu-code-badge {
  display: inline-block;
  margin-left: 16px;
}
.bu-code-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bu-code-label {
  color: #6e7681;
  font-size: 12px;
}
.bu-code-value {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  color: #c9d1d9;
  font-weight: 600;
  font-size: 14px;
}
.transaction-type {
  font-size: 11px;
  color: #8b949e;
  background: #21262d;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Classification section content */
.classification-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Line Item Cards */
.line-items-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.line-item-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  position: relative;
}

.line-item-description {
  font-size: 14px;
  color: #c9d1d9;
  line-height: 1.5;
  margin-bottom: 12px;
  padding-right: 140px; /* Space for amount */
}

.line-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #21262d;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 10px;
  color: #6e7681;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 13px;
  color: #c9d1d9;
}

.meta-value.monospace {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

.meta-value.discount {
  color: #3fb950;
}

/* Line item enrichments (account + accrual) */
.line-item-enrichments {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.enrichment-badge {
  flex: 1;
  min-width: 200px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 10px 12px;
}

.enrichment-label {
  display: block;
  font-size: 10px;
  color: #6e7681;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.enrichment-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.enrichment-badge .account-number {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  color: #58a6ff;
  font-weight: 600;
  font-size: 14px;
}

.enrichment-badge .account-name {
  color: #c9d1d9;
  font-size: 13px;
}

.enrichment-badge .reasoning-container {
  flex-basis: 100%;
  margin-top: 4px;
}

/* Accrual specific styles in enrichment */
.accrual-single-period {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  color: #8b949e;
  font-size: 12px;
}

.accrual-periods-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-basis: 100%;
  margin-top: 8px;
}

.period-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #21262d;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.period-chip .period-label {
  color: #8b949e;
}

.period-chip .period-amount {
  color: #c9d1d9;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

.period-chip.more {
  color: #6e7681;
  font-style: italic;
}

/* Line item amount (prominent, top-right) */
.line-item-amount {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #58a6ff;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .line-item-description {
    padding-right: 0;
    margin-bottom: 8px;
  }

  .line-item-amount {
    position: static;
    text-align: right;
    margin-bottom: 12px;
  }

  .enrichment-badge {
    min-width: 100%;
  }
}

/* Validation Semaphore (traffic light dots) */
.validation-semaphore {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.validation-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  transition: transform 0.15s;
}

.validation-dot:hover {
  transform: scale(1.3);
}

.validation-dot.pass {
  background: #3fb950;
}

.validation-dot.warning {
  background: #d29922;
}

.validation-dot.error {
  background: #f85149;
}

.validation-dot.uncertain {
  background: transparent;
  border: 2px solid #8b949e;
  width: 8px;
  height: 8px;
}

.validation-dot.missing {
  background: #30363d;
}

/* Validation Section */
.validation-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.validation-issues {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Validation Check Card */
.validation-check-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 12px 16px;
  border-left: 3px solid #30363d;
}

.validation-check-card.pass {
  border-left-color: #3fb950;
}

.validation-check-card.warning {
  border-left-color: #d29922;
  background: rgba(210, 153, 34, 0.05);
}

.validation-check-card.error {
  border-left-color: #f85149;
  background: rgba(248, 81, 73, 0.05);
}

.validation-check-card.uncertain {
  border-left-color: #8b949e;
  background: rgba(139, 148, 158, 0.05);
}

.validation-check-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.validation-check-card.pass .validation-status-icon {
  color: #3fb950;
}

.validation-check-card.warning .validation-status-icon {
  color: #d29922;
}

.validation-check-card.error .validation-status-icon {
  color: #f85149;
}

.validation-check-card.uncertain .validation-status-icon {
  color: #8b949e;
}

.validation-check-label {
  font-weight: 500;
  color: #c9d1d9;
  font-size: 14px;
}

.inferred-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(88, 166, 255, 0.2);
  color: #58a6ff;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.validation-check-message {
  margin-top: 8px;
  color: #8b949e;
  font-size: 13px;
  line-height: 1.5;
}

.validation-check-field {
  margin-top: 6px;
  font-size: 12px;
  display: flex;
  gap: 6px;
}

.validation-check-field .field-label {
  color: #6e7681;
}

.validation-check-field .field-name {
  color: #58a6ff;
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

.validation-resolved-value {
  margin-top: 6px;
  font-size: 13px;
  display: flex;
  gap: 6px;
}

.validation-resolved-value .resolved-label {
  color: #6e7681;
}

.validation-resolved-value .resolved-value {
  color: #3fb950;
  font-weight: 500;
}

.validation-details {
  margin-top: 8px;
}

.validation-details summary {
  font-size: 12px;
  color: #58a6ff;
  cursor: pointer;
}

.validation-details summary:hover {
  text-decoration: underline;
}

.validation-details pre {
  margin: 8px 0 0 0;
  padding: 8px;
  background: #161b22;
  border-radius: 4px;
  font-size: 11px;
  color: #8b949e;
  overflow-x: auto;
}

/* Passed checks summary */
.validation-passed-summary {
  margin-top: 8px;
}

.validation-passed-summary summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #3fb950;
  cursor: pointer;
}

.validation-passed-summary summary iconify-icon {
  font-size: 14px;
}

.validation-passed-summary summary:hover {
  text-decoration: underline;
}

.validation-passed-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  background: #0d1117;
  border-radius: 4px;
}

.passed-check-chip {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border-radius: 4px;
  font-size: 12px;
}

/* All passed state */
.validation-all-passed {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
  border-radius: 6px;
}

.validation-all-passed iconify-icon {
  color: #3fb950;
  font-size: 20px;
}

.all-passed-text {
  color: #3fb950;
  font-size: 14px;
  font-weight: 500;
}

/* Validation section header content */
.validation-header-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.validation-header-content iconify-icon {
  font-size: 14px;
}

/* Issue count badge in section header - subtle inline style */
.validation-issue-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  background: rgba(248, 81, 73, 0.2);
  color: #f85149;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
}

/* Validation status icon sizing */
.validation-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}

.validation-status-icon iconify-icon {
  font-size: 16px;
}
