/* Echoo dashboard: pure black, white text, no other colours. Cairo for every word, icons before text.
   Logical properties everywhere (inline-start/end), so the same sheet serves right-to-left Arabic and left-to-right English.
   Cairo (SIL Open Font License 1.1) is served from /vendor/fonts: no request ever leaves for a font host. */

@font-face {
  font-family: "Cairo"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url("/vendor/fonts/cairo-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Cairo"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url("/vendor/fonts/cairo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #0a0a12;
  --surface: #101019;
  --surface-2: #13131d;
  --surface-3: #181824;
  --surface-4: #1e1e2c;
  --line: #23233a;
  --line-2: #2d2d46;
  --line-3: #40405e;
  --fg: #f4f4fa;
  --fg-2: #d6d6e6;
  --muted: #8b8ba7;
  --muted-2: #6e6e8a;
  --r: 13px;
  --r-lg: 20px;
  --side-w: 272px;
  --font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
  --brand-grad: linear-gradient(135deg, #7a56ff, #f0509f 58%, #ff8f3f);
  --brand-text: #c3a8ff;
}

/* ───────── base ───────── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; } /* no blue flash of the phone browser when something is tapped (pressed states below show it instead) */
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ol, ul { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
button, a, input, select, textarea, label { touch-action: manipulation; }
a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }
::selection { background: #3a3a4f; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; vertical-align: middle; }
[dir="rtl"] .icon.dir { transform: scaleX(-1); }
code, .code { direction: ltr; unicode-bidi: embed; font-family: ui-monospace, Consolas, monospace; font-size: .84em; background: var(--surface-3); padding: 2px 7px; border-radius: 6px; word-break: break-all; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.vstack { display: flex; flex-direction: column; gap: 18px; }
.vstack > :empty { display: none; }
.vstack > div > .card { margin: 0; }
.en { color: var(--fg); font-weight: 800; direction: ltr; unicode-bidi: isolate; }
bdi { unicode-bidi: isolate; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid var(--bg); }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ───────── shell: a menu on the right (a bar at the bottom on phones) ───────── */
#app { height: 100%; }
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100vh; }
.side { height: 100vh; border-inline-end: 1px solid #1c1c2c; padding: 24px 16px 20px; display: flex; flex-direction: column; background: var(--bg); overflow-y: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.side .brand { padding: 0 10px 28px; }
.brand-word { font-weight: 900; font-size: 1.35rem; letter-spacing: -.02em; line-height: 1; }
.logo-tile { display: inline-grid; place-items: center; background: #fff; color: #000; flex: none; }
.logo-tile svg { display: block; }
.menu { display: flex; flex-direction: column; gap: 4px; }
.item { position: relative; height: 46px; border-radius: 12px; display: flex; align-items: center; gap: 13px; padding: 0 14px; color: #a3a3ba; font-weight: 700; text-decoration: none; transition: background .15s, color .15s; }
.item:hover { color: var(--fg); text-decoration: none; background: #0d0d18; }
.item[aria-current="page"] { background: var(--surface-3); color: var(--fg); }
.item[aria-current="page"]::before { content: ""; position: absolute; inset-inline-start: -16px; top: 11px; bottom: 11px; width: 3px; border-radius: 3px; background: #fff; }
.item .count { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #fff; color: #000; font-size: .75rem; font-weight: 900; display: grid; place-items: center; line-height: 1; }
.me { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 14px 10px 0; border-top: 1px solid #1c1c2c; }
.me-text { min-width: 0; }
.me-name { font-weight: 800; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-mail { color: var(--muted-2); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .btn { margin-inline-start: auto; }
.mtop { display: none; }
.content-col { height: 100vh; overflow-y: auto; min-width: 0; }
.demo-strip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; background: var(--surface-3); color: var(--fg-2); border-bottom: 1px solid var(--line); font-size: .88rem; }
.page { padding: 30px 44px 80px; max-width: 1120px; width: 100%; margin-inline: auto; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; min-height: 44px; }
.page-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-head h1 { font-size: 1.7rem; font-weight: 900; line-height: 1.3; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.sec { margin-top: 46px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sec-h h2 { font-size: 1.25rem; font-weight: 900; }

/* ───────── buttons ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 1px solid #2f2f44; border-radius: 12px; background: var(--surface-2); color: var(--fg); font-weight: 800; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--surface-4); border-color: #44445a; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary, .btn-success { background: #fff; border-color: #fff; color: #000; }
.btn-primary:hover, .btn-success:hover { background: #e8e8e8; border-color: #e8e8e8; }
.btn-danger { border-color: #fff; background: transparent; }
.btn-danger:hover { background: #fff; color: #000; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--fg-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--fg); border-color: transparent; }
.btn-sm { height: 36px; padding: 0 14px; font-size: .88rem; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 1.05rem; border-radius: 13px; }
.btn-icon { width: 40px; padding: 0; border-color: #262639; color: #a3a3ba; background: transparent; }
.btn-icon:hover { color: var(--fg); }
.btn-icon.btn-sm { width: 36px; }
.btn-icon.btn-lg { width: 54px; }
.btn-block { width: 100%; }

/* ───────── cards, pills, small parts ───────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 24px 26px 0; flex-wrap: wrap; }
.card-title { display: flex; align-items: center; gap: 12px; font-size: 1.2rem; font-weight: 800; line-height: 1.4; }
.ci { width: 40px; height: 40px; border-radius: 12px; border: 1px solid #2a2a3e; display: grid; place-items: center; flex: none; color: #e5e5e5; }
.card-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 24px 26px 26px; }
.card-head + .card-body { padding-top: 20px; }
.card.is-waiting { border-color: var(--line-3); background: linear-gradient(180deg, #11111d, #0a0a14); }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px; border: 1px solid #333348; color: var(--fg-2); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pill-success, .pill-warning, .pill-danger { border-color: #fff; color: #fff; }
.pill-count { min-width: 26px; justify-content: center; padding: 0 8px; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; flex: none; }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid #333348; background: #161624; color: #fff; font-weight: 800; flex: none; line-height: 1; }
.pmark { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; border: 1px solid #2c2c40; background: #11111d; color: #fff; flex: none; }
.empty { text-align: center; padding: 34px 10px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; border: 1px solid #2a2a3e; display: grid; place-items: center; color: #8a8aa6; }
.empty h3 { font-size: 1.02rem; font-weight: 700; color: var(--fg-2); }
.skel-wrap { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.skel { height: 14px; border-radius: 7px; background: linear-gradient(90deg, #12121e, #1c1c2c, #12121e); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid #333348; border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 8px; border-radius: 99px; background: #1a1a29; overflow: hidden; }
.progress > span { display: block; height: 100%; background: #fff; }
.callout { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); }
.callout > .icon { color: #d4d4d4; }
.callout strong { font-weight: 700; }
.callout p { color: var(--fg-2); font-size: .92rem; }
.callout-warning, .callout-danger { border-color: #fff; }
.callout + .callout, .callout + .card, .card + .callout { margin-top: 14px; }
.link { color: var(--fg-2); display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.link:hover { color: var(--fg); text-decoration: underline; }
.hint { color: var(--muted); font-size: .86rem; margin-top: 8px; display: flex; gap: 8px; align-items: center; }
.counter { color: var(--muted-2); font-size: .78rem; font-variant-numeric: tabular-nums; direction: ltr; }
.counter.over { color: #fff; font-weight: 800; }

/* ───────── forms ───────── */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--fg-2); justify-content: space-between; }
.field-label .icon { color: var(--muted); }
.field-error { color: #fff; font-size: .85rem; font-weight: 600; }
.input, .select, .textarea { width: 100%; min-height: 52px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--fg); padding: 0 16px; transition: border-color .15s; }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #fff; }
.input:disabled, .textarea:disabled, .select:disabled { opacity: .6; }
.textarea { padding: 13px 16px; line-height: 1.8; resize: vertical; min-height: 110px; color: var(--fg-2); }
.select { appearance: none; cursor: pointer; padding-inline-end: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; }
[dir="ltr"] .select { background-position: right 14px center; }
.select-sm { min-height: 44px; width: auto; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input-icon .input { padding-inline-start: 46px; }
html[dir="rtl"] .input-icon.has-end .input { padding: 0 16px 0 52px; }
html[dir="ltr"] .input-icon.has-end .input { padding: 0 52px 0 16px; }
.input-icon .input-end { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); border-color: transparent; }
.has-error .input, .has-error .textarea { border-color: #fff; }
.switch { position: relative; display: inline-block; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-track { display: block; width: 50px; height: 28px; border-radius: 999px; background: #262639; position: relative; transition: background .18s; }
.switch-thumb { position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #8a8aa6; transition: inset-inline-start .18s, background .18s; }
.switch input:checked + .switch-track { background: #fff; }
.switch input:checked + .switch-track .switch-thumb { inset-inline-start: 25px; background: #000; }
.switch input:focus-visible + .switch-track { outline: 2px solid #fff; outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch-track { opacity: .5; }
.switch-row, .setrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid #1f1f30; }
.card-body > .switch-row:first-child, .card-body > .setrow:first-child { border-top: 0; padding-top: 0; }
.switch-row .row, .setrow-t { font-weight: 800; }
.setrow-s { color: #8a8aa6; font-size: .88rem; margin-top: 1px; }
.copyrow { display: flex; align-items: center; gap: 8px; }
.copyrow .input { flex: 1; min-width: 0; direction: ltr; text-align: left; font-size: .86rem; }
.agent-steps { margin: 0; padding-inline-start: 22px; color: #8a8aa6; font-size: .9rem; line-height: 1.7; }
.seg { display: inline-flex; padding: 4px; border: 1px solid #262639; border-radius: 13px; background: var(--surface); flex-wrap: nowrap; max-width: 100%; overflow-x: auto; }
.seg-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border: 0; border-radius: 10px; background: transparent; color: #8a8aa6; font-weight: 700; white-space: nowrap; }
.seg-item.is-on { background: #fff; color: #000; }
.seg-item:disabled { cursor: not-allowed; opacity: .6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r); min-height: 56px; align-items: center; cursor: text; }
.chips:focus-within { border-color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding-inline: 14px 8px; border-radius: 999px; background: #161624; border: 1px solid #2f2f44; font-weight: 700; }
.chip-x { width: 20px; height: 20px; border: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; color: #8a8aa6; background: transparent; }
.chip-x:hover { color: #fff; background: #262639; }
.chips input { flex: 1; min-width: 120px; border: 0; background: transparent; outline: none; color: var(--fg); padding: 4px 6px; }
.chips input::placeholder { color: var(--muted-2); }

/* ───────── sign-in ───────── */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth-top { display: flex; justify-content: space-between; align-items: center; padding: 22px 32px; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 24px 40px; }
.auth-col { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: stretch; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 40px; }
.auth-hero { display: flex; flex-direction: column; align-items: center; margin-bottom: 34px; }
.auth-logos { display: flex; align-items: center; justify-content: center; }
.auth-plats { display: flex; gap: 16px; }
.plat-mark { width: 56px; height: 56px; border: 1px solid #333348; border-radius: 14px; display: grid; place-items: center; color: #d4d4d4; font-size: .66rem; font-weight: 700; overflow: hidden; }
.plat-mark .plat-img { display: none; }
.plat-mark.has-logo { background: #fff; border-color: #fff; }
.plat-mark.has-logo .plat-img { display: block; width: 58%; height: 58%; object-fit: contain; }
.plat-mark.has-logo .plat-name { display: none; }
.auth-link { display: flex; align-items: center; width: 52px; color: #fff; }
.auth-link i { flex: 1; border-top: 1px dashed #525269; }
.auth-link span { width: 32px; height: 32px; border: 1px solid #525269; border-radius: 50%; display: grid; place-items: center; flex: none; }
.auth-about { margin: 26px 0 6px; font-size: .78rem; color: #73738d; font-weight: 700; letter-spacing: .02em; }
.auth-line { margin: 0; text-align: center; font-size: 1.12rem; font-weight: 700; color: #fff; line-height: 1.6; }
.auth-trust { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.auth-trust li { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; color: #a3a3ba; font-size: .8rem; line-height: 1.5; font-weight: 600; }
.auth-trust .ico { width: 48px; height: 48px; border: 1px solid #262639; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.auth-name { font-size: 1.55rem; font-weight: 900; letter-spacing: -.02em; line-height: 1; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #262639; margin-bottom: 28px; }
.auth-tab { text-align: center; padding: 12px 0 14px; color: #73738d; font-weight: 700; font-size: 1rem; position: relative; background: none; border: 0; }
.auth-tab[aria-selected="true"] { color: #fff; }
.auth-tab[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: #fff; }
.auth-col .field { margin-bottom: 14px; }
.auth-col .input { min-height: 54px; }
.auth-err { border: 1px solid #fff; border-radius: var(--r); padding: 11px 14px; margin-bottom: 14px; display: none; align-items: center; gap: 10px; font-size: .92rem; }
.auth-note { color: var(--fg-2); border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px; text-align: center; }
.auth-foot { display: flex; justify-content: center; gap: 18px; padding: 0 24px 28px; color: #73738d; font-size: .82rem; font-weight: 600; flex-wrap: wrap; }
.auth-foot a { color: #73738d; display: inline-flex; align-items: center; gap: 6px; }
.auth-foot a:hover { color: #fff; }

/* ───────── home ───────── */
.conn { padding: 34px 28px 26px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.vis { display: flex; align-items: center; justify-content: center; width: 100%; }
.box { width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; flex: none; }
.box.dark { background: #11111d; border: 1px solid #2c2c40; color: #fff; }
.box.light { background: #fff; color: #000; }
.pair { display: flex; gap: 12px; }
.link-line { flex: 1; max-width: 210px; min-width: 70px; display: flex; align-items: center; gap: 8px; margin-inline: 14px; }
.link-line::before, .link-line::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, #4a4a61 0 7px, transparent 7px 13px); }
.link-line .ok { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; flex: none; }
.link-line .no { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; color: #fff; display: grid; place-items: center; flex: none; background: var(--bg); }
.status { display: flex; align-items: center; gap: 10px; color: var(--fg-2); font-weight: 700; flex-wrap: wrap; justify-content: center; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #ffffff22; }
.status .m { color: #73738d; font-weight: 600; }
.chips-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.chip-page { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid #2c2c40; border-radius: 999px; font-weight: 700; color: #e5e5e5; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stats > .card { margin: 0; }
.stat { padding: 22px; }
.stat .ci { margin-bottom: 18px; }
.stat-v { font-size: 2.3rem; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-l { color: #a3a3ba; font-weight: 700; margin-top: 6px; }
.stat-s { color: #6b6b84; font-size: .84rem; margin-top: 2px; }
.chart { margin-top: 14px; padding: 22px 22px 12px; }
.chart-t { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.chart-t b { font-weight: 800; }
.chart-t span { color: #6b6b84; font-size: .85rem; }
.chart svg { display: block; width: 100%; height: auto; direction: ltr; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid3 > .card { margin: 0; }
.feat { padding: 22px; }
.feat .ci { width: 44px; height: 44px; margin-bottom: 16px; color: #fff; }
.feat h3 { font-size: 1.02rem; font-weight: 800; }
.feat p { color: #8a8aa6; font-size: .9rem; margin-top: 3px; }
.perms { margin-top: 14px; padding: 22px; }
.perms-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 800; }
.perms-h .pm { display: flex; gap: 8px; }
.perms ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.perms li { display: flex; align-items: center; gap: 10px; color: #cfcfcf; }

/* ───────── pages: the connected list and the linking guide ───────── */
.prow { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid #1c1c2c; }
.prow:first-child { border-top: 0; padding-top: 0; }
.prow:last-child { padding-bottom: 0; }
.marks { display: flex; gap: 8px; flex: none; }
.pname { font-weight: 800; font-size: 1.05rem; overflow-wrap: anywhere; }
.pmeta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.acts { display: flex; gap: 6px; flex: none; }
.guide-h { margin: 52px 0 26px; }
.guide-h h2 { font-size: 1.5rem; font-weight: 900; }
.guide-h p { color: #8a8aa6; margin-top: 4px; }
.tl { position: relative; display: flex; flex-direction: column; gap: 22px; }
.stp { position: relative; padding-inline-start: 66px; }
.stp:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 21px; top: 74px; bottom: -42px; width: 2px; background: #262639; }
.big { position: absolute; inset-inline-start: 0; top: 24px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #000; font-weight: 900; font-size: 1.15rem; display: grid; place-items: center; box-shadow: 0 0 0 7px var(--bg); z-index: 2; }
.scard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 30px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; align-items: center; }
.lab { color: #8a8aa6; font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.tag { height: 22px; padding: 0 9px; border-radius: 999px; border: 1px solid #333348; color: #a3a3ba; font-size: .74rem; font-weight: 700; display: inline-flex; align-items: center; }
.scard h3 { font-size: 1.35rem; font-weight: 900; margin: 2px 0 18px; }
.ol { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.ol li { display: flex; gap: 12px; align-items: flex-start; color: #d4d4d4; }
.k { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #000; font-weight: 900; font-size: .8rem; display: grid; place-items: center; flex: none; margin-top: 2px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.mono-in { margin-top: 16px; max-width: 380px; direction: ltr; font-family: ui-monospace, Consolas, monospace; }
.scopes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; direction: ltr; }
.scopes code { font-size: .76rem; padding: 3px 9px; border-radius: 7px; background: #141421; border: 1px solid #242437; color: #d4d4d4; }
.pic { min-width: 0; }
.win { border-radius: 14px; overflow: hidden; background: #fff; color: #11111d; border: 1px solid #d8d8d8; direction: ltr; font-family: "Segoe UI", Arial, sans-serif; font-size: 12.5px; line-height: 1.5; box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px #ffffff14; text-align: left; }
.win .wb { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f0f0f0; border-bottom: 1px solid #e2e2e2; }
.win .wb > i { width: 9px; height: 9px; border-radius: 50%; background: #c9c9c9; }
.win .wb .u { flex: 1; margin-left: 10px; height: 20px; border-radius: 10px; background: #fff; border: 1px solid #e0e0e0; padding: 0 10px; display: flex; align-items: center; color: #8a8aa6; font-size: 10.5px; white-space: nowrap; overflow: hidden; }
.win .wc { padding: 18px; }
.win .wt { font-size: 16px; display: block; margin-bottom: 12px; }
.win .row-b { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.win .row-b .wt { margin: 0; }
.win .t { position: relative; outline: 2.5px solid #000; outline-offset: 3px; border-radius: 8px; }
.win .co { position: absolute; top: -18px; right: -16px; width: 24px; height: 24px; border-radius: 50%; background: #000; color: #fff; border: 2px solid #fff; display: grid; place-items: center; font: 800 12px Arial, sans-serif; font-style: normal; z-index: 3; }
.win .bt { height: 32px; padding: 0 14px; border-radius: 7px; background: #11111d; color: #fff; display: inline-flex; align-items: center; font-weight: 600; white-space: nowrap; }
.win .bt.s { height: 24px; padding: 0 10px; background: #efefef; color: #11111d; border: 1px solid #d3d3d3; font-size: 11.5px; }
.win .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.win .apc { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid #e0e0e0; border-radius: 10px; }
.win .ap { width: 34px; height: 34px; border-radius: 9px; background: #11111d; flex: none; }
.win .ap.l { background: #bdbdcf; }
.win .g { color: #8a8aa6; font-size: 11px; }
.win .split { display: grid; grid-template-columns: 128px 1fr; margin: -18px; }
.win .nav { background: #fafafa; border-right: 1px solid #ececec; padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.win .ni { padding: 6px 9px; border-radius: 6px; color: #55556d; }
.win .ni.nb { font-weight: 700; color: #11111d; }
.win .ni.sub { margin-left: 8px; }
.win .ni.g { color: #9999b2; }
.win .ni.t { background: #ececec; color: #11111d; font-weight: 600; }
.win .pane { padding: 18px; }
.win .fld { margin-bottom: 12px; }
.win .fl { font-weight: 600; color: #44445a; margin-bottom: 5px; font-size: 11.5px; }
.win .in { height: 34px; border: 1px solid #cfcfcf; border-radius: 7px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: #222234; background: #fff; }
.win .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.win .chipsl { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid #cfcfcf; border-radius: 7px; }
.win .chipsl span { padding: 3px 9px; border-radius: 999px; background: #efefef; border: 1px solid #dcdcdc; font-size: 11px; }
.win .tg { display: inline-flex; align-items: center; gap: 8px; color: #44445a; }
.win .tg i { width: 30px; height: 17px; border-radius: 9px; background: #11111d; position: relative; }
.win .tg i::after { content: ""; position: absolute; top: 2px; right: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.win.dk { background: #0b0b15; color: #fff; border-color: #2a2a3e; direction: rtl; font-family: var(--font); font-size: 13px; text-align: start; }
.win.dk .wb { background: #151522; border-color: #222234; }
.win.dk .wb > i { background: #333348; }
.win.dk .wb .u { background: #0b0b15; border-color: #262639; color: #73738d; direction: ltr; }
.win.dk .t { outline-color: #fff; }
.win.dk .co { background: #fff; color: #000; border-color: #000; }
.win .dtitle { font-weight: 800; font-size: 14.5px; margin-bottom: 14px; }
.win .group { padding: 10px; border: 1px solid #262639; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.win .dfld { height: 34px; border: 1px solid #2b2b3f; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: #a3a3ba; }
.win .dfld .mono { color: #73738d; direction: ltr; }
.win .dbtn { height: 38px; border-radius: 9px; background: #fff; color: #000; display: grid; place-items: center; font-weight: 800; margin-bottom: 18px; }
.win .res { border: 1px solid #262639; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
.win .rr { display: flex; align-items: center; gap: 10px; }
.win .ck { width: 20px; height: 20px; border-radius: 6px; background: #fff; color: #000; display: grid; place-items: center; }
.win .mk { margin-inline-start: auto; display: flex; gap: 6px; color: #d4d4d4; }

/* ───────── agent ───────── */
.wrow { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-top: 1px solid #1f1f30; }
.wrow:first-child { border-top: 0; padding-top: 0; }
.wrow:last-child { padding-bottom: 0; }
.wn { display: flex; align-items: baseline; gap: 10px; }
.wtext { margin: 2px 0 10px; color: #e5e5e5; overflow-wrap: anywhere; white-space: pre-wrap; }
.wmeta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wact { display: flex; gap: 8px; }
.qa-add { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid #1f1f30; }
.qa-add .field { margin: 0; }
.qa-add .input { min-height: 48px; }
.qrow { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-top: 1px solid #1a1a29; }
.qrow:first-child { border-top: 0; }
.qq, .qaa { display: flex; gap: 10px; align-items: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.qq { font-weight: 700; }
.qaa { color: #a3a3ba; margin-top: 4px; }
.qq .icon, .qaa .icon { margin-top: 5px; color: #73738d; }
.quote { padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.quote-label { color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.quote-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.02rem; }

/* ───────── posts ───────── */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crow { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid #1c1c2c; }
.crow:first-child { border-top: 0; padding-top: 0; }
.crow:last-child { padding-bottom: 0; }
.crow.off .ctext, .crow.off .th { opacity: .55; }
.ctext { font-weight: 800; font-size: 1.02rem; overflow-wrap: anywhere; }
.cpills { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.th { width: 100%; aspect-ratio: 16/10; border-radius: 14px; display: grid; place-items: center; color: #5a5a72; flex: none; object-fit: cover; background: radial-gradient(circle at 30% 30%, #3a3a4f, #11111d 70%); overflow: hidden; }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th.lg { width: 76px; height: 76px; aspect-ratio: auto; border-radius: 16px; }
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pc { border: 1px solid #222234; border-radius: 16px; background: #0d0d18; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pc.chosen { border-color: #fff; }
.pb { padding: 0 4px 4px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ptext { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em; overflow-wrap: anywhere; }
.pm { display: flex; justify-content: space-between; align-items: center; }
.pa { display: flex; justify-content: space-between; align-items: center; margin-top: auto; gap: 8px; }
.more { display: flex; justify-content: center; margin-top: 20px; }
.prev { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid #222234; border-radius: 16px; background: #0f0f1a; margin-bottom: 22px; }
.rules { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
.rule { border: 1px solid #262639; border-radius: 16px; background: #0d0d18; padding: 16px 16px 4px; }
.rule-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.rule .field { margin-bottom: 14px; }
.sec-t { display: flex; align-items: center; gap: 10px; font-weight: 800; margin: 20px 0 6px; }
.arow { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #1c1c2c; }
.an { display: flex; gap: 10px; align-items: baseline; }
.ac { font-size: .92rem; color: #e5e5e5; overflow-wrap: anywhere; }
.ar { display: flex; gap: 6px; align-items: flex-start; color: #8a8aa6; font-size: .86rem; overflow-wrap: anywhere; }
.ar .icon { margin-top: 5px; }

/* ───────── settings ───────── */
.acct { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.acct-info { display: flex; align-items: center; gap: 14px; min-width: 0; }
.acct-name { font-weight: 800; }

/* ───────── toasts and dialogs ───────── */
.toasts { position: fixed; inset-inline: 0; bottom: 20px; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; background: #fff; color: #000; font-weight: 700; box-shadow: 0 12px 40px rgba(0, 0, 0, .7); animation: toast-in .22s ease-out; pointer-events: auto; max-width: 520px; }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.backdrop { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: min(560px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; border-radius: 22px; background: var(--surface); border: 1px solid #2a2a3e; box-shadow: 0 30px 80px rgba(0, 0, 0, .8); animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.dialog-side { width: min(540px, 100%); height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border-width: 0; border-inline-start-width: 1px; animation: slide .2s ease-out; }
@keyframes slide { from { opacity: 0; transform: translateX(-24px); } }
[dir="ltr"] .dialog-side { animation-name: slide-ltr; }
@keyframes slide-ltr { from { opacity: 0; transform: translateX(24px); } }
.backdrop:has(.dialog-side) { padding: 0; place-items: stretch; justify-items: end; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid #1c1c2c; }
.dialog-head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 800; }
.dialog-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.dialog-foot { display: flex; justify-content: flex-start; gap: 10px; padding: 16px 24px calc(16px + env(safe-area-inset-bottom, 0px)); flex: none; border-top: 1px solid #1c1c2c; flex-wrap: wrap; }
.dialog-text { color: var(--fg-2); }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--surface); }
.pick.on { border-color: #fff; background: var(--surface-3); }
.pick input { accent-color: #fff; width: 18px; height: 18px; }
.stepper { list-style: none; margin: 0 0 18px; padding: 0; display: flex; align-items: center; gap: 8px; }
.stepper li { display: flex; align-items: center; gap: 8px; flex: 1; }
.stepper li:last-child { flex: none; }
.stepper .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); border: 1px solid var(--line-2); }
.stepper .dot.cur { background: #fff; color: #000; border-color: #fff; }
.stepper .dot.done { background: #fff; color: #000; border-color: #fff; }
.stepper .bar { flex: 1; height: 2px; background: var(--line-2); border-radius: 2px; }
.stepper .bar.done { background: #fff; }

/* ───────── small screens: the menu becomes a bar at the bottom ───────── */
@media (max-width: 1060px) {
  .scard { grid-template-columns: minmax(0, 1fr); }
  .pic { order: 2; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 100vh; }
  .content-col { height: auto; overflow: visible; }
  .side { position: fixed; inset: auto 0 0 0; height: calc(66px + env(safe-area-inset-bottom, 0px)); width: auto; flex-direction: row; padding: 6px 8px env(safe-area-inset-bottom, 0px); border: 0; border-top: 1px solid #1c1c2c; z-index: 90; overflow: visible; background: rgba(0, 0, 0, .96); }
  .side .brand, .side .me { display: none; }
  .menu { flex-direction: row; width: 100%; gap: 2px; }
  .item { flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: auto; padding: 5px 2px; font-size: .68rem; border-radius: 11px; text-align: center; min-width: 0; }
  .item span:not(.count) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .item[aria-current="page"]::before { display: none; }
  .item .count { position: absolute; top: 0; inset-inline-start: 50%; margin: 0; min-width: 18px; height: 18px; font-size: .65rem; }
  .mtop { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #1c1c2c; }
  .mtop .brand-word { font-size: 1.15rem; }
  .page { padding: 22px 16px 100px; }
  .page-head { margin-bottom: 18px; }
  .page-head h1 { font-size: 1.35rem; }
  .card-head { padding: 18px 18px 0; }
  .card-body { padding: 18px; }
  .card-head + .card-body { padding-top: 16px; }
  .conn { padding: 26px 16px 20px; }
  .box { width: 60px; height: 60px; border-radius: 18px; }
  .link-line { margin-inline: 8px; }
  .stats { gap: 8px; }
  .stat { padding: 14px 12px; }
  .stat .ci { width: 34px; height: 34px; margin-bottom: 12px; }
  .stat-v { font-size: 1.5rem; }
  .stat-l { font-size: .8rem; }
  .stat-s { display: none; }
  .chart { padding: 16px 10px 6px; }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .feat { padding: 16px; }
  .perms ul { grid-template-columns: minmax(0, 1fr); }
  .prow { flex-wrap: wrap; gap: 12px; }
  .prow .acts { width: 100%; justify-content: flex-start; }
  .stp { padding-inline-start: 0; }
  .stp::after { display: none; }
  .big { position: static; width: 34px; height: 34px; margin-bottom: 10px; box-shadow: none; font-size: 1rem; }
  .scard { padding: 18px; gap: 20px; }
  .win .wc { padding: 14px; }
  .wrow { flex-wrap: wrap; }
  .wact { width: 100%; justify-content: flex-start; }
  .qa-add { grid-template-columns: 1fr; }
  .qa-add .btn { width: 100%; }
  .crow { flex-wrap: wrap; }
  .crow .acts { width: 100%; justify-content: flex-start; }
  .th.lg { width: 60px; height: 60px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pc { padding: 8px; }
  .pa { flex-direction: column; align-items: stretch; gap: 10px; }
  .pa > span:empty { display: none; }
  .pa .btn { width: 100%; }
  .pa .pill { align-self: flex-start; }
  .pm { justify-content: flex-start; gap: 10px; }
  .setrow { flex-wrap: wrap; }
  .setrow.wide { flex-direction: column; align-items: stretch; }
  .setrow.wide .seg { display: flex; }
  .setrow.wide .seg-item { flex: 1; justify-content: center; padding: 6px 8px; }
  .acct .btn { width: 100%; }
  .auth-top { padding: 18px 20px; }
  .auth-brand { margin-bottom: 32px; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 760px) { .hide-mobile { display: none !important; } }
@media (min-width: 761px) { .show-mobile { display: none !important; } }

/* ───────── one page: a top bar, the profile menu, the basket of posts ───────── */
.app1 { height: 100%; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 640px; margin-inline: auto; padding: 16px 20px 8px; flex: none; }
.tb-logo { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; color: #fff; font-family: inherit; }
.tb-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.prof { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-3); background: transparent; color: var(--fg-2); display: grid; place-items: center; transition: border-color .15s, color .15s; }
.prof:hover { color: #fff; border-color: #6b6b84; }
.prof-dot { position: absolute; top: -1px; inset-inline-end: -1px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--bg); }
.app1 .demo-strip { flex: none; }
.app1 #view { flex: 1; min-height: 0; overflow-y: auto; }
.one { width: 100%; max-width: 640px; margin-inline: auto; padding: 14px 20px 80px; }

.hero { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; }
.hero-row { display: flex; align-items: center; }
.hero-line { width: 44px; border-top: 1px dashed #525269; }
.hero-slot { width: 68px; height: 68px; border-radius: 17px; border: 1px dashed #525269; }

.bk-pages { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bk-chip { border: 1px solid var(--line-2); background: transparent; color: var(--muted); border-radius: 999px; padding: 5px 14px; font-weight: 700; font-size: .86rem; }
.bk-chip.on { color: #000; background: #fff; border-color: #fff; }
.bk { display: flex; flex-direction: column; gap: 8px; }
.bk-row { content-visibility: auto; contain-intrinsic-size: auto 66px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 8px 10px; padding-inline: 10px 12px; background: var(--surface); }
.bk-row.off .bk-thumb, .bk-row.off .bk-text { opacity: .5; }
.bk-thumb { flex: none; border-radius: 10px; background: #161624; display: grid; place-items: center; color: #55556d; overflow: hidden; }
.bk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bk-text { flex: 1; min-width: 0; font-size: .92rem; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-row .switch-track { width: 42px; height: 24px; }
.bk-row .switch-thumb { width: 18px; height: 18px; }
.bk-row .switch input:checked + .switch-track .switch-thumb { inset-inline-start: 21px; }
.bk-more { display: flex; justify-content: center; padding: 14px 0 6px; }
.bk-none { text-align: center; padding: 40px 0; }
.bk-pages .seg { max-width: 100%; }
.bk-add { display: flex; justify-content: center; padding-top: 14px; }
.bk-add .btn { border-radius: 50%; width: 40px; height: 40px; padding: 0; border-style: dashed; }
.bk-empty { display: flex; justify-content: center; padding: 18vh 0; }

.pk-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.pk-list { display: flex; flex-direction: column; gap: 8px; }
.pk-done { color: #fff; width: 32px; height: 32px; display: grid; place-items: center; }
.pk-more { display: flex; justify-content: center; padding: 8px 0; }
.pk-empty { text-align: center; padding: 30px 0; }

.ed-post { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--muted); font-size: .88rem; }
.ed-post p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.pairs { display: flex; flex-direction: column; gap: 14px; }
.pair { display: flex; align-items: flex-start; gap: 6px; }
.pair-f { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.input-1 { min-height: 42px; padding: 9px 14px; line-height: 1.5; border-radius: 10px; }
textarea.autogrow { resize: none; overflow: hidden; display: block; }
.ed-add { display: flex; justify-content: center; padding-top: 12px; }
.ed-err { display: none; color: #fff; border: 1px solid #fff; border-radius: 10px; padding: 9px 12px; margin: 14px 0 0; font-size: .9rem; }

.pf-root { position: fixed; inset: 0; z-index: 140; background: rgba(0, 0, 0, .55); animation: fade .15s; }
.pf-menu { position: absolute; top: 62px; inset-inline-end: max(14px, calc((100vw - 640px) / 2 + 14px)); width: min(290px, calc(100vw - 28px)); background: #0b0b15; border: 1px solid #2a2a3e; border-radius: 22px; padding: 6px; animation: pf-pop .16s ease-out; }
[dir="rtl"] .pf-menu { transform-origin: bottom left; }
[dir="ltr"] .pf-menu { transform-origin: bottom right; }
@keyframes pf-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.pf-who { display: flex; align-items: center; gap: 12px; padding: 14px 14px 16px; }
.pf-av { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; flex: none; font-size: 1.1rem; font-weight: 800; line-height: 1; }
.pf-id { min-width: 0; }
.pf-name { font-weight: 800; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.pf-mail { color: var(--muted-2); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.pf-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 13px 14px; border: 0; background: none; color: var(--fg); border-radius: 16px; font-size: .98rem; font-weight: 600; text-align: start; transition: background .12s; }
.pf-item:hover, .pf-item:active { background: #151522; }
.pf-item > span { flex: 1; }
.pf-item svg { color: #bdbdcf; flex: none; }
.pf-item > svg:last-child:not(:first-child) { color: #55556d; }
.pf-item.out { color: var(--muted); }
.pf-item .count { background: #fff; color: #000; border-radius: 9px; min-width: 20px; height: 20px; font-size: .72rem; display: inline-grid; place-items: center; padding: 0 6px; }
.pf-sep { border-top: 1px solid #1c1c2c; margin: 4px 14px; }

/* The old screens now open in a panel: their own titles are the panel's title. */
.dialog .page-head { display: none; }
@media (max-width: 600px) {
  .topbar { padding-inline: 16px; }
  .one { padding-inline: 16px; }
}

/* Phones: a text field smaller than 16px makes iPhones zoom the whole page in when it is tapped, and the page then looks the wrong size. */
@media (pointer: coarse), (hover: none), (max-width: 600px) {
  input, select, textarea { font-size: 16px; }
}

/* ───────── the bottom bar: Campaigns, PLUS, Account ───────── */
.one { padding-bottom: 150px; }
.navbar { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100% - 24px)); height: 66px; display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: center; background: #0b0b15; border: 1px solid #2a2a3e; border-radius: 24px; }
.nv { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; background: none; border: 0; color: var(--muted); font-size: .72rem; font-weight: 700; transition: color .15s; }
.nv:hover, .nv[aria-current="page"] { color: #fff; }
.nv-ic { position: relative; display: inline-flex; }
.nv .prof-dot { top: -2px; inset-inline-end: -4px; }
.nv-plus { align-self: end; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; color: #fff; margin-top: -40px; padding-bottom: 6px; }
.nv-plus-btn { width: 62px; height: 62px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; border: 6px solid var(--bg); outline: 1px solid #3a3a4f; transition: transform .12s; }
.nv-plus:active .nv-plus-btn { transform: scale(.94); }
.nv-plus-label { font-size: .68rem; font-weight: 900; letter-spacing: .18em; }

/* The menus open upward from the bar. */
.pf-menu.up { top: auto; bottom: calc(14px + 66px + 22px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 24px 70px rgba(0, 0, 0, .95), 0 0 0 1px #2c2c40; }
.pf-menu.center { left: 50%; transform: translateX(-50%); width: min(290px, calc(100vw - 28px)); }
.pf-menu.end { inset-inline-end: max(14px, calc((100vw - 400px) / 2 + 12px)); }

/* The campaign rows and the post picker. */
.bk-sub { color: var(--muted-2); font-size: .74rem; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-row { width: 100%; text-align: start; color: var(--fg); cursor: pointer; font: inherit; }
.pk-row:hover { border-color: var(--line-3); }
.pk-state { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #333348; display: grid; place-items: center; color: #8a8aa6; flex: none; }
.pk-state.on { background: #fff; color: #000; border-color: #fff; }

[hidden] { display: none !important; }

/* ───────── the PLUS sheet: rises from the bottom, tall; the post field on top, the two fields under it, the list drops over them ───────── */
.pl-scrim { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .62); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease-out; }
.pl-sheet { width: min(560px, 100%); height: clamp(460px, 76dvh, 700px); max-height: 94dvh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid #2a2a3e; border-bottom: 0; border-radius: 26px 26px 0 0; box-shadow: 0 -24px 70px rgba(0, 0, 0, .9); animation: sheet-up .32s cubic-bezier(.22, 1, .36, 1); will-change: transform; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { from { transform: none; } to { transform: translateY(100%); } }
@keyframes scrim-out { from { opacity: 1; } to { opacity: 0; } }
.pl-scrim.closing { pointer-events: none; animation: scrim-out .22s ease-in forwards; }
.pl-scrim.closing .pl-sheet { animation: sheet-down .22s ease-in forwards; }
@media (prefers-reduced-motion: reduce) {
  .pl-scrim, .pl-sheet, .pl-scrim.closing, .pl-scrim.closing .pl-sheet { animation-duration: .01s; }
  .pl-drop, .pl-drop.open { transition-duration: .01s; }
}
.pl-grab { width: 42px; height: 5px; border-radius: 3px; background: #3a3a4f; margin: 10px auto 6px; flex: none; }
.pl-top { flex: none; padding: 6px 18px 12px; }
.pl-main { flex: 1; min-height: 0; position: relative; }
.pl-body { height: 100%; overflow-y: auto; padding: 2px 18px 16px; overscroll-behavior: contain; }
.pl-foot .ed-err { margin: 0 0 10px; }
.pl-foot { flex: none; padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #1c1c2c; }
.pl-field { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 14px; border: 1px solid var(--line-3); border-radius: 14px; background: var(--bg); color: var(--fg); text-align: start; font: inherit; }
.pl-field:hover { border-color: #5a5a72; }
.pl-field[aria-expanded="true"] { border-color: #fff; }
.pl-ic { color: var(--muted); display: inline-flex; }
.pl-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-val.ph { color: var(--muted-2); }
.pl-field > svg:last-child { color: var(--muted); flex: none; transition: transform .18s; }
.pl-field[aria-expanded="true"] > svg:last-child { transform: rotate(180deg); }
/* The list drops over the two fields (they stay underneath, with whatever was typed) and scrolls by itself. */
.pl-drop { position: absolute; inset: 0; z-index: 2; overflow-y: auto; padding: 0 18px 16px; background: var(--surface); border-top: 1px solid #1f1f30; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-14px); pointer-events: none; will-change: transform, opacity;
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
.pl-drop.open { visibility: visible; opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .24s ease, transform .3s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
.pl-drop .pk-head { position: sticky; top: 0; z-index: 1; margin: 0; padding: 12px 0 10px; background: var(--surface); }
.pl-drop .pk-head:empty { display: none; }
.pl-drop .pk-list { gap: 6px; padding-top: 12px; }
.pl-drop .pk-head:not(:empty) ~ .pk-list { padding-top: 0; }
.pl-drop .bk-row { padding: 6px 10px 6px 8px; padding-inline: 8px 10px; }

/* A drop-down in the site's own look (ui.js `dropdown`): the button, and the list that opens right under it. */
.dd { position: relative; display: inline-block; max-width: 100%; }
.dd-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; transition: border-color .15s; }
.dd-btn:hover { border-color: #5a5a72; }
.dd.open .dd-btn { border-color: #fff; }
.dd-btn svg { color: var(--muted); flex: none; transition: transform .2s; }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-list { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 6; min-width: 100%; width: max-content; max-width: min(320px, 78vw); padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border: 1px solid #2a2a3e; border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .85);
  visibility: hidden; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
.dd.open .dd-list { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .18s ease, transform .22s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
.dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: var(--fg); font: inherit; text-align: start; cursor: pointer; }
.dd-opt:hover, .dd-opt:focus-visible { background: var(--surface-4); outline: none; }
.dd-opt.is-on { background: var(--surface-3); }
.dd-opt svg { flex: none; }

/* Pressed states: with the phone browser's own blue flash turned off, the pressed thing itself answers the finger. */
.nv:active { opacity: .65; }
.nv-plus:active .nv-plus-btn { transform: scale(.92); }
.pk-row:active, .pl-field:active, .dd-btn:active { background: var(--surface-3); }
.dd-opt:active { background: var(--surface-4); }

/* The number on the Waiting button of the bottom bar. */
.nv-badge { position: absolute; top: -6px; inset-inline-end: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; border: 2px solid #0b0b15; background: #fff; color: #000; font-size: .66rem; font-weight: 800; font-style: normal; line-height: 14px; text-align: center; }

/* ───────── Home: a few small cards ───────── */
.ov { display: flex; flex-direction: column; gap: 12px; }
.ov-body { display: flex; flex-direction: column; gap: 12px; animation: fade .2s ease-out; }
.ov-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ov-st { display: flex; align-items: center; gap: 14px; }
.ov-st-t { min-width: 0; flex: 1; }
.ov-title { margin: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.4; }
.ov-sub { color: var(--muted); font-size: .86rem; }
.ov-st-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, .12); flex: none; margin: 0 4px; }
.ov-st-dot.off { background: transparent; border: 2px solid #6b6b84; box-shadow: none; }
.ov-st-ic { width: 40px; height: 40px; border-radius: 13px; border: 1px solid #fff; display: grid; place-items: center; flex: none; }
.ov-alert { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 20px; background: #fff; color: #000; font: inherit; text-align: start; margin-bottom: 0; }
.ov-alert:active { background: #e6e6e6; }
.ov-n { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 18px; background: #000; color: #fff; display: grid; place-items: center; font-size: 1.05rem; font-weight: 800; }
.ov-alert-t { flex: 1; font-weight: 800; }
.ov-label { color: var(--muted); font-size: .84rem; margin: 4px 4px 8px; }
.ov-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ov-num { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 16px 6px 14px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.ov-num b { font-size: 1.8rem; font-weight: 800; line-height: 1.2; }
.ov-num span { color: var(--muted); font-size: .78rem; }
.ov-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ov-bars { display: flex; align-items: stretch; gap: 8px; height: 104px; }
.ov-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ov-bar-area { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.ov-bar i { display: block; width: 100%; border-radius: 8px; background: #2a2a3e; }
.ov-bar.today i { background: #fff; }
.ov-bar span { color: var(--muted-2); font-size: .72rem; line-height: 1; }
.ov-bar.today span { color: #fff; }
.ov-pages { display: flex; flex-direction: column; gap: 12px; }
.ov-prow { display: flex; align-items: center; gap: 12px; }
.ov-pname { font-weight: 800; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .dd-list, .dd.open .dd-list { transition-duration: .01s; } }

/* Pages guide: real screenshots of Meta, and the use cases with their permissions */
.pic { display: flex; flex-direction: column; gap: 12px; }
.pic img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #2a2a3e; background: #fff; }
.ucs { margin-top: 16px; }
.ucs > p { margin: 0 0 10px; font-size: .88rem; }
.uc { padding: 12px 14px; border: 1px solid #262639; border-radius: 14px; background: #0d0d18; margin-bottom: 10px; }
.uc .ut { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.uc .scopes { margin-top: 10px; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; }
.zoom:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.zoomed { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }

/* Home: three things (today, waiting for you, latest from Echoo) */
.hm-hero { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 18px 20px 20px; }
.hm-hero-top { color: var(--muted); font-size: .9rem; font-weight: 500; }
.hm-hero-cap { color: var(--muted); font-size: .95rem; margin-top: 12px; }
.hm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.hm-stat { text-align: center; padding: 2px 4px; }
.hm-stat + .hm-stat { border-inline-start: 1px solid #1f1f30; }
.hm-stat b { display: block; font-size: 2rem; font-weight: 300; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hm-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; font-weight: 400; }
.hm-hero-act { margin-top: 20px; }
.hm-wait { width: 100%; text-align: start; font-family: inherit; color: #fff; cursor: pointer; border: 1px solid #fff; border-radius: 22px; background: var(--bg); padding: 18px 20px; display: block; }
.hm-wait:active { background: #11111d; }
.hm-wait-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .84rem; font-weight: 500; }
.hm-wait-more { color: #fff; font-weight: 700; }
.hm-wait-name { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; font-size: 1.12rem; font-weight: 800; }
.hm-wait-name span { color: var(--muted); font-size: .8rem; font-weight: 300; }
.hm-wait-text { color: #d4d4d4; margin-top: 6px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-wait-go { margin-top: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.hm-recent { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); padding: 18px 20px 6px; }
.hm-recent-h { margin: 0 0 4px; font-size: .9rem; font-weight: 500; color: var(--muted); }
.hm-recent-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid #1f1f30; }
.hm-recent-row:first-of-type { border-top: 0; }
.hm-recent-main { flex: 1; min-width: 0; }
.hm-recent-name { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.hm-recent-name b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-recent-name span { color: var(--muted-2); font-size: .76rem; font-weight: 300; flex: none; }
.hm-recent-text { color: var(--muted); font-size: .88rem; font-weight: 400; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-recent-st { flex: none; font-size: .78rem; font-weight: 600; padding: 5px 11px; border: 1px solid #333348; border-radius: 999px; color: #d4d4d4; }
.hm-recent-none { color: var(--muted); margin: 8px 0 14px; line-height: 1.7; }

/* Pages panel: the connected pages in one small card, the three fields and one button, the video button */
.pg, .cf-panel { display: flex; flex-direction: column; gap: 22px; }
.pg-card { border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); }
.pg-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pg-row + .pg-row { border-top: 1px solid #1c1c2c; }
.pg-row .marks { display: flex; gap: 6px; flex: none; }
.pg-main { flex: 1; min-width: 0; }
.pg-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-st { display: flex; align-items: center; gap: 7px; margin-top: 2px; color: var(--muted); font-size: .8rem; }
.pg-st i { width: 7px; height: 7px; border-radius: 50%; background: #fff; flex: none; }
.pg-st.wait i { background: transparent; box-shadow: inset 0 0 0 1.5px #6b6b84; }
.pg-st.bad { color: #fff; }
.pg-st.bad i { background: transparent; box-shadow: inset 0 0 0 1.5px #fff; }
.pg-none { padding: 16px; color: var(--muted); text-align: center; font-size: .92rem; }
.cf-form .field { margin-bottom: 14px; }
.cf-form .field-label { font-weight: 700; }
.cf-login { padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid #1c1c2c; }
.cf-login .field-label { color: #fff; }
.cap { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid #3a3a4f; border-radius: 999px; color: #fff; font-size: .76rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s; }
.cap:hover { border-color: #fff; }
.cap:active { background: #151522; }
.cap svg { color: var(--muted); }
.cf-form .callout, .cf-pick .callout { margin-bottom: 14px; }
.cf-form > .btn { margin-top: 6px; }
.cf-pick > .btn { margin-top: 16px; }
.cf-pick > .btn + .btn { margin-top: 6px; }
.yt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: #fff; font: inherit; font-weight: 700; text-align: start; text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s; }
.yt:hover { border-color: #55556d; }
.yt:active { background: #11111d; }
.yt-t { flex: 1; }
.yt > svg:last-child { color: var(--muted); flex: none; }

/* ───────── Identity: dark ink with the violet → pink → orange gradient ─────────
   The gradient is for the few things that matter: the logo tile, PLUS, the main button, the chosen tab, small counters. Everything else stays ink and white. */
::selection { background: rgba(122, 86, 255, .4); }
:focus-visible { outline-color: var(--brand-text); }
.logo-tile { background: var(--brand-grad); color: #fff; }
.btn-primary, .btn-success { background: var(--brand-grad); border-color: transparent; color: #fff; text-shadow: 0 1px 2px rgba(20, 0, 40, .35); }
.btn-primary:hover, .btn-success:hover { background: var(--brand-grad); border-color: transparent; filter: brightness(1.1); }
.btn-primary:disabled, .btn-success:disabled { filter: grayscale(.6); }
.nv:hover, .nv[aria-current="page"] { color: var(--brand-text); }
.nv-plus-btn { background: var(--brand-grad); color: #fff; outline: 0; box-shadow: 0 10px 28px rgba(240, 80, 159, .32); }
.nv-badge, .item .count, .pf-item .count, .prof-dot { background: var(--brand-grad); color: #fff; }
.nv-badge { border-color: var(--surface-2); }
.seg-item.is-on { background: var(--brand-grad); color: #fff; }
.pf-av, .k, .big, .stepper .dot.cur, .stepper .dot.done, .pk-state.on, .link-line .ok { background: var(--brand-grad); color: #fff; border-color: transparent; }
.switch input:checked + .switch-track { background: var(--brand-grad); border-color: transparent; }
.switch input:checked + .switch-track .switch-thumb { background: #fff; }
.input:focus, .select:focus, .textarea:focus, .pl-field[aria-expanded="true"], .dd.open .dd-btn { border-color: var(--brand-text); }
.pill-dot { background: var(--brand-text); }
.hm-stat:first-child b { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-wait { border: 1px solid transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--brand-grad) border-box; }
.hm-wait-more, .hm-wait-go { color: var(--brand-text); }

/* ───────── Agent page: an icon first, one short word, only the fields that are needed ───────── */
.ag { display: flex; flex-direction: column; gap: 12px; }
.ag-card { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.ag-h { display: flex; align-items: center; gap: 12px; }
.ag-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--brand-text); display: grid; place-items: center; flex: none; }
.ag-t { flex: 1; min-width: 0; font-weight: 800; }
.ag-ico { position: relative; min-width: 0; }
.ag-ico > svg { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ag-ico > .input { padding-inline-start: 44px; }
.ag-form { display: flex; flex-direction: column; gap: 10px; }
.ag-add { display: flex; gap: 8px; align-items: stretch; }
.ag-add .ag-ico { flex: 1; }
.ag-add .btn { width: 52px; height: 52px; padding: 0; flex: none; border-radius: 14px; }
.ag-info { position: relative; }
.ag-info .textarea { padding-bottom: 28px; resize: none; }
.ag-count { position: absolute; bottom: 8px; inset-inline-end: 14px; font-size: .72rem; color: var(--muted-2); }
.ag-line { display: flex; align-items: center; gap: 12px; color: var(--fg-2); }
.ag-line > span { flex: 1; min-width: 0; }
.ag-line > svg { color: var(--muted); flex: none; }

/* Customers' private messages: the conversation as bubbles (the "Waiting for you" view). */
.dmthread { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 4px 2px; }
.bub { max-width: 84%; padding: 10px 14px; border-radius: 18px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.7; }
.bub small { opacity: .65; font-size: .72rem; }
.bub.in { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-end-start-radius: 6px; }
.bub.out { align-self: flex-end; background: var(--brand-grad); color: #fff; border-end-end-radius: 6px; }
.wmeta { display: flex; flex-wrap: wrap; gap: 6px; }

/* ───────── desktop and tablet: the phone layout above stays for phones; a wide screen gets a side navigation and a wide page ───────── */
.nv-desk { display: none; }
.ag-col { display: contents; }
@media (min-width: 761px) and (max-width: 1023px) {
  .topbar, .one { max-width: 780px; }
  .pf-menu { inset-inline-end: max(14px, calc((100vw - 780px) / 2 + 14px)); }
}
@media (min-width: 1024px) {
  .app1 { display: grid; grid-template-columns: 276px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100%; }
  .topbar { grid-column: 1; grid-row: 1; width: auto; max-width: none; margin: 0; padding: 26px 24px 16px; border-inline-end: 1px solid #1c1c2c; }
  .app1 .demo-strip { grid-column: 2; grid-row: 1; align-self: start; }
  .app1 #view { grid-column: 2; grid-row: 2; }
  .one { max-width: 1680px; padding: 30px 48px 64px; }
  /* The section pages (Settings, Agent, Pages, Waiting) use the whole width too: their blocks sit in columns, nothing is a narrow strip in the middle. */
  .one.one-narrow { display: block; column-width: 440px; column-gap: 20px; }
  .one.one-narrow > .card { break-inside: avoid; margin: 0 0 20px; }
  .one.one-narrow > .page-head, .one.one-narrow > .ag, .one.one-narrow > .pg, .one.one-narrow > .wlist { column-span: all; }
  .ag-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .wlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); gap: 0 28px; align-items: start; }
  .wlist > .empty { min-height: 44vh; justify-content: center; } /* only the empty Waiting page: an empty state inside a card keeps its small size */

  /* the bar at the bottom becomes the side navigation */
  .navbar { grid-column: 1; grid-row: 2; position: static; left: auto; bottom: auto; transform: none; width: auto; height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 14px 22px; border: 0; border-inline-end: 1px solid #1c1c2c; border-radius: 0; background: var(--bg); overflow-y: auto; }
  .navbar .nv { flex-direction: row; justify-content: flex-start; gap: 14px; height: 46px; padding: 0 14px; border-radius: 12px; font-size: .96rem; }
  .navbar .nv:hover { background: #14141f; }
  .navbar .nv[aria-current="page"] { background: #181828; }
  .navbar .nv-ic .nv-badge { inset-inline-end: -12px; }
  .navbar .nv-desk { display: flex; }
  .navbar #waiting + .nv-desk { margin-top: 12px; padding-top: 0; }
  .navbar #prof { margin-top: auto; border-top: 1px solid #1c1c2c; border-radius: 0 0 12px 12px; height: 56px; }
  .navbar .nv-plus { order: -1; align-self: stretch; flex-direction: row; justify-content: center; gap: 10px; height: 50px; margin: 0 0 12px; padding: 0; border-radius: 14px; background: var(--brand-grad); color: #fff; box-shadow: 0 10px 28px rgba(240, 80, 159, .25); }
  .navbar .nv-plus-btn { width: auto; height: auto; border: 0; outline: 0; background: none; box-shadow: none; }
  .navbar .nv-plus-btn svg { width: 22px; height: 22px; }
  .navbar .nv-plus-label { font-size: .86rem; letter-spacing: .14em; }

  /* the menus and panels open next to the navigation */
  .pf-menu { top: auto; bottom: 74px; inset-inline-end: auto; inset-inline-start: 16px; width: 280px; }
  [dir="rtl"] .pf-menu, [dir="ltr"] .pf-menu { transform-origin: bottom center; }
  .dialog-side { width: min(640px, 100%); }
  .pl-scrim { align-items: center; }
  .pl-sheet { width: 640px; height: min(720px, 88dvh); border-bottom: 1px solid #2a2a3e; border-radius: 26px; }

  /* Home: the day's numbers across the top, then what waits and what Echoo did, side by side */
  .ov-body { display: flex; flex-direction: column; gap: 20px; }
  .hm-hero { padding: 24px 28px 26px; }
  .hm-stat b { font-size: 2.6rem; }

  /* Campaigns: the posts in columns */
  .bk { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
  .pk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; }
}
.ag-none { margin: 0; padding: 6px 0 2px; text-align: center; color: var(--muted-2); font-size: .88rem; }

/* Two columns need room: from 1280 pixels (a laptop's 1366 and everything above). Between 1024 and 1279 the pages are one wide column. */
@media (min-width: 1280px) {
  .ag { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .pg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr; gap: 20px 24px; align-items: start; }
  .pg > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .pg > .cf, .pg > p { grid-column: 2; grid-row: 1 / span 2; }
  .pg > .yt { grid-column: 1; grid-row: 2; }
  .ov-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .ov-body > .hm-hero, .ov-body > :only-child { grid-column: 1 / -1; }
  .ov-body:not(:has(.hm-wait)) > .hm-recent { grid-column: 1 / -1; }
}

/* OTP page: the numbers (with the QR while linking), the keys, the two example calls, the usage */
.otp-sender { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.otp-sender-head { display: flex; align-items: center; gap: 12px; }
.otp-qrbox { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-3); text-align: center; }
.otp-qr { width: 240px; height: 240px; max-width: 100%; border-radius: 8px; background: #fff; }
.otp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.otp-key { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.otp-key.is-revoked { opacity: .55; }
.otp-req { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.otp-req > :last-child { margin-inline-start: auto; font-size: .82rem; }
.copyrow.otp-add .input { direction: inherit; text-align: start; font-size: .95rem; }
