/* Instagram agent — interfeys uslublari.
   Ochiq, neytral, gradientsiz. Barmoq uchun min 40px nishon. */
:root {
  --bg: #f7f8fa;      --card: #ffffff;   --card-2: #f9fafb;
  --text: #101828;    --muted: #667085;  --faint: #98a1b3;
  --line: #e4e7ec;    --line-2: #eef0f3;
  --accent: #4f46e5;  --accent-h: #4338ca; --accent-soft: #eef2ff;
  --ok: #067647;      --ok-bg: #ecfdf3;
  --warn: #b54708;    --warn-bg: #fffaeb;
  --err: #b42318;     --err-bg: #fef3f2;
  --r: 10px;          --r-lg: 14px;
  --sh: 0 1px 2px rgba(16,24,40,.05);
  --sh-md: 0 4px 12px rgba(16,24,40,.08);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
/* Standart — kunduzgi. Qorong'i faqat foydalanuvchi tanlasa yoki
   «tizim bo'yicha» rejimda OS qorong'i bo'lsa yoqiladi. */
:root[data-theme="dark"] {
    --bg: #0f1115;    --card: #171a21;   --card-2: #1c2029;
    --text: #e7e9ee;  --muted: #98a1b3;  --faint: #6b7280;
    --line: #262a33;  --line-2: #20242c;
    --accent: #7c7bf7; --accent-h: #6b6af0; --accent-soft: #1e1f3a;
    --ok: #75e0a7;    --ok-bg: #0d2a1c;
    --warn: #fec84b;  --warn-bg: #2b1f07;
    --err: #fda29b;   --err-bg: #2d1412;
  --sh: none;       --sh-md: 0 4px 14px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0f1115;    --card: #171a21;   --card-2: #1c2029;
    --text: #e7e9ee;  --muted: #98a1b3;  --faint: #6b7280;
    --line: #262a33;  --line-2: #20242c;
    --accent: #7c7bf7; --accent-h: #6b6af0; --accent-soft: #1e1f3a;
    --ok: #75e0a7;    --ok-bg: #0d2a1c;
    --warn: #fec84b;  --warn-bg: #2b1f07;
    --err: #fda29b;   --err-bg: #2d1412;
    --sh: none;       --sh-md: 0 4px 14px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
.boot { padding: 48px; text-align: center; color: var(--muted); }
.icn { flex: none; vertical-align: -.18em; }

/* ── Karkas ─────────────────────────────────────────────── */
/* Telefonda: bitta ustun + pastki tablar. Kengroq ekranda: chapda
   doimiy yon panel, tablar yashiriladi. */
.app { min-height: 100dvh; padding-bottom: calc(66px + var(--safe-b)); }
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center;
  gap: 10px; padding: 13px 18px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar .tt { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.topbar .sub { font-size: 12px; color: var(--muted); }
.page { max-width: 1060px; margin: 0 auto; padding: 18px; }

/* Yon panel — telefonda yashirin */
.side { display: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 14px 18px; }
.brand .mark { display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--accent); color: #fff; }
.brand b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.brand .tiny { display: block; }

.navgroup { margin-bottom: 18px; }
.navlabel { font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--faint); padding: 0 12px; margin-bottom: 6px; }
.navitem { display: flex; align-items: center; justify-content: flex-start;
  gap: 10px; width: 100%; min-height: 38px; padding: 0 12px; margin-bottom: 2px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font-size: 13.5px; font-weight: 500; }
.navitem:hover { background: var(--card-2); color: var(--text); }
.navitem.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }


h2 { font-size: 11px; font-weight: 600; letter-spacing: .06em;
     text-transform: uppercase; color: var(--faint); margin: 22px 0 10px; }

/* ── Kartochka va tartib ────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px; margin-bottom: 12px; box-shadow: var(--sh);
}
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint);
       display: inline-block; margin-right: 7px; flex: none; }
.dot.on { background: var(--ok); }

/* ── Tugmalar ───────────────────────────────────────────── */
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: inherit; font-weight: 500; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
button:hover:not(:disabled) { background: var(--card-2); border-color: var(--faint); }
button:disabled { opacity: .45; cursor: default; }
button.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
button.primary:hover:not(:disabled) { background: var(--accent-h); border-color: var(--accent-h); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover:not(:disabled) { background: var(--card-2); color: var(--text); }
button.sm { min-height: 34px; padding: 0 10px; font-size: 13px; }
button.icon { width: 34px; min-height: 34px; padding: 0; }
button.danger { color: var(--err); }
button.danger:hover:not(:disabled) { background: var(--err-bg); border-color: var(--err); }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
           padding-top: 12px; border-top: 1px solid var(--line-2); }
.addbtn {
  width: 100%; border-style: dashed; color: var(--muted);
  background: transparent; margin-top: 8px;
}
.addbtn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ── Maydonlar ──────────────────────────────────────────── */
label.field, .field { display: block; margin-bottom: 14px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted);
       margin-bottom: 6px; }
.hint { display: block; font-size: 12px; color: var(--faint); margin-top: 5px; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  width: 100%; min-height: 40px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--text); font: inherit;
}
input:not([type="checkbox"]):focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

/* Chip'lar */
.btnchip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px 4px 10px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 999px; font-size: 13px; margin: 0 5px 5px 0;
}
.btnchip button { min-height: 20px; width: 20px; padding: 0; border: 0;
                  background: transparent; color: var(--muted); }

/* Kalit — ichida haqiqiy checkbox turadi, uni yashiramiz */
.switch { position: relative; display: inline-block;
  width: 42px; height: 24px; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px;
  background: var(--line); transition: background .15s; pointer-events: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.2); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ── Bildirishnomalar ───────────────────────────────────── */
