/* Same WhatsApp surface in every Fluxo app. Only the accent follows its host. */
:root { --fx-wa-accent: var(--flux-brand,#7059d9); }
html:is(.fluxo-barber-app,.p90-v3,.p90-app-light,[data-barber-workspace-account]) { --fx-wa-accent: var(--barber-brand-accent,#237653); }
html:is(.fluxo-food-app,.food-app-layout,.food-workspace,.segment-restaurantes) { --fx-wa-accent: var(--ff-accent,var(--flux-food-red,#d92e51)); }
html:is(.fluxo-clinicas-app,.clinic-app-layout,.clinic-embedded,.segment-clinica-estetica,.art-clinic-entry) { --fx-wa-accent: var(--flux-brand,#147d89); }
html:is(.fluxo-garage-app,.segment-loja-carros) { --fx-wa-accent: var(--gg-deep,#c2410c); }
html:is(.fluxo-escola-app,.fluxo-escolas-premium) { --fx-wa-accent: var(--school-blue,#2460df); }
.fx-wa-page, .fx-wa-dialog, .well-wa-dialog { --fx-wa-soft: color-mix(in srgb,var(--fx-wa-accent) 7%,#fff); --fx-wa-line: #e1e8e6; --fx-wa-ink: #20352e; --fx-wa-muted: #63756e; }
html body #app-container #tab-channels.fx-wa-tab { background:#f5f7f8!important; overflow-x:hidden!important; overflow-y:auto!important; padding:24px 24px 48px!important; scroll-padding-bottom:32px; }
html body #tab-channels .fx-wa-page { width:100%; max-width:720px!important; margin:0 auto; padding:0; color:var(--fx-wa-ink); font:inherit; }
html body #tab-channels .fx-wa-page * { box-sizing:border-box; }
html body #tab-channels .fx-wa-page :where(h2,h3,p) { margin:0; }
html body #tab-channels .fx-wa-page :where(button,summary) { font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
html body #tab-channels .fx-wa-page svg { width:20px; height:20px; flex:none; }
html body #tab-channels .fx-wa-page [hidden], html body #tab-channels .fx-wa-page .hidden { display:none!important; }
html body #tab-channels .fx-wa-back { display:inline-flex; align-items:center; gap:7px; min-height:44px; padding:0; border:0; background:none; color:var(--fx-wa-muted); font-size:13px; font-weight:500; }
html body #tab-channels .fx-wa-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; margin:0 0 8px; padding-bottom:20px; border-bottom:1px solid var(--fx-wa-line); }
html body #tab-channels .fx-wa-heading h2 { display:block!important; font-size:30px!important; line-height:1.2!important; letter-spacing:-1px; font-weight:750; color:var(--fx-wa-ink)!important; }
html body #tab-channels.fx-wa-tab > :is(.cam-tab-heading,.ff-tab-heading) { display:none!important; }
html body #tab-channels .fx-wa-page .fx-wa-heading p { font-size:14px; line-height:1.6; color:var(--fx-wa-muted); margin-top:6px; }
html body #tab-channels .fx-wa-icon { display:grid; place-items:center; background:var(--fx-wa-soft); color:var(--fx-wa-accent); border:1px solid color-mix(in srgb,var(--fx-wa-accent) 14%,#fff); border-radius:15px; width:44px; height:44px; flex:none; }
html body #tab-channels .fx-wa-icon svg { width:24px; height:24px; }
html body #tab-channels .fx-wa-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:22px 0 14px; }
html body #tab-channels .fx-wa-toolbar h3 { font-size:15px; font-weight:650; line-height:1.5; }
html body #tab-channels .fx-wa-add { display:inline-flex; align-items:center; justify-content:center; gap:6px; flex:none; min-height:44px; padding:10px 14px; border-radius:12px; border:1px solid var(--fx-wa-accent); background:var(--fx-wa-accent); color:#fff; font-size:13px; font-weight:650; }
html body #tab-channels .fx-wa-limit { margin-top:12px; padding:17px 18px; border:1px solid var(--fx-wa-line); border-radius:17px; background:var(--fx-wa-soft); font-size:12px; line-height:1.5; color:var(--fx-wa-muted); }
html body #tab-channels .fx-wa-limit-label { font-size:11px; font-weight:650; text-transform:uppercase; letter-spacing:.07em; margin-bottom:5px; }
html body #tab-channels #whatsapp-limit-text { font-size:13px; line-height:1.5; color:var(--fx-wa-muted); }
html body #tab-channels .fx-wa-limit-track { height:5px; overflow:hidden; border-radius:5px; margin-top:12px; background:color-mix(in srgb,var(--fx-wa-accent) 12%,#fff); }
html body #tab-channels #whatsapp-limit-progress { display:block; height:100%; width:0; border-radius:inherit; background:var(--fx-wa-accent); }
html body #tab-channels #whatsapp-limit-progress.bg-amber-500 { background:#bb8523; }
html body #tab-channels #whatsapp-limit-hint { margin-top:6px; color:#946623; font-size:12px; }
html body #tab-channels .fx-wa-list { display:flex; flex-direction:column; gap:16px; }
html body #tab-channels .fx-wa-card { padding:20px; border:1px solid var(--fx-wa-line); border-radius:22px; background:white; box-shadow:0 3px 14px #20352e04; overflow:visible; min-width:0; }
html body #tab-channels .fx-wa-card:has(.fx-wa-default:not([hidden])) { border-color:color-mix(in srgb,var(--fx-wa-accent) 25%,#fff); background:linear-gradient(130deg,var(--fx-wa-soft),#fff 68%); }
html body #tab-channels .fx-wa-identity { display:flex; align-items:flex-start; gap:12px; }
html body #tab-channels .fx-wa-person { flex:1; min-width:0; }
html body #tab-channels .fx-wa-name-row { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; }
html body #tab-channels .fx-wa-name-row h3 { font-size:16px; font-weight:650; line-height:1.4; color:var(--fx-wa-ink); overflow-wrap:anywhere; }
html body #tab-channels .fx-wa-default { font-size:10px; font-weight:650; line-height:1.4; border:1px solid var(--fx-wa-line); border-radius:6px; padding:3px 6px; color:var(--fx-wa-muted); }
html body #tab-channels .fx-wa-page .fx-wa-phone { margin-top:4px; font-size:14px; line-height:1.5; color:var(--fx-wa-muted); overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
html body #tab-channels .fx-wa-state-row { display:flex; align-items:center; gap:8px; margin:8px 0 0 56px; }
html body #tab-channels .fx-wa-status { display:inline-flex; align-items:center; gap:7px; padding:5px 9px; background:#f1f4f3; border-radius:8px; font-size:12px; font-weight:600; line-height:1.5; color:#5c6d65; }
html body #tab-channels .fx-wa-dot { width:6px; height:6px; border-radius:50%; background:currentColor; flex:none; }
html body #tab-channels [data-state="connected"] .fx-wa-status { background:#eaf6ef; color:#246844; }
html body #tab-channels [data-state="disconnected"] .fx-wa-status { background:#fff1e8; color:#9a5127; }
html body #tab-channels [data-state="connecting"] .fx-wa-status { background:#fff6de; color:#876520; }
html body #tab-channels .fx-wa-page .fx-wa-message { font-size:13px; line-height:1.6; color:var(--fx-wa-muted); margin-top:10px; }
html body #tab-channels [data-state=connected] .fx-wa-message { display:none; }
html body #tab-channels .fx-wa-primary { width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; min-height:48px; margin-top:18px; border:0; border-radius:13px; background:var(--fx-wa-accent); color:#fff; font-size:14px; font-weight:650; text-align:left; }
html body #tab-channels .fx-wa-manage { margin-top:10px; padding-top:0; border:0; }
html body #tab-channels .fx-wa-manage summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; padding:10px 0; font-size:13px; color:var(--fx-wa-muted); list-style:none; }
html body #tab-channels summary::-webkit-details-marker { display:none; }
html body #tab-channels .fx-wa-manage summary svg { width:16px; height:16px; transition:transform .18s ease; }
html body #tab-channels .fx-wa-manage[open] summary svg { transform:rotate(180deg); }
html body #tab-channels .fx-wa-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding-top:6px; }
html body #tab-channels .fx-wa-actions button { min-height:44px; border:1px solid var(--fx-wa-line); border-radius:11px; padding:10px; color:var(--fx-wa-ink); background:#fff; font-size:12px; line-height:1.4; }
html body #tab-channels .fx-wa-actions button.fx-wa-danger { color:#a34545; background:#fffafa; border-color:#f1e2e2; }
html body #tab-channels .fx-wa-help { margin-top:20px; color:var(--fx-wa-muted); }
html body #tab-channels .fx-wa-help summary { display:flex; align-items:center; gap:8px; list-style:none; min-height:44px; font-size:13px; }
html body #tab-channels .fx-wa-help ol { padding-left:22px; margin:8px 0 16px; font-size:13px; line-height:1.8; }
html body #tab-channels .fx-wa-help p { font-size:12px; line-height:1.7; }
html body #tab-channels .fx-wa-empty { display:grid; justify-items:center; padding:36px 22px; text-align:center; border:1px dashed #d5e0db; border-radius:24px; background:#fff; }
html body #tab-channels .fx-wa-page .fx-wa-empty h3 { font-size:18px; margin-top:18px; }
html body #tab-channels .fx-wa-page .fx-wa-empty p { max-width:300px; font-size:14px; color:var(--fx-wa-muted); line-height:1.7; margin-top:8px; }
html body #tab-channels .fx-wa-page :is(button,summary):focus-visible { outline:3px solid var(--fx-wa-accent); outline-offset:3px; }
html body #tab-channels .fx-wa-page button:disabled { opacity:.55; cursor:wait; }
html body #tab-channels .fx-wa-legacy { display:none!important; }
@media(max-width:767px) {
  html body #app-container #tab-channels.fx-wa-tab { padding:22px max(18px,env(safe-area-inset-right,0px)) calc(132px + max(var(--barber-safe-bottom,0px),env(safe-area-inset-bottom,0px))) max(18px,env(safe-area-inset-left,0px))!important; scroll-padding-bottom:140px; }
  html.fluxo-barber-app body #app-container #tab-channels.fx-wa-tab { padding-top:calc(var(--barber-safe-top,env(safe-area-inset-top,0px)) + 18px)!important; }
  html body #tab-channels .fx-wa-heading { margin:0 0 8px; padding-bottom:18px; }
  html body #tab-channels .fx-wa-heading h2 { font-size:28px!important; }
  html body #tab-channels .fx-wa-card { padding:20px; border-radius:22px; }
  html body #tab-channels .fx-wa-add { padding:10px 12px; }
}
@media(prefers-reduced-motion:reduce) { html body #tab-channels .fx-wa-manage summary svg { transition:none; } }

/* Restaurants connect one main number. Keep legacy numbers accessible if present. */
html:is(.fluxo-food-app,.food-app-layout,.segment-restaurantes) body #tab-channels :is(#btn-add-whatsapp,#whatsapp-limit-bar),
html body #tab-channels.fx-wa-single :is(#btn-add-whatsapp,#whatsapp-limit-bar) { display:none!important; }
html body #tab-channels.fx-wa-single .fx-wa-help > p { display:none; }
html body #tab-channels.fx-wa-single .fx-wa-card:only-child { border-color:color-mix(in srgb,var(--fx-wa-accent) 20%,#fff); background:linear-gradient(135deg,var(--fx-wa-soft),#fff 65%); }
html body #tab-channels.fx-wa-single .fx-wa-toolbar { margin-top:16px; }

/* Shared account-page finish: compact navigation and one clear connection card. */
html body #tab-channels .fx-wa-back{gap:6px;font-size:12px;font-weight:550;min-height:44px;margin:-8px 0 0;padding:0 2px}
html body #tab-channels .fx-wa-back svg{width:17px;height:17px}
html body #tab-channels .fx-wa-heading{border:0;margin:0 0 22px;padding:0;min-height:44px;align-items:center}
html body #tab-channels .fx-wa-heading h2{font-size:28px!important;letter-spacing:-.8px;line-height:1.25!important}
html body #tab-channels.fx-wa-one-card .fx-wa-toolbar{display:none}
html body #tab-channels .fx-wa-toolbar{margin:20px 0 12px}
html body #tab-channels .fx-wa-toolbar h3{font-size:12px;color:var(--fx-wa-muted);font-weight:600}
html body #tab-channels .fx-wa-limit{margin:0 0 18px;background:#fff;padding:14px 16px}
html body #tab-channels .fx-wa-card,
html body #tab-channels .fx-wa-card:has(.fx-wa-default:not([hidden])),
html body #tab-channels.fx-wa-single .fx-wa-card:only-child{padding:20px;border:1px solid #e3e8ec;border-radius:22px;background:#fff;box-shadow:0 6px 24px #1d293906}
html body #tab-channels .fx-wa-identity{align-items:center;gap:12px}
html body #tab-channels .fx-wa-icon{width:44px;height:44px;border-radius:14px;border:0;background:var(--fx-wa-soft)}
html body #tab-channels .fx-wa-name-row h3{font-size:17px;font-weight:700;letter-spacing:-.3px;line-height:1.3}
html body #tab-channels .fx-wa-page .fx-wa-phone{font-size:13px;margin-top:5px;line-height:1.4}
html body #tab-channels .fx-wa-connection{padding:12px 14px;margin-top:18px;border:1px solid #edf0f2;border-radius:13px;background:#f8f9fb}
html body #tab-channels .fx-wa-state-row{margin:0}
html body #tab-channels .fx-wa-card .fx-wa-status{padding:0;border-radius:0;background:transparent;font-size:12px;gap:7px;line-height:1.4}
html body #tab-channels .fx-wa-page .fx-wa-message{margin-top:5px;font-size:12px;line-height:1.5;color:var(--fx-wa-muted)}
html body #tab-channels .fx-wa-primary{min-height:48px;margin-top:16px;padding:12px 15px;border-radius:13px;font-size:14px;line-height:1.4}
html body #tab-channels .fx-wa-manage{border-top:1px solid #edf0f2;margin-top:16px;padding-top:4px}
html body #tab-channels .fx-wa-manage summary{font-size:12px;min-height:44px;padding:9px 0}
html body #tab-channels .fx-wa-manage summary svg{width:17px;height:17px}
html body #tab-channels .fx-wa-help{padding:6px 16px;margin-top:14px;background:#fff;border:1px solid #e3e8ec;border-radius:16px;box-shadow:0 3px 12px #1d293903}
html body #tab-channels .fx-wa-help summary{font-size:12px;line-height:1.5;gap:9px;min-height:44px}
html body #tab-channels .fx-wa-help summary>svg{width:18px;height:18px;color:var(--fx-wa-accent)}
html body #tab-channels .fx-wa-help summary:after{content:'';width:7px;height:7px;flex:none;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-left:auto;margin-right:3px;transition:transform .18s ease}
html body #tab-channels .fx-wa-help[open] summary:after{transform:rotate(225deg)}
html body #tab-channels .fx-wa-help ol{border-top:1px solid #edf0f2;margin:4px 0 10px;padding:12px 0 0 20px;font-size:12px;line-height:1.65}
html body #tab-channels .fx-wa-help li+li{margin-top:6px}
html body #tab-channels .fx-wa-help p{font-size:11px;margin-bottom:10px}
@media(max-width:380px){html body #tab-channels .fx-wa-card{padding:18px}html body #tab-channels .fx-wa-heading h2{font-size:26px!important}html body #tab-channels .fx-wa-name-row h3{font-size:16px}}
@media(prefers-reduced-motion:reduce){html body #tab-channels .fx-wa-help summary:after{transition:none}}

/* In-app management forms also work where native prompt/confirm is unavailable. */
.fx-wa-action-dialog{max-width:420px}
.fx-wa-action-dialog .fx-wa-action-copy{font-size:14px;line-height:1.6;color:var(--wa-muted);margin:0 0 18px;white-space:pre-line;overflow-wrap:anywhere}
.fx-wa-action-dialog #fx-wa-action-name{width:100%;min-width:0;height:48px;padding:12px;font:inherit;font-size:16px;border:1px solid var(--wa-line)!important;border-radius:12px!important;background:#fff!important;color:#202a32!important;-webkit-text-fill-color:#202a32!important}
.fx-wa-action-dialog .fx-wa-action-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}
.fx-wa-action-dialog .fx-wa-action-buttons button{min-height:48px;margin:0}
.fx-wa-action-dialog .fx-wa-head h2{font-size:22px}
