:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f3f6fa;
  --surface-3: #fff8ef;
  --ink: #101418;
  --muted: #5f6b78;
  --line: #d5dde7;
  --black: #030709;
  --black-2: #111820;
  --coral: #e65757;
  --orange: #ff6900;
  --amber: #fcb900;
  --cyan: #0693e3;
  --teal: #0f8f84;
  --teal-dark: #0a6962;
  --red: #c3413b;
  --green: #208257;
  --shadow: 0 18px 50px rgba(3, 7, 9, 0.12);
  --shadow-strong: 0 22px 70px rgba(3, 7, 9, 0.18);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.branded-report {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.report-cover {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(3, 7, 9, 0.96), rgba(17, 24, 32, 0.94)),
    linear-gradient(90deg, rgba(230, 87, 87, 0.58), rgba(252, 185, 0, 0.2), rgba(6, 147, 227, 0.3));
  color: #fff;
}

.report-cover img {
  width: 260px;
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
}

.report-cover p,
.report-cover small {
  color: #d9e3ed;
}

.report-cover p {
  margin: 14px 0 0;
}

.report-cover-meta {
  text-align: right;
  display: grid;
  gap: 7px;
}

.report-cover-meta span {
  color: #ffc268;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.report-cover-meta strong {
  font-size: 26px;
  line-height: 1.15;
}

.report-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}

.report-section h2 {
  font-size: 20px;
  color: var(--black);
  margin-bottom: 14px;
}

.report-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.snapshot-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 14px;
}

.snapshot-card span,
.snapshot-card small {
  color: var(--muted);
  display: block;
}

.snapshot-card span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.snapshot-card strong {
  display: block;
  color: var(--coral);
  font-size: 32px;
  margin: 8px 0;
}

.report-readable ul {
  margin: 0;
  padding-left: 20px;
  color: #293642;
  line-height: 1.65;
}

