:root {
  font:
    14px/1.5 "Segoe UI",
    Arial,
    sans-serif;
  color: #193e34;
  background: #f3f7f5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  display: grid;
  grid-template-columns: 220px 1fr;
}
aside {
  background: #143e32;
  color: white;
  min-height: 100vh;
  padding: 24px 16px;
}
aside a {
  color: white;
}
aside .brand {
  font-size: 26px;
  font-weight: 750;
  text-decoration: none;
}
nav {
  display: grid;
  gap: 5px;
  margin: 24px 0;
}
nav button {
  background: transparent;
  color: white;
  border: 0;
  text-align: left;
}
nav button.active {
  background: #2b5b49;
}
main {
  padding: 28px;
  min-width: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
h1 {
  margin: 4px 0 24px;
  font-size: 28px;
}
h2 {
  font-size: 19px;
}
small {
  font-size: 11px;
  letter-spacing: 1px;
}
button,
input,
select,
textarea {
  font: inherit;
  border: 1px solid #bacfc4;
  border-radius: 7px;
  padding: 9px 12px;
}
button {
  cursor: pointer;
  background: #e7f1eb;
  color: #194f3d;
}
button.primary {
  background: #17654d;
  color: white;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #438db6;
  outline-offset: 2px;
}
input,
select,
textarea {
  max-width: 100%;
  background: white;
}
textarea {
  min-height: 95px;
  width: 100%;
}
label {
  display: grid;
  gap: 5px;
  margin: 10px 0;
}
label.check {
  display: flex;
  align-items: center;
}
input[type="checkbox"] {
  width: 17px;
  height: 17px;
}
form,
.panel {
  background: white;
  border: 1px solid #dbe6df;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.metric {
  font-size: 30px;
  font-weight: 700;
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  background: white;
}
td,
th {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e1ebe5;
  vertical-align: top;
}
th {
  background: #e9f1ed;
}
td:last-child {
  white-space: normal;
}
td button {
  margin: 2px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.muted {
  color: #62796c;
}
.warning {
  background: #fff4dc;
  padding: 12px;
  border-radius: 7px;
}
a {
  color: #17654d;
}
.choices {
  max-height: 280px;
  overflow: auto;
  border: 1px solid #dbe6df;
  padding: 10px;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
#feedback {
  color: #8b361e;
  white-space: pre-wrap;
}
.message {
  padding: 12px;
  border-radius: 9px;
  background: #eaf4ed;
  margin: 8px 0;
}
.message.in {
  background: #f0f2f3;
}
.message small {
  display: block;
}
.actions {
  display: flex;
  gap: 6px;
}
@media (max-width: 750px) {
  body {
    display: block;
  }
  aside {
    min-height: auto;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    margin: 12px 0;
  }
  main {
    padding: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Meta connection content moved from the linked-device workspace. */
#meta-test {
  max-width: 560px;
  display: grid;
  gap: 12px;
}
#meta-preview {
  white-space: pre-wrap;
}

.official-api-page .page-header > div,
.official-api-page #account-label {
  display: none;
}
#meta-test[hidden] {
  display: none;
}

.meta-onboarding {
  padding: 12px 16px;
  background: #f2f7f5;
  border-radius: 10px;
  margin: 12px 0;
}
#meta-register {
  max-width: 400px;
  margin: 12px 0;
}
#meta-signup {
  background: #1769cc;
  color: white;
}

