@font-face {
  font-family: "Raleway Local";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/raleway-latin.woff2") format("woff2");
}

:root {
  --page: #020202;
  --wrap: #131311;
  --panel: #272726;
  --panel-alt: #30302f;
  --panel-dark: #1c1c1b;
  --heading-top: #343433;
  --heading-bottom: #272726;
  --line: #353534;
  --line-light: #4f4f4d;
  --text: #d4d4d4;
  --muted: #888887;
  --green: #95b806;
  --green-bright: #b4e61e;
  --blue: #60a0dc;
  --red: #e2523b;
  --amber: #d49b39;
  font-family: Verdana, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--page);
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  background: #020202;
  font: 68.75%/1.4545em Verdana, Helvetica, Arial, sans-serif;
}
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}
button, input, select, textarea { font: 10px Verdana, Helvetica, Arial, sans-serif; color: var(--text); }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #80d6ff; }

.shell {
  position: relative;
  width: min(1070px, calc(100vw - 28px));
  margin: 22px auto;
  padding: 20px;
  border: 0;
  border-radius: 4px;
  background: #131311;
  box-shadow: none;
}
.spectrum-line {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 7px;
  left: 7px;
  height: 2px;
  border-bottom: 1px solid #000;
  background: linear-gradient(to right, #1e5799 0%, #f300ff 50%, #e0ff00 100%);
}
.shell::before { display: none; }
.shell-inner { position: relative; min-height: 520px; }
.board-header {
  margin-bottom: 12px;
  border: 1px solid var(--line-light);
  border-top: 4px solid var(--green);
  border-radius: 4px 4px 0 0;
  background: #272726;
  box-shadow: none;
}
.board-title {
  padding: 10px 12px 8px;
  background: #272726;
  border-bottom: 1px solid #1b1b1b;
}
.brand-mark {
  color: #eaeaea;
  font: 400 20px/1 "Raleway Local", Verdana, sans-serif;
  letter-spacing: 0;
  text-shadow: none;
}
.brand-mark span { color: var(--green); }
.board-title small {
  display: block;
  padding-top: 2px;
  color: #6f6f6e;
  font-size: 9px;
  letter-spacing: .5px;
}
.board-menu {
  display: flex;
  min-height: 33px;
  padding: 0 7px;
  border-top: 1px solid #393938;
  border-bottom: 1px solid #171716;
  background: #565656;
  overflow-x: auto;
}
.nav-button {
  position: relative;
  min-width: 0;
  padding: 8px 11px;
  border: 0;
  border-left: 1px solid #696969;
  border-right: 1px solid #353535;
  background: transparent;
  color: #d4d4d4;
  text-shadow: 1px 1px #222;
}
.nav-button:first-child { border-left-color: transparent; }
.nav-button:hover { color: #fff; background: #4d4d4d; text-decoration: underline; }
.nav-button.active { color: #fff; background: #4a4a4a; box-shadow: inset 0 -2px #95b806; }
.nav-button .icon { display: none; }
.board-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 18px;
  min-height: 31px;
  padding: 6px 12px;
  color: #aaa;
  background: #272726;
}
.board-status strong { color: var(--green-bright); }
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border: 1px solid #476100;
  background: var(--green-bright);
  box-shadow: 0 0 4px #95b806;
}
.text-button {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
}
.text-button:hover { color: #80d6ff; text-decoration: underline; }

.content { min-width: 0; padding: 0; background: transparent; }
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 29px;
  margin: 0 0 12px;
  padding: 6px 8px;
  border: 1px solid var(--line-light);
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to bottom, #343433 0%, #272726 100%);
  color: #bbb;
  box-shadow: inset 0 1px #3d3d3c;
}
.topline h1 { margin: 0; color: #ccc; font-size: 11px; line-height: 1.4; }
.topline > span { color: #737372; font-size: 9px; }
.board-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #20201f;
  color: #686867;
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.single { grid-template-columns: 1fr; }
.section-gap { margin-top: 18px; }
.group {
  position: relative;
  min-width: 0;
  padding: 39px 12px 12px;
  border: 1px solid var(--line-light);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px #20201f;
}
.group-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 27px;
  padding: 6px 8px;
  border-bottom: 1px solid #1b1b1a;
  background: linear-gradient(to bottom, #343433 0%, #272726 100%);
  color: #bbb;
  font-weight: bold;
  text-shadow: 1px 1px #111;
}
.metric { min-height: 105px; }
.metric strong { display: block; margin: 6px 0 3px; color: #eee; font: 22px/1.2 Consolas, Monaco, monospace; }
.metric small, .muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 9px; }
label { display: block; padding: 2px 0 4px; color: #bbb; }
input, select, textarea {
  width: 100%;
  min-height: 25px;
  padding: 5px 6px;
  border: 1px solid #3e3e3d;
  border-radius: 0;
  outline: none;
  background: #212120;
  color: #ccc;
  box-shadow: inset 0 1px 2px #111;
}
input:hover, select:hover, textarea:hover { border-color: #4b4b4a; background: #1b1b1a; }
input:focus, select:focus, textarea:focus { border-color: #666; background: #1b1b1a; }
textarea { min-height: 74px; resize: vertical; }
button.action {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid #3e3e3d;
  background: #212120;
  color: #ccc;
  text-shadow: none;
  box-shadow: none;
}
button.action:hover { border-color: #555; background: #1b1b1a; color: #eee; }
button.action.primary { border-color: #5f7408; background: #212120; color: #d4d4d4; box-shadow: none; }
button.action.primary:hover { border-color: var(--green-bright); background: #1b1b1b; color: #fff; }
button.action.danger { border-color: #6d3430; color: #e78a80; }
button.action:disabled { opacity: .45; cursor: default; }
.badge {
  display: inline-block;
  padding: 2px 5px;
  border: 1px solid #464645;
  background: #20201f;
  color: #aaa;
  font: 9px Consolas, Monaco, monospace;
  text-transform: uppercase;
}
.badge.healthy, .badge.active, .badge.good { color: var(--green-bright); border-color: #587209; }
.badge.bad, .badge.disabled { color: #f06b5f; border-color: #71342e; }
.badge.cooldown, .badge.degraded { color: #e4ae4a; border-color: #76561c; }
.progress-wrap { margin: 11px 0; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 4px; color: #aaa; }
.progress-label strong { color: #ccc; font-weight: normal; }
.progress {
  height: 7px;
  border: 1px solid #3d3d3c;
  background: #181817;
  box-shadow: inset 0 1px 2px #050505;
}
.progress progress {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  appearance: none;
  background: transparent;
}
.progress progress::-webkit-progress-bar { background: transparent; }
.progress progress::-webkit-progress-value { background: var(--green); box-shadow: inset 0 1px var(--green-bright); }
.progress progress::-moz-progress-bar { background: var(--green); box-shadow: inset 0 1px var(--green-bright); }
.progress progress.warning::-webkit-progress-value { background: #c38b28; box-shadow: inset 0 1px #e7b252; }
.progress progress.warning::-moz-progress-bar { background: #c38b28; box-shadow: inset 0 1px #e7b252; }
.progress progress.danger::-webkit-progress-value { background: #b54037; box-shadow: inset 0 1px #e2675d; }
.progress progress.danger::-moz-progress-bar { background: #b54037; box-shadow: inset 0 1px #e2675d; }
.table-wrap { overflow: auto; border: 1px solid #353534; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; background: #252524; }
th {
  padding: 6px;
  border-bottom: 2px solid var(--green);
  background: #353534;
  color: #777;
  font-size: 10px;
  font-weight: normal;
  text-align: left;
}
td { padding: 6px; border-top: 1px solid #333; border-left: 1px solid #333; color: #ccc; }
td:first-child { border-left: 0; }
tbody tr:nth-child(even) td { background: #242423; }
tbody tr:hover td { background: #20201f; }
code, .mono { color: #afd046; font: 11px Consolas, Monaco, "Courier New", monospace; }
.token-box { display: flex; gap: 7px; }
.token-box input { font-family: Consolas, Monaco, monospace; }

.auth-wrap { width: min(440px, calc(100vw - 24px)); margin: 11vh auto; }
.auth-wrap .shell { width: 100%; margin: 0; padding: 20px; }
.auth-wrap .shell-inner { min-height: 0; }
.auth-logo { padding: 11px 12px 13px; margin-bottom: 12px; border: 1px solid var(--line-light); border-top: 4px solid var(--green); background: #272726; }
.auth-logo .brand-mark { font-size: 23px; }
.auth-logo p { margin: 4px 0 0; color: #777; font-size: 9px; }
.auth-links { display: flex; justify-content: center; gap: 14px; margin-top: 15px; }
.alert { margin: 8px 0; padding: 8px; border: 1px solid #71342e; background: #321b18; color: #e99b93; }
.success { border-color: #587209; background: #1c250d; color: #c0db71; }
.recovery { padding: 12px; border: 1px solid #647c0c; background: #171b0c; color: #c6e374; font: 13px/1.8 Consolas, Monaco, monospace; word-spacing: 7px; }
.model-preview {
  max-height: 190px;
  margin-top: 8px;
  padding: 7px;
  border: 1px solid #3e3e3d;
  background: #1b1b1b;
  overflow: auto;
}
.model-preview-title { margin-bottom: 6px; color: #bbb; font-weight: bold; }
.model-preview code { display: block; padding: 3px 5px; border-top: 1px solid #2d2d2c; color: #b4e61e; }
.model-preview code:first-of-type { border-top: 0; }
.provider-card { margin-bottom: 7px; padding: 8px; border: 1px solid #3a3a39; background: #1c1c1b; }
.provider-card:nth-child(even) { background: #1d1d1c; }
.provider-card:hover { background: #20201f; }
.provider-card h3 { margin: 0; color: #ccc; font-size: 11px; }
.provider-card .meta { display: flex; flex-wrap: wrap; gap: 6px 11px; margin-top: 6px; color: #777; font: 9px Consolas, Monaco, monospace; }
.tabs { display: flex; margin-bottom: 12px; border-bottom: 2px solid var(--green); background: #353534; }
.tab { padding: 7px 10px; border: 0; border-right: 1px solid #1e1e1d; background: transparent; color: #aaa; }
.tab.active { background: #272726; color: var(--green-bright); }
.ascii-plan { overflow: auto; padding: 11px; border: 1px solid #3e3e3d; background: #161615; color: #b4d55c; font: 11px/1.5 Consolas, Monaco, monospace; white-space: pre; }
.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 7px; }
.toast { min-width: 260px; padding: 9px 11px; border: 1px solid #4f4f4d; border-left: 3px solid var(--green); background: #272726; box-shadow: 0 5px 18px #000; }
.toast.error { border-left-color: var(--red); }
.modal-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: #000c; }
.modal { width: min(560px, 100%); padding: 20px; border: 1px solid var(--line-light); border-top: 4px solid var(--green); background: var(--panel); box-shadow: 0 12px 50px #000; }
.hidden { display: none !important; }

@media (max-width: 800px) {
  .shell { width: calc(100vw - 14px); margin: 8px auto; padding: 10px; }
  .board-menu { padding: 0; }
  .nav-button { flex: 1 0 auto; padding: 8px; }
  .nav-button .icon { display: none; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .board-status { gap: 5px 10px; }
  .board-status span:nth-child(2) { display: none; }
  .content { padding: 0; }
  .topline > span { display: none; }
  .board-footer { display: block; }
  .board-footer span { display: block; margin: 2px 0; }
}
