:root {
  --bg: #f7f7f8;
  --panel: #ffffff;
  --panel-soft: #fafafa;
  --text: #2f3033;
  --text-strong: #1d1d1f;
  --muted: #70737a;
  --muted-2: #a1a4ab;
  --line: #e8e8eb;
  --line-strong: #dcdcdf;
  --primary: #1d1d1f;
  --primary-hover: #000000;
  --secondary: #f1f2f4;
  --accent: #2bd66e;
  --accent-dark: #128c7e;
  --danger: #ef4138;
  --ok: #0b7a45;
  --warn: #9a650d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 20, 24, .035);
  --shadow-soft: 0 1px 2px rgba(20, 20, 24, .035);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 620;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

button:active { transform: scale(.98); }
button:disabled { cursor: not-allowed; opacity: .58; transform: none; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--panel);
  color: var(--text-strong);
  box-shadow: none;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(29, 29, 31, .34);
  box-shadow: 0 0 0 4px rgba(29, 29, 31, .07);
}

input::placeholder, textarea::placeholder { color: var(--muted-2); }

label {
  display: grid;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
}

.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
  background: #f7f7f8;
}

.auth-screen::before {
  content: none;
}

.auth-panel {
  width: min(448px, 100%);
  display: grid;
  gap: 12px;
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-logo-img {
  width: min(260px, 70vw);
  height: auto;
  justify-self: center;
  margin-bottom: 14px;
  mix-blend-mode: multiply;
}

.auth-copy {
  text-align: center;
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(2.24rem, 5vw, 3rem);
  line-height: 1;
  font-weight: 680;
  color: var(--text-strong);
}

.auth-copy p {
  margin: 0;
  max-width: 390px;
  justify-self: center;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--muted);
}

.auth-panel label {
  gap: 8px;
  font-size: .86rem;
  font-weight: 600;
  color: #3b3b40;
}

.auth-panel input {
  height: 52px;
  border-radius: 13px;
  border-color: #e3e4e7;
  background: #fff;
  padding: 0 18px;
  font-size: 1rem;
  box-shadow: none;
}

.auth-panel input:focus {
  border-color: #cfd2d8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 107, 95, .07);
}

.input-shell {
  position: relative;
}

.auth-submit {
  width: 100%;
  height: 54px;
  margin-top: 14px;
  border-radius: 13px;
  background: #1d1d1f;
  color: #fff;
  font-size: .98rem;
  font-weight: 620;
  box-shadow: none;
}

.auth-submit:hover {
  background: #111113;
}

.auth-footnote {
  margin: 8px 0 0;
  text-align: center;
  color: #8a8c92;
  font-size: .86rem;
  font-weight: 520;
}

.auth-panel .error {
  min-height: 18px;
  text-align: center;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-row strong { color: var(--text-strong); }
.brand-row h1, .brand-row p { margin: 0; }
.brand-row p, .hint, .topbar p { color: var(--muted); }
.compact { margin: 0; align-items: center; flex-direction: row; gap: 0; }
.compact span { display: none; }

.brand-wordmark {
  display: block;
  width: 186px;
  height: auto;
}

.sidebar .brand-row {
  position: absolute;
  top: 24px;
  left: max(72px, calc((100vw - 1120px) / 2));
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #0b6b5f;
  color: white;
  font-weight: 900;
  letter-spacing: 0;
  flex: 0 0 auto;
  box-shadow: 0 8px 22px rgba(11, 107, 95, .18);
}

.brand-mark-lg {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--primary);
  color: white;
}

.shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 132px minmax(0, 1fr);
}