/* Customer-facing Meta onboarding. */
.workspace-main #meta {
  max-width: 1120px;
  background: transparent;
  border: 0;
  padding: 0;
}
.meta-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0 8px;
}
.meta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #54806c;
}
.meta-hero h2 {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.2;
  margin: 12px 0;
}
.meta-hero p:not(.meta-eyebrow) {
  color: #60766c;
  line-height: 1.7;
  max-width: 540px;
}
.meta-platform-label {
  border: 1px solid #ccdcd3;
  border-radius: 24px;
  padding: 9px 14px;
  white-space: nowrap;
  font-size: 12px;
  margin-top: 12px;
  background: white;
}
#meta-status {
  padding: 13px 16px;
  border: 1px solid #d5e3db;
  border-radius: 9px;
  background: #eaf3ed;
  line-height: 1.6;
}
.meta-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 20px 0;
  margin: 0 0 10px;
}
.meta-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #64796f;
}
.meta-steps li > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cadbd1;
  flex-shrink: 0;
}
.meta-steps li.is-complete > span {
  background: #d9ede0;
  color: #15583e;
  border-color: #d9ede0;
}
.meta-steps li[aria-current="step"] > span {
  background: #19634f;
  color: white;
  border-color: #19634f;
}
.meta-steps strong,
.meta-steps small {
  display: block;
}
.meta-steps strong {
  font-size: 13px;
  color: #234d3d;
}
.meta-steps small {
  font-size: 12px;
  margin-top: 5px;
}
.meta-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
#meta .meta-onboarding {
  background: white;
  border: 1px solid #d6e3db;
  padding: 28px;
  margin: 0;
  border-radius: 14px;
}
#meta h3 {
  font-size: 19px;
  letter-spacing: -0.3px;
  margin: 0 0 14px;
}
#meta .meta-onboarding p {
  line-height: 1.75;
  color: #60766c;
}
#meta .meta-onboarding .meta-eyebrow {
  margin-top: 0;
  color: #54806c;
}
.workspace-main #meta-signup {
  min-height: 44px;
  padding: 11px 20px;
  background: #17634e;
  border: 1px solid #17634e;
  margin: 10px 8px 0 0;
}
.workspace-main #meta-refresh {
  background: white;
  min-height: 44px;
  margin-top: 10px;
}
.meta-preparation {
  padding: 24px;
  background: #e9f0eb;
  border-radius: 14px;
}
.meta-preparation ul {
  padding-left: 18px;
  line-height: 1.75;
  font-size: 13px;
}
.meta-preparation li {
  margin: 12px 0;
}
.meta-preparation p,
.meta-next p {
  font-size: 13px;
  line-height: 1.75;
  color: #60766c;
}
#meta-signup-status {
  font-size: 13px;
  min-height: 24px;
}
#meta-connected-account:not(:empty) {
  background: #eef7f0;
  border-left: 3px solid #19634f;
  padding: 12px;
  overflow-wrap: anywhere;
}
#meta-register {
  padding-top: 14px;
  border-top: 1px solid #dce7df;
}
#meta-register small {
  display: block;
  line-height: 1.6;
  margin-bottom: 12px;
}
.meta-next {
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid #d6e3db;
  border-bottom: 1px solid #d6e3db;
}
#meta .meta-next h3 {
  font-size: 16px;
}
#meta-test {
  background: white;
  border: 1px solid #d6e3db;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}
@media (max-width: 700px) {
  .meta-hero {
    display: block;
    padding-top: 8px;
  }
  .meta-platform-label {
    display: inline-block;
    margin: 0 0 12px;
  }
  .meta-hero h2 {
    font-size: 27px;
  }
  .meta-setup-grid {
    grid-template-columns: 1fr;
  }
  .meta-steps {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  #meta .meta-onboarding {
    padding: 20px;
  }
  .meta-preparation {
    padding: 20px;
  }
}

.meta-preparation {
  min-height: 0;
  color: inherit;
}
[hidden] {
  display: none !important;
}

