:root {
  --accent: #42d99d;
  --accent-soft: #153d31;
  --accent-border: #28604b;
  --accent-surface: #10251f;
  --accent-hero: #1d4937;
  --accent-hero-border: #204738;
  --accent-orb: #275943;
  --accent-shadow: #48e5a433;
  --accent-faint: #48e5a418;
  --accent-contrast: #07140e;
}

:root[data-theme="blue"] {
  --accent: #63adff;
  --accent-soft: #173653;
  --accent-border: #2d6694;
  --accent-surface: #102033;
  --accent-hero: #193e62;
  --accent-hero-border: #245477;
  --accent-orb: #285b82;
  --accent-shadow: #4aa3ff33;
  --accent-faint: #4aa3ff18;
  --accent-contrast: #071522;
}

.brand b,
.eyebrow.green,
.link-button,
.table-sort.active span,
.sort-heading.active span,
.period-arrow:hover,
.report-sort.active span,
.active-filter-chip span {
  color: var(--accent);
}

.brand-mark,
.primary,
.filter-toggle span:not(:empty) {
  background: var(--accent);
  color: var(--accent-contrast);
}

.brand-mark {
  box-shadow: 0 0 28px var(--accent-shadow);
}

.nav-item.active {
  box-shadow: inset 3px 0 var(--accent);
}

.nav-subitem.active {
  color: var(--accent);
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.auth-card input:focus,
.file-picker:hover,
.period-arrow:hover {
  border-color: var(--accent);
}

.user-avatar,
.report-badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.hero-card {
  border-color: var(--accent-hero-border);
  background: radial-gradient(circle at 90% 0, var(--accent-hero) 0, transparent 32%), linear-gradient(135deg, #111a18, #10141a);
}

.hero-orb {
  border-color: var(--accent-orb);
  box-shadow: 0 0 60px var(--accent-faint);
}

#reportMetrics .metric.selected,
.filter-metrics .metric.selected {
  border-color: var(--accent);
  background: linear-gradient(145deg, var(--accent-surface), var(--surface));
  box-shadow: 0 0 0 1px var(--accent-faint);
}

.filter-metrics .metric:hover {
  border-color: var(--accent-border);
  background: var(--accent-surface);
}

.filter-metrics .metric:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-shadow);
}

#financeMetrics .metric strong,
#billingMetrics .metric strong,
#payablesMetrics .metric strong,
#reportMetrics .metric strong,
.dashboard-metrics strong,
.relationship-metrics strong,
.credit-metrics strong,
.reseller-metrics strong,
.audit-count-card strong {
  color: var(--accent);
}

.appearance-panel {
  max-width: 920px;
  padding: 24px;
}

.appearance-intro h2 {
  margin: 6px 0 7px;
}

.appearance-intro p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  line-height: 1.55;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.theme-option {
  display: grid;
  grid-template-columns: 68px 1fr 24px;
  align-items: center;
  gap: 14px;
  min-height: 102px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0e1217;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}

.theme-option:hover {
  border-color: #3b4755;
  transform: translateY(-1px);
}

.theme-option.selected {
  border-color: var(--accent);
  background: var(--accent-surface);
}

.theme-option > span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.theme-option small {
  color: var(--muted);
}

.theme-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  opacity: 0;
}

.theme-option.selected .theme-check {
  opacity: 1;
}

.theme-preview {
  position: relative;
  display: block;
  width: 68px;
  height: 54px;
  overflow: hidden;
  border: 1px solid #2b3540;
  border-radius: 9px;
  background: #0a0c10;
}

.theme-preview i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 16px;
  background: #11151b;
}

.theme-preview b {
  position: absolute;
  top: 8px;
  left: 24px;
  width: 34px;
  height: 9px;
  border-radius: 3px;
}

.theme-preview em {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 27px;
  height: 18px;
  border: 1px solid;
  border-radius: 4px;
}

.theme-preview-green b {
  background: #42d99d;
}

.theme-preview-green em {
  border-color: #28604b;
  background: #10251f;
}

.theme-preview-blue b {
  background: #63adff;
}

.theme-preview-blue em {
  border-color: #2d6694;
  background: #102033;
}

.appearance-note {
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 720px) {
  .theme-options {
    grid-template-columns: 1fr;
  }
}
