*[hidden] {
  display: none !important;
}

body {
  --app-topbar-height: 58px;
  --app-red: #c41f3e;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #17365a 0%, #0a1d33 55%);
  color: #c4c8d1;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: var(--app-topbar-height);
  padding: 9px 22px;
  background:
    linear-gradient(90deg, rgba(24, 64, 102, 0.88), rgba(7, 24, 39, 0) 46%),
    linear-gradient(180deg, #0d2a45, #071827),
    #071827;
  border-bottom: 1px solid var(--app-red);
  box-shadow: inset 0 -2px 0 var(--app-red);
  color: #d2d6de;
}

.app-topbar a {
  color: #d2d6de;
  text-decoration: none;
}

.app-topbar a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.app-topbar-hijacked {
  background:
    linear-gradient(90deg, rgba(51, 89, 127, 0.88), rgba(7, 24, 39, 0.94) 55%),
    linear-gradient(180deg, #0d2a45, #071827),
    #071827;
  border-bottom-color: var(--app-red);
  box-shadow: inset 0 -2px 0 var(--app-red);
}

.app-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
  color: #9eb0c3;
  font-size: 14px;
  line-height: 1.4;
}

.app-breadcrumb-home {
  font-weight: bold;
  font-size: 16px;
  color: #e08a99;
}

.app-topbar a.app-breadcrumb-home {
  color: #e08a99;
}

.app-topbar a.app-breadcrumb-home:hover {
  color: #f0a8b5;
}

.app-topbar-context,
.app-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.app-topbar-context {
  justify-content: flex-end;
  color: #b7bdc9;
  font-size: 14px;
}

.app-topbar-actions {
  justify-content: flex-end;
  font-size: 14px;
  line-height: 1.4;
}

.app-topbar-actions a {
  font-weight: normal;
}

.topbar-logout-form {
  display: none;
  margin: 0;
}

.app-meta-label {
  color: #778aa0;
  font-size: 11px;
  text-transform: uppercase;
}

.topbar-hijack-form {
  margin: 0;
}

.topbar-hijack-action {
  width: auto;
  min-height: 0;
  padding: 6px 10px;
  border-color: #f06c84;
  background: #c41f3e;
  color: #ffffff;
  font-size: 12px;
}

.inline-action-form {
  margin: 0;
  min-width: 0;
}

.small-button {
  width: auto;
  min-height: 0;
  padding: 6px 10px;
  font-size: 13px;
}

.app-layout {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - var(--app-topbar-height));
}

.app-leftnav {
  position: sticky;
  top: var(--app-topbar-height);
  align-self: start;
  box-sizing: border-box;
  min-height: calc(100vh - var(--app-topbar-height));
  max-height: calc(100vh - var(--app-topbar-height));
  overflow: auto;
  padding: 18px 29px 24px 14px;
  background: #081a2c;
  border-right: 1px solid #2b4560;
}

