body.teleflow-viber-embed #workspace { grid-template-columns: minmax(0, 1fr); }
body.teleflow-viber-embed #workspace > aside { display: none; }
body.teleflow-viber-embed #workspace > .content { padding: 16px; min-width: 0; }
body.teleflow-viber-embed #workspace > .content > header { margin-bottom: 12px; flex-wrap: wrap; gap: 12px; }
body.teleflow-viber-embed #channels > .channel-tabs,
body.teleflow-viber-embed #channel-import-panel { display: none; }
body.teleflow-viber-embed #login { min-height: 560px; }
#teleflow-publisher-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#teleflow-publisher-toolbar button { min-height: 44px; }
#teleflow-publisher-toolbar button.active { background: #7360f2; color: #fff; }
#teleflow-publisher-toolbar .teleflow-publisher-tenant { margin-left: auto; display: grid; gap: 4px; font-size: .75rem; color: var(--muted); }
#teleflow-publisher-toolbar select { min-height: 44px; max-width: 240px; }
@media (max-width: 680px) {
  body.teleflow-viber-embed #workspace > .content { padding: 12px; }
  #teleflow-publisher-toolbar .teleflow-publisher-tenant { margin-left: 0; width: 100%; }
  #teleflow-publisher-toolbar select { max-width: none; width: 100%; }
}

.bundle-prompt-picker { display:flex; gap:8px; flex-wrap:wrap; }
.bundle-prompt-picker select { flex:1; min-width:160px; }
#bundle-prompt-order { padding-left:24px; }
#bundle-prompt-order li { padding:8px; border-bottom:1px solid var(--line); }
#bundle-prompt-order li > span { display:inline-block; margin-bottom:8px; }
.bundle-targets { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin-top:12px; }
.bundle-target-group { display:grid; align-content:start; gap:8px; }
.bundle-target-group label { display:flex; align-items:center; gap:8px; min-height:44px; }
.bundle-target-group input { width:auto; }
#bundle-form fieldset { min-width:0; border:1px solid var(--line); border-radius:10px; padding:16px; }
#bundle-feedback { white-space:pre-wrap; }

/* Bundles uses the same palette and control hierarchy as its Teleflow host. */
body.teleflow-bundles-embed {
  --panel:#182233; --surface:#111827; --text:#e7edf6; --line:#324057;
  --muted:#8fa1ba; --purple:#7c3aed; --green:#12b981;
  background:var(--surface); color:var(--text); color-scheme:dark;
  font-family:"Segoe UI",Arial,sans-serif;
}
body.teleflow-bundles-embed :is(.panel,.table-card,.login-card) { background:var(--panel); color:var(--text); box-shadow:none; border-color:var(--line); }
body.teleflow-bundles-embed :is(input,select,textarea) { background:var(--surface); color:var(--text); border-color:var(--line); border-radius:6px; }
body.teleflow-bundles-embed label { color:var(--text); }
body.teleflow-bundles-embed button { background:var(--purple); color:#fff; border-radius:6px; min-height:44px; }
body.teleflow-bundles-embed button.quiet { background:#202c40; color:var(--text); border:1px solid var(--line); }
body.teleflow-bundles-embed #teleflow-publisher-toolbar button.active { background:var(--purple); color:#fff; }
body.teleflow-bundles-embed button:disabled { opacity:.5; cursor:not-allowed; }
body.teleflow-bundles-embed :is(button,input,select):focus-visible { outline:2px solid var(--green); outline-offset:2px; }
body.teleflow-bundles-embed .table-card th { background:var(--panel); }
#bundle-form h4 { margin:0; }
#bundle-list button { white-space:nowrap; }
@media(max-width:680px) {
  #teleflow-bundles .section-head { flex-wrap:wrap; }
  #bundle-form { grid-template-columns:minmax(0,1fr); padding:12px; }
  .bundle-targets { grid-template-columns:minmax(0,1fr); }
}

#bundle-source label{display:flex;align-items:center;gap:8px;min-height:44px}#bundle-source input{width:auto}


body.teleflow-bundles-embed[data-theme="light"]{--panel:#fff;--surface:#f8fafc;--text:#17202b;--line:#d1d8e2;--muted:#5b6675;--purple:#6d4bd1;--green:#328315;background:#f2f5f8;color-scheme:light}
body.teleflow-bundles-embed[data-theme="light"] button.quiet{background:#eaf0f6;color:var(--text)}
