:root {
  --bg: #070907;
  --bg-soft: #0b0e0a;
  --panel: #0f130d;
  --panel-2: #131810;
  --panel-3: #171d13;
  --line: #212a1b;
  --line-2: #2e3a26;
  --text: #e6efdb;
  --muted: #93a185;
  --dim: #64705a;
  --lime: #c8ff4e;
  --lime-soft: rgba(200, 255, 78, 0.12);
  --amber: #ffb454;
  --red: #ff6f61;
  --blue: #84d8ff;
  --font: ui-monospace, SFMono-Regular, "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --radius: 14px;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 70% 45% at 18% -10%, rgba(200, 255, 78, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(132, 216, 255, 0.045), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.017) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.017) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--lime);
  color: #0a0c08;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 26px;
}

.eyebrow {
  color: var(--lime);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--lime);
  opacity: 0.7;
}

.muted {
  color: var(--muted);
}

.dim {
  color: var(--dim);
}

.accent {
  color: var(--lime);
}

.danger-text {
  color: var(--red);
}

.spacer {
  flex: 1;
}

.hidden {
  display: none !important;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 7, 0.82);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.brand-mark {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--lime);
  flex: 0 0 auto;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--lime);
  border-radius: 50% 50% 50% 0;
  transform: rotate(45deg);
}

.brand-tag {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 2px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.topnav a {
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  transition: 150ms ease;
}

.topnav a:hover,
.topnav a.active {
  color: var(--text);
  background: var(--panel-2);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}

.identity strong {
  font-size: 12px;
  font-weight: 500;
}

.identity span {
  font-size: 10px;
  color: var(--dim);
}

.avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--lime);
  font-size: 12px;
  text-transform: uppercase;
}

.avatar-btn:hover {
  border-color: var(--lime);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 15px;
  font-size: 12.5px;
  line-height: 1;
  transition: 140ms ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: #465a3a;
  background: var(--panel-3);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--lime);
  color: #0a0d07;
  border-color: var(--lime);
  font-weight: 600;
}

.btn-primary:hover {
  background: #d7ff75;
  border-color: #d7ff75;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-danger {
  border-color: rgba(255, 111, 97, 0.4);
  color: var(--red);
  background: rgba(255, 111, 97, 0.07);
}

.btn-danger:hover {
  background: rgba(255, 111, 97, 0.15);
  border-color: var(--red);
}

.btn-small {
  padding: 7px 11px;
  font-size: 11.5px;
  border-radius: 7px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-2);
}

/* ---------- landing ---------- */

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing .topbar {
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: rgba(33, 42, 27, 0.6);
}

.landing-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: center;
  padding: 64px 0 48px;
}

.land-h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 500;
  margin: 22px 0 22px;
}

.land-h1 em {
  font-style: normal;
  color: var(--lime);
  position: relative;
  white-space: nowrap;
}

.land-h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 0.08em;
  background: var(--lime);
  opacity: 0.25;
}

.lede {
  color: var(--muted);
  max-width: 48ch;
  font-size: 14.5px;
  line-height: 1.75;
}

.lede strong {
  color: var(--text);
  font-weight: 500;
}

.land-points {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 10px;
  max-width: 52ch;
}