.report-readable li + li {
  margin-top: 8px;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media print {
  @page {
    margin: 0.45in;
  }

  body {
    background: #fff !important;
  }

  .sidebar,
  .topbar,
  .tabs,
  .inspector,
  .report-library,
  .report-actions,
  .report-meta-grid,
  .screen-only,
  .toast {
    display: none !important;
  }

  .app-shell,
  .workspace,
  .detail-view,
  .reports-grid,
  .report-preview {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body:not(.print-lineage) .workspace > .view-section:not([data-view-panel="reports"]) {
    display: none !important;
  }

  body.print-lineage .workspace > .view-section:not([data-view-panel="lineage-detail"]) {
    display: none !important;
  }

  body.print-change-history .workspace > .view-section:not([data-view-panel="dashboard-panels"]) {
    display: none !important;
  }

  body.print-change-history .content-grid > .panel:not([data-view-panel="ddl"]),
  body.print-change-history .table-tools,
  body.print-change-history .change-panel > .panel-header {
    display: none !important;
  }

  body.print-change-history .change-history-panel {
    break-inside: avoid;
  }

  body.print-lineage .lineage-workspace-grid {
    display: block !important;
  }

  body.print-lineage .lineage-side-list,
  body.print-lineage .impact-card-grid {
    break-inside: avoid;
    margin-top: 16px;
  }

  body.print-lineage .lineage-map-large {
    overflow: visible !important;
    min-height: 0 !important;
    border: 1px solid #cbd5df !important;
  }

  body.print-lineage .lineage-graph-canvas {
    min-width: 0 !important;
    padding: 16px !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.print-lineage .lineage-graph-stage {
    transform: scale(0.72) !important;
    transform-origin: top left !important;
  }

  body.print-lineage .lineage-toolbar,
  body.print-lineage .lineage-canvas-footer {
    display: none !important;
  }

  .panel,
  .full-panel,
  .branded-report {
    border: 0 !important;
    box-shadow: none !important;
  }

  .panel {
    padding: 0 !important;
  }

  .panel > .panel-header {
    display: none !important;
  }

  .branded-report {
    border-radius: 0 !important;
  }

  .report-cover {
    background: #030709 !important;
    color: #fff !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .report-section {
    break-inside: avoid;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% -10%, rgba(230, 87, 87, 0.18), transparent 32%),
    radial-gradient(circle at 78% 4%, rgba(6, 147, 227, 0.14), transparent 34%),
    linear-gradient(135deg, #f7f9fc 0%, var(--bg) 54%, #e9eef6 100%);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

body.inspector-open .app-shell {
  grid-template-columns: 260px minmax(0, 1fr) 360px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 105, 0, 0.12), transparent 18%),
    linear-gradient(180deg, var(--black) 0%, var(--black-2) 100%);
  color: #eef6f7;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: 12px 0 34px rgba(3, 7, 9, 0.2);
}

.brand,
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(230, 87, 87, 0.28);
  flex: 0 0 auto;
}

.brand span,
.sidebar-footer span {
  display: block;
  color: #a8b6c1;
  font-size: 12px;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-toggle {
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #f3f7fb;
  min-height: 36px;
  border-radius: var(--radius);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-group-toggle span {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ff6900;
  color: #fff;
  font-size: 11px;
}

.nav-group-toggle::after {
  content: "+";
  margin-left: auto;
  color: #ffc268;
  font-weight: 900;
}

.nav-group.open .nav-group-toggle::after {
  content: "-";
}

.nav-group-items {
  display: none;
  gap: 4px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-group.open .nav-group-items {
  display: grid;
}

.nav-item {
  border: 0;
  background: transparent;
  color: #d3dde8;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius);
  padding: 0 12px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--coral);
}

.people-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.people-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.people-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f9fbfd);
  padding: 14px;
  min-width: 0;
}

.people-section .section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.people-section h3 {
  font-size: 14px;
  margin: 0;
}

.people-section small {
  color: var(--muted);
}

.people-split .people-directory {
  grid-template-columns: 1fr;
}

.person-card .button[disabled] {
  cursor: default;
  opacity: 0.68;
}

.empty-state {
  border: 1px dashed #c9d4df;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f6f8fb;
  padding: 14px;
  font-size: 13px;
}

.icon {
  width: 28px;
  text-align: center;
  color: #ffc268;
  font-size: 11px;
  font-weight: 900;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 10px 24px rgba(3, 7, 9, 0.32);
  flex: 0 0 auto;
}

.workspace {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(3, 7, 9, 0.96), rgba(17, 24, 32, 0.92)),
    linear-gradient(90deg, rgba(230, 87, 87, 0.55), rgba(252, 185, 0, 0.2), rgba(6, 147, 227, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
  color: #fff;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 58%, rgba(255, 255, 255, 0.08) 58% 59%, transparent 59% 100%),
    repeating-linear-gradient(135deg, transparent 0 24px, rgba(255, 255, 255, 0.055) 24px 25px);
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
}

.topbar > * {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 36px;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 6px;
}

h3 {
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 9px;
  text-transform: uppercase;
  color: #425161;
  letter-spacing: 0;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.topbar p {
  max-width: 860px;
  margin-bottom: 0;
  color: #d7e1eb;
}

.topbar-actions,
.panel-header,
.table-tools,
.direction-toggle,
.code-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
}

.button.primary {
  background: linear-gradient(135deg, var(--coral), var(--orange));
  color: #fff;
  box-shadow: 0 10px 24px rgba(230, 87, 87, 0.22);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.42);
}

.button.ghost {
  background: #eef3f7;
  color: var(--muted);
  border-color: #d7e0ea;
}

.button.compact {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 13px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.tab.active {
  color: var(--black);
  border-color: var(--coral);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(4, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.project-selector-metric {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
}

.project-selector-metric select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  font-weight: 800;
}

.selected-project-dashboard {
  margin-bottom: 14px;
  display: grid;
  gap: 14px;
}

.project-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.context-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.project-context-bar strong {
  display: block;
  font-size: 17px;
}

.project-context-bar small {
  color: var(--muted);
}

.context-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.context-actions select {
  min-height: 36px;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fff;
  font-weight: 800;
}

.project-workbench-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workbench-tile {
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius);
  background: #fff;
  min-height: 86px;
  padding: 12px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 7px;
}

.workbench-tile strong {
  color: var(--black);
}

.workbench-tile span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.readiness-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.readiness-item {
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: #fff;
  min-height: 128px;
  padding: 12px;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 6px 10px;
}

.readiness-item.complete {
  border-left-color: var(--green);
}

.readiness-item.missing {
  border-left-color: var(--coral);
}

.readiness-item.waiting {
  border-left-color: var(--cyan);
}

.readiness-state {
  width: max-content;
  border-radius: 999px;
  background: #f2f5f7;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-item.complete .readiness-state {
  background: #eaf7f0;
  color: #17663f;
}

.readiness-item.missing .readiness-state {
  background: #ffe9e7;
  color: #9d2f2a;
}

.readiness-item strong {
  grid-column: 1 / -1;
  color: var(--black);
  font-size: 14px;
}

.readiness-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.readiness-item b {
  grid-row: 1;
  grid-column: 2;
  align-self: start;
  color: var(--black);
  font-size: 16px;
}

.readiness-item em {
  grid-column: 1 / -1;
  color: var(--black);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.quick-workflow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.quick-workflow {
  border: 1px solid var(--line);
  border-top: 4px solid var(--cyan);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  min-height: 112px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 7px;
}

.quick-workflow strong {
  color: var(--black);
}

.quick-workflow span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.selected-project-card {
  border-color: #f3a262;
  box-shadow: 0 0 0 2px rgba(255, 105, 0, 0.14), var(--shadow);
}

.metric,
.panel,
.summary-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.clickable-metric,
.metric-list [data-overview-route] {
  cursor: pointer;
}

.clickable-metric:hover,
.metric-list [data-overview-route]:hover,
.clickable-metric:focus-visible,
.metric-list [data-overview-route]:focus-visible {
  border-color: #9fb2c6;
  box-shadow: var(--shadow-strong);
  outline: none;
  transform: translateY(-1px);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--cyan));
}

.metric.large {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 20px;
}

.metric strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin: 16px 0 8px;
  color: var(--black);
}

.metric p,
.panel-header p {
  font-size: 13px;
  margin-bottom: 0;
}

.donut {
  --angle: calc(var(--value) * 3.6deg);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: conic-gradient(var(--coral) 0 var(--angle), #e5edf2 var(--angle) 360deg);
  display: grid;
  place-items: center;
}

.donut::before {
  content: "";
  position: absolute;
}

.donut span {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.metric-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.metric-list div {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 10px;
}

.metric-list dt {
  color: var(--muted);
  font-size: 12px;
}

.metric-list dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 14px;
  align-items: start;
}

body.focused-panel .content-grid > .panel:not([hidden]) {
  grid-column: 1 / -1;
}

.detail-view {
  display: grid;
  gap: 14px;
}

.full-panel {
  grid-column: 1 / -1;
}

.panel {
  padding: 18px;
  min-width: 0;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.panel:hover {
  border-color: #c6d1de;
  box-shadow: var(--shadow-strong);
  transform: translateY(-1px);
}

.panel-header {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.panel-actions,
.flow-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.connector-card,
.dictionary-item,
.lineage-node,
.stack-item,
.owner-card,
.flow-card,
.client-item,
.export-buttons button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.connector-card {
  padding: 14px;
}

.connector-top,
.dictionary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.connector-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--black-2);
  color: #ffc268;
  font-weight: 900;
}

.connector-card p {
  margin: 12px 0 10px;
  font-size: 12px;
}

.source-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 12px;
}

.source-architecture {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) 96px minmax(420px, 1.35fr);
  gap: 22px;
  align-items: stretch;
  margin: 8px 0 24px;
}