.sidebar {
  background: #f4f4f5;
  color: var(--text);
  border-bottom: 1px solid #ececef;
  padding: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 132px;
  min-height: 132px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.sidebar nav {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  gap: 2px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(500px, calc(100vw - 144px));
  margin: 0;
  padding: 4px;
  border-radius: 999px;
  background: #ededee;
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.nav, .ghost {
  width: 100%;
  text-align: center;
  color: var(--muted);
  background: transparent;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  font-size: .9rem;
  font-weight: 520;
  letter-spacing: 0;
}

.sidebar .nav[data-view="settings"] {
  display: none;
}

.nav:hover, .ghost:hover {
  background: rgba(255, 255, 255, .56);
  color: var(--text-strong);
}

.nav.active {
  background: #fff;
  color: var(--text-strong);
  box-shadow: 0 1px 2px rgba(20, 20, 24, .08), 0 5px 14px rgba(20, 20, 24, .045);
}

.ghost {
  margin: 0;
}

.account-avatar {
  position: absolute;
  top: 35px;
  right: max(72px, calc((100vw - 1120px) / 2));
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  margin-left: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #686c72;
  font-size: .92rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
  opacity: 1;
  pointer-events: auto;
}

.account-avatar::before {
  content: none;
}

.account-view {
  position: fixed;
  z-index: 50;
  inset: 0;
  overflow: auto;
  padding: 82px 3vw 64px;
  background: rgba(247, 247, 248, .985);
}

.account-close {
  position: absolute;
  top: 28px;
  right: 32px;
  min-height: 36px;
  padding: 0 10px;
  background: transparent;
  color: #74777b;
  font-size: 2rem;
  font-weight: 350;
  line-height: 1;
}

.account-profile {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 4px auto 46px;
  text-align: center;
}

.account-avatar-large {
  position: static;
  width: 102px;
  height: 102px;
  min-height: 102px;
  margin: 0 0 22px;
  font-size: 2.7rem;
  font-weight: 430;
}

.account-profile h2 { margin: 0; color: var(--text-strong); font-size: 1.72rem; font-weight: 520; letter-spacing: 0; }
.account-profile p { margin: 0; color: #5d6064; font-size: 1rem; }

.account-details {
  max-width: 1250px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.account-row {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 1.02rem;
  font-weight: 450;
}

.account-row:hover { background: #fafafa; }
.account-row strong { color: var(--text); font-weight: 450; }
.account-row-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: rgba(29, 29, 31, .48);
}

.account-row-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.account-row-static:hover, .account-row-muted:hover { background: transparent; }
.account-row-muted { color: #686d72; }
.account-row-muted strong { color: #9ba0a4; font-size: .82rem; }

.account-logout {
  display: block;
  margin: 34px auto 0;
  background: transparent;
  color: var(--danger);
  font-weight: 500;
}

.content {
  padding: 34px 72px 68px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.shell.admin-mode {
  grid-template-columns: 1fr;
}

.shell.admin-mode > .sidebar {
  display: none;
}

.shell.admin-mode .content {
  max-width: none;
  padding: 0;
}

.view { display: none; }
.view.active {
  display: grid;
  gap: 20px;
  animation: fade-in .24s ease both;
}

.send-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 14px;
  align-items: start;
}

.send-layout {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(318px, .75fr);
  grid-template-areas:
    "composer preview"
    "composer destinations";
  gap: 16px;
  align-items: start;
}

.composer-panel {
  grid-area: composer;
  align-content: start;
}

.composer-panel textarea {
  min-height: 190px;
  resize: vertical;
}

.destinations-panel {
  grid-area: destinations;
  align-content: start;
  max-height: 548px;
  overflow: auto;
}

.inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
}

.compact-fields {
  grid-template-columns: minmax(220px, 280px) minmax(220px, 1fr);
  align-items: end;
}

.send-actions {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.connection-strip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
}

.mini-label {
  display: inline-flex;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-label {
  display: inline-flex;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 740;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-settings {
  display: grid;
  gap: 10px;
}

.performance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .85fr);
  gap: 12px;
}

.analytics-shell {
  display: grid;
  gap: 12px;
}

.analytics-overview {
  padding: 18px;
  overflow: visible;
}

.analytics-overview .panel-head {
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.drop-zone {
  position: relative;
  min-height: 108px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 22px;
  border: 1.5px dashed #dadde2;
  border-radius: 12px;
  background: #fcfcfc;
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.drop-zone:hover {
  border-color: rgba(29, 29, 31, .24);
  background: #fff;
}

.drop-zone.drag-over {
  border-color: #0b6b5f;
  background: #f2fbf6;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f0f1f3;
  color: var(--text-strong);
  font-size: 1.15rem;
  font-weight: 800;
}

.drop-zone strong {
  color: var(--text);
  font-size: .94rem;
}

.drop-zone small {
  color: var(--muted);
  font-weight: 600;
}

.preview-panel {
  grid-area: preview;
  gap: 16px;
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.preview-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.preview-bubble {
  min-height: 94px;
  padding: 16px;
  border-radius: 14px;
  color: #344054;
  line-height: 1.48;
  white-space: pre-wrap;
}

.whatsapp-preview .preview-bubble {
  background: #f1f7f3;
}

.settings-layout {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  margin: 0 auto;
}

.settings-back {
  display: none;
}

.settings-menu-card {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--text-strong);
  box-shadow: none;
  text-align: left;
}

.settings-menu-card span:first-child {
  display: grid;
  gap: 3px;
}

.settings-menu-card strong {
  font-size: .98rem;
  font-weight: 580;
  line-height: 1.15;
}

.settings-menu-card small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 450;
  line-height: 1.3;
}

.settings-menu-card span[aria-hidden="true"] {
  width: 8px;
  height: 8px;
  border-right: 1.8px solid #8a8d93;
  border-bottom: 1.8px solid #8a8d93;
  transform: rotate(-45deg);
  flex: 0 0 auto;
}

.whatsapp-connect-panel {
  gap: 14px;
  padding: 26px 28px 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  box-shadow: none;
}

.connection-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.connection-mark {
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  box-shadow: none;
}

.connection-hero h3 {
  margin: 0 0 5px;
  color: var(--text-strong);
  font-size: 1.08rem;
  font-weight: 600;
}

.connection-hero p {
  margin: 0;
  max-width: 680px;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.42;
}

.connection-status-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.connection-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px 18px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.connection-card:nth-child(n+2) {
  display: none;
}

.connection-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  flex-wrap: wrap;
  min-height: 28px;
}

.connection-action-row button {
  width: auto;
  min-height: 34px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #0b6b5f !important;
  font-size: .84rem;
  font-weight: 560;
  box-shadow: none !important;
}

.connection-action-row button:hover,
.connection-action-row button:active,
.connection-action-row button.primary {
  background: transparent !important;
  color: #0b6b5f !important;
  box-shadow: none !important;
  transform: none;
}

.connection-action-row .danger {
  display: none;
}

.qr-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.settings-qr {
  min-height: 0;
  display: grid;
  place-items: center;
  justify-items: center;
  padding: 18px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.settings-qr img {
  width: 284px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #ededf0;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.settings-qr .hint {
  max-width: 320px;
  margin: 8px auto 0;
  color: #777a80;
  font-size: .78rem;
  line-height: 1.35;
  text-align: center;
}

#settings .topbar {
  width: min(700px, 100%);
  margin: 0 auto;
  display: none;
}

#settings.view.active {
  gap: 0;
  align-content: start;
}

.qr-placeholder,
.qr-success {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 240px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.qr-placeholder strong,
.qr-success strong {
  color: var(--text-strong);
  font-size: 1.02rem;
}

.qr-placeholder span,
.qr-success span {
  max-width: 220px;
  font-size: .82rem;
  line-height: 1.45;
}

.qr-success {
  border-style: solid;
  background: #eefaf3;
  color: var(--ok);
}

.connection-steps {
  display: none;
  gap: 10px;
}

.connection-steps div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.connection-steps span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f0f1f3;
  color: var(--text-strong);
  font-size: .84rem;
  font-weight: 900;
}

.connection-steps p {
  margin: 0;
  color: var(--text);
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.4;
}

.settings-side {
  display: none;
  gap: 14px;
}

.account-panel {
  align-content: start;
}

.account-panel h3,
.settings-note-panel h3 {
  margin: 4px 0 0;
}

.account-panel button {
  min-height: 48px;
}

.settings-note-list {
  display: grid;
  gap: 10px;
}

.settings-note-list div {
  display: grid;
  gap: 3px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.settings-note-list strong {
  color: var(--text-strong);
  font-size: .86rem;
}

.settings-note-list span {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.muted-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.catalog-toolbar {
  width: min(720px, 100%);
}

.catalog-section-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
}

.catalog-section-head h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.14rem;
  font-weight: 720;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.showcase-card {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
}

.showcase-chip {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.34);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.showcase-body {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 18px;
  color: #fff;
}

.showcase-body h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.showcase-body p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-weight: 700;
}

.showcase-body .primary {
  margin-top: 8px;
  background: #25d366;
  color: #06140b;
  box-shadow: none;
}

.showcase-body .secondary {
  margin-top: 8px;
  background: rgba(255,255,255,.9);
  color: var(--text-strong);
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 12px;
}

.group-card {
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid rgba(229, 230, 233, .8);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.group-card:hover {
  border-color: #dfe1e5;
  box-shadow: 0 8px 22px rgba(20, 20, 24, .035);
}

.group-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background-color: #f4f4f5;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  color: var(--text-strong);
  font-weight: 900;
}

.group-avatar.fallback {
  background: #f0f1f3;
}

.group-card-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.group-card-kicker {
  color: #0b6b5f;
  font-size: .66rem;
  font-weight: 680;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.group-card h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 560;
}

.group-card p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 450;
}

.group-card button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 36px;
  border-radius: 999px;
}

.group-status {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #8a8d93;
  font-size: .78rem;
  font-weight: 480;
}

.group-status.ok {
  background: #eef7f3;
  color: #0b6b5f;
}

#catalog {
  width: min(1120px, 100%);
  margin: 0 auto;
}

#catalog .catalog-intro {
  min-height: 0;
  padding: 0;
  margin: 0 0 4px;
}

#catalog .catalog-intro h2 {
  font-size: 1.84rem;
  line-height: 1.08;
  font-weight: 620;
}

#catalog .catalog-intro p {
  max-width: 480px;
  font-size: .94rem;
}

#catalog .catalog-section-head {
  margin-top: 6px;
}

#catalog .catalog-groups-head {
  margin-top: 10px;
}