.land-points li {
  display: flex;
  gap: 11px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.land-points li::before {
  content: "+";
  color: var(--lime);
  font-weight: 600;
  flex: 0 0 auto;
}

.land-points strong {
  color: var(--text);
  font-weight: 500;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.stat-strip div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-strip b {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.stat-strip span {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.land-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11px;
}

.land-foot a {
  color: var(--muted);
}

.land-foot a:hover {
  color: var(--lime);
}

/* ---------- login ---------- */

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 55%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.login-panel {
  padding: 26px;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  opacity: 0.5;
}

.login-panel h2 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.login-panel .sub {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 6px;
  margin-bottom: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.input,
select.input,
textarea.input {
  width: 100%;
  background: #0a0d08;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text);
  outline: none;
  transition: 140ms ease;
}

.input::placeholder {
  color: var(--dim);
}

.input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(200, 255, 78, 0.09);
}

textarea.input {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.login-panel .btn {
  width: 100%;
  margin-top: 4px;
  padding: 11px;
}

.login-note {
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--dim);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.6;
}

.login-note::before {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: 8px;
  color: var(--muted);
  flex: 0 0 auto;
  margin-top: 2px;
}

.form-error {
  display: none;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 111, 97, 0.35);
  background: rgba(255, 111, 97, 0.07);
  color: #ffb0a7;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.5;
}

.form-error.show {
  display: block;
}

.land-signin-shortcut {
  display: none;
}

/* ---------- dashboard ---------- */

.page {
  padding-top: 34px;
  padding-bottom: 70px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: clamp(26px, 3.4vw, 34px);
  letter-spacing: -0.035em;
  font-weight: 500;
  margin-top: 8px;
}

.page-head .sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.page-head .actions {
  margin-left: auto;
  display: flex;
  gap: 9px;
}

.meters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  margin-bottom: 18px;
}

.meter {
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.meter:last-child {
  border-right: 0;
}

.meter-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.meter-value {
  font-size: 17px;
  letter-spacing: -0.03em;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meter-value small {
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0;
}

.meter-bar {
  height: 2px;
  background: var(--line);
  margin-top: 10px;
  border-radius: 2px;
  overflow: hidden;
}

.meter-bar i {
  display: block;
  height: 100%;
  background: var(--lime);
  border-radius: 2px;
}

.tunnel-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(200, 255, 78, 0.045), transparent 55%), var(--panel);
  flex-wrap: wrap;
}

.tunnel-banner .label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  flex: 0 0 auto;
}

.copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-2);
  background: #0a0d08;
  border-radius: 8px;
  padding: 5px 6px 5px 10px;
  min-width: 0;
  max-width: 100%;
}

.copy-chip code {
  font-size: 11px;
  color: var(--lime);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 52ch;
}

.copy-chip button {
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 6px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  flex: 0 0 auto;
}

.copy-chip button:hover {
  color: var(--text);
  border-color: var(--lime);
}

.tunnel-banner .note {
  font-size: 10.5px;
  color: var(--dim);
  flex: 1 1 320px;
  min-width: 220px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 14px;
}

.section-head h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.section-head .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.section-head span {
  font-size: 10px;
  color: var(--dim);
}

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

.box-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 40%), var(--panel);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: 160ms ease;
  position: relative;
  overflow: hidden;
}

.box-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.box-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 255, 78, 0.4), transparent);
  opacity: 0;
  transition: 180ms;
}

.box-card:hover::after {
  opacity: 1;
}

.box-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.kind-badge {
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  color: var(--muted);
  border-radius: 5px;
  padding: 2px 6px;
}

.kind-badge.static {
  color: var(--blue);
  border-color: rgba(132, 216, 255, 0.3);
}

.kind-badge.node {
  color: var(--lime);
  border-color: rgba(200, 255, 78, 0.3);
}

.kind-badge.python {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.3);
}

.ring {
  --left: 100;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--lime) calc(var(--left) * 1%), #2a3524 0);
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
}

.ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--panel);
  border-radius: 50%;
}

.ring span {
  position: relative;
  font-size: 10px;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ring.warn {
  background: conic-gradient(var(--amber) calc(var(--left) * 1%), #2a3524 0);
}

.ring.danger {
  background: conic-gradient(var(--red) calc(var(--left) * 1%), #2a3524 0);
}

.box-card h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.box-card .slug {
  font-size: 10.5px;
  color: var(--dim);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.box-card .slug b {
  color: var(--muted);
  font-weight: 400;
}

.box-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 10.5px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  flex: 0 0 auto;
}

.dot.live {
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(200, 255, 78, 0.12);
}

.dot.idle {
  background: var(--amber);
}

.dot.dead {
  background: var(--dim);
}

.dot.down {
  background: var(--red);
}

.box-card footer {
  display: flex;
  gap: 7px;
  margin-top: auto;
}

.box-card footer .btn {
  flex: 1;
}

.empty {
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 46px 24px;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.008);
}

.empty b {
  color: var(--muted);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

/* ---------- detail ---------- */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--lime);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-title h1 {
  font-size: clamp(24px, 3.2vw, 32px);
  letter-spacing: -0.035em;
  font-weight: 500;
}

.detail-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  color: var(--dim);
  font-size: 11px;
  margin-top: 8px;
}

.detail-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  padding: 16px;
}