.source-arch-column {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  padding: 14px;
}

.source-arch-column h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.server-node-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.server-node,
.layer-node {
  border: 1px solid #d7dfe8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(28, 38, 48, 0.06);
}

.server-node {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 78px;
  padding: 10px;
}

.server-node small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
}

.server-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #111923;
  color: #ffcc73;
  font-size: 11px;
  font-weight: 900;
}

.source-apigee-api .server-icon,
.source-node.source-apigee-api {
  border-left: 5px solid #0ca678;
}

.source-node.source-ftp,
.source-node.source-csv {
  border-left: 5px solid #f59f00;
}

.source-node.source-db2,
.source-node.source-mysql {
  border-left: 5px solid #7048e8;
}

.source-arch-flow {
  display: grid;
  align-content: center;
  gap: 18px;
  color: #e94b35;
  font-weight: 900;
  text-align: center;
}

.source-arch-flow span {
  position: relative;
  display: block;
  border-top: 2px solid #e94b35;
  padding-top: 8px;
}

.source-arch-flow span::after {
  content: ">";
  position: absolute;
  right: -2px;
  top: -12px;
  color: #e94b35;
}

.source-arch-layers {
  display: grid;
  gap: 10px;
}

.layer-node {
  padding: 12px;
  border-left-width: 7px;
}

.layer-node strong {
  display: block;
  font-size: 15px;
}

.layer-node small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.layer-bronze {
  border-left-color: #c87921;
}

.layer-silver {
  border-left-color: #73879a;
}

.layer-gold {
  border-left-color: #d89b00;
}

.layer-connector {
  justify-self: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f3f6f9;
  color: #34495e;
  font-size: 11px;
  font-weight: 900;
}

.source-step-section + .source-step-section {
  margin-top: 16px;
}

.source-step-section {
  clear: both;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8fbfd);
}

.source-step-heading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.source-step-heading > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ff5b2e;
  color: #fff;
  font-weight: 900;
}

.source-step-heading strong {
  display: block;
  font-size: 14px;
}

.source-step-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.source-card {
  border-left: 5px solid #1c7ed6;
}

.source-ftp,
.source-csv {
  border-left-color: #f59f00;
}

.source-apigee-api {
  border-left-color: #0ca678;
}

.source-db2,
.source-mysql {
  border-left-color: #7048e8;
}

.source-sql-elt,
.source-sql-api,
.source-sql-aggregate-api-publish {
  border-left-color: #4263eb;
}