#catalog .catalog-link {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(29, 29, 31, .055);
  color: #0b6b5f;
  font-size: .86rem;
  font-weight: 580;
}

#catalog .catalog-link:hover {
  background: rgba(29, 29, 31, .08);
}

.tag.dark {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.22);
  color: #fff;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.category-card {
  width: auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(29, 29, 31, .055);
  color: #4f5257;
  text-align: left;
  box-shadow: none;
}

.category-card:hover {
  background: rgba(29, 29, 31, .075);
}

.category-card strong {
  order: 2;
  min-width: 23px;
  min-height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(29, 29, 31, .07);
  color: #4a4d52;
  font-size: .8rem;
  line-height: 1;
  font-weight: 560;
}

.category-card span {
  order: 1;
  color: #4a4d52;
  font-size: .86rem;
  line-height: 1.3;
  font-weight: 520;
}

#catalog.categories-expanded .category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
}

#catalog.categories-expanded .category-card {
  min-height: 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 18px;
  padding: 20px;
  border: 1px solid #e4e5e8;
  border-radius: 18px;
  background: #f2f3f5;
}

#catalog.categories-expanded .category-card span {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  color: #101114;
  font-size: 1.14rem;
  font-weight: 540;
}

#catalog.categories-expanded .category-card strong {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  min-width: 0;
  min-height: 0;
  display: block;
  padding: 0;
  background: transparent;
  color: #5e6268;
  font-size: 0;
  font-weight: 500;
}

#catalog.categories-expanded .category-card strong::before {
  content: attr(data-label);
  font-size: .92rem;
}

#catalog.categories-expanded .category-card::after {
  content: "Ver grupos";
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  color: #0b6b5f;
  font-size: .86rem;
  font-weight: 560;
  white-space: nowrap;
}

#catalog.categories-expanded .catalog-groups-head,
#catalog.categories-expanded #catalogList {
  display: none;
}

.destination-list {
  display: grid;
  gap: 9px;
}

.destination-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.destination-item input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.destination-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f0f1f3;
  color: #0b6b5f;
  font-weight: 800;
}

.destination-meta {
  min-width: 0;
}

.destination-meta strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.destination-meta small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.destination-platform {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}

.integration-details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.integration-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.compact-qr img {
  width: 180px;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.topbar h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.72rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
}

.topbar p {
  margin: 7px 0 0;
  font-size: .9rem;
}

.panel h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
  line-height: 1.25;
}

.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.primary:hover { background: var(--primary-hover); }
.full { width: 100%; justify-content: center; }

.secondary {
  background: var(--secondary);
  color: var(--text-strong);
  border: 1px solid #e3e4e8;
  box-shadow: var(--shadow-soft);
}

.secondary:hover {
  border-color: #d5d7dd;
  background: #e9eaed;
}

.danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid rgba(239, 65, 56, .22);
}