.side-card h3 {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

.res-card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.res-row {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.res-row:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.res-row:last-of-type {
  padding-bottom: 0;
}

.res-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.res-label {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.res-val {
  font-size: 9.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.res-row .spark {
  height: 24px;
  margin-top: 5px;
}

.res-row .spark path.spark-b {
  stroke: var(--blue);
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 14px;
  font-size: 11.5px;
}

.kv dt {
  color: var(--dim);
}

.kv dd {
  margin: 0;
  text-align: right;
  color: var(--muted);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

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

.tab {
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--dim);
  padding: 11px 14px;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.tab .count {
  font-size: 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0 5px;
  color: var(--dim);
}

.panel-pad {
  padding: 18px;
}

.files-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.quota {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  min-width: 150px;
  font-size: 9.5px;
  color: var(--dim);
}

.quota-bar {
  width: 150px;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.quota-bar i {
  display: block;
  height: 100%;
  background: var(--lime);
}

.quota-bar.warn i {
  background: var(--amber);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--dim);
  margin-bottom: 12px;
  min-height: 20px;
}

.breadcrumb button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 2px 5px;
  border-radius: 5px;
}

.breadcrumb button:hover {
  color: var(--lime);
  background: var(--panel-2);
}

.breadcrumb .sep {
  opacity: 0.5;
}

.dropzone {
  border: 1px dashed transparent;
  border-radius: 10px;
  transition: 140ms;
}

.dropzone.dragging {
  border-color: var(--lime);
  background: rgba(200, 255, 78, 0.05);
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.file-table th {
  text-align: left;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
}

.file-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(33, 42, 27, 0.55);
  color: var(--muted);
  vertical-align: middle;
}

.file-table tr:last-child td {
  border-bottom: 0;
}

.file-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

.file-name {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.file-name:hover {
  color: var(--lime);
}

.ftype {
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
  flex: 0 0 auto;
}

.ftype.dir {
  color: var(--blue);
  border-color: rgba(132, 216, 255, 0.25);
}

.file-actions {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
}

.file-actions button {
  background: none;
  border: 0;
  color: var(--dim);
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 10px;
}

.file-actions button:hover {
  color: var(--text);
  background: var(--panel-2);
}

.file-actions button.danger:hover {
  color: var(--red);
}

.file-size,
.file-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
}

.file-empty {
  padding: 30px 10px;
  text-align: center;
  color: var(--dim);
  font-size: 11px;
}

pre.console {
  background: #060806;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin: 0;
  min-height: 300px;
  max-height: 520px;
  overflow: auto;
  font-size: 10.5px;
  line-height: 1.65;
  color: #b9c9a8;
  white-space: pre-wrap;
  word-break: break-word;
}

pre.console .mayfly-line {
  color: var(--lime);
}

.logs-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.toggle input {
  appearance: none;
  width: 26px;
  height: 14px;
  border-radius: 99px;
  background: var(--line-2);
  position: relative;
  cursor: pointer;
  transition: 140ms;
  margin: 0;
}

.toggle input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dim);
  transition: 140ms;
}

.toggle input:checked {
  background: rgba(200, 255, 78, 0.25);
}

.toggle input:checked::after {
  left: 14px;
  background: var(--lime);
}

.access-block {
  padding: 18px;
}

.access-block + .access-block {
  border-top: 1px solid var(--line);
}

.access-block h3 {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 5px;
}

.access-block p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 76ch;
}

.access-block p + p {
  margin-top: 8px;
}

.access-block .warn-note {
  color: var(--amber);
}

.port-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.port {
  border: 1px solid var(--line-2);
  background: #0a0d08;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.port:first-child {
  color: var(--lime);
  border-color: rgba(200, 255, 78, 0.35);
}

.port span {
  font-size: 8px;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.codeblock {
  position: relative;
  background: #060806;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-top: 12px;
  overflow: hidden;
}

.codeblock pre {
  margin: 0;
  padding: 12px 42px 12px 13px;
  overflow-x: auto;
  font-size: 10.5px;
  line-height: 1.7;
  color: #c4d7ae;
}

.codeblock button {
  position: absolute;
  top: 7px;
  right: 7px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 9px;
  border-radius: 5px;
  padding: 3px 7px;
}

.codeblock button:hover {
  color: var(--lime);
  border-color: var(--lime);
}

.access-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.access-list code {
  color: var(--lime);
}

.tunnel-live {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid rgba(200, 255, 78, 0.25);
  background: rgba(200, 255, 78, 0.04);
  border-radius: 9px;
}

.tunnel-live .tag {
  color: var(--lime);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tunnel-live code {
  font-size: 10.5px;
  overflow-wrap: anywhere;
  color: var(--text);
}

/* ---------- tables / admin ---------- */

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 12px;
  font-weight: 500;
}

.panel-head .actions {
  margin-left: auto;
  display: flex;
  gap: 7px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.table th {
  text-align: left;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(33, 42, 27, 0.6);
  color: var(--muted);
  vertical-align: middle;
}

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

.table tr:hover td {
  background: rgba(255, 255, 255, 0.012);
}

.table .strong {
  color: var(--text);
  font-weight: 500;
}

.cell-input {
  width: 64px;
  background: #0a0d08;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  color: var(--text);
  text-align: right;
}

.cell-input:focus {
  outline: none;
  border-color: var(--lime);
}

.mini {
  font-size: 10px;
  color: var(--dim);
}

.role-badge {
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--dim);
}

.role-badge.admin {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.3);
}

.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 330px;
  overflow: auto;
}

