:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #eef3f8;
  --surface-subtle: #f8fafc;
  --line: #d5dee9;
  --border: var(--line);
  --text: #15202b;
  --ink: var(--text);
  --muted: #5d6b7c;
  --muted-strong: #344150;
  --blue: #175fc5;
  --blue-soft: #eaf2ff;
  --blue-strong: #0d5ed7;
  --primary: var(--blue);
  --green: #0f7b55;
  --success: var(--green);
  --red: #b92f35;
  --focus-ring: 0 0 0 4px rgba(23, 95, 197, 0.18);
  --shadow-sm: 0 4px 14px rgba(24, 35, 47, 0.06);
  --shadow: 0 12px 32px rgba(24, 35, 47, 0.08);
  --shadow-lg: 0 22px 54px rgba(24, 35, 47, 0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --control-radius: 12px;
  --control-height: 46px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.app-boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(246, 247, 249, 0.84);
  backdrop-filter: blur(10px);
  touch-action: none;
}

.app-boot-overlay[hidden] {
  display: none !important;
}

.app-boot-overlay > div {
  display: grid;
  gap: 6px;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  text-align: center;
}

.app-boot-overlay strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.app-boot-overlay span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

body.is-bootstrapping {
  cursor: wait;
}

html,
body {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  min-width: 0;
  font: inherit;
}

img,
svg,
canvas {
  max-width: 100%;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #fbfcfd;
  padding: 20px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #344150;
  text-align: left;
  padding: 0 12px;
}

.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.workspace {
  min-width: 0;
  padding: 28px 32px 40px;
}

.guided-workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 20px clamp(16px, 4vw, 34px) 42px;
}

.guided-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.guided-workspace.authenticated .guided-hero {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 64px;
  margin-bottom: 10px;
  padding: 12px 14px;
}

.guided-hero h1 {
  margin: 0 0 8px;
}

.guided-workspace.authenticated .guided-hero h1 {
  font-size: 20px;
  line-height: 1.15;
  margin-bottom: 0;
}

.guided-hero > div:nth-child(2) p:not(.eyebrow) {
  margin: 0;
}

.guided-workspace.authenticated #groupSubtitle {
  display: none;
}

.guided-workspace.authenticated #heroEyebrow {
  display: none;
}

.hero-actions {
  min-width: min(100%, 340px);
  display: grid;
  justify-items: stretch;
  gap: 10px;
  justify-content: flex-end;
}

.guided-workspace.authenticated .hero-actions {
  min-width: 0;
  align-self: center;
}

.session-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.portal-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: right;
}

.portal-identity strong,
.portal-identity small {
  overflow-wrap: anywhere;
}

.portal-identity strong {
  font-size: 15px;
  line-height: 1.1;
}

.portal-identity small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.toolbar-button {
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  white-space: nowrap;
}

.icon-button {
  font-size: 12px;
  font-weight: 900;
}

.account-menu {
  position: relative;
  display: grid;
  place-items: center;
}

.account-menu-button {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #cfd8e5;
  border-radius: 999px;
  background: #fff;
  color: #243140;
  box-shadow: 0 6px 16px rgba(24, 35, 47, 0.08);
}

.account-menu-button span,
.account-menu-button span::before {
  display: block;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.account-menu-button span {
  width: 16px;
  height: 8px;
  margin-top: 10px;
}

.account-menu-button span::before {
  width: 8px;
  height: 8px;
  margin: -10px auto 0;
}

.account-menu-button:hover,
.account-menu-button[aria-expanded="true"] {
  border-color: #9dbcf5;
  background: #f3f7ff;
  color: var(--blue);
}

.account-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 210px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 36px rgba(18, 28, 40, 0.14);
  padding: 6px;
}

.account-menu-popover button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #253244;
  padding: 0 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 850;
}

.account-menu-popover button:hover {
  background: #f3f7ff;
  color: var(--blue);
}

.compact-brand {
  color: var(--text);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.setup-steps article,
.setup-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.setup-steps article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  padding: 15px;
}

.setup-steps span,
.step-badge {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #cfe0ff;
  background: #f6f9ff;
  color: #2866c7;
  font-weight: 900;
}

.step-badge::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  background: currentColor;
}

.badge-account::before {
  border-radius: 999px;
  box-shadow: 0 -5px 0 -2px currentColor, 0 7px 0 -1px currentColor;
}

.badge-plan::before {
  width: 15px;
  height: 11px;
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 0, 100% 75%, 57% 75%, 50% 100%, 43% 75%, 0 75%);
}

.badge-whatsapp::before {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 68% 78%, 50% 100%, 38% 78%, 0 78%);
}

.badge-telegram::before {
  width: 15px;
  height: 13px;
  clip-path: polygon(0 46%, 100% 0, 76% 100%, 52% 67%, 35% 82%, 39% 61%);
}

.badge-group::before {
  width: 15px;
  height: 12px;
  border-radius: 3px;
  clip-path: polygon(0 23%, 25% 23%, 25% 0, 75% 0, 75% 23%, 100% 23%, 100% 100%, 0 100%);
}

.setup-steps strong {
  align-self: center;
}

.setup-steps small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.35;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.launch-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  margin-bottom: 18px;
}

.launch-copy-card,
.launch-plan-panel {
  align-content: start;
}

.launch-intro-card {
  gap: 16px;
  align-self: start;
}

.launch-intro-card h2 {
  font-size: 28px;
  line-height: 1.08;
}

.trust-strip {
  display: grid;
  gap: 8px;
}

.trust-strip span {
  min-height: 34px;
  display: flex;
  align-items: center;
  border: 1px solid #dfe5ee;
  border-radius: 6px;
  background: #fafbfc;
  color: #344252;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 800;
}

.launch-copy-card p:not(.eyebrow),
.launch-plan-panel p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.launch-cta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.launch-cta-row .primary-button,
.launch-cta-row .secondary-button {
  width: 100%;
  min-height: 48px;
  white-space: normal;
  line-height: 1.2;
}

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

.launch-plan-panel {
  gap: 14px;
}

.launch-plan-panel h2 {
  font-size: 20px;
}

.launch-plan-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  min-height: 100%;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  padding: 16px;
  box-shadow: var(--shadow);
}

.launch-plan-card:hover {
  border-color: #c4d5ef;
  background: #fbfdff;
}

.launch-plan-card.selected {
  border-color: #91b4ff;
  background: #f7faff;
  box-shadow: 0 0 0 3px #e5edff;
}

.launch-plan-card.disabled {
  cursor: default;
  opacity: 0.68;
  background: #f8fafc;
}

.launch-plan-card.disabled:hover {
  border-color: #dbe2ec;
  background: #f8fafc;
}