.danger:hover {
  background: rgba(239, 65, 56, .06);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.metric, .panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.metric {
  min-height: 108px;
  padding: 17px;
  display: grid;
  align-content: space-between;
  transition: border-color .18s ease, background .18s ease;
}

.metric:hover {
  border-color: #d7d9df;
  background: #fff;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 14px;
  color: var(--text-strong);
  font-size: 1.86rem;
  line-height: 1;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.performance-metrics {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.performance-metrics .metric {
  min-height: 118px;
  padding: 15px;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
  background: #f5f5f6;
}

.performance-metric small {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 520;
}

.performance-metric .metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.performance-metric .metric-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  border-radius: 999px;
  background: #ece8ff;
  position: relative;
}

.performance-metric .metric-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid #7a65e8;
  border-radius: 7px;
}

.performance-metric strong {
  margin-top: 10px;
  font-size: 1.72rem;
  font-weight: 640;
}

.performance-metric > span {
  color: #62656c;
  font-size: .86rem;
  font-weight: 560;
}

.spark {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f3;
}

.spark i {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: inherit;
  background: #1d1d1f;
}

.tone-positive .spark i { width: 76%; background: var(--accent); }
.tone-danger .spark i { width: 42%; background: var(--danger); }
.tone-neutral .spark i { background: #9fb4ba; }

.performance-chart-card {
  padding: 18px;
  box-shadow: none;
}

.performance-chart {
  height: 168px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding: 12px 6px 2px;
  border-top: 1px solid var(--line);
}

.performance-bar {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 8px;
}

.performance-bar span {
  width: 22px;
  align-self: end;
  border-radius: 999px 999px 4px 4px;
  background: #9fb4ba;
}

.performance-bar.tone-positive span {
  background: #2bd66e;
}

.performance-bar.tone-danger span {
  background: #ef4138;
}

.performance-bar small {
  color: #8a8d93;
  font-size: .72rem;
  font-weight: 520;
}

.panel {
  padding: 24px;
  display: grid;
  gap: 15px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.card {
  padding: 18px;
  display: grid;
  gap: 13px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.card:hover {
  border-color: #d7d9df;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .045);
  transform: translateY(-1px);
}

.card h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
  line-height: 1.3;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(29, 29, 31, .045);
  border: 0;
  color: #62656b;
  font-size: .72rem;
  font-weight: 500;
}

.table-panel {
  align-content: start;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row strong {
  display: block;
  color: var(--text-strong);
  font-size: .9rem;
}

.table-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .78rem;
}

.list {
  display: grid;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.row strong {
  color: var(--text-strong);
  font-weight: 800;
}

.row small, .muted {
  color: var(--muted);
  line-height: 1.5;
}

.ok, .warn, .bad {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.ok {
  color: var(--ok);
  background: rgba(11, 122, 69, .08);
  border-color: rgba(11, 122, 69, .18);
}

.warn {
  color: var(--warn);
  background: rgba(161, 98, 7, .08);
  border-color: rgba(161, 98, 7, .18);
}

.bad {
  color: var(--danger);
  background: rgba(239, 65, 56, .08);
  border-color: rgba(239, 65, 56, .18);
}

.status-line {
  color: var(--muted);
  font-weight: 700;
}

.status-line .ok,
.status-line .warn,
.status-line .bad,
.status-line .muted-pill {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #686c72;
  font-size: .82rem;
  font-weight: 560;
}

.status-line .ok {
  color: #0b6b5f;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-console-view.active {
  display: block;
  gap: 0;
}

.admin-console {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  background: #fbfbfd;
}

.admin-console-sidebar {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.admin-console-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 12px;
}

.admin-console-brand strong {
  display: block;
  color: var(--text-strong);
  font-size: 1.02rem;
  font-weight: 720;
}

.admin-console-brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
}

.icon-button {
  width: auto;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: .76rem;
}

.admin-nav-group {
  margin-top: 4px;
  padding: 0 12px;
  color: var(--muted-2);
  font-size: .64rem;
  font-weight: 720;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.admin-console-nav {
  display: grid;
  gap: 8px;
}

.admin-console-nav button {
  min-height: 42px;
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: .9rem;
  font-weight: 650;
}

.admin-console-nav button:hover {
  background: #f5f5f7;
  color: var(--text-strong);
}

.admin-console-nav button.active {
  background: #f0f1f3;
  color: var(--text-strong);
}

.admin-console-main {
  min-width: 0;
  padding: 44px 56px 58px;
  background: #fbfbfd;
}

.admin-console-header {
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.admin-console-header h2 {
  margin: 4px 0 8px;
  color: var(--text-strong);
  font-size: 2.2rem;
  line-height: 1;
  font-weight: 720;
}

.admin-console-header p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.admin-period-tabs {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 52px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.admin-period-tabs button {
  width: auto;
  min-height: 44px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 650;
}

.admin-period-tabs button.active {
  color: var(--text-strong);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: grid;
  gap: 20px;
  animation: fade-in .2s ease both;
}

.admin-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-section-title h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.42rem;
  line-height: 1.1;
  font-weight: 720;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(380px, .88fr) minmax(0, 1.12fr);
  gap: 16px;
  align-items: start;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(340px, .58fr);
  gap: 16px;
  align-items: start;
}

.admin-overview-card {
  min-height: 360px;
  align-content: start;
  gap: 20px;
  padding: 22px 24px;
}

.admin-console .panel,
.admin-console .metric,
.admin-console .row,
.admin-console input,
.admin-console select,
.admin-console textarea {
  border-radius: 10px;
}

.admin-console .primary,
.admin-console .secondary,
.admin-console .danger {
  border-radius: 999px;
}

.admin-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}

.admin-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #1d1d1f;
}

.admin-chart-legend span:nth-child(2) i {
  background: #9aa8b0;
}

.admin-overview-number {
  display: grid;
  gap: 8px;
  padding-top: 6px;
}

.admin-overview-number strong {
  color: var(--text-strong);
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 650;
}

.admin-overview-number span {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

.admin-line-chart {
  position: relative;
  height: 178px;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.admin-line-chart > span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.admin-line-chart > span:nth-child(1) { top: 28%; }
.admin-line-chart > span:nth-child(2) { top: 58%; }
.admin-line-chart > span:nth-child(3) { top: 88%; }

.admin-line-chart svg {
  position: absolute;
  inset: 18px 0 0;
  width: 100%;
  height: calc(100% - 18px);
}

.admin-line-chart polyline {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.line-current {
  stroke: #1d1d1f;
}

.line-previous {
  stroke: #9aa8b0;
  stroke-dasharray: 4 4;
}

.admin-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .58fr);
  gap: 16px;
  align-items: start;
}

.admin-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-health-card {
  min-height: 88px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.admin-health-card span {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-health-card strong {
  color: var(--text-strong);
  font-size: 1.42rem;
  line-height: 1.1;
}

.admin-health-card small {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.admin-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 4px;
}

.admin-quick-actions button {
  min-height: 42px;
  border-radius: 12px;
}

.admin-card {
  align-content: start;
}

.admin-card-head {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
}

.admin-card-head h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 720;
}

.admin-subsection {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.source-form {
  display: grid;
  gap: 12px;
}

.source-link-list {
  margin-top: 6px;
}

.source-link-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-metrics .metric {
  min-height: 142px;
  padding: 20px;
}

.admin-metrics {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.admin-metrics .metric strong {
  font-size: 1.9rem;
}

.admin-kpi {
  align-content: space-between;
}

.admin-kpi > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-kpi small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.4;
}

.admin-kpi-action {
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
}

.admin-kpi-action:hover {
  background: var(--secondary);
  color: var(--primary);
}

.admin-activity-card {
  min-height: 360px;
}

.admin-group-form {
  align-items: start;
}

.form-grid textarea,
.form-grid h3,
.admin-card-head,
.check-list,
.error {
  grid-column: 1 / -1;
}

.customer-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 62px;
}

.admin-group-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 76px;
}

.admin-group-row .group-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.admin-group-row .danger {
  min-height: 34px;
  padding: 0 12px;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-list.single {
  grid-template-columns: 1fr;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.qr-box {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.qr-box img {
  width: 248px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

#settings .settings-qr {
  justify-items: center;
}

#settings .settings-qr img {
  width: 292px;
  border-radius: 14px;
  box-shadow: none;
}

#settings .settings-qr .hint {
  max-width: 300px;
  margin: 4px auto 0;
  text-align: center;
}

.error {
  color: var(--danger);
  font-weight: 800;
  font-size: .86rem;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 15px;
  border: 1px solid rgba(11, 122, 69, .18);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text-strong);
  box-shadow: 0 16px 36px rgba(16, 35, 40, .14);
  font-size: .86rem;
  font-weight: 800;
}

.toast.ok {
  border-color: rgba(11, 122, 69, .2);
  background: #f2fbf5;
  color: var(--ok);
}

.toast.bad {
  border-color: rgba(239, 65, 56, .22);
  background: #fff7f6;
  color: var(--danger);
}

.hint {
  font-size: .78rem;
  line-height: 1.55;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1040px) {
  .metric-grid, .card-grid, .showcase-grid, .group-grid, .category-grid, .performance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-workspace {
    grid-template-columns: 1fr;
  }
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .admin-secondary-grid {
    grid-template-columns: 1fr;
  }
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-health-grid,
  .admin-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-console {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .admin-console-main {
    padding: 34px 28px 42px;
  }
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: 108px minmax(0, 1fr);
  }
  .sidebar {
    position: static;
    min-height: 108px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 22px;
  }
  .sidebar .brand-row { top: 20px; left: 22px; }
  .sidebar nav {
    left: 22px;
    right: 22px;
    bottom: 10px;
    transform: none;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .account-avatar { top: 17px; right: 22px; }
  .sidebar nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ghost { margin-top: 12px; }
  .send-grid, .send-layout, .performance-grid, .settings-layout, .filters, .form-grid, .check-list, .inline-fields, .send-actions, .qr-stage { grid-template-columns: 1fr; }
  .send-layout {
    grid-template-areas:
      "composer"
      "preview"
      "destinations";
  }
  .connection-status-row {
    grid-template-columns: 1fr;
  }
  .destinations-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .composer-panel {
    min-height: 0;
  }
  .content { padding: 30px 22px 54px; }
  .topbar { flex-direction: column; min-height: 0; }
  .shell.admin-mode .content { padding: 0; }
  .admin-console {
    grid-template-columns: 1fr;
  }
  .admin-console-sidebar {
    min-height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-console-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-console-header {
    flex-direction: column;
  }
  .admin-period-tabs {
    overflow-x: auto;
  }
}

@media (max-width: 620px) {
  body,
  .shell,
  .content {
    background: #f4f4f5;
  }
  .shell {
    grid-template-rows: 116px minmax(0, 1fr);
  }
  .auth-screen { align-items: start; padding: 74px 24px 32px; }
  .auth-panel { padding: 0; }
  .auth-logo-img { width: min(280px, 78vw); }
  .auth-copy h1 { font-size: 2.56rem; }
  .auth-copy p { font-size: .9rem; }
  .auth-panel input { height: 56px; font-size: 16px; }
  .auth-submit { height: 58px; }
  .metric-grid, .card-grid, .showcase-grid, .group-grid, .category-grid, .performance-metrics { grid-template-columns: 1fr; }
  .showcase-card { min-height: 250px; }
  .group-card { min-height: 0; grid-template-columns: 1fr; gap: 10px; padding: 16px; border-radius: 14px; }
  .group-avatar { display: none; }
  .catalog-section-head { align-items: flex-start; flex-direction: column; }
  .row, .customer-row, .admin-group-row { grid-template-columns: 1fr; }
  .sidebar {
    height: 116px;
    min-height: 116px;
    padding: 0 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 58px 42px;
    grid-template-areas:
      "brand settings"
      "nav nav";
    align-items: center;
    column-gap: 16px;
    background: #f4f4f5;
    border-bottom: 1px solid #e9e9eb;
  }
  .sidebar .brand-row {
    grid-area: brand;
    position: static;
    height: auto;
    max-width: none;
    overflow: hidden;
    display: flex;
    align-items: center;
  }
  .brand-wordmark { width: 174px; display: block; }
  .sidebar .account-avatar {
    grid-area: settings;
    position: static;
    width: auto;
    height: auto;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(1px);
    padding: 0;
    margin-top: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5f6369;
    font-size: .86rem;
    font-weight: 500;
    line-height: 1;
    box-shadow: none;
  }
  .sidebar .account-avatar::before {
    content: none;
  }
  .sidebar nav {
    grid-area: nav;
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    transform: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 2px;
    height: 42px;
    min-height: 42px;
    padding: 4px;
    overflow: visible;
    border: 0;
    background: #ededee;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7);
  }
  .sidebar .nav[data-view="performance"],
  .sidebar .nav[data-view="settings"] { display: none; }
  .sidebar .nav {
    width: 100%;
    height: 34px;
    min-height: 34px;
    padding: 0 8px;
    font-size: .82rem;
    font-weight: 500;
    color: #75777d;
    flex: none;
  }
  .sidebar .nav.active {
    color: #2f3033;
    box-shadow: 0 1px 2px rgba(20, 20, 24, .06), 0 6px 14px rgba(20, 20, 24, .045);
  }
  .shell.settings-mode .sidebar {
    height: 78px;
    min-height: 78px;
  }
  .shell.settings-mode {
    grid-template-rows: 78px minmax(0, 1fr);
  }
  .shell.settings-mode .sidebar nav {
    display: none;
  }
  .content { padding: 14px 18px 48px; }
  .shell.catalog-mode .content {
    margin-top: 0;
    padding-top: 12px;
  }
  .shell.settings-mode .content { padding-top: 4px; }
  #send .topbar { display: none; }
  .view.active { gap: 16px; }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .topbar h2 { font-size: 1.48rem; }
  .topbar p { line-height: 1.45; }
  #catalog.view.active {
    gap: 12px;
    padding-top: 0;
    margin-top: 0;
    align-content: start;
  }
  #catalog .topbar {
    display: none !important;
    min-height: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
  #catalog .topbar > * {
    display: none !important;
  }
  #catalog .topbar .eyebrow {
    display: none;
  }
  #catalog .topbar h2 {
    max-width: 340px;
    margin: 0;
    color: #050505;
    font-size: 1.72rem;
    line-height: 1.12;
    font-weight: 640;
  }
  #catalog .topbar p {
    max-width: 300px;
    margin: 10px 0 0;
    color: #73767c;
    font-size: .88rem;
    line-height: 1.45;
  }
  .catalog-toolbar {
    width: 100%;
    padding: 0 4px;
    margin-top: 0 !important;
  }
  .catalog-toolbar input {
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    padding: 0 18px;
    color: #303238;
    font-size: 16px;
    box-shadow: inset 0 0 0 1px #e7e8eb;
  }
  #catalog .catalog-section-head {
    margin: 10px 4px -2px;
    align-items: center;
    flex-direction: row;
  }
  #catalog .catalog-groups-head {
    margin-top: 12px;
  }
  #catalog .catalog-section-head h3 {
    font-size: 1.18rem;
    line-height: 1.12;
    font-weight: 580;
  }
  #catalog .catalog-section-head .muted {
    max-width: 92px;
    text-align: right;
    font-size: .76rem;
    line-height: 1.25;
  }
  #catalog .catalog-link {
    width: auto;
    min-height: 0;
    padding: 0;
    background: transparent;
    color: #0b6b5f;
    font-size: .8rem;
    line-height: 1.25;
    font-weight: 560;
    text-align: right;
  }
  #catalog .category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 4px 4px;
  }
  #catalog .category-card {
    width: auto;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 8px 0 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(29, 29, 31, .055);
    color: #4f5257;
    box-shadow: none;
  }
  #catalog .category-card span {
    order: 1;
    color: #4a4d52;
    font-size: .8rem;
    font-weight: 520;
  }
  #catalog .category-card strong {
    order: 2;
    min-width: 24px;
    min-height: 19px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(29, 29, 31, .07);
    color: #4a4d52;
    font-size: .74rem;
    font-weight: 560;
  }
  #catalog .category-card.active {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #dfe1e4;
  }
  #catalog .category-card.active span,
  #catalog .category-card.active strong {
    color: #1f2227;
  }
  #catalog.categories-expanded .category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 4px;
  }
  #catalog.categories-expanded .category-card {
    min-height: 92px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: start;
    gap: 8px 14px;
    padding: 18px 20px;
    border: 1px solid #e4e5e8;
    border-radius: 18px;
    background: #f2f3f5;
    color: #111;
    text-align: left;
  }
  #catalog.categories-expanded .category-card span {
    order: 0;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    color: #101114;
    font-size: 1.12rem;
    line-height: 1.12;
    font-weight: 540;
  }
  #catalog.categories-expanded .category-card strong {
    order: 0;
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    min-width: 0;
    min-height: 0;
    display: block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #5e6268;
    font-size: .84rem;
    line-height: 1.2;
    font-weight: 500;
  }
  #catalog.categories-expanded .category-card strong {
    font-size: 0;
  }
  #catalog.categories-expanded .category-card strong::before {
    content: attr(data-label);
    font-size: .84rem;
  }
  #catalog.categories-expanded .category-card::after {
    content: "Ver grupos";
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    color: #0b6b5f;
    font-size: .84rem;
    font-weight: 560;
    white-space: nowrap;
  }
  #catalog.categories-expanded .catalog-groups-head,
  #catalog.categories-expanded #catalogList {
    display: none;
  }
  #catalog .group-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 4px;
  }
  #catalog .group-card {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid rgba(229, 230, 233, .82);
    border-radius: 16px;
    background: rgba(255, 255, 255, .82);
    box-shadow: none;
  }
  #catalog .group-avatar {
    display: none;
  }
  #catalog .group-card-main {
    gap: 4px;
    align-self: center;
  }
  #catalog .group-card-kicker {
    color: #0b6b5f;
    font-size: .6rem;
    letter-spacing: .16em;
    font-weight: 660;
  }
  #catalog .group-card h3 {
    font-size: .96rem;
    line-height: 1.22;
    font-weight: 560;
  }
  #catalog .group-card p {
    font-size: .78rem;
    font-weight: 500;
  }
  #catalog .tags {
    display: none;
  }
  #catalog .tag {
    min-height: 24px;
    padding: 0 9px;
    border: 0;
    background: #f0f0f1;
    color: #60636a;
    font-size: .72rem;
    font-weight: 700;
  }
  #catalog .group-card button {
    grid-column: 1 / -1;
    min-height: 38px;
    margin-top: 6px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 560;
  }
  #catalog .group-status {
    grid-column: 1 / -1;
    min-height: 0;
    margin-top: 2px;
    padding: 0;
    font-size: .76rem;
    font-weight: 480;
  }
  #catalog .group-card button.primary {
    background: #25d366;
    color: #06140b;
  }
  #catalog .group-card button:disabled {
    background: #eeeeef;
    color: #6b6d72;
    opacity: 1;
  }
  #performance.view.active {
    gap: 12px;
    align-content: start;
  }
  #performance .topbar {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 0 4px;
  }
  #performance .topbar .eyebrow {
    font-size: .66rem;
    letter-spacing: .18em;
    font-weight: 620;
  }
  #performance .topbar h2 {
    margin-top: 6px;
    font-size: 1.34rem;
    line-height: 1.08;
    font-weight: 620;
  }
  #performance .topbar p {
    max-width: 270px;
    margin-top: 7px;
    font-size: .82rem;
    line-height: 1.38;
  }
  #performance #refreshBtn {
    width: auto;
    min-height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0b6b5f;
    box-shadow: none;
    font-size: .8rem;
    font-weight: 560;
  }
  #performance .analytics-shell,
  #performance .performance-grid {
    gap: 10px;
  }
  #performance .analytics-overview,
  #performance .performance-chart-card,
  #performance .table-panel {
    padding: 16px;
    border: 0;
    border-radius: 18px;
    box-shadow: none;
  }
  #performance .analytics-overview .panel-head {
    padding-bottom: 12px;
  }
  #performance .analytics-overview .panel-head h3,
  #performance .performance-chart-card .panel-head h3,
  #performance .table-panel .panel-head h3 {
    margin: 0;
    font-size: .98rem;
    font-weight: 590;
  }
  #performance .performance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  #performance .performance-metrics .metric {
    min-height: 104px;
    padding: 13px;
    border-radius: 14px;
    background: #f4f4f5;
  }
  #performance .performance-metric .metric-icon {
    width: 24px;
    height: 24px;
  }
  #performance .performance-metric strong {
    margin-top: 8px;
    font-size: 1.48rem;
  }
  #performance .performance-metric > span {
    font-size: .8rem;
  }
  #performance .spark {
    display: none;
  }
  #performance .performance-chart {
    height: 142px;
    gap: 10px;
    padding: 10px 0 0;
  }
  #performance .performance-bar span {
    width: 20px;
  }
  #performance .performance-grid {
    grid-template-columns: 1fr;
  }
  #performance .table-row {
    min-height: 50px;
    padding: 10px 0;
  }
  #settings.view.active {
    gap: 0;
    align-content: start;
  }
  .settings-back {
    width: auto;
    height: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-self: start;
    margin: 0 auto 14px;
    width: min(394px, 100%);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #6f7379;
    font-size: .8rem;
    font-weight: 500;
    box-shadow: none;
    line-height: 1;
  }
  .settings-back::before {
    content: "";
    width: 7px;
    height: 7px;
    border-left: 1.7px solid currentColor;
    border-bottom: 1.7px solid currentColor;
    transform: rotate(45deg);
  }
  .settings-back::after {
    content: "Voltar";
  }
  #settings .topbar {
    display: none;
  }
  #settings .topbar .eyebrow {
    display: none;
  }
  #settings .topbar h2 {
    margin: 0;
    font-size: 1.62rem;
    line-height: 1.08;
    font-weight: 620;
  }
  #settings .topbar p {
    max-width: 320px;
    margin: 8px 0 0;
    font-size: .88rem;
    line-height: 1.42;
  }
  .settings-layout {
    gap: 0;
  }
  .settings-side {
    display: none;
  }
  .whatsapp-connect-panel {
    padding: 17px 20px 20px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: none;
    gap: 10px;
  }
  .connection-hero {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 13px;
    padding-bottom: 14px;
  }
  .connection-mark {
    width: 34px;
    height: 34px;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
    box-shadow: none;
  }
  .connection-hero h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 590;
  }
  .connection-hero p {
    max-width: 290px;
    font-size: .78rem;
    line-height: 1.38;
  }
  .connection-status-row {
    grid-template-columns: 1fr;
  }
  .connection-card {
    min-height: 34px;
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .connection-card:nth-child(n+2) {
    display: none;
  }
  .connection-card .mini-label {
    color: #777a80;
    font-size: .68rem;
    letter-spacing: .11em;
    font-weight: 620;
  }
  .status-line {
    justify-self: end;
  }
  .status-line .ok,
  .status-line .warn,
  .status-line .bad,
  .status-line .muted-pill {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #686c72;
    font-size: .78rem;
    font-weight: 520;
  }
  .status-line .ok {
    color: #0b6b5f;
  }
  .connection-action-row {
    grid-column: 3 / 4;
    justify-content: flex-end;
    justify-self: end;
    gap: 0;
    margin-top: 0;
  }
  .connection-action-row button {
    width: auto;
    min-height: 34px;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    color: #0b6b5f !important;
    font-size: .8rem;
    font-weight: 540;
    box-shadow: none !important;
  }
  .connection-action-row button:hover,
  .connection-action-row button:active,
  .connection-action-row button.primary {
    background: transparent !important;
    color: #0b6b5f !important;
    box-shadow: none !important;
    transform: none;
  }
  .connection-action-row .danger {
    display: none;
  }
  .qr-stage {
    grid-template-columns: 1fr;
  }
  .connection-steps {
    display: none;
  }
  .settings-qr {
    min-height: 0;
    padding: 8px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    justify-items: center;
  }
  .settings-qr img {
    width: 246px;
    padding: 6px;
    border: 1px solid #eeeeef;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
  }
  .settings-qr .hint {
    max-width: 260px;
    margin: 9px auto 0;
    color: #777a80;
    font-size: .74rem;
    line-height: 1.35;
    text-align: center;
  }
  .qr-placeholder,
  .qr-success {
    min-height: 230px;
    border-color: #dedfe3;
    border-radius: 16px;
  }
  .composer-panel {
    padding: 0 4px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .preview-panel, .destinations-panel {
    padding: 20px;
    border-color: #ececef;
    border-radius: 18px;
    box-shadow: none;
  }
  .panel-head .secondary {
    width: auto;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #e3e4e7;
    border-radius: 999px;
    background: #fff;
    color: #5f6369;
    font-size: .82rem;
    font-weight: 500;
    box-shadow: none;
  }
  .composer-panel {
    gap: 13px;
  }
  .composer-panel .panel-head {
    display: none;
  }
  .composer-panel .panel-head h3 {
    font-size: 1.08rem;
    line-height: 1.08;
  }
  #selectedCount {
    max-width: 60%;
    padding-top: 11px;
    text-align: right;
    font-size: .9rem;
    line-height: 1.2;
    font-weight: 400;
  }
  .composer-panel label {
    gap: 7px;
    color: #34363a;
    font-size: .82rem;
    font-weight: 560;
  }
  .composer-panel input,
  .composer-panel textarea {
    border-radius: 13px;
    border-color: #e5e6e9;
    background: #fff;
    padding: 13px 16px;
    font-size: 16px;
    box-shadow: none;
  }
  .composer-panel input::placeholder,
  .composer-panel textarea::placeholder {
    color: #aeb2b8;
    font-weight: 500;
  }
  .composer-panel textarea { min-height: 154px; }
  .drop-zone {
    min-height: 78px;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    place-items: center start;
    gap: 4px 12px;
    padding: 14px 16px;
    border-color: #e0e2e6;
    border-radius: 15px;
    background: #fff;
    text-align: left;
  }
  .drop-icon {
    grid-row: 1 / 3;
    width: 32px;
    height: 32px;
    font-size: 1.08rem;
  }
  .drop-zone strong {
    align-self: end;
    font-size: .94rem;
    font-weight: 560;
  }
  .drop-zone small {
    align-self: start;
    font-size: .68rem;
    line-height: 1.35;
    white-space: nowrap;
    font-weight: 520;
  }
  .send-actions { gap: 12px; }
  .send-actions input { min-height: 48px; }
  .send-actions .primary {
    min-height: 52px;
    border-radius: 13px;
    font-size: .95rem;
    font-weight: 500;
  }
  .send-actions .primary:disabled {
    background: #e6e6e8;
    color: #74777d;
    opacity: 1;
    box-shadow: none;
  }
  .destination-item { grid-template-columns: auto auto minmax(0, 1fr); }
  .destination-platform { display: none; }
  .account-view {
    inset: 12px 0 0;
    padding: 68px 20px 34px;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -18px 60px rgba(0, 0, 0, .16);
  }
  .account-close { top: 18px; right: 18px; }
  .account-profile { margin-bottom: 34px; }
  .account-avatar-large { width: 96px; height: 96px; min-height: 96px; font-size: 2.5rem; }
  .account-profile h2 { font-size: 1.5rem; }
  .account-profile p { max-width: 82vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .account-row { min-height: 66px; font-size: .96rem; grid-template-columns: 32px minmax(0, 1fr) auto; }
  .account-row strong { max-width: 46vw; overflow-wrap: anywhere; text-align: right; font-size: .92rem; }
  .account-row-icon { width: 32px; height: 32px; }
  .account-row-icon svg { width: 21px; height: 21px; }
  .admin-console-main { padding: 24px 16px 36px; }
  .admin-console-header h2 { font-size: 1.84rem; }
  .admin-section-title { align-items: flex-start; flex-direction: column; }
  .admin-health-grid,
  .admin-quick-actions,
  .admin-metrics {
    grid-template-columns: 1fr;
  }
  button { width: 100%; }
  .sidebar button { width: auto; }
}

#performance #waHealth {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #777a80;
  font-size: .78rem;
  font-weight: 500;
  line-height: 1;
}

