:root{
  --ayur-primary:#0f766e;
  --ayur-accent:#d97706;
  --ayur-nav:#12372f;
  --ayur-background:#f4faf7;
}
body{background:var(--ayur-background)}
.sidebar{background:linear-gradient(180deg,var(--ayur-nav),color-mix(in srgb,var(--ayur-nav),#000 18%))}
.btn.primary,.brand-icon,.avatar{background:var(--ayur-primary)}
.tab.active{color:var(--ayur-primary);border-bottom-color:var(--ayur-primary)}
.retired-module{display:none!important}
.brand-icon{
  position:relative;overflow:hidden;color:#fff;letter-spacing:-.09em;
  background:linear-gradient(145deg,var(--ayur-primary),color-mix(in srgb,var(--ayur-primary),#071 28%));
  box-shadow:0 14px 34px color-mix(in srgb,var(--ayur-primary),transparent 68%);
}
.brand-icon::after{
  content:"";position:absolute;width:34%;height:48%;right:8%;top:4%;border-radius:80% 10% 80% 10%;
  background:color-mix(in srgb,var(--ayur-accent),#fff 12%);transform:rotate(25deg);opacity:.95;
}
.brand-icon.has-custom-logo{background-position:center;background-repeat:no-repeat;background-size:cover;color:transparent}
.brand-icon.has-custom-logo::after{display:none}
.ayur-address{grid-column:1/-1}
.lead-row-updated{animation:ayurLeadUpdated 2.4s ease-out}
@keyframes ayurLeadUpdated{0%,45%{background:#dcfce7;box-shadow:inset 4px 0 var(--ayur-primary)}100%{background:transparent}}
.studio-brand-preview{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#f8fbfa}
.studio-brand-preview .brand-icon{flex:0 0 auto}
.studio-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.studio-theme-grid input[type=color]{width:100%;height:50px;padding:4px}

/* v5.1.5 — aligned, full-featured WhatsApp conversation workspace */
#inboxView{height:calc(100dvh - 110px);min-height:620px}
.chat-shell{display:grid;grid-template-columns:minmax(285px,350px) minmax(0,1fr);height:100%;overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:0 20px 55px rgba(18,55,47,.12)}
.chat-list-panel{min-width:0;display:flex;flex-direction:column;overflow:hidden;border-right:1px solid var(--line);background:#fbfdfc}
.chat-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px;border-bottom:1px solid var(--line);background:#fff}
.chat-list-head h3{margin:0;color:#0d3e37;font-size:18px}.chat-list-head small{display:block;margin-top:3px;color:var(--muted)}
.chat-search{margin:12px;width:calc(100% - 24px);min-height:42px;padding:10px 13px;border:1px solid var(--line);border-radius:12px;background:#fff}
.chat-list{min-height:0;flex:1;overflow-y:auto}
.chat-row{width:100%;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px 14px;border:0;border-bottom:1px solid #e7efec;color:var(--ink);background:transparent;text-align:left}
.chat-row:hover,.chat-row.active{background:#eaf8f3}.chat-row.active{box-shadow:inset 4px 0 var(--ayur-primary)}
.chat-row-avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;color:#fff;background:linear-gradient(145deg,var(--ayur-primary),#08564f);font-weight:800}
.chat-row-body,.chat-row-side{min-width:0}.chat-row-body b,.chat-row-body small,.chat-row-body span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-row-body small{margin:2px 0;color:var(--muted);font-size:10px}.chat-row-body span{color:#587168;font-size:12px}
.chat-row-side{align-self:stretch;display:flex;align-items:flex-end;flex-direction:column;justify-content:space-between}.chat-row-side time{max-width:68px;color:#819188;font-size:9px;text-align:right}.chat-row-side i{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:99px;color:#fff;background:var(--ayur-primary);font-size:10px;font-style:normal}
.chat-empty{display:grid;place-items:center;align-content:center;min-width:0;padding:28px;color:var(--muted);text-align:center;background:linear-gradient(145deg,#f8fbfa,#edf7f3)}.chat-empty-icon{display:grid;place-items:center;width:70px;height:70px;border-radius:24px;color:var(--ayur-primary);background:#dff4eb;font-size:30px}.chat-empty h3{margin:16px 0 6px;color:#153f38}
.chat-conversation{min-width:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;height:100%;overflow:hidden;background:#e9f1ed}
.chat-head{display:flex;align-items:center;gap:11px;min-width:0;padding:13px 17px;border-bottom:1px solid var(--line);background:#fff}.chat-head>div:not(.chat-head-actions){min-width:0}.chat-head h3{margin:0;color:#103c35;font-size:16px}.chat-head a,.chat-head small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#587168;font-size:11px}.chat-head-actions{display:flex;gap:8px;margin-left:auto}.chat-back{display:none}
.chat-ad-snippet{margin:10px 14px 0;border:1px solid #c9ddd5;border-radius:13px;background:#fff;box-shadow:0 4px 14px rgba(18,55,47,.05)}
.chat-messages{min-height:0;overflow-y:auto;display:flex;align-items:stretch;flex-direction:column;gap:8px;padding:20px clamp(14px,3vw,32px);background-color:#edf4f1;background-image:radial-gradient(rgba(18,78,65,.08) 1px,transparent 1px);background-size:18px 18px}
.chat-bubble{align-self:flex-start;max-width:min(76%,680px);padding:10px 12px 7px;border:1px solid rgba(185,207,199,.6);border-radius:7px 15px 15px 15px;background:#fff;box-shadow:0 2px 7px rgba(18,55,47,.08);overflow-wrap:anywhere}
.chat-bubble.outbound{align-self:flex-end;border-radius:15px 7px 15px 15px;background:#d9f4e7}.chat-bubble>div{font-size:13px;line-height:1.48}.chat-bubble footer{margin-top:5px;color:#71867e;font-size:9px;text-align:right}
.chat-image,.chat-video{display:block;max-width:min(420px,100%);max-height:360px;border-radius:10px}.chat-audio{width:min(360px,100%)}.chat-document{display:grid;gap:3px;padding:10px;border-radius:9px;color:#174f46;background:rgba(255,255,255,.68);text-decoration:none}.chat-document span{font-size:10px;text-transform:uppercase}.chat-document b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.whatsapp-window-notice{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 16px;border-top:1px solid var(--line);font-size:11px}.whatsapp-window-notice.open{color:#116b54;background:#e6f8ef}.whatsapp-window-notice.closed{color:#8a5311;background:#fff6de}.whatsapp-window-notice span{text-align:right}
.chat-composer{display:grid;grid-template-columns:auto minmax(100px,1fr) auto auto auto;gap:8px;align-items:center;padding:12px 14px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#fff}.chat-composer textarea{grid-column:1/-1;width:100%;min-height:54px;max-height:150px;resize:vertical;padding:11px 13px;border:1px solid #bfd1ca;border-radius:12px;font:13px/1.45 inherit}.chat-composer textarea:focus{outline:0;border-color:var(--ayur-primary);box-shadow:0 0 0 3px rgba(15,118,110,.12)}
.chat-attach{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 13px;border:1px solid #bfd4cc;border-radius:10px;color:#0e655a;background:#f2faf7;font-size:12px;font-weight:700;cursor:pointer}.chat-attach input{display:none}.chat-attach:hover{background:#e5f6f0}.chat-attachment-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#587168}.chat-composer .btn{min-height:40px;white-space:nowrap}
#whatsappTemplateModal .modal-form,#voiceMessageModal .modal-form{width:min(680px,calc(100vw - 28px))}#whatsappTemplateModal label small{display:block;margin-top:5px;color:var(--muted);line-height:1.4}.chat-voice-btn.is-recording{border-color:#dc2626!important;color:#b91c1c!important;background:#fff1f2!important;animation:voicePulse 1.2s ease-in-out infinite}.voice-preview-card{display:grid;grid-template-columns:44px minmax(120px,1fr) minmax(220px,1.5fr);align-items:center;gap:12px;padding:16px;border:1px solid #cfe1da;border-radius:12px;background:#f4faf7}.voice-preview-card>span{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;color:#fff;background:#0f766e}.voice-preview-card b,.voice-preview-card small{display:block}.voice-preview-card small{margin-top:4px;color:#587168}.voice-preview-card audio{width:100%}@keyframes voicePulse{50%{box-shadow:0 0 0 4px rgba(220,38,38,.12)}}
@media(max-width:820px){
  .ayur-address{grid-column:auto}
  .studio-theme-grid{grid-template-columns:1fr}
  #leadDrawer .drawer-body{padding-bottom:calc(98px + env(safe-area-inset-bottom))}
  #leadDetailsForm>button[type=submit]{position:sticky;z-index:4;box-shadow:0 8px 28px rgba(15,118,110,.22)}
  #inboxView{height:calc(100dvh - 88px);min-height:520px}
  .chat-shell{display:block;border-radius:0;border-left:0;border-right:0}
  .chat-list-panel,.chat-conversation{width:100%;height:100%}.chat-shell.conversation-open .chat-list-panel{display:none}.chat-conversation:not(.hidden){display:grid}.chat-back{display:inline-grid}
  .chat-head{padding:10px}.chat-head-actions .danger{display:none}.chat-head-actions .btn{padding:8px 10px;font-size:11px}
  .chat-messages{padding:14px 10px}.chat-bubble{max-width:88%}
  .whatsapp-window-notice{align-items:flex-start;flex-direction:column}.whatsapp-window-notice span{text-align:left}
  .chat-composer{grid-template-columns:1fr 1fr;padding:9px}.chat-composer textarea,.chat-attach,.chat-attachment-name{grid-column:1/-1}.chat-composer .btn{width:100%}.voice-preview-card{grid-template-columns:42px 1fr}.voice-preview-card audio{grid-column:1/-1}
}

/* v5.1.9 — focused team roles, three-pane Inbox and configurable labels */
.team-role-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 18px}.team-role-summary span{padding:13px 15px;border:1px solid #d2e3dd;border-radius:12px;color:#587168;background:#f7fbf9;font-size:11px}.team-role-summary b{display:block;margin-bottom:4px;color:#123f37;font-size:13px}.team-sales-fields{margin:0}.team-member-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.team-role-badge{flex:0 0 auto;padding:5px 9px;border-radius:99px;font-size:9px;font-weight:800}.team-role-badge.is-admin{color:#6d3d00;background:#fff0ce}.team-role-badge.is-sales{color:#086253;background:#dcf5eb}.team-access-copy{padding:8px 10px;border-radius:8px;color:#315d53;background:#f0f8f5;font-size:10px}
.chat-shell{position:relative;grid-template-columns:minmax(270px,320px) minmax(430px,1fr) minmax(250px,290px)}.chat-empty{grid-column:2/-1}.chat-scope-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:11px 12px 0;padding:4px;border-radius:10px;background:#edf4f1}.chat-scope-tabs button{min-height:32px;border:0;border-radius:7px;color:#587168;background:transparent;font-size:10px;font-weight:700;cursor:pointer}.chat-scope-tabs button.is-active{color:#fff;background:var(--ayur-primary);box-shadow:0 4px 11px rgba(15,118,110,.22)}.chat-label-filter{width:calc(100% - 24px);min-height:38px;margin:8px 12px 0;padding:8px 11px;border:1px solid var(--line);border-radius:10px;color:#234c44;background:#fff}.chat-row-labels{display:flex!important;gap:3px;margin-top:5px;overflow:hidden}.chat-row-body .chat-label-chip,.chat-label-chip{display:inline-flex;align-items:center;max-width:92px;padding:2px 6px;border:1px solid color-mix(in srgb,var(--label-color),transparent 55%);border-radius:99px;color:var(--label-color);background:color-mix(in srgb,var(--label-color),#fff 90%);font-size:8px;font-style:normal;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-contact-panel{min-width:0;display:flex;flex-direction:column;gap:0;overflow-y:auto;border-left:1px solid var(--line);background:#fbfdfc}.chat-contact-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:18px;border-bottom:1px solid var(--line);background:#fff}.chat-contact-head h3{margin:5px 0 0;color:#123f37;font-size:17px}.chat-contact-close,.chat-contact-toggle{display:none}.chat-contact-details{margin:0;padding:4px 18px 13px}.chat-contact-details>div{padding:10px 0;border-bottom:1px solid #e5eeeb}.chat-contact-details dt{margin-bottom:4px;color:#789087;font-size:8px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.chat-contact-details dd{margin:0;color:#214c43;font-size:11px;overflow-wrap:anywhere}.chat-contact-section{display:grid;gap:9px;padding:16px 18px;border-top:1px solid var(--line)}.chat-contact-section h4{margin:0;color:#19463e;font-size:12px}.chat-contact-section select{width:100%;min-height:39px;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:#fff}.chat-contact-section .btn{width:100%}.chat-contact-section-title{display:flex;align-items:center;justify-content:space-between;gap:10px}.link-btn{border:0;color:var(--ayur-primary);background:transparent;font-size:10px;font-weight:800;cursor:pointer}.chat-label-choices{display:flex;flex-wrap:wrap;gap:6px}.chat-label-choice{display:inline-flex;align-items:center;gap:5px;padding:6px 8px;border:1px solid color-mix(in srgb,var(--label-color),transparent 55%);border-radius:99px;color:var(--label-color);background:color-mix(in srgb,var(--label-color),#fff 92%);font-size:10px;font-weight:700;cursor:pointer}.chat-label-choice input{width:14px;height:14px;accent-color:var(--label-color)}
.chat-label-modal{width:min(760px,calc(100vw - 28px))}.chat-label-create{display:grid;grid-template-columns:1fr 54px auto;gap:8px;margin-bottom:16px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f5faf8}.chat-label-create input:not([type=color]){min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:9px}.chat-label-create input[type=color]{width:54px;height:40px;padding:3px;border:1px solid var(--line);border-radius:9px;background:#fff}.chat-label-manager{display:grid;gap:7px;max-height:52vh;overflow-y:auto}.chat-label-manager-row{display:grid;grid-template-columns:minmax(130px,1fr) 48px 90px auto auto;align-items:center;gap:7px;padding:8px;border:1px solid #dce9e4;border-radius:10px}.chat-label-manager-row input:not([type=color]){min-width:0;padding:9px;border:1px solid var(--line);border-radius:8px}.chat-label-manager-row input[type=color]{width:45px;height:36px;padding:2px;border:1px solid var(--line);border-radius:8px}.chat-label-manager-row small{color:#71877f;font-size:9px}.delivery-state{text-transform:capitalize}.delivery-state.is-failed{color:#b42318;font-weight:800}.delivery-state.is-delivered,.delivery-state.is-read{color:#087461;font-weight:800}.delivery-error{display:block!important;max-width:320px;margin-top:3px;color:#b42318!important;font-size:9px!important;white-space:normal}
@media(max-width:1180px){.chat-shell{grid-template-columns:minmax(270px,320px) minmax(0,1fr)}.chat-contact-toggle{display:inline-flex}.chat-contact-panel{position:absolute;z-index:12;top:0;right:0;bottom:0;width:min(330px,88vw);box-shadow:-14px 0 35px rgba(18,55,47,.16);transform:translateX(105%);transition:transform .18s ease}.chat-contact-panel.is-open{transform:none}.chat-contact-close{display:inline-grid}.chat-empty{grid-column:2}}
@media(max-width:820px){.team-role-summary{grid-template-columns:1fr}.chat-contact-panel{left:0;width:100%;transform:translateX(105%)}.chat-contact-panel:not(.is-open){display:none}.chat-contact-panel.is-open{display:flex;transform:none}.chat-scope-tabs{margin-top:8px}.chat-label-manager-row{grid-template-columns:minmax(0,1fr) 46px}.chat-label-manager-row small{grid-column:1/-1}.chat-label-manager-row .btn{width:100%}.chat-label-create{grid-template-columns:1fr 50px}.chat-label-create .btn{grid-column:1/-1}}

/* v5.1.10 — mobile Inbox fit, message actions and touch-safe composer */
.chat-bubble{position:relative;padding-right:34px}.chat-message-tools{position:absolute;z-index:4;top:3px;right:3px}.chat-message-more{display:grid;place-items:center;width:29px;height:29px;padding:0;border:0;border-radius:50%;color:#637970;background:transparent;font-size:20px;line-height:1;cursor:pointer}.chat-message-more:hover,.chat-message-more[aria-expanded=true]{color:#0b5f54;background:rgba(15,118,110,.1)}.chat-message-menu{position:absolute;z-index:20;top:28px;right:0;display:none;width:230px;padding:6px;border:1px solid #d5e3de;border-radius:12px;background:#fff;box-shadow:0 12px 30px rgba(14,55,47,.2)}.chat-message-menu.is-open{display:grid}.chat-message-menu button{min-height:38px;padding:9px 10px;border:0;border-radius:8px;color:#243f39;background:transparent;text-align:left;font:600 12px/1.3 inherit;cursor:pointer}.chat-message-menu button:hover:not(:disabled){background:#edf8f4}.chat-message-menu button:disabled{color:#9aaaa4;cursor:not-allowed}.chat-message-menu small{padding:5px 10px 7px;color:#778b84;font-size:9px;line-height:1.35}.chat-bubble.outbound .chat-message-menu{right:0}
@media(max-width:820px){
  #inboxView{height:calc(100dvh - var(--mobile-nav-height) - var(--mobile-safe-bottom) - 78px);min-height:0;margin:0 -8px -18px}
  .chat-shell{height:100%;min-height:0;border:0;border-radius:0;box-shadow:none}
  .chat-list-panel,.chat-conversation{height:100%;min-height:0}
  .chat-conversation{grid-template-rows:auto auto minmax(0,1fr) auto auto}
  .chat-head{min-height:58px;padding:7px 8px;gap:7px}.chat-head>.avatar{flex:0 0 auto;width:36px;height:36px}.chat-head>div:not(.chat-head-actions){flex:1;min-width:0}.chat-head h3{font-size:14px}.chat-head-actions{flex:0 0 auto;gap:4px}.chat-head-actions .btn{min-width:0;min-height:36px;padding:6px 7px;font-size:10px}.chat-contact-toggle{display:inline-flex}
  .chat-ad-snippet{margin:6px 7px 0}.chat-messages{padding:10px 7px;overscroll-behavior:contain}.chat-bubble{max-width:94%;padding:9px 32px 6px 10px}.chat-image,.chat-video{max-width:100%;height:auto}.chat-audio{display:block;width:min(250px,calc(100vw - 92px));max-width:100%;height:42px}
  .whatsapp-window-notice{max-height:74px;overflow:auto;padding:6px 9px;gap:3px;font-size:9px;line-height:1.25}
  .chat-composer{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:7px 8px calc(7px + env(safe-area-inset-bottom))}.chat-composer textarea,.chat-composer .chat-attach,.chat-composer .chat-attachment-name{grid-column:1/-1}.chat-composer textarea{min-height:44px;max-height:82px;padding:9px 10px;resize:none}.chat-composer .btn,.chat-composer .chat-attach{min-width:0;width:100%;min-height:40px;padding:7px 5px;font-size:10px;line-height:1.15;white-space:normal}.chat-attach span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .chat-message-more{width:32px;height:32px}.chat-message-menu{position:fixed;top:auto;right:8px;bottom:calc(var(--mobile-nav-height) + var(--mobile-safe-bottom) + 8px);left:8px;width:auto;padding:8px;border-radius:15px}.chat-message-menu button{min-height:46px;font-size:14px}.chat-message-menu small{font-size:10px}
}

/* v5.1.9 mobile2 — labels inside lead details and cross-screen responsive guardrails */
.lead-label-editor{display:grid;gap:11px;padding:14px;border:1px solid #cfe1da;border-radius:13px;background:#f7fbf9}.lead-label-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.lead-label-editor h4{margin:0;color:#123f37;font-size:14px}.lead-label-editor small{display:block;margin-top:3px;color:#698078;font-size:10px;line-height:1.35}.lead-label-editor .chat-label-choices{min-height:32px;align-items:center}.lead-label-editor .chat-label-choice{min-height:34px;padding:7px 10px}.lead-label-editor .muted{margin:0}
@media(max-width:820px){
  .drawer-head>div{min-width:0}.drawer-head h2,.drawer-head a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.drawer-body{min-width:0;overflow-x:hidden}.drawer-body .form-grid>*{min-width:0}.tabs{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tab{flex:0 0 auto;min-width:82px}.lead-actions{display:grid;grid-template-columns:1fr}.lead-actions .btn{width:100%}
  .lead-label-editor{padding:11px;gap:9px}.lead-label-editor-head{align-items:flex-start;flex-direction:column}.lead-label-editor-head .btn{width:100%}.lead-label-editor .chat-label-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.lead-label-editor .chat-label-choice{min-width:0;overflow:hidden}.lead-label-editor .chat-label-choice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .panel,.info-card,.filter-strip{max-width:100%}.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.modal-form,.drawer-body{overscroll-behavior:contain}
}
@media(max-width:380px){.lead-label-editor .chat-label-choices{grid-template-columns:1fr}.chat-head-actions .btn{padding-inline:5px;font-size:9px}.chat-composer .btn{font-size:9px}}

/* v5.1.11 — compact professional mobile Inbox and quick labels */
/* Keep hidden admin actions hidden even when mobile icon layout uses !important. */
.chat-head-actions .chat-icon-action.role-hidden,.chat-head-actions .chat-icon-action.hidden{display:none!important}
@media(max-width:850px){
  .chat-head #chatLeadBtn::after,.chat-head #chatContactToggle::after,.chat-head #chatDeleteBtn::after{content:none!important;display:none!important}
}
@media(max-width:820px){
  #chatLabelChoices .chat-label-choice{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;height:40px;gap:8px}
  #chatLabelChoices .chat-label-choice input{flex:0 0 16px;width:16px;height:16px;min-height:16px;margin:0;padding:0}
}
.chat-mobile-label-bar{display:none}.chat-icon-action{align-items:center;justify-content:center;gap:7px}.chat-action-icon{display:inline-grid;place-items:center;min-width:18px;font-size:16px;line-height:1}.chat-action-text{line-height:1.15}.chat-composer>.chat-attach{grid-column:1;grid-row:2}.chat-composer>#chatAttachmentName{grid-column:2;grid-row:2}.chat-composer>#chatVoiceBtn{grid-column:3;grid-row:2}.chat-composer>#chatTemplateBtn{grid-column:4;grid-row:2}.chat-composer>button[type="submit"]{grid-column:5;grid-row:2}.chat-contact-section-title>div{min-width:0}.chat-contact-section-title small{display:block;margin-top:3px;color:#70847d;font-size:9px;line-height:1.35}.chat-label-status{min-height:13px;color:#0f766e;font-size:9px}.chat-label-more{display:inline-grid;place-items:center;min-width:24px;height:22px;padding:0 6px;border-radius:99px;color:#365c53;background:#e8f1ee;font-size:9px;font-weight:800}
@media(min-width:821px) and (max-width:1180px){.chat-head-actions .chat-icon-action{width:40px;min-width:40px;padding:0}.chat-head-actions .chat-action-text,.chat-composer .chat-action-text{display:none}.chat-composer{grid-template-columns:42px minmax(80px,1fr) 42px 42px 42px}.chat-composer .chat-icon-action{width:42px;min-width:42px;padding:0}}
@media(max-width:820px){
  body[data-active-view="inbox"]{overflow:hidden}body[data-active-view="inbox"] .topbar,body[data-active-view="inbox"] #addLeadBtn,body[data-active-view="inbox"] .mobile-add-lead-fab{display:none!important}body[data-active-view="inbox"] .main{height:100dvh;padding-top:0!important;overflow:hidden}
  body[data-active-view="inbox"] #inboxView{height:calc(100dvh - var(--mobile-nav-height) - var(--mobile-safe-bottom));margin:0 -8px;overflow:hidden}
  .chat-shell{background:#edf4f1}.chat-shell:not(.conversation-open) .chat-conversation{display:none!important}.chat-shell:not(.conversation-open) .chat-list-panel{display:flex}.chat-shell.conversation-open .chat-list-panel{display:none}.chat-shell.conversation-open .chat-conversation{display:grid}
  .chat-list-head{min-height:54px;padding:9px 11px}.chat-list-head h3{font-size:16px}.chat-list-head small{margin-top:1px;font-size:10px}.chat-list-head .icon-btn{width:36px;height:36px;font-size:18px}
  .chat-scope-tabs{gap:3px;margin:6px 8px 0;padding:3px}.chat-scope-tabs button{min-height:30px}.chat-label-filter{width:calc(100% - 16px);min-height:38px;margin:6px 8px 0;padding:6px 10px}.chat-search{width:calc(100% - 16px);min-height:40px;margin:6px 8px 4px;padding:7px 11px}.chat-row{grid-template-columns:38px minmax(0,1fr) auto;gap:8px;padding:9px 10px}.chat-row-avatar{width:38px;height:38px}.chat-row-body span{font-size:11px}.chat-row-side time{font-size:8px}
  .chat-conversation{grid-template-rows:auto auto auto minmax(0,1fr) auto auto;background:#edf4f1}
  .chat-head{min-height:52px;padding:6px 7px;gap:6px}.chat-head>div#chatAvatar.avatar{flex:0 0 34px;width:34px;height:34px;min-width:34px;max-width:34px}.chat-head .chat-person{flex:1;min-width:0}.chat-head h3{font-size:13px}.chat-head a,.chat-head small{font-size:9px}.chat-head-actions{gap:3px}.chat-head-actions .chat-icon-action,.chat-back{width:34px;height:34px;min-width:34px;min-height:34px;padding:0;border-radius:50%}.chat-head-actions .chat-icon-action{display:grid!important;place-items:center;gap:0;overflow:hidden;font-size:0}.chat-head-actions .chat-icon-action::after{content:none!important;display:none!important}.chat-head-actions .chat-action-text{display:none!important}.chat-head-actions .chat-action-icon{display:grid;margin:0;font-size:15px}.chat-back{place-items:center;font-size:26px;line-height:1}
  .chat-mobile-label-bar{display:flex;align-items:center;gap:6px;width:100%;min-height:34px;padding:4px 8px;border:0;border-bottom:1px solid #d9e7e2;color:#1e554a;background:#f9fcfb;text-align:left;cursor:pointer}.chat-mobile-label-icon,.chat-mobile-label-edit{flex:0 0 auto;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;color:#0b6f62;background:#e1f4ed;font-size:14px;font-weight:900}.chat-mobile-label-chips{min-width:0;flex:1;display:flex;align-items:center;gap:4px;overflow:hidden}.chat-mobile-label-chips .chat-label-chip{flex:0 1 auto;max-width:110px;font-size:8px}.chat-mobile-label-empty{color:#668078;font-size:10px;font-weight:700}
  .chat-ad-snippet{margin:4px 6px 0}.chat-messages{gap:5px;padding:8px 7px 6px}.chat-bubble{max-width:90%;padding:7px 30px 5px 9px;border-radius:6px 13px 13px 13px}.chat-bubble.outbound{border-radius:13px 6px 13px 13px}.chat-bubble>div{font-size:12px;line-height:1.38}.chat-bubble footer{margin-top:3px;font-size:8px}.chat-message-more{width:28px;height:28px;font-size:18px}.chat-image,.chat-video{max-height:240px}.chat-audio{width:min(230px,calc(100vw - 78px));height:38px}
  .whatsapp-window-notice{max-height:46px;display:block;padding:5px 8px;font-size:8px;line-height:1.2}.whatsapp-window-notice b,.whatsapp-window-notice span{display:inline}.whatsapp-window-notice b::after{content:" · "}
  .chat-composer{grid-template-columns:40px minmax(0,1fr) 40px 40px 40px;grid-template-rows:auto;gap:5px;padding:6px 7px calc(6px + env(safe-area-inset-bottom));align-items:end}.chat-composer #chatReply{grid-column:2;grid-row:1;min-width:0;min-height:40px;max-height:88px;padding:8px 9px;border-radius:18px;resize:none}.chat-composer .chat-attach{grid-column:1;grid-row:1}.chat-composer #chatVoiceBtn{grid-column:3;grid-row:1}.chat-composer #chatTemplateBtn{grid-column:4;grid-row:1}.chat-composer button[type="submit"]{grid-column:5;grid-row:1}.chat-composer #chatAttachmentName{grid-column:1/-1;grid-row:2;padding:2px 5px;font-size:8px}.chat-composer .chat-icon-action{width:40px;height:40px;min-width:40px;min-height:40px;padding:0;border-radius:50%;overflow:hidden}.chat-composer .chat-action-text{display:none}.chat-composer .chat-action-icon{font-size:16px}.chat-composer #chatVoiceBtn.is-recording{grid-column:3/5;width:100%;border-radius:99px}.chat-composer #chatVoiceBtn.is-recording .chat-action-text{display:inline;font-size:9px}.chat-composer #chatVoiceBtn.is-recording+#chatTemplateBtn{display:none}.chat-action-spinner{animation:voiceSpin .8s linear infinite}@keyframes voiceSpin{to{transform:rotate(360deg)}}
  .chat-contact-panel{position:absolute;inset:auto 6px 6px;z-index:22;width:auto;max-height:min(82%,620px);border:1px solid #cadfd7;border-radius:22px 22px 14px 14px;box-shadow:0 -18px 46px rgba(10,48,41,.24);transform:translateY(108%);transition:transform .18s ease}.chat-contact-panel.is-open{display:flex;transform:none}.chat-contact-panel:not(.is-open){display:flex;pointer-events:none;visibility:hidden}.chat-contact-panel::before{content:"";flex:0 0 auto;width:38px;height:4px;margin:7px auto 0;border-radius:99px;background:#c4d6d0}.chat-contact-head{position:sticky;top:0;z-index:2;padding:8px 12px 9px}.chat-contact-head h3{font-size:14px}.chat-contact-head .eyebrow{font-size:8px}.chat-contact-details{padding:2px 13px 9px}.chat-contact-details>div{padding:7px 0}.chat-contact-section{gap:7px;padding:11px 13px}.chat-contact-panel.labels-only .chat-contact-details,.chat-contact-panel.labels-only .chat-contact-section.leads-all-only{display:none}.chat-contact-panel.labels-only{max-height:min(66%,500px)}.chat-label-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.chat-label-choice{min-width:0;min-height:36px;padding:6px 8px;overflow:hidden;border-radius:10px}.chat-label-choice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-label-status{display:block}.chat-contact-section #chatLabelsSave{display:none}
  .lead-label-editor{display:flex;align-items:center;gap:7px;padding:7px 8px;overflow:hidden}.lead-label-editor-head{flex:0 0 auto;align-items:center;flex-direction:row}.lead-label-editor-head small{display:none}.lead-label-editor-head .btn{width:34px;height:34px;min-height:34px;padding:0;border-radius:50%}.lead-label-editor-head .chat-action-text{display:none}.lead-label-editor .chat-label-choices{min-width:0;flex:1;display:flex;grid-template-columns:none;flex-wrap:nowrap;gap:5px;overflow-x:auto;scrollbar-width:none}.lead-label-editor .chat-label-choices::-webkit-scrollbar{display:none}.lead-label-editor .chat-label-choice{flex:0 0 auto;min-height:32px;padding:5px 8px;border-radius:99px}
  .chat-label-modal{width:100%}.chat-label-manager{max-height:55dvh}.chat-label-manager-row{grid-template-columns:minmax(0,1fr) 42px auto;gap:5px;padding:6px}.chat-label-manager-row small{grid-column:1/-1}.chat-label-manager-row .btn{width:auto;min-height:38px;padding:7px 9px}.chat-label-manager-row [data-label-save]{grid-column:1/3}.chat-label-manager-row [data-label-delete]{grid-column:3}
}
@media(max-width:380px){
  .chat-head>.avatar{display:none}.chat-head-actions .chat-icon-action,.chat-back{width:32px;height:32px;min-width:32px;min-height:32px}.chat-composer{grid-template-columns:36px minmax(0,1fr) 36px 36px 36px;gap:4px;padding-inline:5px}.chat-composer .chat-icon-action{width:36px;height:36px;min-width:36px;min-height:36px}.chat-composer #chatReply{min-height:36px}.chat-mobile-label-chips .chat-label-chip:nth-of-type(n+3){display:none}.chat-label-choices{grid-template-columns:1fr 1fr}.lead-label-editor .chat-label-choices{display:flex;grid-template-columns:none}
}
