/* launches.johnnystar.tech — dark, dense, no framework. */

:root {
  --bg: #0b0d10;
  --panel: #14171c;
  --panel-2: #1a1e24;
  --line: #262c34;
  --text: #e6e9ee;
  --muted: #8b95a3;
  --dim: #616b79;
  --accent: #5eead4;
  --accent-dim: #134e4a;
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #4ade80;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

/* The UA rule for this is `[hidden] { display: none }`, which any `display`
 * declaration on a class of equal specificity beats — `.gate { display: grid }`
 * did exactly that, so the login panel ignored `hidden` and stayed on screen
 * even after signing in. Keep this above every layout rule. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

code,
.addr,
.mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

h1,
h2 {
  margin: 0 0 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

a {
  color: var(--accent);
}

/* ── login ──────────────────────────────────────────────────────────────── */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}

.gate-sub {
  margin: -8px 0 24px;
  color: var(--dim);
  font-size: 13px;
}

/* ── chrome ─────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.chain {
  color: var(--dim);
  font-size: 13px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

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

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 18px 22px;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.history {
  max-width: 1400px;
  margin: 0 auto 24px;
  padding: 22px;
}

/* ── forms ──────────────────────────────────────────────────────────────── */
.field {
  display: block;
  margin-bottom: 16px;
}

.field > span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.field em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  color: var(--dim);
}

input,
textarea,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
}

@media (max-width: 520px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.hint {
  margin: -8px 0 14px;
  font-size: 12px;
  color: var(--dim);
}

.or {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin: 10px 0 6px;
}

/* ── image drop ─────────────────────────────────────────────────────────── */
.drop {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  min-height: 132px;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(--bg);
  padding: 14px;
  text-align: center;
  transition: border-color 0.12s, background 0.12s;
}

.drop:hover,
.drop:focus,
.drop.over {
  border-color: var(--accent);
  background: var(--panel-2);
  outline: none;
}

.drop.busy {
  opacity: 0.55;
  pointer-events: none;
}

.drop-text strong {
  display: block;
  font-size: 14px;
}

.drop-text span {
  display: block;
  font-size: 12px;
  color: var(--dim);
  margin-top: 4px;
}

#preview {
  max-height: 168px;
  max-width: 100%;
  border-radius: 8px;
  display: block;
}

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.btn:hover:not(:disabled) {
  border-color: var(--muted);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #04201c;
  font-weight: 600;
}

.btn.primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}

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

.actions {
  display: flex;
  gap: 10px;
  margin: 20px 0 10px;
}

.advanced {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 4px;
}

.advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

/* ── output ─────────────────────────────────────────────────────────────── */
.empty {
  color: var(--dim);
  font-size: 14px;
}

.empty .fine {
  font-size: 12px;
  margin-top: 12px;
}

.status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid;
}

.status.ok {
  color: var(--ok);
  border-color: #14532d;
  background: #0d2818;
}

.status.bad {
  color: var(--danger);
  border-color: #5c1d1d;
  background: #2a1113;
}

.status.busy {
  color: var(--warn);
  border-color: #4a3a12;
  background: #241d0c;
}

.kv {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 18px;
  font-size: 13px;
}

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

.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* ── tabs ───────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  flex-wrap: wrap;
}

.tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  padding: 12px 16px;
  cursor: pointer;
  margin-bottom: -1px;
}

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

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

.tab-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #04201c;
  font-size: 11px;
  font-weight: 700;
}

/* ── claims ─────────────────────────────────────────────────────────────── */
.claim-total {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 14px;
}

.claim-total .big {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pos {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  flex-wrap: wrap;
}

.pos:last-child {
  border-bottom: none;
}

.pos.empty {
  opacity: 0.4;
}

.group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.group-head h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text);
}

.pos .tok {
  min-width: 190px;
  flex: 1;
}

.pos .id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-width: 76px;
  text-align: right;
}

.pos .amt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  flex: 1;
  min-width: 180px;
}

.vault-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
}

/* ── surge + catalogue ──────────────────────────────────────────────────── */
.surge-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sig {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.sig:last-child {
  border-bottom: none;
}

.sig img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
  flex-shrink: 0;
}

.sig-main {
  flex: 1;
  min-width: 180px;
}

.sig-sym {
  font-weight: 600;
}

.sig-metrics {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.up {
  color: var(--ok);
}

.catalogue {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.cat-form {
  margin: 14px 0 18px;
}

.cat-form .field {
  margin-bottom: 10px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.cat-item:last-child {
  border-bottom: none;
}

.cat-item .grow {
  flex: 1;
  min-width: 0;
}

.cat-item.done {
  opacity: 0.45;
}

.cat-next {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 2px 8px;
}

.fire {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* One block per protocol when launching to both at once. */
.leg {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--panel-2);
}

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

.leg-title {
  font-weight: 600;
  font-size: 14px;
}

.leg-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.leg-badge.ok {
  color: var(--ok);
  border-color: #14532d;
  background: #0d2818;
}

.leg-badge.bad {
  color: var(--danger);
  border-color: #5c1d1d;
  background: #2a1113;
}

.leg-error {
  font-size: 13px;
  color: var(--danger);
  overflow-wrap: anywhere;
}

.note {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.note.warn {
  border-color: #4a3a12;
  background: #241d0c;
  color: #fde68a;
}

.note.bad {
  border-color: #5c1d1d;
  background: #2a1113;
  color: #fecaca;
}

.economics {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.economics summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.economics ul {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--muted);
}

.economics li {
  margin-bottom: 6px;
}

.error {
  color: var(--danger);
  font-size: 13px;
  margin: 12px 0 0;
}

/* ── result ─────────────────────────────────────────────────────────────── */
.launched {
  border: 1px solid #14532d;
  background: #0d2818;
  border-radius: var(--radius);
  padding: 18px;
}

.launched h3 {
  margin: 0 0 12px;
  color: var(--ok);
  font-size: 16px;
}

/* ── history ────────────────────────────────────────────────────────────── */
.hitem {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.hitem:last-child {
  border-bottom: none;
}

.hitem img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
  flex-shrink: 0;
}

.hitem .hmeta {
  min-width: 0;
  flex: 1;
}

.hitem .hname {
  font-weight: 600;
}

.hitem .hsub {
  font-size: 12px;
  color: var(--dim);
  overflow-wrap: anywhere;
}