.source-route {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) minmax(180px, 1fr);
  gap: 12px;
  align-items: stretch;
  font-weight: 900;
}

.source-route span {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f3f6f9;
  border: 1px solid #d7dfe8;
  color: #243447;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.source-route strong {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e94b35;
  text-align: center;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.source-route-arrow {
  margin-top: 10px;
  font-weight: 900;
  color: #34495e;
}

.source-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.source-flow-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.source-flow-tag button {
  border: 0;
  border-left: 1px solid rgba(125, 59, 0, 0.22);
  background: transparent;
  color: #7d3b00;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  padding: 0 0 0 6px;
}

.source-flow-tag button:hover {
  color: #e94b35;
}

.optional-tool-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 10px 12px;
}

.optional-tool-section summary {
  cursor: pointer;
  font-weight: 900;
}

.optional-tool-section > p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.compact-tools .optional-tool-card {
  opacity: 0.86;
}

@media (max-width: 1500px) {
  .source-architecture {
    grid-template-columns: 1fr;
  }

  .source-arch-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: stretch;
  }

  .source-map-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .source-architecture,
  .source-map-grid {
    grid-template-columns: 1fr;
  }

  .source-arch-flow {
    display: none;
  }

  .server-node-list {
    grid-template-columns: 1fr;
  }

  .source-route {
    grid-template-columns: 1fr;
  }
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag,
.risk,
.direction-toggle {
  border-radius: 999px;
}

.tag {
  background: #fff3df;
  color: #7d3b00;
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 105, 0, 0.16);
}

.lineage-canvas {
  min-height: 280px;
  position: relative;
  background:
    radial-gradient(circle at 72% 26%, rgba(230, 87, 87, 0.12), transparent 22%),
    linear-gradient(90deg, rgba(3, 7, 9, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(3, 7, 9, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 34px 34px, 34px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.lineage-node {
  position: absolute;
  width: 148px;
  padding: 10px;
  font-size: 12px;
  box-shadow: 0 12px 26px rgba(3, 7, 9, 0.14);
  border-color: rgba(3, 7, 9, 0.16);
}

.lineage-node strong,
.connector-top strong,
.dictionary-item strong {
  display: block;
  font-size: 13px;
}

.lineage-node span {
  color: var(--muted);
  font-size: 11px;
}

.lineage-edge {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, var(--coral), var(--amber));
  transform-origin: left center;
}

.lineage-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.lineage-map-large {
  min-height: 650px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: #f5f6f8;
  overflow: auto;
}

.lineage-graph-canvas {
  position: relative;
  min-width: 1300px;
  padding: 24px 24px 60px;
  background:
    linear-gradient(90deg, rgba(3, 7, 9, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(3, 7, 9, 0.02) 1px, transparent 1px),
    #f5f6f8;
  background-size: 34px 34px;
}

.lineage-graph-stage {
  position: relative;
  transform: scale(var(--lineage-zoom, 1));
  transform-origin: top left;
  transition: transform 140ms ease;
}

.lineage-links {
  position: absolute;
  inset: 0;
  width: 1300px;
  height: 100%;
  pointer-events: none;
}

.lineage-links path {
  fill: none;
  stroke: #8c9299;
  stroke-width: 2;
  marker-end: url("#lineageArrowGray");
}

.lineage-links path:nth-child(3n + 1) {
  stroke: #1688e8;
  marker-end: url("#lineageArrowBlue");
}

.lineage-links path.logical-relationship {
  stroke: #7c3aed;
  stroke-dasharray: 8 6;
  marker-end: url("#lineageArrowPurple");
}

.lineage-links path.physical-relationship {
  stroke: #1688e8;
  marker-end: url("#lineageArrowBlue");
}

#lineageArrowBlue path {
  fill: #1688e8;
}

#lineageArrowGray path {
  fill: #8c9299;
}

#lineageArrowPurple path {
  fill: #7c3aed;
}

.graph-node,
.graph-pill {
  position: absolute;
  z-index: 1;
  border: 2px solid #1688e8;
  background: #fff;
  box-shadow: 0 8px 18px rgba(16, 20, 24, 0.08);
  color: #24313d;
}

.graph-node {
  width: 286px;
  min-height: 176px;
  padding: 11px 13px;
}

.source-node {
  width: 270px;
  min-height: 140px;
  background: #eaf6ff;
}

.relationship-node {
  width: 286px;
}

.relationship-node.logical-relationship {
  border-color: #7c3aed;
  background: #fbf9ff;
}

.relationship-node.physical-relationship {
  border-color: #1688e8;
}

.target-node {
  width: 286px;
}

.graph-pill {
  width: 190px;
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 14px;
}

.governance-node {
  width: 300px;
}

.graph-node span,
.graph-pill span {
  display: block;
  color: #52616f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.relationship-badge {
  width: max-content;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid #c9b6ff;
  background: #f1eaff;
  color: #5b21b6 !important;
  font-size: 10px !important;
}

.graph-node strong,
.graph-pill strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: normal;
}