.app-leftnav-group {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.app-leftnav h2 {
  margin: 0 0 4px;
  color: #778aa0;
  font-size: 11px;
  font-weight: normal;
  text-transform: uppercase;
}

.app-leftnav a {
  padding: 7px 9px;
  color: #b7bdc9;
  border-left: 3px solid transparent;
  border-radius: 4px;
  text-decoration: none;
}

.app-leftnav a.nested {
  margin-left: 12px;
}

.app-leftnav a:hover,
.app-leftnav a.active {
  color: #ffffff;
  background: #102942;
  border-left-color: var(--app-red);
  text-decoration: none;
}

.app-main {
  min-width: 0;
}

.container {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  padding: 24px;
}

.card {
  box-sizing: border-box;
  width: 100%;
  background: #102942;
  border: 1px solid #2b4560;
  border-radius: 6px;
  padding: 24px;
}

.results-card {
  min-width: 0;
  overflow-x: auto;
  width: 100%;
}

.page-header {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 18px 24px;
  background: #102942;
  border-bottom: 1px solid #2b4560;
}

.page-title {
  min-width: 0;
}

.page-title .tagline {
  margin-top: 6px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: 36px;
  color: #d2d6de;
}

.tagline {
  margin: 12px 0 0;
  color: #b7bdc9;
  line-height: 1.5;
}

.breadcrumbs {
  display: none;
}

.breadcrumbs a {
  color: #b7bdc9;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #d2d6de;
  text-decoration: none;
}

.breadcrumb-separator {
  color: #6f8399;
}

.launch-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.home-sections {
  display: grid;
  gap: 24px;
}

.home-sections section {
  display: grid;
  gap: 10px;
}

.home-sections h2 {
  margin: 0;
  color: #8995a6;
  font-size: 14px;
  font-weight: normal;
}

.home-reference {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.home-reference section {
  padding-top: 14px;
  border-top: 1px solid #2b4560;
}

.home-reference h2 {
  margin: 0 0 6px;
  color: #d2d6de;
  font-size: 18px;
}

.home-reference p {
  margin: 0;
  color: #b7bdc9;
  line-height: 1.5;
}

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

.nav-grid a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: #0b2138;
  border: 1px solid #2b4560;
  border-radius: 4px;
  color: #d2d6de;
  text-decoration: none;
}

.nav-grid a:hover {
  border-color: var(--app-red);
}

.nav-grid span {
  color: #9eb0c3;
  font-size: 14px;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.list-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.list-filter-form label {
  color: #8995a6;
  font-size: 13px;
  text-transform: uppercase;
}

.list-filter-form select {
  width: auto;
  min-width: 180px;
}

.kpi-grid {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.kpi-mode-toggle {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 18px 0 12px;
}

.kpi-mode-toggle .active {
  border-color: #60a5fa;
  color: #ffffff;
  background: #1e3a5f;
}

.readiness-summary {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
  gap: 18px;
  margin-bottom: 20px;
}

.readiness-chart-card,
.traffic-card {
  padding: 18px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #111827;
}

.readiness-chart-card h2,
.traffic-card h2 {
  margin-top: 0;
  text-align: center;
}

.readiness-chart-wrap {
  height: 300px;
}

.traffic-light {
  display: flex;
  width: 88px;
  margin: 18px auto 0;
  padding: 12px;
  border: 3px solid #64748b;
  border-radius: 16px;
  background: #020617;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.traffic-lamp {
  display: flex;
  width: 58px;
  height: 58px;
  border: 3px solid #475569;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #1e293b;
  font-size: 24px;
  font-weight: 800;
  opacity: 0.32;
}

.traffic-lamp.lit {
  border-color: #ffffff;
  color: #ffffff;
  opacity: 1;
  box-shadow: 0 0 18px currentColor;
}

.traffic-lamp.red.lit { background: #ef4444; }
.traffic-lamp.yellow.lit { background: #facc15; color: #111827; }
.traffic-lamp.green.lit { background: #22c55e; color: #111827; }

.readiness-filter-heading {
  align-items: end;
}

.readiness-filters {
  display: flex;
  gap: 12px;
}

.readiness-filters label {
  display: flex;
  color: #cbd5e1;
  font-size: 12px;
  flex-direction: column;
  gap: 4px;
}

.readiness-filters select {
  min-width: 130px;
}

.readiness-filters button {
  align-self: end;
}

.readiness-description {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .readiness-summary {
    grid-template-columns: 1fr;
  }

  .readiness-filters {
    width: 100%;
    flex-wrap: wrap;
  }
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr));
  gap: 10px;
  width: 100%;
}

.kpi-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #0b2138;
  border: 1px solid #2b4560;
  border-radius: 4px;
  min-width: 0;
  overflow: hidden;
  container-type: inline-size;
}

.kpi-grid strong {
  color: #d2d6de;
  display: flex;
  font-size: clamp(14px, 14cqw, 20px);
  gap: 12px;
  justify-content: space-between;
  align-items: baseline;
  line-height: 1.15;
  min-width: 0;
  white-space: nowrap;
}

.kpi-grid small {
  color: #90a7be;
  font-size: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.kpi-grid span {
  color: #9eb0c3;
  font-size: clamp(11px, 8cqw, 12px);
  overflow-wrap: normal;
  word-break: normal;
}

.kpi-card > span {
  text-align: center;
}

.kpi-grid .kpi-value {
  color: #d2d6de;
  font-size: inherit;
  min-width: 0;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: normal;
}

.delete-action-form {
  margin: 0;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: #0b2138;
  border: 1px solid #2b4560;
  border-radius: 4px;
  overflow: hidden;
}

.detail-table th,
.detail-table td {
  padding: 10px;
  border-bottom: 1px solid #2b4560;
  text-align: left;
  vertical-align: middle;
}

.detail-table .detail-json-row th,
.detail-table .detail-json-row td {
  vertical-align: top;
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
  border-bottom: 0;
}

.detail-table th {
  width: 190px;
  color: #9eb0c3;
  font-weight: normal;
  white-space: nowrap;
}

.detail-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.inline-detail-form {
  margin-top: 16px;
}

.detail-form-cell input[type="text"],
.detail-form-cell input[type="email"],
.detail-form-cell input[type="password"],
.detail-form-cell input[type="url"],
.detail-form-cell input[type="tel"],
.detail-form-cell input[type="number"],
.detail-form-cell select,
.detail-form-cell textarea {
  width: 100%;
}

.detail-form-cell textarea,
.profile-form textarea {
  box-sizing: border-box;
  height: 4.6rem;
  min-height: 4.6rem;
  max-height: 22rem;
  overflow: auto;
  resize: vertical;
}

@supports (field-sizing: content) {
  .detail-form-cell textarea,
  .profile-form textarea {
    height: auto;
    field-sizing: content;
  }
}

.detail-form-cell textarea,
.detail-form-cell input[type="text"],
.detail-form-cell input[type="email"],
.detail-form-cell input[type="password"],
.detail-form-cell input[type="url"],
.detail-form-cell input[type="tel"],
.detail-form-cell input[type="number"],
.detail-form-cell select {
  font-size: 14px;
}

.detail-form-cell textarea,
.detail-form-cell input[type="text"],
.detail-form-cell input[type="email"],
.detail-form-cell input[type="password"],
.detail-form-cell input[type="url"],
.detail-form-cell input[type="tel"],
.detail-form-cell input[type="number"],
.detail-form-cell select {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.35;
}

.detail-checkbox-cell {
  display: flex;
  align-items: center;
}

.detail-checkbox-cell input {
  width: auto;
}

.detail-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  color: #b7bdc9;
}

select,
button,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea {
  font: inherit;
}

select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  border: 1px solid #3b5672;
  border-radius: 4px;
  background: #0b2237;
  color: #c4c8d1;
  color-scheme: dark;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  background: #14314b;
  color: #c4c8d1;
}

textarea {
  height: 4.6rem;
  min-height: 4.6rem;
  max-height: 22rem;
  overflow: auto;
  resize: vertical;
  scrollbar-color: #47779f #0b2237;
  scrollbar-width: thin;
}

@supports (field-sizing: content) {
  textarea {
    height: auto;
    field-sizing: content;
  }
}

textarea::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

textarea::-webkit-scrollbar-track {
  background: #0b2237;
}

textarea::-webkit-scrollbar-thumb {
  background: #47779f;
  border: 2px solid #0b2237;
  border-radius: 6px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: #5b8ab5;
}

a {
  color: #5b8ab5;
  text-decoration: none;
}

a:hover {
  color: #8ab5d5;
}

.action-link,
.button-link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: auto;
  padding: 5px 10px;
  border: 1px solid #2b4560;
  border-radius: 4px;
  background: #284964;
  color: #d2d6de;
  font-size: 13px;
  line-height: 1.2;
  font-family: Arial, Helvetica, sans-serif;
  text-decoration: none;
}

.action-link:hover,
.button-link:hover {
  background: #34607f;
  color: #ffffff;
}

.action-link.primary {
  background: var(--app-red);
  border-color: var(--app-red);
  color: #ffffff;
}

.action-link.primary:hover {
  background: #d52e4d;
}

.action-link.disabled-action,
.action-link.disabled-action:hover {
  background: #784354;
  border-color: #784354;
  color: #d8aeb8;
  cursor: not-allowed;
  opacity: 0.68;
  text-decoration: none;
}

.action-link.danger {
  background: transparent;
  border-color: #744052;
  color: #ef8aa0;
}

.action-link.danger:hover {
  background: #3a1b28;
  color: #ffffff;
}

.table-action {
  min-width: 58px;
}

button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 39px;
  padding: 10px 14px;
  background: #c41f3e;
  color: #ffffff;
  border: 1px solid #c41f3e;
  border-radius: 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: inherit;
  line-height: 1.2;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #d52e4d;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-button {
  border-color: #2b4560;
  background: #284964;
}

