/* Calamantus (FH Type Foundry). It has no / # $ % & + = — · ₦, so those characters fall back to Inter. */
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Light.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Light-Italic.woff") format("woff"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Book.woff") format("woff"); font-weight: 350; font-style: normal; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Book-Italic.woff") format("woff"); font-weight: 350; font-style: italic; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Regular-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Medium-Italic.woff") format("woff"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-SemiBold-Italic.woff") format("woff"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Calamantus"; src: url("/assets/fonts/Calamantus-Bold-Italic.woff") format("woff"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  /* Warm dark palette from the Figma redesign */
  --bg: #211f20; --bg-2: #1c1a1b; --panel: #262425; --surface: #2b2829; --muted: #302d2e; --active: #363334; --hover: #302d2e;
  --border: #3d3a3b; --border-strong: #484445; --border-soft: rgba(255,255,255,.06); --line: rgba(255,255,255,.08);
  --fg: #f7f8f8; --fg-2: #8a8f98; --fg-3: #62666d; --fg-4: #4f4b4c;
  --yellow: #fad600; --yellow-ink: #211f20; --green: #3fa672; --green-2: #4cb782; --red: #e5484d; --blue: #4c8df6; --purple: #a774f2; --orange: #f2994a; --amber: #e2b400;
  --sans: "Calamantus", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 7px; --r-lg: 10px;
  --side: 240px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --code-bg: #1c1a1b; --code-fg: #c9ccd1; --fg-soft: #c9ccd1; --glass: rgba(33,31,32,.9); --shadow: rgba(0,0,0,.45); --overlay: rgba(0,0,0,.55);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 13px/1.45 var(--sans); letter-spacing: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
.ico { display: block; flex: none; }
.mono { font-family: var(--mono); letter-spacing: 0; }
.muted { color: var(--fg-2); }
.dim { color: var(--fg-3); }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.row-flex { display: flex; align-items: center; gap: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
::selection { background: rgba(250,214,0,.3); }
:focus-visible { outline: 2px solid rgba(250,214,0,.6); outline-offset: 1px; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 6px; font-weight: 500; font-size: 13px; white-space: nowrap; border: 1px solid transparent; transition: background .12s, border-color .12s, color .12s, opacity .12s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--yellow); color: var(--yellow-ink); }
.btn-primary:hover:not(:disabled) { background: #ffe033; }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--fg); box-shadow: 0 1px 1px rgba(0,0,0,.2); }
.btn-secondary:hover:not(:disabled) { background: var(--active); }
.btn-ghost { color: var(--fg-2); }
.btn-ghost:hover:not(:disabled) { color: var(--fg); background: var(--hover); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #f05a5f; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn-lg { height: 36px; padding: 0 16px; }
.btn-block { width: 100%; }
.ibtn { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 6px; color: var(--fg-2); flex: none; }
.ibtn:hover { background: var(--hover); color: var(--fg); }
.ibtn.boxed { background: var(--surface); border: 1px solid var(--border); }
.ibtn.boxed:hover { background: var(--active); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12px; color: var(--fg-2); font-weight: 500; }
.hint { font-size: 12px; color: var(--fg-3); }
.input, .textarea, .select-btn { width: 100%; height: 32px; padding: 0 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; color: var(--fg); outline: none; transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.input:focus, .textarea:focus { border-color: rgba(250,214,0,.7); box-shadow: 0 0 0 3px rgba(250,214,0,.12); }
.input.error { border-color: var(--red); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-right: 34px; }
.input-wrap .lead { position: absolute; left: 10px; color: var(--fg-3); pointer-events: none; }
.input-wrap .lead + .input { padding-left: 32px; }
.input-wrap .trail { position: absolute; right: 4px; }
.select-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; text-align: left; }
.select-btn .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-btn .ph { color: var(--fg-3); }
.select-btn:hover { border-color: #2f3238; }
.checkbox { appearance: none; width: 15px; height: 15px; border-radius: 4px; border: 1px solid var(--fg-4); background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; flex: none; margin: 0; }
.checkbox:checked { background: var(--yellow); border-color: var(--yellow); }
.checkbox:checked::after { content: ""; width: 8px; height: 5px; border: 2px solid var(--yellow-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.toggle { appearance: none; width: 30px; height: 18px; border-radius: 10px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.toggle::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #8a8f98; transition: transform .15s, background .15s; }
.toggle:checked { background: var(--yellow); }
.toggle:checked::after { transform: translateX(12px); background: var(--yellow-ink); }
.radio-card { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); }
.radio-card:has(input:checked) { border-color: rgba(250,214,0,.7); }
.radio-card input { accent-color: var(--yellow); margin-top: 2px; }
.kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px; background: var(--active); border: 1px solid var(--border); font-size: 10.5px; color: var(--fg-2); font-family: var(--mono); }
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 40px; height: 46px; text-align: center; font-size: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--fg); outline: none; }
.otp input:focus { border-color: rgba(250,214,0,.7); }

/* ---------- Badges & pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.badge.green { color: #4cb782; background: rgba(63,166,114,.12); border-color: rgba(63,166,114,.25); }
.badge.yellow { color: #fad600; background: rgba(250,214,0,.1); border-color: rgba(250,214,0,.22); }
.badge.red { color: #f16a6e; background: rgba(229,72,77,.12); border-color: rgba(229,72,77,.25); }
.badge.blue { color: #78a9fa; background: rgba(76,141,246,.12); border-color: rgba(76,141,246,.25); }
.badge.gray { color: var(--fg-2); background: var(--active); border-color: var(--border); }
.badge.orange { color: #f2994a; background: rgba(242,153,74,.12); border-color: rgba(242,153,74,.25); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--border); color: #b4b8c0; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 600; flex: none; overflow: hidden; }
.avatar.sq { border-radius: 5px; }
.avatar.yellow { background: var(--yellow); color: var(--yellow-ink); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Shell ---------- */
.shell { display: flex; height: 100vh; overflow: hidden; }
.side { width: var(--side); flex: none; display: flex; flex-direction: column; padding: 10px 8px; gap: 1px; overflow-y: auto; }
.ws { display: flex; align-items: center; gap: 6px; padding: 2px 2px 12px 6px; }
.ws-btn { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 6px; min-width: 0; }
.ws-btn:hover { background: var(--hover); }
.ws-btn .avatar { width: 22px; height: 22px; font-size: 11px; }
.ws-btn .n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 6px; color: var(--fg); font-size: 13px; }
.nav-item .ico { color: var(--fg-2); }
.nav-item:hover { background: var(--hover); }
.nav-item.on { background: var(--active); }
.nav-sec { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; color: var(--fg-3); font-size: 12px; margin-top: 14px; cursor: pointer; user-select: none; }
.nav-sec .caret { width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 4px solid #8e8e8e; transition: transform .15s; }
.nav-sec.closed .caret { transform: rotate(-90deg); }
.nav-group.closed { display: none; }
.side-spacer { flex: 1; min-height: 16px; }
.whatsnew { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.whatsnew .k { color: var(--fg-2); }
.whatsnew .v { font-weight: 500; }
.main { flex: 1; min-width: 0; padding: 8px 8px 8px 0; display: flex; }
.panel { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.topbar { height: 48px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.crumbs .ico { color: var(--fg-2); }
.crumbs a { color: var(--fg-2); }
.crumbs a:hover { color: var(--fg); }
.crumbs .sep { color: var(--fg-3); }
.top-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.top-links .btn-ghost { height: 28px; padding: 0 9px; font-weight: 400; }
.content { flex: 1; overflow-y: auto; position: relative; }
.page { max-width: 1060px; margin: 0 auto; padding: 36px 40px 64px; }
.page.narrow { max-width: 760px; }
.page.wide { max-width: 1240px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; min-height: 32px; }
.page-head h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.head-ico { width: 40px; height: 40px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--fg-2); flex: none; }
.eyebrow { font-size: 11.5px; color: var(--fg-3); }

/* tabs */
.seg-tabs { display: inline-flex; gap: 4px; margin-bottom: 18px; }
.seg-tab { height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--fg-2); font-weight: 500; font-size: 12.5px; }
.seg-tab.on { background: var(--active); color: var(--fg); border-color: var(--border-strong); }
.seg-tab:hover { color: var(--fg); }
.ul-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.ul-tab { padding: 0 0 9px; color: var(--fg-2); font-size: 13px; position: relative; }
.ul-tab:hover { color: var(--fg); }
.ul-tab.on { color: var(--fg); }
.ul-tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--fg); }

/* filters */
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters .search { flex: 1; min-width: 220px; }
.filters .select-btn { width: auto; min-width: 140px; }

/* tables */
.table-wrap { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; table-layout: auto; }
.t th { text-align: left; font-weight: 400; color: var(--fg-2); font-size: 12px; height: 36px; padding: 0 14px; background: var(--bg-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.t td { height: 46px; padding: 0 14px; border-bottom: 1px solid var(--border); white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .1s; }
.t tbody tr.clickable { cursor: pointer; }
.t tbody tr:hover { background: var(--surface); }
.t td.r, .t th.r { text-align: right; }
.t td.act { width: 40px; padding: 0 8px; text-align: right; }
.cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; color: var(--fg-3); font-size: 12px; }
.pager .btns { display: flex; gap: 6px; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; }
.card-pad { padding: 18px 20px; }
.card h3 { font-size: 14px; font-weight: 500; }
.card .sub { color: var(--fg-2); font-size: 12.5px; margin-top: 3px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.stat .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; }
.stat .v { font-size: 22px; font-weight: 500; margin-top: 6px; letter-spacing: -0.02em; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin: 18px 0 22px; }
.facts .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; margin-bottom: 5px; }
.facts .v { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* empty */
.empty { border: 1px dashed var(--border); border-radius: 12px; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: var(--bg-2); }
.empty .head-ico { margin-bottom: 6px; }
.empty h3 { font-size: 14px; font-weight: 600; }
.empty p { color: var(--fg-2); max-width: 420px; }
.empty .btn { margin-top: 8px; }

/* code */
.code { background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; font: 12.5px/1.7 var(--mono); color: var(--code-fg); overflow: auto; position: relative; }
.code pre { margin: 0; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; }
.code .ln { color: var(--fg-4); text-align: right; user-select: none; }
.code .src { white-space: pre; }
.code .copy-abs { position: absolute; top: 6px; right: 6px; }
.tok-s { color: #fad600; } .tok-k { color: #c792ea; } .tok-c { color: #62666d; } .tok-n { color: #7aa2f7; }
.codebar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.codebar .lang { height: 24px; padding: 0 8px; border-radius: 5px; color: var(--fg-3); font: 12px var(--mono); white-space: nowrap; }
.codebar .lang.on { background: var(--active); color: var(--fg); }
.codebar .lang:hover { color: var(--fg); }

/* overlays */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); animation: pop .14s ease-out; display: flex; flex-direction: column; max-height: 80vh; }
.modal.lg { max-width: 600px; }
.modal.xl { max-width: 820px; }
@keyframes pop { from { transform: translateY(6px) scale(.985); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 16px 18px 6px; }
.modal-head h3 { font-size: 15px; font-weight: 600; }
.modal-head .ibtn { margin-left: auto; margin-right: -6px; }
.modal-body { padding: 8px 18px 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.modal-body .desc { color: var(--fg-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: #111213; border-radius: 0 0 12px 12px; }
.drawer-overlay { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.35); animation: fade .12s; }
.drawer { position: fixed; top: 8px; right: 8px; bottom: 8px; width: min(440px, calc(100vw - 16px)); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; z-index: 46; display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(0,0,0,.4); animation: slide .16s ease-out; }
.drawer.wide { width: min(560px, calc(100vw - 16px)); }
@keyframes slide { from { transform: translateX(16px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); gap: 8px; }
.drawer-head h3 { font-size: 14px; font-weight: 600; }
.drawer-head .ibtn { margin-left: auto; }
.drawer-body { padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.menu { position: fixed; z-index: 60; min-width: 180px; background: var(--muted); border: 1px solid var(--border-strong); border-radius: 9px; box-shadow: 0 14px 40px rgba(0,0,0,.45); padding: 4px; animation: pop .1s ease-out; max-height: 360px; overflow-y: auto; }
.menu .mi { display: flex; align-items: center; gap: 9px; width: 100%; height: 30px; padding: 0 9px; border-radius: 6px; font-size: 13px; color: var(--fg); text-align: left; }
.menu .mi .ico { color: var(--fg-2); }
.menu .mi:hover, .menu .mi.focus { background: var(--active); }
.menu .mi.danger { color: #f16a6e; }
.menu .mi.danger .ico { color: #f16a6e; }
.menu .mi .r { margin-left: auto; color: var(--fg-3); font-size: 12px; display: flex; gap: 3px; }
.menu .mi .chk { margin-left: auto; color: var(--fg); }
.menu .msep { height: 1px; background: var(--border); margin: 4px -4px; }
.menu .mh { padding: 6px 9px 4px; color: var(--fg-3); font-size: 11.5px; }
.menu .msearch { padding: 2px 2px 4px; }
.menu .msearch input { width: 100%; height: 28px; background: transparent; border: 0; border-bottom: 1px solid var(--border); color: var(--fg); padding: 0 7px; outline: none; }
.popover { position: fixed; z-index: 60; background: var(--muted); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.45); animation: pop .1s ease-out; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 11px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 12px 30px rgba(0,0,0,.45); animation: pop .16s ease-out; font-size: 13px; }
.toast .ico { flex: none; }
.toast.ok .ico { color: var(--green-2); }
.toast.err .ico { color: var(--red); }
.toast.info .ico { color: var(--blue); }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 9px; border: 1px solid rgba(76,141,246,.3); background: rgba(76,141,246,.08); color: #9dbdf8; font-size: 12.5px; margin-bottom: 16px; }
.banner.warn { border-color: rgba(242,153,74,.3); background: rgba(242,153,74,.08); color: #f4b37a; }
.banner.ok { border-color: rgba(63,166,114,.3); background: rgba(63,166,114,.08); color: #7fd0a5; }
.banner .btn { margin-left: auto; }

/* auth */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(60% 40% at 50% -8%, rgba(250,214,0,.09), transparent 70%), var(--bg-2); }
.auth-head { height: 64px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 32px; }
.auth-body { flex: 1; display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.auth-card .mark { display: grid; place-items: center; margin-bottom: 6px; }
.auth-card h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.auth-card .sub { color: var(--fg-2); }
.auth-card .sub a, .auth-card a.y { color: var(--yellow); }
:root[data-theme="light"] .auth-card .sub a, :root[data-theme="light"] .auth-card a.y { color: #876800; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.auth-card .sso { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.auth-card .or { display: flex; align-items: center; gap: 12px; color: var(--fg-3); font-size: 12px; }
.auth-card .or::before, .auth-card .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card .legal { font-size: 12px; color: var(--fg-3); text-align: center; }
.auth-foot { display: flex; gap: 22px; padding: 22px 32px; color: var(--fg-3); font-size: 12px; }
.auth-foot a:hover { color: var(--fg); }
.last-used { position: absolute; top: -9px; right: 10px; background: var(--yellow); color: var(--yellow-ink); font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }

/* steps (onboarding / add domain) */
.steps { display: flex; flex-direction: column; gap: 18px; }
.step { display: grid; grid-template-columns: 26px 1fr; gap: 14px; }
.step-num { width: 22px; height: 22px; border-radius: 50%; border: 1.3px solid var(--fg-3); color: var(--fg-2); display: grid; place-items: center; font-size: 11.5px; margin-top: 12px; }
.step.active .step-num { border-color: var(--yellow); color: var(--yellow); }
.step.done .step-num { border-color: #2e5b45; background: rgba(63,166,114,.12); color: var(--green-2); }
.step-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.step.done .step-card { background: rgba(63,166,114,.06); border-color: rgba(63,166,114,.35); }
.step.disabled .step-card { opacity: .5; }
.step-card h3 { font-size: 14px; font-weight: 500; }
.step-card .sub { color: var(--fg-2); margin-top: 3px; margin-bottom: 12px; }

/* timeline */
.timeline { display: flex; align-items: flex-start; padding: 6px 4px 2px; overflow-x: auto; }
.tl-item { flex: 1; min-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; cursor: pointer; padding: 4px; border-radius: 8px; }
.tl-item:hover { background: var(--hover); }
.tl-item:not(:last-child)::after { content: ""; position: absolute; top: 18px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 1px; background: var(--border); }
.tl-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); }
.tl-item .n { font-size: 12.5px; }
.tl-item .t { font-size: 11px; color: var(--fg-3); }
.vtl { display: flex; flex-direction: column; }
.vtl-item { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; padding: 8px 0; position: relative; align-items: center; }
.vtl-item:not(:last-child)::before { content: ""; position: absolute; left: 9px; top: 26px; bottom: -8px; width: 1px; background: var(--border); }
.vtl-item .t { color: var(--fg-3); font-size: 12px; }

/* iframe preview */
.preview-frame { width: 100%; border: 0; background: #fff; border-radius: 8px; display: block; }
.preview-stage { background: var(--bg-2); padding: 24px; display: flex; justify-content: center; border-top: 1px solid var(--border); }

/* meters */
.meter { height: 4px; background: var(--active); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; background: var(--yellow); border-radius: 4px; }
.meter.red > i { background: var(--red); }

/* misc */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 13px; }
.kv .k { color: var(--fg-3); }
.section-title { font-size: 13px; font-weight: 500; margin: 26px 0 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--active) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 6px; height: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
.loading-row td { height: 46px; }
.divider { height: 1px; background: var(--border); margin: 6px 0; }
.dropzone { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 34px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; background: var(--bg-2); transition: border-color .12s, background .12s; cursor: pointer; }
.dropzone.over { border-color: var(--yellow); background: rgba(250,214,0,.04); }
.dropzone a, .link { color: var(--yellow); cursor: pointer; }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(255,255,255,.2); flex: none; }
.chart-tip { position: absolute; pointer-events: none; background: var(--muted); border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 5; white-space: nowrap; }

/* editor */
.editor-shell { display: flex; flex-direction: column; height: 100vh; }
.editor-top { height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); flex: none; background: var(--bg-2); }
.editor-top .name-input { background: transparent; border: 0; color: var(--fg); font-weight: 500; outline: none; min-width: 60px; max-width: 360px; padding: 2px 4px; border-radius: 4px; }
.editor-top .name-input:focus { background: var(--surface); }
.editor-main { flex: 1; display: flex; min-height: 0; background: var(--bg-2); }
.editor-canvas { flex: 1; overflow-y: auto; position: relative; }
.editor-doc { max-width: 680px; margin: 0 auto; padding: 28px 40px 160px; }
.hdr-fields { border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.hdr-row { display: grid; grid-template-columns: 90px 1fr; align-items: center; min-height: 38px; border-bottom: 1px solid var(--border-soft); }
.hdr-row:last-child { border-bottom: 0; }
.hdr-row > span { color: var(--fg-3); font-size: 12.5px; }
.hdr-row input { background: transparent; border: 0; outline: none; color: var(--fg); padding: 0 6px; height: 30px; width: 100%; }
.doc-subject { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; background: transparent; border: 0; color: var(--fg); outline: none; width: 100%; padding: 0; }
.doc-preview { color: var(--fg-3); background: transparent; border: 0; outline: none; width: 100%; padding: 4px 0 0; font-size: 13px; }
.blocks { margin-top: 18px; display: flex; flex-direction: column; gap: 2px; }
.blk { position: relative; border-radius: 6px; padding: 3px 6px; margin: 0 -6px; border: 1px solid transparent; color: var(--fg-soft); font-size: 15px; line-height: 1.6; }
.blk:hover { border-color: var(--line); }
.blk.sel { border-color: rgba(250,214,0,.75); }
.blk [contenteditable] { outline: none; min-height: 1.6em; }
.blk [contenteditable]:empty::before { content: attr(data-ph); color: var(--fg-4); }
.blk h1 { font-size: 26px; font-weight: 600; color: var(--fg); line-height: 1.25; }
.blk h2 { font-size: 19px; font-weight: 600; color: var(--fg); line-height: 1.3; }
.blk ul, .blk ol { margin: 0; padding-left: 22px; }
.blk .btn-blk { display: inline-block; padding: 9px 16px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.blk .div-blk { height: 1px; background: var(--border); margin: 10px 0; }
.blk .img-blk img { max-width: 100%; border-radius: 6px; display: block; }
.blk .img-blk .ph-img { height: 120px; border: 1px dashed var(--border-strong); border-radius: 8px; display: grid; place-items: center; color: var(--fg-3); font-size: 12.5px; }
.blk .footer-blk { font-size: 12px; color: var(--fg-3); line-height: 1.6; padding-top: 10px; }
.blk .footer-blk a { text-decoration: underline; }
.blk .html-blk { font: 12px var(--mono); color: var(--fg-2); background: var(--bg-2); border: 1px solid var(--border); padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; max-height: 160px; overflow: hidden; }
.blk .code-blk { font: 12.5px/1.6 var(--mono); background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--border); padding: 12px 14px; border-radius: 8px; white-space: pre-wrap; outline: none; }
.blk .handle { position: absolute; left: -30px; top: 4px; opacity: 0; display: flex; gap: 2px; }
.blk:hover .handle, .blk.sel .handle { opacity: 1; }
.var-chip { display: inline-block; padding: 0 5px; border-radius: 4px; background: rgba(250,214,0,.12); color: var(--yellow); font: 13px var(--mono); }
.inspector { width: 300px; flex: none; margin: 8px 8px 8px 0; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow-y: auto; }
.insp-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--fg-3); }
.insp-head b { color: var(--fg); font-weight: 500; }
.insp-head .acts { margin-left: auto; display: flex; gap: 2px; }
.insp-sec { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.insp-sec h4 { font-size: 12.5px; font-weight: 500; margin-bottom: 2px; }
.insp-row { display: grid; grid-template-columns: 84px 1fr; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-2); }
.insp-row .input, .insp-row .select-btn { height: 28px; font-size: 12.5px; }
.fmt-bar { position: fixed; z-index: 55; display: flex; gap: 1px; background: var(--muted); border: 1px solid var(--border-strong); border-radius: 8px; padding: 3px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.fmt-bar button { height: 26px; min-width: 26px; padding: 0 6px; border-radius: 5px; color: var(--fg-2); font-weight: 600; }
.fmt-bar button:hover { background: var(--active); color: var(--fg); }

/* stamp */
.stamp-page { min-height: 100vh; background: radial-gradient(40% 50% at 72% 50%, rgba(250,214,0,.1), transparent 70%), var(--bg-2); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding: 40px 10vw; }
.stamp { width: 340px; padding: 16px 16px 18px; border-radius: 14px; background: var(--surface); border: 1.5px dashed var(--fg-4); transform: rotate(4deg); box-shadow: 0 30px 80px rgba(0,0,0,.5); justify-self: center; }
.stamp .art { aspect-ratio: 1.6; background: var(--yellow); border-radius: 8px; display: grid; place-items: center; }
.stamp h4 { margin-top: 14px; font-size: 15px; font-weight: 600; }
.stamp .meta { display: flex; justify-content: space-between; margin-top: 14px; color: var(--fg-3); font: 11px var(--mono); letter-spacing: .05em; }

/* chat (help) */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg-bot { display: grid; grid-template-columns: 24px 1fr; gap: 10px; color: var(--fg-2); line-height: 1.55; }
.msg-bot .bot { width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); color: var(--yellow-ink); display: grid; place-items: center; }
.msg-me { align-self: flex-end; background: var(--active); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; max-width: 80%; }
.sources { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 12px; color: var(--fg-3); }

.mobile-only { display: none !important; }
@media (max-width: 900px) {
  :root { --side: 0px; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; background: var(--bg); z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .main { padding: 0; }
  .panel { border-radius: 0; border: 0; }
  .page { padding: 24px 16px 48px; }
  .mobile-only { display: inline-grid !important; }
  .stat-grid, .facts { grid-template-columns: 1fr 1fr; }
  .inspector { display: none; }
  .stamp-page { grid-template-columns: 1fr; }
  .t th:nth-child(n+4), .t td:nth-child(n+4):not(.act) { display: none; }
}
.copyable { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.copyable:hover { color: var(--fg); }
.two-col { min-width: 0; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr !important; } }

/* ---------------------------------------------------------------- motion */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes grow-x { from { transform: scaleX(0); } }
.enter > * { animation: rise .38s var(--ease) both; }
.enter .page-head { animation: rise .32s var(--ease) both; }
.enter .t tbody tr, .enter .stat, .enter .card, .enter .stagger > *, .enter .plan-card { animation: rise .42s var(--ease) both; }
.enter .t tbody tr:nth-child(1), .enter .stat:nth-child(1), .enter .stagger > :nth-child(1) { animation-delay: 40ms; }
.enter .t tbody tr:nth-child(2), .enter .stat:nth-child(2), .enter .stagger > :nth-child(2) { animation-delay: 70ms; }
.enter .t tbody tr:nth-child(3), .enter .stat:nth-child(3), .enter .stagger > :nth-child(3) { animation-delay: 100ms; }
.enter .t tbody tr:nth-child(4), .enter .stat:nth-child(4), .enter .stagger > :nth-child(4) { animation-delay: 130ms; }
.enter .t tbody tr:nth-child(5), .enter .stat:nth-child(5), .enter .stagger > :nth-child(5) { animation-delay: 160ms; }
.enter .t tbody tr:nth-child(6), .enter .stagger > :nth-child(6) { animation-delay: 190ms; }
.enter .t tbody tr:nth-child(7) { animation-delay: 220ms; }
.enter .t tbody tr:nth-child(8) { animation-delay: 250ms; }
.enter .t tbody tr:nth-child(9) { animation-delay: 280ms; }
.enter .t tbody tr:nth-child(n+10) { animation-delay: 300ms; }
.meter i { transform-origin: left; animation: grow-x .7s var(--ease) both; animation-delay: .15s; }
.chart-line { stroke-dasharray: 1; animation: draw 1s var(--ease) both; }
.chart-area { animation: fadeIn .9s .25s ease-out both; }
.btn:active:not(:disabled) { transform: translateY(.5px) scale(.985); }
.btn { transition: background .12s, border-color .12s, color .12s, opacity .12s, transform .08s; }
.nav-item { transition: background .12s, color .12s; }
.card, .stat, .plan-card { transition: border-color .18s, background .18s, transform .18s var(--ease); }
a.card:hover, .card.hover:hover, .plan-card:hover { border-color: var(--border-strong); }
.t tbody tr { transition: background .12s; }
.ibtn { transition: background .12s, color .12s, transform .08s; }
.ibtn:active { transform: scale(.94); }
.badge { transition: background .2s, color .2s; }
.toast { animation: toastIn .28s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dot.pulse { position: relative; }
.dot.pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid currentColor; animation: ping 1.8s ease-out infinite; opacity: .6; }
@keyframes ping { 70%, 100% { transform: scale(2.2); opacity: 0; } }

/* ---------------------------------------------------------------- billing */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); }
.seg button { height: 26px; padding: 0 11px; border-radius: 6px; color: var(--fg-2); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--active); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.seg .save { background: var(--yellow); color: var(--yellow-ink); font-size: 10.5px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plan-grid.three { grid-template-columns: repeat(3, 1fr); }
.plan-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.plan-card.popular { border-color: rgba(250,214,0,.55); }
.plan-card.current { box-shadow: inset 0 0 0 1px var(--yellow); border-color: var(--yellow); }
.plan-card h3 { margin: 0; font-size: 15px; font-weight: 500; }
.plan-card .tag { font-size: 12.5px; margin: 0; }
.plan-card .price { display: flex; align-items: baseline; gap: 4px; margin: 10px 0 0; flex-wrap: wrap; }
.plan-card .price .count, .payg .price .count { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.plan-card .btn { margin: 10px 0 4px; }
.plan-card .feats { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--fg-2); }
.plan-card .feats li { display: flex; gap: 8px; align-items: flex-start; }
.plan-card .feats svg { flex: none; margin-top: 2px; color: var(--fg-3); }
.plan-card.popular .feats svg { color: var(--yellow); }
.plan-card.mini .price .count { font-size: 24px; }
.payg { display: grid; grid-template-columns: minmax(220px, 1fr) 1.6fr; gap: 24px; align-items: start; }
.payg .price { display: flex; align-items: baseline; gap: 6px; }
.link { color: var(--yellow); font-size: inherit; padding: 0; }
.link:hover { text-decoration: underline; }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } .payg { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .plan-grid, .plan-grid.three { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- admin */
.admin { min-height: 100vh; background: var(--bg); }
.admin-top { position: sticky; top: 0; z-index: 5; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(12px); }
.admin .page { padding-top: 24px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.admin-grid.three { grid-template-columns: repeat(3, 1fr); }
.admin .h3 { margin: 0; font-size: 13.5px; font-weight: 500; }
@media (max-width: 900px) { .admin-grid, .admin-grid.three { grid-template-columns: 1fr; } .admin .stat-grid { grid-template-columns: repeat(2, 1fr) !important; } }
.bill-sect { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 20px 22px; margin-bottom: 14px; }
.bill-sect .bs-l h3 { margin: 0 0 4px; font-size: 14px; font-weight: 500; }
.bill-sect .bs-l p { margin: 0; font-size: 12.5px; color: var(--fg-3); }
.pm-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.addr { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.addr .field { width: 100%; margin: 0; }
.addr .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.empty-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px; border: 1px dashed var(--border); border-radius: 8px; font-size: 13px; }
.picks { display: flex; flex-direction: column; gap: 8px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.pick:hover { border-color: var(--border-strong); }
.pick.on { border-color: var(--yellow); background: rgba(250, 214, 0, .06); }
.pick.cur { opacity: .6; cursor: default; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; transition: border-color .15s; }
.pick.on .radio { border-color: var(--yellow); }
.pick.on .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); animation: pop .15s ease-out; }
.pick .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick .grow b { font-weight: 500; font-size: 13.5px; }
.pick .grow .dim { font-size: 12px; }
.pick .pr { font-size: 15px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pick .pr em { font-style: normal; font-size: 12px; color: var(--fg-3); font-weight: 400; margin-left: 2px; }
.modal.lg { max-width: 600px; }
@media (max-width: 760px) { .bill-sect { grid-template-columns: 1fr; gap: 12px; } .addr .two { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- docs (Figma: Docs · MCP server / API reference) */
.docs { min-height: 100vh; background: var(--bg); color: var(--fg); }
.d-top { position: sticky; top: 0; z-index: 20; height: 60px; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 12px; padding: 0 20px; background: var(--glass); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.d-logo img { display: block; }
.d-badge { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--muted); border: 1px solid var(--border-strong); color: var(--fg-2); }
.d-search { position: relative; justify-self: center; width: min(460px, 100%); }
.d-search input { width: 100%; height: 34px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--fg); padding: 0 50px 0 32px; outline: none; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
.d-search input:focus { border-color: var(--border-strong); box-shadow: 0 0 0 3px rgba(250, 214, 0, .12); }
.d-search .lead { position: absolute; left: 11px; top: 10px; color: var(--fg-3); }
.d-search kbd { position: absolute; right: 8px; top: 7px; font: 11px var(--mono); color: var(--fg-3); background: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.d-results { position: absolute; top: 40px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); padding: 6px; animation: pop .12s ease-out; max-height: 420px; overflow: auto; }
.d-results a { display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 8px 10px; border-radius: 7px; font-size: 13px; }
.d-results a .k { font: 500 10.5px var(--mono); color: var(--fg-3); text-transform: uppercase; padding-top: 2px; }
.d-results a .sub { grid-column: 2; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-results a.on, .d-results a:hover { background: var(--active); }
.d-links { display: flex; gap: 18px; align-items: center; font-size: 13px; color: var(--fg-2); }
.d-links a:hover { color: var(--fg); }
.d-dash { background: var(--yellow); color: var(--yellow-ink) !important; font-weight: 500; padding: 6px 12px; border-radius: 7px; }
.d-tabs { position: sticky; top: 60px; z-index: 19; display: flex; gap: 22px; padding: 0 20px; height: 44px; align-items: stretch; border-bottom: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(12px); overflow-x: auto; }
.d-tabs a { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .15s, border-color .2s; }
.d-tabs a:hover { color: var(--fg-2); }
.d-tabs a.on { color: var(--fg); border-color: var(--yellow); }
.d-body { display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; }
.d-body:has(.d-main.api) { grid-template-columns: 250px minmax(0, 1fr); }
.d-body:has(.d-main.solo) { grid-template-columns: minmax(0, 1fr); }
.d-side { position: sticky; top: 104px; align-self: start; height: calc(100vh - 104px); overflow-y: auto; padding: 22px 12px 40px; border-right: 1px solid var(--border); }
.d-grp { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); padding: 16px 10px 8px; }
.d-grp:first-child { padding-top: 0; }
.d-side a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 7px; font-size: 13px; color: var(--fg-2); transition: background .12s, color .12s; }
.d-side a:hover { color: var(--fg); background: var(--hover); }
.d-side a.on { color: var(--fg); background: var(--active); }
.d-side .mth { font: 500 10.5px var(--mono); width: 34px; flex: none; }
.ab { width: 20px; height: 20px; border-radius: 5px; display: inline-grid; place-items: center; font: 500 9.5px var(--mono); background: var(--muted); border: 1px solid var(--border-strong); color: var(--fg); flex: none; }
.d-main { padding: 40px 48px 80px; min-width: 0; }
.d-main.api { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 40px; align-items: start; }
.d-main.solo { max-width: 820px; margin: 0 auto; width: 100%; }
.d-art { max-width: 720px; min-width: 0; animation: rise .4s var(--ease) both; }
.d-crumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-3); margin-bottom: 14px; }
.d-crumb span { color: var(--fg-2); }
.d-h1 { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; }
.d-art h1 { font-size: 34px; font-weight: 500; letter-spacing: -0.03em; margin: 0 0 14px; line-height: 1.15; }
.d-art h2 { font-size: 21px; font-weight: 500; letter-spacing: -0.015em; margin: 44px 0 12px; scroll-margin-top: 120px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.d-art p, .d-prose p { color: var(--fg-2); font-size: 14.5px; line-height: 1.7; margin: 0 0 14px; }
.d-lead { font-size: 16px !important; }
.d-art a:not(.d-card):not(.d-chip) { color: var(--fg); text-decoration: underline; text-decoration-color: rgba(250, 214, 0, .5); text-underline-offset: 3px; }
.d-art code, .d-prose code, .d-note code { font: 12.5px var(--mono); color: var(--fg); background: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.d-prose ol, .d-list { color: var(--fg-2); font-size: 14.5px; line-height: 1.7; padding-left: 20px; margin: 0 0 14px; }
.d-prose li, .d-list li { margin-bottom: 6px; }
.d-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--fg-2); font-size: 12.5px; white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.d-chip:hover { color: var(--fg); border-color: var(--border-strong); }
.d-chip.on { color: var(--fg); border-color: var(--yellow); background: rgba(250, 214, 0, .08); }
.d-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.d-pills .p { font: 11.5px var(--mono); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--fg-2); background: var(--muted); }
.d-pills .p.blue { color: #9dbdf8; border-color: rgba(76, 141, 246, .4); background: rgba(76, 141, 246, .1); }
.d-pills .p.green { color: #7fd0a5; border-color: rgba(63, 166, 114, .4); background: rgba(63, 166, 114, .1); }
.d-cards { display: grid; gap: 12px; margin: 16px 0 6px; }
.d-cards.three { grid-template-columns: repeat(3, 1fr); }
.d-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); text-align: left; transition: border-color .18s, transform .22s var(--ease), background .18s; }
.d-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.d-card b { font-weight: 500; font-size: 14px; color: var(--fg); margin-top: 6px; }
.d-card .dim { font-size: 12.5px; line-height: 1.5; }
.d-card .ab { width: 28px; height: 28px; font-size: 11px; }
.d-card .tagm { align-self: flex-start; margin-top: 6px; font-size: 11px; color: var(--fg-2); background: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 7px; }
.d-card.prompt { flex-direction: row; gap: 10px; color: var(--fg); font-size: 13px; line-height: 1.5; cursor: copy; }
.d-card.prompt svg { color: var(--yellow); flex: none; margin-top: 3px; }
.d-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--muted); border: 1px solid var(--border-strong); color: var(--yellow); }
.d-code { border: 1px solid var(--border); border-radius: 11px; background: var(--code-bg); overflow: hidden; margin: 14px 0; }
.d-code-h { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--panel); overflow-x: auto; }
.d-code-h button[data-lang] { font: 12px var(--sans); padding: 4px 9px; border-radius: 6px; color: var(--fg-3); white-space: nowrap; transition: background .15s, color .15s; }
.d-code-h button[data-lang]:hover { color: var(--fg-2); }
.d-code-h button.on { background: var(--active); color: var(--fg); }
.d-code-h .mono { font: 11.5px var(--mono); padding: 0 6px; }
.d-pre { margin: 0; padding: 14px 0; font: 12.5px/1.7 var(--mono); color: var(--code-fg); overflow-x: auto; counter-reset: dl; }
.d-pre .l { display: block; white-space: pre; padding-right: 16px; }
.d-pre .l::before { counter-increment: dl; content: counter(dl); display: inline-block; width: 28px; margin-right: 16px; text-align: right; color: var(--fg-4); user-select: none; }
.d-pre:not([hidden]) { animation: fadeIn .2s ease-out; }
.d-callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; border: 1px solid rgba(76, 141, 246, .35); background: rgba(76, 141, 246, .08); margin: 16px 0; }
.d-callout > svg { color: #9dbdf8; flex: none; margin-top: 2px; }
.d-callout b { font-weight: 500; font-size: 13.5px; display: block; margin-bottom: 4px; }
.d-callout p { margin: 0 !important; font-size: 13.5px !important; }
.d-callout.warn { border-color: rgba(242, 153, 74, .35); background: rgba(242, 153, 74, .08); }
.d-callout.warn > svg { color: #f4b37a; }
.d-table { border: 1px solid var(--border); border-radius: 10px; overflow: auto; margin: 12px 0; }
.d-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.d-table th { text-align: left; font-weight: 400; color: var(--fg-3); font-size: 12px; padding: 10px 14px; background: var(--panel); }
.d-table td { padding: 11px 14px; border-top: 1px solid var(--border); color: var(--fg-2); vertical-align: top; }
.d-table tr { transition: background .12s; }
.d-table tbody tr:hover { background: var(--panel); }
.d-table .r { text-align: right; }
.d-table td.st { font-family: var(--mono); color: #f07178; }
.scope { font: 11px var(--mono); padding: 2px 7px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--fg-2); background: var(--muted); white-space: nowrap; }
.scope.y { color: var(--yellow); border-color: rgba(250, 214, 0, .4); background: rgba(250, 214, 0, .08); }
.d-checks { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; }
.d-checks li { position: relative; padding-left: 26px; color: var(--fg-2); font-size: 14px; line-height: 1.6; }
.d-checks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px; border-left: 2px solid var(--yellow); border-bottom: 2px solid var(--yellow); transform: rotate(-45deg); }
.d-helpful { display: flex; align-items: center; gap: 8px; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; }
.d-helpful .grow { flex: 1; }
.d-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.d-pn a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none !important; transition: border-color .15s, transform .2s var(--ease); }
.d-pn a:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.d-pn a.r { text-align: right; }
.d-pn .dim { font-size: 12px; }
.d-pn b { font-weight: 500; font-size: 14px; color: var(--fg); }
.d-toc { position: sticky; top: 104px; align-self: start; padding: 40px 20px; font-size: 12.5px; display: flex; flex-direction: column; }
.d-toc a, .d-toc-act button { padding: 5px 0 5px 12px; color: var(--fg-3); border-left: 1px solid var(--border); transition: color .15s, border-color .15s; text-align: left; font-size: 12.5px; }
.d-toc a:hover, .d-toc-act button:hover { color: var(--fg); }
.d-toc a.on { color: var(--fg); border-color: var(--yellow); }
.d-toc-act { margin-top: 18px; display: flex; flex-direction: column; }
.d-toc-act a, .d-toc-act button { border: 0 !important; padding-left: 0 !important; display: flex; align-items: center; gap: 7px; }
.d-url { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); margin-bottom: 18px; }
.d-url code { background: none !important; border: 0 !important; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mth { font: 500 11px var(--mono); }
.d-url .mth { padding: 2px 7px; border-radius: 5px; border: 1px solid; }
.d-params { display: flex; flex-direction: column; }
.d-param { padding: 14px 0; border-bottom: 1px solid var(--border); }
.d-param > div:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.d-param code.n { background: none !important; border: 0 !important; padding: 0 !important; font-size: 13px !important; }
.d-param .t { font: 11.5px var(--mono); color: var(--fg-3); }
.d-param .req { font-size: 11px; color: var(--yellow); border: 1px solid rgba(250, 214, 0, .4); background: rgba(250, 214, 0, .08); border-radius: 5px; padding: 0 6px; }
.d-param p { margin: 6px 0 0 !important; font-size: 13.5px !important; }
.d-param .def { font-size: 12px; margin-top: 6px; }
.d-aside { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 0; }
.d-aside .d-code { margin: 0 0 12px; }
.d-aside .d-pre { max-height: 380px; }
.d-note { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); font-size: 12.5px; color: var(--fg-2); line-height: 1.6; }
.d-note > svg { color: var(--yellow); flex: none; margin-top: 3px; }
.d-note a { color: var(--fg); }
.anchor { display: block; position: relative; top: -140px; visibility: hidden; height: 0; }
.d-log section { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 28px 0; border-top: 1px solid var(--border); }
.d-log h2 { margin: 0 0 10px !important; border: 0 !important; padding: 0 !important; font-size: 18px !important; }
.d-log .dt { font-size: 12px; padding-top: 4px; }
@media (max-width: 1200px) { .d-body { grid-template-columns: 230px minmax(0, 1fr); } .d-toc { display: none; } .d-main.api { grid-template-columns: 1fr; } .d-aside { position: static; } }
@media (max-width: 820px) {
  .d-body, .d-body:has(.d-main.api) { grid-template-columns: 1fr; }
  .d-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); display: flex; overflow-x: auto; gap: 4px; padding: 10px 12px; }
  .d-side .d-grp { display: none; }
  .d-side a { white-space: nowrap; }
  .d-main { padding: 28px 18px 60px; }
  .d-cards.three { grid-template-columns: 1fr; }
  .d-top { grid-template-columns: auto 1fr auto; } .d-badge, .hide-sm, .d-search kbd { display: none; }
  .d-log section { grid-template-columns: 1fr; gap: 6px; }
  .d-art h1 { font-size: 28px; }
}
.d-pre .tk-s { color: #fad600; } .d-pre .tk-k { color: #c792ea; } .d-pre .tk-c { color: var(--fg-3); } .d-pre .tk-p { color: #82aaff; } .d-pre .tk-n { color: #f78c6c; }
.ab img { display: block; }
.d-code-h button[data-lang] { display: inline-flex; align-items: center; gap: 6px; }
.d-card .ab img { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- light theme (Figma Color/Light) */
:root[data-theme="light"] {
  --bg: #ffffff; --bg-2: #f6f4f1; --panel: #ffffff; --surface: #ffffff; --muted: #f1eeea; --active: #e8e4de; --hover: #eeebe6;
  --border: #e9e5e0; --border-strong: #d8d3cd; --border-soft: rgba(31,29,30,.05); --line: rgba(31,29,30,.08);
  --fg: #1f1d1e; --fg-2: #67625f; --fg-3: #9a9592; --fg-4: #c5c0bc; --fg-soft: #3b3738; --yellow-ink: #1f1d1e;
  --green: #11743f; --green-2: #11743f; --red: #c2362b; --blue: #2453c2; --orange: #9c5a00; --amber: #876800;
  --code-bg: #1f1d1e; --code-fg: #edeae6; --glass: rgba(255,255,255,.88); --shadow: rgba(33,31,32,.14); --overlay: rgba(33,31,32,.32);
  color-scheme: light;
}
:root[data-theme="light"] body { background: var(--bg-2); }
:root[data-theme="light"] .panel, :root[data-theme="light"] .main .panel { background: var(--bg); }
:root[data-theme="light"] .btn-secondary { box-shadow: 0 1px 2px rgba(33,31,32,.05); }
:root[data-theme="light"] .modal, :root[data-theme="light"] .menu, :root[data-theme="light"] .popover, :root[data-theme="light"] .toast, :root[data-theme="light"] .drawer { box-shadow: 0 18px 50px rgba(33,31,32,.16); }
:root[data-theme="light"] .badge.yellow, :root[data-theme="light"] .scope.y, :root[data-theme="light"] .d-param .req { color: #8c6f00; }
:root[data-theme="light"] .banner { color: #2a62d6; }
:root[data-theme="light"] .banner.ok { color: #16804a; }
:root[data-theme="light"] .banner.warn { color: #a3620a; }
:root[data-theme="light"] .d-callout > svg, :root[data-theme="light"] .d-pills .p.blue { color: #2a62d6; }
:root[data-theme="light"] .d-pills .p.green { color: #16804a; }
:root[data-theme="light"] .d-art a:not(.d-card):not(.d-chip) { text-decoration-color: rgba(140,111,0,.6); }
:root[data-theme="light"] .pick.on { background: rgba(250,214,0,.12); }
:root[data-theme="light"] *::-webkit-scrollbar-thumb { background: #d4d0cb; background-clip: padding-box; border: 3px solid transparent; }
:root[data-theme="light"] .preview-frame { box-shadow: 0 0 0 1px var(--border); }
html.theme-anim, html.theme-anim * { transition: background-color .25s ease, border-color .25s ease, color .2s ease !important; }

/* theme switch (sidebar foot) */
.side-foot { display: flex; align-items: center; gap: 8px; padding: 8px 6px 2px; border-top: 1px solid var(--border); margin-top: 8px; }
.side-foot .who { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; font-size: 12.5px; }
.side-foot .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-sw { display: inline-flex; padding: 2px; gap: 1px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); flex: none; }
.theme-sw button { width: 24px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--fg-3); transition: background .15s, color .15s; }
.theme-sw button:hover { color: var(--fg); }
.theme-sw button.on { background: var(--active); color: var(--fg); }
.bulk-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; margin-bottom: 10px; border-radius: 10px; border: 1px solid rgba(250,214,0,.4); background: rgba(250,214,0,.08); animation: rise .25s var(--ease); font-size: 13px; }
.cb { width: 14px; height: 14px; accent-color: var(--yellow); cursor: pointer; }
.t tbody tr.sel { background: rgba(250,214,0,.06); }
:root:not([data-theme="light"]) img[src$="/assets/logo.svg"] { content: url("/assets/logo-dark.svg"); }
:root[data-theme="light"] img[src*="/assets/clients/"]:not([src$="claude.svg"]) { filter: invert(1) brightness(.25); }
.tpl-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
.tpl-folders { display: flex; flex-direction: column; gap: 1px; position: sticky; top: 12px; align-self: start; }
.tf-h { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; padding: 4px 8px 8px; }
.tf { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--fg-2); text-align: left; transition: background .12s, color .12s; }
.tf:hover { background: var(--hover); color: var(--fg); }
.tf.on { background: var(--active); color: var(--fg); }
.tf .tf-more { width: 20px; height: 20px; opacity: 0; transition: opacity .12s; }
.tf:hover .tf-more, .tf.on .tf-more { opacity: 1; }
@media (max-width: 900px) { .tpl-layout { grid-template-columns: 1fr; } .tpl-folders { position: static; flex-direction: row; overflow-x: auto; } .tf-h { display: none; } .tf { flex: none; } }
.checks { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; animation: rise .3s var(--ease); }
.checks.has { border-color: rgba(242,153,74,.4); }
.checks.pass { border-color: rgba(63,166,114,.4); }
.checks-h { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.checks-h b { font-weight: 500; }
.checks.has .checks-h svg { color: var(--orange); } .checks.pass .checks-h svg { color: var(--green-2); }
.chk { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; }
.chk > svg { flex: none; margin-top: 2px; }
.chk.ok > svg { color: var(--green-2); } .chk.warn > svg { color: var(--orange); } .chk.error > svg { color: var(--red); }
.chk div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chk b { font-weight: 500; }
.chk span { color: var(--fg-2); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- inbox (Figma 12.3) */
.inbox { display: grid; grid-template-columns: 210px 340px minmax(0, 1fr); height: 100%; min-height: calc(100vh - 60px); }
.ib-side { border-right: 1px solid var(--border); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.ib-mbox { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-weight: 500; margin-bottom: 10px; text-align: left; }
.ib-f { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 6px; color: var(--fg-2); text-align: left; width: 100%; transition: background .12s, color .12s; }
.ib-f:hover { background: var(--hover); color: var(--fg); }
.ib-f.on { background: var(--active); color: var(--fg); }
.ib-n { font-size: 11px; font-weight: 600; background: var(--yellow); color: var(--yellow-ink); border-radius: 9px; padding: 0 6px; line-height: 17px; }
.ib-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 10px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; }
.ib-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; display: inline-block; }
.ib-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.ib-search { position: relative; display: flex; align-items: center; gap: 6px; padding: 10px; border-bottom: 1px solid var(--border); }
.ib-search .lead { position: absolute; left: 20px; color: var(--fg-3); }
.ib-search .input { padding-left: 30px; }
.ib-threads { overflow-y: auto; flex: 1; }
.ib-t { display: block; width: 100%; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); position: relative; transition: background .12s; }
.ib-t:hover { background: var(--hover); }
.ib-t.on { background: var(--active); }
.ib-t.unread::before { content: ""; position: absolute; left: 5px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.ib-t .who { font-weight: 500; }
.ib-t.unread .who, .ib-t.unread .subj { color: var(--fg); font-weight: 600; }
.ib-t .when { font-size: 12px; }
.ib-t .subj { margin-top: 3px; color: var(--fg); font-size: 13px; }
.ib-t .snip { margin-top: 2px; color: var(--fg-3); font-size: 12.5px; }
.ib-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface); color: var(--fg-2); }
.ib-label i { width: 6px; height: 6px; border-radius: 2px; background: var(--c); }
.ib-needs { font-size: 11px; padding: 1px 7px; border-radius: 5px; color: var(--orange); border: 1px solid rgba(242,153,74,.35); background: rgba(242,153,74,.08); }
.ib-none { padding: 30px 16px; }
.ib-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ib-load { display: grid; place-items: center; height: 200px; color: var(--fg-3); }
.ib-head { display: flex; align-items: flex-start; gap: 4px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.ib-head h2 { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.ib-msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.ib-m { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--panel); animation: rise .3s var(--ease) both; }
.ib-m.out { border-color: rgba(250,214,0,.3); }
.ib-m b { font-weight: 500; }
.ib-body { margin-top: 10px; }
.ib-body iframe { width: 100%; height: 160px; border: 0; border-radius: 8px; background: #fff; display: block; }
.ib-text { white-space: pre-wrap; font-size: 14px; line-height: 1.6; color: var(--fg-soft); overflow-wrap: anywhere; }
.ib-atts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ib-att { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; }
.ib-reply { border-top: 1px solid var(--border); padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.ib-reply .textarea { min-height: 90px; resize: vertical; }
.kbd { font-family: var(--mono); font-size: 11px; }
.inbox-empty { padding: 10px 0 0; }
.inbox-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-top: 1px solid var(--border); }
.inbox-steps div { padding: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.inbox-steps svg { color: var(--yellow); }
.inbox-steps b { font-weight: 500; }
.content:has(.inbox) { padding: 0; overflow: hidden; }
@media (max-width: 1100px) { .inbox { grid-template-columns: 180px 280px minmax(0, 1fr); } }
@media (max-width: 820px) { .inbox { grid-template-columns: 1fr; } .ib-side { display: none; } .ib-list { max-height: 40vh; } .inbox-steps { grid-template-columns: 1fr; } }
.kbd { white-space: nowrap; }

/* ---------------------------------------------------------------- automations (Figma 11.x) */
.auto { display: flex; flex-direction: column; height: 100%; min-height: calc(100vh - 60px); }
.auto-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.auto-top .name-input { font-size: 15px; font-weight: 500; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; color: var(--fg); outline: none; }
.auto-top .name-input:hover, .auto-top .name-input:focus { border-color: var(--border); }
.ul-tabs.mini { border: 0; margin: 0 0 0 10px; gap: 4px; }
.ul-tabs.mini .ul-tab { padding: 5px 10px; border-radius: 6px; }
.ul-tabs.mini .ul-tab.on { background: var(--active); }
.ul-tabs.mini .ul-tab.on::after { display: none; }
.auto-main { flex: 1; display: grid; grid-template-columns: 190px minmax(0, 1fr) 320px; min-height: 0; }
.auto-palette { border-right: 1px solid var(--border); padding: 12px 8px; overflow-y: auto; }
.ap-h { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; padding: 2px 8px 8px; }
.ap-item { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 8px; border-radius: 7px; color: var(--fg-2); text-align: left; transition: background .12s, color .12s; }
.ap-item:hover { background: var(--hover); color: var(--fg); }
.auto-canvas { overflow: auto; background: radial-gradient(circle, var(--border) 1px, transparent 1px) 0 0 / 18px 18px, var(--bg-2); padding: 34px 24px 80px; }
.flow { display: flex; flex-direction: column; align-items: center; min-width: max-content; margin: 0 auto; }
.node { display: flex; align-items: center; gap: 10px; width: 290px; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border); background: var(--panel); text-align: left; box-shadow: 0 1px 2px rgba(0,0,0,.15); transition: border-color .15s, box-shadow .15s, transform .15s var(--ease); animation: rise .3s var(--ease) both; }
.node:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.node.on { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(250,214,0,.15); }
.node .ni { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--muted); border: 1px solid var(--border); flex: none; color: var(--fg-2); }
.node.trig .ni, .node.n-send .ni { color: var(--yellow); }
.node.n-condition .ni { color: var(--blue); } .node.n-wait .ni { color: var(--orange); } .node.n-end .ni { color: var(--fg-3); }
.node .nt { display: flex; flex-direction: column; min-width: 0; }
.node .nk { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; }
.node .nv { font-size: 13px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.warn-t { color: var(--orange); }
.conn { width: 1px; height: 22px; background: var(--border-strong); }
.plus { width: 22px; height: 22px; border-radius: 50%; border: 1px dashed var(--border-strong); background: var(--panel); display: grid; place-items: center; color: var(--fg-3); transition: all .15s; }
.plus:hover, .plus.on { border-style: solid; border-color: var(--yellow); color: var(--yellow); transform: scale(1.1); }
.branches { display: flex; gap: 28px; padding-top: 0; position: relative; }
.branches::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 1px; background: var(--border-strong); }
.branch { display: flex; flex-direction: column; align-items: center; min-width: 290px; position: relative; padding-top: 22px; }
.branch::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 22px; background: var(--border-strong); }
.bl { position: absolute; top: 3px; left: calc(50% + 8px); font-size: 11px; font-weight: 500; padding: 0 6px; border-radius: 5px; }
.bl.yes { color: var(--green-2); background: rgba(63,166,114,.12); } .bl.no { color: var(--red); background: rgba(229,72,77,.1); }
.auto-insp { border-left: 1px solid var(--border); padding: 14px 16px; overflow-y: auto; background: var(--panel); }
.insp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 14px; }
.insp-h b { font-weight: 500; }
.insp-sub { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; margin: 18px 0 8px; }
.row-3 { display: flex; gap: 6px; }
.row-3 > * { min-width: 0; }
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 20px 20px; }
.pick-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); min-height: 110px; transition: border-color .15s, transform .2s var(--ease); }
.pick-card:hover { border-color: var(--yellow); transform: translateY(-2px); }
.pick-card b { font-weight: 500; }
.pick-card .muted { font-size: 12.5px; }
.ae-h { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); font-weight: 500; padding: 4px 20px 10px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; padding: 8px 0; position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 22px; bottom: -8px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 13px; height: 13px; border-radius: 50%; margin-top: 3px; border: 2px solid var(--green-2); background: var(--panel); }
.timeline li.failed .dot { border-color: var(--red); background: var(--red); }
.timeline li.waiting .dot, .timeline li.checking .dot { border-color: var(--orange); animation: pulse 1.6s infinite; }
.timeline li.skipped .dot { border-color: var(--fg-3); }
.timeline b { font-weight: 500; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(242,153,74,.15); } }
.ev-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
.content:has(.auto) { padding: 0; }
@media (max-width: 1100px) { .auto-main { grid-template-columns: 160px minmax(0, 1fr); } .auto-insp { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); } .ev-grid, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .auto-main { grid-template-columns: 1fr; } .auto-palette { display: flex; overflow-x: auto; } .ap-h, .auto-palette p { display: none; } .ap-item { width: auto; flex: none; } .grid-4, .pick-grid, .ev-grid { grid-template-columns: 1fr; } }
.auto > .page { width: 100%; }