.launch-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.launch-plan-head strong {
  min-width: 0;
  font-size: 18px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.launch-plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2d63b3;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.launch-plan-price {
  display: grid;
  gap: 2px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.old-price {
  color: #8a96a8;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: line-through;
}

.launch-plan-price small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.launch-plan-meta {
  min-width: 0;
  color: #536174;
  line-height: 1.45;
  font-size: 14px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.launch-plan-features {
  display: grid;
  gap: 8px;
  align-content: start;
}

.launch-plan-features span {
  position: relative;
  min-width: 0;
  padding-left: 16px;
  color: #445466;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.launch-plan-features span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #8eb2f7;
}

.account-billing-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(440px, 1.28fr);
  gap: 20px;
  align-items: start;
}

.customer-panel {
  width: 100%;
}

.plan-panel {
  width: 100%;
}

.account-console-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.setup-card {
  min-width: 0;
  display: grid;
  gap: 16px;
  padding: 20px;
}

.catalog-grid {
  display: grid;
  gap: 10px;
}

.plan-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.plan-card {
  display: block;
  min-width: 0;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}

.plan-card.selected {
  border-color: #2f73e0;
  box-shadow: 0 0 0 3px #e7efff;
}

.plan-card.current {
  border-color: #64c59a;
  background: #f8fffb;
  box-shadow: 0 0 0 3px #e7f8ef;
}

.plan-card.upgrade-option:not(.selected) {
  border-color: #c8d8f4;
}

.plan-card.inactive-option {
  opacity: 0.72;
}

.plan-card.disabled-plan {
  background: #f8fafc;
}

.plan-card.quote-only {
  border-style: dashed;
  background: #fcfdff;
}

.plan-card-choice {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(112px, auto);
  gap: 14px;
  align-items: start;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 16px;
  text-align: left;
}

.plan-card-choice:not(.static):hover {
  background: #f8fbff;
}

.plan-card-choice.static {
  cursor: default;
}

.plan-card-choice[aria-disabled="true"] {
  cursor: default;
}

.plan-choice-marker {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid #aab7c8;
  border-radius: 999px;
  background: #fff;
}

.plan-card.selected .plan-choice-marker {
  border-color: #2f73e0;
  box-shadow: inset 0 0 0 4px #fff;
  background: #2f73e0;
}

.quote-marker {
  border-style: dashed;
}

.current-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 26px;
  border-radius: 999px;
  background: #dff8ea;
  color: #12724a;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.plan-card-header {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.plan-card-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-card-description {
  min-width: 0;
  display: block;
  max-width: 68ch;
  color: #536174;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.plan-card-header strong {
  min-width: 0;
  font-size: 17px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.plan-card-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 28px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2d63b3;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
  white-space: normal;
}

.plan-chip.neutral {
  background: #f5f7fa;
  color: #5f6f82;
}

.plan-divider {
  width: 100%;
  height: 1px;
  background: #e8edf3;
}

.plan-price {
  display: grid;
  gap: 2px;
  min-width: 112px;
  justify-items: end;
  text-align: right;
}

.plan-price strong {
  min-width: 0;
  font-size: 24px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.plan-price small {
  min-width: 0;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.plan-price em {
  color: #22825f;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.plan-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
}

.plan-feature-list span {
  position: relative;
  min-width: 0;
  padding-left: 13px;
  color: #415062;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.plan-feature-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #8eb2f7;
}

.plan-card-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #edf1f6;
  padding: 9px 16px;
  color: #69778a;
  font-size: 12px;
  font-weight: 800;
}

.plan-card.selected .plan-card-footer {
  color: #195fc7;
  background: #f6f9ff;
}

.plan-card.current .plan-card-footer {
  color: #12724a;
  background: #edfbf3;
}

.plan-meta {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.22fr);
  gap: 10px;
  align-items: start;
}

.billing-cycle-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.billing-cycle-selector button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344154;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.billing-cycle-selector button.active {
  border-color: #b8cdfc;
  background: #eef4ff;
  color: #1f5fca;
  box-shadow: inset 0 0 0 1px #cfe0ff;
}

.billing-cycle-selector small {
  display: block;
  color: #22825f;
  font-size: 11px;
  font-weight: 900;
}

.plan-select-hidden {
  display: none;
}

.plan-selection-summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  line-height: 1.32;
}

.catalog-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.catalog-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-card strong {
  color: #172231;
  font-size: 15px;
}

.catalog-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.catalog-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid #dbe2ec;
  background: #f8fafc;
  color: #536174;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.catalog-tags span.ready {
  border-color: #bde5d3;
  background: #ecfdf5;
  color: var(--green);
}

.catalog-tags span.beta {
  border-color: #ffe0aa;
  background: #fff8eb;
  color: #a15b00;
}

.catalog-tags span.planned {
  border-color: #d9dff2;
  background: #f5f7fc;
  color: #637188;
}

.card-heading {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.card-heading > div {
  min-width: 0;
}

.card-heading p {
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.group-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rules-layout,
.monitoring-grid {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 18px;
  align-items: start;
}

#section-regras,
#section-regras .rules-layout,
#section-regras .side-stack,
#section-regras .panel,
#section-regras fieldset,
#section-regras label,
#section-regras .panel-heading,
#section-regras .compact-heading,
#section-regras .message-automation-block,
#section-regras .message-automation-grid,
#section-regras .automation-list,
#section-regras .automation-item,
#section-regras input,
#section-regras select,
#section-regras textarea {
  min-width: 0;
  max-width: 100%;
}

#section-regras {
  width: 100%;
  justify-self: stretch;
  overflow-x: hidden;
  contain: inline-size;
}

#section-regras .rules-layout,
#section-regras .side-stack {
  width: 100%;
}

#section-regras .panel-heading > div,
#section-regras .compact-heading > strong,
#section-regras .compact-heading > span,
#section-regras legend,
#section-regras h2,
#section-regras p,
#section-regras small,
#section-regras span {
  overflow-wrap: anywhere;
}

.rules-access-gate {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.rules-access-gate[hidden] {
  display: none;
}

.rules-access-gate .panel-heading {
  align-items: flex-start;
}

.rules-access-gate .panel-heading p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.rules-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.context-group-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 14px;
  align-items: end;
  border-color: #bfddcc;
  background: linear-gradient(180deg, #ffffff, #f7fcf9);
}

.context-group-panel h2,
.context-group-panel h3,
.context-group-panel p {
  margin: 0;
}

.context-group-panel h3 {
  color: var(--ink);
  font-size: 18px;
}

.context-group-panel p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.context-group-panel label {
  margin: 0;
}

.rules-context-panel {
  grid-column: 1 / -1;
}

.group-notifications-panel .panel-heading p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.notification-summary {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--muted);
  padding: 10px 12px;
  font-weight: 750;
  line-height: 1.35;
}

.notification-summary.active {
  border-color: #b9dfc9;
  background: #f0fbf5;
  color: #17683c;
}

.notification-recipient-fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.notification-recipient-fieldset legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 850;
}

.notification-recipient-list {
  display: grid;
  gap: 8px;
}

.notification-recipient-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.notification-recipient-option:has(input:checked) {
  border-color: #a9d5bb;
  background: #f3fbf6;
}

.notification-recipient-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.62;
}

.notification-recipient-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.notification-recipient-option span {
  display: grid;
  gap: 2px;
}

.notification-recipient-option strong {
  color: var(--ink);
  font-size: 14px;
}

.notification-recipient-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profanity-moderation-panel {
  grid-column: 1 / -1;
}

.profanity-moderation-panel .panel-heading p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.profanity-level-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.profanity-level-field legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-weight: 850;
}

.profanity-level-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profanity-level-grid label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.profanity-level-grid label:has(input:checked) {
  border-color: #a9d5bb;
  background: #f3fbf6;
  box-shadow: inset 0 0 0 1px #a9d5bb;
}

.profanity-level-grid input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.profanity-level-grid span {
  display: grid;
  gap: 4px;
}

.profanity-level-grid strong {
  color: var(--ink);
  font-size: 14px;
}

.profanity-level-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.profanity-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profanity-config-block {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e0e7ef;
  border-radius: 8px;
  background: #fbfcff;
}

.profanity-config-block h3,
.profanity-config-block p {
  margin: 0;
}

.profanity-config-block h3 {
  color: var(--ink);
  font-size: 16px;
}

.profanity-config-block > p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.monitoring-grid {
  margin-top: 0;
}

.message-management-shell {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.message-subnav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.message-subnav-group {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.message-subnav-group[hidden] {
  display: none;
}

.message-subnav-group p {
  margin: 0;
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-subnav button {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted-strong);
  min-height: 68px;
  padding: 11px;
  font-weight: 800;
  text-align: left;
  display: grid;
  gap: 4px;
  align-content: start;
}

.message-subnav .status-badge {
  justify-self: start;
  min-height: 24px;
  padding: 0 8px;
  font-style: normal;
  font-size: 11px;
}

.message-subnav button.active {
  border-color: #bcd0ff;
  background: #edf3ff;
  color: var(--blue);
}

.message-subnav button strong,
.message-subnav button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-subnav button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
}

.message-subnav button.is-unavailable {
  opacity: 0.58;
}

.secondary-button.danger-light {
  border-color: #f0caca;
  color: #b03939;
}

.message-view,
.message-view .message-automation-block,
.message-target-groups,
.group-checkbox-list,
.time-picker-grid,
.weekday-picker {
  min-width: 0;
  max-width: 100%;
}

.message-view[hidden] {
  display: none;
}

[data-message-kind-field][hidden] {
  display: none;
}

.message-view .message-automation-block {
  display: grid;
  gap: 14px;
}

.message-target-groups,
.message-view fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

.message-target-groups legend,
.message-view legend {
  padding: 0 6px;
  color: var(--ink);
  font-weight: 900;
}

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

.group-checkbox-list label,
.weekday-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  min-width: 0;
  margin: 0;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  padding: 10px;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease,
    transform 140ms ease;
}