#performance #waHealth.ok {
  color: #0b6b5f;
}

#performance #waHealth.warn,
#performance #waHealth.bad {
  color: #777a80;
}

.reach-chart-card {
  padding: 18px;
  box-shadow: none;
}

.reach-chart {
  height: 148px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding-top: 8px;
}

.reach-day {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.reach-track {
  width: 100%;
  height: 82px;
  display: grid;
  align-items: end;
  border-bottom: 1px solid #e5e6e8;
}

.reach-track span {
  width: 8px;
  justify-self: center;
  border-radius: 999px 999px 0 0;
  background: #0b6b5f;
}

.reach-day strong {
  color: #4e5258;
  font-size: .72rem;
  font-weight: 520;
  line-height: 1;
}

.reach-day small {
  color: #9699a0;
  font-size: .7rem;
  font-weight: 450;
  line-height: 1;
  text-transform: lowercase;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.pager button {
  width: auto;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0b6b5f;
  box-shadow: none;
  font-size: .78rem;
  font-weight: 520;
}

.pager button:disabled {
  color: #b5b7bc;
  opacity: 1;
}

.pager span {
  color: #8a8d93;
  font-size: .76rem;
  font-weight: 450;
}

@media (max-width: 620px) {
  #performance .analytics-shell {
    gap: 10px;
  }

  #performance .reach-chart-card {
    padding: 18px;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: none;
  }

  #performance .reach-chart-card .panel-head {
    padding-bottom: 12px;
    border-bottom: 1px solid #eeeeef;
  }

  #performance .reach-chart-card .panel-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 590;
  }

  #performance .reach-chart {
    height: 130px;
    gap: 7px;
  }

  #performance .reach-track {
    height: 70px;
  }

  #performance .reach-track span {
    width: 7px;
  }

  #performance .pager button {
    width: auto;
  }
}