.secondary-button:hover:not(:disabled) {
  background: #34607f;
}

.small-button,
.mini-button {
  width: auto;
  padding: 5px 8px;
  font-size: 12px;
}

.mini-button {
  background: #284964;
}

.mini-button:hover:not(:disabled) {
  background: #34607f;
}

.results-section {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #2b4560;
}

.results-section h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #d2d6de;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.agent-graph-section {
  display: grid;
  gap: 12px;
}

.agent-graph-canvas {
  box-sizing: border-box;
  width: 100%;
  min-height: 360px;
  background: #07192b;
  border: 1px solid #2b4560;
  border-radius: 4px;
}

.agent-graph-preview {
  height: 420px;
}

.agent-graph-full {
  height: 680px;
}

.agent-graph-status {
  margin: 0;
}

.agent-graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-graph-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #b7bdc9;
  font-size: 13px;
}

.agent-graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-node {
  display: inline-block;
  width: 18px;
  height: 12px;
  border: 2px solid #b6d3e8;
  border-radius: 4px;
  background: #5f8fb7;
}

.legend-start {
  border-color: #c9f4d0;
  border-radius: 999px;
  background: #7dcf8b;
}

.legend-runnable {
  border-color: #ffd0da;
  background: #f08ca1;
}

.legend-tool-group {
  border-color: #fff0b1;
  background: #f1cf66;
}

