@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --soft: #f7f8fa;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --panel: rgba(255,255,255,0.92);
  --dark: #0f172a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(37,99,235,0.13), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(18px);
}
.nav-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -0.02em; }
.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--dark);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.brand b { color: var(--blue); }
.menu-toggle {
  display: inline-grid;
  place-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.nav-links {
  position: fixed;
  top: 74px;
  bottom: 0;
  left: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  width: min(312px, calc(100vw - 40px));
  padding: 24px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,0.98);
  box-shadow: 22px 0 55px -42px rgba(16,24,40,0.8);
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transform: translateX(-105%);
  transition: transform .22s ease;
}
.menu-title { display: block; padding: 0 12px 12px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.menu-account { display: none; }
.nav-links a { display: block; padding: 13px 14px; border-radius: 10px; }
.nav-links a:hover, .nav-links a.active { background: var(--soft); color: var(--ink); }
.menu-open .nav-links { transform: translateX(0); }
.menu-open { overflow: hidden; }
.menu-overlay { position: fixed; inset: 74px 0 0; z-index: 20; border: 0; background: rgba(15,23,42,0.22); cursor: pointer; }
.menu-overlay[hidden] { display: none; }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 17px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 14px 30px -18px rgba(37,99,235,0.7); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-ghost { border-color: var(--line); }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-small { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.btn:disabled { cursor: not-allowed; opacity: .62; }

.auth-hero {
  padding: 64px 0 84px;
}
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--blue); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { margin: 18px 0 18px; max-width: 760px; font-size: clamp(42px, 6vw, 68px); line-height: .98; letter-spacing: -0.04em; }
.lead { max-width: 620px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; color: #344054; }
.list li { display: flex; gap: 12px; align-items: flex-start; }
.tick {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #eff6ff;
  color: var(--blue);
  font-weight: 900;
}

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 70px -48px rgba(16,24,40,0.55);
}
.auth-card { padding: 28px; }
.card-top { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.card-top h2 { margin: 4px 0 0; font-size: 28px; letter-spacing: -0.03em; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 7px; color: #344054; font-size: 13px; font-weight: 750; }
.field input, .field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,0.12); }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 54px; }
.pw-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.pw-toggle:hover { background: var(--soft); color: var(--blue); }
.remember { display: flex; align-items: center; gap: 9px; margin: 4px 0 18px; color: var(--muted); font-size: 14px; }
.status {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  padding: 11px 13px;
  font-size: 14px;
}
.status.ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.status.error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.helper-links { display: flex; justify-content: space-between; gap: 14px; margin-top: 16px; color: var(--muted); font-size: 14px; font-weight: 700; }
.helper-links a:hover { color: var(--blue); }
.trust { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

.page { padding: 34px 0 76px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 22px; }
.page-head h1 { margin: 10px 0 0; font-size: clamp(34px, 4vw, 52px); }
.page-head p { margin: 10px 0 0; max-width: 780px; color: var(--muted); line-height: 1.65; }
.page-head p a { color: var(--blue); font-weight: 700; }

/* Full-page embed of an external tool (Claude EA, Signal EA) behind our own
   auth wall — the iframe is the whole point of the page, so it gets almost
   all the vertical space rather than sitting inside a `.card` like other
   content blocks. */
.embed-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
  height: calc(100vh - 260px);
  min-height: 480px;
}
.embed-frame { display: block; width: 100%; height: 100%; border: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.panel { padding: 22px; }
.stat { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.stat b { display: block; color: var(--ink); font-size: 28px; line-height: 1; }
.stat span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }

.share-link { display: flex; gap: 0; overflow: hidden; border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; }
.share-link input { flex: 1; min-width: 0; border: 0; padding: 13px; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.share-link button { border-radius: 0; border-left: 1px solid var(--line); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.table-link { color: var(--blue); }
.table-link:hover { text-decoration: underline; }
.status-select { min-height: 34px; border: 1px solid #d0d5dd; border-radius: 7px; background: #fff; padding: 6px 8px; color: var(--ink); font-size: 12px; }
.inline-input { width: 130px; min-height: 34px; border: 1px solid #d0d5dd; border-radius: 7px; background: #fff; padding: 6px 8px; color: var(--ink); font-size: 12px; }
.field textarea { width: 100%; border: 1px solid #d0d5dd; border-radius: 10px; background: #fff; color: var(--ink); padding: 12px 14px; resize: vertical; outline: none; }
.field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,0.12); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.pagination-actions { display: flex; gap: 8px; }
code { color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.tree, .tree ul { list-style: none; padding: 0; margin: 0; }
.tree { display: grid; gap: 12px; }
.tree ul { display: grid; gap: 12px; margin-top: 12px; padding-left: 34px; border-left: 1px solid var(--line); }
.node {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #eff6ff; color: var(--blue); font-weight: 900; }
.node strong { display: block; }
.node small { display: block; margin-top: 4px; color: var(--muted); }
.node-meta { display: grid; gap: 3px; color: var(--muted); font-size: 12px; text-align: right; }
.badge { display: inline-flex; width: max-content; border-radius: 999px; padding: 4px 8px; background: var(--soft); color: #344054; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.badge.green { color: #166534; background: #dcfce7; }
.badge.red { color: #991b1b; background: #fee2e2; }
.empty { padding: 20px; border: 1px dashed #d0d5dd; border-radius: 14px; color: var(--muted); background: #fff; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.action-row + .status { margin-top: 14px; }
.formula-list { display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.formula-list div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.formula-list strong { color: var(--ink); }
.profile-details { display: grid; margin: 8px 0 0; }
.profile-details div { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.profile-details dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.profile-details dd { margin: 0; min-width: 0; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.profile-details code { overflow-wrap: anywhere; }
.quiet { margin: 16px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.notification { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.notification.unread { border-left: 3px solid var(--blue); padding-left: 14px; }
.notification h3 { margin: 9px 0 5px; font-size: 16px; }
.notification p { margin: 0; color: #344054; line-height: 1.55; }
.notification small { display: block; margin-top: 8px; color: var(--muted); }
.switch-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
td input[type="date"], td select { min-height: 34px; border: 1px solid #d0d5dd; border-radius: 7px; background: #fff; padding: 6px 7px; color: var(--ink); font-size: 12px; }

@media (max-width: 980px) {
  .auth-grid, .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .nav-inner { gap: 10px; }
  .brand { min-width: 0; }
  .brand b { display: none; }
  .nav-right .pill { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-head { display: grid; align-items: start; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 28px, 1180px); }
  .auth-card, .panel { padding: 18px; }
  .action-row .btn { width: 100%; }
  .nav-right .pill { display: none; }
  .menu-account { display: grid; gap: 3px; margin: 0 12px 14px; padding: 0 0 15px; border-bottom: 1px solid var(--line); }
  .menu-account span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .menu-account strong { color: var(--ink); font-size: 15px; line-height: 1.3; }
  .menu-account small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
  .node { grid-template-columns: 38px minmax(0, 1fr); }
  .node-meta { grid-column: 2; text-align: left; }
  .tree ul { padding-left: 20px; }
}