.group-checkbox-list label:has(input:checked),
.weekday-picker label:has(input:checked) {
  border-color: #9dc0ff;
  background: #f1f6ff;
  box-shadow: 0 0 0 3px rgba(25, 95, 199, 0.08);
}

.group-checkbox-list label:active,
.weekday-picker label:active {
  transform: scale(0.99);
}

.group-checkbox-list span {
  display: grid;
  gap: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.group-checkbox-list span small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.group-checkbox-list label.is-disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.time-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.dynamic-time-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.time-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.time-input-row button {
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  background: #fff;
  color: var(--muted-strong);
  min-height: var(--control-height);
  padding: 0 10px;
  font-weight: 800;
}

.hour-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.hour-picker-grid label {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  font-weight: 900;
}

.hour-picker-grid label:has(input:checked) {
  border-color: #9dc0ff;
  background: #f1f6ff;
  box-shadow: 0 0 0 3px rgba(25, 95, 199, 0.08);
}

.time-picker-grid input[type="time"] {
  text-align: center;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
  color: #1f2937;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 -1px 0 rgba(23, 32, 42, 0.04);
}

.time-picker-grid input[type="time"]:focus {
  border-color: #8db4ff;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(25, 95, 199, 0.14),
    0 8px 20px rgba(23, 32, 42, 0.06);
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday-picker label {
  justify-content: center;
  padding: 10px 8px;
}

.game-schedule-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.game-schedule-toolbar label {
  margin: 0;
  min-width: 0;
}

.game-schedule-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  border: 1px solid #dfe6ef;
  border-radius: 999px;
  background: #fff;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 900;
  padding: 0 14px;
  white-space: nowrap;
}

#section-mensagens,
#section-mensagens .panel,
#section-mensagens label,
#section-mensagens input,
#section-mensagens select,
#section-mensagens textarea,
#section-mensagens .automation-list,
#section-mensagens .automation-item {
  min-width: 0;
  max-width: 100%;
}

.security-panel {
  margin-top: 0;
}

.security-panel .panel-heading p:not(.eyebrow) {
  margin-top: 5px;
  color: var(--muted);
}

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

.security-check {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.security-check strong {
  color: #253241;
}

.security-check span {
  color: var(--muted);
  line-height: 1.35;
}

.security-check.ok {
  border-left-color: var(--green);
}

.security-check.warning {
  border-left-color: #d08a00;
  background: #fffaf0;
}

.security-check.blocker {
  border-left-color: var(--red);
  background: #fff6f6;
}

.limit-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.limit-strip span {
  border: 1px solid #d8dee6;
  border-radius: 999px;
  background: #fbfcfd;
  color: #4f5f73;
  padding: 8px 11px;
  font-size: 13px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.main-rule-panel {
  gap: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
}

.topbar-actions,
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

select,
input,
textarea {
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: #fff;
  color: var(--text);
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

select,
input {
  height: var(--control-height);
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 76px;
  padding: 10px 12px;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.14);
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  min-width: 22px;
  max-width: 22px;
  padding: 0;
  place-content: center;
  border: 1.5px solid #c7d1de;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: inset 0 -1px 0 rgba(23, 32, 42, 0.04);
}

input[type="radio"] {
  border-radius: 999px;
}

input[type="checkbox"]::before {
  content: "";
  width: 12px;
  height: 9px;
  transform: scale(0);
  transform-origin: center;
  background: #fff;
  clip-path: polygon(14% 44%, 0 60%, 39% 100%, 100% 14%, 84% 0, 36% 63%);
  transition: transform 120ms ease;
}

input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  border-radius: 999px;
  background: #fff;
  transition: transform 120ms ease;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  border-color: var(--blue-strong);
  background: var(--blue-strong);
  box-shadow: 0 8px 18px rgba(15, 102, 223, 0.22);
}

input[type="checkbox"]:checked::before,
input[type="radio"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(25, 95, 199, 0.16);
}

input.field-error,
select.field-error,
textarea.field-error {
  border-color: var(--red);
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(201, 54, 54, 0.12);
}

.topbar select {
  min-width: 210px;
}

.primary-button,
.secondary-button {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  border: 1px solid transparent;
  padding: 0 16px;
  white-space: nowrap;
  font-weight: 700;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

.primary-button {
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  background: #fff;
  border-color: var(--line);
  color: #243140;
}

.danger-button {
  border-color: #f0c7c7;
  color: var(--red);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 12px;
  margin-bottom: 18px;
  color: var(--muted);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.status-strip.error .status-dot {
  background: var(--red);
}

.support-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid #f1c76f;
  border-radius: 8px;
  background: #fff7df;
  color: #5f4308;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.support-mode-banner div {
  display: grid;
  gap: 2px;
}

.support-mode-banner strong {
  color: var(--ink);
}

.support-mode-banner span {
  font-weight: 700;
}

.app-nav {
  position: sticky;
  top: 42px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(21, 32, 43, 0.08);
  backdrop-filter: blur(12px);
}

.app-nav button {
  display: grid;
  min-height: 42px;
  gap: 2px;
  align-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #3a4654;
  text-align: left;
  padding: 8px 11px;
}

.app-nav button strong,
.app-nav button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-nav button strong {
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.app-nav button small {
  display: none;
}

.guided-workspace.authenticated .app-nav {
  top: 18px;
}

.app-nav button.active {
  border-color: #b8d0ff;
  background: var(--blue-soft);
  color: var(--blue);
}

.app-nav button.active small {
  color: #315f9f;
}

.app-nav button:hover {
  border-color: #cbd6e4;
  background: #f8fafc;
}

.guided-workspace.authenticated .app-nav .nav-account,
.guided-workspace.authenticated .app-nav .nav-operation {
  display: none;
}

.workspace-section {
  min-width: 0;
  max-width: 100%;
  display: none;
}

.workspace-section.active {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 18px;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.snapshot-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--shadow);
}

.snapshot-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.snapshot-card strong {
  font-size: 18px;
}

.snapshot-card span {
  color: #536174;
  line-height: 1.4;
}

.snapshot-card.ready {
  border-color: #b9e3d4;
  background: #f3fcf8;
}

.snapshot-card.warning {
  border-color: #f2dec0;
  background: #fffaf2;
}

.operator-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  grid-template-areas:
    "alert alert"
    "content checklist"
    "actions checklist";
  gap: 18px;
  align-items: center;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.payment-alert-card {
  grid-area: alert;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #f2c36b;
  border-radius: 8px;
  background: #fff8e8;
  padding: 14px 16px;
}

.payment-alert-card small {
  color: #8a5c00;
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-alert-card strong {
  display: block;
  color: #4a2d00;
  font-size: 18px;
}

.payment-alert-card span {
  color: #6b4a11;
  display: block;
  margin-top: 2px;
}

.operator-panel > div:first-of-type {
  grid-area: content;
}

.operator-panel h2 {
  font-size: 22px;
}

.operator-panel p:not(.eyebrow) {
  margin-top: 6px;
  color: #4f5f73;
  line-height: 1.45;
}

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

.readiness-list button {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #fff;
  color: #5e6a78;
  padding: 0 11px;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.readiness-list button.ready {
  border-color: #b9e3d4;
  background: #eefaf6;
  color: var(--green);
}

.readiness-list button:hover:not(:disabled),
.snapshot-button:hover:not(:disabled) {
  border-color: #b8d0ff;
  box-shadow: 0 0 0 3px #eef4ff;
}

.operator-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
}

.operator-actions .primary-button {
  min-width: 240px;
}

.snapshot-button {
  width: 100%;
  color: inherit;
  text-align: left;
}

.channel-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.group-channel-selector-card {
  margin-bottom: 18px;
}

.channel-mode-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.channel-mode-selector button {
  min-height: 44px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.channel-mode-selector button.active {
  border-color: #b7caff;
  background: #eef4ff;
  color: #2f63d6;
}

.add-group-button {
  width: fit-content;
}

.rules-save-button {
  min-width: 132px;
}

.section-save-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.compact-save-button {
  width: fit-content;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.connection-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.connection-panel.is-connected {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
}

.customer-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.customer-panel p {
  margin-top: 5px;
  color: var(--muted);
}

.account-state-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fbfdff;
}

.account-state-heading {
  min-width: 0;
  display: grid;
  gap: 4px;
}

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

.account-state-head strong {
  font-size: 18px;
  line-height: 1.15;
}

.account-state-heading small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.account-state-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e9f7f1;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.account-state-toggle {
  min-height: 34px;
  justify-self: start;
  min-width: 108px;
  border-radius: 999px;
}

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

.account-state-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e4ebf4;
  border-radius: 8px;
  background: #fff;
}

.account-state-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-state-item strong {
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.account-state-card.collapsed {
  gap: 8px;
}

.account-state-card.collapsed .account-state-head {
  align-items: center;
}

.account-state-card.collapsed .account-state-heading strong {
  font-size: 17px;
}

.account-state-card.collapsed .account-state-heading small {
  font-size: 13px;
}

.customer-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
}

.phone-verification-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding: 12px 14px;
  border: 1px dashed #d6deeb;
  border-radius: 8px;
  background: #fbfcff;
}

.phone-verification-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.phone-verification-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.phone-verification-status.ok {
  color: var(--green);
}

.phone-verification-status.pending {
  color: #7a5b16;
}

.phone-verification-status.expired {
  color: var(--red);
}

.phone-verification-countdown {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.phone-verification-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.password-field {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
  flex-wrap: wrap;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 22px;
  right: 10px;
  transform: translateY(-50%);
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6a7688;
  padding: 0;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.password-criteria {
  display: none;
  flex-basis: 100%;
  padding: 5px 4px 0;
  color: #6a7688;
  font-size: 0.78rem;
  line-height: 1.25;
}

.password-field:focus-within .password-criteria {
  display: block;
}

.password-toggle::before {
  width: 18px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 999px / 70%;
  content: "";
}

.password-toggle::after {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.password-toggle.is-visible::after {
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-38deg);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #eef4ff;
  color: var(--primary);
}

.password-toggle:active {
  transform: translateY(-50%) scale(0.96);
}

.auth-mode-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.auth-mode-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.auth-mode-tabs button.active {
  border-color: #8fb1ff;
  background: #eef4ff;
  color: var(--blue);
}

.billing-cycle-selector button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.auth-helper-text {
  margin: 0;
  color: var(--muted);
}

.inline-feedback {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.45;
  font-weight: 600;
}

.inline-feedback.info {
  border-color: #dbe2ec;
  background: #fbfcff;
  color: #435264;
}

.inline-feedback.success {
  border-color: #bde5d3;
  background: #ecfdf5;
  color: var(--green);
}

.inline-feedback.error {
  border-color: #f2c6c6;
  background: #fff4f4;
  color: var(--red);
}

.account-access-panel {
  display: grid;
  gap: 12px;
}

.account-inline-actions {
  display: flex;
  justify-content: flex-end;
}

.recovery-toggle-button {
  justify-self: start;
}

.inline-note {
  border: 1px dashed #d6deeb;
  border-radius: 8px;
  background: #fbfcff;
  color: #536174;
  line-height: 1.45;
  padding: 12px 14px;
}

.customer-form button {
  min-height: 44px;
}

.billing-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 14px;
  overflow-wrap: anywhere;
}

.billing-summary.payment-ready {
  border-color: #cfe0ff;
  background: #f5f9ff;
  color: #1d3f78;
}

.plan-panel.payment-focus {
  border-color: #9ebcf8;
  box-shadow: 0 0 0 3px #e8f0ff;
}

.payment-cta-wrap {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d9e5ff;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.payment-cta-button {
  min-height: 56px;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(47, 115, 224, 0.22);
}

.pix-payment-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #ffffff;
}

.pix-payment-panel strong {
  color: var(--ink);
  font-weight: 900;
}

.pix-payment-panel img {
  width: min(220px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.pix-payment-panel textarea {
  width: 100%;
  min-width: 0;
  min-height: 74px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  padding: 10px;
}

.pix-payment-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-method-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: #ffffff;
}

.payment-method-header {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
}

.payment-method-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.payment-method-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.payment-method-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.group-addon-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #ffffff;
}

.plan-upgrade-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #d9e2f0;
  border-radius: 8px;
  background: #fbfcff;
}

.plan-upgrade-panel strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.plan-upgrade-panel span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
  margin-top: 4px;
}

.plan-upgrade-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(84px, 0.55fr);
  gap: 10px;
}