.event-list li {
  display: flex;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(33, 42, 27, 0.5);
  font-size: 10.5px;
  color: var(--muted);
}

.event-list li:last-child {
  border-bottom: 0;
}

.event-list time {
  color: var(--dim);
  flex: 0 0 84px;
  font-variant-numeric: tabular-nums;
}

.event-list .lvl {
  flex: 0 0 auto;
  color: var(--dim);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 1px;
  width: 58px;
}

.event-list .lvl.expire,
.event-list .lvl.kill,
.event-list .lvl.delete {
  color: var(--red);
}

.event-list .lvl.create,
.event-list .lvl.start {
  color: var(--lime);
}

.event-list .lvl.login-fail {
  color: var(--amber);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.7fr 0.8fr 0.8fr auto;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  align-items: end;
}

.inline-form .field {
  margin: 0;
  gap: 5px;
}

.inline-form .input {
  padding: 7px 9px;
  font-size: 11px;
}

.inline-form .btn {
  height: 32px;
  padding: 0 12px;
}

.docs {
  max-width: 76ch;
  padding: 26px 0 60px;
}

.docs h1 {
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.04em;
  font-weight: 500;
  margin: 14px 0 18px;
}

.docs h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 40px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.docs h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 22px 0 8px;
  color: var(--text);
}

.docs p,
.docs li {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.85;
}

.docs p + p {
  margin-top: 10px;
}

.docs ul,
.docs ol {
  padding-left: 20px;
  margin: 10px 0;
}

.docs li {
  margin-bottom: 5px;
}

.docs code {
  color: var(--lime);
  font-size: 11.5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}

.docs .callout {
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--amber);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px 15px;
  margin: 16px 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.75;
}

.docs .callout strong {
  color: var(--text);
  font-weight: 500;
}

.docs .callout.lime {
  border-left-color: var(--lime);
}

/* ---------- modal / toast ---------- */

#modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

#modal-root.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 3, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
  animation: fade 130ms ease;
}