/* ---------------------------------------------------------------- Billing (Figma 9.11) */
.modal.md { max-width: 560px; }
.bill .page-head { margin-bottom: 18px; }
.bill .ul-tabs { margin-bottom: 20px; }
.bgrid { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 16px; align-items: start; }
.bcol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.bcard { padding: 18px 18px 16px; }
.bcard h3 { margin: 0; font-size: 14.5px; font-weight: 500; }
.bcard .sm, .bill .sm { font-size: 12px; }
.bcard p { margin: 8px 0 0; }
.bc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.bcard .btn-block { margin-top: 14px; }
.bcard .big { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.bcard .big.low { color: var(--orange); }
.bcard .price { font-size: 17px; font-weight: 500; margin-top: 10px; letter-spacing: -0.01em; }
.bcard.rec { border-color: rgba(250, 214, 0, .55); box-shadow: inset 0 0 0 1px rgba(250, 214, 0, .12); }
.kv-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; }
.plan-card .pc-top { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pc-ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--yellow); background: rgba(250, 214, 0, .1); border: 1px solid rgba(250, 214, 0, .3); flex: none; }
.pc-name { font-size: 16px !important; font-weight: 500; }
.plan-card .pc-top p { margin-top: 3px; }
.pc-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.pc-facts > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-facts .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); font-weight: 500; }
.pc-facts b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-facts .dim { font-size: 12px; }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--fg-2); font-size: 12px; white-space: nowrap; }
.usage-big { gap: 8px; margin-top: 12px; align-items: baseline; }
.usage-big b { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.warn-t { color: var(--orange); }
.err-t { color: #f16a6e; }
.pos { color: var(--green-2); }
.meter.fat { height: 8px; margin-top: 12px; }
.meter.thin { height: 4px; margin-top: 0; }
.meter.warn > i { background: var(--orange); }
.meter.err > i { background: #f16a6e; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 64px; margin: 18px 0 6px; }
.bars i { flex: 1; min-width: 2px; background: var(--yellow); border-radius: 2px; transform-origin: bottom; animation: grow-y .6s var(--ease) both; }
.bars i.f { height: 100%; background: transparent; border: 1px dashed var(--border-strong); animation: none; }
.bars.past { height: 56px; }
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--fg-2); font-size: 12.5px; }
.note .ico { flex: none; margin-top: 2px; color: var(--fg-3); }
.lims { margin-top: 8px; }
.lim { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); font-size: 13px; }
.lim:first-child { border-top: 0; }
.lim > span:last-child { text-align: right; white-space: nowrap; }
.inv-rows { margin-top: 10px; display: flex; flex-direction: column; }
.inv-rows > div, .sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.inv-rows .tot, .sum .tot { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px; font-weight: 500; }
.als { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.al { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-3); }
.al.on { color: var(--fg); }
.al.on .ico { color: var(--green-2); }
.bbanner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.bbanner > .ico { flex: none; }
.bbanner .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bbanner b { font-weight: 500; color: var(--fg); font-size: 13px; }
.bbanner span { font-size: 12px; color: var(--fg-2); }
.bbanner .btn { flex: none; }
.bbanner.warn { border-color: rgba(242, 153, 74, .35); background: rgba(242, 153, 74, .1); color: var(--orange); }
.bbanner.err { border-color: rgba(229, 72, 77, .4); background: rgba(229, 72, 77, .12); color: #f16a6e; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.kpis > div { display: flex; flex-direction: column; gap: 3px; }
.kpis .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); font-weight: 500; }
.kpis b { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.packs.sm { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.pack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; color: var(--fg); }
.pack:hover:not([disabled]) { border-color: var(--border-strong); }
.pack.on { border-color: var(--yellow); background: rgba(250, 214, 0, .07); }
.pack b { font-size: 15px; font-weight: 500; }
.pack .dim { font-size: 12px; }
.pack .badge { margin-top: 4px; }
.pack .input.sm { height: 28px; margin-top: 2px; width: 100%; }
.pack[disabled] { opacity: .5; cursor: default; }
.auto-row, .alert-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.alert-opt { margin-top: 8px; }
.auto-row .grow, .alert-opt .grow { display: flex; flex-direction: column; gap: 2px; }
.auto-row b, .alert-opt b { font-weight: 500; font-size: 13px; }
.auto-row .dim, .alert-opt .dim { font-size: 12px; }
.sum { margin-top: 14px; }
.foot-note { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.howto { margin: 10px 0 0; padding-left: 18px; color: var(--fg-2); font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.table-wrap.flat { margin-top: 12px; }
.t td.num, .t .num { font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .bgrid { grid-template-columns: 1fr; } .pc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lim { grid-template-columns: 1fr auto; } .lim .meter { display: none; } .bbanner { flex-wrap: wrap; } .bill-sect { grid-template-columns: 1fr; } }
.modal .pack, .modal .auto-row, .modal .alert-opt { background: var(--panel); }
.bcol > .card { margin: 0; }
@media (max-width: 640px) { .bbanner .grow { flex: 1 1 calc(100% - 40px); } .bill .ul-tabs { overflow-x: auto; scrollbar-width: none; } .bill .ul-tab { white-space: nowrap; flex: none; } .bill .page-head { flex-wrap: wrap; } }

/* ---------------------------------------------------------------- Receiving (Figma 12.1, 12.2) */
.avatar.xs { width: 20px; height: 20px; font-size: 8.5px; border-radius: 5px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; border-radius: 6px; }
.recv-hero { display: flex; gap: 16px; padding: 22px; align-items: flex-start; }
.recv-hero h3 { margin: 2px 0 6px; font-size: 16px; font-weight: 500; }
.recv-hero p { margin: 0; max-width: 620px; font-size: 13px; }
.rh-ico, .rs-ico { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--yellow); flex: none; }
.rs-ico { width: 28px; height: 28px; border-radius: 7px; color: var(--fg-2); }
.recv-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.recv-steps .card { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.recv-steps b { font-weight: 500; margin-top: 8px; }
.recv-steps .muted { font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid2 .section-title { margin-top: 0; }
.recv-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 4px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.recv-facts > div { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; min-width: 0; }
.recv-facts .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-3); font-weight: 500; }
.recv-facts b { font-weight: 500; max-width: 100%; }
.recv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.recv .ul-tab { background: none; border: 0; cursor: pointer; font: inherit; }
.recv-preview { background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.recv-preview iframe { width: 100%; border: 0; display: block; min-height: 160px; background: #fff; }
.recv-atts { display: flex; flex-wrap: wrap; gap: 8px; }
.recv-atts .att { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-width: 220px; max-width: 320px; }
.recv-atts .att .grow { display: flex; flex-direction: column; min-width: 0; }
.recv-atts .att b { font-weight: 500; font-size: 13px; }
.recv-atts .att .dim { font-size: 11.5px; }
.hook-card { overflow: hidden; }
.hook-card .hc-head { padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--border); font-size: 12px; }
.hook-card .code { border: 0; border-radius: 0; margin: 0; }
@media (max-width: 1000px) { .recv-grid { grid-template-columns: 1fr; } .recv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .recv-steps, .grid2 { grid-template-columns: 1fr; } }
.field-err { color: #f16a6e; font-size: 12px; margin-top: 2px; }
.claim-box { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 14px; border: 1px solid rgba(242, 153, 74, .35); background: rgba(242, 153, 74, .08); border-radius: 10px; color: var(--orange); }
.claim-box .grow { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.claim-box b { color: var(--fg); font-weight: 500; }
.claim-box span { color: var(--fg-2); font-size: 12.5px; }
.claim-box .btn { margin-top: 8px; }

/* ---------------------------------------------------------------- SSO, connected apps, OAuth consent (Figma 9.9, 9.10) */
.sso-card { padding: 20px; }
.sso-card h3 { margin: 0; font-size: 14.5px; font-weight: 500; }
.sso-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.sso-grid > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sso-grid .eyebrow { font-size: 12px; color: var(--fg-3); }
.sso-grid .textarea { font-size: 12px; }
.sso-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); margin-top: 16px; }
.sso-row + .sso-row { margin-top: 0; }
.sso-row > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sso-row b { font-weight: 500; }
.sso-row .dim { font-size: 12px; }
.app-av { width: 28px; height: 28px; font-size: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--fg); }
.app-av.lg { width: 40px; height: 40px; font-size: 14px; border-radius: 9px; }
.scope { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; border: 1px solid var(--border); background: var(--active); color: var(--fg-2); }
.scope.w { color: #f2994a; background: rgba(242, 153, 74, .12); border-color: rgba(242, 153, 74, .3); }
tr.revoked td { opacity: .5; }
.consent-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg-2); }
.consent { width: 100%; max-width: 440px; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.consent h1 { font-size: 17px; font-weight: 500; text-align: center; margin: 0; text-wrap: balance; }
.consent-logos { display: flex; align-items: center; justify-content: center; gap: 14px; }
.consent-logos .dots { color: var(--fg-3); letter-spacing: 2px; }
.consent-scopes { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.consent-scopes .eyebrow { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.consent-scopes > div:not(.eyebrow) { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.consent-scopes .ico { color: var(--fg-2); }
.consent-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .sso-grid { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }
.consent-opt { display: flex !important; align-items: flex-start !important; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--fg-2); font-size: 12.5px; cursor: pointer; }
.consent-opt .checkbox { margin-top: 2px; flex: none; }

/* Support chat (dashboard) */
.sc { position: fixed; right: 20px; bottom: 20px; z-index: 900; }
.sc-fab { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--yellow); color: var(--yellow-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px var(--shadow); position: relative; transition: transform .15s; }
.sc-fab:hover { transform: translateY(-1px); }
.sc.on .sc-fab { display: none; }
.sc-dot { position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.sc-panel { position: fixed; right: 20px; bottom: 20px; width: 370px; height: min(560px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px var(--shadow); overflow: hidden; }
.sc-panel[hidden] { display: none; }
.sc-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--border-soft); }
.sc-head > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sc-head b { font-weight: 600; font-size: 14px; }
.sc-head span { font-size: 12px; color: var(--fg-2); }
.sc-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sc-empty { margin: auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--fg-2); font-size: 13px; padding: 0 16px; }
.sc-empty b { color: var(--fg); font-weight: 500; font-size: 15px; }
.sc-av { width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); color: var(--yellow-ink); display: grid; place-items: center; margin-bottom: 4px; }
.sc-day { align-self: center; font-size: 11px; color: var(--fg-3); margin: 6px 0 2px; }
.sc-m { display: flex; flex-direction: column; max-width: 82%; gap: 3px; }
.sc-m.me { align-self: flex-end; align-items: flex-end; }
.sc-m.them { align-self: flex-start; }
.sc-who { font-size: 11.5px; color: var(--fg-2); }
.sc-b { padding: 8px 11px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.sc-m.me .sc-b { background: var(--yellow); color: var(--yellow-ink); border-bottom-right-radius: 4px; }
.sc-m.them .sc-b { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.sc-b a { color: inherit; text-decoration: underline; }
.sc-t { font-size: 10.5px; color: var(--fg-3); }
.sc-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--border-soft); }
.sc-form textarea { flex: 1; resize: none; min-height: 36px; max-height: 140px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-2); color: var(--fg); font: inherit; font-size: 13.5px; line-height: 1.4; outline: none; }
.sc-form textarea:focus { border-color: var(--border-strong); }
.sc-form .btn { height: 36px; width: 38px; padding: 0; justify-content: center; }
@media (max-width: 640px) { .sc { right: 14px; bottom: 14px; } .sc-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; } }
@media print { .sc { display: none; } }