.group-addon-panel strong {
  display: block;
  color: var(--ink);
  font-weight: 900;
}

.group-addon-panel span {
  display: block;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
  margin-top: 4px;
}

.group-addon-panel.locked {
  background: #fbfcff;
}

.group-addon-controls {
  display: grid;
  grid-template-columns: minmax(80px, 110px) minmax(0, 1fr) minmax(84px, 0.7fr);
  gap: 10px;
  align-items: center;
}

.group-addon-controls input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-weight: 800;
}

.account-console-card {
  align-content: start;
  gap: 14px;
}

.account-primary-card {
  grid-column: span 1;
}

.compact-heading h2 {
  font-size: 18px;
  line-height: 1.15;
}

.detail-list,
.invoice-list,
.referral-coupon-list,
.moderator-list {
  display: grid;
  gap: 10px;
}

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

.moderator-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.moderator-row strong,
.moderator-row small {
  overflow-wrap: anywhere;
}

.moderator-row small {
  color: var(--muted);
}

.detail-row,
.invoice-row,
.referral-coupon-card {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px 14px;
  min-width: 0;
}

.account-console-card .detail-row,
.account-console-card .invoice-row,
.account-console-card .referral-coupon-card {
  background: #fff;
}

.account-phone-form {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.account-phone-form[hidden] {
  display: none;
}

.account-phone-form label {
  color: #17202c;
  font-size: 14px;
  font-weight: 900;
}

.account-phone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.account-phone-row input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
}

.account-phone-form small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.referral-coupon-card {
  gap: 12px;
}

.referral-section-block,
.referral-payout-card {
  display: grid;
  gap: 10px;
}

.referral-section-block h4 {
  margin: 8px 0 0;
  color: #17202c;
  font-size: 15px;
  font-weight: 900;
}

.referral-payout-card {
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px 14px;
}

.referral-payout-card.is-ready {
  border-color: #b8e7ca;
  background: #f2fcf6;
}

.referral-payout-card.needs-data {
  border-color: #f5d49f;
  background: #fffaf0;
}

.referral-payout-card small {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.referral-payout-card strong {
  display: block;
  margin-top: 2px;
  color: #17202c;
  font-size: 17px;
}

.referral-payout-card p {
  margin: 6px 0 0;
  color: #536174;
  font-size: 14px;
  line-height: 1.45;
}

.referral-payout-form {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.referral-payout-form label {
  color: #17202c;
  font-size: 13px;
  font-weight: 900;
}

.referral-payout-form input {
  width: 100%;
  min-width: 0;
}

.referral-coupon-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.referral-coupon-heading small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.referral-coupon-heading strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.referral-coupon-rules {
  display: grid;
  gap: 6px;
  color: #536174;
  font-size: 14px;
  line-height: 1.45;
}

.referral-commission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
}

.referral-commission-card strong,
.referral-commission-card span {
  display: block;
}

.referral-commission-card strong {
  color: #17202c;
  font-size: 15px;
}

.referral-commission-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.referral-commission-values {
  text-align: right;
}

.referral-commission-values b {
  display: block;
  color: #17202c;
  font-size: 16px;
}

@media (max-width: 560px) {
  .referral-commission-card {
    grid-template-columns: 1fr;
  }

  .referral-commission-values {
    text-align: left;
  }
}

.compact-action {
  min-height: 38px;
  padding: 8px 12px;
}

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

.command-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.command-section h3 {
  margin: 0;
  color: #17202c;
  font-size: 18px;
  font-weight: 900;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.command-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px 14px;
}

.command-card code {
  width: fit-content;
  max-width: 100%;
  border-radius: 7px;
  background: #eef4ff;
  color: #1f5dc8;
  padding: 5px 7px;
  font-size: 13px;
  font-weight: 900;
  white-space: normal;
  overflow-wrap: anywhere;
}

.command-card strong {
  color: #17202c;
  font-size: 15px;
  line-height: 1.25;
}

.command-card span {
  color: #536174;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.invoice-row {
  align-items: center;
  gap: 10px;
}

.invoice-row summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.invoice-row summary::-webkit-details-marker {
  display: none;
}

.invoice-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.invoice-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.invoice-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.invoice-status-badge.paid {
  background: #dff8ea;
  color: #12724a;
}

.invoice-status-badge.open {
  background: #fff1da;
  color: #8a5a00;
}

.invoice-status-badge.void {
  background: #eef1f5;
  color: #647286;
}

.invoice-status-badge.neutral,
.invoice-status-badge:not(.paid):not(.open):not(.void) {
  background: #edf1f6;
  color: #536174;
}

.invoice-expand-label {
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #fff;
  color: #536174;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
  white-space: nowrap;
}

.invoice-row[open] .invoice-expand-label {
  border-color: #b7caff;
  color: #2f63d6;
}

.invoice-detail-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e4eaf2;
}