#catalog:not(.categories-expanded) .category-grid {
  gap: 8px;
}

#catalog:not(.categories-expanded) .category-card {
  min-height: 31px;
  gap: 0;
  padding: 0 13px;
  border: 1px solid rgba(229, 230, 233, .72);
  background: rgba(255, 255, 255, .54);
  color: #4f5257;
}

#catalog:not(.categories-expanded) .category-card:hover,
#catalog:not(.categories-expanded) .category-card.active {
  border-color: rgba(11, 107, 95, .18);
  background: rgba(255, 255, 255, .86);
  box-shadow: none;
}

#catalog:not(.categories-expanded) .category-card span {
  color: #4e5258;
  font-size: .82rem;
  font-weight: 500;
}

#catalog:not(.categories-expanded) .category-card strong {
  display: none;
}

#catalog:not(.categories-expanded) .category-card strong::before {
  content: none;
}

@media (max-width: 620px) {
  #catalog:not(.categories-expanded) .category-grid {
    gap: 7px;
    padding-inline: 0;
  }

  #catalog:not(.categories-expanded) .category-card {
    min-height: 29px;
    padding: 0 12px;
  }

  #catalog:not(.categories-expanded) .category-card span {
    font-size: .8rem;
  }
}

#catalog .catalog-link {
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0b6b5f;
  box-shadow: none;
  font-size: .82rem;
  font-weight: 520;
}

