:root {
  --bg: #f6f6f3;
  --panel: #ffffff;
  --ink: #16181d;
  --muted: #6b6f78;
  --line: #e4e4de;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --accent-soft: #e5f1ed;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --good: #1f7a3a;
  --good-soft: #e3f4e8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 15, .04), 0 4px 16px rgba(20, 20, 15, .04);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 650; }
h2 { font-size: 18px; font-weight: 620; }
h3 { font-size: 15px; font-weight: 620; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: #14231f; color: #d9e4e0; padding: 22px 16px; display: flex; flex-direction: column; gap: 20px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: #fff; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #3fbf9b, #1f6f5c); display: grid; place-items: center; color: #fff; font-size: 15px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { color: #c5d3ce; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(63,191,155,.16); color: #fff; }
.nav .soon { opacity: .5; cursor: default; display: flex; justify-content: space-between; }
.nav .soon span { font-size: 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 0 6px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7f948d; padding: 0 10px; margin-bottom: 4px; }
.ws-switch select { width: 100%; background: rgba(255,255,255,.07); color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 14px; }
.ws-switch option { color: #000; }
.sidebar-foot { margin-top: auto; font-size: 13px; color: #9fb1ab; }
.sidebar-foot button { background: none; border: 0; color: #c5d3ce; padding: 0; cursor: pointer; font: inherit; }
.main { padding: 28px 36px 60px; max-width: 1180px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 0; }

/* ---------- components ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat .num { font-size: 28px; font-weight: 650; letter-spacing: -.02em; }
.stat .label { color: var(--muted); font-size: 13px; }
.section { margin-top: 30px; }
.section > h2 { margin-bottom: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  border-radius: 9px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 560; cursor: pointer; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #f1f1ec; }
.btn-danger { background: transparent; color: var(--bad); border-color: #f1c4bf; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.inline { display: inline; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 560; padding: 2px 9px; border-radius: 99px; background: #eeeee8; color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.plain::before { display: none; }

.logo { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.conn-card { display: flex; flex-direction: column; gap: 14px; }
.conn-card .top { display: flex; gap: 12px; align-items: flex-start; }
.conn-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.conn-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }

.flash { border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; font-size: 14px; border: 1px solid; }
.flash.success { background: var(--good-soft); border-color: #bfe3ca; color: #134d26; }
.flash.error { background: var(--bad-soft); border-color: #f4c7c1; color: #7a1a12; }
.banner { background: var(--warn-soft); border: 1px solid #f1d9a9; color: #6a4100; border-radius: 10px; padding: 9px 14px; font-size: 13.5px; margin-bottom: 18px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 560; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }

label { display: block; font-size: 13.5px; font-weight: 560; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; padding: 10px 12px; border: 1px solid #d6d6cf; border-radius: 9px; font: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid #9fd6c6; border-color: var(--accent); }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 0; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.scopes { display: flex; flex-wrap: wrap; gap: 6px; }
.scope { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: #f1f1ec; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.copy { display: flex; gap: 8px; }
.copy input { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: #fafaf7; }
.steps { margin: 8px 0 0; padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.empty { text-align: center; padding: 30px; color: var(--muted); }
.activity li { padding: 8px 0; border-bottom: 1px solid var(--line); list-style: none; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.activity { margin: 0; padding: 0; }
.activity li:last-child { border-bottom: 0; }

/* ---------- auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: #14231f; color: #dce7e3; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; font-size: 30px; font-weight: 650; max-width: 420px; letter-spacing: -.02em; }
.auth-side ul { padding: 0; list-style: none; margin: 26px 0 0; display: grid; gap: 12px; max-width: 420px; }
.auth-side li { display: flex; gap: 10px; color: #b7c8c2; }
.auth-side li::before { content: "✓"; color: #3fbf9b; font-weight: 700; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h1 { margin-bottom: 6px; }

/* ---------- landing ---------- */
.landing { max-width: 1100px; margin: 0 auto; padding: 26px 28px 80px; }
.landing header { display: flex; justify-content: space-between; align-items: center; }
.landing header .brand { color: var(--ink); }
.hero { padding: 80px 0 50px; max-width: 760px; }
.hero h1 { font-size: 50px; letter-spacing: -.035em; line-height: 1.05; font-weight: 700; }
.hero p { font-size: 18px; color: var(--muted); max-width: 620px; }
.logos { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0 50px; }
.logos .pill { font-size: 13px; padding: 5px 12px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.logos .pill::before { display: none; }

/* ---------- mock consent ---------- */
.consent { max-width: 460px; margin: 60px auto; }
.consent .card { padding: 28px; }
.consent ul { padding-left: 18px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 22px 18px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .hero h1 { font-size: 36px; }
}