.legend-tool {
  border-color: #c6e2f5;
  background: #7fb6df;
}

.legend-edge {
  display: inline-block;
  width: 24px;
  height: 0;
  border-top: 3px solid #8298ae;
}

.legend-conditional {
  border-top-color: #d7b441;
  border-top-style: dashed;
}

.legend-membership {
  border-top-color: #6d99ba;
}

.agent-graph-tooltip {
  z-index: 1000;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 32px));
  max-height: min(420px, 70vh);
  padding: 12px;
  background: #071a2b;
  border: 1px solid #6d99ba;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  color: #d2d6de;
  overflow: auto;
  pointer-events: none;
}

.agent-graph-tooltip h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.agent-graph-tooltip-row {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agent-graph-tooltip-row strong {
  color: #8ab5d5;
}

.agent-graph-tooltip-row ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

.raw-graph-section summary {
  cursor: pointer;
  color: #d2d6de;
  font-size: 20px;
}

.raw-graph-section .json-viewer-box {
  margin-top: 12px;
}

.json-tree {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.json-tree details {
  margin: 0;
}

.json-tree summary {
  cursor: pointer;
}

.json-children {
  margin-left: 18px;
  padding-left: 10px;
  border-left: 1px solid #2b4560;
}

.json-key {
  color: #8ab5d5;
}

.json-meta {
  color: #8995a6;
}

.json-string {
  color: #d7b441;
}

.json-null {
  color: #ef8aa0;
}

.run-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #b7bdc9;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.status-badge.pending { background: #3b5672; }
.status-badge.running { background: #c49a1f; color: #000; }
.status-badge.passed { background: #1f8a3e; }
.status-badge.failed { background: #c41f3e; }
.status-badge.error { background: #8a1f1f; }
.status-badge.skipped { background: #555; }

.muted {
  color: #8995a6;
}

.semantic-review {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
}

.semantic-actions {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
}

.semantic-button {
  background: #284964;
  min-width: 24px;
  padding: 3px 5px;
  line-height: 1;
  text-align: center;
}

.semantic-button.active[data-status="passed"] {
  background: #1f8a3e;
}

.semantic-button.active[data-status="failed"] {
  background: #c41f3e;
}

.semantic-notes {
  box-sizing: border-box;
  flex: 1 1 8rem;
  width: auto;
  min-width: 8rem;
  max-width: 18rem;
  min-height: 24px;
  max-height: 72px;
  resize: vertical;
  font-size: 12px;
}

.semantic-error {
  max-width: 11rem;
  color: #ef8aa0;
  font-size: 11px;
  line-height: 1.25;
}

.results-table .semantic-cell {
  width: clamp(9rem, 16vw, 13rem);
  white-space: normal;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  table-layout: auto;
}

.results-table th,
.results-table td {
  text-align: left;
  vertical-align: middle;
  padding: 8px 12px;
  border-bottom: 1px solid #2b4560;
}

.results-table .centered-cell {
  text-align: center;
  vertical-align: middle;
}

.results-table .action-cell {
  width: 1%;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.results-table th {
  color: #b7bdc9;
  font-size: 13px;
  white-space: nowrap;
}

.results-table th.diagonal-header {
  width: 32px;
  height: 78px;
  padding: 0 4px;
  vertical-align: bottom;
  white-space: nowrap;
}

.results-table th.diagonal-header span {
  display: inline-block;
  transform: translate(4px, -8px) rotate(-45deg);
  transform-origin: left bottom;
}

.results-table thead th.centered-cell {
  vertical-align: bottom;
  padding-bottom: 12px;
}

.results-table td {
  font-size: 14px;
}

.results-table .row-number {
  width: 1%;
  color: #8995a6;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.results-table .test-case-name {
  color: #d2d6de;
  line-height: 1.35;
  white-space: normal;
}

.results-table .compact-cell {
  width: 1%;
  white-space: nowrap;
}

.results-table .master-cell {
  white-space: nowrap;
}

.results-table .text-cell {
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.results-table .master-link {
  color: #d2d6de;
  text-decoration: underline;
  text-decoration-color: #6f8399;
  text-underline-offset: 2px;
}

.results-table .master-link:hover {
  color: #ffffff;
  text-decoration-color: #bc5368;
}

.results-table .test-case-summary-cell {
  min-width: 280px;
  max-width: 560px;
  white-space: normal;
  vertical-align: middle;
}

.results-table .error-message-cell {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-table .payload-preview-cell {
  margin-top: 7px;
  max-width: 100%;
  color: #a9b5c3;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.results-table .test-case-summary-cell .payload-preview-cell {
  padding-left: 10px;
  border-left: 2px solid #2b4560;
}

.results-table .related-cell {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.results-table tbody tr.case-row:nth-of-type(odd) {
  background: #0d253b;
}

.results-table tbody tr.case-row:nth-of-type(even) {
  background: #102942;
}

/*
 * Suite run result rows have a hidden detail row after each visible case row.
 * Plain nth-of-type striping counts those hidden rows and makes every visible
 * case row the same color. Keep the parent/detail pair striped together.
 */
.case-results-table tbody tr.result-toggle-row:nth-of-type(4n + 1),
.case-results-table tbody tr.detail-row:nth-of-type(4n + 2) {
  background: #0d253b;
}

.case-results-table tbody tr.result-toggle-row:nth-of-type(4n + 3),
.case-results-table tbody tr.detail-row:nth-of-type(4n + 4) {
  background: #102942;
}

.results-table tbody tr.case-row:hover {
  background: #17365a;
}

.results-table tr[data-href] {
  cursor: pointer;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.inline-filter-form {
  margin: 0;
}

.inline-filter-form label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b7bdc9;
  font-size: 14px;
  white-space: nowrap;
}

.inline-filter-form input[type="checkbox"] {
  width: auto;
}

.suite-test-cases-table th:nth-child(1),
.suite-test-cases-table th:nth-child(2),
.suite-test-cases-table td:nth-child(1),
.suite-test-cases-table td:nth-child(2) {
  width: 1%;
  white-space: nowrap;
}

.suite-test-cases-table th:nth-child(5),
.suite-test-cases-table th:nth-child(6),
.suite-test-cases-table td:nth-child(5),
.suite-test-cases-table td:nth-child(6) {
  width: 1%;
  white-space: nowrap;
}

.bulk-edit-form input[type="text"],
.bulk-edit-form input[type="number"],
.bulk-edit-form select,
.bulk-edit-form textarea {
  box-sizing: border-box;
  width: 100%;
}

.bulk-edit-cell {
  cursor: text;
}

.bulk-edit-cell:focus-within,
.bulk-edit-cell:hover {
  background: rgba(188, 83, 104, 0.08);
}

.bulk-edit-control {
  display: none;
}

.bulk-edit-row.editing .bulk-edit-display,
.bulk-edit-form tr.editing .bulk-edit-display {
  display: none;
}

.bulk-edit-row.editing .bulk-edit-control,
.bulk-edit-form tr.editing .bulk-edit-control {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bulk-edit-control label,
label.bulk-edit-control {
  color: #94a6b8;
  font-size: 12px;
  line-height: 1.3;
}

.bulk-edit-control input[type="text"],
.bulk-edit-control input[type="number"],
.bulk-edit-control select,
.bulk-edit-control textarea {
  margin-top: 3px;
  border-color: #37556f;
  background: #0c2236;
  color: #d8dee9;
  font-size: 13px;
}

.bulk-edit-control.checkbox-edit {
  align-items: center;
  flex-direction: row;
  justify-content: center;
}

.bulk-edit-control.checkbox-edit input {
  width: auto;
  margin-right: 6px;
}

.bulk-edit-actions {
  display: none;
}

.bulk-edit-form.editing .bulk-edit-actions {
  display: flex;
}

.bulk-edit-form textarea {
  min-height: 5.5em;
  max-height: 18em;
  resize: vertical;
}

.bulk-edit-form .compact-number-input {
  width: 7ch;
}

.bool-glyph {
  font-size: 14px;
  line-height: 1;
}

.detail-row td {
  padding: 0;
  max-width: 0;
}

.detail-panel {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-height: min(560px, 45vh);
  padding: 16px;
  background: #0b2237;
  border-radius: 4px;
  overflow-y: auto;
}

.detail-section {
  margin-bottom: 16px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #b7bdc9;
}

.detail-section.error h3 {
  color: #c41f3e;
}

.detail-section pre {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0;
  padding: 12px;
  background: #071a2b;
  border-radius: 4px;
  overflow-x: hidden;
  color: #c4c8d1;
  font-family: Nimbus Mono PS, Courier New, monospace;
  font-size: 1rem;
  line-height: 1.2rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.json-viewer-box {
  box-sizing: border-box;
  max-width: 100%;
  padding: 12px;
  background: #071a2b;
  border-radius: 4px;
  overflow-x: hidden;
}

.json-viewer-box json-viewer {
  display: block;
  max-width: 100%;
  --background-color: #071a2b;
  --color: #c4c8d1;
  --string-color: #a3eea0;
  --number-color: #d19a66;
  --boolean-color: #4ba7ef;
  --null-color: #df9cf3;
  --property-color: #6fb3d2;
}

.json-viewer-box json-viewer::part(key) {
  white-space: nowrap;
}

.json-viewer-box json-viewer::part(primitive-string) {
  white-space: pre-wrap;
}

.json-fallback {
  margin: 0;
}

.auth-card {
  max-width: 520px;
  margin: 32px auto;
}

.auth-page {
  background: #071827;
}

.auth-page > .container {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - var(--app-topbar-height));
}

.auth-page .auth-card {
  width: min(100%, 640px);
  max-width: 640px;
  margin: 32px 0;
}

.auth-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 13px;
}

.auth-nav a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 10px 14px;
  border: 1px solid #2b4560;
  border-radius: 4px;
  background: #284964;
  color: #d2d6de;
  font-size: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.auth-nav a.active {
  border-color: var(--app-red);
  background: #3a1b28;
  color: #ffffff;
}

.auth-nav a:hover {
  background: #34607f;
  color: #ffffff;
  text-decoration: none;
}

.auth-card form {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.auth-card .auth-button-group,
.auth-card form div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-card .auth-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}

.auth-card .auth-confirm-form {
  display: block;
}

.auth-card form p {
  display: grid;
  gap: 7px;
  margin: 0;
}

.auth-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-card label {
  display: block;
  color: #b7bdc9;
  font-size: 14px;
}

.auth-card form p:has(input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.auth-card form p:has(input[type="checkbox"]) input {
  order: 1;
}

.auth-card form p:has(input[type="checkbox"]) label {
  order: 2;
  margin: 0;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #3b5672;
  border-radius: 999px;
  background: #102942;
  color: #b7bdc9;
  font-size: 11px;
  font-weight: normal;
  line-height: 1.2;
  text-transform: uppercase;
}

.auth-badge[class*="verified"],
.auth-badge[class*="success"] {
  border-color: #2c7d45;
  background: #143320;
  color: #8fd49d;
}

.auth-badge[class*="unverified"],
.auth-badge[class*="warning"] {
  border-color: #a8892e;
  background: #342a13;
  color: #e8cd7a;
}

.auth-badge[class*="primary"] {
  border-color: #47779f;
  background: #102f49;
  color: #9ec3df;
}

.auth-card .helptext {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.auth-card .errorlist {
  display: block;
  margin: 0 0 8px;
  padding: 9px 11px;
  border: 1px solid #c41f3e;
  border-radius: 4px;
  background: rgba(196, 31, 62, 0.12);
  color: #ffb7c6;
  list-style: none;
}

.auth-card p {
  line-height: 1.5;
}

.auth-card hr {
  margin: 26px 0 18px;
  border: 0;
  border-top: 1px solid #2b4560;
}

.auth-card h2 {
  margin: 0 0 12px;
  color: #d2d6de;
  font-size: 18px;
  font-weight: 600;
}

.auth-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.auth-card li {
  width: auto;
}

.auth-card li a {
  box-sizing: border-box;
  display: inline-block;
  width: auto;
  padding: 10px 14px;
  border: 0;
  border-radius: 4px;
  background: #c41f3e;
  color: #ffffff;
  font-size: inherit;
  text-align: center;
}

.auth-card li a:hover {
  background: #d52e4d;
  color: #ffffff;
}

.auth-card section {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #2b4560;
  border-radius: 6px;
  background: rgba(11, 34, 55, 0.72);
}

.auth-card section:first-of-type {
  margin-top: 22px;
}

.auth-card section p {
  margin: 0 0 14px;
}

.auth-card section ul {
  margin-top: 4px;
}

.auth-section {
  display: grid;
  gap: 10px;
}

.auth-section h2 {
  margin: 0;
}

.auth-section > p {
  margin: 0;
}

.auth-card .auth-section-form {
  margin-top: 0;
  gap: 10px;
}

.auth-card form .auth-email-list {
  display: grid;
  gap: 10px;
}

.auth-card .auth-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #2b4560;
  border-radius: 4px;
  background: #0b2237;
}

.auth-card .auth-email-row input[type="radio"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-card .auth-email-row label {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
  margin: 0;
  color: #d2d6de;
  overflow-wrap: anywhere;
}

.auth-email-value {
  min-width: 0;
}

.auth-card form .auth-connection-list {
  display: grid;
  gap: 10px;
}

.auth-card .auth-connection-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #2b4560;
  border-radius: 4px;
  background: #0b2237;
}

.auth-card .auth-connection-row input[type="radio"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.auth-connection-main {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.auth-connection-name {
  min-width: 0;
  color: #d2d6de;
  overflow-wrap: anywhere;
}

.auth-card .auth-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 0;
}

.auth-card form .auth-inline-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.auth-card .auth-inline-field label {
  margin: 0;
}

.auth-inline-form .auth-form-actions {
  margin-top: 0;
}

.auth-card form .auth-help-box {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid #2b4560;
  border-radius: 6px;
  background: #0b2237;
}

.auth-help-box h2 {
  margin: 0;
  font-size: 15px;
}

.auth-help-box ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  list-style: disc;
}

.auth-help-box li {
  width: auto;
}

@media (max-width: 640px) {
  .auth-card .auth-inline-form {
    grid-template-columns: 1fr;
  }
}

.auth-card .button-link,
.auth-card a[class*="panel"],
.auth-card a[class*="button"],
.auth-card form > a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 39px;
  padding: 10px 14px;
  border: 1px solid #2b4560;
  border-radius: 4px;
  background: #284964;
  color: #d2d6de;
  font-size: inherit;
  line-height: 1.2;
}

.auth-card .button-link:hover,
.auth-card a[class*="panel"]:hover,
.auth-card a[class*="button"]:hover,
.auth-card form > a:hover {
  background: #34607f;
  color: #ffffff;
}

.auth-card .button-link[class*="danger"],
.auth-card a[class*="danger"],
.auth-card button[class*="danger"] {
  border-color: #744052;
  background: #3a1b28;
  color: #ef8aa0;
}

.auth-card button[class*="secondary"] {
  border-color: #2b4560;
  background: #284964;
  color: #d2d6de;
}

.auth-card button[class*="secondary"]:hover {
  background: #34607f;
  color: #ffffff;
}

.auth-card .button-link[class*="danger"]:hover,
.auth-card a[class*="danger"]:hover,
.auth-card button[class*="danger"]:hover {
  background: #4c2434;
  color: #ffffff;
}

.auth-card img {
  box-sizing: border-box;
  max-width: 260px;
  height: auto;
  padding: 12px;
  border-radius: 6px;
  background: #ffffff;
}

.auth-card textarea[readonly] {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.message-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  padding: 10px 12px;
  border: 1px solid #3b5672;
  border-left: 4px solid #4f84ac;
  border-radius: 4px;
  background: #0b2237;
  color: #d8dee9;
  line-height: 1.4;
}

.message.success {
  border-color: #2a7851;
  border-left-color: #2bb673;
  background: #102b27;
  color: #b9efd0;
}

.message.error,
.message.warning {
  border-color: #8f3346;
  border-left-color: var(--app-red);
  background: #341321;
  color: #f0b8c4;
}

.resource-warning {
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #8f3346;
  border-left: 4px solid var(--app-red);
  border-radius: 4px;
  background: #341321;
  color: #f0b8c4;
  line-height: 1.4;
}

.demo-disabled-note {
  margin-bottom: 12px;
}

.profile-label {
  color: #8995a6;
  font-size: 12px;
  text-transform: uppercase;
}

.field-errors {
  color: #d52e4d;
  font-size: 13px;
}

.token-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #0b2138;
  border: 1px solid #2b4560;
  border-radius: 4px;
}

.token-panel label {
  display: block;
  margin-bottom: 6px;
  color: #b7bdc9;
  font-size: 14px;
}

.token-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.token-control input {
  font-family: Nimbus Mono PS, Courier New, monospace;
}

.token-action-form {
  display: flex;
  gap: 8px;
  margin: 0;
}

.token-action-form button {
  width: auto;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #2b4560;
}

.profile-action-group {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 8px;
}

.profile-action-group h2 {
  flex-basis: 100%;
  margin: 0 0 2px;
  color: #8995a6;
  font-size: 13px;
  font-weight: normal;
}

.profile-action-group a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 10px 14px;
  border: 1px solid #2b4560;
  border-radius: 4px;
  background: #284964;
  color: #d2d6de;
  font-size: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.profile-action-group a:hover {
  background: #34607f;
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 980px) {
  .page-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .page-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 28px;
  }

  .nav-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
  }

  .page-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 12px;
  }

  .page-actions {
    justify-content: flex-start;
  }

  .results-table th,
  .results-table td {
    padding: 6px 8px;
  }

  .profile-actions {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .app-topbar-context,
  .app-topbar-actions {
    justify-content: flex-start;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-leftnav {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid #2b4560;
  }

  .container {
    padding: 24px 12px;
  }
}