.note {
  padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 10px;
  border: 1px solid transparent;
}
.note.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: currentColor; }
.note.warn { background: var(--warn-bg); color: var(--warn); border-color: currentColor; }
.note.err  { background: var(--err-bg);  color: var(--err);  border-color: currentColor; }
.note.info { background: var(--card-2);  color: var(--muted); border-color: var(--line); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--card-2); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill.err { background: var(--err-bg); color: var(--err); border-color: transparent; }
.pill.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ── Ro'yxatlar ─────────────────────────────────────────── */
.pickitem {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 12px; width: 100%; text-align: left;
  padding: 11px 12px; margin-bottom: 6px; background: transparent;
  border: 1px solid transparent; border-radius: 8px; min-height: 52px;
}
.pickitem:hover { background: var(--card-2); border-color: var(--line); }
.pickitem .ic { display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.pickitem .d { font-size: 12px; color: var(--muted); margin-top: 1px; }
.pickitem > .grow > div:first-child { font-weight: 500; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.kv { display: flex; justify-content: space-between; gap: 12px;
      padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.log { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.logdot { width: 7px; height: 7px; border-radius: 50%; flex: none;
          display: inline-block; background: var(--faint); }
.logdot.in { background: var(--accent); }
.logdot.out { background: var(--ok); }
.logdot.bad { background: var(--err); }

/* ── Qadamlar daraxti (ro'yxat ko'rinishi) ──────────────── */
.tree { display: flex; flex-direction: column; gap: 8px; }
.step { background: var(--card); border: 1px solid var(--line);
        border-radius: var(--r); overflow: hidden; }
.step.open { border-color: var(--accent); }
.step .head { display: flex; align-items: center; gap: 11px;
              padding: 12px 14px; cursor: pointer; }
.step .head:hover { background: var(--card-2); }
.step .ic, .cn-head .ic { display: inline-flex; align-items: center;
  justify-content: center; width: 30px; height: 30px; border-radius: 8px;
  flex: none; background: var(--accent-soft); color: var(--accent); }
.step .tt { font-weight: 550; font-size: 14px; }
.step .sm { font-size: 12px; color: var(--muted); }
.step .chev { color: var(--faint); transition: transform .15s; }
.step .chev.up { transform: rotate(180deg); }
.step .body { padding: 4px 14px 14px; border-top: 1px solid var(--line-2); }

.branch { border-left: 2px solid var(--line); padding-left: 12px;
          margin: 10px 0 10px 6px; }
.branch.alt { border-left-style: dashed; }
.bh { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--muted); background: var(--card-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }

/* ── Varaq (sheet) ──────────────────────────────────────── */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(16,24,40,.45);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(2px); }
.sheet { width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 16px 18px;
  padding-bottom: calc(18px + var(--safe-b)); box-shadow: var(--sh-md); }
.sheet .sh { display: flex; align-items: center; gap: 10px;
  margin: -4px -4px 14px; position: sticky; top: -16px; z-index: 1;
  background: var(--card); padding: 10px 4px; }
.sheet .sh b { font-size: 15px; font-weight: 600; }
@media (min-width: 640px) {
  .sheet-bg { align-items: center; }
  .sheet { border-radius: var(--r-lg); max-height: 84dvh; }
}

/* ── Simulyator ─────────────────────────────────────────── */
.chat { display: flex; flex-direction: column; gap: 7px; padding: 12px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: var(--r); min-height: 220px; max-height: 44dvh; overflow-y: auto; }
.bub { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; }
.bub.them { background: var(--card); border: 1px solid var(--line);
  align-self: flex-start; border-bottom-left-radius: 4px; }
.bub.me { background: var(--accent); color: #fff; align-self: flex-end;
  border-bottom-right-radius: 4px; }
.sysline { text-align: center; font-size: 12px; color: var(--faint); padding: 3px 0; }
.qr { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qr button { min-height: 32px; padding: 0 12px; font-size: 13px;
  border-radius: 999px; border-color: var(--accent); color: var(--accent); }

/* Scenario simulator */
.sim-dock {
  position: fixed; inset: 0 0 0 auto; z-index: 55;
  width: min(100%, 440px); display: flex; min-height: 0;
  background: var(--card); border-left: 1px solid var(--line);
  box-shadow: -16px 0 56px rgba(12,16,30,.2);
}
.sim-wrap {
  width: 100%; display: grid; grid-template-rows: auto auto minmax(260px,1fr) auto;
  gap: 12px; overflow-y: auto; overscroll-behavior: contain;
  padding: 17px 16px calc(14px + var(--safe-b));
}
.sim-header { display: flex; align-items: flex-start; gap: 10px; }
.sim-header b { font-size: 17px; font-weight: 680; letter-spacing: -.02em; }
.sim-header p { color: var(--muted); margin: 2px 0 0; font-size: 12px; line-height: 1.35; }
.sim-header button { min-width: 34px; min-height: 34px; padding: 0; }
.sim-side { min-width: 0; }
.sim-side .note { margin: 8px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.sim-controls { display: flex; gap: 7px; align-items: end; }
.sim-controls .field { flex: 1; min-width: 0; margin: 0; }
.sim-controls select { width: 100%; min-height: 36px; padding-block: 5px; font-size: 13px; }
.sim-controls .sim-reset { flex: none; width: 36px; min-height: 36px; padding: 0; }
.sim-options { margin-top: 8px; padding: 7px 9px; background: var(--card-2);
  border: 1px solid var(--line); border-radius: 9px; }
.sim-options summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; }
.sim-options .field { margin: 8px 0 0; }
.sim-info { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.sim-info:not(:empty) { margin-top: 8px; }
.sim-stage { display: flex; flex-direction: column; min-height: 0; gap: 8px; }
.sim-screens, .sim-tabs { align-self: stretch; }
.sim-screens button, .sim-tabs button { flex: 1; min-width: 0; white-space: normal; }
.ig-badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px;
  align-items: center; justify-content: center; font-weight: 700; }
@media (min-width: 1100px) {
  .sim-dock { position: static; width: 100%; flex: 1; box-shadow: none; border-left: 0; }
  .sim-close { display: none; }
}
.phone {
  position: relative; width: 100%; min-height: 0; flex: 1 1 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--builder-grid,var(--bg)); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px;
  font-size: 13px; line-height: 1.5;
}
.ig-top { display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border-bottom: 1px solid var(--line); min-height: 50px; flex: none; background: var(--card); }
.ig-top-n { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ig-top-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-top-n small { color: var(--muted); font-size: 11px; }
.ig-ic { border: 0; background: none; padding: 0; color: var(--muted); width: 26px; min-height: 30px; }
.ig-scroll { flex: 1; overflow-y: auto; min-height: 0; overscroll-behavior-y: contain; }
.ig-av { display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 50%; color: #fff; font-weight: 650; }
.ig-post-img { display: flex; align-items: center; gap: 10px; margin: 10px 11px 0;
  padding: 8px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; }
.ig-post-img img, .ig-post-ph { display: block; width: 43px; height: 43px; object-fit: cover; flex: none; border-radius: 8px; }
.ig-post-ph, .sim-empty-icon { display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.ig-post-txt { min-width: 0; display: grid; font-size: 12px; line-height: 1.4; }
.ig-post-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ig-cmts { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.ig-cmt { display: flex; gap: 9px; align-items: flex-start; animation: igIn .25s ease; overflow-wrap: anywhere; }
.ig-cmt small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.ig-cmt.reply { margin: 8px 0 0 32px; }
.ig-at { color: var(--accent); }
.ig-thread { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ig-thread > div:not([class]) { display: flex; flex-direction: column; gap: 6px; }
.sim-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 20px 10px; margin: auto; color: var(--muted); max-width: 100%; }
.sim-empty p { margin: 0; font-size: 13px; max-width: 240px; }
.sim-empty-icon { height: 40px; width: 40px; border-radius: 12px; }
.sim-example { background: var(--card-2); border-color: var(--line); min-height: 30px;
  padding: 3px 9px; color: var(--accent); font-size: 12px; overflow-wrap: anywhere; word-break: break-word; }
.ig-sys { text-align: center; color: var(--muted); font-size: 11.5px; padding: 6px 0 0; }
.ig-row { display: flex; gap: 7px; align-items: flex-end; animation: igIn .25s ease; }
.ig-col { display: flex; flex-direction: column; gap: 4px; max-width: 84%; min-width: 0; }
.ig-b { padding: 8px 12px; border-radius: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ig-b.them { background: var(--card-2); }
.ig-b.me { align-self: flex-end; max-width: 82%; color: #fff; background: var(--builder-primary,#5843b6);
  border-radius: 15px 15px 4px 15px; animation: igIn .2s ease; }
.ig-message-card { padding: 8px 10px; background: var(--card-2); border: 1px solid var(--line);
  border-radius: 15px 15px 15px 4px; min-width: 0; overflow-wrap: anywhere; }
.ig-message-text { white-space: pre-wrap; }
.ig-message-card small { color: var(--muted); }
.ig-typing { display: inline-flex; gap: 4px; padding: 10px 12px; }
.ig-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: igDot 1s infinite; }
.ig-typing i:nth-child(2) { animation-delay: .15s; }
.ig-typing i:nth-child(3) { animation-delay: .3s; }
.ig-media { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card-2); color: var(--text); text-decoration: none; }
.ig-media-ic { width: 34px; height: 34px; border-radius: 8px; flex: none; color: var(--accent);
  display: grid; place-items: center; background: var(--accent-soft); }
.ig-media-t { display: flex; flex-direction: column; font-weight: 600; min-width: 0; }
.ig-media-t small { color: var(--muted); font-weight: 400; font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-qr { display: grid; gap: 5px; margin-top: 7px; }
.phone .ig-qr button, .ig-qr a { display: block; text-align: center; padding: 5px 9px;
  min-height: 33px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--accent); font-size: 12px; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.phone .ig-qr button:not(:disabled):hover, .ig-qr a:hover { border-color: var(--accent); }
.phone .ig-qr button:disabled { opacity: .75; color: var(--muted); }
.ig-input { display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 11px;
  border-top: 1px solid var(--line); background: var(--card); min-height: 51px; flex: none; }
.phone .ig-input input { flex: 1; min-width: 0; min-height: 35px; border: 0; background: none;
  color: var(--text); padding: 5px 2px; font: inherit; box-shadow: none; }
.phone .ig-input input:focus { box-shadow: none; outline: none; }
.phone .ig-input:focus-within { box-shadow: inset 0 1px var(--accent); }
.ig-send { flex: none; width: 34px; min-height: 34px; padding: 0; background: var(--builder-primary,#5843b6);
  border-color: transparent; color: #fff; border-radius: 9px; }
.ig-send:hover:not(:disabled) { background: var(--builder-primary-hover,#473493); }
.ig-send:disabled { background: var(--card-2); border-color: var(--line); color: var(--muted); opacity: .8; }
.ig-banner { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 3;
  display: flex; justify-content: flex-start; align-items: center; gap: 9px; text-align: left;
  background: var(--card); color: var(--text); border: 1px solid var(--accent); box-shadow: var(--sh-md);
  border-radius: 12px; padding: 9px 10px; animation: igDrop .3s ease; font-size: 12px; }
.ig-banner > span { display: flex; flex-direction: column; min-width: 0; }
.sim-trace { overflow: auto; flex: 1; padding: 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--builder-grid,var(--bg)); overflow-wrap: anywhere; }
.sim-trace p { margin: 0; font-size: 13px; }
.sim-trace ol { list-style: none; margin: 0; padding: 0; }
.sim-trace li { position: relative; display: grid; gap: 3px; padding: 0 0 14px 17px;
  margin-left: 5px; border-left: 1px solid var(--line); }
.sim-trace li::before { content: ""; position: absolute; top: 5px; left: -5px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); }
.sim-trace li:last-child { border-color: transparent; }
.sim-trace li small { color: var(--muted); }
.sim-trace .trace-branch { color: var(--accent); }
.sim-trace .trace-warn::before { background: var(--warn); }
.sim-variables { border-top: 1px solid var(--line); padding-top: 10px; }
.sim-variables .row { gap: 4px; margin-top: 5px; }
.sim-variables .pill { white-space: normal; }
@keyframes igIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes igDrop { from { opacity: 0; transform: translateY(-16px); } }
@keyframes igDot { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }

/* ── Saqlash paneli va tablar ───────────────────────────── */
.savebar { position: sticky; bottom: calc(10px + var(--safe-b)); z-index: 20;
  display: flex; gap: 8px; margin-top: 18px; padding: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh-md); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); }
.tabbar button { flex: 1; flex-direction: column; gap: 3px; min-height: 62px;
  border: 0; border-radius: 0; background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 500; }
.tabbar button:hover { background: var(--card-2); }
.tabbar button.on { color: var(--accent); }
.tabbar .i { display: block; line-height: 0; }

.segmented { display: inline-flex; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; background: var(--card); }
.segmented button { min-height: 32px; padding: 0 12px; border: 0;
  border-radius: 0; background: transparent; color: var(--muted); font-size: 13px; }
.segmented button.on { background: var(--accent); color: #fff; }

/* ── Tayyor shablonlar ──────────────────────────────────── */
.tplgrid { display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.tpl { display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-start; gap: 6px;
  text-align: left; padding: 15px 14px; min-height: 0; height: 100%;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--sh); }
.tpl:hover { border-color: var(--accent); background: var(--card); }
.tpl .ic { display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 2px; }
.tpl .nm { font-weight: 550; font-size: 14px; line-height: 1.35; }
.tpl .ds { font-size: 12px; color: var(--muted); line-height: 1.45; font-weight: 400; }

/* ── Kanvas ─────────────────────────────────────────────── */
.cwrap { position: relative; overflow: hidden; touch-action: none;
  height: calc(100dvh - 300px); min-height: 400px;
  background: var(--card-2);
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--line); border-radius: var(--r);
  cursor: grab; user-select: none; }
.cwrap:active, .cwrap[data-moving] { cursor: grabbing; }
.cstage { position: absolute; transform-origin: 0 0; }

.cnode { position: absolute; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 11px 13px 15px; cursor: pointer; box-shadow: var(--sh);
  transition: border-color .12s, box-shadow .12s; }
.cnode:hover { border-color: var(--accent); }
.cnode[data-card] { cursor: grab; }
.cwrap[data-moving] .cnode[data-card] { cursor: grabbing; }
.cnode.moving { z-index: 3; }
.cnode.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cnode.ghost { background: transparent; border-style: dashed;
  color: var(--muted); box-shadow: none; }
.cn-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.cn-head .tt { font-weight: 600; font-size: 13px; }
.cn-body { font-size: 12px; color: var(--muted); line-height: 1.45;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; }
.cn-add { position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  width: 24px; height: 24px; min-height: 24px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  opacity: 0; transition: opacity .12s; }
.cnode:hover .cn-add, .cnode.sel .cn-add { opacity: 1; }
.cn-add:hover { border-color: var(--accent); color: var(--accent); }

.cn-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.cn-btn { position: relative; display: flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 34px; padding: 0 28px; border-radius: 9px; font-size: 13px;
  font-weight: 600; color: var(--accent); background: var(--accent-soft);
  border: 1px solid transparent; }
.cn-btn.url { color: var(--text); background: var(--card-2); border-color: var(--line); }
/* Tugmaning o'ng chetidagi ulagich — kartochka chegarasidan chiqib turadi */
.cn-port { position: absolute; right: -24px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--accent); border: 1.5px solid var(--accent);
  box-shadow: var(--sh); z-index: 2; }
.cn-port:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.clayer { position: absolute; inset: 0; }
.cnode.trig { border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.cnode.trig .cn-head .ic { background: var(--accent); color: #fff; }
.cedges { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.cedges .ce { color: var(--faint); }
.cedges .ce path { stroke: var(--line); stroke-width: 1.5; fill: none; }
.cedges .ce.branch { color: var(--accent); }
.cedges .ce.branch path { stroke: var(--accent); opacity: .65; }
.cedges .ce.port { color: var(--accent); }
.cedges .ce.port path { stroke: var(--accent); stroke-width: 2; fill: none; }
.cedges .ce.merge path { stroke-dasharray: 4 4; opacity: .5; }
.cedges text { fill: var(--muted); font-size: 11px; font-weight: 500;
  paint-order: stroke; stroke: var(--card-2); stroke-width: 4px; }

.czoom { position: absolute; right: 12px; bottom: 12px; display: flex;
  flex-direction: column; gap: 5px; z-index: 5; }
.czoom button { width: 34px; height: 34px; min-height: 34px; padding: 0;
  border-radius: 8px; box-shadow: var(--sh); }

@media (max-width: 640px) {
  .page { padding: 14px; }
  .cwrap { height: calc(100dvh - 260px); }
}

/* ── Kengroq ekran: chapda doimiy panel, pastki tablar yashiriladi ──
   Bu blok fayl oxirida turishi shart: kaskadda keyin kelgan qoida
   ustun, aks holda .tabbar ning display: flex uni bosib ketadi. */
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 236px minmax(0, 1fr);
         padding-bottom: 0; }
  .main:has(.chatwrap) .topbar { display: none; }
  .side { display: block; position: sticky; top: 0; align-self: start;
    height: 100dvh; padding: 10px 10px 18px; background: var(--card);
    border-right: 1px solid var(--line); overflow-y: auto; }
  .tabbar { display: none; }
  .page { padding: 22px 26px 40px; }
  .topbar { padding: 15px 26px; }
  .savebar { bottom: 16px; }
}

/* ── Profil va mavzu menyusi ────────────────────────────── */
.profwrap { position: relative; flex: none; }
.prof { display: flex; align-items: center; gap: 8px; min-height: 36px;
  padding: 0 10px 0 6px; border-radius: 999px; background: var(--card-2);
  border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.prof .av { display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff; }
.prof .nm { max-width: 150px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 500; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 210px; padding: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-md); }
.menulabel { font-size: 11px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--faint); padding: 6px 10px 4px; }
.menuitem { display: flex; align-items: center; justify-content: flex-start;
  gap: 9px; width: 100%; min-height: 36px; padding: 0 10px; border: 0;
  border-radius: 7px; background: transparent; color: var(--text);
  font-size: 13.5px; font-weight: 500; }
.menuitem:hover { background: var(--card-2); }
.menuitem.on { color: var(--accent); }

/* ── Bo'sh holat va shablonlar ──────────────────────────── */
.empty { text-align: center; padding: 26px 12px 8px; }
.empty b { display: block; margin-top: 12px; font-size: 16px; }
.empty .small { margin-top: 5px; }
.flowcard { border-left: 3px solid var(--accent); }
.tpl .more { display: inline-flex; align-items: center; gap: 5px;
  margin-top: auto; padding-top: 10px; font-size: 12px; font-weight: 500;
  color: var(--accent); opacity: 0; transition: opacity .12s; }
.tpl:hover .more { opacity: 1; }
.blank { width: 100%; margin-top: 12px; border: 1px dashed var(--line);
  color: var(--muted); }
.ic.big { width: 44px; height: 44px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); }
.outline { border: 1px solid var(--line); border-radius: var(--r);
  padding: 8px 10px; background: var(--card-2); max-height: 230px; overflow-y: auto; }
.oline { display: flex; align-items: center; gap: 8px; padding: 4px 0;
  font-size: 13px; color: var(--muted); }
.oline svg { color: var(--accent); }

/* Scenario editor */
.flow-editor-open {
  color-scheme: light;
  --bg: light-dark(#f8f8fa,#131620);
  --card: light-dark(#fff,#191d29);
  --card-2: light-dark(#f7f8fc,#222737);
  --text: light-dark(#172038,#f0f1f7);
  --muted: light-dark(#5c6780,#abb3c8);
  --faint: light-dark(#737d95,#8892ab);
  --line: light-dark(#dfe2ec,#343b50);
  --line-2: light-dark(#eceef5,#282e40);
  --accent: light-dark(#5843b6,#b9abff);
  --accent-h: light-dark(#473493,#d4caff);
  --accent-soft: light-dark(#eeebfa,#31294d);
  --builder-grid: light-dark(#f3f4f8,#121622);
  --builder-dot: light-dark(#d4d8e5,#2b3247);
  --builder-wire: light-dark(#7d86a4,#8a96b1);
  --builder-primary: light-dark(#5843b6,#6b50ce);
  --builder-primary-hover: light-dark(#473493,#5840b4);
  --builder-paper: light-dark(#fbfbfe,#151925);
  --builder-info: light-dark(#2861a3,#94c3ff);
  --builder-wait: light-dark(#96631f,#f2c881);
  --builder-logic: light-dark(#16795f,#8edbc1);
}
:root[data-theme="dark"] .flow-editor-open { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .flow-editor-open { color-scheme: dark; }
}
.flow-editor-open { background: var(--builder-paper); padding-bottom: 0; }
.flow-editor-open .topbar { padding: 7px clamp(12px,2vw,22px); min-height: 57px; }
.ed-breadcrumb { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ed-breadcrumb button { min-height: 32px; padding: 0; font-size: 13px; color: var(--muted); }
.ed-breadcrumb span { color: var(--faint); }
.ed-breadcrumb b { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.editor { display: flex; flex-direction: column; background: var(--builder-paper); }
.ed-bar {
  position: sticky; top: 0; z-index: 25; display: flex; flex-wrap: wrap;
  align-items: center; gap: 9px 14px; padding: 11px 16px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.ed-name { display: flex; flex: 1 1 210px; align-items: center; gap: 7px; min-width: 0; color: var(--muted); }
.ed-name-icon { background: var(--accent-soft); color: var(--accent); width: 34px; height: 34px;
  border-radius: 10px; flex: none; display: grid; place-items: center; }
.ed-bar .fname { min-width: 0; min-height: 35px; width: max-content; max-width: 320px; font-size: 16px;
  font-weight: 700; border-color: transparent; background: transparent; padding: 4px 7px; text-overflow: ellipsis; }
.ed-bar .fname:hover { border-color: var(--line); }
.editor :is(input,textarea)::placeholder { color: var(--muted); opacity: .9; }
.ed-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.ed-actions button { min-height: 34px; padding: 0 10px; }
.ed-actions .chk { min-height: 29px; max-width: 100%; }
.ed-live { display: flex; align-items: center; gap: 7px; padding: 0 4px 0 2px; color: var(--muted); font-size: 12px; }
.ed-actions .ed-history { width: 34px; padding: 0; }
.ed-actions .ed-save { background: var(--builder-primary); color: #fff; border-color: transparent; font-weight: 650; }
.ed-actions .ed-save:hover:not(:disabled) { background: var(--builder-primary-hover); }
.ed-actions .ed-save:disabled { background: var(--card-2); color: var(--muted); opacity: 1; }
.ed-actions .ed-save:disabled .icn { color: var(--ok); }
.ed-bar .savemsg { width: 100%; white-space: normal; }
.nowrap { white-space: nowrap; }
.ed-body { display: flex; flex-direction: column; min-height: 0; }
.ed-work { padding: 12px 14px 18px; min-width: 0; }
.ed-viewbar { display: flex; margin-bottom: 9px; }
.ed-viewbar .segmented, .sim-wrap .segmented {
  display: flex; padding: 3px; gap: 3px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card-2);
}
.ed-viewbar .segmented button, .sim-wrap .segmented button {
  background: transparent; color: var(--muted); border-radius: 7px; min-height: 30px; font-size: 12px;
}
.ed-viewbar .segmented button.on, .sim-wrap .segmented button.on {
  background: var(--card); color: var(--accent); font-weight: 650; box-shadow: var(--sh);
}
.ed-list { margin-top: 4px; overflow-y: auto; }
.ed-panel, .ed-rail-tabs { display: none; }
.ed-preview[hidden], .ed-panel[hidden] { display: none; }
.pnl-head { display: flex; align-items: center; gap: 9px; padding: 13px 15px 10px; font-size: 15px; }
.pnl-head .ic { display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px; flex: none; background: var(--accent-soft); color: var(--accent); }
.pnl-body { padding: 0 15px 16px; min-width: 0; }
.pnl-body .hint { color: var(--muted); }
.pnl-body .rule { display: grid; gap: 3px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 10px; margin: 0 0 13px; background: var(--card-2); font-size: 12.5px; line-height: 1.4; }
.pnl-body .rule-when .icn { color: var(--accent); }
.pnl-body .rule-then { color: var(--muted); }
.editor .cwrap { background-color: var(--builder-grid);
  background-image: radial-gradient(circle, var(--builder-dot) .8px, transparent .8px);
  border-radius: 13px; }
.editor .cnode { background: var(--card); border-radius: 12px; }
.editor .cnode.trig, .editor .cnode.sel { border-color: var(--accent); }
.editor .cnode.sel { box-shadow: 0 0 0 2px var(--accent-soft); }
.editor .cnode.trig .cn-head .ic { background: var(--accent-soft); color: var(--accent); }
.editor .cnode.ghost { background: color-mix(in srgb,var(--card) 62%,transparent); }
.editor .cnode .tt { color: var(--text); }
.editor .cn-head .ic { color: var(--accent); background: var(--accent-soft); }
.editor .cnode[data-kind="send_dm"] .ic, .editor .cnode[data-kind="reply_comment"] .ic { color: var(--builder-info); background: var(--card-2); }
.editor .cnode[data-kind="wait_reply"] .ic, .editor .cnode[data-kind="delay"] .ic { color: var(--builder-wait); background: var(--card-2); }
.editor .cnode[data-kind="condition"] .ic { color: var(--builder-logic); background: var(--card-2); }
.editor .cn-add { opacity: 1; }
.editor .cedges .ce { color: var(--builder-wire); }
.editor .cedges .ce path { stroke: var(--builder-wire); }
.editor .cedges .ce:is(.branch,.port) path { stroke: var(--accent); }
.editor .cedges text { stroke: var(--builder-grid); }
[data-outcome="following"] { --outcome-color: var(--ok); }
[data-outcome="not_following"] { --outcome-color: var(--warn); }
.editor .cedges .ce[data-outcome] path { stroke: var(--outcome-color); opacity: .85; }
.editor .cedges .ce[data-outcome] text, .sim-trace .trace-branch[data-outcome] { color: var(--outcome-color); fill: var(--outcome-color); }
.editor .cnode.follower-target {
  display: flex; flex-direction: column; gap: 7px; min-height: 92px; padding: 11px;
  align-items: center; justify-content: center; color: var(--text);
  border-color: color-mix(in srgb,var(--outcome-color) 55%,var(--line));
}
.editor .cnode.follower-target strong, .follower-path summary > .icn:first-child { color: var(--outcome-color); }
.editor .cnode.follower-target span { color: var(--muted); font-size: 12px; }
.editor .cnode.follower-target:hover { background: var(--card-2); border-color: var(--outcome-color); }
.follower-paths { display: grid; gap: 8px; }
.follower-paths .hint { margin: 2px 0; }
.follower-path { border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); }
.follower-path summary { display: flex; cursor: pointer; align-items: center; gap: 8px; padding: 8px 10px; }
.follower-path summary::-webkit-details-marker { display: none; }
.follower-path summary strong { flex: 1; font-weight: 650; font-size: 13px; }
.follower-path summary > .icn:last-child { color: var(--muted); }
.follower-path[open] summary > .icn:last-child { transform: rotate(180deg); }
.follower-path-content { padding: 0 8px 8px; }
.czoom { flex-direction: row; align-items: center; gap: 2px; background: var(--card);
  padding: 3px; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--sh-md); }
.czoom button { border: 0; box-shadow: none; background: transparent; color: var(--muted); }
.czoom-value { min-width: 42px; text-align: center; color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; }
.czoom .czoom-fit { margin-left: 3px; border-left: 1px solid var(--line); border-radius: 0 7px 7px 0; }
.flow-editor-open .tabbar { display: none; }
@media (min-width: 900px) {
  .flow-editor-open { grid-template-columns: 66px minmax(0,1fr); }
  .flow-editor-open .side { padding: 8px; }
  .app.flow-editor-open .brand { padding: 0; min-height: 49px; justify-content: center; margin-bottom: 10px; }
  .flow-editor-open .brand > span:not(.mark), .flow-editor-open .navlabel, .flow-editor-open .navitem span { display: none; }
  .app.flow-editor-open .navgroup { padding: 0; margin-bottom: 12px; }
  .flow-editor-open .navgroup + .navgroup { padding-top: 11px; border-top: 1px solid var(--line); }
  .app.flow-editor-open .navitem { min-height: 42px; justify-content: center; padding: 8px; margin-bottom: 3px; }
}
@media (min-width: 1100px) {
  .flow-editor-open .main { display: flex; height: 100dvh; flex-direction: column; }
  .flow-editor-open .topbar { flex: none; }
  .editor { flex: 1; min-height: 0; }
  .ed-body { flex-direction: row; flex: 1; overflow: hidden; }
  .ed-work { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 12px 14px 14px; }
  .ed-work .cwrap { flex: 1; height: auto; min-height: 0; }
  .ed-rail { display: flex; flex-direction: column; width: clamp(332px,31vw,405px); flex: none;
    min-height: 0; border-left: 1px solid var(--line); background: var(--card); }
  .ed-rail-tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); padding: 8px 10px; }
  .ed-rail-tabs button { flex: 1; color: var(--muted); background: transparent; border-color: transparent;
    min-height: 34px; padding: 0 6px; font-size: 13px; }
  .ed-rail-tabs button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
  .ed-panel { display: block; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .ed-preview { display: flex; flex: 1; min-height: 0; }
  .ed-sheet, .ed-test-launch { display: none; }
}
@media(max-width: 1099px) {
  .ed-work .cwrap { height: max(355px, calc(100dvh - 220px)); min-height: 0; }
}
@media(max-width: 580px) {
  .ed-bar { gap: 7px; padding: 8px 10px; }
  .ed-name { flex-basis: 100%; }
  .ed-name-icon { width: 29px; height: 29px; }
  .ed-name .fname { width: 100%; max-width: none; }
  .ed-actions { gap: 5px; width: 100%; }
  .ed-actions .chkwrap { flex: 1 1 auto; }
  .ed-actions .chk { text-wrap: wrap; }
  .ed-actions .chkmenu { left: 0; right: auto; min-width: 0; width: min(360px,calc(100vw - 24px)); }
  .ed-actions button { padding: 0 7px; }
  .ed-work { padding: 8px 9px 10px; }
  .ed-breadcrumb { gap: 5px; }
}
/* Ro'yxat qatoridagi o'ngga qaragan strelka */
.pickitem .rot { transform: rotate(-90deg); color: var(--faint); flex: none; }

/* Modalning birinchi qatori — bo'sh stsenariy, ajratib turadi */
.pickitem.blankrow { border: 1px solid var(--line); background: var(--card-2); }
.pickitem.blankrow:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ── Bildirishnomalar va tasdiqlash ─────────────────────── */
.toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%);
  bottom: calc(80px + var(--safe-b)); display: flex; flex-direction: column;
  gap: 8px; align-items: center; pointer-events: none; padding: 0 16px; }
.toast { max-width: 460px; padding: 11px 16px; border-radius: 10px;
  font-size: 13.5px; font-weight: 500; box-shadow: var(--sh-md);
  border: 1px solid transparent; animation: toastin .18s ease-out; }
.toast.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: currentColor; }
.toast.err  { background: var(--err-bg);  color: var(--err);  border-color: currentColor; }
.toast.warn { background: var(--warn-bg); color: var(--warn); border-color: currentColor; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 900px) { .toasts { bottom: 24px; } }

.sheet-bg.ask { align-items: center; }
.askbox { width: 100%; max-width: 400px; margin: 0 16px; padding: 20px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-md); }
.askbox b { font-size: 15px; }
button.danger.solid { background: var(--err); border-color: var(--err); color: #fff; }
button.danger.solid:hover:not(:disabled) { opacity: .9; background: var(--err); }

/* ── Tekshiruv ko'rsatkichi ─────────────────────────────── */
.chkwrap { position: relative; flex: none; }
.chk { min-height: 30px; padding: 0 10px; gap: 6px; font-size: 12.5px;
  font-weight: 500; border-radius: 999px; }
.chk.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: transparent; }
.chk.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.chk.err  { background: var(--err-bg);  color: var(--err);  border-color: transparent; }
.chk.ok:hover, .chk.warn:hover, .chk.err:hover { filter: brightness(.97); }
.chkmenu { min-width: 320px; max-width: 440px; max-height: 320px; overflow-y: auto; }
.chkline { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px;
  font-size: 13px; line-height: 1.45; border-radius: 7px; }
.chkline svg { margin-top: 2px; flex: none; }
.chkline.err  { color: var(--err); }
.chkline.warn { color: var(--warn); }
.savemsg { font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.savemsg.ok { color: var(--ok); }
.savemsg.err { color: var(--err); }
.hint.warnhint { color: var(--warn); }

/* Havola tugma ko'rinishida (OAuth uchun) */
a.btn { display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-weight: 500; text-decoration: none; }
a.btn:hover { background: var(--card-2); border-color: var(--faint); }
a.btn.sm { min-height: 34px; padding: 0 10px; font-size: 13px; }
a.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
a.btn.primary:hover { background: var(--accent-h); }

/* ── Suhbatlar: ikki ustun ──────────────────────────────── */
.chatwrap { display: flex; height: calc(100dvh - 66px - var(--safe-b)); }
.chatlist { display: flex; flex-direction: column; width: 100%; min-width: 0;
  background: var(--card); border-right: 1px solid var(--line); }
.chatpane { display: none; }

.cl-head { display: flex; gap: 8px; padding: 12px 14px 8px; }
.cl-head input { min-height: 36px; }
.cl-head .ghost.on { color: var(--accent); background: var(--accent-soft); }
.cl-filters { display: flex; gap: 8px; padding: 0 14px 8px; }
.cl-filters select { min-height: 32px; font-size: 13px; }
.cl-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.cl-select { display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2); background: var(--card-2); }
.cl-select input[type="checkbox"] { width: 16px; height: 16px;
  accent-color: var(--accent); }
.cl-body { flex: 1; overflow-y: auto; padding-bottom: 12px; }

.tagchip { min-height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; gap: 5px; }
.tagchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tagchip .cnt { opacity: .65; font-variant-numeric: tabular-nums; }

.clrow { display: flex; align-items: center; gap: 11px; padding: 10px 14px;
  cursor: pointer; border-left: 3px solid transparent; }
.clrow:hover { background: var(--card-2); }
.clrow.on { background: var(--accent-soft); border-left-color: var(--accent); }
.clrow input[type="checkbox"] { width: 16px; height: 16px; flex: none;
  accent-color: var(--accent); }

.av2 { display: inline-flex; align-items: center; justify-content: center;
  flex: none; border-radius: 50%; color: #fff; font-weight: 600; }

.wdot { width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--faint); }
.wdot.on { background: var(--ok); }

.bulks { border-top: 1px solid var(--line-2); margin-top: 10px; padding: 12px 14px 0; }
.bulkrow { display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line-2); }
.bulkrow:last-child { border-bottom: 0; }

/* ── Suhbat oynasi ──────────────────────────────────────── */
.conv { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.conv-head { display: flex; align-items: center; gap: 11px; padding: 11px 16px;
  background: var(--card); border-bottom: 1px solid var(--line); }
.conv-body { flex: 1; overflow-y: auto; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.conv-body .bub { max-width: 70%; }
.bmeta { font-size: 11px; opacity: .7; margin-top: 3px; }
.bmeta.err { color: var(--err); opacity: 1; }
.bub.bad { border-color: var(--err); }
.conv-foot { display: flex; gap: 8px; align-items: flex-end;
  padding: 12px 16px; background: var(--card); border-top: 1px solid var(--line); }
.conv-foot textarea { min-height: 42px; max-height: 140px; resize: none; }
.conv-foot button { min-width: 44px; }
.chatempty { display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 100%; gap: 10px; color: var(--faint); }

/* Telefonda: suhbat tanlansa ro'yxat o'rnini egallaydi */
.only-narrow { display: inline-flex; }
@media (max-width: 899px) {
  .chatwrap.open .chatlist { display: none; }
  .chatwrap.open .chatpane { display: block; width: 100%; }
}
@media (min-width: 900px) {
  .chatwrap { height: 100dvh; }
  .chatlist { width: 340px; flex: none; }
  .chatpane { display: block; flex: 1; min-width: 0; }
  .only-narrow { display: none; }
}
.conv-body .sysline { display: flex; align-items: center; justify-content: center;
  gap: 6px; align-self: center; padding: 4px 12px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; }
.conv-body .sysline svg { color: var(--accent); }

/* Komment pufakchalari DM'dan ajralib tursin — biri post ostida
   hammaga ko'rinadi, ikkinchisi shaxsiy. */
.bub.cmt.them { background: var(--warn-bg); border-color: var(--warn);
  color: var(--text); }
.bub.cmt.me { background: var(--warn); border: 1px solid var(--warn);
  color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bub.cmt.me { color: #1a1206; }
}
:root[data-theme="dark"] .bub.cmt.me { color: #1a1206; }

/* «Shu postdan» — komment qaysi post ostida yozilgani. Ketma-ket bir
   xil post takrorlanmaydi, shuning uchun u ajratuvchi vazifasini ham
   bajaradi. */
.postref { display: flex; align-items: center; gap: 9px; margin: -2px -4px 7px;
  padding: 5px 8px 5px 5px; border-radius: 10px; font-size: 11.5px;
  text-decoration: none; color: inherit; opacity: .85;
  background: rgba(0,0,0,.05); }
/* `max-width` ataylab yo'q: bo'lsa pufakcha qatorning kengligini
   hisoblashda sarlavhani inobatga olmaydi va qisqa kommentda yozuv
   kesilib qoladi. Pufakchaning o'z `max-width: 70%` i chegarani
   ushlab turadi, ortig'i `.pcap` da nuqtachalarga aylanadi. */
a.postref:hover { opacity: 1; background: rgba(0,0,0,.1); text-decoration: none; }
.postref svg { flex: none; }
/* Ikki qator: yorliq ustida, sarlavha ostida. Bitta qatorga siqilsa
   rasm ham, matn ham kichrayib ketardi. */
.ptext { display: flex; flex-direction: column; gap: 1px; min-width: 0;
  overflow: hidden; }
.postref b { font-weight: 700; }
.pcap { font-weight: 500; opacity: .8; font-size: 11px; }
.pthumb { width: 42px; height: 42px; border-radius: 7px; object-fit: cover;
  flex: none; background: rgba(0,0,0,.06); }
.pthumb.none { display: flex; align-items: center; justify-content: center;
  opacity: .45; }
.bub.me .postref { background: rgba(255,255,255,.18); }
.cmtreply { min-height: 20px; padding: 0 6px; margin-left: 8px; gap: 4px;
  border: 0; background: transparent; color: inherit; opacity: .8;
  font-size: 11px; font-weight: 600; border-radius: 5px; }
.cmtreply:hover { opacity: 1; background: rgba(0,0,0,.08); }

/* Savatcha — o'chirilgan stsenariylar. Ro'yxatning o'zidan pastroq va
   xiraroq: bu arxiv, asosiy ish emas. */
.trash { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); }
.trashcard { opacity: .72; padding: 10px 12px; margin-bottom: 8px; }
.trashcard:hover { opacity: 1; }

.vrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  margin-bottom: 8px; }

.airow { padding: 7px 0; border-bottom: 1px solid var(--line); gap: 9px; }
.airow:last-child { border-bottom: 0; }
.airow .okt { color: var(--ok); font-weight: 600; }
.airow code { opacity: .6; }

.replybox { width: 100%; }
.replybox textarea { min-height: 40px; max-height: 120px; resize: none; }

/* Keep translated labels and switches readable in the narrow builder panel. */
.block-head { display:flex; align-items:center; gap:8px; padding:8px 2px; }
.block-head > svg { flex:none; }
.block-head > .grow { line-height:1.4; overflow-wrap:anywhere; }
summary > svg { vertical-align:middle; margin:0 6px; }

/* Account-scoped platform workspace. */
.platform-work{padding:28px;max-width:1500px;width:100%;margin:auto;overflow:auto}.platform-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.platform-heading h1{font-size:26px;letter-spacing:-.7px;margin:9px 0}.platform-heading p,.platform-card p.muted{font-size:13px;line-height:1.7;color:var(--muted,#77839a)}.platform-heading label{min-width:200px}.platform-kicker{font-size:10px;letter-spacing:1.4px;color:var(--muted,#8895ab);font-weight:700}.platform-tabs{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:23px}.platform-tabs button{border:1px solid var(--line,#e1e5ef);background:var(--card,#fff);border-radius:9px;padding:10px 14px;font-size:12px}.platform-tabs button.on{background:#ece9ff;border-color:#c4bcfb;color:#5d47c7}.platform-card{border:1px solid var(--line,#e0e5ef);background:var(--card,#fff);border-radius:16px;padding:24px;margin-bottom:20px;min-width:0}.platform-card h2{font-size:18px;margin:4px 0 15px}.platform-card h3{font-size:14px;margin-top:23px}.platform-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.platform-toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:16px 0}.platform-toolbar input:not([type=checkbox]){flex:1;min-width:145px}.platform-toolbar label{font-size:11px;display:flex;align-items:center;gap:6px}.platform-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.platform-work input:not([type=checkbox]),.platform-work select,.platform-work textarea{max-width:100%;min-width:0}.platform-card textarea{width:100%;resize:vertical}.platform-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:20px}.platform-stats>div{padding:20px;border:1px solid var(--line,#e0e5ef);background:var(--card,#fff);border-radius:13px}.platform-stats span{display:block;font-size:11px;color:var(--muted,#8895ab)}.platform-stats strong{display:block;font-size:27px;margin-top:9px}.platform-table{overflow:auto}.platform-table table{width:100%;border-collapse:collapse;font-size:12px}.platform-table th{text-align:left;font-size:10px;color:var(--muted,#8895ab);font-weight:600;padding:12px}.platform-table td{padding:14px 12px;border-top:1px solid var(--line,#e5e9f0);vertical-align:middle}.platform-table small,.platform-document small{display:block;font-size:11px;color:var(--muted,#8895ab);margin-top:5px}.platform-line,.platform-document{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 0;border-bottom:1px solid var(--line,#e5e9f0);font-size:13px}.platform-code{margin-top:20px;background:#f1efff;color:#624bb4;padding:16px;border-radius:10px;overflow-wrap:anywhere}.platform-code p{font-size:12px;line-height:1.6}.platform-draft{padding:14px 0;border-bottom:1px solid var(--line,#e5e9f0)}.platform-draft pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;line-height:1.8}.capabilities-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.capability-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:13px 0;border-top:1px solid var(--line,#e5e9f0);font-size:12px}.capability-row p{font-size:11px;line-height:1.6;color:var(--muted,#8895ab);margin:7px 0 0}.capability-status{font-size:9px;padding:5px 7px;background:#f1f2f6;color:#7c8395;border-radius:6px;white-space:nowrap}.capability-status.ready{background:#eaf7ef;color:#348560}.capability-status.needs_ai,.capability-status.needs_connection,.capability-status.conditional{background:#fff4dc;color:#967638}.platform-messages{display:flex;flex-direction:column;gap:12px;max-height:430px;overflow:auto;padding:15px 0}.platform-message{padding:12px 15px;background:#f1f3f8;max-width:80%;border-radius:12px;align-self:flex-start;color:#27334a}.platform-message.out{align-self:flex-end;background:#ece8ff}.platform-message small{font-size:10px;color:#8590a4}.platform-message p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;margin:6px 0}.platform-work a.btn{display:inline-flex;align-items:center;border:1px solid var(--line,#e1e5ef);border-radius:8px;padding:9px 12px;font-size:12px;text-decoration:none}.platform-work input:focus-visible,.platform-work button:focus-visible,.platform-work select:focus-visible,.platform-work textarea:focus-visible{outline:3px solid #a99bea;outline-offset:2px}
@media(max-width:1000px){.platform-columns,.capabilities-grid{grid-template-columns:1fr}.platform-heading{align-items:flex-start}.platform-stats{gap:9px}.platform-stats>div{padding:15px}}
@media(max-width:600px){.platform-work{padding:16px 12px 90px}.platform-heading{flex-direction:column}.platform-heading h1{font-size:22px}.platform-heading label{width:100%}.platform-card{padding:18px 15px}.platform-fields{grid-template-columns:1fr}.platform-stats strong{font-size:23px}.platform-stats span{font-size:9px}.platform-tabs{gap:5px}.platform-tabs button{font-size:10px;padding:9px}.capability-row{flex-direction:column}.platform-toolbar{align-items:stretch}.platform-toolbar input:not([type=checkbox]),.platform-toolbar select{width:100%;flex-basis:100%}}
.platform-card h2{color:var(--text,#24314b);text-transform:none;letter-spacing:-.3px;font-weight:650}.platform-card h3{color:var(--text,#24314b);text-transform:none;letter-spacing:0}.platform-heading{scroll-margin-top:90px}
/* AI Studio */
.agent-intro{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:12px 0 24px}.agent-intro h2{margin:6px 0}.agent-intro p{color:var(--muted,#697386);margin:6px 0}.agent-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.agent-tile h3{margin:0}.agent-tile .platform-line{gap:12px;align-items:center}.agent-editor{border-color:#a99af3;box-shadow:0 5px 24px #6552cf0c}.agent-documents{display:grid;gap:10px;max-height:240px;overflow:auto;padding:14px 0}.agent-consent{display:flex;align-items:flex-start;gap:10px;margin:18px 0;line-height:1.65}.agent-consent input{flex:0 0 auto;margin-top:6px}.platform-card audio{width:100%;margin:14px 0}.agent-editor .platform-fields{margin:18px 0}.agent-editor textarea{resize:vertical}@media(max-width:800px){.agent-intro{align-items:flex-start;flex-direction:column}.agent-grid{grid-template-columns:1fr}}
.agent-advanced{margin:20px 0;padding:16px;border:1px solid var(--line,#333640);border-radius:12px}.agent-advanced summary{cursor:pointer;font-weight:600}.agent-test-messages{display:grid;gap:12px;margin:18px 0;max-height:430px;overflow:auto}.agent-test-bubble{border:1px solid var(--line,#333640);border-radius:16px;padding:12px 16px;max-width:85%;background:var(--surface,#191b23)}.agent-test-bubble.user{justify-self:end;background:#7765e41a}.agent-test-bubble small{color:var(--muted,#969cab)}.agent-test-bubble p{white-space:pre-wrap;margin:6px 0}.agent-chat-test{border-color:#8574ed}.agent-tile .platform-toolbar{flex-wrap:wrap}

.agent-extra-options{margin-top:24px}.agent-extra-options>summary{cursor:pointer;padding:18px 4px;font-size:16px;font-weight:600}.agent-extra-options[open]>summary{margin-bottom:12px}

/* Workspace integrations */
.connectors{max-width:1170px}
.connector-intro{padding:24px 0 14px;margin-bottom:8px}
.connector-eyebrow{display:block;font-size:11px;letter-spacing:.13em;font-weight:800;color:var(--muted)}
.connector-intro h1,.workspace-login h1{font-size:clamp(25px,4vw,38px);letter-spacing:-.045em;margin:9px 0}
.connector-intro p,.connector-owner p{color:var(--muted);max-width:60ch}
.connectors section>h2{margin:24px 0 12px;font-size:17px;letter-spacing:-.02em;text-transform:none}
.connectors-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,265px),1fr));gap:12px;align-items:start}
.connector{margin:0;min-width:0}
.connector-head{display:flex;align-items:center;gap:10px;margin-bottom:13px}
.connector h3{font-size:15px;margin:0 0 3px}
.connector p{margin:6px 0;font-size:13px}
.connector-head p,.connector-event small{color:var(--muted);font-size:12px;margin:0}
.connector-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:12px;font-size:22px;font-weight:800;background:#e6e5ff;color:#5346c6}
.connector-icon.openai{background:#ddf7ec;color:#176a55}
.connector-icon.claude{background:#ffe9de;color:#a04120}
.connector-icon.eskiz{background:#e1edff;color:#2056a2}
.connector-icon.speech{background:#e7dfff;color:#6942ad}
.connector-icon.crm{background:#e2f3ff;color:#205a7c;font-size:14px}
.connector-status{color:var(--muted);background:var(--card-2);border-radius:99px;padding:4px 7px;font-size:10px;font-weight:650;text-align:center}
.connector-status.ready{color:#15664b;background:#dcf5e9}
.connector-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px}
.connector-actions a,.connector>a{font-size:13px}
.connector-form{margin-top:12px;padding-top:10px;border-top:1px solid var(--line);overflow-wrap:anywhere}
.connector-form pre{white-space:pre-wrap;font-size:11px}
.connector-feedback{color:var(--text);padding-top:5px}
.connector-url{display:block;padding:8px;margin:8px 0;background:var(--card-2);border-radius:7px}
.connector-event{border-top:1px solid var(--line);padding:7px 0}
.connector-event small{display:block}
.connector-owner,.connectors-extra{margin-top:14px}
.connectors-extra summary{cursor:pointer;color:var(--muted);font-size:13px;margin-bottom:8px}
.workspace-login{min-height:100dvh;display:grid;place-items:center;padding:20px}
.workspace-login-card{width:min(100%,440px);padding:clamp(18px,5vw,32px)}
.workspace-login-card form button{width:100%;margin-top:10px}
.workspace-mark{display:grid;place-items:center;width:34px;height:34px;background:var(--accent);color:#fff;border-radius:10px;font-weight:850;font-size:19px}
.workspace-inbox-link{white-space:nowrap}
@media(max-width:540px){.workspace-inbox-link{display:none}}
.connector-icon.eskiz{font-size:12px;letter-spacing:.02em}
@media(max-width:899px){
 .tabbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}
 .tabbar button{min-width:0;padding:4px 1px;font-size:clamp(8px,2.3vw,11px)}
}
@media(max-width:560px){
 .topbar .workspace-inbox-link{display:none!important}
 .topbar .sub{display:none}
 .topbar .prof .nm{max-width:92px}
 .connector-intro{padding:17px 0 4px}
}

.workspace-login-switch{margin:20px 0 0;text-align:center}
.workspace-login-switch a{font-weight:600}

.workspace-login {
  --bg: #f8f8f5;
  --text: #151627;
  --muted: #525366;
  --card: #fff;
  --card-2: #fafafa;
  --line: #dddde5;
  --accent: #5342ae;
  --accent-h: #43318f;
  --accent-soft: #ebe8fa;
  color: var(--text);
  background: var(--bg);
}
.workspace-login .workspace-login-card {
  padding: clamp(24px, 6vw, 36px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
}
.workspace-auth-brand { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 720; letter-spacing: -.035em; }
.workspace-auth-brand img { display: block; border-radius: 10px; }
.workspace-login .workspace-login-card h1 { margin: 21px 0 9px; font-size: clamp(28px, 6vw, 37px); line-height: 1.1; }
.workspace-login .workspace-login-card form { margin-top: 21px; }
.workspace-login .workspace-login-card button.primary { background: #151627; border-color: #151627; min-height: 44px; }
.workspace-login .workspace-login-card button.primary:hover { background: #35334f; }

/* Workspace surfaces use the same palette as the public PixelInbox site. */
.workspace-app { min-width: 0; }
.workspace-app:not(.flow-editor-open) {
  --accent: #5342ae;
  --accent-h: #43338e;
  --accent-soft: #eeebfa;
}
:root:not([data-theme="dark"]) .workspace-app:not(.flow-editor-open) {
  --bg: #f8f8f6;
  --line: #e5e4eb;
}
.workspace-app.flow-editor-open .topbar { padding-block: 7px; min-height: 57px; }
.workspace-app .side { background: var(--card); }
.workspace-app .brand { min-height: 77px; padding-inline: 19px; }
.workspace-app .brand b { font-size: 17px; letter-spacing: -.035em; }
.workspace-app .brand .mark { background: none; }
.workspace-app .workspace-mark { border-radius: 9px; }
.workspace-app .navgroup { padding-inline: 10px; }
.workspace-app .navitem { border-radius: 9px; padding-block: 11px; gap: 11px; }
.workspace-app .navitem.on { font-weight: 700; }
.workspace-app .topbar { gap: clamp(8px, 1.3vw, 18px); padding-block: 13px; min-height: 66px; }
.workspace-app .topbar .tt { font-size: clamp(16px, 2vw, 20px); }
.workspace-app .topbar .sub { margin-top: 1px; }
.workspace-app .topbar .grow { min-width: 0; }
.workspace-app .topbar .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-app .page, .workspace-app .platform-work { padding-inline: clamp(16px, 3vw, 33px); }
.workspace-app .platform-work { margin-inline: auto; max-width: 1180px; }
.workspace-app .card, .workspace-app .platform-card { box-shadow: none; }
.workspace-app .platform-heading .platform-kicker, .workspace-app .connector-intro .connector-eyebrow { display: none; }
.workspace-app .platform-heading h1, .workspace-app .connector-intro h1 { margin: 0; font-size: clamp(24px, 3.3vw, 35px); }
.workspace-app .platform-tabs { gap: 7px; flex-wrap: wrap; }
.workspace-app .platform-table { overflow-x: auto; }
.workspace-app .platform-table table { min-width: 500px; }
.workspace-app .connector-intro { padding-top: 12px; }
.workspace-app .connectors-grid { gap: 13px; }
.workspace-app .connector-head { min-width: 0; }
.workspace-app .connector-status { max-width: 85px; line-height: 1.2; white-space: normal; }
.workspace-empty { padding: clamp(24px, 6vw, 55px); margin: clamp(6px, 4vw, 42px) auto; text-align: center; max-width: 540px; }
.workspace-empty h2 { font-size: clamp(23px, 3vw, 31px); letter-spacing: -.035em; margin: 14px 0 7px; }
.workspace-empty p { color: var(--muted); margin: 0 0 18px; }
.workspace-empty > svg { color: var(--accent); }
.workspace-account-select { max-width: 235px; }
.workspace-inbox-shortcut { display: flex; justify-content: end; padding: 14px clamp(16px, 3vw, 30px) 0; max-width: 1140px; margin-inline: auto; }
.workspace-exit { flex: none; gap: 6px; }
.workspace-language { flex: none; }
.workspace-language select { min-height: 35px; background: var(--card); width: auto; font-size: 12px; font-weight: 700; }
.workspace-login .workspace-language { position: absolute; right: 20px; top: 18px; }
.workspace-app :focus-visible, .workspace-login :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 899px) {
  .workspace-app .tabbar { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .workspace-app .tabbar button { font-size: clamp(8px, 2vw, 10px); min-height: 45px; line-height: 1.1; overflow-wrap: anywhere; }
}
@media (max-width: 560px) {
  .workspace-app .topbar { padding-inline: 11px; flex-wrap: nowrap; }
  .workspace-app .topbar .sub, .workspace-app .topbar .prof .nm, .workspace-app .workspace-exit span { display: none; }
  .workspace-app .topbar .prof { padding-inline: 6px; }
  .workspace-app .connector-head { align-items: start; }
}
@media (max-width: 390px) {
  .workspace-app .workspace-exit { padding-inline: 6px; min-width: 32px; }
  .workspace-app .topbar .primary { max-width: 93px; padding-inline: 7px; line-height: 1.2; }
}
.platform-contact-cards { display: none; }
@media (max-width: 650px) {
  .workspace-app .platform-table:has(+ .platform-contact-cards) { display: none; }
  .workspace-app .platform-contact-cards { display: grid; gap: 7px; }
  .platform-contact-cards article {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 12px 0; border-top: 1px solid var(--line);
  }
  .platform-contact-cards article > div { min-width: 0; overflow-wrap: anywhere; }
  .platform-contact-cards article small { display: block; color: var(--muted); }
  .platform-contact-cards article button { flex: none; }
}
