/* Cycles MCP dashboard — dark UI with the Cycles green (#CDF698) as accent. */
:root {
  --bg: #0e1114;
  --bg-card: #171c21;
  --bg-inset: #10141a;
  --border: #262d35;
  --text: #e8edf2;
  --muted: #8b98a5;
  --accent: #cdf698;
  --accent-ink: #15200a;
  --danger: #ff7b72;
  --ok: #7ee787;
  --radius: 12px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--danger); font-size: 0.9rem; margin-top: 0.6rem; }

/* ---------- login ---------- */
.center-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.tagline { color: var(--muted); margin: 0.4rem 0 1.5rem; }

.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand h1 { font-size: 1.4rem; margin: 0; letter-spacing: 0.01em; }
.brand-name { font-weight: 700; font-size: 1.05rem; }
.brand-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at center, var(--bg-card) 0 32%, var(--accent) 36% 100%);
  flex: none;
}

label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0.25rem; }
input[type="email"], input[type="password"], input[type="text"], select {
  width: 100%;
  background: var(--bg-inset);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); width: 100%; margin-top: 1.2rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; width: auto; margin-top: 0; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }

.divider {
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--muted); font-size: 0.8rem;
  margin: 1.1rem 0;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.fineprint { color: var(--muted); font-size: 0.75rem; margin-top: 1.4rem; margin-bottom: 0; }

/* ---------- dashboard ---------- */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky; top: 0; z-index: 5;
}
.header-right { display: flex; align-items: center; gap: 0.9rem; }

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.card h2 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.card-head h2 { margin: 0; }

.snippet {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre;
  margin: 0.6rem 0 0;
}

/* mint form */
.mint-form {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin: 0.8rem 0;
  background: var(--bg-inset);
}
.scope-pick { display: flex; gap: 0.8rem; margin-top: 0.9rem; flex-wrap: wrap; }
.scope-opt {
  flex: 1 1 240px;
  display: flex; gap: 0.6rem; align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  margin: 0;
}
.scope-opt:has(input:checked) { border-color: var(--accent); background: rgba(205, 246, 152, 0.06); }
.scope-opt input { margin-top: 0.25rem; accent-color: var(--accent); }
.scope-opt strong { display: block; font-size: 0.9rem; }
.scope-opt span { display: block; color: var(--muted); font-size: 0.78rem; }
.row-end { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }

/* fresh token banner */
.fresh-token {
  border: 1px solid var(--accent);
  background: rgba(205, 246, 152, 0.07);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 0.8rem 0;
}
.fresh-head { font-size: 0.9rem; margin-bottom: 0.6rem; }
.fresh-row { display: flex; gap: 0.7rem; align-items: center; }
.fresh-row code {
  flex: 1;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: nowrap;
}

/* token rows */
.token-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.8rem 0.2rem;
  border-top: 1px solid var(--border);
}
.token-row:first-child { border-top: none; }
.token-main { flex: 1; min-width: 0; }
.token-name { font-weight: 600; }
.token-meta { color: var(--muted); font-size: 0.78rem; font-family: ui-monospace, Menlo, monospace; }
.badge {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  border-radius: 999px; padding: 0.15rem 0.6rem;
  text-transform: uppercase;
}
.badge-read { background: rgba(139, 152, 165, 0.15); color: var(--muted); border: 1px solid var(--border); }
.badge-rw { background: rgba(205, 246, 152, 0.12); color: var(--accent); border: 1px solid rgba(205, 246, 152, 0.4); }
.badge-revoked { background: rgba(255, 123, 114, 0.12); color: var(--danger); border: 1px solid rgba(255, 123, 114, 0.4); }

/* activity feed */
.activity-row {
  display: flex; gap: 0.9rem; align-items: baseline;
  padding: 0.55rem 0.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.87rem;
}
.activity-row:first-child { border-top: none; }
.activity-time { color: var(--muted); font-size: 0.75rem; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; }
.activity-tool { font-family: ui-monospace, Menlo, monospace; font-weight: 600; }
.activity-token { color: var(--muted); font-size: 0.75rem; }
.activity-args {
  color: var(--muted); font-size: 0.75rem; font-family: ui-monospace, Menlo, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; }
.dot-ok { background: var(--ok); }
.dot-error { background: var(--danger); }

.empty { color: var(--muted); font-size: 0.9rem; padding: 1rem 0.2rem; }

footer { text-align: center; padding: 0 1rem 2rem; }