#catalog .catalog-link::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(-45deg);
}

#catalog.categories-expanded .catalog-link::after {
  display: none;
}

#catalog .catalog-link:hover {
  background: transparent;
}

/* Final visual pass: keep the client app compact, aligned and consistent across views. */
@media (min-width: 621px) {
  .shell:not(.admin-mode) .content {
    max-width: 680px;
    padding: 28px 22px 64px;
  }

  .shell:not(.admin-mode) .sidebar .brand-row {
    left: max(24px, calc(50% - 340px));
  }

  .shell:not(.admin-mode) .account-avatar {
    right: max(24px, calc(50% - 340px));
  }

  .shell:not(.admin-mode) .send-layout {
    width: min(560px, 100%);
    grid-template-columns: 1fr;
    grid-template-areas:
      "composer"
      "preview"
      "destinations";
    margin: 0 auto;
  }

  .shell:not(.admin-mode) #catalog .group-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    grid-template-rows: 108px minmax(0, 1fr);
  }

  .sidebar {
    height: 108px;
    min-height: 108px;
    grid-template-rows: 54px 40px;
  }

  .brand-wordmark {
    width: 168px;
  }

  .sidebar .account-avatar {
    transform: translateY(0);
    font-size: .82rem;
  }

  .sidebar nav {
    height: 40px;
    min-height: 40px;
  }

  .sidebar .nav {
    height: 32px;
    min-height: 32px;
    font-size: .8rem;
  }

  .shell.settings-mode {
    grid-template-rows: 70px minmax(0, 1fr);
  }

  .shell.settings-mode .sidebar {
    height: 70px;
    min-height: 70px;
    grid-template-rows: 54px;
    grid-template-areas: "brand settings";
  }

  .shell.settings-mode .sidebar nav {
    display: none;
  }

  .content {
    padding: 12px 18px 44px;
  }

  .view.active {
    gap: 14px;
  }

  .composer-panel {
    padding: 0;
    gap: 11px;
  }

  .composer-panel label {
    gap: 6px;
    font-size: .75rem;
    font-weight: 600;
  }

  .composer-panel input,
  .composer-panel textarea,
  .catalog-toolbar input {
    min-height: 42px;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 16px;
  }

  .composer-panel input::placeholder,
  .composer-panel textarea::placeholder,
  .catalog-toolbar input::placeholder {
    color: #a8abb1;
    font-size: .9em;
    font-weight: 450;
  }

  .composer-panel textarea {
    min-height: 136px;
  }

  .drop-zone {
    min-height: 68px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .drop-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }

  .drop-zone strong {
    font-size: .86rem;
  }

  .drop-zone small {
    max-width: 100%;
    overflow: hidden;
    color: #737780;
    font-size: .62rem;
    text-overflow: ellipsis;
  }

  .send-actions {
    gap: 10px;
  }

  .send-actions input {
    min-height: 42px;
  }

  .send-actions .primary {
    min-height: 46px;
    border-radius: 12px;
    font-size: .88rem;
  }

  .preview-panel,
  .destinations-panel {
    padding: 14px;
    border-radius: 16px;
  }

  .preview-card {
    padding: 13px;
    border-radius: 14px;
  }

  .preview-bubble {
    min-height: 64px;
    padding: 14px;
    font-size: .86rem;
  }

  .section-label,
  .mini-label {
    font-size: .62rem;
    letter-spacing: .14em;
    font-weight: 650;
  }

  #catalog.view.active {
    gap: 11px;
  }

  .catalog-toolbar {
    padding: 0;
  }

  .catalog-toolbar input {
    height: 42px;
  }

  #catalog .catalog-section-head {
    margin: 8px 0 -1px;
  }

  #catalog .catalog-section-head h3 {
    font-size: 1.05rem;
    font-weight: 600;
  }

  #catalog .catalog-link {
    min-height: 24px;
    font-size: .76rem;
  }

  #catalog:not(.categories-expanded) .category-card {
    min-height: 27px;
    padding: 0 11px;
  }

  #catalog:not(.categories-expanded) .category-card span {
    font-size: .74rem;
  }

  #catalog .group-grid {
    gap: 9px;
    padding: 0;
  }

  #catalog .group-card {
    gap: 6px;
    padding: 14px 16px;
    border-radius: 15px;
  }

  #catalog .group-card-kicker {
    font-size: .56rem;
    letter-spacing: .15em;
  }

  #catalog .group-card h3 {
    font-size: .88rem;
    font-weight: 570;
  }

  #catalog .group-card p,
  #catalog .group-status {
    font-size: .74rem;
  }

  #settings.view.active {
    gap: 10px;
  }

  .settings-back {
    width: fit-content;
    height: 24px;
    min-height: 24px;
    margin: 4px 0 8px;
    padding: 0;
    color: #6c7077;
    font-size: .78rem;
    font-weight: 500;
  }

  .settings-layout {
    width: 100%;
  }

  .whatsapp-connect-panel {
    padding: 18px 20px 20px;
    border-radius: 18px;
  }

  .connection-hero {
    gap: 12px;
    padding-bottom: 12px;
  }

  .connection-mark {
    width: 28px;
    height: 28px;
  }

  .connection-hero h3 {
    font-size: .98rem;
    font-weight: 620;
  }

  .connection-hero p {
    max-width: 280px;
    font-size: .76rem;
    line-height: 1.35;
  }

  .connection-status-row {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .connection-card {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .connection-card:nth-child(n+2) {
    display: none;
  }

  .connection-card .mini-label {
    display: none;
  }

  .status-line {
    font-size: .8rem;
  }

  .connection-action-row {
    display: contents;
  }

  .connection-action-row .danger {
    display: none;
  }

  .connection-action-row .primary {
    width: auto;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0b6b5f;
    font-size: .78rem;
    font-weight: 560;
  }

  .qr-stage {
    gap: 12px;
  }

  #settings .settings-qr img {
    width: min(224px, 74vw);
    padding: 6px;
  }

  .settings-qr .hint {
    font-size: .68rem;
  }

  .connection-steps {
    display: none;
  }

  .settings-menu-card {
    min-height: 58px;
    margin-top: 10px;
    padding: 13px 16px;
    border-radius: 16px;
  }

  .settings-menu-card strong {
    font-size: .92rem;
  }

  .settings-menu-card small {
    font-size: .72rem;
  }

  #performance.view.active {
    gap: 10px;
  }

  #performance .topbar {
    padding: 0;
    align-items: center;
  }

  #performance .topbar .eyebrow,
  #performance .topbar p {
    display: none;
  }

  #performance .topbar h2 {
    margin: 0;
    font-size: 1.16rem;
    font-weight: 610;
  }

  #performance #refreshBtn {
    font-size: .76rem;
  }

  #performance .analytics-overview,
  #performance .performance-chart-card,
  #performance .table-panel {
    padding: 14px 16px;
    border-radius: 16px;
  }

  #performance .analytics-overview .panel-head,
  #performance .reach-chart-card .panel-head,
  #performance .table-panel .panel-head {
    padding-bottom: 10px;
    border-bottom: 1px solid #eeeeef;
  }

  #performance .performance-metrics {
    gap: 8px;
  }

  #performance .performance-metrics .metric {
    min-height: 72px;
    padding: 11px 12px;
    border-radius: 13px;
  }

  #performance .performance-metric strong {
    margin-top: 5px;
    font-size: 1.24rem;
    font-weight: 610;
  }

  #performance .performance-metric > span,
  #performance .performance-metric small {
    font-size: .72rem;
    font-weight: 480;
  }

  #performance .reach-chart {
    height: 104px;
  }

  #performance .reach-chart:empty {
    height: 58px;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
  }

  #performance .reach-chart:empty::before {
    content: "Sem dados nos ultimos 7 dias";
    color: #8a8d93;
    font-size: .74rem;
    font-weight: 450;
  }

  #performance .reach-track {
    height: 52px;
  }

  #performance .table-row {
    min-height: 44px;
    padding: 9px 0;
  }

  #performance .table-row strong {
    font-size: .82rem;
  }

  #performance .table-row small,
  .list > .muted {
    font-size: .74rem;
  }
}