/* Admin → Support */
.sp { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 0; height: calc(100vh - 210px); min-height: 480px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--panel); }
.sp-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.sp-filter { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid var(--border-soft); }
.sp-items { overflow-y: auto; flex: 1; }
.sp-item { display: block; width: 100%; text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border-soft); background: none; border-left: 2px solid transparent; cursor: pointer; color: var(--fg); }
.sp-item:hover { background: var(--hover); }
.sp-item.on { background: var(--active); border-left-color: var(--yellow); }
.sp-item .r1 { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.sp-item .r1 b { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-item .r2 { font-size: 12px; color: var(--fg-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-item.unread .r1 b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); margin-right: 7px; vertical-align: 1px; }
.sp-conv { display: flex; flex-direction: column; min-height: 0; }
.sp-conv .sc-body { background: var(--bg-2); }
.sp-top { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.sp-top .who { flex: 1; min-width: 0; }
.sp-top .who b { font-weight: 500; }
.sp-top .who div { font-size: 12px; color: var(--fg-2); }
.sp-conv .sc-m.me .sc-b { background: var(--surface); color: var(--fg); border: 1px solid var(--border); }
.sp-conv .sc-m.them .sc-b { background: var(--yellow); color: var(--yellow-ink); border: 0; border-bottom-left-radius: 4px; }
.sp-empty { margin: auto; color: var(--fg-2); font-size: 13px; text-align: center; padding: 20px; }
@media (max-width: 860px) { .sp { grid-template-columns: 1fr; height: auto; } .sp-list { border-right: 0; max-height: 260px; } .sp-conv { height: 70vh; } }

/* Sidebar account (Figma: App/Sidebar · Account) */
.side-foot { border-top: 0; padding: 6px 4px 2px 8px; }
.side-foot .avatar.me { width: 18px; height: 18px; border-radius: 5px; font-size: 9px; background: var(--yellow); color: #1f1d1e; flex: none; }
.side-foot .who-t { display: flex; flex-direction: column; min-width: 0; text-align: left; line-height: 1.25; }
.side-foot .who-t > span { font-size: 12px; font-weight: 500; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who-t small { font-size: 11px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Settings · Usage and SMTP (Figma 9.1 / 9.4) */
.u-card { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 24px; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.u-card + .u-card { margin-top: 12px; }
.u-side h3 { margin: 0; font-size: 14px; font-weight: 500; }
.u-side p { margin: 6px 0 0; font-size: 13px; color: var(--fg-2); line-height: 1.45; }
.u-plan { margin: 10px 0 8px; }
.u-rows { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.u-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.u-val { color: var(--fg); font-variant-numeric: tabular-nums; }
.u-bar { height: 4px; border-radius: 4px; background: var(--muted); margin-top: 8px; overflow: hidden; }
.u-bar i { display: block; height: 100%; background: var(--yellow); border-radius: inherit; }
.u-bar.over i { background: var(--red); }
.btn-ink { background: var(--fg); color: var(--bg); }
.btn-ink:hover:not(:disabled) { opacity: .88; }
.copy-field { position: relative; display: flex; align-items: center; }
.copy-field .input { padding-right: 36px; }
.copy-field .ibtn { position: absolute; right: 2px; }
@media (max-width: 760px) { .u-card { grid-template-columns: 1fr; gap: 14px; } }

/* Docs (Figma: Marketing · Docs): ink Dashboard button, theme switch at the foot of the sidebar */
.d-dash { background: var(--fg); color: var(--bg) !important; border-radius: 999px; padding: 6px 14px; }
@media (min-width: 901px) { .d-side { display: flex; flex-direction: column; } }
.d-theme { margin-top: auto; padding: 16px 8px 0; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--fg-2); position: sticky; bottom: 0; background: var(--bg); }
.d-theme-top { display: none; }
@media (max-width: 900px) { .d-theme { display: none; } .d-theme-top { display: inline-flex; } }

/* Phones (dashboard) */
.side-scrim { display: none; }
@media (max-width: 900px) {
  .side-scrim.on { display: block; position: fixed; inset: 0; z-index: 39; background: var(--overlay); animation: fadeIn .15s ease-out; }
  .side.open { box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .topbar #side-toggle { margin-right: 4px; }
}
@media (max-width: 640px) {
  .filters > .input-wrap.search { flex: 1 1 100%; }
  .filters > *:not(.search) { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .filters .select-btn, .filters .input { width: 100%; }
  .ul-tabs { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ul-tabs::-webkit-scrollbar { display: none; }
  .ul-tab { white-space: nowrap; flex: none; }
  .topbar #feedback-btn span, .topbar .hide-sm { display: none; }
  /* docs header */
  .d-top { grid-template-columns: auto 1fr auto; gap: 10px; padding: 0 14px; }
  .d-top .d-badge { display: none; }
  .d-search { justify-self: end; width: 36px; }
  .d-search input { padding: 0; width: 36px; color: transparent; cursor: pointer; }
  .d-search input::placeholder { color: transparent; }
  .d-search kbd { display: none; }
  .d-search .lead { left: 11px; }
  .d-links { gap: 10px; }
  .d-dash { white-space: nowrap; }
  .d-theme-top .theme-sw button { width: 22px; }
  .d-search input:focus { position: fixed; left: 14px; right: 14px; top: 13px; width: auto; color: var(--fg); padding: 0 12px 0 32px; z-index: 30; }
  .d-search input:focus::placeholder { color: var(--fg-3); }
  .d-search:focus-within .lead { position: fixed; left: 25px; top: 23px; z-index: 31; }
}

/* ---------------------------------------------------------------- docs guides rendered from Markdown (content/docs) */
.d-md h3 { font-size: 16px; font-weight: 500; margin: 28px 0 10px; scroll-margin-top: 120px; }
.d-md h4 { font-size: 14.5px; font-weight: 500; margin: 22px 0 8px; scroll-margin-top: 120px; }
.d-md ul { color: var(--fg-2); font-size: 14.5px; line-height: 1.7; padding-left: 20px; margin: 0 0 14px; list-style: disc; }
.d-md ol { list-style: decimal; }
.d-md li > code, .d-md td code, .d-md th code { white-space: nowrap; }
.d-md b { color: var(--fg); font-weight: 500; }
.d-md .d-callout p a { color: var(--fg); }
.d-callout.tip { border-color: rgba(63, 166, 114, .35); background: rgba(63, 166, 114, .08); }
.d-callout.tip > svg { color: #6fcf97; }
.d-table { overflow-x: auto; margin: 14px 0 18px; border: 1px solid var(--border); border-radius: 10px; }
.d-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.55; }
.d-table th { text-align: left; font-weight: 500; color: var(--fg); background: var(--bg-2); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.d-table td { color: var(--fg-2); padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.d-table tr:last-child td { border-bottom: 0; }
.d-table td code { font-size: 12px; }
@media (max-width: 640px) { .d-md li > code, .d-md td code { white-space: normal; word-break: break-word; } .d-table table { font-size: 12.5px; } .d-table th, .d-table td { padding: 8px 10px; } }
:root[data-theme="light"] .d-callout.tip > svg { color: #1f7a4d; }
/* the guide list is long: scroll the sidebar instead of squeezing its links under the theme switch */
@media (min-width: 901px) { .d-side { padding-bottom: 0; } .d-side > * { flex-shrink: 0; } .d-theme { padding-bottom: 16px; margin-top: auto; } }
/* sidebar setup checklist (until key, first email and verified domain) */
.setup-card { display: flex; flex-direction: column; gap: 7px; margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(250, 214, 0, .55); background: rgba(250, 214, 0, .08); font-size: 12px; color: var(--fg); }
.setup-card:hover { background: rgba(250, 214, 0, .14); }
.setup-card .row { display: flex; align-items: center; justify-content: space-between; }
.setup-card b { font-weight: 500; font-size: 12.5px; }
.setup-card .n, .setup-card .next { color: var(--fg-2); }
.setup-card .bar { height: 4px; border-radius: 4px; background: var(--muted); overflow: hidden; }
.setup-card .bar i { display: block; height: 100%; background: #fad600; border-radius: 4px; }
/* onboarding: every step card spans the column */
.steps { align-items: stretch; } .steps > .step { width: 100%; } .steps .step-card { min-width: 0; }
table.t.onb-recs { table-layout: fixed; width: 100%; }
.onb-recs th:nth-child(1), .onb-recs td:nth-child(1) { width: 58px; }
.onb-recs th:nth-child(2), .onb-recs td:nth-child(2) { width: 30%; }
.onb-recs th:nth-child(4), .onb-recs td:nth-child(4) { width: 96px; }
.onb-recs .copyable { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; text-align: left; }

/* Brand kit (Settings → Brand) */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 24px; align-items: start; }
.brand-form { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.brand-form .section-title { font-size: 14px; margin-bottom: 12px; }
.brand-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.brand-two .field { margin: 0; }
.brand-form .section-title + .brand-two { margin-top: 0; }
.brand-colour { display: flex; gap: 8px; align-items: center; }
.brand-colour input[type=color] { width: 34px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 7px; background: none; cursor: pointer; flex-shrink: 0; }
.brand-colour input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
.brand-colour input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.brand-logo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand-logo-box { min-width: 140px; height: 64px; padding: 0 16px; border: 1px dashed var(--border-strong); border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; }
.brand-logo-box img { max-height: 40px; max-width: 200px; }
.brand-logo-box .dim { color: #8a8f98; font-size: 12.5px; }
.brand-preview { position: sticky; top: 16px; }
.brand-frame { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; height: 660px; background: #fff; position: relative; }
.brand-frame iframe { width: 640px; height: 1100px; border: 0; display: block; transform-origin: 0 0; position: absolute; left: 0; top: 0; }
@media (max-width: 1100px) { .brand-grid { grid-template-columns: 1fr; } .brand-preview { position: static; } }
@media (max-width: 600px) { .brand-two { grid-template-columns: 1fr; } }

/* Template gallery (Create template) */
.modal.tpl-gallery { max-width: 1080px; width: calc(100vw - 32px); }
.modal.tpl-gallery .modal-body { max-height: calc(100vh - 190px); overflow: auto; }
.tg-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tg-note { font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.tg-note a { color: var(--fg); text-decoration: underline; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tg-card { text-align: left; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); padding: 0; display: flex; flex-direction: column; transition: border-color .12s, box-shadow .12s; }
.tg-card:hover { border-color: var(--border-strong); }
.tg-card.on { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); }
.tg-thumb { height: 220px; overflow: hidden; position: relative; pointer-events: none; background: #f4f4f5; }
.tg-thumb iframe { width: 277.78%; height: 1000px; border: 0; transform: scale(.36); transform-origin: 0 0; position: absolute; left: 0; top: 0; }
.tg-meta { padding: 10px 12px 12px; border-top: 1px solid var(--border); }
.tg-name { font-weight: 500; font-size: 13.5px; }
.tg-desc { color: var(--fg-3); font-size: 12px; line-height: 1.45; margin-top: 2px; }

/* Editor canvas: new email blocks */
.blk .eyebrow-blk { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.blk .logo-blk { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.blk .callout-blk { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.6; }
.blk .otp-blk { display: inline-block; font-family: var(--mono, monospace); font-size: 24px; font-weight: 700; letter-spacing: .22em; background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 10px; padding: 10px 18px; }
.blk .rows-blk > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.blk .rows-blk > .tot { border-bottom: 0; font-weight: 600; padding-top: 10px; }
.blk.zone-out { opacity: .75; border-left: 2px dashed var(--border-strong); padding-left: 12px; position: relative; }
.blk.zone-out::before { content: attr(data-zone); position: absolute; right: 0; top: 0; font-size: 10.5px; color: var(--fg-3); letter-spacing: .02em; }
.rows-edit { display: grid; grid-template-columns: 1fr 1fr 82px 24px; gap: 5px; margin-bottom: 6px; align-items: center; }
.rows-edit .input, .rows-edit .select-btn { height: 28px; font-size: 12px; padding: 0 7px; }
.blk .eyebrow-blk .var-chip { text-transform: none; letter-spacing: 0; }