.graph-node small {
  display: block;
  margin-top: 7px;
  color: #52616f;
  font-size: 11px;
  overflow-wrap: break-word;
  word-break: normal;
}

.lineage-column-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #dde6ef;
}

.lineage-column {
  min-height: 20px;
  margin: 0;
  font-size: 10px;
  max-width: 126px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.active-relation-column {
  box-shadow: 0 0 0 2px rgba(255, 92, 58, 0.24);
}

.lineage-stitch-actions button {
  margin-top: 8px;
}

.lineage-edge-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.lineage-edge-item {
  border: 1px solid var(--line);
  border-left: 4px solid #1688e8;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.lineage-edge-item.logical-relationship {
  border-left-color: #7c3aed;
  background: #fbf9ff;
}

.lineage-edge-item span {
  display: inline-flex;
  width: max-content;
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef6ff;
  color: #075985;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.lineage-edge-item.logical-relationship span {
  background: #f1eaff;
  color: #5b21b6;
}

.lineage-toolbar {
  position: sticky;
  left: calc(100% - 56px);
  top: 22px;
  z-index: 4;
  width: 38px;
  display: grid;
  gap: 6px;
  float: right;
}

.lineage-toolbar button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #425161;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(16, 20, 24, 0.1);
}

.lineage-canvas-footer {
  position: sticky;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px -24px -54px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
  color: #425161;
}

.lineage-canvas-footer strong {
  color: var(--coral);
  font-size: 22px;
}

.lineage-stage-arrow {
  color: var(--coral);
  font-weight: 900;
  text-align: center;
}

.object-relationship-map {
  grid-column: 1 / -1;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.object-relationship-map header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 12px;
}

.object-relationship-map header small,
.relationship-card small,
.constraint-note {
  color: var(--muted);
}

.relationship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.relationship-grid.column-level {
  grid-template-columns: 1fr;
}

.relationship-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.relationship-card strong,
.relationship-card small {
  display: block;
  overflow-wrap: anywhere;
}

.relationship-card p {
  margin: 0;
  color: #425161;
  font-size: 13px;
}

.relationship-type {
  width: max-content;
  background: #fff3e8;
  color: #a43d00;
  border: 1px solid #ffd0a8;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.column-relation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.column-relation span {
  color: var(--coral);
  font-weight: 900;
  font-size: 12px;
}

.lineage-side-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
}

.change-history-panel {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.panel-header.tight {
  margin-bottom: 12px;
}

.panel-header.tight h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.change-history-list {
  display: grid;
  gap: 10px;
}

.history-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.history-card.applied {
  border-left-color: var(--green);
}

.history-card.approved {
  border-left-color: var(--teal);
}

.history-card.pending {
  border-left-color: var(--amber);
}

.history-card.rejected {
  border-left-color: var(--red);
}

.history-status {
  width: max-content;
  height: max-content;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.history-status.applied {
  background: #eaf7f0;
  color: #17663f;
}

.history-status.approved {
  background: #e8f8f6;
  color: #0a6962;
}

.history-status.pending {
  background: #fff7df;
  color: #8a5b00;
}

.history-status.rejected {
  background: #ffe9e7;
  color: #9d2f2a;
}

.history-main header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.history-main strong,
.history-main small {
  display: block;
}

.history-main small,
.history-main p,
.history-meta {
  color: var(--muted);
}

.history-main p {
  margin: 8px 0 10px;
}

.history-main header > span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.history-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  font-size: 12px;
}

.history-meta strong {
  display: inline;
  color: #293642;
}

.impact-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stewardship-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.steward-queue {
  display: grid;
  gap: 10px;
}

.steward-item,
.workflow-step,
.checklist-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.steward-item,
.workflow-step {
  text-align: left;
  padding: 13px;
}

.steward-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 10px;
  align-items: center;
}

.steward-item strong,
.steward-item small {
  grid-column: 2;
}

.steward-item.selected,
.workflow-step.selected,
.checklist-item.checked {
  border-color: rgba(230, 87, 87, 0.42);
  background: #fff4e9;
}

.steward-item small,
.workflow-step small {
  color: var(--muted);
}

.steward-detail {
  position: sticky;
  top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.workflow-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
}

.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}

.report-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.reports-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
}

