.skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
}
.skel-line {
  height: 12px;
  margin-bottom: .5rem;
}
.skel-line.short {
  width: 30%;
  height: 10px;
  margin-bottom: 0;
}
.skel-card {
  height: 132px;
  border-radius: var(--r-lg);
}
.skel-row {
  padding: .85rem 0;
  border-bottom: 1px solid var(--hairline);
}
.skel-row:last-child {
  border-bottom: none;
}
@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}
.video-lightbox {
  display: flex;
  position: fixed;
  z-index: 120;
  justify-content: center;
  align-items: center;
  inset: 0;
  padding: 1.5rem;
  background: rgba(6,9,16,.85);
  backdrop-filter: blur(8px);
}
.video-lightbox .vl-inner {
  position: relative;
  width: 100%;
  max-width: 880px;
}
.video-lightbox .vl-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: #000;
  box-shadow: var(--sh-lg);
}
.video-lightbox .vl-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-lightbox .vl-close {
  position: absolute;
  top: -2.6rem;
  right: 0;
  display: inline-flex;
  padding: .35rem;
  background: none;
  border: 0;
  color: #fff;
}
.video-lightbox .vl-close svg {
  width: 24px;
  height: 24px;
}
.video-lightbox .vl-yt {
  display: inline-block;
  margin-top: .7rem;
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  text-decoration: underline;
}
.chart-svg {
  display: block;
  width: 100%;
}
.bar {
  fill: var(--signal);
  opacity: 0.85;
}
.bar.bar-empty {
  fill: var(--border);
  opacity: 0.5;
}
.spark-area {
  fill: url(#sparkGrad);
}
.spark-line {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.connect-grid {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}
.connect-pick {
  display: flex;
  width: 100%;
  padding: 0.85rem;
  border: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  background: var(--surface-2);
  border-radius: var(--r);
  transition: border-color .15s, transform .12s var(--spring);
}
.connect-pick:hover {
  border-color: var(--signal);
  transform: translateY(-1px);
}
.connect-pick .ch-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
.connect-pick .cp-txt {
  display: flex;
  flex-direction: column;
}
.connect-pick .cp-txt span {
  font-weight: 650;
  font-size: .9rem;
}
.connect-pick .cp-txt small {
  color: var(--muted);
  font-size: .76rem;
  margin-top: .15rem;
}
.comments-banner {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: .7rem .9rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
}
.comments-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 1rem 0 .8rem;
}
.comments-tab {
  cursor: pointer;
  padding: .42rem .85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: .83rem;
  font-weight: 600;
}
.comments-tab.active {
  color: var(--text);
  border-color: var(--signal);
  background: color-mix(in srgb, var(--signal) 12%, transparent);
}
.post-row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  margin-bottom: .6rem;
}
.post-row .post-text {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.5;
}
.post-row .post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: .76rem;
  color: var(--muted-2);
}
.post-row .mono, .comment-row .mono {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--muted-2);
  word-break: break-all;
}
.comment-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: .8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  margin-bottom: .6rem;
}
.comment-row.hidden {
  opacity: .6;
}
.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: .8rem;
}
.comment-head .author {
  font-weight: 700;
  color: var(--text);
}
.comment-body {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.5;
}
.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.reply-box {
  display: flex;
  gap: 0.5rem;
  margin-top: .4rem;
}
.reply-box input {
  flex: 1;
}
.evidence-actions {
  margin-top: .9rem;
}
.evidence-recipient {
  margin-top: .85rem;
}
.ev-row {
  padding: .9rem 0;
  border-top: 1px solid var(--hairline);
}
.ev-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.ev-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.ev-badge {
  border-radius: var(--pill);
  padding: .18rem .45rem;
  font-size: .72rem;
  font-weight: 750;
}
.ev-badge.ok {
  background: var(--ok-soft);
  color: var(--ok-ink);
  border: 1px solid var(--ok-border);
}
.ev-badge.warn {
  background: var(--warn-soft);
  color: var(--warn-ink);
  border: 1px solid var(--warn-border);
}
.ev-badge.bad {
  background: var(--danger-soft);
  color: var(--danger-ink);
  border: 1px solid var(--danger-border);
}
.ev-group, .ev-trace {
  font-size: .76rem;
  color: var(--muted);
}
.ev-row details {
  margin-top: .65rem;
}
.ev-row summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  font-size: .82rem;
}
.json-box {
  max-height: 360px;
  overflow: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .8rem;
  font-size: .78rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.video-list {
  display: flex;
  overflow: auto;
  gap: 0.9rem;
  list-style: none;
  padding: 0 0 .35rem;
  scroll-snap-type: x mandatory;
}
.video-list li {
  flex: 0 0 210px;
  scroll-snap-align: start;
}
.video-list .video-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: .82rem;
  font-weight: 650;
  text-align: left;
}
.video-list .vthumb-wrap {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.video-list .vthumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-list .vplay {
  display: flex;
  position: absolute;
  justify-content: center;
  align-items: center;
  inset: 0;
  color: #fff;
  filter: drop-shadow(0 1px 5px rgba(0,0,0,.7));
}
.video-list .vplay svg {
  width: 46px;
  height: 46px;
}
.video-list .vlabel {
  line-height: 1.35;
}
.guide-steps .gstep {
  padding: .95rem 0;
  border-bottom: 1px solid var(--hairline);
}
.guide-steps .gstep:last-child {
  border-bottom: 0;
}
.guide-steps h3 {
  font-size: .95rem;
  font-weight: 750;
  margin-bottom: .35rem;
}
.guide-steps .gstep > div {
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.55;
}
.seg-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.carousel-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: .5rem;
}
.carousel-row input {
  flex: 1;
}
.management-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.page-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.page-subtitle {
  font-size: .82rem;
  color: var(--muted);
  margin-top: .15rem;
}
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.management-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.inline-error, .inline-note {
  padding: .65rem .8rem;
  border-radius: var(--r-xs);
  font-size: .82rem;
}
.inline-error {
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  color: var(--danger-ink);
}
.inline-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  color: var(--ok-ink);
}
.note-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1rem;
}
.skeleton-card {
  height: 132px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
}
.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}
.app-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
}
.app-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.app-name {
  font-size: 1rem;
  font-weight: 750;
  color: var(--text);
}
.app-head-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.app-body {
  padding: 0 1.1rem 1.1rem;
}
.app-meta, .muted-line {
  font-size: .78rem;
  color: var(--muted);
}
.mono, code {
  font-family: var(--mono);
}
.url-box {
  display: grid;
  align-items: center;
  gap: 0.55rem;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  margin-top: .65rem;
}
.url-box code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .74rem;
  color: var(--text-2);
}
.lbl {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.fwd-summary, .embed-block, .fwd-block, .mode-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}
.fwd-title {
  font-size: .78rem;
  font-weight: 750;
  color: var(--text);
  margin-bottom: .45rem;
}
.forward-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: .78rem;
  margin-top: .35rem;
}
.forward-line code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.grid2 {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr 1fr;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: .85rem;
}
.field label {
  font-size: .74rem;
  font-weight: 700;
  color: var(--text-2);
}
.field input, .field select {
  width: 100%;
  padding: .62rem .72rem;
  background: var(--inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
}
.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.field-actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
}
.field .field-action {
  padding: .2rem .45rem;
  font-size: .68rem;
}
.mode-toggle, .fwd-en {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: .8rem;
}
.hint {
  font-size: .74rem;
  color: var(--muted);
  margin: .2rem 0 .7rem;
}
.fwd-row {
  display: grid;
  align-items: center;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) 130px auto 38px;
  margin: .55rem 0;
}
.fwd-del {
  padding: .4rem .55rem;
}
@media screen and (max-width: 760px) {
  .grid2, .fwd-row, .url-box {
    grid-template-columns: 1fr;
  }
  .app-head {
    flex-direction: column;
    align-items: start;
  }
}
.management-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.page-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.page-subtitle {
  font-size: .82rem;
  color: var(--muted);
  margin-top: .15rem;
}
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.management-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.inline-error, .inline-note {
  padding: .65rem .8rem;
  border-radius: var(--r-xs);
  font-size: .82rem;
}
.inline-error {
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  color: var(--danger-ink);
}
.inline-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ok-soft);
  border: 1px solid var(--ok-border);
  color: var(--ok-ink);
}
.note-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1rem;
}
.skeleton-card {
  height: 132px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
}
.health-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.health {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  padding: 1rem;
}
.health-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.channel-identities {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
.identity-link {
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
}
.ch-avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-weight: 800;
  color: var(--muted);
  overflow: hidden;
}
.ch-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ch-avatar span {
  line-height: 1;
}
.ch-avatar.ch-waba {
  color: var(--waba-ink);
  background: var(--waba-soft);
}
.ch-avatar.ch-messenger {
  color: var(--messenger-ink);
  background: var(--messenger-soft);
}
.ch-avatar.ch-instagram {
  color: var(--instagram-ink);
  background: var(--instagram-soft);
}
.ch-app-avatar {
  color: var(--signal-ink);
  background: var(--signal-soft);
}
.health-name {
  flex-grow: 1;
  min-width: 0;
}
.nm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-weight: 750;
  color: var(--text);
}
.meta-line {
  font-size: .74rem;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.health-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.health-mid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: .9rem;
  min-width: 0;
}
.h-last {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: .76rem;
  line-height: 1.25;
  color: var(--muted);
  min-height: 22px;
}
.health-spark {
  width: 100%;
  height: 30px;
  overflow: hidden;
}
.health-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: .8rem;
}
.ch-chip {
  font-size: .72rem;
  padding: .25rem .45rem;
  border-radius: var(--pill);
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.messages-page textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: .62rem .72rem;
  background: var(--inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: inherit;
}
.msg-result {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.msg-result.ok {
  border-color: var(--signal);
  background: color-mix(in srgb, var(--signal) 8%, transparent);
}
.msg-result.error {
  border-color: var(--danger-border);
  background: var(--danger-soft);
}
.msg-result-title {
  font-weight: 700;
  font-size: .85rem;
  color: var(--text);
}
.msg-result .mono {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-2);
  word-break: break-all;
}
.msg-result-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: .8rem;
  color: var(--muted);
}
.msg-result-row b {
  color: var(--text-2);
}
.posts-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 1rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.post-card .post-thumb {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.post-card .post-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: .85rem .9rem;
  flex: 1;
}
.post-card .post-card-text {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.post-card .post-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: .74rem;
  color: var(--muted-2);
  margin-top: auto;
}
.post-card .post-card-meta .mono {
  font-family: var(--mono);
  font-size: .72rem;
  word-break: break-all;
}
.post-card .comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 .9rem .85rem;
}
.modal .modal-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1.1rem;
}
.post-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.post-form textarea {
  min-height: 90px;
  resize: vertical;
  width: 100%;
  font: inherit;
}
.template-button-row {
  display: grid;
  align-items: start;
  gap: 0.5rem;
  grid-template-columns: 145px minmax(0, 1fr) minmax(0, 1fr) 38px;
}
.template-button-row .field {
  margin-bottom: .45rem;
}
.template-channel-select select {
  min-width: 260px;
  padding: .58rem .7rem;
  background: var(--inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
}
.template-component {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: .8rem;
  color: var(--muted);
  padding: .5rem .6rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-xs);
  background: var(--surface-2);
}
.template-component b {
  color: var(--text);
}
.template-components {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.templates-page textarea {
  width: 100%;
  resize: vertical;
  padding: .62rem .72rem;
  background: var(--inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-family: inherit;
}
@media screen and (max-width: 760px) {
  .template-button-row {
    grid-template-columns: 1fr;
  }
  .template-channel-select, .template-channel-select select {
    width: 100%;
  }
}
.overview-layout {
  display: flex;
  align-items: start;
  gap: 1.5rem;
}
.overview-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-grow: 1;
  min-width: 0;
}
.overview-side {
  width: 256px;
  flex-shrink: 0;
}
.overview-row {
  display: flex;
  gap: 1.25rem;
}
.ov-flex {
  flex-grow: 1;
  min-width: 0;
}
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
  box-shadow: var(--sh-sm);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
}
.section-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-link {
  font-size: .75rem;
  color: var(--signal);
  text-decoration: none;
  font-weight: 600;
}
.section-link:hover {
  text-decoration: underline;
}
.kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}
.kpi-card {
  display: flex;
  position: relative;
  overflow: hidden;
  flex-direction: column;
  gap: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.15rem;
  min-height: 132px;
  box-shadow: var(--sh-sm);
}
.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.kpi-ico {
  display: flex;
  width: 34px;
  height: 34px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border-radius: 10px;
  color: #fff;
}
.kpi-ico svg {
  width: 18px;
  height: 18px;
}
.kpi-ico.apps {
  background: linear-gradient(140deg, #6366f1, #4f46e5);
}
.kpi-ico.chan {
  background: var(--signal-grad);
}
.kpi-ico.evt {
  background: linear-gradient(140deg, #f59e0b, #d97706);
}
.kpi-ico.fwd {
  background: linear-gradient(140deg, #0ea5e9, #0284c7);
}
.kpi-val {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.kpi-label {
  font-size: .76rem;
  font-weight: 500;
  color: var(--muted);
}
.kpi-sub {
  font-size: .72rem;
  color: var(--muted-2);
}
.kpi-spark {
  position: absolute;
  left: 0px;
  bottom: 0px;
  right: 0px;
  height: 30px;
  opacity: .9;
  pointer-events: none;
}
.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  padding: .12rem .4rem;
  border-radius: var(--pill);
}
.kpi-trend.up {
  color: var(--ok-ink);
  background: var(--ok-soft);
}
.kpi-trend svg {
  width: 11px;
  height: 11px;
}
.activity-chart-wrap {
  margin: 0 -.15rem;
}
.activity-peak {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: .62rem;
  color: var(--muted-3);
  margin-top: .3rem;
}
.mix-empty {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.65rem;
}
.mix-hint {
  font-size: .8rem;
  color: var(--muted);
}
.mix-bar {
  display: flex;
  height: 10px;
  border-radius: var(--pill);
  overflow: hidden;
  margin-bottom: .65rem;
  background: var(--surface-2);
}
.mix-seg {
  height: 100%;
  transition: width .3s;
}
.mix-seg.mix-waba {
  background: var(--waba);
}
.mix-seg.mix-messenger {
  background: var(--messenger);
}
.mix-seg.mix-instagram {
  background: linear-gradient(90deg, #f09433, #dc2743 48%, #bc1888);
}
.mix-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.mix-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: .78rem;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.dot-waba {
  background: var(--waba);
}
.dot.dot-messenger {
  background: var(--messenger);
}
.dot.dot-instagram {
  background: linear-gradient(135deg, #f09433, #bc1888);
}
.mix-name {
  flex-grow: 1;
  color: var(--text-2);
}
.mix-val {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ticker {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ticker-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: .4rem .45rem;
  border-radius: var(--r-xs);
  font-size: .78rem;
  transition: background .12s;
}
.ticker-row:hover {
  background: var(--surface-2);
}
.tk-rail {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--muted-3);
}
.tk-rail.tk-waba {
  background: var(--waba);
}
.tk-rail.tk-messenger {
  background: var(--messenger);
}
.tk-rail.tk-instagram {
  background: var(--instagram);
}
.tk-sum {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font-weight: 500;
}
.tk-app {
  font-size: .7rem;
  color: var(--muted-2);
  white-space: nowrap;
}
.tk-time {
  font-size: .7rem;
  color: var(--muted-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.panel-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.panel-eyebrow svg {
  width: 15px;
  height: 15px;
  color: var(--signal);
}
.panel-msg {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}
.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.check-item {
  display: flex;
  align-items: start;
  gap: 0.6rem;
  opacity: 0.55;
}
.check-item.done {
  opacity: 1;
}
.check-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted-3);
  margin-top: 1px;
}
.check-mark svg {
  width: 10px;
  height: 10px;
}
.check-mark .done & {
  background: var(--signal-soft);
  border-color: var(--signal-border);
  color: var(--signal);
}
.check-body {
  flex-grow: 1;
}
.check-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
}
.check-sub {
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.4;
}
.check-cta {
  margin-top: .15rem;
}
@media screen and (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-side {
    display: none;
  }
}
@media screen and (max-width: 760px) {
  .overview-row {
    flex-direction: column;
  }
}
@media screen and (max-width: 520px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}
.layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  display: flex;
  position: sticky;
  top: 0px;
  width: var(--side-w);
  height: 100vh;
  flex-direction: column;
  flex-grow: 0;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
}
:root[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0c0f17, #0a0c12);
}
.side-brand {
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.1rem 1rem;
}
.side-title {
  font-weight: 750;
  color: var(--text);
  font-size: .98rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.side-sub {
  font-size: .68rem;
  color: var(--muted-2);
  margin-top: 1px;
}
.side-sep {
  height: 1px;
  background: var(--hairline);
  margin: .25rem 1.1rem;
}
.nav-group-label {
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-3);
  padding: .5rem 1.25rem .35rem;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: .25rem .7rem;
}
.nav-item {
  display: flex;
  position: relative;
  width: 100%;
  align-items: center;
  gap: .65rem;
  background: none;
  border: none;
  text-align: left;
  padding: .56rem .7rem;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-weight: 600;
  font-size: .86rem;
  letter-spacing: -.01em;
  transition: background .14s, color .14s;
  text-decoration: none;
}
.nav-item svg {
  width: 17px;
  height: 17px;
  opacity: 0.9;
  flex-shrink: 0;
  transition: transform .15s var(--spring);
}
.nav-item .nav-label {
  flex-grow: 1;
  min-width: 0;
}
.nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.nav-item:hover svg {
  transform: translateX(1px);
}
.nav-item.active {
  color: var(--text);
  background: color-mix(in srgb, var(--signal) 12%, transparent);
}
.nav-item.active svg {
  opacity: 1.0;
  color: var(--signal);
}
.nav-item.active::before {
  position: absolute;
  top: 50%;
  left: -0.7rem;
  content: "";
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--signal);
  transform: translateY(-50%);
}
.side-spacer {
  flex-grow: 1;
}
.content {
  display: flex;
  min-width: 0px;
  flex-direction: column;
  flex-grow: 1;
}
.topbar {
  display: flex;
  position: sticky;
  top: 0px;
  z-index: 30;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 60px;
  min-height: 60px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.page-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.025em;
}
.lang-select {
  cursor: pointer;
  padding: .42rem 1.6rem .42rem .6rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  box-shadow: var(--sh-sm);
  transition: border-color .15s, color .15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a93a4' 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: right .5rem center;
}
.lang-select:hover {
  border-color: var(--muted-2);
  color: var(--text);
}
main {
  width: 100%;
  max-width: var(--maxw);
  flex-grow: 1;
  margin: 0 auto;
  padding: 1.6rem 1.5rem 2rem;
}
@media screen and (max-width: 900px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    position: sticky;
    top: 0px;
    z-index: 30;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    padding: .45rem .75rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .side-sep, .nav-group-label, .side-spacer {
    display: none;
  }
  .side-nav {
    overflow: scroll;
    flex-direction: row;
    padding: .2rem;
    margin-left: auto;
    gap: .15rem;
  }
  .nav-item {
    padding: .5rem .6rem;
  }
  .nav-item .nav-label {
    display: none;
  }
  .nav-item.active::before {
    display: none;
  }
}
@media screen and (max-width: 560px) {
  .sidebar {
    position: fixed;
    left: 0px;
    bottom: 0px;
    right: 0px;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: stretch;
    top: auto;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(12,17,32,.12);
    padding: .3rem .25rem;
    z-index: 40;
  }
  .side-brand {
    display: none;
  }
  .side-nav {
    display: contents;
  }
  .nav-item {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    gap: 0;
    padding: .62rem .1rem;
    border-radius: var(--r-sm);
    min-width: 0;
  }
  .nav-item svg {
    width: 23px;
    height: 23px;
  }
  .nav-item.active {
    background: var(--signal-soft);
  }
  .content {
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    padding: .55rem .9rem .6rem;
    gap: .5rem;
  }
  .topbar-left {
    width: 100%;
  }
  .topbar-right {
    width: 100%;
    justify-content: end;
    gap: 0.4rem;
  }
  main {
    padding: 1rem .9rem;
  }
}
.badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: .25rem;
  font-size: .66rem;
  font-weight: 700;
  padding: .16rem .5rem;
  border-radius: var(--pill);
  letter-spacing: .02em;
  border: 1px solid transparent;
}
.badge svg {
  width: 11px;
  height: 11px;
}
.badge.has-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.ok {
  background: var(--ok-soft);
  color: var(--ok-ink);
  border-color: var(--ok-border);
}
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn-ink);
  border-color: var(--warn-border);
}
.badge.danger {
  background: var(--danger-soft);
  color: var(--danger-ink);
  border-color: var(--danger-border);
}
.badge.neutral {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}
.badge.waba {
  background: var(--waba-soft);
  color: var(--waba-ink);
  border-color: color-mix(in srgb, var(--waba) 24%, transparent);
}
.badge.messenger {
  background: var(--messenger-soft);
  color: var(--messenger-ink);
  border-color: color-mix(in srgb, var(--messenger) 24%, transparent);
}
.badge.instagram {
  background: var(--instagram-soft);
  color: var(--instagram-ink);
  border-color: color-mix(in srgb, var(--instagram) 24%, transparent);
}
.btn {
  display: inline-flex;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-weight: 650;
  font-size: .84rem;
  white-space: nowrap;
  letter-spacing: -.01em;
  background: var(--signal-grad);
  color: #fff;
  box-shadow: var(--signal-glow);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), filter .15s var(--ease), background .15s;
  font-family: inherit;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.btn:active {
  transform: translateY(0);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(.2);
}
.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--sh-sm);
}
.btn.secondary:hover {
  background: var(--surface-2);
  border-color: var(--muted-2);
}
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
  box-shadow: none;
}
.btn.ghost:hover {
  color: var(--text);
  background: var(--surface-2);
}
.btn.danger {
  background: var(--danger-soft);
  color: var(--danger-ink);
  border-color: var(--danger-border);
  box-shadow: none;
}
.btn.danger:hover {
  filter: brightness(.98);
  border-color: var(--danger);
}
.btn.tiny {
  padding: .34rem .6rem;
  font-size: .74rem;
  border-radius: var(--r-xs);
}
.btn svg {
  width: 16px;
  height: 16px;
}
.icon-btn {
  padding: .48rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--muted);
  box-shadow: var(--sh-sm);
  border-radius: var(--r-sm);
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}
.kbd {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: .08rem .34rem;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
}
.drawer-overlay {
  position: fixed;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  z-index: 90;
  opacity: 0.0;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: opacity .22s var(--ease);
  visibility: hidden;
}
.drawer-overlay.open {
  opacity: 1.0;
  pointer-events: auto;
  visibility: visible;
}
.drawer {
  display: flex;
  position: absolute;
  top: 0px;
  right: 0px;
  width: 560px;
  height: 100vh;
  max-width: 94vw;
  overflow: hidden;
  flex-direction: column;
  background: var(--surface);
  box-shadow: var(--sh-lg);
  transform: translateX(100%);
  transition: transform .28s var(--ease);
}
.drawer.narrow {
  width: 460px;
}
.drawer-overlay.open .drawer {
  transform: translateX(0);
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
}
.drawer-head h3, .drawer-head .drawer-title {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -.01em;
}
.drawer-body {
  overflow: scroll;
  flex-grow: 1;
  padding: 1.4rem;
}
.drawer-foot {
  display: flex;
  justify-content: end;
  gap: 0.6rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.drawer-intro {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
@media screen and (max-width: 560px) {
  .drawer, .drawer.narrow {
    width: 100%;
    max-width: 100%;
  }
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 2.6rem 1rem;
  font-size: .86rem;
}
.empty-ico {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto .85rem;
  border-radius: 15px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted-2);
}
.empty-ico svg {
  width: 26px;
  height: 26px;
}
.empty-sub {
  font-size: .78rem;
  color: var(--muted-2);
}
.modal-overlay {
  display: flex;
  position: fixed;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  z-index: 100;
  padding: 1rem;
  justify-content: center;
  align-items: center;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: tabIn .18s ease;
}
.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 1.6rem;
}
.modal-msg {
  font-size: .92rem;
  color: var(--text);
  margin-bottom: 1.3rem;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  justify-content: end;
  gap: 0.6rem;
}
@keyframes tabIn {
  from {
    opacity: 0.0;
    transform: translateY(10px);
  }
  to {
    opacity: 1.0;
    transform: none;
  }
}
.toast {
  display: inline-flex;
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 140;
  max-width: 90vw;
  align-items: center;
  gap: .55rem;
  background: var(--text);
  color: var(--bg);
  padding: .7rem 1.1rem;
  border-radius: var(--r);
  font-size: .85rem;
  font-weight: 600;
  box-shadow: var(--sh-lg);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity .2s, transform .2s var(--spring);
  pointer-events: none;
}
.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.toast.show {
  opacity: 1.0;
  transform: translateX(-50%) translateY(0);
}
.toast.ok {
  background: var(--signal-2);
  color: #fff;
}
.toast.error {
  background: var(--danger);
  color: #fff;
}
.connect-page {
  display: flex;
  min-height: 100vh;
  padding: 1rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg);
}
.connect-box {
  width: 100%;
  max-width: 440px;
  padding: 2.4rem 2rem 2.4rem 2rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--sh-lg);
}
.connect-box .connect-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
}
.connect-box .connect-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}
.connect-box .connect-msg {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.55;
}
.connect-box .connect-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--signal);
  border-radius: 50%;
  animation: connect-spin .8s linear infinite;
  margin: 1.1rem auto 0;
}
.connect-box .connect-error {
  margin-top: 1rem;
  font-size: .85rem;
  text-align: left;
  white-space: pre-line;
  background: rgba(229,72,77,.1);
  border: 1px solid rgba(229,72,77,.3);
  color: var(--danger);
  border-radius: 10px;
  padding: .75rem 1rem;
}
.connect-box .connect-list {
  margin-top: 1rem;
  text-align: left;
  font-size: .82rem;
}
.connect-box .connect-list div {
  padding: .4rem .1rem;
  border-bottom: 1px solid var(--border);
}
.connect-box .connect-btn {
  border: unset;
  cursor: pointer;
  margin-top: 1.3rem;
  padding: .7rem 1.5rem;
  color: #fff;
  border-radius: 11px;
  font-size: .9rem;
  font-weight: 700;
  transition: transform .12s, filter .15s;
}
.connect-box .connect-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.connect-box .connect-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
.connect-foot {
  font-size: .76rem;
  color: var(--muted);
  text-align: center;
}
@keyframes connect-spin to {
  transform: rotate(360deg);
}