
.brand-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.sortie-logo {
  display: inline-flex;
  align-items: baseline;
  color: #0f172a;
  font-family: "Avenir Next", Avenir, "Montserrat", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
.sortie-logo .aero {
  color: #f05a28;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.top-nav a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: #fbfcfe;
  color: var(--focus);
  font-size: 13px;
  text-decoration: none;
}
.top-nav a.active {
  color: #fff;
  border-color: var(--focus);
  background: var(--focus);
}
.theme-select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 28px 5px 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}
html[data-theme="ops"] {
  --bg: #eef1ed;
  --panel: #fffdf5;
  --ink: #263238;
  --muted: #59636a;
  --line: #bfc7bf;
  --strong: #111827;
  --due: #9f1d14;
  --soon: #8a4b0b;
  --watch: #245b78;
  --verify: #6a4b00;
  --ok: #286247;
  --focus: #405565;
}
html[data-theme="aero"] {
  --bg: #0f1720;
  --panel: #17212b;
  --ink: #e5edf5;
  --muted: #aab8c6;
  --line: #334454;
  --strong: #f8fbff;
  --due: #ff8a80;
  --soon: #ffbf69;
  --watch: #7db7ff;
  --verify: #f2d27c;
  --ok: #7dd3a8;
  --focus: #45b6c9;
}
html[data-theme] body,
html[data-theme] html { background: var(--bg); color: var(--ink); }
html[data-theme] header,
html[data-theme] .panel,
html[data-theme] .metric,
html[data-theme] .card,
html[data-theme] .table-panel,
html[data-theme] .chart-wrap,
html[data-theme] .details,
html[data-theme] .reference-box,
html[data-theme] .field input,
html[data-theme] .field select,
html[data-theme] input,
html[data-theme] select,
html[data-theme] table,
html[data-theme] th {
  background: var(--panel);
  color: var(--ink);
}
html[data-theme] .top-nav a,
html[data-theme] .badge,
html[data-theme] .pill,
html[data-theme] .fuel-signal,
html[data-theme] .activity-flags span,
html[data-theme] .expand-icon {
  background: var(--panel);
}
html[data-theme] .top-nav a.active {
  color: #fff;
  border-color: var(--focus);
  background: var(--focus);
}
html[data-theme="ops"] body { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
html[data-theme="ops"] h1,
html[data-theme="ops"] h2,
html[data-theme="ops"] h3 { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
html[data-theme="ops"] .panel,
html[data-theme="ops"] .metric,
html[data-theme="ops"] .card,
html[data-theme="ops"] .field input,
html[data-theme="ops"] .field select {
  border-radius: 3px;
}
html[data-theme="ops"] .top-nav a,
html[data-theme="ops"] .theme-select,
html[data-theme="ops"] .badge,
html[data-theme="ops"] .pill,
html[data-theme="ops"] .fuel-signal {
  border-radius: 3px;
}
html[data-theme="aero"] body,
html[data-theme="aero"] header,
html[data-theme="aero"] .app {
  background: var(--bg);
}
html[data-theme="aero"] a,
html[data-theme="aero"] .top-nav a,
html[data-theme="aero"] .theme-select,
html[data-theme="aero"] .sortie-logo {
  color: var(--focus);
}
html[data-theme="aero"] .sortie-logo .aero {
  color: #ff9a62;
}
html[data-theme="aero"] .top-nav a.active {
  color: #061017;
}
html[data-theme="aero"] .subtitle,
html[data-theme="aero"] p,
html[data-theme="aero"] .muted,
html[data-theme="aero"] .note,
html[data-theme="aero"] .detail,
html[data-theme="aero"] .section-head span,
html[data-theme="aero"] .table-head span {
  color: var(--muted);
}
html[data-theme="aero"] .card,
html[data-theme="aero"] .metric,
html[data-theme="aero"] .notice,
html[data-theme="aero"] .reference-box,
html[data-theme="aero"] .chart-wrap {
  box-shadow: 0 0 0 1px rgba(69, 182, 201, 0.08);
}

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ink: #18212d;
  --muted: #64748b;
  --line: #d8e0e8;
  --strong: #0f172a;
  --due: #b42318;
  --soon: #b54708;
  --watch: #175cd3;
  --verify: #7a4a00;
  --ok: #067647;
  --focus: #0b7285;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--focus); text-decoration: none; }
button, input, select { font: inherit; }
header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.08;
  color: var(--strong);
  letter-spacing: 0;
}
p { margin: 0; color: var(--muted); line-height: 1.45; max-width: 980px; }
main { padding: 16px; }
.directory-layout {
  display: grid;
  grid-template-columns: minmax(430px, 1fr) minmax(300px, 0.76fr) minmax(300px, 0.72fr);
  gap: 14px;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 140px 150px 150px;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.field label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.field input, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
}
.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.pill {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  background: #fbfcfe;
}
.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 310px);
}
table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcfe;
  color: var(--muted);
  font-weight: 650;
}
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f8fbfd; }
tbody tr.selected { background: #eef9fc; }
.item { font-weight: 700; color: var(--strong); white-space: nowrap; }
.title { color: var(--strong); font-weight: 600; line-height: 1.25; }
.record-cell {
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  white-space: nowrap;
}
tr.selected .record-cell { border-left-color: var(--focus); }
.muted { color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 12px;
  white-space: nowrap;
}
.badge.gap { color: var(--due); border-color: #efb5ae; background: #fff5f3; }
.badge.ok { color: var(--ok); border-color: #9bd7bd; background: #f1fbf6; }
.badge.soon { color: var(--soon); border-color: #f5c28f; background: #fff8ed; }
.badge.watch { color: var(--watch); border-color: #b8cdf7; background: #f2f6ff; }
.badge.evidence {
  color: var(--focus);
  border-color: #9ed6df;
  background: #eefbfc;
}
.record-aside,
.evidence-aside {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.trace-head,
.evidence-head {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.trace-head h2,
.evidence-head h2 {
  margin: 0 0 5px;
  color: var(--strong);
  font-size: 18px;
}
.trace-head p,
.evidence-head p {
  font-size: 13px;
}
.record-body,
.evidence-body {
  overflow: auto;
  padding: 14px;
}
.tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 8px 0;
  margin-right: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 700;
}
.tab.active {
  color: var(--focus);
  border-bottom-color: var(--focus);
}
.evidence-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 20px;
}
.evidence-doc {
  display: grid;
  gap: 12px;
}
.demo-workflow {
  display: grid;
  gap: 10px;
  border: 1px solid #f5c28f;
  border-radius: 8px;
  padding: 12px;
  background: #fff8ed;
}
.demo-workflow h3,
.audit-log h3 {
  margin: 0;
  color: var(--strong);
  font-size: 15px;
}
.demo-warning {
  color: var(--soon);
  font-size: 12px;
  line-height: 1.4;
}
.demo-form {
  display: grid;
  gap: 8px;
}
.demo-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.demo-form input,
.demo-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.demo-actions button {
  border: 1px solid var(--focus);
  border-radius: 999px;
  padding: 7px 10px;
  color: #fff;
  background: var(--focus);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.demo-actions button.secondary {
  color: var(--focus);
  background: #fff;
}
.audit-log {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.audit-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fbfcfe;
  font-size: 12px;
}
.audit-entry strong {
  display: block;
  color: var(--strong);
  margin-bottom: 4px;
}
.audit-entry span {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}
.evidence-doc img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbfd;
}
.record-title {
  color: var(--strong);
  font-weight: 750;
  line-height: 1.25;
}
.details-grid {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 7px 12px;
  color: var(--muted);
  font-size: 13px;
}
.details-grid b { color: var(--muted); font-weight: 650; }
.details-grid span { color: var(--ink); overflow-wrap: anywhere; }
.note {
  color: var(--ink);
  line-height: 1.4;
}
@media (max-width: 1100px) {
  .directory-layout { grid-template-columns: 1fr; }
  .record-aside, .evidence-aside { position: static; max-height: none; }
  .table-wrap { max-height: none; }
}
@media (max-width: 920px) {
  header { display: block; padding: 18px 16px; }
  main { padding: 10px; }
  .toolbar { grid-template-columns: 1fr; }
}