.report-library {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.report-preview {
  display: grid;
  gap: 12px;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mini-metric {
  box-shadow: none;
  min-height: 112px;
}

.mini-metric strong {
  font-size: 26px;
}

.report-output {
  min-height: 520px;
  white-space: pre-wrap;
}

.permission-list {
  display: grid;
  gap: 10px;
}

.permission-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.permission-item strong,
.permission-item small {
  display: block;
}

.permission-item small {
  color: var(--muted);
  margin-top: 5px;
}

.workflow-steps {
  display: grid;
  gap: 8px;
  align-content: start;
}

.workflow-detail {
  display: grid;
  gap: 12px;
}

.workflow-progress {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: #e7edf4;
  overflow: hidden;
  margin-top: 10px;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--cyan));
  transition: width 180ms ease;
}

.checklist {
  display: grid;
  gap: 10px;
}

.checklist header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  color: #2f3b46;
}

.checklist-item input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--coral);
}

.dictionary-list {
  display: grid;
  gap: 8px;
}

.sheet-frame {
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  box-shadow: inset 0 1px 0 #fff, var(--shadow);
}

.sheet-toolbar {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 12px;
  background: #f3f6f9;
  border-bottom: 1px solid #cfd8e3;
  color: #354250;
  font-size: 12px;
}

.sheet-toolbar strong {
  color: var(--black);
  font-size: 13px;
}

.sheet-toolbar span {
  color: var(--muted);
}

.sheet-scroll {
  overflow: auto;
  max-height: 62vh;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(0deg, transparent 0 35px, rgba(207, 216, 227, 0.55) 35px 36px);
}

.dictionary-sheet {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.dictionary-sheet th,
.dictionary-sheet td {
  border-right: 1px solid #d7dfe8;
  border-bottom: 1px solid #d7dfe8;
  min-width: 132px;
  max-width: 320px;
  padding: 8px 10px;
  vertical-align: top;
  background: #fff;
  color: #1f2b36;
}

.dictionary-sheet th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef3f7;
  color: #0f1720;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.dictionary-sheet .row-number {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 46px;
  width: 46px;
  max-width: 46px;
  text-align: right;
  color: #607080;
  background: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.dictionary-sheet th.row-number {
  z-index: 4;
  background: #e8eef4;
}

.dictionary-sheet tr:hover td {
  background: #fffdf4;
}

.dictionary-sheet tr:hover .row-number {
  background: #eef6ff;
}

.definition-col,
.definition-cell {
  min-width: 280px;
}

.definition-cell {
  background: #fbfff7;
  line-height: 1.45;
}

.technical-cell {
  background: #f7fbff;
}

.term-cell {
  font-weight: 800;
}

.sheet-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff4e3;
  border: 1px solid #ffd7a5;
  color: #7a4300;
  font-weight: 800;
  white-space: nowrap;
}

.department-finance {
  background: #e9f8ef;
  border-color: #a7dfba;
  color: #12612c;
}

.department-qa {
  background: #fff8e8;
  border-color: #f6c343;
  color: #6d4c00;
}

.department-technical-dictionary {
  background: #eaf7ff;
  border-color: #82c7ef;
  color: #075985;
}

.department-business-dictionary {
  background: #e9f8ef;
  border-color: #8bd5a5;
  color: #12612c;
}

.department-qa-dictionary {
  background: #fff8e8;
  border-color: #f6c343;
  color: #6d4c00;
}

.department-reverse-engineered-ddl {
  background: #f3f6f9;
  border-color: #8fa3b8;
  color: #2f3f50;
}

.department-developers,
.department-developer-technical-definition {
  background: #eaf7ff;
  border-color: #82c7ef;
  color: #075985;
}

.department-executive {
  background: #f5f3ff;
  border-color: #b8a7ff;
  color: #4c1d95;
}

.department-project-management {
  background: #fff2f2;
  border-color: #f0a0a0;
  color: #991b1b;
}

.sheet-chip[class*="mysql-to-bigquery"] {
  background: #eef3f7;
  border-color: #c8d3df;
  color: #334155;
}

.schema-cell,
.object-cell {
  font-weight: 800;
  border-left: 4px solid transparent;
}

.schema-source {
  background: #fff8e8 !important;
  border-left-color: #ffb020 !important;
}

.schema-target {
  background: #eaf7ff !important;
  border-left-color: #2396d4 !important;
}

.schema-stage {
  background: #f2edff !important;
  border-left-color: #8067d8 !important;
}

.schema-bronze {
  background: #fff4e6 !important;
  border-left-color: #c87921 !important;
}

.schema-silver {
  background: #edf3f8 !important;
  border-left-color: #73879a !important;
}

.schema-gold {
  background: #fff7d6 !important;
  border-left-color: #d89b00 !important;
}

.schema-neutral {
  background: #f8fafc !important;
  border-left-color: #9aa9b8 !important;
}

.object-table {
  background: #f7fbff !important;
  border-left-color: #65a9dd !important;
}

.object-fact {
  background: #fff2f2 !important;
  border-left-color: #e65757 !important;
}

.object-dim {
  background: #f0fbf4 !important;
  border-left-color: #38a169 !important;
}