.modal {
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  animation: rise 160ms ease;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.modal.wide {
  max-width: 760px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px 0;
}

.modal-head h2 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.modal-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.modal-head .close {
  margin-left: auto;
}

.modal-body {
  padding: 18px 20px;
}

.modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 20px 20px;
}

.kind-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.kind-option {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 10px;
  background: #0b0e09;
  cursor: pointer;
  transition: 140ms;
}

.kind-option:hover {
  border-color: var(--line-2);
}

.kind-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kind-option .k-title {
  font-size: 11.5px;
  color: var(--text);
  display: block;
}

.kind-option .k-desc {
  font-size: 9.5px;
  color: var(--dim);
  line-height: 1.5;
  margin-top: 3px;
  display: block;
}

.kind-option.checked {
  border-color: var(--lime);
  background: rgba(200, 255, 78, 0.06);
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  background: #0a0d08;
  margin-top: 6px;
}

.checkline input[type="checkbox"] {
  accent-color: var(--lime);
  margin-top: 3px;
}

.checkline .t {
  font-size: 11.5px;
}

.checkline .d {
  font-size: 10px;
  color: var(--dim);
  line-height: 1.6;
  margin-top: 2px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-note {
  color: var(--dim);
  font-size: 10.5px;
  line-height: 1.65;
  margin-top: 8px;
}

.form-note code {
  color: var(--muted);
}

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(92vw, 360px);
}

.toast {
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--lime);
  background: rgba(16, 21, 13, 0.97);
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 11px;
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: rise 160ms ease;
  line-height: 1.5;
}

.toast.err {
  border-left-color: var(--red);
}

.toast.warn {
  border-left-color: var(--amber);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .landing-main {
    grid-template-columns: 1fr;
    padding-top: 44px;
    gap: 36px;
  }

  .landing-copy {
    max-width: 640px;
  }

  .login-panel {
    max-width: 460px;
  }

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

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

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

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

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

  .meter:nth-child(2) {
    border-right: 0;
  }

  .meter:nth-child(1),
  .meter:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .inline-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .topbar-inner {
    gap: 12px;
    height: 56px;
  }

  .topnav a {
    padding: 6px 8px;
    font-size: 11px;
  }

  .identity {
    display: none;
  }

  .brand {
    font-size: 15px;
  }

  .land-h1 {
    font-size: clamp(34px, 10vw, 48px);
    margin-top: 16px;
  }

  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .page {
    padding-top: 24px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-head .actions {
    margin-left: 0;
    width: 100%;
  }

  .page-head .actions .btn {
    flex: 1;
  }

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

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

  .meter {
    padding: 13px;
  }

  .meter-value {
    font-size: 15px;
  }

  .tunnel-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .copy-chip {
    width: 100%;
  }

  .copy-chip code {
    max-width: 100%;
    flex: 1;
  }

  .detail-actions {
    margin-left: 0;
    width: 100%;
  }

  .detail-actions .btn {
    flex: 1;
  }

  .detail-side {
    grid-template-columns: 1fr;
  }

  .file-table .mtime-col,
  .file-table .time-col {
    display: none;
  }

  .file-table td,
  .file-table th {
    padding: 7px 5px;
  }

  .quota {
    margin-left: 0;
    align-items: flex-start;
    width: 100%;
  }

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

  .inline-form {
    grid-template-columns: 1fr 1fr;
  }

  .inline-form .btn {
    grid-column: span 2;
  }

  .table th,
  .table td {
    padding: 9px 8px;
  }

  .table .hide-sm {
    display: none;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 15px;
    padding-right: 15px;
  }

  .toasts {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
  }
}

.editor {
  min-height: 320px;
  font-family: var(--font);
  font-size: 11.5px;
  line-height: 1.7;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

input[type="number"].cell-input {
  font-variant-numeric: tabular-nums;
}

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 5px;
  border-radius: 999px;
  background: var(--lime);
  color: #0a0c08;
  font-size: 9px;
  font-weight: 600;
  vertical-align: 1px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 10px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.request-list {
  border-top: 1px solid var(--line);
  max-height: 520px;
  overflow: auto;
}

.request-row {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(33, 42, 27, 0.55);
  flex-wrap: wrap;
}

.request-row:last-child {
  border-bottom: 0;
}

.request-main {
  flex: 1;
  min-width: 240px;
}

.request-main .who {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--text);
  font-size: 11.5px;
}

.request-main .contact {
  color: var(--muted);
  font-size: 10.5px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.request-main .note {
  color: var(--dim);
  font-size: 10.5px;
  margin-top: 3px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.request-main .meta {
  color: var(--dim);
  font-size: 9.5px;
  margin-top: 4px;
}

.request-actions {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
}

.request-actions button {
  background: none;
  border: 0;
  color: var(--dim);
  padding: 4px 5px;
  border-radius: 4px;
  font-size: 10px;
}

.request-actions button:hover {
  color: var(--text);
  background: var(--panel-2);
}

.request-actions button.danger:hover {
  color: var(--red);
}

.request-section {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.012);
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pill.pending,
.pill.approved {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.3);
}

.pill.open {
  color: var(--lime);
  border-color: rgba(200, 255, 78, 0.3);
}

.pill.redeemed {
  color: var(--blue);
  border-color: rgba(132, 216, 255, 0.3);
}

.pill.expired,
.pill.revoked,
.pill.denied {
  color: var(--red);
  border-color: rgba(255, 111, 97, 0.3);
}

.pill.issue {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.3);
}

.pill.feature,
.pill.new {
  color: var(--lime);
  border-color: rgba(200, 255, 78, 0.3);
}

.pill.read {
  color: var(--blue);
  border-color: rgba(132, 216, 255, 0.3);
}

.pill.closed {
  color: var(--dim);
}

.key-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.key-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #0a0d08;
}

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