/* Compact official navigation: independent from the linked-device sidebar. */
body {
  --sidebar-width: 230px;
  display: block;
  background: #f3f6fb;
  color: #223b56;
}
#official-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: #203e61;
  color: #eef5ff;
  z-index: 10;
}
#official-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#official-sidebar .brand {
  font-size: 21px;
  white-space: nowrap;
}
#official-nav-toggle {
  font-size: 24px;
  line-height: 28px;
  padding: 2px 10px;
  background: #31577e;
  color: white;
  border-color: #5c7898;
}
#official-sidebar .sidebar-caption {
  font-size: 10px;
  letter-spacing: 1.4px;
  margin: 8px 4px 12px;
  color: #c5d6ea;
}
#official-sidebar .workspace-picker {
  font-size: 11px;
  margin: 0 0 12px;
}
#official-sidebar select {
  width: 100%;
  min-width: 0;
  padding: 6px;
  font-size: 12px;
}
#official-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  min-height: 0;
  overflow-y: auto;
  flex: 0 1 auto;
}
#official-sidebar nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 14px;
  line-height: 20px;
  flex-shrink: 0;
  border: 0;
}
#official-sidebar nav button:hover,
#official-sidebar nav button.active {
  background: #365c86;
  color: white;
}
.nav-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-icon svg {
  width: 20px;
  height: 20px;
}
#official-sidebar .sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 14px;
}
.switch-mode {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 7px;
}
#official-sidebar .switch-mode:hover {
  background: #365c86;
}
#official-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: #e8eff8;
  color: #203e61;
  padding: 8px 10px;
}
body > main {
  margin-left: var(--sidebar-width);
  padding: 26px 32px;
}
body.nav-collapsed {
  --sidebar-width: 76px;
}
body.nav-collapsed #official-sidebar .nav-label,
body.nav-collapsed #official-sidebar .brand,
body.nav-collapsed #official-sidebar .sidebar-caption,
body.nav-collapsed #official-sidebar .workspace-picker,
body.nav-collapsed #official-user-name {
  display: none;
}
body.nav-collapsed #official-sidebar .sidebar-brand {
  justify-content: center;
  margin-bottom: 12px;
}
body.nav-collapsed #official-sidebar nav button,
body.nav-collapsed #official-sidebar .switch-mode,
body.nav-collapsed #official-logout {
  justify-content: center;
  padding: 7px;
}
@media (max-width: 800px) {
  body {
    --sidebar-width: 76px;
  }
  #official-sidebar .nav-label,
  #official-sidebar .brand,
  #official-sidebar .sidebar-caption,
  #official-user-name,
  #official-nav-toggle {
    display: none;
  }
  #official-sidebar .workspace-picker {
    font-size: 0;
  }
  #official-sidebar select {
    font-size: 11px;
  }
  #official-sidebar nav button,
  #official-sidebar .switch-mode,
  #official-logout {
    justify-content: center;
    padding: 7px;
  }
  body > main {
    padding: 20px 14px;
  }
  header {
    flex-wrap: wrap;
  }
}
/* Dense navigation, consistent with other portals. */
body {
  --sidebar-width: 210px;
}
#official-sidebar {
  padding: 10px 8px;
}
#official-sidebar .brand {
  font-size: 19px;
}
#official-sidebar nav {
  gap: 1px;
}
#official-sidebar nav button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 13px;
  line-height: 20px;
}
#official-sidebar .sidebar-caption {
  margin: 6px 4px 9px;
}
#official-sidebar .workspace-picker {
  margin-bottom: 8px;
}
body.nav-collapsed {
  --sidebar-width: 68px;
}
@media (max-width: 800px) {
  body {
    --sidebar-width: 68px;
  }
}
.import-summary {
  padding: 12px;
  border-radius: 8px;
  background: #eaf2ff;
}
/* Official WhatsApp identity. */
body{background:#f0f7f3;color:#173e34}
#official-sidebar{background:#075e54}
#official-sidebar nav button:hover,#official-sidebar nav button.active,#official-sidebar .switch-mode:hover{background:#128c7e}
#official-nav-toggle{background:#128c7e;border-color:#42aa88}
#official-sidebar .sidebar-caption{color:#c8f5dc}
#official-sidebar nav button.active{box-shadow:inset 3px 0 #25d366}
button.primary{background:#128c7e;color:white}
.import-summary{background:#e4f7eb}

/* Account security shares the active portal shell. */
.security-panel{max-width:720px;margin:0;padding:24px;border:1px solid #d6e3dd;border-radius:14px;background:white;box-shadow:0 5px 20px #173e3408}
.security-panel h1{font-size:22px;margin:0 0 8px}.security-panel h2{font-size:18px}
.security-panel form{display:grid;gap:14px;margin-top:20px}.security-panel [hidden]{display:none!important}
.security-panel label{display:grid;gap:6px;font-size:14px;margin:0}.security-panel input{box-sizing:border-box;width:100%;padding:10px 12px;min-width:0;border:1px solid #bfd0c8;border-radius:8px;font:inherit}
.security-panel p{font-size:14px;line-height:1.6}.security-panel button{justify-self:start;padding:10px 18px}.security-panel #status:empty{display:none}
.security-panel #status:not(:empty){padding:10px;background:#edf4f0;border-radius:8px}.security-panel #recovery{border-top:1px solid #d6e3dd;padding-top:16px}
@media(max-width:600px){.security-panel{padding:16px}.security-panel button{width:100%}}

/* Keep a single sidebar flow; compact enough for laptop and zoomed views. */
#official-sidebar{overflow-y:auto}
#official-sidebar nav{overflow:visible;flex:0 0 auto}
#official-sidebar .sidebar-footer{gap:4px;padding-top:8px}
#official-sidebar .switch-mode{padding:5px 9px;min-height:30px}
#official-sidebar .sidebar-footer>a[aria-current=page]{background:#128c7e}
@media(max-height:760px){
 #official-sidebar{padding:8px}
 #official-sidebar .sidebar-caption{margin:4px 0 6px;font-size:9px}
 #official-sidebar .workspace-picker{margin-bottom:5px}
 #official-sidebar nav{gap:0}
 #official-sidebar nav button{min-height:27px;padding:3px 8px;line-height:20px}
 #official-sidebar .sidebar-footer{gap:3px;padding-top:6px;font-size:12px}
 #official-sidebar .switch-mode{min-height:26px;padding:3px 8px;font-size:12px}
 #official-logout{padding:5px 8px;font-size:12px}
}

/* Give the content priority over the repeated workspace heading. */
body>main{padding:14px 24px}
body>main>header{min-height:32px;gap:12px;margin:0 0 12px}
body>main>header small{display:none}
body>main>header h1{font-size:22px;line-height:1.25;margin:0}
body>main>header #role{font-size:12px}
body>main>#feedback:empty{display:none}
body>main>#feedback:not(:empty){margin:8px 0}
@media(max-width:800px){body>main{padding:12px 14px}body>main>header h1{font-size:20px}}

#page-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-left:auto}
#page-actions button{padding:6px 12px;min-height:32px;font-size:13px}
body>main>header>div:first-child{margin-right:auto}
body>main>header #role{order:3;color:#60766c;font-size:11px}
.editor-dialog{width:min(660px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid #cadbd1;border-radius:14px;padding:20px;color:#173e34;box-shadow:0 20px 80px #102f3450}
.editor-dialog::backdrop{background:#102f3466}
.editor-dialog form{margin:0;padding:0;border:0;box-shadow:none}
.editor-dialog .dialog-close{display:block;margin:0 0 12px auto;padding:5px 12px}
.editor-dialog h2{margin:0 0 16px}.form-error{color:#9f2525;background:#fff0eb;padding:10px;border-radius:6px}
.pagination{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:12px;margin-top:12px}
@media(max-width:600px){#page-actions{margin-left:0}body>main>header{flex-wrap:wrap}body>main>header #role{display:none}.editor-dialog{padding:14px}}

/* Shared action colors and icons across all portals. */
body button.action-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:var(--action-bg)!important;color:var(--action-fg)!important;border:1px solid var(--action-border)!important;vertical-align:middle}
button.action-button[data-action-tone=neutral]{--action-bg:#e2e8f0;--action-fg:#334155;--action-border:#cbd5e1}
button.action-button[data-action-tone=success]{--action-bg:#187447;--action-fg:#fff;--action-border:#187447}
button.action-button[data-action-tone=info]{--action-bg:#285fa5;--action-fg:#fff;--action-border:#285fa5}
button.action-button[data-action-tone=danger]{--action-bg:#b73535;--action-fg:#fff;--action-border:#b73535}
button.action-button[data-action-tone=warning]{--action-bg:#925c09;--action-fg:#fff;--action-border:#925c09}
button.action-button[data-action-tone=export]{--action-bg:#7545a7;--action-fg:#fff;--action-border:#7545a7}
button.action-button[data-action-tone=primary]{--action-bg:#076c5c;--action-fg:#fff;--action-border:#076c5c}
button.action-button .action-icon{width:17px;height:17px;flex:0 0 17px;pointer-events:none}
body button.action-button:hover:not(:disabled){filter:brightness(.96);box-shadow:0 2px 5px #152b3b15}
body button.action-button:focus-visible{outline:3px solid #63a0de;outline-offset:2px}
body button.action-button:disabled{opacity:.48;cursor:not-allowed;box-shadow:none}

.meta-payments-link{display:inline-flex;align-items:center;padding:10px 16px;border:1px solid #096653;border-radius:8px;background:#087f6b;color:white;text-decoration:none;font-weight:600;margin:8px 0 14px}.meta-payments-link:hover{background:#066553}.meta-payments-link:focus-visible{outline:3px solid #63a0de;outline-offset:3px}
.inbox-toolbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:12px}.inbox-toolbar label{margin:0;flex:1}.inbox-layout{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(280px,1.7fr) minmax(240px,1fr);gap:14px;align-items:start}.inbox-list,.inbox-chat,.inbox-details{background:white;border:1px solid #cbded8;border-radius:12px;padding:14px;min-width:0}.inbox-layout h2{font-size:18px;margin:0 0 12px}.inbox-layout h3{font-size:16px;margin:18px 0 8px}.inbox-layout form{padding:0;margin:12px 0}.inbox-layout label{font-size:13px}.inbox-layout input,.inbox-layout select,.inbox-layout textarea{min-width:0;width:100%;box-sizing:border-box;padding:8px}.inbox-contact{display:flex!important;flex-direction:column;align-items:start!important;width:100%;text-align:left;margin-bottom:8px;gap:4px;padding:10px!important}.inbox-contact.selected{background:#d2f1e4!important;border-color:#087b62!important}.inbox-contact small{font-size:11px}.inbox-history{height:350px;overflow:auto;padding:10px;background:#f0f7f4;border-radius:8px;display:flex;flex-direction:column;gap:10px}.inbox-bubble{max-width:90%;padding:10px;border-radius:10px;background:white;align-self:start;white-space:pre-wrap;overflow-wrap:anywhere}.inbox-bubble.outgoing{background:#d6f4e4;align-self:end}.inbox-bubble small{display:block;font-size:11px;margin-top:6px;color:#4d6860}.inbox-note{border-top:1px solid #d7e5df;padding:10px 0;overflow-wrap:anywhere}.inbox-note p{white-space:pre-wrap;margin:6px 0}.inbox-note small{display:block}.inbox-task-summary{margin-top:16px}.inbox-task-summary summary{cursor:pointer;font-weight:600;padding:12px;background:#e0eee8;border-radius:8px}@media(max-width:1100px){.inbox-layout{grid-template-columns:210px minmax(0,1fr)}.inbox-details{grid-column:1/-1}}@media(max-width:650px){.inbox-layout{grid-template-columns:1fr}.inbox-details{grid-column:auto}.inbox-history{height:300px}}

.number-management-link{display:block;font-size:12px;margin-top:4px} .sidebar .number-management-link{color:inherit}

.inbox-layout{grid-template-columns:290px minmax(0,1fr);gap:0;border:1px solid #cbded8;border-radius:12px;overflow:hidden}.inbox-list,.inbox-chat{border:0;border-radius:0}.inbox-list{border-right:1px solid #cbded8;max-height:650px;overflow:auto}.inbox-chat{background:#edf6f1}.inbox-history{height:400px}.inbox-contact{background:white!important;border:0!important;border-bottom:1px solid #dce8e1!important;border-radius:0!important}.inbox-customer-panel{margin-top:14px}.inbox-customer-panel>summary{cursor:pointer;padding:12px;background:#e0eee8;border-radius:8px;font-weight:600}.inbox-customer-panel .inbox-details{margin-top:8px}@media(max-width:650px){.inbox-layout{grid-template-columns:1fr}.inbox-list{max-height:240px}.inbox-history{height:320px}}

.inbox-bubble img,.inbox-bubble video{max-width:100%;max-height:280px;display:block;border-radius:8px}.inbox-bubble audio{max-width:100%}.inbox-bubble a{display:block;font-size:12px;margin-top:6px}

/* Consistent compact data grids. */
 table th,table td{padding:7px 10px;font-size:12px;line-height:1.4}
 table td button{padding:5px 8px;min-height:28px;font-size:12px;margin-top:0;margin-bottom:0}
 table td button svg{width:15px;height:15px;flex-basis:15px}

/* Consistent professional action controls across application views. */
body button.action-button[data-action-tone]:not(:where(.profile-items button)){
  --action-bg:#ffffff;--action-fg:#334155;--action-border:#d5dee7;
  font-weight:600;border-radius:6px;box-shadow:none;
  transition:background-color .15s,border-color .15s,color .15s;
}
body button.action-button[data-action-tone=primary]:not(:where(.profile-items button)),
body button.action-button[data-action-tone=success]:not(:where(.profile-items button)){
  --action-bg:#176b54;--action-fg:#ffffff;--action-border:#176b54;
}
body button.action-button[data-action-tone=danger]:not(:where(.profile-items button)){
  --action-bg:#fffafa;--action-fg:#a43e3e;--action-border:#e8cdcd;
}
body button.action-button:hover:not(:disabled):not(:where(.profile-items button)){
  --action-bg:#f1f5f9;--action-border:#aebfce;filter:none;box-shadow:none;
}
body button.action-button[data-action-tone=primary]:hover:not(:disabled):not(:where(.profile-items button)),
body button.action-button[data-action-tone=success]:hover:not(:disabled):not(:where(.profile-items button)){
  --action-bg:#125641;--action-border:#125641;
}
body button.action-button[data-action-tone=danger]:hover:not(:disabled):not(:where(.profile-items button)){
  --action-bg:#fceeee;--action-border:#d8a9a9;
}
body button.action-button .action-icon{stroke-width:1.8}
body button.action-button:focus-visible{outline:2px solid #328773;outline-offset:3px}
body button.action-button:disabled{opacity:.5;box-shadow:none}
@media(prefers-reduced-motion:reduce){body button.action-button{transition:none}}
/* Subtle action accents: light surfaces, colored icons and matching borders. */
body button.action-button[data-action-tone=info]:not(:where(.profile-items button)){
  --action-border:#a9c4e4;--action-icon-color:#356da8;
}
body button.action-button[data-action-tone=export]:not(:where(.profile-items button)){
  --action-border:#c8b9df;--action-icon-color:#7856a0;
}
body button.action-button[data-action-tone=warning]:not(:where(.profile-items button)){
  --action-border:#d9c8a5;--action-icon-color:#997329;
}
body button.action-button[data-action-tone=danger]:not(:where(.profile-items button)){
  --action-border:#dfb4b4;--action-icon-color:#b34c4c;
}
body button.action-button[data-action-tone] .action-icon{color:var(--action-icon-color,currentColor)}
body button.action-button[data-action-tone=info]:hover:not(:disabled):not(:where(.profile-items button)){
  --action-bg:#edf4fc;--action-border:#719dce;
}
body button.action-button[data-action-tone=export]:hover:not(:disabled):not(:where(.profile-items button)){
  --action-bg:#f4f0fa;--action-border:#a58bc6;
}
body button.action-button[data-action-tone=warning]:hover:not(:disabled):not(:where(.profile-items button)){
  --action-bg:#faf6ed;--action-border:#bca16c;
}/* Official messaging presentation: scoped to setup and inbox. */
.official-setup-view,.official-inbox-view{max-width:1440px;margin:auto}
.official-setup-view> a{display:inline-block;margin:0 0 16px;font-size:13px}
.connection-card{display:flex;flex-wrap:wrap;align-items:start;gap:20px;justify-content:space-between;background:white;border:1px solid #d8e5e1;border-radius:18px;padding:28px;margin-bottom:20px;box-shadow:0 8px 28px #173e3407}
.connection-card h2{font-size:28px;margin:8px 0;letter-spacing:-.6px}.connection-card p{margin:0;color:#60766c}.connection-card p:first-child{font-size:11px;letter-spacing:1.5px;font-weight:700;color:#176b54}
.connection-badge{background:#e5f5ed;color:#16604a;border:1px solid #c4e3d3;border-radius:30px;padding:7px 14px;font-weight:600;font-size:12px}
.connection-facts{flex-basis:100%;display:flex;gap:28px;flex-wrap:wrap;border-top:1px solid #e4ece8;padding-top:16px;color:#60766c;font-size:13px}
.official-setup-view>details{background:white;border:1px solid #d8e5e1;border-radius:14px;padding:18px;margin-bottom:20px}.official-setup-view summary{cursor:pointer;font-weight:600}.official-setup-view #meta{max-width:none}.official-setup-view #meta-test{max-width:760px;width:100%}.official-setup-view #meta-test input,.official-setup-view #meta-test select{width:100%;min-width:0}.official-setup-view small{letter-spacing:normal}.official-setup-view form{min-width:0}.official-setup-view input[type=checkbox]{width:18px!important}
.official-inbox-view .inbox-toolbar{background:white;border:1px solid #d8e5e1;border-radius:12px;padding:12px 16px}.official-inbox-view .inbox-toolbar label:first-child{flex:2}.official-inbox-view .inbox-toolbar input,.official-inbox-view .inbox-toolbar select{width:100%;min-width:0}
.official-inbox-view .inbox-layout{height:clamp(560px,calc(100dvh - 190px),850px);grid-template-columns:260px minmax(0,1fr);align-items:stretch;box-shadow:0 8px 28px #173e3407;border-radius:16px}
.official-inbox-view .inbox-list{min-height:0;max-height:none;padding:12px;background:#fff;color:#173e34;overflow:auto}
.official-inbox-view .inbox-contact{border-radius:10px!important;padding:14px!important;margin:0 0 6px;gap:5px}.official-inbox-view small{letter-spacing:normal;line-height:1.5}
.official-inbox-view .inbox-chat{min-height:0;display:flex;flex-direction:column;padding:0;overflow:hidden;background:#f3f7f5}
.inbox-chat-header{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:white;border-bottom:1px solid #dce8e1;padding:14px 18px}.inbox-chat-header h2{margin:0!important;font-size:17px}.inbox-chat-header span{font-size:12px;color:#60766c;margin-right:auto}.inbox-chat-header button{font-size:12px!important;padding:6px 10px!important}
.official-inbox-view .inbox-history{height:auto;flex:1;min-height:100px;padding:20px;gap:12px;border-radius:0;background:transparent}.official-inbox-view .inbox-bubble{max-width:82%;padding:12px 16px;border:1px solid #dfe9e3;border-radius:14px 14px 14px 3px;box-shadow:0 2px 4px #173e3405}.official-inbox-view .inbox-bubble.outgoing{border-color:#cce8da;border-radius:14px 14px 3px 14px}.inbox-bubble img,.inbox-bubble video{max-width:100%}
.official-inbox-view .inbox-composer{flex-shrink:0;border:0;border-top:1px solid #dce8e1;border-radius:0;margin:0;padding:12px 18px;background:white;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px}.inbox-composer h2{display:none}.inbox-composer label{margin:0}.inbox-composer label:first-of-type{grid-column:1/-1}.inbox-composer textarea{min-height:66px;max-height:160px;resize:vertical}.inbox-composer input[type=file]{font-size:11px;padding:4px;border:0}.inbox-composer button[type=submit]{align-self:end}.inbox-empty{margin:auto;text-align:center;padding:32px;color:#60766c}.inbox-empty h2{color:#173e34}.official-inbox-view .inbox-list .inbox-toolbar{padding:8px;border:0;justify-content:center}
@media(max-width:800px){.official-inbox-view .inbox-layout{grid-template-columns:190px minmax(0,1fr)}.connection-card{padding:20px}.connection-card h2{font-size:23px}}
@media(max-width:600px){.official-inbox-view .inbox-layout{height:auto;grid-template-columns:1fr}.official-inbox-view .inbox-list{max-height:200px}.official-inbox-view .inbox-chat{height:650px}.inbox-chat-header{padding:12px}.official-inbox-view .inbox-composer{padding:12px;grid-template-columns:1fr}.inbox-composer label:first-of-type{grid-column:auto}.connection-facts{gap:10px}.official-inbox-view .inbox-bubble{max-width:95%}}

/* Compact template workspace and editor; scoped away from other screens. */
.official-templates-view .template-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin-bottom:14px;padding:14px;background:#fff;border:1px solid #d8e5e1;border-radius:12px}
.template-toolbar label{margin:0;min-width:140px;font-size:13px}.template-toolbar label:first-of-type{flex:1}.template-toolbar input,.template-toolbar select{width:100%;min-width:0;padding:8px 10px;min-height:38px}.template-count{font-size:12px;color:#60766c;padding-bottom:10px}
.official-templates-view td{padding:10px 12px;vertical-align:top;font-size:13px}.official-templates-view td:last-child{white-space:pre-wrap;min-width:230px;max-width:480px;overflow-wrap:anywhere}.template-status{display:inline-block;border-radius:20px;padding:3px 9px;background:#edf1f5;color:#475569;font-size:11px;font-weight:700;white-space:nowrap}.template-status[data-status=APPROVED]{background:#e0f4e9;color:#17634e}.template-status[data-status=PENDING]{background:#fff3d9;color:#825a08}.template-status[data-status=REJECTED],.template-status[data-status=DISABLED]{background:#fde8e7;color:#a03434}
dialog.template-editor{width:min(860px,94vw);max-width:94vw;max-height:92dvh;padding:18px;border:1px solid #d8e5e1;border-radius:14px}dialog.template-editor .template-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px;margin:0;min-width:0;max-width:none}.template-form h2,.template-form>p,.template-form>.template-full,.template-form>.form-error{grid-column:1/-1}.template-form h2{font-size:20px;margin:0 0 4px}.template-form label{margin:0;font-size:13px;min-width:0}.template-form input,.template-form select,.template-form textarea{width:100%;min-width:0;box-sizing:border-box;padding:8px 10px;font-size:14px}.template-form textarea{min-height:90px}.template-form>p{font-size:12px;color:#60766c;margin:0}.template-form>button[type=submit]{grid-column:1/-1;justify-self:end}
@media(max-width:600px){dialog.template-editor .template-form{grid-template-columns:1fr;padding:8px}.template-toolbar label{flex:1;min-width:120px}.template-toolbar button{min-height:40px}.template-form>label{grid-column:1/-1}}

.official-inbox-view .inbox-contact{padding:10px 12px!important;gap:3px}.official-inbox-view .inbox-toolbar{gap:10px;padding:10px 12px}.official-inbox-view .inbox-toolbar label{margin:0;font-size:13px}.official-inbox-view .inbox-toolbar input,.official-inbox-view .inbox-toolbar select{padding:8px 10px;min-height:38px}.official-inbox-view .inbox-composer .reply-availability{grid-column:1/-1;margin:0;font-size:12px;line-height:1.5;color:#526b60}.official-inbox-view .inbox-chat-header{padding:10px 14px}.official-inbox-view .inbox-history{padding:14px;gap:8px}.official-inbox-view .inbox-bubble{padding:9px 12px}.official-inbox-view .inbox-customer-panel,.official-inbox-view .inbox-task-summary{margin-top:12px;padding:12px;border:1px solid #d8e5e1;border-radius:10px;background:white}.official-inbox-view summary{cursor:pointer;font-size:14px;font-weight:600}

.message-delivery-status{display:inline-block;margin-left:7px;padding:1px 6px;border-radius:8px;font-size:11px;background:#e8edf1;color:#475569}.message-delivery-status[data-status=delivered],.message-delivery-status[data-status=read]{background:#ddf2e8;color:#17634e}.message-delivery-status[data-status=read]{background:#e1effb;color:#245d8b}.message-delivery-status[data-status=failed],.message-delivery-status[data-status=blocked]{background:#fbe6e5;color:#a03434}.message-delivery-status[data-status=uncertain]{background:#fff0cf;color:#7c590d}

.connection-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.connection-badge.connection-warning{background:#fff0d5;color:#825a08;border-color:#ead19d}.official-setup-view .connection-card{padding:18px;gap:12px;margin-bottom:14px;border-radius:12px}.official-setup-view .connection-card h2{font-size:23px}.official-setup-view .connection-facts{gap:12px 22px;padding-top:12px}

.official-campaign-create .campaign-create-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:1100px;padding:18px;margin-top:14px}.campaign-create-form>h2,.campaign-create-form>.campaign-full,.campaign-create-form>.form-error,.campaign-create-form>p{grid-column:1/-1}.campaign-create-form>h2{font-size:21px;margin:0}.campaign-create-form>label{margin:0;min-width:0;font-size:13px}.campaign-create-form input:not([type=checkbox]),.campaign-create-form select{width:100%;min-width:0;box-sizing:border-box;padding:8px 10px;font-size:14px}.campaign-template-preview{white-space:pre-wrap;overflow-wrap:anywhere;background:#f0f7f3;border:1px solid #d8e5e1;border-radius:8px;padding:12px;font:14px/1.6 inherit;margin:0}.campaign-variables{display:grid;grid-template-columns:1fr 1fr;gap:10px}.campaign-variables:empty{display:none}.campaign-create-form .choices{max-height:260px;overflow:auto;border:1px solid #d8e5e1;border-radius:8px;padding:10px}.campaign-create-form .choices label{padding:6px;font-size:13px}.campaign-create-form>p{margin:0;font-size:12px;color:#60766c}.campaign-create-form>button[type=submit]{grid-column:1/-1;justify-self:end}
@media(max-width:650px){.official-campaign-create .campaign-create-form{grid-template-columns:1fr;padding:12px}.campaign-create-form>label{grid-column:1/-1}.campaign-variables{grid-template-columns:1fr}}