.invoice-info-row {
  display: grid;
  gap: 4px;
  border: 1px solid #e1e8f1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.invoice-info-row textarea {
  min-height: 76px;
  resize: vertical;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  font-size: 12px;
  color: #243246;
}

.invoice-payment-box {
  gap: 8px;
}

.invoice-payment-link {
  width: fit-content;
  text-decoration: none;
}

.detail-row small,
.invoice-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-row strong,
.invoice-row strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.detail-row span,
.invoice-row span {
  color: #536174;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.invoice-row.paid {
  border-color: #bde5d3;
  background: #f3fcf8;
}

.invoice-row.open {
  border-color: #f2dec0;
  background: #fffaf2;
}

.invoice-cancel-button {
  min-height: 36px;
  margin-top: 8px;
  padding: 0 12px;
  white-space: nowrap;
}

.password-recovery-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #d6deeb;
  border-radius: 8px;
  background: #fbfcff;
}

.password-recovery-panel p {
  margin: 0;
  color: var(--muted);
}

.password-recovery-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.recovery-back-button {
  justify-self: start;
}

.connection-panel p {
  margin-top: 5px;
  color: var(--muted);
}

.connection-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.whatsapp-connected-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #bfe8d3;
  border-radius: 8px;
  background: #f4fbf7;
  color: var(--text);
  padding: 12px;
}

.whatsapp-connected-summary[hidden] {
  display: none;
}

.whatsapp-connected-summary strong,
.whatsapp-connected-summary span {
  display: block;
}

.whatsapp-connected-summary strong {
  font-size: 0.98rem;
}

.whatsapp-connected-summary span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.connection-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(20, 160, 98, 0.12);
}

.compact-action {
  min-height: 40px;
  padding: 10px 14px;
  white-space: nowrap;
}

.compact-channel-checklist {
  grid-column: 1 / -1;
  margin: 0;
}

.channel-guide-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}

.channel-checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 12px 32px;
  border: 1px dashed #d6deeb;
  border-radius: 8px;
  background: #fbfcff;
  color: #536174;
  line-height: 1.4;
}

.channel-checklist li::marker {
  color: var(--green);
  font-weight: 900;
}

.official-bot-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dbe5f2;
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px 14px;
}

.official-bot-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.official-bot-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.official-bot-card strong {
  overflow-wrap: anywhere;
}

.official-bot-card span {
  color: #536174;
  line-height: 1.35;
}

.group-picker {
  display: none;
}

.group-card-list {
  display: grid;
  gap: 10px;
}

.group-card,
.empty-group-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

.group-card.selected {
  border-color: #91b4ff;
  box-shadow: 0 0 0 3px #e5edff;
}

.group-card.active {
  border-left: 4px solid var(--green);
}

.group-card-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.group-card-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.group-card.active .group-card-icon {
  background: #e7f8ef;
  color: var(--green);
}

.group-card-main strong,
.empty-group-card strong {
  display: block;
  color: #172231;
  font-size: 16px;
}

.group-card-main small,
.empty-group-card span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.group-card-badges,
.group-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.group-card-actions .primary-button,
.group-card-actions .secondary-button {
  flex: 1 1 135px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid #dbe2ec;
  background: #f8fafc;
  color: #536174;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.status-badge.ok {
  border-color: #bde5d3;
  background: #ecfdf5;
  color: var(--green);
}

.status-badge.idle {
  border-color: #dbe2ec;
  background: #f8fafc;
  color: #536174;
}

.status-badge.danger {
  border-color: #f2c6c6;
  background: #fff1f1;
  color: var(--red);
}

.manual-group-form {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
}