.object-view {
  background: #fff7ed !important;
  border-left-color: #f97316 !important;
}

.object-proc,
.object-trigger {
  background: #f5f3ff !important;
  border-left-color: #7c3aed !important;
}

.column-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  margin: 0 4px 4px 0;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #d4dde7;
  background: #f8fafc;
  white-space: nowrap;
  font-weight: 700;
}

.column-pill em {
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.key-pk {
  background: #fff2cc;
  border-color: #f6c343;
  color: #6d4c00;
}

.key-fk {
  background: #e8f7ff;
  border-color: #6cc7ef;
  color: #075985;
}

.key-regular {
  background: #f8fafc;
  color: #354250;
}

.generated-tag {
  margin-left: 6px;
  background: #f3f6f9;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #cad5df;
  background: #f7fafc;
  color: #314255;
  font-weight: 900;
  white-space: nowrap;
}

.source-own {
  background: #f1f8ff;
  border-color: #9bc9ef;
  color: #075985;
}

.source-reverse {
  background: #eef2f6;
  border-color: #9aa9b8;
  color: #243447;
}

.source-technical {
  background: #eaf7ff;
  border-color: #82c7ef;
  color: #075985;
}

.source-qa {
  background: #fff8e8;
  border-color: #f6c343;
  color: #6d4c00;
}

.source-business {
  background: #e9f8ef;
  border-color: #8bd5a5;
  color: #12612c;
}

.sheet-actions {
  min-width: 150px;
  white-space: nowrap;
}

.sheet-actions .button + .button {
  margin-left: 6px;
}

.empty-sheet-cell {
  color: var(--muted);
  min-width: 760px;
}

.stack-list,
.ownership-grid,
.flow-list,
.client-list {
  display: grid;
  gap: 10px;
}

.ownership-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dictionary-item {
  padding: 11px 12px;
}

.dictionary-item small,
.stack-item small,
.owner-card small,
.flow-card small,
.client-item small {
  color: var(--muted);
}

.stack-item,
.owner-card,
.flow-card,
.client-item {
  padding: 13px;
}

.stack-item header,
.flow-card header,
.client-item header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.stack-item strong,
.owner-card strong,
.flow-card strong,
.client-item strong {
  display: block;
  font-size: 13px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.meta-grid span,
.flow-step {
  background: #f6f8fb;
  border-radius: var(--radius);
  color: #3c4854;
  font-size: 12px;
  padding: 7px 8px;
  border: 1px solid #e3e9f0;
}

.owner-card {
  min-height: 118px;
}

.owner-card .tag-row,
.client-item .tag-row {
  margin-top: 10px;
}

.flow-path {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.flow-step strong {
  display: block;
  color: var(--black);
  margin-bottom: 3px;
}

.flow-arrow {
  text-align: center;
  color: var(--coral);
  font-weight: 900;
}

.exchange-type {
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
}

.exchange-type.import {
  background: var(--cyan);
}

.exchange-type.export {
  background: var(--coral);
}

.project-context {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.context-card,
.etl-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px;
}

.context-card strong,
.context-card small {
  display: block;
}

.context-card small {
  color: var(--muted);
  margin-top: 4px;
}

.people-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.person-chip {
  border: 1px solid #e3e9f0;
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 9px;
}

.person-chip strong,
.person-chip span,
.person-chip small {
  display: block;
}

.person-chip span {
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.etl-form {
  margin-bottom: 12px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.form-grid label {
  color: #3d4a56;
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.form-grid input,
.form-grid select {
  width: 100%;
}

.form-actions {
  margin-top: 12px;
}

.etl-owner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.etl-owner-grid span {
  border: 1px solid #e3e9f0;
  border-radius: var(--radius);
  background: #f8fafc;
  color: #33414e;
  font-size: 12px;
  padding: 8px;
}

.change-panel {
  grid-column: 1 / -1;
}

.direction-toggle {
  background: var(--surface-2);
  padding: 4px;
}

.toggle {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.toggle.active {
  background: #fff;
  color: var(--black);
  box-shadow: 0 2px 8px rgba(20, 32, 44, 0.1);
}

.table-tools {
  margin-bottom: 12px;
}

input,
select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
}

#changeSearch {
  flex: 1;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.scan-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.catalog-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.catalog-audit-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(300px, 0.95fr) minmax(300px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.catalog-audit-grid section {
  min-width: 0;
}

.catalog-audit-grid h3 {
  margin: 0 0 10px;
}

.catalog-card-grid {
  display: grid;
  gap: 10px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.catalog-object-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.catalog-object-card strong {
  display: block;
  margin: 6px 0;
  overflow-wrap: anywhere;
}

.catalog-object-card small {
  color: var(--muted);
  line-height: 1.4;
}

.scan-control-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  margin: 12px 0;
}

.scan-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.scan-control-grid label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.scan-control-grid input,
.scan-control-grid select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: #fbfdff;
}

.scan-control-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.scan-summary-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: var(--radius);
  background: #fff;
  padding: 11px 12px;
}

.scan-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.scan-summary-card strong {
  display: block;
  margin: 5px 0;
  font-size: 16px;
}

.scan-summary-card small {
  color: var(--muted);
  line-height: 1.4;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #f1f5f8;
  color: #4d5c6a;
  font-size: 12px;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: #fff4e9;
}

.risk {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.risk.high {
  background: var(--red);
}

.risk.medium {
  background: var(--orange);
}

.risk.low {
  background: var(--green);
}

.inspector {
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  border-left: 1px solid var(--line);
  padding: 24px;
  overflow-y: auto;
}

.inspector-header {
  margin-bottom: 16px;
}

.inspector h2 {
  font-size: 21px;
}

.inspector-header p {
  font-size: 13px;
  margin-bottom: 0;
}

.summary-box {
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: none;
}

.summary-box p {
  font-size: 13px;
  margin-bottom: 0;
}

.impact-list {
  display: grid;
  gap: 8px;
}

.impact-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.impact-item span:last-child {
  color: var(--muted);
  text-align: right;
}

pre {
  margin: 0;
  overflow-x: auto;
  background: var(--black);
  color: #d8f6ee;
  border-radius: var(--radius);
  padding: 14px;
  min-height: 190px;
  font-size: 12px;
  line-height: 1.55;
}

.code-header {
  justify-content: space-between;
}

#ddlDirectionLabel {
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
}

.export-buttons {
  display: grid;
  gap: 8px;
}

.export-buttons button {
  min-height: 36px;
  text-align: left;
  padding: 0 10px;
  color: #425161;
  background: #f8fafc;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--black);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  font-size: 13px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 10, 15, 0.62);
  backdrop-filter: blur(3px);
}

.dictionary-modal-card {
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d7e0ea;
  box-shadow: 0 32px 80px rgba(3, 7, 9, 0.34);
  padding: 18px;
}

.dictionary-modal-card header,
.dictionary-modal-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dictionary-modal-card header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.dictionary-modal-card h2 {
  margin: 0 0 4px;
}

.dictionary-modal-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dictionary-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dictionary-modal-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #334155;
}

.dictionary-modal-grid label.wide {
  grid-column: span 3;
}

.dictionary-modal-grid input,
.dictionary-modal-grid textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 10px 11px;
  font: inherit;
  color: #1f2b36;
  background: #fbfdff;
}

.dictionary-modal-grid textarea {
  resize: vertical;
  min-height: 122px;
  line-height: 1.45;
}

.dictionary-modal-card footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 16px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .inspector {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-group {
    display: contents;
  }

  .nav-group-toggle {
    display: none;
  }

  .nav-group-items {
    display: contents;
    padding-left: 0;
    border-left: 0;
  }

  .nav-item {
    justify-content: center;
    font-size: 12px;
  }

  .nav-item .icon {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .workspace,
  .inspector {
    padding: 18px;
  }

  .topbar,
  .project-context-bar,
  .panel-header {
    display: grid;
  }

  .people-directory {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .context-actions,
  .table-tools {
    width: 100%;
  }

  .topbar-actions .button,
  .context-actions .button,
  .context-actions select,
  .table-tools input,
  .table-tools select {
    flex: 1;
    min-width: 0;
  }

  .metrics-grid,
  .project-selector-metric,
  .project-workbench-grid,
  .readiness-checklist,
  .quick-workflow-grid,
  .project-context-bar,
  .content-grid,
  .people-split,
  .connector-grid,
  .ownership-grid,
  .project-context,
  .dictionary-modal-grid,
  .form-grid,
  .etl-owner-grid,
  .lineage-workspace-grid,
  .impact-card-grid,
  .stewardship-grid,
  .workflow-layout,
  .access-grid,
  .reports-grid,
  .report-meta-grid,
  .catalog-audit-grid {
    grid-template-columns: 1fr;
  }

  .scan-summary-grid,
  .catalog-summary-grid {
    grid-template-columns: 1fr;
  }

  .scan-control-grid {
    grid-template-columns: 1fr;
  }

  .dictionary-modal-grid label.wide {
    grid-column: span 1;
  }

  .dictionary-modal-card header,
  .dictionary-modal-card footer {
    display: grid;
  }

  .lineage-map-large {
    grid-template-columns: 1fr;
  }

  .relationship-grid,
  .column-relation,
  .lineage-side-list,
  .history-card,
  .history-meta {
    grid-template-columns: 1fr;
  }

  .metric.large {
    grid-template-columns: 1fr;
  }
}
