:root {
  color-scheme: dark;
  --bg: #0b1019;
  --panel: #111925;
  --panel2: #151f2d;
  --line: #253143;
  --text: #e5ecf2;
  --muted: #8e9dae;
  --mint: #a5dfcf;
  --gold: #d3b783;
  --danger: #ef9195;
  --blue: #94b9dc;
  --radius: 12px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: var(--text);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: var(--mint);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 7px;
  padding: 9px 14px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover {
  background: #202d3e;
  border-color: #4a5f74;
}
button.primary {
  background: var(--mint);
  color: #122822;
  border-color: var(--mint);
  font-weight: 650;
}
button.primary:hover {
  background: #c0f0e2;
}
button.ghost {
  background: transparent;
}
button.danger {
  color: var(--danger);
  border-color: #683f49;
}
button.small {
  font-size: 12px;
  padding: 6px 10px;
}
button.icon {
  padding: 7px 10px;
}
.shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 30px 18px 20px;
  display: flex;
  flex-direction: column;
  background: #0d131e;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 10px 34px;
}
.brand img {
  width: 38px;
  height: 38px;
}
.brand strong {
  font-size: 16px;
  letter-spacing: 1.7px;
  font-weight: 650;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
  margin-top: 2px;
}
.nav-label,
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 650;
}
.nav-label {
  margin: 18px 12px 10px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 12px;
  color: #9dacbd;
  border-radius: 7px;
  font-size: 13px;
  text-decoration: none;
}
nav a:hover {
  background: #151f2c;
  text-decoration: none;
  color: var(--text);
}
nav a.active {
  background: #1a2b31;
  color: #c2e8df;
  border: 1px solid #2a454a;
  padding: 10px 11px;
}
.nav-icon {
  width: 19px;
  text-align: center;
  font-size: 17px;
  color: inherit;
}
.count {
  margin-left: auto;
  background: #413421;
  color: #e1c795;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 22px 10px 0;
}
.local-state {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 15px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
}
.owner {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.avatar {
  height: 32px;
  width: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #42515e;
  border-radius: 50%;
  font-family: Georgia, serif;
  color: var(--gold);
}
.owner strong {
  font-size: 12px;
}
.owner small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 69px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
  gap: 16px;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb span {
  color: var(--text);
  margin-left: 12px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mode {
  font-size: 10px;
  color: var(--gold);
  border: 1px solid #56492e;
  border-radius: 4px;
  padding: 4px 8px;
  letter-spacing: 1px;
}
main {
  max-width: 1500px;
  margin: auto;
  padding: 34px 38px 40px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 26px;
  gap: 20px;
}
.heading .eyebrow {
  color: var(--gold);
  margin-bottom: 6px;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin: 0 0 9px;
}
h2 {
  font-size: 15px;
  letter-spacing: 0.1px;
  font-weight: 600;
  margin: 0;
}
h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
p {
  margin: 7px 0;
}
.muted {
  color: var(--muted);
}
.heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 15px;
  margin-bottom: 22px;
  background: #0f1822;
}
.status-line.warning {
  color: #dbc79f;
  border-color: #56482e;
  background: #1c1c1b;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric {
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(130deg, #16202c, #101722);
}
.metric-label {
  font-size: 11px;
  color: #a9b6c5;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.metric-value {
  font-family: Georgia, serif;
  font-size: 32px;
  line-height: 1.25;
  margin: 13px 0 10px;
  letter-spacing: -0.5px;
}
.metric-value.unknown {
  color: #7f91a5;
}
.metric-note {
  font-size: 10px;
  color: var(--muted);
}
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 22px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.panel-head p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 0;
}
.panel-body {
  padding: 22px;
}
.section-link {
  font-size: 11px;
  color: var(--mint);
  white-space: nowrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid #354254;
  background: #1c2735;
  color: #b9c5d2;
  font-size: 9px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill.ok {
  background: #162d2a;
  border-color: #2c5148;
  color: var(--mint);
}
.pill.warn {
  background: #2c271f;
  border-color: #564730;
  color: #dfc28b;
}
.pill.bad {
  background: #2b1f29;
  border-color: #5b3442;
  color: var(--danger);
}
.empty {
  padding: 38px 22px;
  text-align: center;
  color: var(--muted);
}
.empty .empty-icon {
  color: #668a99;
  font-size: 28px;
  margin-bottom: 12px;
}
.empty strong {
  color: #c5d1de;
  font-weight: 500;
  font-size: 14px;
  display: block;
}
.empty p {
  font-size: 12px;
  max-width: 400px;
  margin: 8px auto 18px;
}
.gate-row {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.gate-row:last-child {
  border: 0;
}
.gate-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}
.mono {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
}
.gate-row h3 {
  margin-bottom: 7px;
}
.gate-row p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.realm-card {
  padding: 23px;
}
.realm-banner {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 23px;
}
.realm-emblem {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: radial-gradient(ellipse at 40% 20%, #334d53, #13232c 75%);
  border: 1px solid #49666a;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 28px;
  color: #c0d9d1;
}
.realm-info {
  flex: 1;
}
.realm-info h3 {
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}
.realm-info p {
  font-size: 11px;
  color: var(--muted);
  margin: 3px 0;
}
.realm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.realm-stats span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.realm-stats strong {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-top: 7px;
}
.activity-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.activity-row:last-child {
  border: 0;
}
.activity-symbol {
  width: 28px;
  height: 28px;
  border: 1px solid #35495a;
  border-radius: 7px;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
}
.activity-row h3 {
  font-size: 12px;
  font-weight: 500;
}
.activity-row p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
}
.activity-row time {
  font-size: 10px;
  color: var(--muted);
}
.footer-note {
  font-size: 10px;
  color: #75869b;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 5px;
}
.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.agent-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 21px;
}
.agent-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
}
.agent-top .activity-symbol {
  width: 37px;
  height: 37px;
  font-size: 22px;
}
.agent-top div:nth-child(2) {
  flex: 1;
}
.agent-top h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 21px;
}
.agent-top p {
  font-size: 10px;
  color: var(--muted);
  margin: 2px 0;
}
.agent-card > p {
  font-size: 12px;
  color: var(--muted);
  min-height: 55px;
}
.agent-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}
.agent-budget {
  font-size: 11px;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
th {
  color: #8f9fb3;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  background: #121c29;
}
td,
th {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tr:last-child td {
  border-bottom: 0;
}
td.wrap {
  min-width: 200px;
  max-width: 520px;
}
td .muted {
  font-size: 11px;
  margin-top: 5px;
}
.value-list {
  margin: 0;
}
.value-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  font-size: 12px;
}
.value-list > div:first-child {
  padding-top: 0;
}
.value-list > div:last-child {
  border: 0;
  padding-bottom: 0;
}
.value-list dt {
  color: var(--muted);
}
.value-list dd {
  margin: 0;
}
.integration-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.integration {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.integration h2 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.integration p {
  font-size: 12px;
  color: var(--muted);
}
.integration code {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 20%, #1b2d38, transparent 60%);
}
.login-card {
  width: min(440px, 100%);
  border: 1px solid #344554;
  border-radius: 18px;
  padding: 36px;
  background: #111925;
  box-shadow: 0 30px 90px #0005;
}
.login-card img {
  width: 54px;
  height: 54px;
  margin-bottom: 25px;
}
.login-card h1 {
  font-size: 33px;
  margin: 8px 0 12px;
}
.login-card p {
  font-size: 13px;
  color: var(--muted);
}
.login-card form {
  margin-top: 28px;
}
.login-card button {
  width: 100%;
  margin-top: 17px;
}
.login-foot {
  font-size: 11px !important;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 26px !important;
}
label {
  display: block;
  font-size: 12px;
  color: #b6c4d2;
  margin-bottom: 6px;
}
input,
select,
textarea {
  width: 100%;
  background: #0c131e;
  color: var(--text);
  border: 1px solid #354456;
  border-radius: 7px;
  padding: 10px 12px;
  min-height: 41px;
}
textarea {
  resize: vertical;
  min-height: 85px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  outline: 1px solid var(--mint);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  margin-bottom: 15px;
}
.field small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.span-two {
  grid-column: 1/-1;
}
dialog {
  width: min(650px, calc(100% - 30px));
  max-height: 90vh;
  overflow: auto;
  color: var(--text);
  background: var(--panel);
  border: 1px solid #40546a;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 30px 100px #0009;
}
dialog::backdrop {
  background: #020610c9;
  backdrop-filter: blur(5px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px;
  border-bottom: 1px solid var(--line);
  gap: 15px;
}
.modal-body {
  padding: 24px;
}
.modal-head h2 {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}
.modal-body p,
.modal-body li {
  font-size: 13px;
  color: var(--muted);
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
}
.notice {
  font-size: 12px;
  padding: 13px 15px;
  border: 1px solid #4d4634;
  background: #24231f;
  color: #d6c49f;
  border-radius: 7px;
  margin: 17px 0;
}
.error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 13px;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 100;
  max-width: 400px;
  background: #203b35;
  color: #d1f3e7;
  border: 1px solid #486e62;
  border-radius: 8px;
  padding: 13px 20px;
  box-shadow: 0 10px 30px #0006;
  display: none;
}
#toast.visible {
  display: block;
}
#toast.error-toast {
  background: #3e242c;
  border-color: #7a4a59;
  color: #f3c0c5;
}
.initial {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
.skip {
  position: absolute;
  top: -100px;
  left: 10px;
  z-index: 200;
  background: var(--panel);
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.mobile-title {
  display: none;
}
.definition {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.evidence {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-family: Consolas, monospace;
  font-size: 11px;
  color: #bacbdc;
  background: #0c1420;
  padding: 16px;
  border-radius: 7px;
  max-height: 320px;
  overflow: auto;
}
.gates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.gates-grid .panel {
  margin: 0;
}
.tagline {
  font-family: Georgia, serif;
  font-style: italic;
  color: #a6b8c4;
  font-size: 16px;
  margin-top: 18px;
}
.stopped {
  background: #351f2b;
  border-color: #7f4457;
  color: #ffc2cb;
}
.narrow {
  max-width: 900px;
}
@media (min-width: 1600px) {
  main {
    padding-top: 44px;
  }
  .metric {
    padding: 26px;
  }
  .metric-value {
    font-size: 38px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  .sidebar {
    padding: 27px 12px 18px;
  }
  .brand {
    margin-left: 5px;
    gap: 9px;
  }
  .brand strong {
    font-size: 14px;
  }
  main {
    padding: 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .metric {
    padding: 17px;
  }
  .metric-value {
    font-size: 28px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0 0 17px;
  }
  .brand small {
    display: none;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    padding-bottom: 4px;
    gap: 6px;
  }
  nav a {
    white-space: nowrap;
    font-size: 11px;
    padding: 8px 10px;
  }
  nav a.active {
    padding: 7px 9px;
  }
  .nav-icon {
    font-size: 14px;
  }
  .topbar {
    height: 54px;
    padding: 0 18px;
  }
  .topbar .mode {
    display: none;
  }
  .top-actions {
    gap: 8px;
  }
  .top-actions button {
    font-size: 11px;
    padding: 6px 8px;
  }
  .breadcrumb {
    font-size: 11px;
  }
  main {
    padding: 24px 18px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
    gap: 17px;
  }
  h1 {
    font-size: 31px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metric {
    padding: 17px 14px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric-note {
    font-size: 9px;
  }
  .metric-value {
    font-size: 28px;
  }
  .agent-grid,
  .integration-list,
  .gates-grid {
    grid-template-columns: 1fr;
  }
  .panel-head {
    padding: 17px;
  }
  .panel-body,
  .realm-card {
    padding: 17px;
  }
  .activity-row {
    padding: 15px;
    grid-template-columns: 27px minmax(0, 1fr);
  }
  .activity-row time {
    grid-column: 2;
  }
  .footer-note {
    flex-direction: column;
    gap: 4px;
  }
  .status-line {
    font-size: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-two {
    grid-column: auto;
  }
  .realm-stats {
    gap: 7px;
  }
  .realm-stats strong {
    font-size: 12px;
  }
  .login-card {
    padding: 27px;
  }
  .modal-body {
    padding: 18px;
  }
  .modal-head {
    padding: 18px;
  }
  #toast {
    right: 15px;
    left: 15px;
    bottom: 15px;
    max-width: none;
  }
  .agent-card > p {
    min-height: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