details.manual-group-form {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px dashed #cdd5df;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

details.manual-group-form summary {
  grid-column: 1 / -1;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

details.manual-group-form input,
details.manual-group-form button {
  margin-top: 10px;
}

.qr-frame {
  display: grid;
  width: 170px;
  min-height: 170px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.qr-frame img {
  width: 150px;
  height: 150px;
}

.pairing-code-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.pairing-code-panel label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.pairing-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.pairing-code-output {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 800;
  line-height: 1.35;
  padding: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.panel {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow);
}

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

[data-collapsible].is-collapsed > :not(.card-heading):not(.compact-heading):not(.panel-heading) {
  display: none !important;
}

[data-collapsible] > .card-heading,
[data-collapsible] > .compact-heading,
[data-collapsible] > .panel-heading {
  align-items: center;
}

[data-collapsible] > .compact-heading {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

[data-collapsible] > .compact-heading > strong,
[data-collapsible] > .compact-heading > span {
  grid-column: 1;
}

[data-collapsible] > .compact-heading > .collapse-toggle {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
}

.account-phone-edit-button {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  white-space: nowrap;
}

.collapse-toggle {
  min-height: 34px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #fff;
  color: #536174;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
  white-space: nowrap;
  cursor: pointer;
}

.collapse-toggle:hover {
  border-color: #b7caff;
  color: #2f63d6;
}

label,
legend {
  display: grid;
  gap: 8px;
  color: #2d3845;
  font-weight: 700;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

.field-row {
  display: flex;
}

.checkbox-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 600;
}

.checkbox-line input {
  width: 22px;
  height: 22px;
}

.checkbox-line.compact {
  align-self: end;
  min-height: var(--control-height);
}

.switch {
  position: relative;
  display: inline-grid;
  width: fit-content;
  max-width: 100%;
  padding: 2px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  display: block;
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #c8d2dd;
  box-shadow: inset 0 1px 2px rgba(23, 32, 42, 0.12);
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(23, 32, 42, 0.18);
  transition: transform 0.16s ease;
}

.switch input:checked + span {
  background: var(--green);
  box-shadow: inset 0 1px 2px rgba(3, 45, 30, 0.2);
}

.switch input:checked + span::after {
  transform: translateX(22px);
}

.switch input:focus-visible + span {
  box-shadow:
    0 0 0 4px rgba(17, 134, 93, 0.16),
    inset 0 1px 2px rgba(23, 32, 42, 0.12);
}

.messages-panel {
  gap: 14px;
}

.feature-lock {
  display: grid;
  gap: 8px;
  justify-items: start;
  border: 1px solid #f2dec0;
  border-radius: 6px;
  background: #fffaf2;
  color: #735019;
  padding: 10px 12px;
  font-weight: 700;
}

.feature-lock span {
  color: #8b6a32;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.message-automation-grid {
  display: grid;
  gap: 14px;
}

.welcome-options {
  display: grid;
  gap: 10px;
}

.welcome-options .checkbox-line {
  min-height: 48px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
}

.welcome-options .checkbox-line:has(input:checked) {
  border-color: #9dc0ff;
  background: #f1f6ff;
  box-shadow: 0 0 0 3px rgba(25, 95, 199, 0.08);
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.field-hint strong {
  color: #344150;
}

.message-automation-grid.is-locked {
  opacity: 0.55;
}

.game-schedule-content.is-locked {
  opacity: 0.55;
}

.message-automation-block {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.inline-guidance {
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  padding: 10px;
}

.conditional-form {
  display: grid;
  gap: 10px;
}

.inline-guidance[hidden],
.conditional-form[hidden] {
  display: none;
}

.compact-heading {
  display: grid;
  gap: 3px;
}

.compact-heading strong {
  font-size: 14px;
}

.compact-heading span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.message-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.automation-item {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfe;
  padding: 10px;
}

.automation-item.is-editing {
  border-color: var(--blue);
  background: #f8fbff;
}

.automation-item > div:not(.automation-actions) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.automation-item strong,
.automation-item span,
.automation-item small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.automation-item strong {
  font-size: 13px;
}

.automation-item span,
.automation-item small {
  color: var(--muted);
  line-height: 1.35;
}

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

.automation-actions button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 6px 9px;
}

.telegram-group-list {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.telegram-group-list > span {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.telegram-group-list button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}

.automation-actions button:hover {
  border-color: #aeb8c6;
}

.game-schedule-games {
  display: grid;
  gap: 8px;
}

.game-schedule-game label {
  margin: 0;
}

.segmented-field {
  border: 0;
  padding: 0;
  margin: 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.segmented-control label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  color: #344150;
  text-align: center;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease,
    transform 140ms ease;
}

.segmented-control input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.segmented-control label:has(input:checked) {
  border-color: #9dc0ff;
  background: #f1f6ff;
  color: var(--blue);
  box-shadow: 0 0 0 3px rgba(25, 95, 199, 0.08);
}

.segmented-control label:active {
  transform: scale(0.99);
}

.activity-panel {
  grid-column: span 1;
}

.operations-panel {
  grid-column: 1 / -1;
}

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

.metric-grid > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fbfc;
  padding: 10px 12px;
}

.metric-grid small,
.metric-grid strong {
  display: block;
}

.metric-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.metric-grid strong {
  margin-top: 3px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.operation-lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.operation-lists h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.compact-list {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
}

.compact-item {
  display: grid;
  gap: 3px;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: #f8fafc;
  padding: 9px 10px;
}

.compact-item.delayed,
.compact-item.warning {
  border-left-color: #ca8a04;
}

.compact-item.failed,
.compact-item.critical {
  border-left-color: var(--red);
}

.compact-item.completed {
  border-left-color: var(--green);
}

.compact-item strong {
  font-size: 13px;
}

.compact-item span,
.compact-item small {
  color: var(--muted);
  font-size: 12px;
}

.activity-log {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
}

.activity-item {
  display: grid;
  gap: 3px;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  background: #f8fafc;
  padding: 10px 12px;
}

.activity-item.warning {
  border-left-color: #ca8a04;
}

.activity-item.critical {
  border-left-color: var(--red);
}

.activity-item span,
.activity-item small,
.muted-line {
  color: var(--muted);
}

.activity-item strong {
  font-size: 14px;
}

.activity-item small {
  font-size: 12px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .topbar-actions,
  .connection-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .connection-panel,
  .channel-setup-grid,
  .manual-group-form,
  .customer-form {
    grid-template-columns: 1fr;
  }

  .qr-frame {
    width: 100%;
  }

  .content-grid,
  .form-grid.two,
  .metric-grid,
  .operation-lists,
  .security-grid,
  .segmented-control {
    grid-template-columns: 1fr;
  }
}

.guided-workspace .customer-panel,
.guided-workspace .connection-panel {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  margin-bottom: 0;
}

.guided-workspace .channel-setup-grid {
  margin-bottom: 18px;
}

.guided-workspace .customer-form {
  display: grid;
  grid-template-columns: 1fr;
}

.guided-workspace .customer-form button,
.guided-workspace .customer-form select {
  min-width: 0;
}

.guided-workspace .connection-actions {
  display: grid;
  grid-template-columns: auto auto minmax(170px, 1fr);
  align-items: center;
  gap: 10px;
}

.guided-workspace .qr-frame {
  justify-self: end;
}

.guided-workspace .status-strip {
  position: sticky;
  top: 0;
  z-index: 4;
}

.guided-workspace .primary-button,
.guided-workspace .secondary-button {
  min-height: 44px;
}

.guided-workspace .toolbar-button,
.guided-workspace .compact-action {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.guided-workspace .panel-heading {
  align-items: flex-start;
}

.guided-workspace .checkbox-line {
  width: fit-content;
}

.discovery-box {
  display: grid;
  grid-template-columns: minmax(190px, 0.95fr) minmax(180px, 0.8fr) minmax(150px, 0.6fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d6e3ff;
  border-radius: 8px;
  background: #f4f8ff;
}

.discovery-box p {
  grid-column: 1 / -1;
  margin: 0;
  color: #506074;
  line-height: 1.45;
}

.discovery-code {
  min-width: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px dashed #7aa7f7;
  background: #ffffff;
  color: #0f3b7a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-align: center;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.preset-button {
  min-height: 78px;
  display: grid;
  gap: 3px;
  align-content: center;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  background: #ffffff;
  color: #263241;
  text-align: left;
  padding: 12px;
  cursor: pointer;
}

.preset-button strong,
.preset-button small {
  display: block;
}

.preset-button strong {
  font-weight: 900;
}

.preset-button small {
  color: var(--muted);
  line-height: 1.35;
}

.preset-button:hover {
  border-color: #2f73e0;
  color: #0f5ed6;
  background: #f6f9ff;
}

@media (max-width: 1220px) {
  .launch-panel,
  .setup-grid,
  .account-console-grid {
    grid-template-columns: 1fr;
  }

  .launch-plan-grid,
  .plan-card-grid {
    grid-template-columns: 1fr;
  }

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

  .plan-meta {
    grid-template-columns: 1fr;
  }

  .discovery-box {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  }

  .discovery-box .secondary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .guided-hero,
  .launch-panel,
  .setup-grid,
  .account-billing-grid,
  .account-console-grid,
  .plan-card-grid,
  .launch-plan-grid,
  .rules-layout,
  .monitoring-grid,
  .operator-panel,
  .snapshot-grid,
  .group-picker,
  .discovery-box {
    grid-template-columns: 1fr;
  }

  .guided-hero {
    align-items: stretch;
    gap: 14px;
    margin-bottom: 12px;
  }

  .plan-card-choice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .plan-price {
    grid-column: 2;
    min-width: 0;
    justify-items: start;
    text-align: left;
  }

  .plan-card-footer {
    justify-content: flex-start;
    padding-left: 48px;
  }

  .guided-workspace.authenticated .guided-hero {
    grid-template-columns: 1fr;
  }

  .guided-workspace {
    padding: 18px 14px 36px;
  }

  .guided-hero .brand {
    align-self: start;
  }

  .guided-hero h1 {
    font-size: clamp(28px, 6vw, 38px);
    line-height: 1.06;
  }

  .hero-actions {
    min-width: 0;
  }

  .guided-workspace.authenticated .hero-actions {
    width: 100%;
  }

  .session-toolbar {
    flex-wrap: wrap;
  }

  .launch-cta-row {
    grid-template-columns: 1fr;
  }

  .status-strip {
    min-height: 38px;
    margin-bottom: 12px;
    padding: 8px 10px;
  }

  .app-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
    gap: 4px;
    overflow: visible;
    padding: 5px;
    margin: 0 0 12px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(21, 32, 43, 0.06);
  }

  .app-nav button {
    position: relative;
    min-height: 42px;
    padding: 7px 3px 8px;
    text-align: center;
    border-radius: 7px;
    justify-items: center;
  }

  .app-nav button strong {
    display: none;
  }

  .app-nav button::after {
    content: attr(data-short-label);
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-nav button.active {
    border-color: transparent;
    background: #f2f6ff;
    box-shadow: inset 0 0 0 1px #c6d8ff;
  }

  .app-nav button.active::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px;
    height: 3px;
    border-radius: 999px;
    background: var(--blue);
  }

  .main-rule-panel .panel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .main-rule-panel .panel-heading > div {
    grid-column: 1;
    grid-row: 1;
  }

  .main-rule-panel .panel-heading > .switch {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin-top: 2px;
  }

  .main-rule-panel .rules-save-button {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
  }

  #section-regras .form-grid.two,
  #section-regras .segmented-control,
  #section-regras .preset-row,
  #section-regras .inline-form,
  #section-regras .profanity-level-grid,
  #section-regras .profanity-config-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  #section-regras .message-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #section-regras #closeTime,
  #section-regras #openTime {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    text-align: center;
    font-weight: 800;
    letter-spacing: 0;
  }

  #section-regras .segmented-control label,
  #section-regras .preset-button,
  #section-regras .inline-form > *,
  #section-regras .message-actions > * {
    width: 100%;
  }

  #section-regras .section-save-row {
    justify-content: stretch;
  }

  #section-regras .compact-save-button {
    width: 100%;
  }

  #section-mensagens .panel-heading {
    align-items: flex-start;
  }

  .message-subnav {
    grid-template-columns: 1fr;
    margin-inline: 0;
    padding-inline: 0;
  }

  .message-subnav button {
    min-height: 58px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .message-subnav-group {
    padding: 9px;
  }

  .context-group-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .group-checkbox-list,
  .hour-picker-grid,
  .time-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dynamic-time-list {
    grid-template-columns: 1fr;
  }

  .weekday-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .weekday-picker label {
    font-size: 12px;
  }

  .game-schedule-toolbar {
    grid-template-columns: 1fr;
  }

  .game-schedule-count {
    justify-self: start;
  }

  #section-regras [data-collapsible] > .panel-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
  }

  #section-regras [data-collapsible] > .panel-heading > div {
    min-width: 0;
  }

  .rules-gate-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .operator-panel {
    grid-template-areas:
      "content"
      "actions"
      "checklist";
    gap: 14px;
    padding: 14px;
    margin-bottom: 14px;
  }

  .operator-panel h2 {
    font-size: 19px;
  }

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

  .operator-actions .primary-button {
    width: 100%;
  }

  .readiness-list span {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.3;
  }

  .setup-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  .setup-steps article {
    padding: 12px;
  }

  .setup-steps small {
    font-size: 12px;
  }

  .setup-card,
  .customer-panel,
  .connection-panel,
  .panel {
    padding: 14px;
  }

  .card-heading {
    gap: 10px;
    align-items: flex-start;
  }

  [data-collapsible] > .compact-heading {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  [data-collapsible] > .compact-heading > .collapse-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  .account-phone-edit-button {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-self: stretch;
    width: 100%;
  }

  .card-heading h2 {
    font-size: 20px;
  }

  .guided-workspace .customer-form {
    grid-template-columns: 1fr;
  }

  .account-state-grid {
    grid-template-columns: 1fr;
  }

  .account-state-actions {
    width: 100%;
    justify-content: space-between;
  }

  .account-phone-row {
    grid-template-columns: 1fr;
  }

  .plan-meta {
    grid-template-columns: 1fr;
  }

  .guided-workspace .connection-actions {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .guided-workspace .connection-actions button {
    width: 100%;
  }

  .whatsapp-connected-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .whatsapp-connected-summary .compact-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .guided-workspace .qr-frame {
    justify-self: stretch;
    width: 100%;
    min-height: 210px;
  }

  .guided-workspace .qr-frame img {
    width: min(100%, 180px);
    height: auto;
  }

  .discovery-box {
    padding: 12px;
  }

  .discovery-code {
    min-height: 48px;
    font-size: 16px;
    padding-inline: 10px;
  }

  .group-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .group-card-actions .primary-button,
  .group-card-actions .secondary-button {
    width: 100%;
  }

  details.manual-group-form {
    grid-template-columns: 1fr;
  }

  .preset-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .plan-card-choice {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .plan-price {
    grid-column: 1 / -1;
    min-width: 0;
    justify-items: start;
    padding-left: 30px;
    text-align: left;
  }

  .plan-card-footer {
    justify-content: flex-start;
    padding-left: 46px;
  }

  .pix-payment-actions {
    grid-template-columns: 1fr;
  }

  .invoice-row summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .invoice-expand-label,
  .invoice-cancel-button {
    width: 100%;
    text-align: center;
  }

  .guided-workspace {
    padding: 14px 12px 28px;
  }

  .guided-hero {
    grid-template-columns: 1fr;
  }

  .guided-hero .brand {
    order: 1;
  }

  .guided-hero > div:nth-child(2) {
    order: 2;
  }

  .hero-actions {
    order: 3;
  }

  .session-toolbar {
    grid-template-columns: 1fr;
  }

  .toolbar-button,
  .hero-save-button {
    width: auto;
  }

  .launch-plan-card {
    padding: 14px;
  }

  .launch-plan-price {
    font-size: 26px;
  }

  .setup-steps {
    grid-template-columns: 1fr;
  }

  .setup-steps article {
    gap: 2px 9px;
  }

  .auth-mode-tabs {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .password-recovery-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand.compact-brand {
    gap: 10px;
  }

  .guided-hero h1 {
    font-size: 24px;
  }

  .guided-workspace.authenticated .guided-hero {
    grid-template-columns: auto 1fr auto;
  }

  .guided-workspace.authenticated .guided-hero h1 {
    font-size: 17px;
  }

  .portal-identity small {
    display: none;
  }

  .guided-workspace.authenticated .portal-identity {
    display: none;
  }

  .payment-alert-card {
    grid-template-columns: 1fr;
  }

  .support-mode-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .app-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .app-nav button::after {
    font-size: 11px;
  }

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

  .payment-cta-button {
    min-height: 50px;
    font-size: 16px;
  }

  .group-addon-controls {
    grid-template-columns: 1fr;
  }

  .pix-payment-actions {
    grid-template-columns: 1fr;
  }

  .payment-method-actions {
    grid-template-columns: 1fr;
  }

  .pairing-code-row {
    grid-template-columns: 1fr;
  }

  .plan-upgrade-actions {
    grid-template-columns: 1fr;
  }

  .group-addon-controls input,
  .group-addon-controls button,
  .plan-upgrade-actions button {
    width: 100%;
  }

  .discovery-box p,
  .operator-panel p:not(.eyebrow),
  .setup-steps small,
  .group-card-main small,
  .empty-group-card span {
    font-size: 11px;
  }
}
.human-verification {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 48px;
  padding: .7rem .85rem;
  border: 1px solid var(--line, #dbe4e8);
  border-radius: 12px;
  background: #f7faf9;
  color: #42524b;
  font-size: .9rem;
}
.human-verification-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid #b9c7c1;
  border-top-color: #177a57;
  border-radius: 50%;
  animation: human-verification-spin .8s linear infinite;
}
.human-verification.is-verified { border-color: #8ed0b6; background: #effaf5; color: #126142; }
.human-verification.is-verified .human-verification-icon { border: 0; animation: none; }
.human-verification.is-verified .human-verification-icon::before { content: "✓"; display: block; font-weight: 800; font-size: 20px; }
.human-verification.is-error { border-color: #e2aaa7; background: #fff6f5; color: #8b2d28; }
.human-verification.is-error .human-verification-icon { display: none; }
@keyframes human-verification-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Visual refinement layer
   Keeps the existing markup and interaction contracts intact while making the
   customer panel calmer, clearer and easier to navigate with keyboard/touch.
   -------------------------------------------------------------------------- */

::selection {
  background: #cfe0ff;
  color: #10284d;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  transform: translateY(-160%);
  border-radius: var(--control-radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
  padding: 10px 14px;
  font-weight: 850;
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

body {
  background:
    radial-gradient(circle at 12% -10%, rgba(45, 112, 224, 0.08), transparent 34rem),
    radial-gradient(circle at 92% 4%, rgba(15, 123, 85, 0.06), transparent 28rem),
    var(--bg);
}

button,
a,
summary,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:where(button, a, summary, input, select, textarea):focus-visible {
  outline: 3px solid rgba(23, 95, 197, 0.34);
  outline-offset: 3px;
}

:where(input, select, textarea):focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.58;
}

input::placeholder,
textarea::placeholder {
  color: #7b8796;
  opacity: 1;
}

.guided-workspace {
  width: min(1220px, 100%);
  padding-top: 24px;
}

.guided-hero {
  border-color: rgba(205, 216, 229, 0.92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand {
  border-radius: var(--radius-sm);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(145deg, #15966a, #0d6f4c);
  box-shadow: 0 8px 20px rgba(15, 123, 85, 0.2);
}

.guided-hero h1 {
  color: #111c27;
  letter-spacing: -0.025em;
}

.eyebrow {
  letter-spacing: 0.08em;
}

.account-menu-popover {
  border-radius: var(--radius-md);
  border-color: var(--line);
  box-shadow: var(--shadow-lg);
  padding: 8px;
}

.account-menu-popover button {
  border-radius: 9px;
}

.account-menu-button {
  width: 40px;
  height: 40px;
}

.status-strip {
  min-height: 42px;
  border-color: rgba(205, 216, 229, 0.94);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  color: var(--muted-strong);
  padding-inline: 14px;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 4px rgba(15, 123, 85, 0.12);
}

.status-strip.error .status-dot {
  box-shadow: 0 0 0 4px rgba(185, 47, 53, 0.12);
}

.support-mode-banner,
.payment-alert-card,
.inline-feedback,
.inline-note,
.feature-lock,
.human-verification {
  border-radius: var(--radius-md);
}

.app-nav {
  top: 52px;
  gap: 7px;
  border-color: rgba(205, 216, 229, 0.92);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 12px 30px rgba(21, 32, 43, 0.09);
  padding: 7px;
}

.guided-workspace.authenticated .app-nav {
  top: 52px;
}

.app-nav button {
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding-inline: 13px;
  text-align: center;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.app-nav button.active {
  border-color: #b5cdf8;
  background: linear-gradient(180deg, #f4f8ff, var(--blue-soft));
  box-shadow: inset 0 -2px 0 rgba(23, 95, 197, 0.18);
}

.workspace-section.active {
  gap: 20px;
}

.setup-steps article,
.setup-card,
.panel,
.connection-panel,
.customer-panel,
.snapshot-card,
.operator-panel,
.group-card,
.empty-group-card {
  border-color: rgba(205, 216, 229, 0.94);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.setup-card,
.panel,
.connection-panel,
.customer-panel {
  background: linear-gradient(180deg, #fff 0%, #fdfefe 100%);
}

.setup-card,
.panel {
  gap: 18px;
}

.card-heading,
.panel-heading {
  min-width: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8edf3;
}

.card-heading h2,
.panel-heading h2 {
  color: #14202d;
  letter-spacing: -0.015em;
}

.snapshot-grid {
  gap: 14px;
}

.snapshot-card {
  min-height: 136px;
  align-content: start;
  gap: 7px;
  padding: 16px;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.snapshot-card small {
  letter-spacing: 0.055em;
}

.snapshot-card strong {
  color: #172434;
  font-size: 17px;
  line-height: 1.25;
}

.snapshot-card.ready {
  background: linear-gradient(180deg, #f8fffb, #f0faf6);
}

.snapshot-card.warning {
  background: linear-gradient(180deg, #fffdfa, #fff8ed);
}

.operator-panel {
  border-color: #c7d9f7;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff 0%, #f1f6ff 100%);
  padding: 22px;
}

.payment-alert-card {
  border-color: #eac26f;
  background: linear-gradient(135deg, #fffaf0, #fff4d9);
  box-shadow: 0 8px 20px rgba(128, 83, 0, 0.07);
  padding: 16px 18px;
}

.readiness-list button {
  min-height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
}

select,
input,
textarea {
  border-color: #cfd9e5;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(21, 32, 43, 0.025);
}

select:hover:not(:disabled),
input:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: #aebdce;
}

select:focus,
input:focus,
textarea:focus {
  box-shadow: var(--focus-ring);
}

label,
legend {
  color: #263445;
}

.primary-button,
.secondary-button {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  font-weight: 800;
}

.guided-workspace .toolbar-button,
.guided-workspace .compact-action,
.collapse-toggle {
  min-height: 40px;
  height: auto;
}

.password-toggle {
  top: 23px;
  right: 4px;
  width: 38px;
  height: 38px;
}

.primary-button {
  background: linear-gradient(180deg, #226dcc, #1558b3);
  box-shadow: 0 7px 16px rgba(23, 95, 197, 0.18);
}

.secondary-button {
  border-color: #cfd9e5;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #2876db, #1558b3);
  box-shadow: 0 10px 22px rgba(23, 95, 197, 0.24);
}

.secondary-button:hover:not(:disabled) {
  border-color: #aebed1;
  background: #f7faff;
  box-shadow: var(--shadow-sm);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}

.auth-mode-tabs,
.channel-mode-selector,
.billing-cycle-selector {
  gap: 7px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  padding: 5px;
}

.auth-mode-tabs button,
.channel-mode-selector button,
.billing-cycle-selector button {
  border-color: transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  box-shadow: none;
}

.auth-mode-tabs button.active,
.channel-mode-selector button.active,
.billing-cycle-selector button.active {
  border-color: #c6d8f6;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.phone-verification-panel,
.password-recovery-panel,
.channel-checklist,
details.manual-group-form {
  border-color: #cbd7e5;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.account-state-card,
.account-state-item,
.billing-summary,
.payment-cta-wrap,
.pix-payment-panel,
.payment-method-panel,
.official-bot-card,
.catalog-card,
.command-card,
.detail-row,
.invoice-row,
.referral-coupon-card,
.moderator-row {
  border-radius: var(--radius-md);
}

.payment-cta-wrap {
  padding: 16px;
  background: linear-gradient(180deg, #f9fbff, #edf4ff);
}

.payment-cta-button {
  box-shadow: 0 12px 26px rgba(23, 95, 197, 0.2);
}

.group-card {
  padding: 15px;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.group-card.active {
  border-left-width: 4px;
}

.group-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.group-card.selected {
  border-color: #8eb0eb;
  box-shadow: 0 0 0 3px rgba(23, 95, 197, 0.12), var(--shadow-sm);
}

.status-badge,
.account-state-badge,
.invoice-status-badge,
.plan-chip,
.launch-plan-badge {
  letter-spacing: 0.015em;
}

.inline-feedback {
  padding: 13px 15px;
}

.inline-feedback.info {
  border-color: #cbd9eb;
  background: #f5f8fd;
}

.inline-feedback.success {
  border-color: #aedad0;
  background: #eefaf5;
}

.inline-feedback.error {
  border-color: #e6b4b7;
  background: #fff4f4;
}

.invoice-row summary,
details.manual-group-form summary {
  border-radius: var(--radius-sm);
}

.invoice-row summary:focus-visible,
details.manual-group-form summary:focus-visible {
  outline-offset: 5px;
}

.command-card code,
.discovery-code,
.pairing-code-output {
  border-radius: var(--radius-sm);
}

.activity-item {
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.workspace-section,
[data-collapsible],
.message-automation-block {
  scroll-margin-top: 92px;
}

@media (hover: hover) and (pointer: fine) {
  .snapshot-button:hover:not(:disabled),
  .group-card:hover,
  .launch-plan-card:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 980px) {
  .guided-workspace {
    padding: 16px 14px 34px;
  }

  .guided-hero,
  .operator-panel {
    border-radius: var(--radius-md);
  }

  .app-nav {
    gap: 5px;
    padding: 6px;
  }

  .setup-card,
  .customer-panel,
  .connection-panel,
  .panel {
    padding: 16px;
  }

  .snapshot-card {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .guided-workspace {
    padding: 12px 10px 28px;
  }

  .guided-hero {
    padding: 14px;
  }

  .guided-hero h1 {
    font-size: clamp(23px, 7vw, 30px);
  }

  .status-strip {
    border-radius: var(--radius-sm);
  }

  .card-heading,
  .panel-heading {
    padding-bottom: 12px;
  }

  .primary-button,
  .secondary-button,
  .app-nav button,
  .readiness-list button,
  .guided-workspace .toolbar-button,
  .guided-workspace .compact-action,
  .collapse-toggle {
    min-height: 44px;
  }

  .primary-button,
  .secondary-button {
    height: auto;
    white-space: normal;
    line-height: 1.25;
  }
}

@media (max-width: 560px) {
  .guided-workspace {
    padding-inline: 8px;
  }

  .guided-hero,
  .setup-card,
  .customer-panel,
  .connection-panel,
  .panel,
  .operator-panel {
    padding: 14px;
  }

  .app-nav button::after {
    font-size: 11.5px;
  }

  .discovery-box p,
  .operator-panel p:not(.eyebrow),
  .setup-steps small,
  .group-card-main small,
  .empty-group-card span {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .snapshot-card {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: #9aa9ba;
    --muted: #465464;
  }

  .primary-button,
  .secondary-button,
  input,
  select,
  textarea,
  .setup-card,
  .panel,
  .app-nav {
    border-width: 2px;
  }
}
