:root {
  --bg: #f5f7fa;
  --ink: #17243c;
  --muted: #738096;
  --line: #e5eaf0;
  --blue: #3868e8;
  --green: #25a68b;
  --nav: #101d34;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px/1.65 system-ui,
    -apple-system,
    "Segoe UI",
    "Microsoft Yahei",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  outline-offset: 4px;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
a {
  color: var(--blue);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.45;
  letter-spacing: -0.8px;
}
h2 {
  font-size: 16px;
}
h3 {
  font-size: 15px;
}
.muted {
  color: var(--muted);
}
.fine {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  color: #8b99ae;
  margin-bottom: 10px;
}
.brand-mark {
  width: 35px;
  height: 35px;
  background: #4777ef;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 750;
  font-size: 23px;
  flex: none;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 226px;
  background: var(--nav);
  padding: 30px 22px;
  color: #b6c3db;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 650;
  white-space: nowrap;
}
.brand small {
  display: block;
  color: #8191ac;
  font-size: 8px;
  letter-spacing: 1.3px;
}
.nav-label {
  margin: 48px 12px 12px;
  color: #6e7e99;
  font-size: 11px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c7d3e5;
  padding: 11px 15px;
  border-radius: 8px;
}
.nav-link.nav-active {
  background: #233857;
  color: #fff;
}
.mobile-nav {
  display: none;
}
#usage-submit {
  align-self: end;
  justify-self: start;
}
#usage-results caption {
  text-align: left;
  padding: 12px;
  font-weight: 600;
}
#usage-results th {
  white-space: nowrap;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  color: #a0b0c9;
}
.sidebar-bottom p {
  font-size: 11px;
  color: #71829d;
  margin: 9px 0 22px;
}
.sidebar-bottom a {
  color: #b6c3db;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2bb18f;
  margin-right: 6px;
}
main {
  margin-left: 226px;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  font-size: 12px;
}
.slash {
  margin: 0 12px;
  color: #c5ccd6;
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 15px;
}
.content {
  max-width: 1600px;
  margin: auto;
  padding: 36px 38px 16px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.page-heading .muted {
  margin-top: 7px;
  font-size: 13px;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  padding: 8px 15px;
  white-space: nowrap;
  min-height: 39px;
  font-size: 12px;
}
.primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}
.primary:hover {
  background: #2956ce;
}
.secondary {
  border: 1px solid #dce2eb;
  background: #fff;
  color: #52617a;
}
.secondary:hover {
  border-color: #95a8c7;
  color: var(--ink);
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  font-size: 12px;
}
.scope-line {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin: 22px 0 20px;
  gap: 3px;
  flex-wrap: wrap;
}
.scope-separator {
  margin: 0 8px;
  color: #b7bfcc;
}
.updated {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px 14px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
label {
  font-size: 11px;
  color: #66748c;
  display: block;
  margin-bottom: 6px;
}
input,
select {
  width: 100%;
  height: 38px;
  border: 1px solid #dfe5ee;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  min-width: 0;
}
input::placeholder {
  color: #a0aabb;
}
select {
  padding-right: 25px;
}
.filter-button {
  align-self: end;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.metric {
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.metric p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6e7a90;
  font-size: 12px;
}
.metric strong {
  display: block;
  font-size: 33px;
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: -1px;
  margin-top: 10px;
}
.metric small {
  color: #8a96a9;
  font-size: 10px;
}
.metric-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef3ff;
  color: #6686db;
  border-radius: 7px;
  width: 28px;
  height: 28px;
  font-size: 17px;
}
.issue-icon {
  background: #fff3e9;
  color: #d89759;
}
.idea-icon {
  background: #eaf8f3;
  color: #51a58b;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(210px, 1fr);
  gap: 20px;
  margin: 22px 0;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 22px;
}
.panel-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.legend {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.issue-dot,
.idea-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--blue);
}
.idea-dot {
  background: var(--green);
  margin-left: 8px;
}
#chart {
  width: 100%;
  height: 190px;
  padding: 0 16px 8px;
}
.chart-label {
  font-size: 11px;
  fill: #8b97a8;
}
.chart-line {
  stroke: #edf0f5;
  stroke-width: 1;
}
.chart-issue {
  fill: var(--blue);
}
.chart-idea {
  fill: var(--green);
}
.chart-table {
  margin: 0 22px 18px;
  font-size: 11px;
  color: var(--muted);
}
summary {
  cursor: pointer;
}
.distribution #tenant-distribution {
  padding: 0 22px 20px;
  max-height: 247px;
  overflow: auto;
}
.tenant-item {
  padding: 12px 0;
  border-top: 1px solid #f0f2f6;
}
.tenant-item div {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}
.tenant-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  color: #5c6b83;
}
.tenant-item small {
  display: block;
  font-size: 10px;
  color: #94a0b0;
  margin-top: 5px;
}
.count {
  font-size: 10px;
  background: #eef3fc;
  color: #6e88bc;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 5px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  font-size: 10px;
  font-weight: 500;
  color: #8a97a9;
  background: #fafbfd;
  padding: 11px 15px;
  white-space: nowrap;
}
td {
  border-top: 1px solid #edf0f4;
  padding: 16px 15px;
  vertical-align: top;
}
th:first-child,
td:first-child {
  padding-left: 22px;
}
.records td:first-child {
  width: 43%;
  min-width: 240px;
}
.record-open {
  border: 0;
  background: none;
  color: var(--ink);
  padding: 0;
  text-align: left;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.record-open:hover {
  color: var(--blue);
}
.record-sub {
  display: block;
  color: #96a0b0;
  font-size: 10px;
  margin-top: 6px;
}
.owner-cell {
  max-width: 190px;
  overflow-wrap: anywhere;
  color: #69778f;
  font-size: 10px;
}
.owner-cell small {
  display: block;
  color: #a0aaba;
  margin-top: 3px;
}
.time-cell {
  white-space: nowrap;
  color: #718097;
  font-size: 11px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  white-space: nowrap;
  background: #eef3ff;
  color: #547bc8;
}
.badge.issue {
  background: #fff3e9;
  color: #bd864b;
}
.badge.idea,
.badge.complete {
  background: #edf8f3;
  color: #448c74;
}
.badge.partial {
  background: #fff2e3;
  color: #bc884c;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  font-size: 11px;
  color: var(--muted);
}
.pagination > div {
  display: flex;
  gap: 10px;
}
.pagination button {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 11px;
}
.page-footer {
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #9aa5b5;
}
code {
  font-size: 10px;
}
.empty {
  text-align: center;
  padding: 50px;
  color: #8794a8;
}
.empty p {
  margin-top: 8px;
  font-size: 12px;
}
.error {
  color: #b94c42;
  font-size: 12px;
  white-space: pre-wrap;
  margin: 12px 0;
}
.error:empty {
  display: none;
}
.warning {
  background: #fff6df;
  color: #986f22;
  padding: 12px 16px;
  border: 1px solid #f1dfb3;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 12px;
}
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background:
    radial-gradient(ellipse at 15% 20%, #e9effb, transparent 60%), #f5f7fa;
}
.login-card {
  max-width: 455px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 42px;
  box-shadow: 0 20px 80px #1c38520a;
}
.login-card .eyebrow {
  margin-top: 24px;
}
.login-card h1 {
  font-size: 27px;
}
.login-card .muted {
  margin: 15px 0 30px;
  font-size: 13px;
}
.login-card input {
  height: 44px;
}
.login-card .primary {
  width: 100%;
  margin: 15px 0 12px;
  height: 44px;
  justify-content: space-between;
}
.login-card .fine {
  color: #8c98a9;
}
.login-card label {
  font-size: 12px;
}
body.detail-route .sidebar {
  display: none;
}
body.detail-route main {
  margin-left: 0;
}
.detail-page {
  padding: 28px 32px 48px;
  background: #fff;
  min-height: calc(100vh - 72px);
}
.detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.detail-heading .eyebrow {
  margin-bottom: 4px;
}
.feedback-metadata {
  margin: 16px 0 22px;
  font-size: 12px;
  color: var(--muted);
}
.feedback-metadata summary {
  cursor: pointer;
  width: fit-content;
}
.detail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-left: 3px solid var(--blue);
  padding: 15px 18px;
  background: #f6f8fc;
  border-radius: 0 7px 7px 0;
  font-size: 15px;
}
.detail-meta {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 9px 15px;
  font-size: 12px;
  margin: 20px 0;
  color: #6c7b92;
}
.detail-meta dt {
  color: #99a4b4;
}
.detail-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.attachment-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.attachment-section > .muted {
  margin: 5px 0 16px;
}
.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #eef1f6;
  flex-wrap: wrap;
}
.attachment-item strong {
  font:
    12px ui-monospace,
    monospace;
  flex: 1;
}
.attachment-item small {
  font-size: 11px;
  color: #92a0b1;
}
.attachment-item .error {
  margin: 0;
  flex-basis: 100%;
}
.log-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 15px;
  font-size: 12px;
}
.log-search {
  display: flex;
  gap: 10px;
}
.log-search input {
  flex: 1;
}
.log-search .secondary,
.log-search .text-button {
  flex: none;
}
#log-position {
  margin: 10px 0;
}
pre {
  background: #111e32;
  color: #d4dfef;
  padding: 20px;
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.8 ui-monospace,
    SFMono-Regular,
    monospace;
  max-height: 460px;
  overflow: auto;
}
#log-more {
  margin-bottom: 16px;
}
.raw-record {
  margin-top: 24px;
  font-size: 12px;
  color: #7e8da3;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
@media (min-width: 1500px) {
  .filters {
    grid-template-columns: repeat(6, minmax(100px, 1fr));
  }
  .search-field {
    grid-column: span 5;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 190px;
    padding: 28px 15px;
  }
  .brand {
    font-size: 15px;
  }
  main {
    margin-left: 190px;
  }
  .content {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(180px, 1fr);
  }
  .metric {
    padding: 17px 15px;
  }
  .metric small {
    font-size: 9px;
  }
  .panel-heading {
    padding: 17px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .metrics {
    gap: 10px;
  }
}
@media (max-width: 800px) {
  .mobile-nav {
    display: inline-block;
    margin-inline-start: 12px;
  }
  .sidebar {
    display: none;
  }
  main {
    margin: 0;
  }
  .topbar {
    height: 58px;
  }
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .distribution {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .page-heading .secondary {
    padding: 7px 10px;
  }
  .page-heading .muted {
    font-size: 11px;
  }
  .page-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  .scope-line {
    font-size: 10px;
  }
  .updated {
    margin-left: 10px;
  }
  .records-panel > .panel-heading > .fine {
    display: none;
  }
  .pagination {
    padding: 12px 15px;
    gap: 10px;
  }
  .content {
    padding: 24px 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .detail-page {
    padding: 22px 18px;
  }
  .detail-heading {
    flex-wrap: wrap;
    gap: 14px;
  }
  .detail-meta {
    grid-template-columns: 75px minmax(0, 1fr);
  }
  .log-search {
    flex-wrap: wrap;
  }
  .log-search input {
    flex-basis: 100%;
  }
  .login-card {
    padding: 30px;
  }
  .login-card h1 {
    font-size: 24px;
  }
}

.trajectory-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-bottom: 24px;
}
.trajectory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trajectory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}
#trajectory-status {
  margin: 8px 0 14px;
}
#trajectory-container iframe {
  width: 100%;
  height: calc(100dvh - 160px);
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  display: block;
}
@media (max-width: 800px) {
  #trajectory-container iframe {
    min-height: 480px;
    height: 70vh;
  }
}