.key-name {
  color: var(--text);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.key-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.6;
}

.key-meta code {
  color: var(--text);
  font-size: 10px;
}

@media (max-width: 640px) {
  .request-actions {
    justify-content: flex-start;
  }

  .field-row.three {
    grid-template-columns: 1fr;
  }
}

/* ---------- wide layout / dashboard ---------- */

.wrap.wide-page {
  max-width: 1500px;
}

.dash-head {
  align-items: flex-end;
  flex-wrap: wrap;
}

.head-brief {
  display: flex;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}

.head-brief span {
  padding: 9px 14px;
  border-right: 1px solid var(--line);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  min-width: 96px;
  line-height: 1.4;
}

.head-brief span:last-child {
  border-right: 0;
}

.head-brief b {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  letter-spacing: -0.01em;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  font-weight: 500;
}

.dash-head .actions {
  margin-left: 0;
}

.box-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 30px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 10.5px;
}

.site-foot nav {
  display: flex;
  gap: 14px;
}

.site-foot a {
  color: var(--muted);
}

.site-foot a:hover {
  color: var(--lime);
}

.login-legal {
  margin-top: 14px;
  font-size: 10px;
  color: var(--dim);
}

.login-legal a {
  color: var(--muted);
}

.login-legal a:hover {
  color: var(--lime);
}

.form-note a {
  color: var(--lime);
}

/* ---------- console ---------- */

.console-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 4px 5px 4px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #060806;
  transition: 140ms;
}

.console-form:focus-within {
  border-color: var(--lime);
}

.console-prompt {
  color: var(--lime);
  font-size: 12px;
  flex: 0 0 auto;
}

.console-form .input {
  border: 0;
  background: none;
  box-shadow: none;
  padding: 7px 0;
  font-size: 11.5px;
}

.console-form .input:focus {
  box-shadow: none;
}

.console-form .btn {
  flex: 0 0 auto;
}

/* ---------- admin shell ---------- */

.admin-page {
  padding-top: 26px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-side {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-side-head {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line);
}

.admin-side-head h2 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 7px;
}

.admin-side-head .mini {
  display: block;
  margin-top: 3px;
}

