/* AtlasToolkit enterprise design system.
   This file intentionally overrides page-local decorative styles while leaving
   workflows, IDs, and JavaScript hooks untouched. */

:root {
  --atlas-bg: #f5f6f8;
  --atlas-surface: #ffffff;
  --atlas-surface-muted: #f9fafb;
  --atlas-nav: #18233a;
  --atlas-nav-2: #243153;
  --atlas-primary: #23466f;
  --atlas-primary-hover: #193657;
  --atlas-accent: #b58a35;
  --atlas-text: #172033;
  --atlas-muted: #667085;
  --atlas-border: #d8dee8;
  --atlas-border-strong: #b8c2d2;
  --atlas-success: #166534;
  --atlas-success-bg: #ecfdf3;
  --atlas-warning: #9a6700;
  --atlas-warning-bg: #fffaeb;
  --atlas-error: #b42318;
  --atlas-error-bg: #fef3f2;
  --atlas-info: #175cd3;
  --atlas-info-bg: #eff6ff;
  --atlas-radius: 10px;
  --atlas-radius-sm: 6px;
  --atlas-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --atlas-shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.08);
  --atlas-font: "Aptos", "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --atlas-mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--atlas-bg);
  color: var(--atlas-text);
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--atlas-text) !important;
  font-family: var(--atlas-font) !important;
  background: var(--atlas-bg) !important;
  line-height: 1.45;
}

body::before,
body::after,
.hero::before,
.hero::after,
.mascot,
.bubble,
.seal,
.orb {
  display: none !important;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex !important;
  align-items: stretch !important;
  gap: 18px !important;
  min-height: 64px;
  padding: 0 28px !important;
  color: #fff !important;
  background: var(--atlas-nav) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.12) !important;
}

.header-brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 210px;
  padding: 13px 0 !important;
}

.header-brand svg {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

header h1 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.1 !important;
}

header p {
  margin: 3px 0 0 !important;
  color: rgba(255, 255, 255, 0.72) !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}

.header-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin-left: auto !important;
  overflow-x: auto;
  scrollbar-width: thin;
}

.header-tabs a {
  display: inline-flex !important;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px !important;
  border: 1px solid transparent !important;
  border-radius: var(--atlas-radius-sm) !important;
  color: rgba(255, 255, 255, 0.76) !important;
  background: transparent !important;
  font-size: 0.76rem !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.header-tabs a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.header-tabs a.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.20) !important;
}

main {
  width: min(1180px, calc(100% - 40px)) !important;
  max-width: 1180px !important;
  margin: 28px auto 64px !important;
  padding: 0 !important;
  display: grid;
  gap: 18px !important;
}

.hero {
  display: block !important;
  padding: 24px 26px !important;
  overflow: visible !important;
  color: var(--atlas-text) !important;
  background: var(--atlas-surface) !important;
  border: 1px solid var(--atlas-border) !important;
  border-radius: var(--atlas-radius) !important;
  box-shadow: var(--atlas-shadow) !important;
}

.hero h2,
.hero-title {
  max-width: 880px;
  margin: 0 !important;
  color: var(--atlas-text) !important;
  font-family: var(--atlas-font) !important;
  font-size: clamp(1.55rem, 2.25vw, 2.15rem) !important;
  font-weight: 680 !important;
  letter-spacing: -0.012em !important;
  line-height: 1.14 !important;
}

.hero p,
.hero-copy {
  max-width: 780px !important;
  margin: 10px 0 0 !important;
  color: var(--atlas-muted) !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
}

.hero-actions,
.actions,
.button-row,
.run-bar,
.source-row,
.output-row {
  gap: 10px !important;
}

.card,
.panel,
.advanced,
.metric,
.status,
.upload-card,
.source-block,
.vet-card,
.control-card,
.stat,
.result,
.step-card,
.tile,
.order-card,
.guide-card,
.drop,
.property-list,
.multiselect-wrap,
#progress-card,
#result,
#audit-outputs {
  background: var(--atlas-surface) !important;
  border: 1px solid var(--atlas-border) !important;
  border-radius: var(--atlas-radius) !important;
  box-shadow: var(--atlas-shadow) !important;
}

.card,
.panel,
.advanced,
.guide-card {
  padding: 22px !important;
}

.card-title,
.panel h3,
.metric b,
.tile b,
.order-card h3,
.guide-card h3 {
  color: var(--atlas-text) !important;
  font-size: 1.02rem !important;
  font-weight: 720 !important;
  letter-spacing: -0.01em !important;
}

.card-title {
  margin-bottom: 14px !important;
}

h1,
h2,
h3,
h4 {
  color: var(--atlas-text) !important;
  font-family: var(--atlas-font) !important;
  letter-spacing: -0.01em !important;
}

p,
span,
td,
li,
summary {
  font-family: var(--atlas-font);
}

