/* The one style sheet of the Redline web dashboard.
   The values come from docs/design/redline.pen: the boards "Web · Sign-up and setup"
   and "Web · Inbox, Rules, Usage, Account". */

:root {
  --ink: #0a0a0c;
  --ink-2: #3f3f46;
  --ink-3: #4a4a52;
  --muted: #5f5f68;
  --faint: #75757e;
  --icon: #6b6b74;
  --placeholder: #c4c4cb;
  --line: #ebebef;
  --line-2: #dcdce1;
  --soft: #f7f7f8;
  --soft-2: #f4f4f6;
  --soft-3: #f1f1f4;
  --code-bg: #fafafb;
  --red: #d7191f;
  --red-text: #b3141a;
  --red-line: #edc9cb;
  --red-soft: #fdeded;
  --green: #18a058;
  --green-text: #0f7a45;
  --green-valid: #127a45;
  --green-soft: #e8f6ee;
  --green-line: #bfe5cf;
  --blue: #2563eb;
  --blue-text: #1e4fc0;
  --blue-soft: #ebf1fe;
  --amber: #d97706;
  --amber-text: #9a5204;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-pop: 0 24px 64px #0a0a0c29, 0 2px 8px #0a0a0c0f, 0 0 1px #0a0a0c0f;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.grow { flex: 1 1 auto; }
.offscreen { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt20 { margin-top: 20px; }
.mt24 { margin-top: 24px; } .mt28 { margin-top: 28px; } .mt32 { margin-top: 32px; }
.stack8 { display: flex; flex-direction: column; gap: 8px; }
.stack10 { display: flex; flex-direction: column; gap: 10px; }
.stack12 { display: flex; flex-direction: column; gap: 12px; }
.stack18 { display: flex; flex-direction: column; gap: 18px; }
.stack20 { display: flex; flex-direction: column; gap: 20px; }
.stack24 { display: flex; flex-direction: column; gap: 24px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.i { flex-shrink: 0; color: var(--icon); }
.i-brand { flex-shrink: 0; }

/* Type */
.h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.56px; }
.lead { font-size: 15px; line-height: 22px; color: var(--muted); }
.sub { font-size: 14px; line-height: 20px; color: var(--muted); }
.note { font-size: 13px; line-height: 20px; color: var(--faint); }
.hint { font-size: 13px; line-height: 18px; color: var(--faint); }
.hint.is-error { color: var(--red-text); line-height: 20px; }
.fine { font-size: 12px; line-height: 18px; color: var(--faint); }
.fine a { text-decoration: underline; text-underline-offset: 2px; }
.label { display: block; font-size: 13px; line-height: 18px; font-weight: 500; }
.label-strong { font-size: 13px; line-height: 18px; font-weight: 600; }
.label-row { display: flex; align-items: center; justify-content: space-between; height: 20px; }
.link-strong { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: var(--ink); }
.link-strong:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-strong .i { color: var(--ink); }
.link-muted { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.link-muted:hover { color: var(--ink); }
.inline-links { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 20px; color: var(--muted); }
.rule { border: 0; border-top: 1px solid var(--line); margin-left: 0; margin-right: 0; margin-bottom: 0; }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot-amber { background: var(--amber); }
.dot-green { background: var(--green); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid transparent;
  font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap;
}
.btn:disabled { cursor: default; }
.btn-md { height: 36px; padding: 0 15px; font-size: 14px; }
.btn-lg { height: 44px; padding: 0 14px; font-size: 14px; gap: 8px; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary .i { color: #fff; }
.btn-primary:hover:not(:disabled) { background: #26262b; }
.btn-primary:disabled { background: var(--soft-2); color: var(--faint); }
.btn-primary:disabled .i { color: var(--faint); }
.btn-secondary { background: #fff; border-color: var(--line-2); box-shadow: 0 1px 1px #0a0a0c0a; color: var(--ink); }
.btn-secondary:hover:not(:disabled) { background: var(--soft); }
.btn-secondary:disabled { opacity: 0.42; }
.btn-red { background: var(--red); color: #fff; padding: 0 14px; }
.btn-red .i { color: #fff; }
.btn-red:hover:not(:disabled) { background: #c1161b; }
.btn-red:disabled { opacity: 0.6; }
.btn-danger { background: var(--red); color: #fff; padding: 0 14px; }
.btn-danger:disabled { opacity: 0.42; }
.btn-danger-outline { background: #fff; border-color: var(--red-line); box-shadow: 0 1px 1px #0a0a0c0a; color: var(--red-text); }
.btn-danger-outline:hover { background: var(--red-soft); }
.btn-provider {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 44px;
  padding: 0 12px 0 14px; border: 0; border-radius: 8px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 500; text-align: left;
}
.btn-provider:hover:not(:disabled) { background: var(--soft); }
.btn-provider:disabled { opacity: 0.6; cursor: progress; }
.btn-provider > span:first-of-type { flex: 1 1 auto; }
.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--soft-2); color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500;
}
.chip-outline {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-3);
  font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; align-self: flex-start;
}
.chip-outline .i { width: 12px; height: 12px; }
.kbd-btn {
  flex-shrink: 0; height: 20px; padding: 0 5px; border: 0; border-radius: 5px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); font-size: 11px; line-height: 13px; font-weight: 500;
}
.kbd-dark {
  display: inline-flex; align-items: center; height: 18px; margin-left: 2px; padding: 0 5px; border-radius: 4px;
  border: 1px solid #ffffff47; background: #ffffff1a; color: #ffffffd9; font: 500 11px/12px var(--sans);
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff; flex-shrink: 0;
}
.icon-btn:hover { background: var(--soft); }
.modal-head .icon-btn { border: 0; width: 24px; height: 24px; }

/* Boxes */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  background: var(--red-soft); color: var(--red-text); font-size: 13px; line-height: 20px;
}
.alert .i { color: var(--red-text); margin-top: 2px; }
.infobox {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 13px; line-height: 20px;
}
.infobox .i { margin-top: 2px; }
.hint-icon { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.hint-icon .i { width: 14px; height: 14px; margin-top: 2px; }

/* ---------- Sign-in and sign-up ---------- */
.auth { display: flex; min-height: 100vh; background: #fff; }
.auth-left { display: flex; flex-direction: column; width: 600px; flex-shrink: 0; padding: 32px 48px 32px 56px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; height: 36px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; line-height: 20px; letter-spacing: -0.16px; }
.logo {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 6px; background: var(--red); box-shadow: inset 0 0 0 0.5px #0000001f; flex-shrink: 0;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 500;
}
.auth-main { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 40px 0 40px 64px; }
.auth-card { width: 376px; max-width: 100%; }
.auth-foot { display: flex; align-items: center; gap: 18px; font-size: 13px; line-height: 18px; color: var(--faint); }
.auth-foot a:hover { color: var(--ink); }
.status-link { display: inline-flex; align-items: center; gap: 6px; }

.steps { display: flex; align-items: center; gap: 10px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--faint); }
.step-mark {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border-radius: 10px; border: 1.5px solid var(--line-2); font-size: 11px; line-height: 13px; font-weight: 600;
}
.step-mark .i { display: none; width: 12px; height: 12px; color: #fff; stroke-width: 2.6; }
.step-line { width: 24px; height: 1px; background: var(--line-2); }
.steps[data-step="1"] .step-1,
.steps[data-step="2"] .step-2 { color: var(--ink); }
.steps[data-step="1"] .step-1 .step-mark,
.steps[data-step="2"] .step-2 .step-mark { border-color: var(--ink); }
.steps[data-step="2"] .step-1 { color: var(--muted); }
.steps[data-step="2"] .step-1 .step-mark { border: 0; background: var(--ink); }
.steps[data-step="2"] .step-1 .step-num { display: none; }
.steps[data-step="2"] .step-1 .i { display: block; }

.code-input {
  display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 8px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.code-input:focus-within { box-shadow: inset 0 0 0 1px var(--ink), 0 0 4px #0a0a0c12; }
.code-input.is-error { box-shadow: inset 0 0 0 1px var(--red); }
.code-input input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0;
  font-family: var(--mono); font-size: 16px; line-height: 22px; letter-spacing: 1.28px; text-transform: uppercase;
}
.code-input input::placeholder { color: var(--placeholder); }
.code-done {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 48px; padding: 0 14px;
  border-radius: 8px; background: var(--code-bg); box-shadow: inset 0 0 0 1px var(--line-2);
  font-size: 16px; line-height: 22px; font-weight: 500; letter-spacing: 1.28px;
}
.valid { display: inline-flex; align-items: center; gap: 6px; color: var(--green-valid); font: 500 13px/15px var(--sans); letter-spacing: 0; }
.valid .i { color: var(--green-valid); stroke-width: 2.4; }

/* The dark panel on the right of the sign-in and sign-up pages */
.auth-art { flex: 1 1 auto; min-width: 0; padding: 12px 12px 12px 0; }
.art {
  position: relative; height: 100%; min-height: 760px; overflow: hidden; border-radius: 16px;
  background: #0b0b0f; color: #fff; padding: 56px 64px;
}
.art-head { display: flex; flex-direction: column; gap: 18px; max-width: 640px; position: relative; z-index: 1; }
.art-kicker { font: 400 12px/16px var(--mono); letter-spacing: 0.24px; color: #ffffff66; }
.art-title { font-size: 46px; line-height: 52px; font-weight: 600; letter-spacing: -1.61px; }
.art-title-wide { max-width: 700px; }
.art-sub { max-width: 470px; font-size: 16px; line-height: 25px; color: #ffffff94; }
.art-timeline { position: absolute; left: 64px; bottom: 96px; width: 330px; }
.art-label { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.72px; color: #ffffff66; margin-bottom: 18px; }
.timeline li { display: flex; gap: 14px; min-height: 60px; }
.timeline li:last-child { min-height: 38px; }
.tl-time { width: 62px; flex-shrink: 0; font: 400 12px/18px var(--mono); color: #ffffff66; }
.tl-dot { position: relative; width: 9px; flex-shrink: 0; }
.tl-dot::before {
  content: ""; position: absolute; top: 5px; left: 0; width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid #ffffff8c; background: #0b0b0f;
}
.tl-dot::after { content: ""; position: absolute; top: 20px; bottom: 0; left: 4px; width: 1px; background: #ffffff24; }
.tl-text { display: flex; flex-direction: column; gap: 2px; padding-bottom: 22px; }
.tl-text b { font-size: 14px; line-height: 18px; font-weight: 500; color: #ffffffd1; }
.tl-text small { font: 400 12px/18px var(--mono); color: #ffffff66; }
.tl-ring .tl-time { color: #ff7a7e; }
.tl-ring .tl-dot::before { border: 0; background: #ff4d52; box-shadow: 0 0 4px #ff4d522e; }
.tl-ring .tl-dot::after { display: none; }
.tl-ring .tl-text b { color: #fff; }
.tl-ring .tl-text { padding-bottom: 0; }

.term {
  position: absolute; left: 64px; top: 300px; width: 520px; border-radius: 12px; background: #111115;
  box-shadow: inset 0 0 0 1px #26262d, 0 30px 60px #00000059; overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; background: #18181c; }
.term-bar i { width: 12px; height: 12px; border-radius: 50%; }
.term-bar .tl-r { background: #ff5f57; } .term-bar .tl-y { background: #febc2e; } .term-bar .tl-g { background: #28c840; }
.term-bar span { flex: 1; text-align: center; margin-right: 60px; font-size: 12px; line-height: 15px; font-weight: 500; color: #8b8b94; }
.term-body { margin: 0; padding: 16px 18px 18px; font: 400 12.5px/20px var(--mono); color: #e4e4e7; white-space: pre; overflow: hidden; }
.term-red { color: #ff7a7e; }
.term-dim { color: #ffffff59; }
.art-next { position: absolute; left: 64px; bottom: 56px; display: flex; gap: 28px; }
.art-next div { display: flex; flex-direction: column; gap: 4px; }
.art-next small { font: 400 12px/16px var(--mono); color: #ffffff66; }
.art-next b { font-size: 14px; line-height: 20px; font-weight: 500; color: #ffffffd1; }

.phone {
  position: absolute; border-radius: 50px; padding: 9px; background: #1b1b20;
  box-shadow: inset 0 0 0 1px #34343c, inset 0 0 3px #101013;
}
.phone-lg { left: 452px; top: 318px; width: 304px; }
.phone-sm { left: 516px; top: 300px; width: 276px; border-radius: 46px; }
.phone-screen {
  position: relative; height: 682px; border-radius: 41px; padding: 54px 12px 0;
  background: radial-gradient(ellipse 120% 70% at 15% 0%, #ff8a65 0%, #d81b60 38%, #4a148c 72%, #120a2e 100%);
  font-family: -apple-system, "SF Pro", system-ui, sans-serif; text-align: center;
}
.phone-sm .phone-screen { height: 622px; border-radius: 37px; }
.phone-status { position: absolute; top: 16px; left: 30px; right: 26px; display: flex; justify-content: space-between; font-size: 14px; line-height: 17px; font-weight: 600; }
.phone-bars { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.phone-bars i { width: 2.3px; border-radius: 0.8px; background: #fff; }
.phone-bars i:nth-child(1) { height: 4px; } .phone-bars i:nth-child(2) { height: 5.4px; }
.phone-bars i:nth-child(3) { height: 7.3px; } .phone-bars i:nth-child(4) { height: 9.2px; }
.phone-island { position: absolute; top: 11px; left: 50%; width: 92px; height: 27px; margin-left: -46px; border-radius: 14px; background: #000; }
.phone-date { font-size: 16px; line-height: 21px; font-weight: 600; color: #ffffffdb; }
.phone-time { font-size: 78px; line-height: 82px; font-weight: 700; letter-spacing: -1px; }
.phone-sm .phone-time { font-size: 64px; line-height: 68px; }
.phone-notes { display: flex; flex-direction: column; gap: 8px; margin: 24px auto 0; width: 262px; text-align: left; }
.phone-sm .phone-notes { width: 234px; }
.glass { background: #ffffff4d; box-shadow: inset 0 0 0 0.5px #ffffff59, 0 10px 30px #0000002e; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.note-card { display: flex; flex-direction: column; gap: 9px; padding: 13px 14px 14px; border-radius: 24px; margin-bottom: 2px; }
.note-head { display: flex; gap: 10px; align-items: center; }
.note-icon .logo { width: 34px; height: 34px; border-radius: 8px; }
.note-icon .logo svg { width: 18px; height: 18px; }
.note-meta { flex: 1; min-width: 0; }
.note-app { display: flex; justify-content: space-between; font-size: 14px; line-height: 18px; }
.note-app b { font-weight: 600; }
.note-app span { font-size: 12px; line-height: 16px; color: #ffffff99; }
.note-from { font-size: 12px; line-height: 16px; color: #ffffffb8; }
.note-title { font-size: 14px; line-height: 18px; font-weight: 600; letter-spacing: -0.1px; }
.note-body { font-size: 13px; line-height: 17px; letter-spacing: -0.1px; color: #ffffffe6; }
.note-btn { display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 20px; font-size: 15px; line-height: 18px; font-weight: 500; letter-spacing: -0.2px; flex-shrink: 0; }
.note-row .note-btn { flex: 1 1 0; }
.note-btn b { font-weight: 600; }
.note-row { display: flex; gap: 8px; }
.note-ring { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 2px; font-size: 12px; line-height: 16px; font-weight: 600; color: #ffffffe6; }
.dot-ring { width: 7px; height: 7px; background: #ff4d52; box-shadow: 0 0 3px #ff4d5240; }

@media (max-width: 1180px) {
  .auth-art { display: none; }
  .auth-left { width: 100%; }
  .auth-main { padding-left: 0; align-items: center; }
}
@media (max-width: 520px) {
  .auth-left { padding: 24px 20px; }
  .auth-foot { flex-wrap: wrap; gap: 12px; }
}

/* ---------- Signed-in shell ---------- */
.app { display: flex; min-height: 100vh; background: #fff; }
.side {
  position: sticky; top: 0; height: 100vh; width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 12px;
  padding: 10px 13px 12px 12px; background: var(--soft); overflow-y: auto;
}
.org { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px; border-radius: 8px; }
.org-mark .logo { width: 28px; height: 28px; border-radius: 7px; background: var(--ink); }
.org-mark .logo svg { width: 14px; height: 14px; }
.org-text { display: flex; flex-direction: column; min-width: 0; }
.org-text b { font-size: 14px; line-height: 18px; font-weight: 600; }
.org-text small { font-size: 12px; line-height: 16px; color: var(--faint); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { padding: 18px 10px 5px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--faint); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 7px;
  color: var(--ink-2); font-size: 14px; line-height: 20px;
}
.nav-item > span:first-of-type { flex: 1 1 auto; }
.nav-item:hover { background: #ededf0; }
.nav-item.is-active { background: #fff; color: var(--ink); font-weight: 500; }
.nav-item.is-active::before,
.me-row.is-active::before {
  content: ""; position: absolute; left: -12px; top: 7px; width: 2px; height: 18px; border-radius: 0 2px 2px 0; background: var(--red);
}
.me-row.is-active::before { top: 13px; }
.owner-tag { display: inline-flex; align-items: center; height: 16px; padding: 0 6px; border-radius: 999px; font-size: 11px; line-height: 16px; font-weight: 500; color: var(--muted); }
.nav-ext .i { width: 13px; height: 13px; }
.side-fill { flex: 1 1 auto; }
.nav-rule { border: 0; border-top: 1px solid var(--line); margin: 2px 0 0; }
.me { position: relative; }
.me-row {
  position: relative; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px; border-radius: 8px;
  list-style: none; cursor: pointer;
}
.me-row::-webkit-details-marker { display: none; }
.me-row:hover, .me[open] .me-row, .me-row.is-active { background: #fff; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50px; flex-shrink: 0;
  background: #e9e4da; color: #5a4a2e; font-size: 10px; line-height: 28px; font-weight: 600;
}
.avatar-lg { width: 56px; height: 56px; font-size: 21px; line-height: 56px; }
.me-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.me-text b { font-size: 14px; line-height: 18px; font-weight: 500; }
.me-text small { font-size: 12px; line-height: 16px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
  position: absolute; left: 0; right: 0; bottom: 50px; z-index: 5; display: flex; flex-direction: column; padding: 4px;
  border-radius: 10px; background: #fff; box-shadow: var(--shadow-pop);
}
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border: 0; border-radius: 7px;
  background: none; font-size: 14px; text-align: left;
}
.menu a:hover, .menu button:hover { background: var(--soft); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px 0 60px; border-bottom: 1px solid #fff; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--muted); }
.crumb-now { color: var(--ink); font-weight: 500; }
.content { width: 100%; max-width: 1200px; padding: 36px 60px 48px; }
.page-head { display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 900px) {
  .app { flex-direction: column; }
  .side { position: static; height: auto; width: 100%; }
  .side-fill { display: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 24px 16px 40px; }
}

/* Cards and sections */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.card-pad { padding: 21px 23px; }
.card-list { padding: 0; }
.sections { display: flex; flex-direction: column; gap: 32px; max-width: 1080px; }
.sec { display: flex; gap: 40px; }
.sec-label { width: 280px; flex-shrink: 0; padding-top: 2px; display: flex; flex-direction: column; gap: 4px; }
.sec-label h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
.sec-label p { font-size: 13px; line-height: 19px; color: var(--muted); }
.sec > .card, .sec > .stack12 { flex: 1 1 auto; min-width: 0; max-width: 760px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 1100px) {
  .sec { flex-direction: column; gap: 16px; }
  .sec-label { width: auto; }
}

.profile { display: flex; align-items: center; gap: 16px; }
.profile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-text b { font-size: 16px; line-height: 22px; font-weight: 600; }
.profile-text small { font-size: 13px; line-height: 18px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.input {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 13px; border: 1px solid var(--line-2);
  border-radius: 8px; background: #fff; font-size: 14px; line-height: 20px; outline: 0;
}
.input:focus, .input:focus-within { border-color: var(--ink); box-shadow: 0 0 3px #0a0a0c14; }
.input.is-error { border-color: var(--red); }
.input-ro { background: var(--soft); justify-content: space-between; }
.input-ro:focus-within { border-color: var(--line-2); box-shadow: none; }
.input-icon input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0; }
.input-icon input::placeholder { color: var(--faint); }
.textarea {
  width: 100%; padding: 15px 17px; border: 1px solid var(--line-2); border-radius: 10px; resize: vertical;
  font-size: 14px; line-height: 22px; outline: 0;
}
.textarea:focus { border-color: var(--ink); }

.method { display: flex; align-items: center; gap: 14px; padding: 14px 18px 15px; border-top: 1px solid var(--line); }
.method:first-child { border-top: 0; }
.method-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
}
.method-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.method-text b { font-size: 14px; line-height: 20px; font-weight: 600; }
.method-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; line-height: 18px; color: var(--muted); }
.method-meta .sepdot { color: var(--faint); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; }
.badge-green { background: var(--green-soft); color: var(--green-text); }
.badge-green .dot { background: var(--green); }
.badge-blue { background: var(--blue-soft); color: var(--blue-text); }
.badge-blue .dot { background: var(--blue); }
.badge-gray { background: var(--soft-3); color: var(--ink-3); }

.danger-row { display: flex; align-items: center; gap: 24px; padding: 18px 22px; border-top: 1px solid var(--line); }
.danger-row:first-child { border-top: 0; }
.danger-row > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.danger-row b { font-size: 14px; line-height: 20px; font-weight: 600; }
.danger-row p { font-size: 13px; line-height: 19px; color: var(--muted); }

/* Modal dialogs */
.modal {
  width: 540px; max-width: calc(100vw - 32px); padding: 0; border: 0; border-radius: 14px; background: #fff;
  box-shadow: var(--shadow-pop); color: var(--ink);
}
.modal-wide { width: 600px; }
.modal::backdrop { background: #0a0a0c52; }
.modal-body { padding: 24px; }
.modal-head { display: flex; align-items: flex-start; gap: 14px; }
.modal-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.modal-icon .i { width: 20px; height: 20px; }
.modal-icon-red { background: var(--red-soft); }
.modal-icon-red .i { color: var(--red); }
.modal-icon-green { background: var(--green-soft); }
.modal-icon-green .i { color: var(--green-text); stroke-width: 2.4; }
.modal-titles { flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.modal-titles h2 { font-size: 18px; line-height: 24px; font-weight: 600; }
.modal-titles p { font-size: 13.5px; line-height: 20px; color: var(--muted); }
.modal-titles p b { color: var(--ink); font-weight: 500; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.impact { display: flex; flex-direction: column; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; }
.impact li { display: flex; gap: 12px; }
.impact-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px; background: var(--soft); flex-shrink: 0; }
.impact-icon .i { width: 14px; height: 14px; }
.impact b { display: block; font-size: 13.5px; line-height: 18px; font-weight: 500; }
.impact p { font-size: 12.5px; line-height: 17px; color: var(--muted); }
.confirm-label code {
  display: inline-block; padding: 0 6px; margin: 0 2px; border: 1px solid #e6e6eb; border-radius: 5px; background: var(--soft-3);
  font: 400 12.5px/18px var(--mono);
}
.code-big {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 23px 23px 27px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
}
.code-big .mono { font-size: 34px; line-height: 44px; font-weight: 600; letter-spacing: 2.04px; }
.code-big .btn.is-done { border-color: var(--green-line); color: var(--green-text); }
.code-big .btn.is-done .i { color: var(--green-text); }
.facts { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13px; line-height: 18px; color: var(--muted); }
.facts > span { display: inline-flex; align-items: center; gap: 6px; }
.facts .i { width: 14px; height: 14px; }

/* Invitations */
.stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; padding-right: 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { font-size: 22px; line-height: 28px; font-weight: 600; }
.stat small { font-size: 12.5px; line-height: 18px; color: var(--muted); }
.make { display: flex; align-items: center; gap: 16px; padding: 19px 21px; flex-wrap: wrap; }
.make-text { width: 300px; display: flex; flex-direction: column; gap: 2px; }
.make-text h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
.make-text p { font-size: 13px; line-height: 18px; color: var(--muted); }
.make-note { flex: 1 1 240px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--soft-3); flex-wrap: wrap; }
.seg-item {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: none;
  font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted);
}
.seg-item span { font-size: 12px; line-height: 16px; color: var(--faint); }
.seg-item.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px #0a0a0c14, 0 0 1px #0a0a0c0f; }
.seg-item.is-on span { color: var(--muted); }
.table { padding: 0; overflow: hidden; }
.tr { display: flex; align-items: center; gap: 16px; min-height: 57px; padding: 0 20px; border-top: 1px solid var(--line); }
.th { min-height: 41px; border-top: 0; background: var(--soft); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.48px; color: var(--faint); }
.tr-empty { justify-content: center; color: var(--muted); font-size: 13px; }
.c-note { flex: 1 1 auto; min-width: 0; font-size: 13.5px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-note.is-dim { color: var(--muted); }
.c-note.is-empty { color: var(--faint); font-style: italic; }
.c-state { width: 300px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.c-state .soon { color: var(--amber-text); font-weight: 500; }
.c-state .dim { color: var(--faint); }
.c-made { width: 90px; flex-shrink: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.c-act { width: 76px; flex-shrink: 0; display: flex; justify-content: flex-end; }
.tfoot { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 20px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
@media (max-width: 900px) {
  .c-state { width: auto; }
  .c-made { display: none; }
}

/* Empty state */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 24px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: 12px;
}
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--soft); margin-bottom: 8px; }
.empty-icon .i { width: 20px; height: 20px; }
.empty-title { font-size: 15px; line-height: 20px; font-weight: 600; }
.empty-text { max-width: 420px; font-size: 13px; line-height: 19px; color: var(--muted); }

/* Toasts: bottom right, newest at the bottom. They close after 6 s. An error stays until closed. */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.toast {
  display: flex; gap: 12px; width: 408px; max-width: calc(100vw - 32px); padding: 14px 14px 14px 16px; border-radius: 12px;
  background: #fff; box-shadow: var(--shadow-pop);
}
.toast-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50px; flex-shrink: 0; }
.toast-icon .i { width: 13px; height: 13px; stroke-width: 2.4; }
.toast-ok .toast-icon { background: var(--green-soft); }
.toast-ok .toast-icon .i { color: var(--green-text); }
.toast-error .toast-icon { background: var(--red-soft); }
.toast-error .toast-icon .i { color: var(--red); }
.toast-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.toast-text b { font-size: 14px; line-height: 20px; font-weight: 600; }
.toast-text p { font-size: 13px; line-height: 18px; color: var(--muted); }
.toast-close { align-self: flex-start; padding: 3px 0 0; border: 0; background: none; font-size: 13px; line-height: 18px; font-weight: 600; }

/* ---------- Devices: Machines, Phones, Agent keys, sign-in link, setup (M3.5) ----------
   The values come from the board "Web · Machines, Phones, Agent keys" and the setup
   screens of "Web · Sign-up and setup". */
.ink { color: var(--ink); }
.h2 { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.2px; }
.h3 { font-size: 15px; line-height: 20px; font-weight: 600; }
.kicker { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.48px; color: var(--muted); }
.stack4 { display: flex; flex-direction: column; gap: 4px; }
.row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-gap > .input { flex: 1 1 200px; width: auto; }
.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-fit { align-self: flex-start; }
.btn-ghost { background: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--soft); }
.crumbs a:hover { color: var(--ink); }
code { padding: 0 4px; border-radius: 4px; background: var(--soft-3); font: 400 12.5px/18px var(--mono); }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.vrule { width: 1px; height: 24px; background: var(--line); }
.link-strong-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 500; color: var(--ink); }
.link-strong-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-link { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn-plain { border: 0; width: 28px; height: 28px; }
.btn-text-danger { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0; color: var(--red-text); font-size: 13.5px; font-weight: 500; }
.btn-text-danger .i { color: var(--red-text); width: 14px; height: 14px; }
.dot-red { background: var(--red); }
.dot-gray { background: var(--placeholder); }

/* Stat cards and the plan meter */
.stat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-left: 1px solid var(--line); }
.stat-card:first-child { border-left: 0; }
.stat-card small { font-size: 13px; line-height: 18px; color: var(--ink-2); }
.stat-card p { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.stat-card b { font-size: 24px; line-height: 28px; font-weight: 600; }
.stat-card span { font-size: 13px; color: var(--muted); }
.meter { display: inline-flex; gap: 3px; align-items: center; }
.meter i { width: 20px; height: 4px; border-radius: 2px; background: var(--line-2); }
.meter i.is-on { background: var(--ink); }
.meter.is-full i.is-on { background: var(--amber); }
.stat-card .meter { margin-left: auto; }
.meter-wide { display: flex; }
.meter-wide i { flex: 1 1 0; height: 5px; }
.meter-full i { background: var(--amber); }
.plan-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.plan-chip b { font-weight: 500; }

/* Tables built with a grid */
.filter { width: 260px; height: 34px; }
.filter .i { width: 14px; height: 14px; }
.gr { display: grid; align-items: center; gap: 12px; min-height: 66px; padding: 10px 20px; border-top: 1px solid var(--line); }
.gr.th { min-height: 38px; border-top: 0; background: var(--soft); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.48px; color: var(--faint); }
.gr-machines { grid-template-columns: minmax(180px, 2.2fr) 1.3fr 1.2fr 1.3fr 1.5fr 40px; }
.gr-phones { grid-template-columns: minmax(180px, 2fr) 1.5fr 1.8fr 1fr 1.4fr 150px; }
.gr-keys { grid-template-columns: minmax(180px, 2fr) 1.4fr 1.5fr 0.9fr 1fr 40px; }
.gr-link { cursor: pointer; }
.gr-link:hover { background: var(--soft); }
.gr.is-new { background: var(--green-soft); }
.cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13.5px; line-height: 18px; }
.cell b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell small { font-size: 12.5px; line-height: 17px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main { flex-direction: row; align-items: center; gap: 12px; }
.cell-main > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cell-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: var(--soft-2); flex-shrink: 0; }
.cell-act { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.state { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.state .dot { width: 7px; height: 7px; }
.mode { display: inline-flex; align-items: center; gap: 7px; }
.mode .i { width: 14px; height: 14px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--soft-2); color: var(--ink-3); font-size: 12px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.tag-green { background: var(--green-soft); color: var(--green-text); }
.tag-amber { background: #fdf2e3; color: var(--amber-text); }
.tag-dark { background: var(--ink); color: #fff; gap: 5px; }
.tag-dark .i { color: #fff; width: 12px; height: 12px; }
.tag-red { background: var(--red-soft); color: var(--red-text); }
.gets { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.gets span { display: inline-flex; align-items: center; gap: 4px; }
.gets .i { width: 13px; height: 13px; }
.gets .is-off { color: var(--faint); }
.dots-btn { border: 0; width: 30px; height: 30px; }
.mini-btn { height: 30px; padding: 0 10px; font-size: 13px; }
@media (max-width: 1000px) {
  .gr-machines, .gr-phones, .gr-keys { grid-template-columns: minmax(0, 1fr) auto; }
  .gr > :not(:first-child):not(:last-child) { display: none; }
  .gr.th { display: none; }
}

/* Pop menu of a row */
.pop-menu {
  position: absolute; z-index: 30; min-width: 180px; display: flex; flex-direction: column; padding: 4px;
  border-radius: 10px; background: #fff; box-shadow: var(--shadow-pop);
}
.pop-menu a, .pop-menu button {
  display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border: 0; border-radius: 7px;
  background: none; font-size: 14px; text-align: left;
}
.pop-menu a:hover, .pop-menu button:hover { background: var(--soft); }
.pop-menu .is-danger { color: var(--red-text); }
.pop-menu .is-danger .i { color: var(--red-text); }
.pop-menu [hidden] { display: none; }

/* Lists and cards */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.list-head h2 { font-size: 15px; line-height: 20px; font-weight: 600; }
.way { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line); }
.list-head + .way { border-top: 0; }
.way > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.way b { font-size: 14px; line-height: 20px; font-weight: 600; }
.way p { font-size: 13px; line-height: 18px; color: var(--muted); }
.way .link-muted { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.way-card { border: 1px solid var(--line); border-radius: 12px; }
.way-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; }
.share { display: flex; flex-direction: column; }
.share li { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.share li:first-child { border-top: 0; }
.share li > .i { margin-top: 2px; }
.share b { display: block; font-size: 14px; line-height: 20px; font-weight: 600; }
.share p { font-size: 13px; line-height: 18px; color: var(--muted); }
.first-card { display: flex; gap: 40px; align-items: center; padding: 40px; flex-wrap: wrap; }
.first-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 14px; max-width: 470px; }
.first-text h2 { font-size: 20px; line-height: 26px; font-weight: 600; }
.numbered { display: flex; flex-direction: column; gap: 14px; margin: 6px 0; }
.numbered li { display: flex; gap: 14px; }
.numbered b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; }
.numbered p { font-size: 13px; line-height: 18px; color: var(--muted); }
.numbered-sm { gap: 10px; }
.numbered-sm p { font-size: 13.5px; line-height: 20px; color: var(--ink-2); }
.num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 11px; border: 1px solid var(--line-2); font-size: 11.5px; font-weight: 500; color: var(--muted); flex-shrink: 0; }
.num-plain { margin-right: 8px; font-size: 12px; color: var(--muted); }
.step-title { font-size: 13.5px; line-height: 18px; font-weight: 500; }
.first-art { position: relative; flex: 0 1 300px; height: 196px; border-radius: 14px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.mini-term { position: absolute; left: 28px; top: 30px; width: 170px; height: 112px; padding: 26px 12px 0; border-radius: 8px; border: 1.5px solid var(--ink-3); background: #fff; display: flex; flex-direction: column; gap: 9px; }
.mini-term i { position: absolute; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.mini-term i:nth-child(1) { left: 10px; } .mini-term i:nth-child(2) { left: 18px; } .mini-term i:nth-child(3) { left: 26px; }
.mt-line { height: 2px; background: var(--placeholder); border-radius: 1px; }
.mt-line.green { background: var(--green); }
.w70 { width: 70%; } .w60 { width: 60%; } .w50 { width: 50%; } .w40 { width: 40%; }
.mini-phone { position: absolute; right: 28px; top: 62px; width: 44px; height: 76px; border-radius: 9px; border: 1.5px solid var(--ink-3); background: #fff; display: flex; justify-content: center; padding-top: 14px; }

/* Facts: a list of label and value rows */
.facts-list { display: flex; flex-direction: column; padding: 4px 16px; border: 1px solid var(--line); border-radius: 12px; margin: 0; }
.facts-list > div { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 19px; }
.facts-list > div:first-child { border-top: 0; }
.facts-list dt { width: 110px; flex-shrink: 0; color: var(--muted); }
.facts-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts-flat { border: 0; border-radius: 0; padding: 4px 20px 8px; }
.facts-icons dt { display: inline-flex; align-items: center; gap: 8px; width: 170px; font-weight: 600; color: var(--ink); }
.facts-icons dt .i { width: 14px; height: 14px; }
.facts-icons dd { color: var(--muted); }

/* Side sheets: "Add machine" and "Add phone" */
.sheet {
  position: fixed; inset: 8px 8px 8px auto; width: 520px; max-width: calc(100vw - 16px); height: auto; max-height: none;
  margin: 0; padding: 0; border: 0; border-radius: 14px; background: #fff; box-shadow: var(--shadow-pop); color: var(--ink);
  flex-direction: column;
}
.sheet[open] { display: flex; }
.sheet::backdrop { background: #0a0a0c40; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; }
.kbd-esc { height: 20px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 5px; font-size: 11px; line-height: 18px; color: var(--muted); margin-top: 4px; }
.tabs { display: flex; gap: 24px; margin: 0 24px; border-bottom: 1px solid var(--line); }
.tab { height: 38px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 14px; color: var(--muted); }
.tab.is-on { border-bottom-color: var(--ink); color: var(--ink); font-weight: 500; }
.sheet-body { flex: 1 1 auto; overflow-y: auto; padding: 20px 24px 24px; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.seg-full { display: flex; width: 100%; }
.seg-full .seg-item { flex: 1 1 0; justify-content: center; height: 30px; }
.seg-item .i { width: 14px; height: 14px; }
.seg-item.is-on .i { color: var(--ink); }

/* The dark command box */
.term-box { border-radius: 12px; background: #0b0b0f; color: #e4e4e7; overflow: hidden; }
.term-box-bar { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-bottom: 1px solid #ffffff14; font-size: 12.5px; color: #ffffff8c; }
.term-box-body { margin: 0; padding: 16px; font: 400 12.5px/21px var(--mono); white-space: pre-wrap; word-break: break-all; }
.btn-term { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 0; border-radius: 6px; background: #ffffff1a; color: #fff; font-size: 12.5px; font-weight: 500; }
.btn-term .i { color: #fff; width: 13px; height: 13px; }
.btn-term.is-done { background: #18a05833; }
.term-line { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 12px; background: #0b0b0f; color: #e4e4e7; }
.term-line pre { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 13px; line-height: 20px; white-space: pre-wrap; word-break: break-all; }
.bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--ink); transition: width 0.9s linear; }
.expired-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--red-text); font-weight: 500; }
.expired-line .i { color: var(--red-text); width: 14px; height: 14px; }
.does { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.does li { display: flex; gap: 10px; align-items: center; }
.does .i { width: 14px; height: 14px; }

/* Waiting, done and warning boxes */
.wait-card { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.wait-card > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.wait-card b { font-size: 14.5px; line-height: 20px; font-weight: 600; }
.wait-card p { font-size: 13px; line-height: 18px; color: var(--muted); }
.wait-tall { align-items: flex-start; }
.wait-tall .pulse { margin-top: 6px; }
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; background: #d7191f2e; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse::after { animation: none; } .bar i { transition: none; } }
.done-head { display: flex; align-items: center; gap: 14px; }
.done-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.done-head b { font-size: 17px; line-height: 24px; font-weight: 600; }
.done-head p { font-size: 13.5px; line-height: 19px; color: var(--muted); }
.done-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 20px; background: var(--green-soft); flex-shrink: 0; }
.done-mark .i { color: var(--green-text); stroke-width: 2.4; width: 18px; height: 18px; }
.done-amber { background: #fdf2e3; border-radius: 10px; }
.done-amber .i { color: var(--amber); stroke-width: 1.8; }
.done-gray { background: var(--soft-2); }
.done-gray .i { color: var(--muted); }
.warn-box { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid #f3d9b5; border-radius: 12px; background: #fdf8f1; font-size: 13.5px; line-height: 19px; }
.warn-box > .i { color: var(--amber); margin-top: 2px; }
.warn-box b { display: block; font-weight: 600; }
.warn-box p { color: var(--ink-2); }
.warn-soft { padding: 12px 14px; }
.infobox b { display: block; font-weight: 600; }
.infobox > div { display: flex; flex-direction: column; gap: 2px; }

/* Phone join code */
.pj-card { display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.pj-scan { display: flex; gap: 18px; align-items: center; }
.pj-scan > .stack8 { flex: 1 1 auto; min-width: 0; }
.pj-scan b { font-size: 14.5px; font-weight: 600; }
.qr { display: flex; align-items: center; justify-content: center; width: 176px; height: 176px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; flex-shrink: 0; }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr.is-expired img { opacity: 0.15; }
.qr-empty { font-size: 12px; color: var(--faint); text-align: center; }
.or { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--faint); }
.or::before, .or::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.code-boxes { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.code-boxes span { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 38px; border: 1px solid var(--line-2); border-radius: 7px; font: 500 17px/20px var(--mono); }
.code-boxes i { width: 8px; height: 1.5px; background: var(--placeholder); }
.code-boxes.is-expired span { color: var(--placeholder); }
.radio-row, .check-row, .check-card { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.radio-row { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.radio-row:has(input:checked) { border-color: var(--ink); }
.radio-row input, .check-card input, .check-row input { margin-top: 3px; accent-color: var(--ink); }
.radio-row b, .check-card b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; }
.radio-row p, .check-card p { font-size: 13px; line-height: 18px; color: var(--muted); }
.check-row { align-items: center; font-size: 13.5px; }
.check-row input { margin-top: 0; }
.check-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.plain-list { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 19px; }
.plain-list li { display: flex; gap: 10px; align-items: flex-start; }
.plain-list .i { width: 14px; height: 14px; margin-top: 3px; }
.modal-icon-gray { background: var(--soft-2); }
.modal-foot-bar { padding: 14px 24px; border-top: 1px solid var(--line); background: var(--soft); border-radius: 0 0 14px 14px; }

/* Switch */
.switch { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 36px; height: 20px; border-radius: 10px; background: var(--line-2); transition: background 0.15s; position: relative; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0a0a0c33; transition: transform 0.15s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch input:disabled + span { opacity: 0.5; }
.toggle-row, .toggle-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.toggle-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.toggle-row b, .toggle-card b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; }
.toggle-row p, .toggle-card p { font-size: 13px; line-height: 18px; color: var(--muted); }

/* Machine detail */
.detail-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.detail-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 12px; background: var(--soft-2); flex-shrink: 0; }
.detail-icon .i { width: 20px; height: 20px; }
.detail-titles { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.detail-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-name h1 { overflow-wrap: anywhere; }
.detail-meta { font-size: 13.5px; line-height: 19px; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } }
.set-block { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-top: 1px solid var(--line); }
.list-head + .set-block { border-top: 0; }
.set-foot { flex-direction: row; align-items: center; justify-content: space-between; }
.select-wrap { position: relative; }
.select-wrap select { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; appearance: none; padding-right: 18px; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: 14px; top: 16px; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.key-box { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.key-box b { display: block; font-size: 13.5px; font-weight: 500; }
.key-box p { font-size: 12.5px; color: var(--muted); }
.key-box.is-off b { color: var(--amber-text); }
#settings-state.is-busy { color: var(--muted); }
#settings-state.is-error { color: var(--red-text); }

/* Agent keys */
.key-secret { flex: 1 1 260px; width: auto; gap: 10px; justify-content: flex-start; }
.copy-btn.is-done { border-color: var(--green-line); color: var(--green-text); }
.copy-btn.is-done .i { color: var(--green-text); }

/* Sign-in link */
.link-grid { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 1100px) { .link-grid { grid-template-columns: 1fr; } }
.link-card { padding: 28px; }
.code-check { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); flex-wrap: wrap; }
.code-check > div { display: flex; flex-direction: column; gap: 2px; }
.code-check small { font-size: 12.5px; color: var(--muted); }
.code-check .mono { font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: 2px; }
.code-check p { font-size: 12.5px; color: var(--muted); max-width: 220px; }

/* First-run setup */
.stepper { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stepper-item { display: flex; gap: 12px; padding-top: 14px; border-top: 3px solid var(--line); }
.stepper-item > div { display: flex; flex-direction: column; gap: 2px; }
.stepper-item b { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); }
.stepper-item small { font-size: 13px; line-height: 18px; color: var(--faint); }
.stepper-mark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 11px; border: 1.5px solid var(--line-2); font-size: 11.5px; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.stepper-mark .i { display: none; width: 12px; height: 12px; color: #fff; stroke-width: 2.6; }
.stepper-item.is-now { border-top-color: var(--ink); }
.stepper-item.is-now b { color: var(--ink); }
.stepper-item.is-now .stepper-mark { border: 0; background: var(--ink); color: #fff; }
.stepper-item.is-done { border-top-color: var(--ink); }
.stepper-item.is-done b { color: var(--ink); }
.stepper-item.is-done .stepper-mark { border: 0; background: var(--green); }
.stepper-item.is-done .stepper-num { display: none; }
.stepper-item.is-done .stepper-mark .i { display: block; }
.setup-card { padding: 0; overflow: hidden; }
.setup-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.setup-main { padding: 32px; }
.setup-side { padding: 32px 24px; border-left: 1px solid var(--line); background: var(--soft); }
.setup-pad { padding: 32px; }
.setup-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 32px; align-items: start; }
.setup-foot { padding: 14px 32px; border-top: 1px solid var(--line); background: var(--soft); }
.setup-foot-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Setup step 3: the test Call (M5.3) */
.tc-head { display: flex; align-items: center; gap: 14px; }
.tc-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-head .hint { display: inline-flex; align-items: center; gap: 8px; color: var(--red-text); }
.tc-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 20px; background: var(--red-soft); flex-shrink: 0; }
.tc-icon .i { color: var(--red); width: 18px; height: 18px; }
.tc-steps { display: flex; flex-direction: column; gap: 12px; }
.tc-steps li { display: flex; align-items: flex-start; gap: 12px; }
.tc-steps li > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.tc-steps b { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); }
.tc-steps p { font-size: 13px; line-height: 18px; color: var(--faint); }
.tc-steps li.is-done b, .tc-steps li.is-now b { color: var(--ink); }
.tc-steps li.is-now b { color: var(--red-text); }
.tc-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; border: 1.5px solid var(--line-2); flex-shrink: 0; }
.tc-steps li.is-done .tc-dot { border-color: var(--green); background: var(--green); }
.tc-steps li.is-now .tc-dot { border-color: var(--red); background: var(--red); }
.tc-quote { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 13.5px; line-height: 20px; color: var(--ink-2); }
@media (max-width: 1000px) {
  .setup-split, .setup-two { grid-template-columns: 1fr; }
  .setup-side { border-left: 0; border-top: 1px solid var(--line); }
  .pj-scan { flex-direction: column; align-items: flex-start; }
}
.cell > .tag { align-self: flex-start; }
.btn-danger .i { color: #fff; }
.key-secret { min-width: 0; overflow: hidden; }
.key-secret > span { min-width: 0; }