.admin-menu {
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.admin-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11.5px;
  transition: 140ms;
}

.admin-menu a:hover {
  background: var(--panel-2);
  color: var(--text);
}

.admin-menu a.active {
  background: var(--lime-soft);
  color: var(--lime);
}

.side-meta {
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: var(--dim);
  white-space: nowrap;
}

.admin-menu a.active .side-meta {
  color: var(--lime);
  opacity: 0.8;
}

.side-meta.hot {
  color: var(--amber);
}

.admin-side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.side-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.admin-sec-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 2px 2px 4px;
}

.admin-sec-head h1 {
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 500;
  letter-spacing: -0.035em;
  margin-top: 7px;
}

.admin-sec-head .sub {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 4px;
}

.admin-sec-head .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

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

.admin-stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 14px 16px;
  min-width: 0;
}

.admin-stat-value {
  font-size: 25px;
  letter-spacing: -0.04em;
  margin-top: 7px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-stat-value small {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0;
}

.admin-stat-sub {
  font-size: 9.5px;
  color: var(--dim);
  margin-top: 4px;
}

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

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

.fb-subject {
  color: var(--text);
  font-size: 11px;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.fb-note {
  margin-top: 8px;
  width: 100%;
  font-size: 10px;
}

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

.event-list.tall {
  max-height: 640px;
}

.request-history summary {
  list-style: none;
  cursor: pointer;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.012);
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.request-history summary::-webkit-details-marker {
  display: none;
}

.request-history summary::before {
  content: "+ ";
  color: var(--muted);
}

.request-history[open] summary::before {
  content: "− ";
}

.request-history summary:hover {
  color: var(--text);
}

/* ---------- telemetry ---------- */

.tel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.tel-tile {
  background: var(--panel);
  padding: 12px 14px 10px;
  min-width: 0;
  position: relative;
}

.tel-label {
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.tel-value {
  font-size: 22px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
  white-space: nowrap;
}

.tel-io {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tel-io small {
  font-size: 8px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
}

.tel-sub {
  font-size: 9px;
  color: var(--dim);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spark {
  display: block;
  width: 100%;
  height: 28px;
  margin-top: 7px;
  overflow: visible;
}

.spark path {
  fill: none;
  stroke: var(--lime);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}

.tel-tile:nth-child(3) .spark path {
  stroke: var(--blue);
}

.tel-tile:nth-child(4) .spark path {
  stroke: var(--amber);
}

.tel-tile:nth-child(5) .spark path {
  stroke: var(--red);
}

.spark path.spark-b {
  opacity: 0.5;
  stroke-dasharray: 3 3;
}

.tel-tile:nth-child(3) .spark path.spark-a {
  stroke: var(--blue);
}

.tel-tile:nth-child(3) .spark path.spark-b {
  stroke: var(--amber);
}

.tel-tile:nth-child(4) .spark path.spark-a {
  stroke: var(--lime);
}

.tel-tile:nth-child(4) .spark path.spark-b {
  stroke: var(--amber);
}

.tel-bar {
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  margin-top: 7px;
  overflow: hidden;
}

.tel-bar i {
  display: block;
  height: 100%;
  background: var(--lime);
  transition: width 0.4s ease;
}

.tel-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.tel-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.tel-detail {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
}

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

.tel-detail-grid h4 {
  margin: 0 0 8px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 400;
}

.detail-big {
  font-size: 20px;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.detail-big small {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0;
}

.tel-detail-grid .meter-bar {
  margin: 8px 0 7px;
}

.core-row {
  display: grid;
  grid-template-columns: 52px 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
  font-size: 9.5px;
  color: var(--dim);
}

.core-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.core-bar i {
  display: block;
  height: 100%;
  background: var(--lime);
}

.core-row b {
  text-align: right;
  font-weight: 400;
  color: var(--muted);
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;
  color: var(--muted);
}

.mini-table th {
  text-align: left;
  font-weight: 400;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 3px 4px;
  border-bottom: 1px solid var(--line);
}

.mini-table td {
  padding: 4px;
  border-bottom: 1px solid rgba(33, 42, 27, 0.4);
  font-variant-numeric: tabular-nums;
}

.sensor {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(33, 42, 27, 0.4);
  font-size: 9.5px;
  color: var(--muted);
}

.sensor b {
  color: var(--text);
  font-weight: 400;
}

/* ---------- callout (also used in modals) ---------- */

.callout {
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--amber);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px 15px;
  margin: 16px 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.75;
}

.callout strong {
  color: var(--text);
  font-weight: 500;
}

.callout.lime {
  border-left-color: var(--lime);
}

.callout.compact {
  margin: 14px 0;
  font-size: 11px;
  line-height: 1.65;
}

/* ---------- docs & legal ---------- */

.docs-page {
  padding-top: 30px;
  padding-bottom: 10px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 16px;
  border-right: 1px solid var(--line);
}

.docs-toc h2 {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin: 10px 0 8px;
}

.docs-toc nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.docs-toc nav button,
.docs-toc nav a {
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 10.5px;
  color: var(--dim);
}

.docs-toc nav button:hover,
.docs-toc nav a:hover {
  color: var(--text);
  background: var(--panel-2);
}

.docs-toc nav button.active {
  color: var(--lime);
  background: var(--lime-soft);
}

.docs-toc-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.docs-toc-foot a {
  color: var(--dim);
}

.docs-toc-foot a:hover {
  color: var(--lime);
}

.docs-page .docs {
  max-width: none;
  min-width: 0;
  padding: 0 0 50px;
}

.docs.legal {
  max-width: 78ch;
}

.docs-hero {
  padding-bottom: 26px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.docs-hero h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 16px 0;
  max-width: 18ch;
}

.docs-hero .lede {
  max-width: 66ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.docs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.docs-chips span {
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--panel);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.docs section {
  scroll-margin-top: 90px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.quick-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent), var(--panel);
}

.quick-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 1px 6px;
  border: 1px solid rgba(200, 255, 78, 0.3);
  border-radius: 5px;
  color: var(--lime);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quick-card h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.quick-card ol {
  margin: 0 0 10px;
  padding-left: 18px;
}

.quick-card li {
  margin-bottom: 4px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.quick-card b {
  color: var(--text);
  font-weight: 500;
}

.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.flow span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}

.flow span b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--lime);
  font-size: 9px;
  font-weight: 500;
}

.flow span.end b {
  background: rgba(255, 111, 97, 0.12);
  color: var(--red);
}

.flow i {
  width: 18px;
  height: 1px;
  background: var(--line-2);
}

.docs .legal h2 {
  margin-top: 32px;
}

@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    position: static;
  }

  .admin-side-head {
    display: none;
  }

  .admin-menu {
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
  }

  .admin-menu a {
    flex: 0 0 auto;
    gap: 7px;
    white-space: nowrap;
  }

  .side-meta {
    display: none;
  }

  .admin-side-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

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

  .head-brief {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .head-brief span {
    flex: 1;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .docs-toc {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 14px;
    gap: 2px;
  }

  .docs-toc h2 {
    width: 100%;
    margin: 0 0 4px;
  }

  .docs-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .docs-toc-foot {
    display: none;
  }

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

  .admin-split,
  .feedback-split,
  .host-grid,
  .quick-grid,
  .tel-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-page {
    padding-top: 18px;
  }

  .admin-menu {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .admin-menu a {
    flex: 0 1 auto;
    padding: 7px 9px;
    font-size: 10.5px;
  }

  .admin-sec-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-sec-head .actions {
    margin-left: 0;
    width: 100%;
  }

  .admin-sec-head .actions .btn {
    flex: 1;
  }

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

  .head-brief {
    overflow-x: auto;
  }

  .head-brief span {
    min-width: 90px;
    padding: 8px 10px;
  }

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

  .flow i {
    display: none;
  }

  .docs-page {
    padding-top: 20px;
  }

  .site-foot {
    margin-top: 30px;
  }
}