.field-label,
.field label,
label {
  color: #475467 !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

input[type="text"],
input[type="number"],
input[type="file"],
select,
textarea {
  min-height: 40px;
  width: 100%;
  color: var(--atlas-text) !important;
  background: #fff !important;
  border: 1px solid var(--atlas-border-strong) !important;
  border-radius: var(--atlas-radius-sm) !important;
  box-shadow: none !important;
  font-family: var(--atlas-font) !important;
  font-size: 0.88rem !important;
  line-height: 1.35;
}

select[multiple] {
  min-height: 138px;
  padding: 7px;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(35, 70, 111, 0.22) !important;
  outline-offset: 2px !important;
  border-color: var(--atlas-primary) !important;
  box-shadow: none !important;
}

button,
.button,
.run-btn,
.btn-run,
.btn-scan,
.browse-btn,
.btn-file,
.file-action-btn,
.prop-switch,
.zoom-btn,
.zoom-reset,
.modal-close {
  min-height: 38px !important;
  padding: 8px 13px !important;
  color: #fff !important;
  background: var(--atlas-primary) !important;
  border: 1px solid var(--atlas-primary) !important;
  border-radius: var(--atlas-radius-sm) !important;
  box-shadow: none !important;
  font-family: var(--atlas-font) !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

button:hover,
.button:hover,
.run-btn:hover,
.btn-run:hover,
.btn-scan:hover,
.browse-btn:hover,
.btn-file:hover,
.file-action-btn:hover,
.prop-switch:hover,
.zoom-btn:hover,
.zoom-reset:hover,
.modal-close:hover {
  background: var(--atlas-primary-hover) !important;
  border-color: var(--atlas-primary-hover) !important;
}

button:disabled,
.button:disabled,
.run-btn:disabled,
.btn-run:disabled,
.btn-scan:disabled {
  color: #98a2b3 !important;
  background: #eef2f6 !important;
  border-color: #e4e7ec !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

.button.secondary,
.button.light,
.browse-btn,
.prop-switch,
.zoom-reset,
.modal-close,
.btn-file,
.file-action-btn {
  color: var(--atlas-primary) !important;
  background: #fff !important;
  border-color: var(--atlas-border-strong) !important;
}

.button.secondary:hover,
.button.light:hover,
.browse-btn:hover,
.prop-switch:hover,
.zoom-reset:hover,
.modal-close:hover,
.btn-file:hover,
.file-action-btn:hover {
  color: var(--atlas-primary-hover) !important;
  background: var(--atlas-surface-muted) !important;
  border-color: var(--atlas-primary) !important;
}

.button.gold,
.button.green,
.button.dark,
.file-action-btn.dl,
.btn-file.dl {
  color: #fff !important;
  background: var(--atlas-primary) !important;
  border-color: var(--atlas-primary) !important;
}

.tag,
.pill,
.badge,
.scan-chip,
.vet-pill,
.status-badge,
.file-kind {
  border-radius: 999px !important;
  border: 1px solid var(--atlas-border) !important;
  background: var(--atlas-surface-muted) !important;
  color: #475467 !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

.badge.success,
.status-ok,
.ok,
.vet-card.ok .vet-pill,
.status.ok {
  color: var(--atlas-success) !important;
  background: var(--atlas-success-bg) !important;
  border-color: #abefc6 !important;
}

.badge.failure,
.status-err,
.bad,
.vet-card.bad .vet-pill,
.vet-card.missing .vet-pill {
  color: var(--atlas-error) !important;
  background: var(--atlas-error-bg) !important;
  border-color: #fecdca !important;
}

.vet-card.review .vet-pill,
.log-warning {
  color: var(--atlas-warning) !important;
  background: var(--atlas-warning-bg) !important;
  border-color: #fedf89 !important;
}

table {
  width: 100%;
  border-collapse: collapse !important;
  color: var(--atlas-text) !important;
  font-family: var(--atlas-font) !important;
  font-size: 0.82rem !important;
}

th,
td {
  padding: 9px 11px !important;
  border-bottom: 1px solid #eaecf0 !important;
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475467 !important;
  background: var(--atlas-surface-muted) !important;
  font-size: 0.72rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
}

tr:hover td {
  background: #fcfcfd;
}

.stats,
.metrics,
.status-grid,
.guide-grid,
.drop-grid,
.vet-grid,
.rules-grid,
.control-grid,
.tile-grid,
.order-list,
.options-grid,
.grid {
  gap: 14px !important;
}

.stat b,
.metric strong,
.metric b {
  color: var(--atlas-primary) !important;
}

.drop {
  border-style: dashed !important;
  border-color: var(--atlas-border-strong) !important;
  background: var(--atlas-surface-muted) !important;
}

.drop.drag {
  border-color: var(--atlas-primary) !important;
  background: var(--atlas-info-bg) !important;
}

.log,
.log-box,
#log-box,
#audit-log,
pre,
code {
  font-family: var(--atlas-mono) !important;
}

.log,
.log-box,
#log-box,
#audit-log {
  color: #d0d5dd !important;
  background: #101828 !important;
  border-radius: var(--atlas-radius-sm) !important;
}

.modal-header {
  color: #fff !important;
  background: var(--atlas-nav) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-inner,
#preview-modal .modal-inner {
  border-radius: var(--atlas-radius) !important;
  box-shadow: var(--atlas-shadow-lg) !important;
}

.progress-track,
.progress-bar-bg {
  height: 8px !important;
  background: #e4e7ec !important;
  border-radius: 999px !important;
}

.progress-fill,
.progress-bar-fill {
  background: var(--atlas-primary) !important;
  border-radius: 999px !important;
}

details {
  color: var(--atlas-text);
}

summary {
  cursor: pointer;
  color: var(--atlas-primary);
  font-weight: 700;
}

@media (max-width: 900px) {
  header {
    position: static;
    flex-wrap: wrap !important;
    padding: 0 18px !important;
  }

  .header-brand {
    width: 100%;
  }

  .header-tabs {
    width: 100% !important;
    margin-left: 0 !important;
    padding-bottom: 10px;
  }

  main {
    width: min(100% - 28px, 1180px) !important;
    margin-top: 18px !important;
  }

  .card,
  .panel,
  .hero,
  .advanced,
  .guide-card {
    padding: 18px !important;
  }
}
