:root {
  --blue-900:#073b5c;
  --blue-800:#07557f;
  --blue-700:#0873ad;
  --blue-600:#1187c5;
  --blue-100:#e9f5fb;
  --ink:#17212b;
  --muted:#667584;
  --line:#dbe4ea;
  --surface:#ffffff;
  --canvas:#f4f7f9;
  --danger:#b42318;
  --danger-bg:#fff1f0;
  --success:#087a55;
  --success-bg:#eaf8f1;
  --warning:#9a6700;
  --warning-bg:#fff8e6;
  --shadow:0 8px 28px rgba(25,54,72,.08);
  --radius:12px;
  --sidebar:286px;
  --topbar:74px;
  font-family:Manrope, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--canvas);color:var(--ink)}
body{font-size:14px}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
a{color:inherit}
.hidden{display:none!important}

/* Login */
.login-page{
  min-height:100vh;
  background:#063e62;
  font-family:"IBM Plex Sans",Arial,sans-serif;
  overflow-x:hidden;
}
.login-shell{min-height:100vh;background:#063e62}
.login-brand{
  position:relative;
  min-height:100vh;
  overflow:hidden;
  color:#fff;
  background:
    radial-gradient(circle at 76% 18%,rgba(20,145,205,.20),transparent 34%),
    radial-gradient(circle at 32% 84%,rgba(0,33,57,.20),transparent 45%),
    linear-gradient(145deg,#043553 0%,#06466c 48%,#07577f 100%);
}
.login-brand::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.037) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.037) 1px,transparent 1px);
  background-size:44px 44px;
  opacity:.9;
}
.login-brand::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(1,28,48,.13),transparent 44%,rgba(4,68,102,.04));
}
.login-brand-orbit{position:absolute;border:1px solid rgba(102,199,247,.12);border-radius:50%;pointer-events:none}
.login-brand-orbit.orbit-a{width:690px;height:690px;right:-450px;top:1%}
.login-brand-orbit.orbit-b{width:440px;height:440px;right:-310px;top:17%;border-color:rgba(255,255,255,.06)}
.login-layout{
  position:relative;
  z-index:2;
  width:min(1420px,100%);
  min-height:100vh;
  margin:0 auto;
  padding:clamp(44px,5.5vw,82px) clamp(34px,6.5vw,98px) clamp(38px,5vw,72px);
  display:grid;
  grid-template-columns:minmax(560px,1.16fr) minmax(360px,.84fr);
  gap:clamp(34px,4vw,72px);
  align-items:center;
}
.brand-copy{width:min(690px,100%);align-self:center}
.login-logo-wrap{width:min(650px,96%);margin:0 0 48px}
.login-logo{display:block;width:100%;height:auto;filter:drop-shadow(0 12px 28px rgba(0,0,0,.08))}
.flow-lockup{display:flex;align-items:center;justify-content:center;gap:24px;width:72%;margin:18px auto 0}
.flow-lockup-line{height:2px;flex:1;background:rgba(255,255,255,.88);border-radius:999px}
.flow-word{font-family:"IBM Plex Sans",Arial,sans-serif;font-size:clamp(24px,2.1vw,34px);font-weight:500;letter-spacing:.58em;padding-left:.58em;color:#fff;line-height:1}
.brand-message{max-width:670px;margin-bottom:34px}
.login-brand h1{font-family:"IBM Plex Sans",Arial,sans-serif;font-size:clamp(38px,3.35vw,58px);font-weight:700;line-height:1.08;margin:0 0 20px;letter-spacing:-.035em;text-wrap:balance}
.login-brand p{font-family:"IBM Plex Sans",Arial,sans-serif;font-size:clamp(15px,1.25vw,19px);line-height:1.62;margin:0;color:rgba(235,247,253,.91);max-width:650px;font-weight:400}
.login-card{width:min(650px,100%);padding:0;margin:0;background:transparent;border:0;border-radius:0;box-shadow:none}
.login-error{background:rgba(121,26,18,.50);color:#fff;border:1px solid rgba(255,200,194,.34);backdrop-filter:blur(8px);margin-bottom:12px}
.login-field{position:relative;display:flex;align-items:center;width:100%;height:66px;margin-bottom:16px;border:1px solid rgba(129,203,240,.43);border-radius:14px;background:rgba(2,53,84,.28);box-shadow:inset 0 1px 0 rgba(255,255,255,.025);transition:border-color .16s,background .16s,box-shadow .16s}
.login-field:focus-within{border-color:rgba(115,211,255,.82);background:rgba(4,65,99,.46);box-shadow:0 0 0 3px rgba(69,181,235,.10)}
.login-field-icon{width:58px;height:100%;display:grid;place-items:center;color:#93c7e3;flex:0 0 auto}
.login-field-icon svg{width:24px;height:24px}
.login-field input{min-width:0;flex:1;height:100%;border:0;outline:0;background:transparent;color:#fff;font:500 16px/1 "IBM Plex Sans",Arial,sans-serif;padding:0 18px 0 0}
.login-field input::placeholder{color:rgba(214,233,243,.64)}
.login-password-toggle{width:58px;height:100%;display:grid;place-items:center;flex:0 0 auto;border:0;background:transparent;color:#8fc2dd;padding:0}
.login-password-toggle:hover{color:#fff}
.login-password-toggle svg{width:24px;height:24px}
.login-submit{width:100%;height:62px;border:1px solid rgba(255,255,255,.76);border-radius:14px;background:#fff;color:#06456b;display:flex;align-items:center;justify-content:center;position:relative;font-family:"IBM Plex Sans",Arial,sans-serif;font-size:18px;font-weight:700;box-shadow:0 12px 28px rgba(0,28,48,.13);transition:transform .15s,box-shadow .15s,background .15s}
.login-submit svg{position:absolute;right:24px;width:25px;height:25px}
.login-submit:hover{background:#f5fbfe;box-shadow:0 15px 34px rgba(0,28,48,.18);transform:translateY(-1px)}
.login-submit:disabled{opacity:.72;cursor:wait;transform:none}
.login-remember{display:flex;align-items:flex-start;gap:12px;width:max-content;max-width:100%;margin-top:16px;color:rgba(233,246,252,.90);cursor:pointer;user-select:none}
.login-remember input{position:absolute;opacity:0;pointer-events:none}
.login-remember-box{width:20px;height:20px;margin-top:1px;border:1px solid rgba(143,199,227,.70);border-radius:5px;background:rgba(3,55,84,.34);display:grid;place-items:center;flex:0 0 auto;transition:background .15s,border-color .15s,box-shadow .15s}
.login-remember-box svg{width:14px;height:14px;color:#fff;opacity:0;transform:scale(.7);transition:opacity .12s,transform .12s}
.login-remember input:checked + .login-remember-box{background:#168ac5;border-color:#6bc9f4;box-shadow:0 0 0 3px rgba(77,186,238,.10)}
.login-remember input:checked + .login-remember-box svg{opacity:1;transform:scale(1)}
.login-remember input:focus-visible + .login-remember-box{outline:2px solid #9bdcff;outline-offset:3px}
.login-remember-copy{display:flex;flex-direction:column;gap:2px;line-height:1.25}
.login-remember-copy strong{font-size:14px;font-weight:600;color:#fff}
.login-remember-copy small{font-size:12px;font-weight:400;color:rgba(197,224,238,.68)}
.login-access-row{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-top:16px}.login-access-row .login-remember{margin-top:0}.login-forgot{margin-top:2px;color:#d9f3ff;font-size:13px;font-weight:600;text-decoration:none;white-space:nowrap;border-bottom:1px solid rgba(217,243,255,.35);padding-bottom:2px}.login-forgot:hover{color:#fff;border-color:#fff}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.flow-visual{align-self:center;width:100%;max-width:560px;justify-self:end;opacity:.94;filter:drop-shadow(0 18px 40px rgba(0,30,50,.08))}
.flow-visual svg{display:block;width:100%;height:auto;overflow:visible}
.flow-wire{fill:none;stroke:rgba(90,192,241,.42);stroke-width:2;stroke-linecap:round}
.flow-wire.active{stroke:url(#flowStroke);stroke-width:2.2}
.flow-node-dot{fill:#8ad9ff}
.flow-card-border{fill:none;stroke:rgba(113,199,241,.42);stroke-width:1.8}
.flow-avatar-bg{fill:rgba(82,178,226,.22);stroke:rgba(112,199,241,.20);stroke-width:1}
.flow-icon-fill{fill:#8fd5f8}
.flow-copy-line{fill:rgba(142,210,242,.56)}
.flow-copy-line.small{fill:rgba(142,210,242,.43)}
.bot-shell{fill:#78cef5;stroke:#9be0ff;stroke-width:1.5}
.bot-face{fill:#0b648f}
.bot-eye{fill:#a8e8ff}
.bot-antenna{fill:none;stroke:#98e2ff;stroke-width:4;stroke-linecap:round}
.login-mobile-brand{display:none}

@media(max-width:1180px){
  .login-layout{grid-template-columns:minmax(520px,1.08fr) minmax(320px,.92fr);gap:30px;padding-left:48px;padding-right:48px}
  .login-logo-wrap{width:min(590px,96%);margin-bottom:38px}
  .flow-visual{max-width:470px}
  .brand-message{margin-bottom:28px}
}
@media(max-width:900px){
  .login-page{overflow:auto}
  .login-layout{grid-template-columns:1fr;min-height:100vh;padding:42px 28px 54px;align-items:start}
  .brand-copy{width:min(690px,100%);margin:0 auto}
  .login-logo-wrap{width:min(560px,95%);margin:0 auto 36px}
  .brand-message{margin-bottom:28px}
  .flow-visual{display:none}
  .login-card{width:100%}
  .login-brand h1{font-size:clamp(36px,8vw,52px)}
  .login-brand p{font-size:16px}
}
@media(max-width:560px){
  .login-layout{padding:32px 20px 42px}
  .login-logo-wrap{width:100%;margin-bottom:30px}
  .flow-lockup{width:75%;gap:14px;margin-top:13px}
  .flow-word{font-size:19px;letter-spacing:.45em;padding-left:.45em}
  .login-brand h1{font-size:34px;line-height:1.08;margin-bottom:16px}
  .login-brand p{font-size:14px;line-height:1.55}
  .brand-message{margin-bottom:24px}
  .login-field{height:58px;border-radius:12px}
  .login-field-icon,.login-password-toggle{width:52px}
  .login-submit{height:58px;border-radius:12px}
  .login-remember{margin-top:14px}
  .login-remember-copy small{font-size:11px}
}

/* Branding */
.sidebar-brand{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;width:100%;min-width:0;text-align:center}
.sidebar-brand img{display:block;width:246px;max-width:100%;max-height:104px;object-fit:contain;object-position:center center;filter:brightness(0) saturate(100%) invert(17%) sepia(34%) saturate(2941%) hue-rotate(168deg) brightness(91%) contrast(96%)}
.sidebar-brand span{position:relative;margin-left:0;font-family:"Space Grotesk",Manrope,sans-serif;font-size:14px;font-weight:700;letter-spacing:.42em;color:var(--blue-700);padding:0 42px 0 48px;text-align:center;line-height:1.2}
.sidebar-brand span::before,.sidebar-brand span::after{content:"";position:absolute;top:50%;width:28px;height:1px;background:#b8d5e5}.sidebar-brand span::before{left:0}.sidebar-brand span::after{right:0}
/* forms */
.field{display:flex;flex-direction:column;gap:7px;margin-bottom:16px}.field>label,.field-label{font-weight:650;font-size:13px;color:#33414d}
.input,.textarea,.select{width:100%;border:1px solid #cfd9df;background:#fff;border-radius:9px;padding:10px 12px;color:var(--ink);outline:none;transition:border-color .15s,box-shadow .15s}
.input:focus,.textarea:focus,.select:focus{border-color:var(--blue-600);box-shadow:0 0 0 3px rgba(17,135,197,.12)}
.textarea{min-height:110px;resize:vertical;line-height:1.45}.textarea.mini{min-height:72px}
.help{font-size:12px;color:#7b8995;line-height:1.4}.error-box{background:var(--danger-bg);color:var(--danger);border:1px solid #f3c8c3;padding:10px 12px;border-radius:9px;margin-bottom:14px}
.btn{border:1px solid transparent;border-radius:9px;padding:10px 14px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:.15s;white-space:nowrap}
.btn-primary{background:var(--blue-700);color:#fff}.btn-primary:hover{background:var(--blue-800)}
.btn-secondary{background:#fff;border-color:#cfd9df;color:#31414e}.btn-secondary:hover{background:#f6f8f9}
.btn-danger{background:#fff;border-color:#e9b8b3;color:var(--danger)}.btn-danger:hover{background:var(--danger-bg)}
.btn-ghost{background:transparent;color:#41515e}.btn-ghost:hover{background:#eef3f6}.btn-sm{padding:7px 10px;font-size:12px}.btn-block{width:100%}

/* shell */
.app-shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar) 1fr}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:var(--sidebar);background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:40;overflow:hidden}
.sidebar::before,.sidebar::after{content:"";position:absolute;border-radius:50%;pointer-events:none;z-index:0}.sidebar::before{width:430px;height:430px;left:-308px;bottom:95px;border:44px solid rgba(17,135,197,.035)}.sidebar::after{width:330px;height:330px;left:-252px;bottom:143px;border:1px solid rgba(17,135,197,.08)}
.sidebar-head{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;padding:28px 18px 24px;border-bottom:1px solid var(--line);min-height:154px;text-align:center}

.nav{position:relative;z-index:1;padding:20px 12px 16px;display:flex;flex-direction:column;gap:5px;overflow-y:auto;min-height:0}.nav-btn{width:100%;min-height:54px;border:0;background:transparent;text-align:left;border-radius:13px;padding:13px 15px;color:#52616d;font-weight:700;font-size:15px;display:flex;align-items:center;gap:13px;line-height:1.2;transition:background .15s,color .15s,transform .15s}.nav-btn:hover{background:#f1f6f9;color:var(--blue-900);transform:translateX(1px)}.nav-btn.active{background:var(--blue-100);color:var(--blue-800)}
.nav-icon{width:24px;height:24px;display:grid;place-items:center;flex:0 0 24px;color:#5e7180}.nav-icon svg{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-btn.active .nav-icon{color:var(--blue-700)}.nav-label{min-width:0;white-space:nowrap}.nav-dot{display:none}
.sidebar-bottom{position:relative;z-index:1;margin-top:auto;padding:14px 12px 16px;border-top:1px solid var(--line);background:rgba(255,255,255,.94)}.user-mini{display:flex;align-items:center;gap:12px;padding:11px 10px;border-radius:13px;transition:background .15s}.user-mini:hover{background:#f5f9fb}.avatar{width:44px;height:44px;border-radius:50%;background:var(--blue-100);color:var(--blue-800);display:grid;place-items:center;font-weight:800;font-size:16px;flex:0 0 auto}.user-mini-copy{min-width:0;flex:1}.user-mini strong{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-mini small{display:block;color:#83919c;margin-top:3px;font-size:12px}.user-mini-chevron{margin-left:auto;color:#82909b;font-size:26px;line-height:1;transform:translateY(-1px)}
.main{grid-column:2;min-width:0}.topbar{height:var(--topbar);position:sticky;top:0;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 26px;z-index:30}.top-title h1{font-size:19px;margin:0;letter-spacing:-.02em}.top-title p{margin:2px 0 0;color:var(--muted);font-size:12px}.top-actions{display:flex;align-items:center;gap:10px}.status-pill{display:flex;align-items:center;gap:7px;border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:700}.status-dot{width:8px;height:8px;border-radius:50%;background:#9aa7b1}.status-dot.ok{background:#20a36a}.status-dot.warn{background:#d39b19}.content{padding:24px 22px;max-width:1900px;margin:0 auto}
.view{display:none}.view.active{display:block}.page-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:22px}.page-head h2{margin:0 0 5px;font-size:25px;letter-spacing:-.025em}.page-head p{margin:0;color:var(--muted);max-width:720px;line-height:1.5}.toolbar{display:flex;gap:8px;flex-wrap:wrap}

/* cards / dashboard */
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px;min-height:116px}.stat-label{font-size:12px;color:#71808c;font-weight:650;text-transform:uppercase;letter-spacing:.045em}.stat-value{font-size:30px;font-weight:800;margin:11px 0 2px;letter-spacing:-.04em}.stat-meta{font-size:12px;color:#84919b}
.grid-2{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(330px,.75fr);gap:16px}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}.panel-head{padding:15px 17px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.panel-head h3{font-size:14px;margin:0}.panel-body{padding:16px}.empty{padding:36px 20px;text-align:center;color:#81909c}.empty strong{display:block;color:#4e5e6a;margin-bottom:5px}
.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th{font-size:11px;text-align:left;color:#74828e;text-transform:uppercase;letter-spacing:.04em;padding:10px 12px;border-bottom:1px solid var(--line);background:#fafcfd}.table td{padding:11px 12px;border-bottom:1px solid #edf1f3;vertical-align:middle}.table tr:last-child td{border-bottom:0}.tag{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:700;background:#eef3f6;color:#53626e}.tag.green{background:var(--success-bg);color:var(--success)}.tag.red{background:var(--danger-bg);color:var(--danger)}.tag.blue{background:var(--blue-100);color:var(--blue-800)}

/* flow builder */
.flow-layout{height:calc(100vh - 128px);min-height:760px;display:grid;grid-template-columns:minmax(0,1fr) 330px;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.flow-stage-wrap{position:relative;overflow:auto;background-color:#f6f8fa;background-image:radial-gradient(#c9d5dc 1px,transparent 1px);background-size:22px 22px}.flow-stage{position:relative;width:2600px;height:2200px;min-width:100%;min-height:100%}.flow-lines{position:absolute;inset:0;pointer-events:none;overflow:visible}.flow-line{fill:none;stroke:#a9bac5;stroke-width:1.4}.flow-line.active{stroke:var(--blue-600);stroke-width:2}.flow-node{position:absolute;width:236px;background:#fff;border:1px solid #b9c9d3;border-radius:10px;box-shadow:0 5px 14px rgba(29,58,75,.07);user-select:none;cursor:grab}.flow-node:active{cursor:grabbing}.flow-node.selected{border-color:var(--blue-600);box-shadow:0 0 0 2px rgba(17,135,197,.14),0 8px 22px rgba(29,58,75,.12)}.flow-node.inactive{opacity:.55}.node-head{padding:10px 11px;border-bottom:1px solid #edf1f3;display:flex;align-items:flex-start;gap:8px}.node-type{width:8px;height:8px;border-radius:2px;background:var(--blue-600);margin-top:5px;flex:0 0 auto}.node-title{font-size:12px;font-weight:750;line-height:1.3}.node-id{font-size:10px;color:#87949e;margin-top:3px}.node-body{padding:9px 11px;color:#657480;font-size:11px}.node-body span{display:inline-block;margin-right:9px}.node-main{border-color:var(--blue-700)}.node-main .node-head{background:#eff8fc}.node-main .node-type{background:var(--blue-800);border-radius:50%}
.flow-inspector{border-left:1px solid var(--line);background:#fff;overflow:auto}.inspector-head{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--line);padding:15px 16px;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:10px}.inspector-head strong{font-size:14px}.inspector-head-actions{display:flex;align-items:center;gap:8px;min-width:0}.inspector-close{width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--line);border-radius:8px;background:#fff;color:#687783;font-size:13px;flex:0 0 auto}.inspector-close:hover{background:#f4f7f9;color:var(--danger);border-color:#e8c4bf}.inspector-body{padding:16px}.section-title{font-size:11px;color:#70808c;text-transform:uppercase;letter-spacing:.06em;font-weight:800;margin:22px 0 10px}.section-title:first-child{margin-top:0}.inline-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.option-row,.action-row{border:1px solid var(--line);border-radius:9px;padding:10px;margin-bottom:9px;background:#fbfcfd}.option-row-head,.action-row-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.option-grid{display:grid;grid-template-columns:54px 1fr;gap:7px}.mini-input{width:100%;border:1px solid #d3dde3;border-radius:7px;padding:7px 8px;font-size:12px;background:#fff}.mini-select{width:100%;border:1px solid #d3dde3;border-radius:7px;padding:7px 8px;font-size:12px;background:#fff}.icon-btn{border:0;background:transparent;color:#73818c;padding:3px 5px;border-radius:5px}.icon-btn:hover{background:#edf2f5;color:var(--danger)}.inspector-save{position:sticky;bottom:0;padding:12px 16px;border-top:1px solid var(--line);background:#fff;display:flex;gap:8px;z-index:5}

/* lists / cards */
.search-row{display:flex;gap:10px;margin-bottom:14px}.search-row .input{max-width:420px}.entity-grid{display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));gap:12px}.entity-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:15px;transition:.15s}.entity-card:hover{border-color:#bccdd7;box-shadow:0 4px 14px rgba(35,66,84,.06)}.entity-card h3{font-size:14px;margin:0 0 5px}.entity-card p{margin:0;color:#72818d;font-size:12px;line-height:1.45}.entity-card-foot{display:flex;align-items:center;justify-content:space-between;margin-top:13px;gap:10px}.phrase-count{font-size:11px;color:#81909b}.contact-phone{font-size:17px;font-weight:750;margin:10px 0 3px}.file-name{font-weight:700;word-break:break-word}.file-meta{font-size:11px;color:#86939d;margin-top:5px}

/* modal */
.modal-backdrop{position:fixed;inset:0;background:rgba(12,28,39,.38);z-index:80;display:none;align-items:center;justify-content:center;padding:24px}.modal-backdrop.open{display:flex}.modal{width:min(720px,100%);max-height:90vh;background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(13,36,50,.2);display:flex;flex-direction:column}.modal-head{padding:17px 19px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.modal-head h3{margin:0;font-size:17px}.modal-body{padding:19px;overflow:auto}.modal-foot{padding:13px 19px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:8px}

/* switches */
.switch-row{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid #edf1f3}.switch-row:last-child{border-bottom:0}.switch-copy strong{display:block;font-size:13px}.switch-copy span{display:block;color:#7b8994;font-size:12px;margin-top:3px}.switch{position:relative;width:40px;height:22px;flex:0 0 auto}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;inset:0;border-radius:999px;background:#bbc6cd;transition:.2s}.slider::before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.18);transition:.2s}.switch input:checked+.slider{background:var(--blue-700)}.switch input:checked+.slider::before{transform:translateX(18px)}

/* toast */
.toast-wrap{position:fixed;right:22px;bottom:22px;z-index:120;display:flex;flex-direction:column;gap:8px}.toast{background:#17212b;color:#fff;border-radius:9px;padding:11px 14px;box-shadow:0 10px 30px rgba(0,0,0,.18);min-width:260px;max-width:380px;font-size:13px}.toast.success{background:#096746}.toast.error{background:#8d241c}

@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}.entity-grid{grid-template-columns:repeat(2,minmax(250px,1fr))}.flow-layout{grid-template-columns:minmax(0,1fr) 330px}}
@media(max-width:820px){:root{--sidebar:0px}.sidebar{transform:translateX(-100%)}.main{grid-column:1}.content{padding:18px}.stats-grid{grid-template-columns:1fr 1fr}.entity-grid{grid-template-columns:1fr}.flow-layout{grid-template-columns:1fr;height:auto}.flow-stage-wrap{height:620px}.flow-inspector{border-left:0;border-top:1px solid var(--line);max-height:680px}.topbar{padding:0 16px}.page-head{flex-direction:column}.stats-grid{grid-template-columns:1fr}}


@media(max-width:820px){.sidebar-head{padding:22px 14px 20px;min-height:126px}.sidebar-brand img{width:218px;max-height:88px}.sidebar-brand span{font-size:12px;letter-spacing:.34em;padding-left:44px;padding-right:38px}.sidebar-brand span::before,.sidebar-brand span::after{width:24px}.nav{padding-top:16px}.nav-btn{min-height:50px;padding:12px 14px;font-size:14px}.nav-icon{width:22px;height:22px;flex-basis:22px}.nav-icon svg{width:20px;height:20px}}

/* Organização visual do construtor de fluxo */
.flow-toolbar{align-items:center}.flow-filter-label{font-size:12px;font-weight:750;color:#667584;margin-right:-2px}.flow-filter{width:auto;min-width:220px;padding:9px 34px 9px 11px}
.flow-stage-wrap{scroll-behavior:smooth}.flow-stage{transition:width .2s ease,height .2s ease}.flow-node{width:248px}.node-id{display:none;margin-top:4px}.flow-stage.show-tech-ids .node-id{display:block}.flow-line{stroke:#b5c6d1;stroke-width:1.3}.flow-line.active{stroke:var(--blue-600);stroke-width:2.2}.flow-node:not(.selected){box-shadow:0 3px 10px rgba(29,58,75,.055)}
@media(max-width:1100px){.flow-toolbar{width:100%}.flow-filter{min-width:190px}}


/* Intenções: interface em português e organização por área */
.intent-tools{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:20px}.intent-tools .search-row{margin:0;flex:1;min-width:280px}.intent-tools .search-row .input{max-width:520px}.intent-filter-row{display:flex;gap:7px;flex-wrap:wrap}.intent-filter{border:1px solid #d4dfe5;background:#fff;color:#52616d;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:750}.intent-filter:hover{background:#f3f7f9;color:var(--blue-900)}.intent-filter.active{background:var(--blue-800);border-color:var(--blue-800);color:#fff}.intent-section{margin-bottom:24px}.intent-section-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px;padding:0 2px}.intent-section-head h3{margin:0;font-size:17px;letter-spacing:-.015em}.intent-section-head span{display:block;margin-top:3px;font-size:11px;color:#82909a}.intent-grid{grid-template-columns:repeat(3,minmax(280px,1fr))}.intent-card{padding:16px 17px}.intent-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.intent-card-top h3{font-size:15px;margin:0 0 5px;color:#182733}.intent-code{font-size:10px;color:#8a98a3}.intent-code code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#70808c;background:#f4f7f9;border-radius:4px;padding:2px 4px}.intent-card p strong{font-weight:750;color:#50616e}.intent-card .phrase-count{font-size:11px;color:#74828e}

/* Fluxos: mais área útil e modo de tela ampla */
#view-flows .page-head{margin-bottom:14px}#view-flows .page-head p{max-width:900px}.flow-layout{border-radius:10px}.flow-stage-wrap{min-height:760px}.flow-inspector{width:330px}.flow-wide .sidebar,.flow-wide .topbar{display:none}.flow-wide .app-shell{display:block}.flow-wide .main{grid-column:auto}.flow-wide .content{max-width:none;width:100%;padding:8px}.flow-wide #view-flows .page-head{padding:8px 8px 4px;margin:0}.flow-wide #view-flows .page-head>div:first-child{display:none}.flow-wide .flow-layout{height:calc(100vh - 64px);min-height:0;border-radius:8px}.flow-wide .flow-stage-wrap{min-height:0}.flow-wide .flow-inspector{width:350px}.flow-wide #toggleFlowWide{background:var(--blue-800);border-color:var(--blue-800);color:#fff}
@media(max-width:1250px){.intent-grid{grid-template-columns:repeat(2,minmax(280px,1fr))}.flow-layout{grid-template-columns:minmax(0,1fr) 315px}.flow-inspector{width:315px}}
@media(max-width:820px){.intent-grid{grid-template-columns:1fr}.intent-tools{align-items:stretch}.intent-filter-row{width:100%}.flow-wide .content{padding:6px}.flow-wide .flow-layout{height:auto}.flow-wide .flow-stage-wrap{height:70vh}.flow-wide .flow-inspector{width:auto}}


/* Editor de fluxo: painel recolhível e menu de contexto */
.flow-layout.inspector-closed{grid-template-columns:minmax(0,1fr)}
.flow-layout.inspector-closed .flow-inspector{display:none}
.flow-context-menu{position:fixed;z-index:180;display:none;min-width:224px;padding:6px;background:#fff;border:1px solid #cfdae1;border-radius:11px;box-shadow:0 16px 44px rgba(20,48,65,.18)}
.flow-context-menu.open{display:block}
.flow-context-menu button{display:flex;align-items:center;width:100%;min-height:38px;border:0;background:transparent;border-radius:7px;padding:8px 10px;text-align:left;color:#263642;font-size:12.5px;font-weight:650;cursor:pointer}
.flow-context-menu button:hover,.flow-context-menu button:focus-visible{background:#eef6fa;color:var(--blue-800);outline:none}
.flow-context-separator{height:1px;background:#e5ebef;margin:5px 4px}
.flow-stage-wrap{cursor:default}
.flow-stage-wrap .flow-node{cursor:grab}
@media(max-width:820px){.flow-context-menu{min-width:210px}.inspector-close{width:34px;height:34px}}


/* V2.6 — editor de fluxo com comportamento de aplicativo */
#view-flows .flow-page-head{align-items:center;margin-bottom:12px;gap:18px}
#view-flows .flow-page-copy{min-width:0;flex:1}
#view-flows .flow-page-copy h2{font-size:23px;margin-bottom:3px}
#view-flows .flow-page-copy p{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flow-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex:0 0 auto;min-width:0}
.flow-text-action{border:0;background:transparent;padding:7px 3px;color:#50616e;font-weight:750;font-size:12.5px;cursor:pointer;border-radius:6px}
.flow-text-action:hover,.flow-text-action:focus-visible{color:var(--blue-800);background:transparent;outline:2px solid rgba(17,135,197,.14);outline-offset:2px}
.flow-code-toggle{display:inline-flex;align-items:center;gap:8px;color:#50616e;font-size:12.5px;font-weight:700;white-space:nowrap;cursor:pointer;user-select:none}
.flow-code-toggle input{position:absolute;opacity:0;pointer-events:none}
.flow-code-switch{position:relative;width:34px;height:19px;border-radius:999px;background:#c4ced5;transition:.16s;flex:0 0 auto}
.flow-code-switch::after{content:"";position:absolute;width:13px;height:13px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.18);transition:.16s}
.flow-code-toggle input:checked+.flow-code-switch{background:var(--blue-700)}
.flow-code-toggle input:checked+.flow-code-switch::after{transform:translateX(15px)}
.flow-code-toggle input:focus-visible+.flow-code-switch{outline:3px solid rgba(17,135,197,.18);outline-offset:2px}
.flow-wide-button{padding:9px 13px;font-size:12.5px;border-radius:9px}
.flow-layout{position:relative;height:calc(100vh - 176px);height:calc(100dvh - 176px);min-height:560px;grid-template-columns:minmax(0,1fr) minmax(292px,332px)}
.flow-stage-wrap{min-height:0;height:100%;overscroll-behavior:contain}
.flow-inspector{width:auto;min-width:0;height:100%}
.flow-inspector[hidden]{display:none!important}
.flow-layout.inspector-closed{grid-template-columns:minmax(0,1fr)!important}
.flow-layout.inspector-closed .flow-stage-wrap{width:100%}
.inspector-close{cursor:pointer}
.empty-inline-action{display:block;margin:16px auto 0;border:0;background:transparent;color:var(--blue-700);font-weight:750;font-size:12px;padding:5px 8px;border-radius:6px}
.empty-inline-action:hover{background:var(--blue-100)}
.flow-context-menu{min-width:206px;padding:5px;border-radius:10px;box-shadow:0 16px 42px rgba(20,48,65,.2)}
.flow-context-menu button{min-height:36px;font-size:12px;padding:8px 10px}
.flow-context-separator{display:none}
.mobile-nav-toggle{display:none;border:0;background:transparent;color:var(--blue-900);font-size:22px;line-height:1;width:40px;height:40px;border-radius:9px;place-items:center;padding:0}
.sidebar-backdrop{display:none}

@media(max-width:1180px){
  #view-flows .flow-page-head{align-items:flex-start}
  #view-flows .flow-page-copy p{white-space:normal}
  .flow-toolbar{gap:10px}
  .flow-layout{grid-template-columns:minmax(0,1fr) 300px}
}
@media(max-width:960px){
  #view-flows .flow-page-head{flex-direction:row;align-items:center}
  #view-flows .flow-page-copy p{display:none}
  .flow-layout{grid-template-columns:1fr}
  .flow-inspector{position:absolute;right:0;top:0;bottom:0;width:min(360px,92vw);z-index:18;border-left:1px solid var(--line);border-top:0;box-shadow:-14px 0 34px rgba(21,49,66,.12);background:#fff}
  .flow-layout.inspector-closed .flow-inspector{display:none!important}
}
@media(max-width:820px){
  :root{--sidebar:286px}
  .app-shell{display:block}
  .main{grid-column:auto;width:100%;min-width:0}
  .sidebar{transform:translateX(-104%);transition:transform .2s ease;box-shadow:12px 0 34px rgba(20,46,62,.16)}
  .sidebar.mobile-open{transform:translateX(0)}
  .sidebar-backdrop{position:fixed;inset:0;z-index:35;background:rgba(10,28,40,.3)}
  .sidebar-backdrop.open{display:block}
  .mobile-nav-toggle{display:grid;flex:0 0 auto}
  .topbar{gap:8px;padding:0 10px 0 8px}
  .top-title{min-width:0;flex:1}
  .top-title h1{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .top-title p{display:none}
  .top-actions{gap:5px}
  .status-pill{padding:6px 8px;font-size:10px}
  .content{padding:14px}
  #view-flows .flow-page-head{gap:10px;margin-bottom:9px}
  #view-flows .flow-page-copy h2{font-size:18px;margin:0}
  .flow-toolbar{margin-left:auto;gap:9px}
  .flow-text-action{font-size:0;width:34px;height:34px;padding:0;position:relative}
  .flow-text-action::after{content:"↻";font-size:20px;position:absolute;inset:0;display:grid;place-items:center}
  .flow-code-toggle>span:first-child{display:none}
  .flow-wide-button{font-size:11px;padding:8px 10px}
  .flow-layout{height:calc(100vh - 137px);height:calc(100dvh - 137px);min-height:480px;border-radius:8px}
  .flow-stage-wrap{height:100%;min-height:0}
  .flow-inspector{width:min(360px,96vw)}
  .flow-node{width:220px}
}
@media(max-width:520px){
  .status-pill:nth-child(1){display:none}
  #view-flows .flow-page-copy{display:none}
  #view-flows .flow-page-head{justify-content:flex-end}
  .flow-toolbar{width:100%;justify-content:flex-end}
  .flow-wide-button{padding:8px 11px}
  .flow-layout{height:calc(100vh - 116px);height:calc(100dvh - 116px)}
}

/* V2.8 — canvas realmente infinito: câmera por transformação, sem limites de scroll */
body.flow-view-active .content{
  width:100%;max-width:none;margin:0;padding:0;
  height:calc(100vh - var(--topbar));height:calc(100dvh - var(--topbar));
  overflow:hidden;
}
body.flow-view-active #view-flows{height:100%;min-height:0}
body.flow-view-active #view-flows .flow-page-head{display:none!important}
body.flow-view-active .flow-layout{
  position:relative;display:block;width:100%;height:100%;min-height:0;
  border:0;border-radius:0;overflow:hidden;background:#f6f8fa;
}
.flow-stage-wrap{
  position:absolute;inset:0;width:100%;height:100%;min-height:0;
  overflow:hidden;overscroll-behavior:none;touch-action:none;
  cursor:grab;scroll-behavior:auto;
  background-color:#f6f8fa;
  background-image:radial-gradient(#c9d5dc 1px,transparent 1px);
  background-size:22px 22px;
  scrollbar-width:none;
}
.flow-stage-wrap.pan-ready{cursor:grab}
.flow-stage-wrap.is-panning{cursor:grabbing;user-select:none}
.flow-stage-wrap.is-panning *{cursor:grabbing!important}
.flow-zoom-layer{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.flow-stage{
  position:absolute;left:0;top:0;width:1200px;height:900px;min-width:0;min-height:0;overflow:visible;
  transform-origin:0 0;transition:none!important;will-change:transform;
}
.flow-lines{overflow:visible!important}
.flow-node{touch-action:none}
.flow-stage-wrap .flow-node{cursor:grab}
.flow-stage-wrap .flow-node:active{cursor:grabbing}

.flow-canvas-controls{
  position:absolute;left:14px;bottom:14px;z-index:22;
  display:flex;align-items:center;gap:0;
  padding:4px;border:1px solid #ced9df;border-radius:10px;background:rgba(255,255,255,.96);
  box-shadow:0 7px 24px rgba(24,52,68,.12);backdrop-filter:blur(8px);
}
.flow-canvas-controls button{
  height:34px;min-width:36px;border:0;border-right:1px solid #e4eaee;background:transparent;
  color:#41515d;font-size:18px;font-weight:700;line-height:1;padding:0 9px;border-radius:6px;
}
.flow-canvas-controls button:last-child{border-right:0}
.flow-canvas-controls button:hover,.flow-canvas-controls button:focus-visible{background:#eef5f8;color:var(--blue-800);outline:none}
.flow-canvas-controls .flow-zoom-value{min-width:58px;font-size:11px;font-weight:800;color:#5f6d78}

.flow-inspector{
  position:absolute;right:12px;top:12px;bottom:12px;z-index:24;
  width:min(390px,calc(100% - 24px));height:auto;min-width:0;
  border:1px solid #d5dfe5!important;border-radius:12px;background:#fff;overflow:auto;
  box-shadow:0 18px 50px rgba(20,48,65,.18);
}
.flow-inspector[hidden]{display:none!important}
.flow-layout.inspector-closed{display:block!important}
.flow-layout.inspector-closed .flow-stage-wrap{width:100%!important}
.inspector-head{border-radius:12px 12px 0 0}

.flow-context-menu{min-width:232px;padding:5px;border-radius:10px;box-shadow:0 16px 42px rgba(20,48,65,.2)}
.flow-context-menu button{min-height:36px;font-size:12px;padding:8px 10px}
.flow-context-separator{display:block!important;height:1px;background:#e5ebef;margin:5px 4px}

.flow-wide .sidebar,.flow-wide .topbar{display:none!important}
.flow-wide .app-shell{display:block}
.flow-wide .main{grid-column:auto}
.flow-wide .content{width:100%;max-width:none;margin:0;padding:0;height:100vh;height:100dvh;overflow:hidden}
.flow-wide #view-flows{height:100%}
.flow-wide .flow-layout{height:100%;min-height:0;border:0;border-radius:0}

@media(max-width:960px){
  .flow-inspector{right:8px;top:8px;bottom:8px;width:min(370px,calc(100% - 16px))}
}
@media(max-width:820px){
  body.flow-view-active .content{padding:0;height:calc(100vh - var(--topbar));height:calc(100dvh - var(--topbar))}
  body.flow-view-active .flow-layout{height:100%;min-height:0;border-radius:0}
  .flow-stage-wrap{height:100%;min-height:0}
  .flow-inspector{right:7px;left:7px;top:7px;bottom:7px;width:auto;max-height:none;border-top:1px solid #d5dfe5}
  .flow-canvas-controls{left:9px;bottom:9px}
  .flow-canvas-controls button{height:36px;min-width:38px}
  .flow-context-menu{min-width:218px}
}

.status-dot.danger{background:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.10)}

/* V3.0 — Central de Atendimento + CRM */
.nav-count{margin-left:auto;min-width:22px;height:20px;padding:0 6px;border-radius:999px;background:#e9f5fb;color:var(--blue-800);display:inline-grid;place-items:center;font-size:10px;font-weight:800}.nav-count[hidden]{display:none}
body:not(.flow-view-active) #view-inbox.active{margin:-24px -22px;height:calc(100vh - var(--topbar));height:calc(100dvh - var(--topbar));overflow:hidden;background:#f3f6f8}
.crm-inbox-shell{height:100%;display:grid;grid-template-columns:minmax(280px,340px) minmax(420px,1fr) minmax(310px,360px);background:#fff;border-top:0}
.crm-conversation-list,.crm-contact-panel{min-width:0;background:#fff}.crm-conversation-list{border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.crm-contact-panel{border-left:1px solid var(--line);min-height:0;overflow:hidden}
.crm-list-head{height:72px;padding:15px 14px 12px 17px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf1f3}.crm-list-head h2{font-size:18px;margin:0;letter-spacing:-.025em}.crm-list-head p{font-size:11px;margin:2px 0 0;color:#87939c}.crm-icon-btn{width:34px;height:34px;border:1px solid #d6dfe4;background:#fff;border-radius:8px;color:#52616d;font-size:18px}.crm-icon-btn:hover{background:#f4f8fa;color:var(--blue-800)}
.crm-search-wrap{padding:12px 12px 8px}.crm-search{height:38px;font-size:12px;background:#f8fafb}.crm-filter-row{display:flex;gap:6px;padding:0 12px 10px;border-bottom:1px solid #edf1f3}.crm-filter{border:0;background:#f3f6f8;color:#64727c;border-radius:999px;padding:6px 9px;font-size:10.5px;font-weight:750}.crm-filter.active{background:#e7f3f9;color:var(--blue-800)}
.crm-conversations{flex:1;min-height:0;overflow:auto}.crm-list-empty{padding:30px 18px;text-align:center;color:#83919a;font-size:12px}.crm-conversation-item{width:100%;display:grid;grid-template-columns:42px 1fr;gap:10px;border:0;border-bottom:1px solid #eef2f4;background:#fff;padding:12px;text-align:left;color:inherit}.crm-conversation-item:hover{background:#f8fafb}.crm-conversation-item.active{background:#eef7fb;box-shadow:inset 3px 0 var(--blue-700)}
.crm-list-avatar,.crm-chat-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#eaf4f8;color:#07557f;font-weight:800;font-size:12px;letter-spacing:.02em;flex:0 0 auto}.crm-list-avatar,.crm-chat-avatar{position:relative;overflow:hidden}.crm-avatar-initials{position:relative;z-index:1;display:grid;place-items:center;width:100%;height:100%}.crm-avatar-photo{position:absolute;inset:0;z-index:2;width:100%;height:100%;display:block;object-fit:cover;border-radius:inherit;background:#eaf4f8}.crm-list-avatar.small{width:34px;height:34px;font-size:10px}.crm-list-copy{min-width:0}.crm-list-row,.crm-list-preview{display:flex;align-items:center;justify-content:space-between;gap:8px}.crm-list-row strong{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-list-row time{font-size:9.5px;color:#8e9aa3;white-space:nowrap}.crm-list-phone{margin-top:2px;font-size:9.5px;color:#79909d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-list-preview{margin-top:4px}.crm-list-preview>span{font-size:11px;color:#6e7c87;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-list-preview>b,.crm-unread-badge{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#1aa36f;color:#fff;font-size:9.5px;font-style:normal}.crm-list-tags{display:flex;gap:5px;align-items:center;margin-top:7px;color:#84919a;font-size:9.5px}.mini-state{border-radius:999px;padding:3px 6px;background:#eff3f5;color:#61717c}.mini-state.human{background:#fff3e6;color:#995c00}.mini-state.auto{background:#eaf8f1;color:#087a55}
.crm-chat-panel{position:relative;min-width:0;min-height:0;background:#edf2f4;display:flex;flex-direction:column}.crm-empty-chat{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:36px;text-align:center;color:#7c8993;background:radial-gradient(circle at 50% 42%,#fff 0,#f5f8f9 42%,#eef3f5 100%)}.crm-empty-chat strong{color:#31414e;font-size:16px;margin:12px 0 5px}.crm-empty-chat span{max-width:440px;font-size:12px;line-height:1.6}.crm-empty-mark{width:54px;height:54px;border-radius:16px;display:grid;place-items:center;background:#fff;border:1px solid #dce5ea;color:var(--blue-700);font-family:"Space Grotesk",sans-serif;font-size:22px;font-weight:700;box-shadow:0 8px 30px rgba(23,48,63,.08)}
.crm-chat-active{height:100%;min-height:0;display:flex;flex-direction:column}.crm-chat-active[hidden]{display:none!important}.crm-chat-head{height:72px;display:flex;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-bottom:1px solid #dce4e8;z-index:2}.crm-mobile-back{display:none;width:34px;height:34px;border:0;background:transparent;border-radius:8px;color:#53636f;font-size:19px}.crm-chat-title{min-width:0;flex:1}.crm-chat-title strong{display:block;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-chat-title span{display:block;font-size:10.5px;color:#7d8b96;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-chat-actions{display:flex;align-items:center;gap:7px}.crm-mode-chip{font-size:10px;font-weight:800;border-radius:999px;padding:6px 8px;background:#eaf8f1;color:#087a55}.crm-mode-chip.human{background:#fff3e6;color:#995c00}
.crm-message-area{flex:1;min-height:0;overflow:auto;padding:22px clamp(14px,3vw,34px);background-color:#eef3f4;background-image:radial-gradient(rgba(89,112,124,.10) .75px,transparent .75px);background-size:18px 18px}.crm-message-row{display:flex;margin:4px 0}.crm-message-row.outbound{justify-content:flex-end}.crm-message-bubble{max-width:min(72%,620px);padding:8px 10px 6px;border-radius:10px;background:#fff;box-shadow:0 1px 1px rgba(32,56,69,.08);font-size:12.5px;line-height:1.45;word-break:break-word}.crm-message-row.outbound .crm-message-bubble{background:#dff3e8;border-bottom-right-radius:3px}.crm-message-row.outbound .crm-message-bubble.bot{background:#e5f2f8}.crm-message-row.inbound .crm-message-bubble{border-bottom-left-radius:3px}.crm-message-foot{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-top:3px;color:#82909a;font-size:8.8px}.crm-message-foot span{font-weight:700}.crm-media-label{font-size:10px;color:#677781;margin-bottom:4px}.crm-day-sep{text-align:center;margin:12px 0}.crm-day-sep span{display:inline-block;background:#fff;color:#74838d;font-size:9.5px;padding:5px 8px;border-radius:999px;box-shadow:0 1px 2px rgba(30,53,65,.08)}.crm-history-start{margin:30px auto;padding:14px 16px;max-width:390px;border-radius:10px;background:#fff;border:1px solid #dce5e9;text-align:center;color:#7b8993}.crm-history-start strong{display:block;color:#3b4a55;font-size:12px}.crm-history-start span{display:block;margin-top:4px;font-size:10.5px;line-height:1.5}
.crm-composer{position:relative;padding:10px 12px 24px;display:grid;grid-template-columns:1fr auto;gap:8px;background:#fff;border-top:1px solid #dce5e9}.crm-composer-input{min-height:42px;max-height:120px;resize:none;border:1px solid #cfd9df;border-radius:10px;padding:10px 12px;outline:none;line-height:1.4;font-size:12.5px}.crm-composer-input:focus{border-color:var(--blue-600);box-shadow:0 0 0 3px rgba(17,135,197,.1)}.crm-send-btn{align-self:stretch;min-width:72px;border:0;border-radius:10px;background:var(--blue-700);color:#fff;font-size:11.5px;font-weight:800}.crm-send-btn:disabled{opacity:.55}.crm-composer-hint{position:absolute;left:14px;bottom:6px;color:#95a0a8;font-size:8.5px}
.crm-side-empty{height:100%;display:grid;place-items:center;text-align:center;padding:30px;color:#89969f;font-size:11px}.crm-side-head{height:72px;padding:12px 14px;border-bottom:1px solid #edf1f3;display:flex;align-items:center;justify-content:space-between;gap:10px}.crm-side-head>div{min-width:0}.crm-side-head span{display:block;font-size:9px;color:#88959e;text-transform:uppercase;letter-spacing:.06em}.crm-side-head strong{display:block;font-size:13px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-side-status{font-size:9px!important;text-transform:none!important;letter-spacing:0!important;font-weight:800;padding:5px 7px;border-radius:999px;background:#eaf8f1;color:#087a55!important;white-space:nowrap}.crm-side-status.human{background:#fff3e6;color:#995c00!important}.crm-side-scroll{height:calc(100% - 72px);overflow:auto}.crm-side-section{padding:14px;border-bottom:1px solid #edf1f3}.crm-side-section-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;color:#52616c;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.crm-side-section label{display:block;font-size:9.5px;font-weight:700;color:#65747f;margin-bottom:8px}.crm-side-input{height:34px;margin-top:4px;padding:7px 9px;border-radius:7px;font-size:11px}.crm-link-btn{border:0;background:transparent;color:var(--blue-700);padding:3px;font-size:9.5px;font-weight:800;text-transform:none;letter-spacing:0}.crm-mini-list{display:flex;flex-direction:column;gap:6px}.crm-mini-card{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;border:1px solid #e2e9ed;border-radius:8px;background:#fff;padding:8px}.crm-mini-card:hover{background:#f8fafb}.crm-mini-card div{min-width:0}.crm-mini-card strong{display:block;font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-mini-card span{display:block;font-size:9px;color:#89959e;margin-top:2px}.crm-mini-empty{font-size:10px;color:#97a2aa;padding:8px 0}.priority-dot{width:8px;height:8px;border-radius:50%;background:#aab4bb;flex:0 0 auto}.priority-dot.alta{background:#d97706}.priority-dot.urgente{background:#d92d20}.priority-dot.baixa{background:#7a8995}.task-check{width:22px;height:22px!important;margin:0!important;border:1px solid #cfd9df;border-radius:50%;display:grid!important;place-items:center;color:transparent!important}.task-check.done{background:#eaf8f1;border-color:#83c8aa;color:#087a55!important}.crm-notes{display:flex;flex-direction:column;gap:8px;margin-top:12px}.crm-note{padding:9px;border-radius:8px;background:#f7f9fa;border:1px solid #e7ecef}.crm-note strong,.crm-note span,.crm-note time{display:block}.crm-note strong{font-size:9.5px;color:#52626d}.crm-note span{font-size:10.5px;color:#3e4c56;line-height:1.45;margin:3px 0}.crm-note time{font-size:8.5px;color:#9ba5ac}.crm-context dl{margin:0}.crm-context dl>div{display:flex;justify-content:space-between;gap:12px;padding:5px 0;font-size:9.5px}.crm-context dt{color:#89969f}.crm-context dd{margin:0;color:#42525d;font-weight:700;text-align:right;overflow-wrap:anywhere}

.crm-page-head{align-items:center}.crm-top-search{width:min(300px,42vw);height:38px}.crm-summary-strip{display:flex;gap:10px;margin-bottom:16px}.crm-summary-strip>div{min-width:130px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px 12px}.crm-summary-strip span{display:block;font-size:9.5px;text-transform:uppercase;letter-spacing:.05em;color:#85939d;font-weight:750}.crm-summary-strip strong{display:block;font-size:19px;margin-top:4px}
.request-board,.crm-board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(270px,1fr);gap:12px;overflow-x:auto;padding-bottom:8px}.request-column,.crm-stage{background:#eef2f4;border:1px solid #dce4e8;border-radius:11px;min-height:520px;overflow:hidden}.request-column>header,.crm-stage>header{display:flex;align-items:center;justify-content:space-between;padding:11px 12px;border-bottom:1px solid #dae3e7;background:#f8fafb}.request-column>header strong,.crm-stage>header strong{font-size:11.5px}.request-column>header span,.crm-stage>header span{min-width:22px;height:22px;display:grid;place-items:center;border-radius:999px;background:#e7edf0;color:#60707b;font-size:9.5px;font-weight:800}.request-column-body,.crm-stage-body{padding:9px;display:flex;flex-direction:column;gap:8px;min-height:468px}.request-column.drag-over,.crm-stage.drag-over{outline:2px solid rgba(17,135,197,.35);outline-offset:-2px;background:#e9f5fb}.request-empty,.crm-stage-empty{border:1px dashed #cad5db;border-radius:8px;padding:18px 12px;text-align:center;color:#94a0a8;font-size:10px}
.request-card,.crm-card{background:#fff;border:1px solid #dce4e8;border-radius:9px;padding:10px;box-shadow:0 2px 8px rgba(25,52,66,.04);cursor:grab}.request-card:active,.crm-card:active{cursor:grabbing}.request-card.priority-urgente{border-left:3px solid #d92d20}.request-card.priority-alta{border-left:3px solid #d97706}.request-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}.request-dept,.request-priority{font-size:8.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.request-dept{color:var(--blue-700)}.request-priority{color:#7c8993}.request-card>strong{display:block;font-size:11px;line-height:1.35}.request-card>p{font-size:9.5px;line-height:1.45;color:#72818b;margin:5px 0 8px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.request-contact{display:flex;align-items:center;justify-content:space-between;gap:7px;padding-top:7px;border-top:1px solid #eef2f4;font-size:9.5px;color:#566671}.request-owner{font-size:9px;color:#7e8c96;margin-top:6px}.request-card>time{display:block;font-size:8.5px;color:#9aa5ad;margin-top:7px}
.crm-card-head{display:grid;grid-template-columns:34px 1fr auto;gap:8px;align-items:center}.crm-card-head>div:nth-child(2){min-width:0}.crm-card-head strong{display:block;font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-card-head span{display:block;font-size:8.8px;color:#89969f;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.crm-card>p{font-size:9.5px;line-height:1.4;color:#71808a;margin:9px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.crm-card-tags{display:flex;flex-wrap:wrap;gap:4px}.crm-card-tags span{font-size:8.5px;padding:3px 5px;border-radius:999px;background:#f0f4f6;color:#63737e}.crm-card-tags span.warn{background:#fff3e6;color:#995c00}.crm-card>time{display:block;margin-top:7px;font-size:8px;color:#a0a9b0}

@media(max-width:1320px){.crm-inbox-shell{grid-template-columns:300px minmax(390px,1fr) 320px}}
@media(max-width:1080px){.crm-inbox-shell{grid-template-columns:300px 1fr}.crm-contact-panel{position:absolute;right:0;top:0;bottom:0;width:330px;z-index:8;box-shadow:-14px 0 34px rgba(21,49,66,.11);transform:translateX(100%);transition:transform .18s}.crm-chat-open .crm-contact-panel{transform:translateX(0)}.crm-chat-actions .btn{margin-right:0}.crm-message-bubble{max-width:78%}}
@media(max-width:820px){
  body:not(.flow-view-active) #view-inbox.active{margin:-14px;height:calc(100vh - var(--topbar));height:calc(100dvh - var(--topbar))}
  .crm-inbox-shell{display:block;position:relative}.crm-conversation-list{position:absolute;inset:0;z-index:5;border-right:0}.crm-chat-panel{position:absolute;inset:0;z-index:6;transform:translateX(100%);transition:transform .18s}.crm-chat-open .crm-chat-panel{transform:translateX(0)}.crm-mobile-back{display:block}.crm-contact-panel{display:none}.crm-message-bubble{max-width:88%}.crm-chat-head{height:66px;padding:8px}.crm-chat-avatar{width:36px;height:36px}.crm-chat-actions .crm-mode-chip{display:none}.crm-chat-actions .btn{font-size:10px;padding:7px 8px}.crm-summary-strip{overflow-x:auto}.crm-summary-strip>div{min-width:120px}.request-board,.crm-board{grid-auto-columns:minmax(260px,84vw)}
}
.nav{overflow-y:auto;min-height:0}
@media(max-width:1080px) and (min-width:821px){.crm-contact-panel{display:none!important}.crm-inbox-shell{grid-template-columns:300px minmax(0,1fr)}}
.crm-details-btn{display:none;border:1px solid #d1dbe1;background:#fff;color:#465762;border-radius:8px;padding:7px 9px;font-size:10px;font-weight:800}.crm-side-head-actions{display:flex;align-items:center;gap:7px}.crm-side-close{display:none;width:30px;height:30px;border:1px solid #d9e1e6;background:#fff;border-radius:7px;color:#687781}
@media(max-width:1080px) and (min-width:821px){.crm-contact-panel{display:block!important;position:absolute;right:0;top:0;bottom:0;width:340px;z-index:12;transform:translateX(105%);transition:transform .18s;box-shadow:-14px 0 34px rgba(21,49,66,.14)}.crm-side-open .crm-contact-panel{transform:translateX(0)}.crm-details-btn,.crm-side-close{display:inline-grid;place-items:center}.crm-inbox-shell{grid-template-columns:300px minmax(0,1fr)}}
@media(max-width:820px){.crm-contact-panel{display:block!important;position:absolute;inset:0;width:auto;z-index:12;transform:translateX(105%);transition:transform .18s;box-shadow:none}.crm-side-open .crm-contact-panel{transform:translateX(0)}.crm-details-btn,.crm-side-close{display:inline-grid;place-items:center}}
@media(max-width:1080px){body.crm-chat-open:not(.crm-side-open) .crm-contact-panel{transform:translateX(105%)!important}body.crm-side-open .crm-contact-panel{transform:translateX(0)!important}}


/* V3.1 · nitidez máxima do editor visual */
.flow-stage,
.flow-stage *,
.flow-node,
.flow-node *{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}
.flow-stage{
  will-change: auto!important;
  transform-style: flat;
  backface-visibility: hidden;
  perspective: 1000px;
}
.flow-lines,
.flow-line{
  shape-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
}
.flow-node{
  width: 252px;
  border:1px solid #b8c8d3;
  border-radius:14px;
  box-shadow:0 8px 22px rgba(25,52,67,.08);
  overflow:hidden;
  background:#fff;
}
.flow-node:not(.selected){
  box-shadow:0 4px 14px rgba(25,52,67,.06);
}
.flow-node.selected{
  border-color:var(--blue-600);
  box-shadow:0 0 0 2px rgba(17,135,197,.12),0 14px 30px rgba(29,58,75,.14);
}
.node-head{
  padding:13px 14px;
  border-bottom:1px solid #edf2f5;
  align-items:center;
}
.node-title{
  font-size:14px;
  font-weight:800;
  line-height:1.25;
  letter-spacing:-.01em;
  color:#1d2a33;
}
.node-id{
  font-size:11px;
  color:#72808a;
  margin-top:4px;
}
.node-body{
  padding:11px 14px 12px;
  color:#667681;
  font-size:12px;
  line-height:1.35;
}
.node-body span{
  margin-right:12px;
}
.node-type{
  width:10px;
  height:10px;
  border-radius:3px;
  margin-top:1px;
  box-shadow:0 0 0 1px rgba(13,95,147,.08);
}
.flow-line{stroke:#b1c1cc;stroke-width:1.8}
.flow-line.active{stroke:var(--blue-600);stroke-width:2.3}
#flowStageWrap[data-zoom-mode='crisp'] .flow-node,
#flowStageWrap .flow-node{
  image-rendering:auto;
}

/* V4.0 · Flow Studio — blocos ricos, toolbox e sequências */
.flow-toolbox{
  position:absolute;left:14px;top:14px;bottom:64px;z-index:30;width:300px;overflow:auto;
  background:rgba(255,255,255,.98);border:1px solid #d5dfe5;border-radius:14px;
  box-shadow:0 18px 52px rgba(20,48,65,.18);backdrop-filter:blur(10px)
}
.flow-toolbox[hidden]{display:none!important}
.flow-toolbox-head{position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 14px 11px;background:rgba(255,255,255,.98);border-bottom:1px solid #edf2f5}
.flow-toolbox-head strong{display:block;font-size:13px;color:#1f2d36}.flow-toolbox-head span{display:block;margin-top:3px;font-size:9.5px;color:#7c8a94}.flow-toolbox-head button{width:30px;height:30px;border:0;border-radius:8px;background:#f3f6f8;color:#64737e}.flow-toolbox-head button:hover{background:#eaf2f6;color:#0b6d9f}
.flow-toolbox-search{padding:10px 12px 4px}.flow-toolbox-search .input{height:36px;font-size:11px;background:#f8fafb}
.flow-toolbox-group{padding:8px 9px 4px}.flow-toolbox-label{padding:4px 5px 6px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#91a0aa}
.flow-toolbox-group>button{width:100%;display:grid;grid-template-columns:34px 1fr;gap:9px;align-items:center;border:0;background:transparent;border-radius:9px;padding:8px;text-align:left;color:#263640}
.flow-toolbox-group>button:hover{background:#eef6fa}.flow-toolbox-group>button>span{width:30px;height:30px;display:grid;place-items:center;border-radius:8px;background:#f0f5f7;font-size:14px;font-weight:800;color:#17688f}
.flow-toolbox-group>button strong{display:block;font-size:11px}.flow-toolbox-group>button small{display:block;margin-top:2px;color:#84919a;font-size:9px;line-height:1.25}
.flow-add-block{font-size:20px!important;color:var(--blue-800)!important;background:#eef7fb!important}
.flow-add-block:hover{background:#dff0f8!important}

.flow-node{width:286px!important;border-radius:13px!important;overflow:hidden;background:#fff}
.flow-node .node-head{display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:center;padding:11px 12px!important;background:#fff}
.flow-node .node-type{width:28px!important;height:28px!important;margin:0!important;border-radius:8px!important;display:grid;place-items:center;background:#edf5f8!important;box-shadow:none!important;font-size:13px;line-height:1}
.flow-node .node-title-wrap{min-width:0}.flow-node .node-kicker{font-size:8px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;color:#8a99a3;margin-bottom:2px}.flow-node .node-title{font-size:13px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flow-node .node-id{font-size:9px!important;margin-top:3px!important}
.flow-node .node-content{padding:10px 11px 8px;background:#fbfcfd;min-height:48px}.flow-node .node-footer{display:flex;gap:12px;align-items:center;padding:7px 11px;border-top:1px solid #eef2f4;background:#fff;color:#7f8d96;font-size:9px;font-weight:700}
.flow-message-preview{padding:9px 10px;border:1px solid #e7ecef;border-radius:8px;background:#fff;color:#3d4c56;font-size:10.5px;line-height:1.4;white-space:pre-line;max-height:96px;overflow:hidden}.flow-message-preview.compact{margin-top:7px;max-height:60px}.flow-message-preview.empty{color:#9ca7ae;font-style:italic}
.flow-choices-preview{display:flex;flex-direction:column;gap:5px}.flow-choice-preview{display:grid;grid-template-columns:23px 1fr;gap:7px;align-items:center;border:1px solid #dfe7eb;background:#fff;border-radius:7px;padding:6px 7px;font-size:9.5px;color:#465660}.flow-choice-preview>span{width:21px;height:21px;border-radius:6px;display:grid;place-items:center;background:#eaf5fa;color:#0875aa;font-size:9px;font-weight:900}.flow-choices-preview>small{font-size:8.5px;color:#8a979f;padding-left:3px}
.flow-input-preview{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px;padding:8px 9px;border:1px dashed #c8d8e1;border-radius:8px;background:#f6fafc}.flow-input-preview span{font-size:9.5px;color:#62727d}.flow-input-preview strong{font-size:9px;color:#0b6f9e;background:#e7f4fa;border-radius:999px;padding:4px 7px}
.flow-node-special{display:grid;grid-template-columns:36px 1fr;gap:9px;align-items:center;padding:8px 9px;border:1px solid #e2e9ed;border-radius:9px;background:#fff}.flow-special-icon{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#f1f6f8;font-size:16px}.flow-node-special strong{display:block;font-size:10.5px;color:#34444e}.flow-node-special small{display:block;margin-top:3px;color:#89969f;font-size:8.8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.flow-action-pills{display:flex;flex-wrap:wrap;gap:4px;margin-top:7px}.flow-action-pill{font-size:8px!important;margin:0!important;padding:3px 5px;border-radius:999px;background:#eef3f5;color:#667680}
.flow-kind-quiz .node-type{background:#eeeafd!important}.flow-kind-quiz{border-color:#c9c0ec}.flow-kind-delay .node-type{background:#f1edff!important}.flow-kind-delay{border-color:#d3c9f1}.flow-kind-input .node-type{background:#fff3e3!important}.flow-kind-input{border-color:#edd2ad}.flow-kind-media .node-type{background:#eaf5ff!important}.flow-kind-media{border-color:#bfd9ed}.flow-kind-action .node-type{background:#eef0f2!important}.flow-kind-menu .node-type{background:#eaf7f1!important}.flow-kind-menu{border-color:#bddccd}
.node-main .node-head{background:#f4fbfe!important}
.flow-line{stroke-linecap:round;stroke-linejoin:round}

.action-row-controls{display:flex;gap:4px}.action-row-controls .icon-btn{width:26px;height:26px;font-size:11px}.mini-check{display:flex!important;align-items:center;gap:7px;margin-top:8px!important;padding:7px 8px;border:1px solid #e3e9ed;border-radius:7px;background:#f8fafb;font-size:9.5px!important;color:#61727d}.mini-check input{width:14px;height:14px}
.new-block-template-note{display:flex;flex-direction:column;gap:3px;margin-bottom:14px;padding:11px 12px;border:1px solid #dce7ed;border-radius:9px;background:#f4f9fb}.new-block-template-note strong{font-size:12px;color:#2c3e49}.new-block-template-note span{font-size:9.5px;color:#788790}

@media(max-width:820px){
  .flow-toolbox{left:7px;right:7px;top:7px;bottom:58px;width:auto}.flow-toolbox-group{padding-left:8px;padding-right:8px}.flow-node{width:270px!important}
}

/* V4 · conexões visuais mais próximas de um flow builder profissional */
.flow-arrow-head{fill:#9cb0bd}
.flow-line.active + .flow-port,.flow-port.active{fill:var(--blue-600)}
.flow-line.active{stroke:var(--blue-600)}
.flow-port{fill:#fff;stroke:#95abb9;stroke-width:1.7;vector-effect:non-scaling-stroke}
.flow-condition-preview{display:grid;gap:7px;padding:10px 11px;border:1px solid #dfe6f4;border-radius:10px;background:#fafbff}
.flow-condition-preview>div{display:flex;align-items:center;gap:7px}.flow-condition-preview>div span{font-size:9px;font-weight:900;color:#7858b5}.flow-condition-preview>div strong{font-size:11px;color:#283242}.flow-condition-preview small{font-size:10px;color:#657480}
.flow-kind-condition{border-color:#cfc4e6}.flow-kind-condition .node-type{background:#f3effa;color:#7654af}
.inspector-kind-section[hidden]{display:none!important}


/* V4.1 · Conversas redesenhada */
.crm-inbox-shell{
  grid-template-columns:minmax(310px,360px) minmax(0,1fr);
  position:relative;
}
.crm-contact-panel{
  position:absolute;
  right:0;
  top:0;
  bottom:0;
  width:min(380px,34vw);
  z-index:12;
  box-shadow:-18px 0 40px rgba(21,49,66,.14);
  transform:translateX(105%);
  transition:transform .18s ease;
}
body.crm-side-open .crm-contact-panel{transform:translateX(0)}
.crm-details-btn,.crm-side-close{display:inline-grid;place-items:center}
.crm-chat-panel{background:#eef3f5}
.crm-empty-chat{
  align-items:flex-start;
  justify-content:center;
  padding:42px;
  text-align:left;
  background:linear-gradient(180deg,#f8fbfc 0%,#edf3f5 100%);
}
.crm-empty-mark{display:none!important}
.crm-empty-copy{max-width:560px}
.crm-empty-copy strong,.crm-empty-chat strong{display:block;color:#24333e;font-size:22px;line-height:1.15;margin:0 0 10px}
.crm-empty-copy span,.crm-empty-chat span{display:block;max-width:560px;font-size:13px;line-height:1.7;color:#71808b}
.crm-chat-head{
  height:auto;
  min-height:72px;
  padding:12px 16px;
  box-shadow:0 1px 0 rgba(27,51,66,.06);
}
.crm-chat-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 16px;
  background:#f8fbfc;
  border-bottom:1px solid #dce6ea;
}
.crm-chat-summary:empty{display:none}
.crm-chat-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border:1px solid #d7e2e8;
  border-radius:999px;
  background:#fff;
  padding:6px 10px;
  font-size:11px;
  color:#55646f;
}
.crm-chat-chip b{color:#22313c}
.crm-chat-chip.muted{background:#f1f6f8;color:#5f707a}
.crm-message-area{
  padding:18px clamp(16px,3vw,30px);
  background-color:#edf3f4;
  background-image:radial-gradient(rgba(89,112,124,.09) .75px,transparent .75px);
}
.crm-message-bubble{max-width:min(70%,680px);font-size:13px;padding:10px 12px 7px;border-radius:12px}
.crm-composer{padding:12px 14px 26px}
.crm-side-head strong{font-size:15px}
.crm-side-section-title{font-size:10.5px}
.crm-side-section label{font-size:10px}
.crm-side-input{font-size:11.5px}
@media(max-width:1320px){
  .crm-inbox-shell{grid-template-columns:300px minmax(0,1fr)}
  .crm-contact-panel{width:360px}
}
@media(max-width:1080px){
  .crm-contact-panel{width:340px}
}
@media(max-width:820px){
  .crm-chat-summary{padding:8px 10px;overflow:auto;white-space:nowrap;flex-wrap:nowrap}
  .crm-message-bubble{max-width:88%}
}


/* V4.2 · conversa ocupa todo o painel */
.crm-chat-panel{position:relative;overflow:hidden}
.crm-empty-chat{
  position:absolute;
  inset:0;
  z-index:1;
}
.crm-chat-active{
  position:relative;
  z-index:2;
  height:100%;
  min-height:0;
  display:none;
}
.crm-chat-panel.has-chat .crm-chat-active{display:flex!important}
.crm-chat-panel.has-chat .crm-empty-chat{display:none!important}
.crm-chat-head,
.crm-chat-summary,
.crm-message-area,
.crm-composer{width:100%}
.crm-message-area{flex:1 1 auto}


/* V4.3 · drawer de detalhes realmente sobreposto */
.crm-inbox-shell{
  position:relative;
  grid-template-columns:minmax(300px,360px) minmax(0,1fr)!important;
}
.crm-chat-panel,
.crm-conversation-list{
  min-width:0;
}
.crm-contact-panel{
  display:none!important;
  position:absolute!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:auto!important;
  width:min(380px,34vw)!important;
  min-width:320px;
  max-width:100%;
  background:#fff;
  border-left:1px solid var(--line);
  box-shadow:-18px 0 40px rgba(21,49,66,.16);
  z-index:40!important;
  overflow:hidden;
}
body.crm-side-open .crm-contact-panel{
  display:block!important;
}
body:not(.crm-side-open) .crm-contact-panel{
  pointer-events:none;
}
.crm-chat-panel{
  width:100%;
}
.crm-chat-panel.has-chat .crm-chat-active{
  width:100%;
}
@media(max-width:820px){
  .crm-contact-panel{
    width:100%!important;
    min-width:0;
    border-left:0;
    box-shadow:none;
  }
}


/* V4.4 · Conversas realmente em largura total */
body.inbox-view-active .content{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  height:calc(100vh - var(--topbar));
  height:calc(100dvh - var(--topbar));
  overflow:hidden!important;
}
body.inbox-view-active #view-inbox.active{
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
body.inbox-view-active .crm-inbox-shell{
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  margin:0!important;
  grid-template-columns:minmax(300px,360px) minmax(0,1fr)!important;
}
body.inbox-view-active .crm-chat-panel{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}
body.inbox-view-active .crm-chat-active,
body.inbox-view-active .crm-message-area,
body.inbox-view-active .crm-chat-head,
body.inbox-view-active .crm-chat-summary,
body.inbox-view-active .crm-composer{
  width:100%!important;
  max-width:none!important;
}
@media(max-width:820px){
  body.inbox-view-active .crm-inbox-shell{display:block!important}
}

/* V4.7 · remover conversa apenas da plataforma */
.crm-conversation-item{cursor:pointer}
.crm-conversation-item:focus-visible{outline:2px solid rgba(17,135,197,.35);outline-offset:-2px}
.crm-list-row-actions{display:flex;align-items:center;gap:5px;flex:0 0 auto}
.crm-conversation-remove{
  width:24px;height:24px;display:grid;place-items:center;flex:0 0 auto;
  border:0;border-radius:7px;background:transparent;color:#81909a;
  font-size:17px;font-weight:800;line-height:1;padding:0;cursor:pointer;
}
.crm-conversation-remove:hover,.crm-conversation-remove:focus-visible{background:#edf3f6;color:#23495f;outline:none}
.crm-conversation-item.active .crm-conversation-remove{color:#5f7887}
@media(pointer:fine){.crm-conversation-remove{opacity:.38}.crm-conversation-item:hover .crm-conversation-remove,.crm-conversation-remove:focus-visible{opacity:1}}

/* ==========================================================
   V4.8 · LEITURA AMPLIADA E UNIFORME
   Aplica em TODOS os módulos, EXCETO Conversas (#view-inbox).
   ========================================================== */
.ui-readable .view.active:not(#view-inbox){
  font-size:16px;
  line-height:1.5;
}

/* Cabeçalhos dos módulos */
.ui-readable .view.active:not(#view-inbox) .page-head{margin-bottom:24px}
.ui-readable .view.active:not(#view-inbox) .page-head h2{font-size:29px;line-height:1.15}
.ui-readable .view.active:not(#view-inbox) .page-head p{font-size:15px;line-height:1.6;max-width:820px}

/* Botões, campos e textos auxiliares */
.ui-readable .view.active:not(#view-inbox) .btn{font-size:14px;padding:11px 15px;min-height:40px}
.ui-readable .view.active:not(#view-inbox) .btn-sm{font-size:13px;padding:8px 11px;min-height:34px}
.ui-readable .view.active:not(#view-inbox) .input,
.ui-readable .view.active:not(#view-inbox) .textarea,
.ui-readable .view.active:not(#view-inbox) .select{font-size:14px;padding:11px 13px}
.ui-readable .view.active:not(#view-inbox) .field>label,
.ui-readable .view.active:not(#view-inbox) .field-label{font-size:14px}
.ui-readable .view.active:not(#view-inbox) .help{font-size:13px}

/* Painel inicial */
.ui-readable #view-dashboard .stat-card{padding:20px;min-height:124px}
.ui-readable #view-dashboard .stat-label{font-size:13px}
.ui-readable #view-dashboard .stat-value{font-size:34px}
.ui-readable #view-dashboard .stat-meta{font-size:13px}
.ui-readable #view-dashboard .panel-head{padding:17px 19px}
.ui-readable #view-dashboard .panel-head h3{font-size:16px}
.ui-readable #view-dashboard .panel-body{font-size:15px;padding:18px}
.ui-readable #view-dashboard .table th{font-size:12px;padding:12px 14px}
.ui-readable #view-dashboard .table td{font-size:14px;padding:13px 14px}
.ui-readable #view-dashboard .tag{font-size:12px;padding:5px 9px}
.ui-readable #view-dashboard #recentAudit>div{font-size:14px!important;padding:11px 0!important}
.ui-readable #view-dashboard #recentAudit>div>div{font-size:12.5px!important;margin-top:4px!important}

/* Solicitações e CRM — mesmos tamanhos de leitura */
.ui-readable #view-requests .crm-summary-strip>div,
.ui-readable #view-crm .crm-summary-strip>div{min-width:150px;padding:13px 15px}
.ui-readable #view-requests .crm-summary-strip span,
.ui-readable #view-crm .crm-summary-strip span{font-size:11px}
.ui-readable #view-requests .crm-summary-strip strong,
.ui-readable #view-crm .crm-summary-strip strong{font-size:23px;margin-top:5px}
.ui-readable #view-requests .request-board{grid-auto-columns:minmax(310px,1fr);gap:14px}
.ui-readable #view-crm .crm-board{grid-auto-columns:minmax(290px,1fr);gap:14px}
.ui-readable #view-requests .request-column>header,
.ui-readable #view-crm .crm-stage>header{padding:13px 14px}
.ui-readable #view-requests .request-column>header strong,
.ui-readable #view-crm .crm-stage>header strong{font-size:13px}
.ui-readable #view-requests .request-column>header span,
.ui-readable #view-crm .crm-stage>header span{font-size:11px;min-width:24px;height:24px}
.ui-readable #view-requests .request-column-body,
.ui-readable #view-crm .crm-stage-body{padding:11px;gap:10px}
.ui-readable #view-requests .request-empty,
.ui-readable #view-crm .crm-stage-empty{font-size:12px;padding:20px 14px}
.ui-readable #view-requests .request-card,
.ui-readable #view-crm .crm-card{padding:13px;border-radius:11px}
.ui-readable #view-requests .request-dept,
.ui-readable #view-requests .request-priority{font-size:10px}
.ui-readable #view-requests .request-card>strong{font-size:13px;line-height:1.45}
.ui-readable #view-requests .request-card>p{font-size:12px;line-height:1.55;margin:7px 0 10px}
.ui-readable #view-requests .request-contact{font-size:11.5px;padding-top:9px}
.ui-readable #view-requests .request-owner{font-size:11px}
.ui-readable #view-requests .request-card>time{font-size:10px}
.ui-readable #view-crm .crm-card-head{grid-template-columns:38px 1fr auto;gap:10px}
.ui-readable #view-crm .crm-list-avatar.small{width:38px;height:38px;font-size:11px}
.ui-readable #view-crm .crm-card-head strong{font-size:13px}
.ui-readable #view-crm .crm-card-head span{font-size:10.5px}
.ui-readable #view-crm .crm-card>p{font-size:12px;line-height:1.5;margin:10px 0}
.ui-readable #view-crm .crm-card-tags span{font-size:10.5px;padding:4px 7px}
.ui-readable #view-crm .crm-card>time{font-size:10px}
.ui-readable #view-crm .crm-top-search{font-size:14px;height:42px}

/* Intenções, contatos e arquivos */
.ui-readable #view-intents .intent-filter{font-size:13px;padding:9px 13px}
.ui-readable #view-intents .intent-section-head h3{font-size:19px}
.ui-readable #view-intents .intent-section-head span{font-size:13px}
.ui-readable #view-intents .intent-card{padding:18px 19px}
.ui-readable #view-intents .intent-card-top h3{font-size:17px}
.ui-readable #view-intents .intent-code{font-size:12px}
.ui-readable #view-intents .intent-card p{font-size:14px;line-height:1.55}
.ui-readable #view-intents .intent-card .phrase-count{font-size:13px}
.ui-readable #view-contacts .entity-card,
.ui-readable #view-files .panel,
.ui-readable #view-sessions .panel,
.ui-readable #view-settings .panel{font-size:15px}
.ui-readable #view-contacts .entity-card{padding:18px}
.ui-readable #view-contacts .entity-card h3{font-size:17px}
.ui-readable #view-contacts .entity-card p{font-size:14px;line-height:1.55}
.ui-readable #view-contacts .phrase-count{font-size:13px}
.ui-readable #view-contacts .contact-phone{font-size:19px}
.ui-readable #view-files .table th,
.ui-readable #view-sessions .table th{font-size:12px;padding:12px 14px}
.ui-readable #view-files .table td,
.ui-readable #view-sessions .table td{font-size:14px;padding:13px 14px}
.ui-readable #view-files .file-meta{font-size:13px}

/* Configurações */
.ui-readable #view-settings .panel-head{padding:17px 19px}
.ui-readable #view-settings .panel-head h3{font-size:17px}
.ui-readable #view-settings .panel-body{padding:18px;font-size:15px}
.ui-readable #view-settings .tag{font-size:12px}

/* Flow Studio — maior sem mexer no zoom do navegador */
.ui-readable #view-flows .flow-node{width:302px!important}
.ui-readable #view-flows .flow-node .node-head{grid-template-columns:32px 1fr;gap:11px;padding:12px 13px!important}
.ui-readable #view-flows .flow-node .node-type{width:30px!important;height:30px!important;font-size:14px}
.ui-readable #view-flows .flow-node .node-kicker{font-size:9px}
.ui-readable #view-flows .flow-node .node-title{font-size:14px!important}
.ui-readable #view-flows .flow-node .node-id{font-size:10px!important}
.ui-readable #view-flows .flow-node .node-content{padding:11px 12px 9px}
.ui-readable #view-flows .flow-node .node-footer{font-size:10px;padding:8px 12px}
.ui-readable #view-flows .flow-message-preview{font-size:12px;line-height:1.5;padding:10px 11px}
.ui-readable #view-flows .flow-choice-preview{font-size:11px;padding:7px 8px}
.ui-readable #view-flows .flow-choices-preview>small{font-size:10px}
.ui-readable #view-flows .flow-input-preview span{font-size:11px}
.ui-readable #view-flows .flow-input-preview strong{font-size:10px}
.ui-readable #view-flows .flow-node-special strong{font-size:12px}
.ui-readable #view-flows .flow-node-special small{font-size:10px}
.ui-readable #view-flows .flow-action-pill{font-size:9.5px!important;padding:4px 6px}
.ui-readable #view-flows .flow-condition-preview>div span{font-size:10px}
.ui-readable #view-flows .flow-condition-preview>div strong{font-size:12px}
.ui-readable #view-flows .flow-condition-preview small{font-size:11px}
.ui-readable #view-flows .flow-toolbox{width:320px}
.ui-readable #view-flows .flow-toolbox-head strong{font-size:15px}
.ui-readable #view-flows .flow-toolbox-head span{font-size:11px}
.ui-readable #view-flows .flow-toolbox-search .input{font-size:13px;height:39px}
.ui-readable #view-flows .flow-toolbox-label{font-size:10px}
.ui-readable #view-flows .flow-toolbox-group>button strong{font-size:13px}
.ui-readable #view-flows .flow-toolbox-group>button small{font-size:10.5px}
.ui-readable #view-flows .inspector-head strong{font-size:16px}
.ui-readable #view-flows .section-title{font-size:12.5px}
.ui-readable #view-flows .mini-input,
.ui-readable #view-flows .mini-select{font-size:13.5px;padding:8px 9px}
.ui-readable #view-flows .new-block-template-note strong{font-size:14px}
.ui-readable #view-flows .new-block-template-note span{font-size:11px}

/* Modais abertos a partir dos módulos ampliados */
.ui-readable .modal-head h3{font-size:19px}
.ui-readable .modal-body{font-size:15px}
.ui-readable .modal .field>label{font-size:14px}
.ui-readable .modal .input,
.ui-readable .modal .textarea,
.ui-readable .modal .select{font-size:14px}
.ui-readable .modal .btn{font-size:14px;min-height:40px}

/* Mobile: aumento controlado, sem estourar a largura */
@media(max-width:820px){
  .ui-readable .view.active:not(#view-inbox){font-size:15px}
  .ui-readable .view.active:not(#view-inbox) .page-head h2{font-size:25px}
  .ui-readable #view-requests .request-board,
  .ui-readable #view-crm .crm-board{grid-auto-columns:minmax(280px,86vw)}
  .ui-readable #view-flows .flow-node{width:286px!important}
}

/* ==========================================================
   V4.9 · APROVEITAMENTO TOTAL DA TELA
   Usa o espaço disponível em todos os módulos, EXCETO Conversas.
   ========================================================== */

/* O miolo não fica mais preso em uma "folha" central no desktop. */
body.ui-readable:not(.inbox-view-active) .content{
  width:100%;
  max-width:none;
  margin:0;
  padding:22px 24px 24px;
  min-height:calc(100vh - var(--topbar));
  min-height:calc(100dvh - var(--topbar));
}

/* Cada módulo ocupa a altura útil da janela. */
body.ui-readable:not(.inbox-view-active) .view.active:not(#view-inbox):not(#view-flows){
  width:100%;
  min-height:calc(100vh - var(--topbar) - 46px);
  min-height:calc(100dvh - var(--topbar) - 46px);
}

/* Painel inicial: as duas áreas inferiores crescem até o fim da tela. */
body.ui-readable #view-dashboard.active{
  display:flex;
  flex-direction:column;
}
body.ui-readable #view-dashboard .stats-grid{flex:0 0 auto}
body.ui-readable #view-dashboard .grid-2{
  flex:1 1 auto;
  min-height:0;
  align-items:stretch;
}
body.ui-readable #view-dashboard .grid-2>.panel{
  min-height:420px;
  height:100%;
}
body.ui-readable #view-dashboard .grid-2>.panel .table-wrap,
body.ui-readable #view-dashboard .grid-2>.panel .panel-body{
  min-height:calc(100% - 58px);
}

/* Solicitações e CRM: o Kanban passa a preencher verticalmente a tela. */
body.ui-readable #view-requests.active,
body.ui-readable #view-crm.active{
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - var(--topbar) - 46px);
  min-height:calc(100dvh - var(--topbar) - 46px);
}
body.ui-readable #view-requests .crm-page-head,
body.ui-readable #view-crm .crm-page-head,
body.ui-readable #view-requests .crm-summary-strip,
body.ui-readable #view-crm .crm-summary-strip{flex:0 0 auto}
body.ui-readable #view-requests .request-board,
body.ui-readable #view-crm .crm-board{
  flex:1 1 auto;
  min-height:0;
  width:100%;
  align-items:stretch;
  padding-bottom:0;
}
body.ui-readable #view-requests .request-board{
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-flow:row;
  grid-auto-columns:unset;
  overflow-x:hidden;
}
body.ui-readable #view-crm .crm-board{
  grid-template-columns:repeat(6,minmax(0,1fr));
  grid-auto-flow:row;
  grid-auto-columns:unset;
  overflow-x:hidden;
}
body.ui-readable #view-requests .request-column,
body.ui-readable #view-crm .crm-stage{
  min-height:100%;
  height:100%;
  display:flex;
  flex-direction:column;
}
body.ui-readable #view-requests .request-column-body,
body.ui-readable #view-crm .crm-stage-body{
  flex:1 1 auto;
  min-height:0;
  align-content:flex-start;
}

/* Intenções: mais colunas em monitores largos e largura realmente total. */
body.ui-readable #view-intents.active{
  display:flex;
  flex-direction:column;
}
body.ui-readable #view-intents #intentGrid{width:100%}
body.ui-readable #view-intents .intent-grid{width:100%}
@media(min-width:1500px){
  body.ui-readable #view-intents .intent-grid{grid-template-columns:repeat(4,minmax(260px,1fr))}
}

/* Contatos: ocupa a largura disponível com mais cards quando houver espaço. */
body.ui-readable #view-contacts.active{
  display:flex;
  flex-direction:column;
}
body.ui-readable #view-contacts .entity-grid{
  width:100%;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  align-content:start;
}

/* Arquivos e atendimentos: o painel/tabela cresce até o fundo da janela. */
body.ui-readable #view-files.active,
body.ui-readable #view-sessions.active{
  display:flex;
  flex-direction:column;
}
body.ui-readable #view-files>.panel,
body.ui-readable #view-sessions>.panel{
  flex:1 1 auto;
  min-height:420px;
  display:flex;
  flex-direction:column;
}
body.ui-readable #view-files>.panel>.table-wrap,
body.ui-readable #view-sessions>.panel>.table-wrap{
  flex:1 1 auto;
  width:100%;
}
body.ui-readable #view-files .table,
body.ui-readable #view-sessions .table{width:100%}

/* Configurações: os quatro painéis usam a altura útil, sem ilhas pequenas no topo. */
body.ui-readable #view-settings.active{
  display:flex;
  flex-direction:column;
}
body.ui-readable #view-settings>.grid-2{
  flex:1 1 auto;
  min-height:0;
  align-items:stretch;
}
body.ui-readable #view-settings>.grid-2>div{
  display:grid;
  grid-template-rows:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
  min-height:0;
}
body.ui-readable #view-settings>.grid-2>div>.panel{
  height:100%;
  min-height:260px;
  margin-bottom:0!important;
}

/* Em telas grandes, o dashboard também aproveita melhor a largura. */
@media(min-width:1500px){
  body.ui-readable #view-dashboard .grid-2{
    grid-template-columns:minmax(0,1.45fr) minmax(420px,.55fr);
  }
}

/* Notebook/tablet: mantém o aproveitamento sem espremer colunas. */
@media(max-width:1380px){
  body.ui-readable #view-crm .crm-board{
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:minmax(280px,1fr);
    overflow-x:auto;
  }
  body.ui-readable #view-requests .request-board{
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:minmax(310px,1fr);
    overflow-x:auto;
  }
}

/* Mobile volta ao fluxo natural; nada de altura forçada. */
@media(max-width:820px){
  body.ui-readable:not(.inbox-view-active) .content{
    padding:18px;
    min-height:0;
  }
  body.ui-readable:not(.inbox-view-active) .view.active:not(#view-inbox):not(#view-flows),
  body.ui-readable #view-requests.active,
  body.ui-readable #view-crm.active{
    min-height:0;
  }
  body.ui-readable #view-dashboard .grid-2>.panel,
  body.ui-readable #view-files>.panel,
  body.ui-readable #view-sessions>.panel,
  body.ui-readable #view-settings>.grid-2>div>.panel{
    min-height:0;
    height:auto;
  }
  body.ui-readable #view-settings>.grid-2>div{
    display:block;
  }
  body.ui-readable #view-settings>.grid-2>div>.panel+ .panel{
    margin-top:16px;
  }
}


/* V5.3 · Tela ampla visível no fluxo */
.flow-canvas-controls{gap:0}
.flow-wide-button{min-width:44px;font-size:17px;font-weight:800}
.flow-wide-exit-badge{position:fixed;top:12px;right:12px;z-index:65;display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid #c9d6de;border-radius:999px;background:rgba(255,255,255,.96);box-shadow:0 12px 30px rgba(16,36,48,.14);font-size:12px;font-weight:800;color:#264150;backdrop-filter:blur(10px)}
.flow-wide-exit-badge:hover{background:#fff;color:var(--blue-800)}
.flow-wide #flowWideExitBadge{display:inline-flex!important}
.flow-wide .flow-canvas-controls{left:12px;bottom:12px;z-index:66}
.flow-wide .flow-toolbox{top:14px;right:14px;bottom:14px;height:auto;max-height:none;z-index:66}
.flow-wide .flow-inspector{z-index:66}
.flow-wide .flow-wide-button{background:var(--blue-800);color:#fff}
.flow-wide #view-flows .page-head,.flow-wide .page-head,.flow-wide #topTitle,.flow-wide #topSubtitle{display:none}
@media(max-width:820px){
  .flow-wide-exit-badge{top:10px;right:10px;padding:9px 12px;font-size:11px}
}

/* V5.4 · Tela ampla realmente 100% da viewport
   Corrige a faixa branca inferior: a regra de flow-view-active descontava
   --topbar mesmo depois de a topbar ser escondida no modo amplo. */
body.flow-view-active.flow-wide{
  width:100vw;
  height:100vh;
  height:100dvh;
  overflow:hidden!important;
  background:#f6f8fa;
}
body.flow-view-active.flow-wide .app-shell,
body.flow-view-active.flow-wide .main{
  width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
body.flow-view-active.flow-wide .content{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
}
body.flow-view-active.flow-wide #view-flows,
body.flow-view-active.flow-wide #view-flows .flow-layout,
body.flow-view-active.flow-wide #view-flows .flow-stage-wrap{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
}

/* V5.5 · Interligação visual por arrastar */
.flow-node{overflow:visible!important}
.flow-node .node-head,.flow-node .node-content,.flow-node .node-footer{overflow:hidden}
.flow-connect-handle{
  width:18px;height:18px;border-radius:50%;border:2px solid #9bb3c1;background:#fff;color:#0a719f;
  display:grid;place-items:center;padding:0;cursor:crosshair;z-index:8;box-shadow:0 2px 7px rgba(27,56,72,.13);
  transition:transform .12s ease,background .12s ease,border-color .12s ease,box-shadow .12s ease;
}
.flow-connect-handle:hover,.flow-connect-handle.dragging{transform:scale(1.18);border-color:var(--blue-700);background:#e9f6fb;box-shadow:0 0 0 4px rgba(17,135,197,.12)}
.flow-connect-handle span{font-size:12px;font-weight:900;line-height:1;pointer-events:none}
.flow-input-handle{position:absolute;left:-10px;top:50%;transform:translateY(-50%);width:16px;height:16px;background:#fff;border-color:#aabcc7;cursor:default}
.flow-input-handle::after{content:"";width:5px;height:5px;border-radius:50%;background:#809aa9}
.flow-output-default{position:absolute;right:-10px;top:50%;transform:translateY(-50%)}
.flow-output-default:hover,.flow-output-default.dragging{transform:translateY(-50%) scale(1.18)}
.flow-connect-row{position:relative!important;padding-right:28px!important}
.flow-connect-row>.flow-output-handle{position:absolute;right:-18px;top:50%;transform:translateY(-50%)}
.flow-connect-row>.flow-output-handle:hover,.flow-connect-row>.flow-output-handle.dragging{transform:translateY(-50%) scale(1.18)}
.flow-choice-preview{grid-template-columns:23px minmax(0,1fr)!important}
.flow-choice-preview>em{font-style:normal;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.flow-condition-route{position:relative;display:flex!important;align-items:center;justify-content:space-between;gap:8px;padding-right:24px}
.flow-condition-route>.flow-output-handle{position:absolute;right:-18px;top:50%;transform:translateY(-50%)}
.flow-condition-route>.flow-output-handle:hover,.flow-condition-route>.flow-output-handle.dragging{transform:translateY(-50%) scale(1.18)}
.flow-condition-route small b{color:#33444f}
.flow-node:not(.selected) .flow-choice-preview:nth-of-type(n+5){display:none}
.flow-node.selected .flow-choice-preview{display:grid}
.flow-node:not(.selected) .flow-more-choices{display:block}
.flow-node.selected .flow-more-choices{display:none}
.flow-more-choices{font-size:8.5px;color:#7f8e98;padding:3px 2px 0}
.flow-node.selected .flow-choices-preview{max-height:330px;overflow-y:auto;overflow-x:visible;padding-right:12px;margin-right:-12px;overscroll-behavior:contain}
.flow-node.link-source{box-shadow:0 0 0 3px rgba(17,135,197,.16),0 12px 32px rgba(29,58,75,.13)!important}
.flow-node.link-target{border-color:#149765!important;box-shadow:0 0 0 4px rgba(20,151,101,.14),0 12px 32px rgba(29,58,75,.14)!important}
.flow-node.link-target .flow-input-handle{border-color:#149765;background:#e8f8f1;transform:translateY(-50%) scale(1.3)}
.flow-stage-wrap.is-linking{cursor:crosshair!important}
.flow-stage-wrap.is-linking .flow-node{cursor:crosshair!important}
.flow-line.preview{stroke:var(--blue-700)!important;stroke-width:2.4!important;stroke-dasharray:7 5;opacity:.95}
.flow-line.preview + .flow-port{display:none}
.flow-line{pointer-events:none}
.flow-arrow-head{fill:#9aaeba}
.flow-line.active{stroke:#087fb8}
.flow-line.preview{animation:flowDash .55s linear infinite}
@keyframes flowDash{to{stroke-dashoffset:-12}}

@media(max-width:820px){
  .flow-connect-handle{width:20px;height:20px}
  .flow-input-handle{left:-11px}
  .flow-output-default{right:-11px}
}
/* Conectores precisam sair alguns pixels para fora do cartão. */
.flow-node .node-content{overflow:visible!important}
.flow-node.selected .flow-choices-preview{max-height:none!important;overflow:visible!important;padding-right:0!important;margin-right:0!important}
.flow-link-hint{position:absolute;left:18px;bottom:70px;z-index:9;display:flex;align-items:center;gap:7px;padding:8px 11px;border:1px solid #d6e1e7;border-radius:999px;background:rgba(255,255,255,.93);box-shadow:0 7px 18px rgba(22,48,63,.08);font-size:10.5px;color:#657681;pointer-events:none;backdrop-filter:blur(8px)}
.flow-link-hint span{font-size:13px;color:var(--blue-700);font-weight:900}.flow-link-hint b{color:var(--blue-800)}
.flow-stage-wrap.is-linking~.flow-link-hint{opacity:.35}
.flow-wide .flow-link-hint{left:14px;bottom:66px}
@media(max-width:820px){.flow-link-hint{display:none}}

/* V5.6 · diagnóstico de mídia no editor */
.media-file-status{margin-top:7px;padding:8px 9px;border-radius:8px;font-size:11px;line-height:1.45;border:1px solid #dce6eb;background:#f7fafb;color:#5b6d78}
.media-file-status.ok{background:#f0faf5;border-color:#cfe9dc;color:#28724e}
.media-file-status.error{background:#fff4f2;border-color:#efc9c2;color:#a13d31}

/* V5.7 · Equipe e acessos */
.team-list{display:flex;flex-direction:column;gap:9px}
.team-user-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#fff}
.team-user-row.inactive{opacity:.68;background:#f8fafb}
.team-user-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--blue-100);color:var(--blue-800);font-weight:800;font-size:14px}
.team-user-main{min-width:0}.team-user-main strong{display:block;font-size:13px;color:#24343f}.team-user-main span{display:block;margin-top:3px;color:#7a8893;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.team-user-main small{display:block;margin-top:3px;color:#8998a2;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-user-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.team-access-note{margin-top:4px;padding:12px 13px;border:1px solid #d7e5ec;border-radius:9px;background:#f4f9fb}.team-access-note strong{display:block;font-size:12px;color:#24404f}.team-access-note span{display:block;margin-top:4px;font-size:11px;line-height:1.55;color:#687984}
@media(max-width:900px){.team-user-row{grid-template-columns:42px minmax(0,1fr) auto}.team-user-actions{grid-column:2/-1;justify-content:flex-start}}
@media(max-width:560px){.team-user-row{grid-template-columns:38px minmax(0,1fr)}.team-user-avatar{width:38px;height:38px}.team-user-row>.tag{grid-column:2}.team-user-actions{grid-column:1/-1}.team-user-actions .btn{flex:1}}

/* V5.8 · adicionar contato direto pelas Conversas */
.crm-list-head-actions{display:flex;align-items:center;gap:7px}
.crm-new-contact-btn{height:34px;padding:0 10px;border:1px solid #cbd9e1;background:#fff;border-radius:8px;color:var(--blue-800);font-size:11px;font-weight:800;white-space:nowrap}
.crm-new-contact-btn:hover{background:#edf7fb;border-color:#b7d4e2}
.crm-new-contact-note{display:flex;flex-direction:column;gap:5px;padding:12px 13px;margin-bottom:14px;border:1px solid #d7e4ea;border-radius:10px;background:#f5fafc}
.crm-new-contact-note strong{font-size:13px;color:#1e3442}
.crm-new-contact-note span{font-size:11.5px;line-height:1.55;color:#687985}
.crm-new-contact-help{margin-top:-8px;margin-bottom:14px}
.optional{font-weight:500;color:#8a98a2;font-size:10px}
@media(max-width:820px){.crm-new-contact-btn{padding:0 9px;font-size:0}.crm-new-contact-btn::after{content:'+';font-size:20px;line-height:1}.crm-list-head{padding-right:10px}}

/* V6.0 · notificações push e central de alertas */
.notification-shell{position:relative;display:flex;align-items:center}
.notification-bell{position:relative;width:38px;height:38px;border:1px solid var(--line);border-radius:999px;background:#fff;display:grid;place-items:center;font-size:16px;cursor:pointer;color:#29414f;transition:.15s ease}
.notification-bell:hover{background:#f2f7f9;border-color:#c5d4dc}
.notification-badge{position:absolute;right:-3px;top:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#d84c3f;color:#fff;font-size:10px;font-weight:800;display:flex;align-items:center;justify-content:center;border:2px solid #fff}
.notification-panel{position:absolute;right:0;top:48px;width:min(390px,calc(100vw - 24px));max-height:min(620px,calc(100vh - 90px));background:#fff;border:1px solid #d7e1e6;border-radius:14px;box-shadow:0 20px 50px rgba(17,39,52,.18);z-index:90;overflow:hidden}
.notification-panel[hidden]{display:none!important}
.notification-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 15px;border-bottom:1px solid var(--line);background:#fbfcfd}
.notification-panel-head strong{display:block;font-size:14px;color:#1d2c36}
.notification-panel-head span{display:block;margin-top:2px;font-size:11px;color:#7c8992}
.notification-list{max-height:470px;overflow:auto}
.notification-item{width:100%;display:flex;align-items:flex-start;gap:10px;padding:13px 14px;border:0;border-bottom:1px solid #edf1f3;background:#fff;text-align:left;cursor:pointer}
.notification-item:hover{background:#f6fafb}
.notification-item.unread{background:#f1f8fb}
.notification-item-dot{width:8px;height:8px;border-radius:50%;background:#b9c7ce;margin-top:6px;flex:0 0 auto}
.notification-item.unread .notification-item-dot{background:var(--blue-600)}
.notification-item-copy{min-width:0;display:block}
.notification-item-copy strong{display:block;font-size:12px;line-height:1.35;color:#1f303a}
.notification-item-copy span{display:block;margin-top:4px;font-size:11px;line-height:1.45;color:#5f6f7a;white-space:normal;word-break:break-word}
.notification-item-copy small{display:block;margin-top:6px;font-size:10px;color:#8a969e}
.notification-panel-foot{padding:10px 12px;background:#fbfcfd;border-top:1px solid var(--line);display:flex;justify-content:flex-end}
.notification-empty{padding:32px 18px;text-align:center}
.notification-empty strong{display:block;font-size:13px;color:#30414b}
.notification-empty span{display:block;margin-top:5px;font-size:11px;line-height:1.45;color:#84919a}
.notification-device-card{border:1px solid #d8e2e7;border-radius:12px;padding:14px;background:#fafcfd}
.notification-device-card.active{border-color:#a9d9c5;background:#f4fbf8}
.notification-device-card>div:first-child strong{display:block;font-size:13px;color:#24343e}
.notification-device-card>div:first-child span{display:block;margin-top:4px;font-size:11px;line-height:1.5;color:#687984}
.notification-device-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.notification-permission-help,.notification-config-warning{margin-top:10px;padding:11px 12px;border-radius:9px;background:#fff7e7;border:1px solid #f0d9aa;color:#6b5731;font-size:11px;line-height:1.5}
.notification-config-warning strong,.notification-config-warning span{display:block}.notification-config-warning span{margin-top:4px}
.notification-pref-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}
.notification-check{display:flex;align-items:flex-start;gap:9px;border:1px solid #dfe7eb;border-radius:10px;padding:10px;background:#fff;cursor:pointer}
.notification-check input{margin-top:3px;accent-color:var(--blue-600)}
.notification-check strong{display:block;font-size:11.5px;color:#293a44}
.notification-check small{display:block;margin-top:3px;font-size:10px;line-height:1.4;color:#7a8790;font-weight:400}
.notification-repeat-field{margin-top:13px}
.notification-minutes{display:flex;align-items:center;gap:8px}.notification-minutes .input{max-width:100px}.notification-minutes span{font-size:11px;color:#75828b}
@media(max-width:820px){
  .notification-panel{position:fixed;right:10px;left:10px;top:64px;width:auto;max-height:calc(100dvh - 74px)}
  .notification-pref-grid{grid-template-columns:1fr}
  .notification-bell{width:36px;height:36px}
}

/* V6.6 — recuperação de senha */
.recovery-page{min-height:100dvh;background:#073f60;background-image:linear-gradient(rgba(96,178,217,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(96,178,217,.08) 1px,transparent 1px),radial-gradient(circle at 82% 18%,rgba(25,125,175,.35),transparent 35%);background-size:64px 64px,64px 64px,auto}.recovery-shell{min-height:100dvh;display:grid;place-items:center;padding:30px 18px}.recovery-card{width:min(620px,100%);background:rgba(6,50,76,.74);border:1px solid rgba(129,200,234,.24);box-shadow:0 24px 80px rgba(0,20,33,.28);backdrop-filter:blur(8px);border-radius:24px;padding:34px}.recovery-brand{display:inline-flex;align-items:flex-end;gap:18px;text-decoration:none;color:#fff}.recovery-brand img{width:250px;max-width:70vw;height:auto;display:block}.recovery-brand span{font-size:20px;letter-spacing:8px;font-weight:700;margin-bottom:7px}.recovery-copy{margin-top:34px}.recovery-kicker{display:block;font-size:11px;letter-spacing:2.2px;font-weight:700;color:#8ed8fa;margin-bottom:10px}.recovery-copy h1{margin:0;color:#fff;font-size:36px;line-height:1.12;letter-spacing:-.025em}.recovery-copy p{margin:13px 0 0;color:rgba(231,246,252,.78);font-size:15px;line-height:1.65;max-width:530px}.recovery-copy p strong{color:#fff}.recovery-field{display:block;margin-top:22px}.recovery-field>span{display:block;color:#d9edf6;font-size:12px;font-weight:700;margin-bottom:8px}.recovery-field input{width:100%;height:54px;border:1px solid rgba(117,190,224,.42);border-radius:12px;background:rgba(2,44,68,.56);color:#fff;padding:0 15px;outline:none;font:inherit;box-sizing:border-box}.recovery-field input::placeholder{color:rgba(188,220,235,.50)}.recovery-field input:focus{border-color:#7cd3fb;box-shadow:0 0 0 3px rgba(74,184,235,.13)}.recovery-submit{width:100%;height:54px;margin-top:20px;border:0;border-radius:12px;background:#fff;color:#073f60;font-size:15px;font-weight:800;cursor:pointer}.recovery-submit:hover{background:#f2f9fc}.recovery-submit:disabled{opacity:.65;cursor:wait}.recovery-security-note,.password-policy{margin-top:22px;padding:15px 16px;border:1px solid rgba(129,200,234,.18);border-radius:12px;background:rgba(5,48,72,.34);display:flex;flex-direction:column;gap:5px}.recovery-security-note strong,.password-policy strong{font-size:12px;color:#e9f7fd}.recovery-security-note span,.password-policy span{font-size:12px;line-height:1.55;color:rgba(201,229,242,.66)}.recovery-back{display:inline-block;margin-top:22px;color:#d8effa;font-size:13px;text-decoration:none}.recovery-back:hover{text-decoration:underline}.recovery-success,.recovery-invalid{margin-top:24px;border-radius:14px;padding:18px;display:flex;align-items:flex-start;gap:14px}.recovery-success{background:rgba(19,133,105,.16);border:1px solid rgba(74,214,173,.30);color:#eafff8}.recovery-invalid{display:block;background:rgba(174,73,73,.15);border:1px solid rgba(255,141,141,.28);color:#fff}.recovery-success-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#1ea97c;color:#fff;font-weight:800;flex:0 0 auto}.recovery-success strong,.recovery-invalid strong{display:block;font-size:15px}.recovery-success p,.recovery-invalid p{margin:5px 0 0;font-size:13px;line-height:1.55;color:rgba(227,246,252,.75)}.recovery-success a,.recovery-invalid a{display:inline-block;margin-top:10px;color:#fff;font-weight:700;font-size:13px}.recovery-page .error-box{margin-top:18px}.hidden{display:none!important}
@media(max-width:700px){.login-access-row{flex-direction:column;gap:12px}.login-forgot{margin-left:32px}.recovery-card{padding:26px 20px;border-radius:18px}.recovery-brand{gap:10px}.recovery-brand img{width:205px}.recovery-brand span{font-size:15px;letter-spacing:5px;margin-bottom:5px}.recovery-copy{margin-top:26px}.recovery-copy h1{font-size:30px}}


/* V6.9 — Painel inicial com identidade real dos contatos */
.dashboard-session-table .dashboard-contact-row{cursor:pointer;transition:background .14s ease}
.dashboard-session-table .dashboard-contact-row:hover{background:#f6fafc}
.dashboard-session-table .dashboard-contact-row:focus{outline:2px solid rgba(17,135,197,.25);outline-offset:-2px}
.dashboard-contact-cell{display:flex;align-items:center;gap:12px;min-width:250px}
.dashboard-contact-avatar{position:relative;width:42px;height:42px;border-radius:50%;overflow:hidden;display:grid;place-items:center;flex:0 0 42px;background:#eaf5fb;color:#0a6f9f;font-size:12px;font-weight:800;border:1px solid #d7e8f1}
.dashboard-contact-avatar span{position:relative;z-index:1}
.dashboard-contact-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:2;background:#eaf5fb}
.dashboard-contact-copy{min-width:0}
.dashboard-contact-copy strong{display:block;color:#172b38;font-size:14px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}
.dashboard-contact-phone{font-size:12px;color:#677985;margin-top:3px;font-weight:600}
.dashboard-contact-preview{font-size:11px;color:#94a1aa;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:340px}
.dashboard-node-title{display:block;color:#344a58;font-size:13px;line-height:1.25;max-width:240px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1100px){.dashboard-contact-preview{display:none}.dashboard-contact-copy strong{max-width:220px}.dashboard-node-title{max-width:170px}}
@media(max-width:820px){.dashboard-contact-cell{min-width:210px}.dashboard-contact-avatar{width:36px;height:36px;flex-basis:36px}.dashboard-contact-copy strong{max-width:170px}}

/* ==========================================================
   V7.0 · DASHBOARD OPERACIONAL CLARO
   Visão simples inspirada em centrais de atendimento, sem
   transformar o painel em uma tela cheia de números soltos.
   ========================================================== */
.dashboard-page-head{align-items:center;gap:18px;margin-bottom:16px}
.dashboard-page-head>div:first-child{min-width:0}
.dashboard-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.dashboard-period{display:inline-flex;align-items:center;padding:3px;border:1px solid #d6e1e7;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(22,53,70,.03)}
.dashboard-period button{border:0;background:transparent;color:#657784;font:inherit;font-size:12px;font-weight:750;min-height:34px;padding:0 12px;border-radius:7px;cursor:pointer}
.dashboard-period button:hover{background:#f2f7fa;color:#164f6d}
.dashboard-period button.active{background:#0d76aa;color:#fff;box-shadow:0 2px 7px rgba(13,118,170,.18)}

.dashboard-main-stats{margin-bottom:10px}
.dashboard-stat-card{position:relative;overflow:hidden;min-height:108px;padding:16px 18px}
.dashboard-stat-card::after{content:"";position:absolute;right:-26px;bottom:-40px;width:96px;height:96px;border-radius:50%;border:18px solid rgba(20,132,185,.035);pointer-events:none}
.dashboard-stat-card.is-attention{border-color:#efcf9c;background:linear-gradient(180deg,#fff 0%,#fffaf3 100%)}
.dashboard-stat-card.is-attention::after{border-color:rgba(218,139,22,.055)}
.dashboard-stat-card .stat-value{font-size:28px;margin:9px 0 1px}
.dashboard-stat-card .stat-meta{font-size:11.5px}

.dashboard-mini-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;background:#fff;margin-bottom:16px;overflow:hidden}
.dashboard-mini-item{min-width:0;padding:12px 15px;border-right:1px solid #e9eef1;display:grid;grid-template-columns:1fr auto;grid-template-areas:"label value" "meta value";column-gap:12px;align-items:center}
.dashboard-mini-item:last-child{border-right:0}
.dashboard-mini-item span{grid-area:label;font-size:11px;font-weight:750;color:#647682}
.dashboard-mini-item strong{grid-area:value;font-size:20px;line-height:1;color:#183849;letter-spacing:-.03em}
.dashboard-mini-item small{grid-area:meta;font-size:10px;color:#97a3ab;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.dashboard-analytics-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(330px,.75fr);gap:16px;margin-bottom:16px}
.dashboard-secondary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:16px}
.dashboard-analytics-panel,.dashboard-compact-panel{min-width:0}
.dashboard-panel-head{align-items:flex-start}
.dashboard-panel-head h3{font-size:14px}
.dashboard-panel-head p,.dashboard-panel-note{font-size:10.5px;line-height:1.35;color:#8897a1;margin:3px 0 0;font-weight:500}
.dashboard-analytics-panel .panel-body{min-height:218px;display:flex;align-items:center}
.dashboard-compact-panel .panel-body{min-height:210px}
.dashboard-empty-small{width:100%;text-align:center;color:#8998a2;font-size:12px;padding:30px 12px}

.dashboard-timeline{width:100%;min-width:0}
.dashboard-bars{height:164px;display:flex;align-items:flex-end;gap:7px;width:100%;padding:8px 2px 0}
.dashboard-bar-item{height:100%;min-width:0;flex:1;display:grid;grid-template-rows:minmax(0,1fr) 18px 17px;align-items:end;text-align:center}
.dashboard-bar-track{height:100%;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid #e7edf1}
.dashboard-bar-track span{display:block;width:min(24px,66%);min-height:3px;border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#2b9dcc,#0d79ae);box-shadow:0 2px 5px rgba(13,121,174,.12);transition:height .2s ease}
.dashboard-bar-item strong{font-size:10px;color:#4f6876;font-weight:800;line-height:18px}
.dashboard-bar-item small{font-size:9.5px;color:#9aa5ac;line-height:17px;white-space:nowrap}

.dashboard-mix-total{display:flex;justify-content:space-between;align-items:flex-end;width:100%;margin-bottom:14px}
.dashboard-mix-total span{font-size:11px;color:#7f8e98;font-weight:650}
.dashboard-mix-total strong{font-size:25px;color:#183849;line-height:1}
.dashboard-mix-bar{width:100%;height:12px;border-radius:999px;overflow:hidden;background:#eef3f6;display:flex;margin-bottom:18px}
.dashboard-mix-bar span{height:100%;display:block;min-width:0}
.dashboard-mix-bot{background:#1493c5}
.dashboard-mix-human{background:#284d68}
.dashboard-mix-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
.dashboard-mix-grid>div{display:flex;align-items:flex-start;gap:9px;border:1px solid #e4ebef;border-radius:10px;padding:11px;background:#fbfcfd;min-width:0}
.dashboard-dot{width:9px;height:9px;border-radius:50%;margin-top:4px;flex:0 0 auto}.dashboard-dot.bot{background:#1493c5}.dashboard-dot.human{background:#284d68}
.dashboard-mix-grid strong{display:block;font-size:19px;line-height:1;color:#183849}
.dashboard-mix-grid small{display:block;font-size:10.5px;color:#617783;font-weight:750;margin-top:4px}
.dashboard-mix-grid em{display:block;font-size:9.5px;color:#98a4ab;font-style:normal;margin-top:2px}
.dashboard-mix-note{font-size:9.5px;color:#9aa6ad;margin-top:11px;text-align:center;width:100%}

.dashboard-ranking{display:flex;flex-direction:column;gap:13px}
.dashboard-rank-row{min-width:0}
.dashboard-rank-copy{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:7px;margin-bottom:6px}
.dashboard-rank-copy>span{width:20px;height:20px;border-radius:6px;display:grid;place-items:center;background:#eef6fa;color:#3f738e;font-size:9px;font-weight:850}
.dashboard-rank-copy strong{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11.5px;color:#304b5b}
.dashboard-rank-copy b{font-size:11px;color:#728590}
.dashboard-rank-track{height:5px;border-radius:999px;background:#eff3f5;overflow:hidden;margin-left:27px}
.dashboard-rank-track i{display:block;height:100%;border-radius:999px;background:#5ca8c9}

.dashboard-storage-total{padding:2px 0 14px;border-bottom:1px solid #edf1f3;margin-bottom:10px}
.dashboard-storage-total span{display:block;font-size:10.5px;color:#81909a}
.dashboard-storage-total strong{display:block;font-size:24px;line-height:1.2;color:#173b4f;margin-top:4px}
.dashboard-storage-total small{font-size:10px;color:#9aa5ad}
.dashboard-storage-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.dashboard-storage-list>div{border:1px solid #e7edf0;border-radius:9px;padding:9px 10px;background:#fbfcfd;min-width:0}
.dashboard-storage-list span{display:block;font-size:9.5px;color:#7b8c97}
.dashboard-storage-list strong{display:block;font-size:12.5px;color:#315266;margin-top:2px}
.dashboard-storage-list small{display:block;font-size:9px;color:#a0abb1;margin-top:2px}

.dashboard-audit-row{padding:10px 0;border-bottom:1px solid #edf1f3}
.dashboard-audit-row:first-child{padding-top:0}.dashboard-audit-row:last-child{border-bottom:0;padding-bottom:0}
.dashboard-audit-row strong{display:block;font-size:11.5px;color:#273f4d}
.dashboard-audit-row span{display:block;font-size:10.5px;color:#7a8995;margin-top:2px}
.dashboard-audit-row small{display:block;font-size:9.5px;color:#a0a9af;margin-top:3px}
.dashboard-lower-grid{margin-top:0}
body.ui-readable #view-dashboard .dashboard-lower-grid{flex:1 1 auto;min-height:0}
body.ui-readable #view-dashboard .dashboard-analytics-grid,
body.ui-readable #view-dashboard .dashboard-secondary-grid,
body.ui-readable #view-dashboard .dashboard-mini-strip{flex:0 0 auto}

@media(max-width:1280px){
  .dashboard-secondary-grid{grid-template-columns:1fr 1fr}
  .dashboard-secondary-grid>.panel:last-child{grid-column:1/-1}
  .dashboard-storage-list{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:1100px){
  .dashboard-analytics-grid{grid-template-columns:1fr}
  .dashboard-mini-strip{grid-template-columns:1fr 1fr}
  .dashboard-mini-item:nth-child(2){border-right:0}
  .dashboard-mini-item:nth-child(-n+2){border-bottom:1px solid #e9eef1}
}
@media(max-width:820px){
  .dashboard-page-head{align-items:flex-start}
  .dashboard-head-actions{width:100%;justify-content:space-between}
  .dashboard-period{flex:1;display:grid;grid-template-columns:repeat(3,1fr)}
  .dashboard-period button{padding:0 8px}
  .dashboard-secondary-grid{grid-template-columns:1fr}
  .dashboard-secondary-grid>.panel:last-child{grid-column:auto}
  .dashboard-storage-list{grid-template-columns:1fr 1fr}
  .dashboard-bars{gap:3px}.dashboard-bar-track span{width:70%}
  .dashboard-mix-grid{grid-template-columns:1fr}
  body.ui-readable #view-dashboard .dashboard-lower-grid>.panel{min-height:0;height:auto}
}
@media(max-width:520px){
  .dashboard-mini-strip{grid-template-columns:1fr}
  .dashboard-mini-item{border-right:0!important;border-bottom:1px solid #e9eef1!important}
  .dashboard-mini-item:last-child{border-bottom:0!important}
  .dashboard-head-actions{align-items:stretch}.dashboard-head-actions>.btn{min-width:88px}
  .dashboard-storage-list{grid-template-columns:1fr 1fr}
}
.dashboard-analytics-panel .panel-body{flex-direction:column;justify-content:center}

/* V7.4 — ajuda didática da tela de reconhecimento */
.page-title-with-help{display:flex;align-items:center;gap:9px}.page-title-with-help h2{margin:0}.intent-help-btn{width:28px;height:28px;border:1px solid #c9d8e1;border-radius:50%;background:#fff;color:var(--blue-800);font-size:15px;font-weight:850;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s,border-color .15s,transform .15s}.intent-help-btn:hover{background:#edf7fb;border-color:#8ebfd4;transform:translateY(-1px)}.intent-help-btn:focus-visible{outline:3px solid rgba(22,133,183,.18);outline-offset:2px}
.intent-help-intro{display:flex;flex-direction:column;gap:5px;padding:14px 15px;border:1px solid #d8e4ea;border-radius:10px;background:#f8fbfc;color:#40515e;line-height:1.5}.intent-help-intro strong{color:#142735;font-size:15px}.intent-help-steps{display:grid;gap:10px;margin-top:14px}.intent-help-step{display:grid;grid-template-columns:34px minmax(0,1fr);gap:11px;align-items:flex-start;padding:13px 14px;border:1px solid #e0e7eb;border-radius:10px;background:#fff}.intent-help-number{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#e5f3f9;color:#0d6e9b;font-weight:850}.intent-help-step strong{display:block;color:#172a37;margin:1px 0 4px}.intent-help-step p{margin:0;color:#637581;line-height:1.45}.intent-help-example{margin-top:14px;padding:14px 15px;border:1px solid #cfe2eb;border-radius:10px;background:#f3f9fc}.intent-help-example-title{font-size:13px;font-weight:850;color:#234252;margin-bottom:11px}.intent-help-flow{display:flex;align-items:center;justify-content:space-between;gap:8px}.intent-help-flow>span:not(.intent-help-arrow){flex:1;padding:10px;border-radius:8px;background:#fff;border:1px solid #dde9ee;text-align:center;color:#60727e;line-height:1.4}.intent-help-flow b{color:#183241}.intent-help-arrow{color:#4b9dbc;font-size:20px;font-weight:900;flex:0 0 auto}.intent-help-fields{margin-top:16px}.intent-help-fields h4{margin:0 0 9px;font-size:14px;color:#172a37}.intent-help-fields>div{display:grid;grid-template-columns:180px minmax(0,1fr);gap:12px;padding:9px 0;border-top:1px solid #edf1f3}.intent-help-fields strong{color:#304855}.intent-help-fields span{color:#6a7c87;line-height:1.4}.intent-help-tip{margin-top:14px;padding:12px 14px;border-left:3px solid #2995bf;background:#f7fafb;border-radius:0 8px 8px 0;color:#536773;line-height:1.5}.intent-help-tip strong{color:#213a48}
@media(max-width:650px){.intent-help-flow{flex-direction:column;align-items:stretch}.intent-help-arrow{transform:rotate(90deg);text-align:center}.intent-help-fields>div{grid-template-columns:1fr;gap:3px}.intent-help-btn{width:30px;height:30px}}

/* V7.5 — perfis independentes de fluxo */
.flow-profile-dock{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 10px;padding:10px 12px;border:1px solid #d7e2e8;border-radius:11px;background:#fff;box-shadow:0 2px 8px rgba(30,64,82,.04);min-height:58px}
.flow-profile-main{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.flow-profile-label{display:flex;flex-direction:column;gap:1px;min-width:130px}.flow-profile-label span{font-size:9.5px;text-transform:uppercase;letter-spacing:.08em;color:#82929c;font-weight:800}.flow-profile-label strong{font-size:12.5px;color:#213e4e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.flow-profile-select{width:min(300px,34vw);min-width:190px;height:36px;font-size:11.5px}.flow-profile-status{display:inline-flex;align-items:center;min-height:25px;padding:0 9px;border-radius:999px;background:#f2f5f7;color:#74848e;font-size:9px;font-weight:850;letter-spacing:.04em;white-space:nowrap}.flow-profile-status.active{background:#e6f6ef;color:#087b51}.flow-profile-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}.flow-profile-actions .btn{white-space:nowrap}.flow-profile-actions .btn:disabled{opacity:.58;cursor:not-allowed}
.flow-profile-explain{display:flex;flex-direction:column;gap:5px;padding:13px 14px;margin-bottom:15px;border:1px solid #d6e5ec;border-radius:10px;background:#f6fafc;color:#5e7380;line-height:1.45}.flow-profile-explain strong{color:#17384a;font-size:13px}.flow-profile-explain b{color:#176f98}
.intent-profile-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 12px;margin:-2px 0 12px;border:1px solid #dbe5ea;border-radius:10px;background:#fff}.intent-profile-bar>div{display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap}.intent-profile-bar span{font-size:10.5px;color:#71838e}.intent-profile-bar strong{font-size:11.5px;color:#233f4f}.intent-profile-bar em{font-style:normal;font-size:9px;font-weight:800;color:#617681;background:#f0f4f6;border-radius:999px;padding:4px 8px}.intent-profile-bar select{width:260px;height:34px;font-size:11px}
body.flow-view-active .flow-layout{height:calc(100vh - 199px);height:calc(100dvh - 199px)}
.flow-wide .flow-profile-dock{position:absolute;z-index:120;top:8px;left:72px;right:132px;margin:0;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);box-shadow:0 5px 18px rgba(24,57,75,.12)}
.flow-wide #view-flows{position:relative}.flow-wide .flow-layout{height:100%}.flow-wide .flow-stage-wrap{padding-top:0}
@media(max-width:1200px){.flow-profile-dock{align-items:flex-start}.flow-profile-main{flex-wrap:wrap}.flow-profile-actions{max-width:430px}.flow-profile-status{order:3}.flow-profile-select{width:270px}.flow-wide .flow-profile-dock{left:64px;right:108px}}
@media(max-width:820px){.flow-profile-dock{flex-direction:column;align-items:stretch;padding:10px}.flow-profile-main{display:grid;grid-template-columns:1fr auto}.flow-profile-label{grid-column:1/-1}.flow-profile-select{width:100%;min-width:0}.flow-profile-status{justify-self:end}.flow-profile-actions{max-width:none;display:grid;grid-template-columns:repeat(2,1fr)}.flow-profile-actions .btn:last-child{grid-column:1/-1}.intent-profile-bar{align-items:stretch;flex-direction:column}.intent-profile-bar select{width:100%}body.flow-view-active .flow-layout{height:calc(100vh - 280px);height:calc(100dvh - 280px)}.flow-wide .flow-profile-dock{position:relative;top:auto;left:auto;right:auto;margin:6px}.flow-wide .flow-layout{height:calc(100vh - 160px);height:calc(100dvh - 160px)}}


/* V7.6 · Tela ampla estabilizada
   - reserva uma linha real para o seletor de perfis (não sobrepõe o canvas)
   - remove conflitos das regras antigas de tela ampla
   - mantém o editor preso à viewport e o inspector dentro da área útil */
body.flow-view-active.flow-wide #view-flows{
  position:absolute!important;
  inset:0!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#f6f8fa!important;
}
body.flow-view-active.flow-wide #view-flows .flow-profile-dock{
  position:relative!important;
  inset:auto!important;
  grid-row:1!important;
  width:auto!important;
  min-height:52px!important;
  margin:8px 148px 6px 8px!important;
  z-index:120!important;
  flex:0 0 auto!important;
}
body.flow-view-active.flow-wide #view-flows .flow-layout{
  position:relative!important;
  inset:auto!important;
  grid-row:2!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
}
body.flow-view-active.flow-wide #view-flows .flow-stage-wrap{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
}
body.flow-view-active.flow-wide #flowWideExitBadge{
  position:fixed!important;
  top:13px!important;
  right:12px!important;
  z-index:140!important;
  display:inline-flex!important;
}
body.flow-view-active.flow-wide .flow-inspector{
  top:10px!important;
  right:10px!important;
  bottom:10px!important;
  max-height:none!important;
}
body.flow-view-active.flow-wide .flow-toolbox{
  top:10px!important;
  right:10px!important;
  bottom:10px!important;
  max-height:none!important;
}

@media(max-width:1200px){
  body.flow-view-active.flow-wide #view-flows .flow-profile-dock{
    margin-right:132px!important;
  }
}
@media(max-width:820px){
  body.flow-view-active.flow-wide #view-flows{
    grid-template-rows:auto minmax(0,1fr)!important;
  }
  body.flow-view-active.flow-wide #view-flows .flow-profile-dock{
    position:relative!important;
    inset:auto!important;
    margin:6px 6px 4px!important;
    max-height:42vh!important;
    overflow:auto!important;
  }
  body.flow-view-active.flow-wide #view-flows .flow-layout{
    height:100%!important;
    min-height:0!important;
  }
  body.flow-view-active.flow-wide #flowWideExitBadge{
    top:auto!important;
    right:10px!important;
    bottom:10px!important;
  }
}


/* V7.7 · acabamento dos perfis + tela ampla sem estado fantasma + arte oficial no login */
/* Login: usa o SVG enviado pela Maresias como peça principal do lado direito. */
.flow-visual{
  position:relative;
  width:min(100%,660px);
  max-width:660px;
  min-height:540px;
  display:flex;
  align-items:center;
  justify-content:center;
  justify-self:end;
  opacity:1;
  filter:none;
  isolation:isolate;
}
.flow-visual::before{
  content:"";
  position:absolute;
  width:86%;
  aspect-ratio:1;
  border-radius:50%;
  background:radial-gradient(circle,rgba(64,182,235,.17) 0%,rgba(18,112,158,.08) 48%,transparent 72%);
  border:1px solid rgba(119,211,250,.10);
  box-shadow:0 0 90px rgba(14,107,153,.10);
  z-index:-2;
}
.login-art-halo{
  position:absolute;
  inset:13% 7% 9%;
  border-radius:44% 56% 51% 49% / 52% 45% 55% 48%;
  background:linear-gradient(145deg,rgba(70,181,229,.08),rgba(4,55,85,.02));
  filter:blur(1px);
  z-index:-1;
}
.login-flow-art{
  display:block;
  width:100%;
  height:auto;
  max-height:700px;
  object-fit:contain;
  object-position:center;
  user-select:none;
  pointer-events:none;
  filter:drop-shadow(0 26px 42px rgba(0,24,42,.24));
  transform:translateY(6px);
}
@media(max-width:1180px){
  .flow-visual{max-width:530px;min-height:470px}
  .login-flow-art{max-height:590px}
}
@media(max-width:900px){.flow-visual{display:none!important}}

/* Perfis: uma única fonte de verdade para o nome; sem repetir o nome fora do seletor. */
.flow-profile-dock{gap:12px;min-width:0}
.flow-profile-main{flex:1 1 auto;min-width:0;flex-wrap:nowrap!important}
.flow-profile-label{min-width:auto!important;flex:0 0 auto}
.flow-profile-label strong{display:none!important}
.flow-profile-select{
  flex:1 1 360px;
  width:clamp(260px,31vw,480px)!important;
  min-width:260px!important;
  max-width:480px;
  height:38px;
  padding-right:36px;
  font-size:12px;
  font-weight:650;
  text-overflow:ellipsis;
}
.flow-profile-status{flex:0 0 auto}
.flow-profile-actions{flex:0 0 auto;flex-wrap:nowrap}
.flow-profile-wide-exit{border-color:#c4d5de!important;background:#f8fbfc!important}

/* O antigo botão flutuante nunca mais deve aparecer, mesmo com CSS antigo em cache. */
#flowWideExitBadge,.flow-wide-exit-badge{display:none!important;visibility:hidden!important;pointer-events:none!important}

/* Tela ampla: dock é uma linha normal do layout; nada fica solto/absoluto por cima. */
body.flow-view-active.flow-wide{overflow:hidden!important}
body.flow-view-active.flow-wide #view-flows{
  position:fixed!important;
  inset:0!important;
  z-index:50!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:0!important;
  background:#f6f8fa!important;
}
body.flow-view-active.flow-wide #view-flows .flow-profile-dock{
  position:relative!important;
  inset:auto!important;
  grid-row:1!important;
  width:auto!important;
  min-width:0!important;
  min-height:54px!important;
  margin:7px 8px 6px!important;
  padding:8px 10px!important;
  z-index:120!important;
  box-shadow:0 4px 16px rgba(24,57,75,.10)!important;
}
body.flow-view-active.flow-wide #view-flows .flow-layout{
  grid-row:2!important;
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  overflow:hidden!important;
}
body.flow-view-active.flow-wide #view-flows .flow-stage-wrap{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
}
@media(max-width:1200px){
  .flow-profile-select{width:clamp(250px,34vw,390px)!important;min-width:250px!important}
  .flow-profile-actions{gap:5px}
}
@media(max-width:900px){
  .flow-profile-dock{align-items:stretch!important;flex-direction:column!important}
  .flow-profile-main{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important}
  .flow-profile-label{grid-column:auto!important}
  .flow-profile-select{width:100%!important;min-width:0!important;max-width:none!important}
  .flow-profile-actions{width:100%;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));flex:none!important}
  .flow-profile-actions .btn{width:100%}
  .flow-profile-actions .flow-profile-wide-exit,.flow-profile-actions .btn-primary{grid-column:1/-1}
  body.flow-view-active.flow-wide #view-flows .flow-profile-dock{max-height:38vh!important;overflow:auto!important}
}

/* V8.0 · hub/login grande sem invadir a coluna de texto + perfil compacto */
.flow-profile-dock{
  min-height:58px!important;
}
.flow-profile-select{
  height:38px!important;
  min-height:38px!important;
  padding:0 38px 0 12px!important;
  line-height:1.2!important;
  font-family:"Segoe UI",Arial,sans-serif!important;
  font-size:11px!important;
  font-weight:600!important;
  letter-spacing:0!important;
  vertical-align:middle!important;
  overflow:visible!important;
  text-rendering:auto!important;
}
.flow-profile-select option{
  font-family:"Segoe UI",Arial,sans-serif!important;
  font-size:11px!important;
  font-weight:600!important;
}

/* Desktop grande: aumentamos a área DIREITA da grade em vez de fazer a arte
   transbordar por cima do conteúdo da esquerda. */
@media (min-width:1451px){
  .login-layout{
    width:min(1640px,100%)!important;
    grid-template-columns:minmax(590px,.90fr) minmax(650px,1.10fr)!important;
    gap:clamp(34px,3vw,52px)!important;
    padding-left:clamp(44px,4vw,70px)!important;
    padding-right:clamp(30px,3vw,52px)!important;
  }
  .brand-copy{
    width:min(650px,100%)!important;
  }
  .flow-visual{
    width:min(100%,760px)!important;
    max-width:760px!important;
    min-height:650px!important;
    margin-right:0!important;
    justify-self:end!important;
    overflow:visible!important;
  }
  .login-flow-art{
    width:100%!important;
    max-width:760px!important;
    max-height:760px!important;
    transform:translate(0,8px)!important;
  }
  .flow-visual::before{
    width:92%!important;
    transform:none!important;
  }
  .login-art-halo{
    inset:8% 2% 6%!important;
  }
}

/* Desktop intermediário: mesma regra — arte limitada à própria coluna. */
@media (min-width:1181px) and (max-width:1450px){
  .login-layout{
    width:min(1380px,100%)!important;
    grid-template-columns:minmax(520px,1fr) minmax(500px,1fr)!important;
    gap:clamp(26px,2.5vw,38px)!important;
    padding-left:clamp(34px,4vw,54px)!important;
    padding-right:clamp(24px,3.2vw,44px)!important;
  }
  .brand-copy{
    width:min(610px,100%)!important;
  }
  .flow-visual{
    width:min(100%,620px)!important;
    max-width:620px!important;
    min-height:540px!important;
    margin-right:0!important;
    justify-self:end!important;
    overflow:visible!important;
  }
  .login-flow-art{
    width:100%!important;
    max-width:620px!important;
    max-height:640px!important;
    transform:translate(0,6px)!important;
  }
}

@media (min-width:901px) and (max-width:1180px){
  .flow-visual{
    width:min(100%,500px)!important;
    max-width:500px!important;
    min-height:470px!important;
    margin-right:0!important;
    overflow:visible!important;
  }
  .login-flow-art{
    width:100%!important;
    max-width:500px!important;
    max-height:550px!important;
  }
}

@media(max-width:900px){
  .flow-profile-select{
    height:40px!important;
    min-height:40px!important;
    padding:0 36px 0 11px!important;
    font-size:11px!important;
  }
}

/* ==========================================================
   V8.1 · MOBILE FIRST REAL
   Ajustes finais para celular/tablet, safe areas, toque,
   modais, tabelas, CRM, editor de fluxo e login responsivo.
   ========================================================== */
html{
  max-width:100%;
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{max-width:100%}
img,svg,video,canvas{max-width:100%}

/* Login / Hub: no celular a arte continua presente, mas vira uma seção própria,
   sem invadir texto ou formulário. */
@media(max-width:900px){
  .login-page,.login-shell,.login-brand{min-height:100vh;min-height:100dvh}
  .login-page{overflow-x:hidden;overflow-y:auto}
  .login-layout{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    width:min(100%,620px)!important;
    min-height:100vh!important;
    min-height:100dvh!important;
    margin:0 auto!important;
    padding:
      max(24px,env(safe-area-inset-top))
      max(20px,env(safe-area-inset-right))
      max(34px,env(safe-area-inset-bottom))
      max(20px,env(safe-area-inset-left))!important;
    gap:0!important;
  }
  .brand-copy{display:contents!important}
  .login-logo-wrap{
    order:1;
    width:min(430px,92vw)!important;
    margin:0 auto 24px!important;
  }
  .flow-lockup{width:76%;gap:14px;margin-top:12px}
  .flow-word{font-size:clamp(18px,5vw,24px);letter-spacing:.44em;padding-left:.44em}
  .brand-message{
    order:2;
    width:100%;
    max-width:none!important;
    margin:0 0 10px!important;
  }
  .login-brand h1{
    font-size:clamp(30px,8.4vw,42px)!important;
    line-height:1.08!important;
    margin:0 0 14px!important;
    letter-spacing:-.03em!important;
    text-wrap:balance;
  }
  .login-brand p{font-size:15px!important;line-height:1.55!important;max-width:none!important}
  .flow-visual{
    order:3;
    display:flex!important;
    align-self:center!important;
    justify-self:auto!important;
    width:min(100%,440px)!important;
    max-width:440px!important;
    min-height:300px!important;
    height:auto!important;
    margin:-8px auto 4px!important;
    overflow:visible!important;
  }
  .login-flow-art{
    width:100%!important;
    max-width:440px!important;
    max-height:390px!important;
    height:auto!important;
    object-fit:contain!important;
    transform:none!important;
    filter:drop-shadow(0 18px 28px rgba(0,24,42,.22))!important;
  }
  .flow-visual::before{width:86%!important}
  .login-art-halo{inset:10% 5% 8%!important}
  .login-card{
    order:4;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  .login-field{height:58px;margin-bottom:12px;border-radius:12px}
  .login-field input{font-size:16px!important}
  .login-submit{height:58px;border-radius:12px;font-size:16px}
  .login-remember-copy strong{font-size:13px}
  .login-remember-copy small{font-size:11px;line-height:1.35}
  .login-forgot{font-size:12px}
}

@media(max-width:560px){
  .login-layout{
    width:100%!important;
    padding:
      max(20px,env(safe-area-inset-top))
      max(16px,env(safe-area-inset-right))
      max(28px,env(safe-area-inset-bottom))
      max(16px,env(safe-area-inset-left))!important;
  }
  .login-logo-wrap{width:min(330px,90vw)!important;margin-bottom:18px!important}
  .flow-lockup{width:80%;gap:10px;margin-top:10px}
  .flow-word{font-size:17px;letter-spacing:.40em;padding-left:.40em}
  .login-brand h1{font-size:clamp(29px,9vw,36px)!important;margin-bottom:12px!important}
  .login-brand p{font-size:14px!important}
  .flow-visual{width:min(100%,340px)!important;max-width:340px!important;min-height:230px!important;margin:-6px auto 2px!important}
  .login-flow-art{max-width:340px!important;max-height:300px!important}
  .login-access-row{flex-direction:column!important;align-items:stretch!important;gap:10px!important;margin-top:13px!important}
  .login-remember{width:100%;margin:0!important}
  .login-forgot{align-self:flex-start;margin:0 0 0 32px!important}
}

@media(max-width:380px){
  .login-logo-wrap{width:min(300px,88vw)!important}
  .login-brand h1{font-size:28px!important}
  .flow-visual{max-width:300px!important;min-height:205px!important}
  .login-flow-art{max-width:300px!important;max-height:270px!important}
}

/* Painel inteiro: navegação, conteúdo e controles amigáveis ao toque. */
@media(max-width:820px){
  :root{
    --sidebar:min(88vw,310px);
    --topbar:calc(64px + env(safe-area-inset-top));
  }
  html,body,.app-shell,.main{width:100%;max-width:100%}
  body:not(.flow-view-active):not(.inbox-view-active){overflow-x:hidden;overflow-y:auto}
  .app-shell{display:block!important;min-height:100vh;min-height:100dvh}
  .main{width:100%!important;min-width:0!important}

  .sidebar{
    width:var(--sidebar)!important;
    max-width:calc(100vw - 34px);
    padding-top:env(safe-area-inset-top);
    padding-bottom:env(safe-area-inset-bottom);
    transform:translateX(-105%);
    transition:transform .2s ease;
    box-shadow:14px 0 38px rgba(18,45,61,.18);
  }
  .sidebar.mobile-open{transform:translateX(0)}
  .sidebar-backdrop{inset:0;backdrop-filter:blur(2px)}
  .sidebar-head{min-height:118px;padding:18px 14px 16px}
  .sidebar-brand img{width:min(220px,72vw);max-height:80px}
  .sidebar-brand span{font-size:12px}
  .nav{padding:12px 10px 14px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .nav-btn{min-height:48px;padding:11px 13px;font-size:14px}
  .sidebar-bottom{padding:10px 10px 12px}

  .topbar{
    width:100%;
    height:var(--topbar)!important;
    min-height:var(--topbar)!important;
    padding:
      env(safe-area-inset-top)
      max(10px,env(safe-area-inset-right))
      0
      max(8px,env(safe-area-inset-left))!important;
    gap:7px;
  }
  .mobile-nav-toggle,.notification-bell{width:40px!important;height:40px!important;min-width:40px;min-height:40px}
  .top-title{min-width:0;flex:1}
  .top-title h1{font-size:16px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .top-actions{gap:5px;min-width:0}
  .status-pill{min-height:34px;padding:6px 8px;font-size:10px;min-width:0;max-width:96px;overflow:hidden}
  .status-pill span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .content{
    width:100%;
    max-width:none!important;
    margin:0!important;
    padding:
      12px
      max(12px,env(safe-area-inset-right))
      max(18px,env(safe-area-inset-bottom))
      max(12px,env(safe-area-inset-left))!important;
    overflow-x:hidden;
  }
  .view.active{width:100%;min-width:0}
  .page-head{flex-direction:column!important;gap:12px!important;margin-bottom:16px}
  .page-head>div{min-width:0;max-width:100%}
  .page-head h2{font-size:21px;line-height:1.2}
  .page-head p{font-size:12.5px;line-height:1.5;max-width:100%}
  .toolbar{width:100%;display:flex;align-items:stretch;gap:8px;flex-wrap:wrap}
  .toolbar .input,.toolbar .select{width:100%!important;max-width:none!important;min-width:0!important;flex:1 1 100%}
  .toolbar .btn{flex:1 1 140px;min-width:0;min-height:42px;white-space:normal}

  .stats-grid,.grid-2,.entity-grid{grid-template-columns:1fr!important}
  .panel{max-width:100%;border-radius:10px}
  .panel-head{padding:13px 14px;gap:9px;flex-wrap:wrap}
  .panel-head>div{min-width:0}
  .panel-body{padding:13px}
  .empty{padding:28px 14px}

  .table-wrap{width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .table{min-width:660px}
  .table th,.table td{white-space:nowrap}

  .input,.select,textarea,.mini-input,.mini-select,
  .flow-profile-select,.intent-profile-bar select,
  .crm-composer-input,.crm-side-input{
    font-size:16px!important;
  }
  .btn{min-height:40px}
  .icon-btn,.inspector-close,.crm-icon-btn,.crm-details-btn,.crm-side-close{min-width:40px;min-height:40px}
  .search-row{width:100%}
  .search-row .input{width:100%;max-width:none}
  .inline-grid{grid-template-columns:1fr!important}
  .option-grid{grid-template-columns:1fr!important}
  .option-row-head,.action-row-head{gap:8px;flex-wrap:wrap}
  .switch-row{gap:14px}

  .toast-wrap{
    left:max(10px,env(safe-area-inset-left));
    right:max(10px,env(safe-area-inset-right));
    bottom:max(10px,env(safe-area-inset-bottom));
    width:auto;
  }
  .toast{width:100%;min-width:0;max-width:none}

  .notification-panel{
    left:max(8px,env(safe-area-inset-left))!important;
    right:max(8px,env(safe-area-inset-right))!important;
    top:calc(var(--topbar) + 4px)!important;
    width:auto!important;
    max-height:calc(100dvh - var(--topbar) - 12px)!important;
    overflow:auto;
  }

  /* Modais viram bottom-sheet no celular e nunca saem da viewport. */
  .modal-backdrop{
    align-items:flex-end!important;
    padding:0!important;
    padding-left:env(safe-area-inset-left)!important;
    padding-right:env(safe-area-inset-right)!important;
  }
  .modal{
    width:100%!important;
    max-width:none!important;
    max-height:calc(94dvh - env(safe-area-inset-top))!important;
    border-radius:18px 18px 0 0!important;
    overflow:hidden;
  }
  .modal-head{padding:14px 14px 12px}
  .modal-body{padding:14px;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .modal-foot{
    padding:10px 14px max(12px,env(safe-area-inset-bottom));
    display:flex;
    gap:8px;
    flex-wrap:wrap;
  }
  .modal-foot .btn{flex:1 1 130px;min-width:0}

  /* Dashboard */
  .dashboard-head-actions{width:100%;align-items:stretch!important;gap:8px}
  .dashboard-period{width:100%;flex:1 1 100%!important}
  .dashboard-head-actions>.btn{width:100%;min-height:42px}
  .dashboard-main-stats{grid-template-columns:1fr!important}
  .dashboard-stat-card{min-height:94px;padding:14px 15px}
  .dashboard-mini-strip{border-radius:10px}
  .dashboard-analytics-grid,.dashboard-secondary-grid{grid-template-columns:1fr!important;gap:12px}
  .dashboard-analytics-panel .panel-body,.dashboard-compact-panel .panel-body{min-height:0}
  .dashboard-bars{height:150px;overflow-x:auto;overflow-y:hidden}

  /* Reconhecimento / contatos */
  .intent-tools{width:100%;gap:10px;align-items:stretch!important}
  .intent-tools .search-row{min-width:0!important;flex:1 1 100%}
  .intent-filter-row{width:100%;display:flex;flex-wrap:nowrap!important;overflow-x:auto;padding-bottom:4px;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .intent-filter{flex:0 0 auto;min-height:40px}
  .intent-profile-bar{width:100%;padding:9px!important;gap:8px!important}
  .intent-profile-bar>div{width:100%}
  .intent-profile-bar select{width:100%!important;height:44px!important;min-height:44px!important}
  .entity-card-foot{align-items:flex-start;flex-wrap:wrap}

  /* Configurações/equipe */
  .team-user-row{width:100%;min-width:0}
  .team-user-main{min-width:0}
  .team-user-actions{width:100%;display:flex;flex-wrap:wrap;gap:7px}
  .team-user-actions .btn{flex:1 1 130px}
  .notification-device-actions .btn{flex:1 1 140px}

  /* Editor de fluxo: sem contas fixas de altura; o dock ocupa só o necessário. */
  body.flow-view-active .content{
    width:100%!important;
    max-width:none!important;
    height:calc(100dvh - var(--topbar))!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.flow-view-active #view-flows{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.flow-view-active #view-flows .flow-profile-dock{
    position:relative!important;
    inset:auto!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:6px!important;
    padding:8px!important;
    gap:7px!important;
    overflow:visible!important;
    border-radius:10px!important;
  }
  .flow-profile-main{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:5px 8px!important;
    align-items:center!important;
  }
  .flow-profile-label{grid-column:1/-1!important}
  .flow-profile-label span{font-size:9px!important}
  .flow-profile-select{
    grid-column:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:44px!important;
    min-height:44px!important;
    padding:0 36px 0 11px!important;
    line-height:normal!important;
  }
  .flow-profile-status{grid-column:2!important;justify-self:end;min-height:28px!important;padding:0 8px!important;font-size:8.5px!important}
  .flow-profile-actions{
    width:100%!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    padding-bottom:2px;
  }
  .flow-profile-actions .btn,
  .flow-profile-actions .flow-profile-wide-exit,
  .flow-profile-actions .btn-primary{
    width:auto!important;
    min-width:max-content!important;
    flex:0 0 auto!important;
    grid-column:auto!important;
    min-height:38px!important;
    padding:8px 11px!important;
  }
  body.flow-view-active #view-flows .flow-layout{
    flex:1 1 auto!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
  }
  .flow-stage-wrap{height:100%!important;min-height:0!important}
  .flow-inspector{
    left:6px!important;
    right:6px!important;
    top:6px!important;
    bottom:6px!important;
    width:auto!important;
    max-width:none!important;
    max-height:none!important;
    border-radius:12px!important;
    overflow:auto!important;
  }
  .inspector-body{padding:13px}
  .inspector-save{padding:10px 12px max(10px,env(safe-area-inset-bottom));flex-wrap:wrap}
  .inspector-save .btn{flex:1 1 130px}
  .flow-toolbox{
    left:6px!important;
    right:6px!important;
    top:auto!important;
    bottom:calc(56px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-height:min(72dvh,620px)!important;
    border-radius:14px!important;
  }
  .flow-canvas-controls{
    left:max(7px,env(safe-area-inset-left))!important;
    bottom:max(7px,env(safe-area-inset-bottom))!important;
    max-width:calc(100vw - 14px - env(safe-area-inset-left) - env(safe-area-inset-right));
    overflow-x:auto;
  }
  .flow-canvas-controls button{height:42px!important;min-width:42px!important}
  .flow-context-menu{max-width:calc(100vw - 16px)!important;min-width:min(218px,calc(100vw - 16px))!important}

  body.flow-view-active.flow-wide #view-flows{
    display:flex!important;
    flex-direction:column!important;
    grid-template-rows:none!important;
    height:100dvh!important;
  }
  body.flow-view-active.flow-wide #view-flows .flow-profile-dock{
    flex:0 0 auto!important;
    margin:
      max(6px,env(safe-area-inset-top))
      max(6px,env(safe-area-inset-right))
      4px
      max(6px,env(safe-area-inset-left))!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.flow-view-active.flow-wide #view-flows .flow-layout{flex:1 1 auto!important;height:auto!important}

  /* Conversas: lista, chat e ficha ocupam 100% da tela sem corte. */
  body.inbox-view-active .content{
    width:100%!important;
    max-width:none!important;
    height:calc(100dvh - var(--topbar))!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.inbox-view-active #view-inbox.active,
  body.inbox-view-active .crm-inbox-shell{width:100%!important;height:100%!important;margin:0!important}
  .crm-inbox-shell{display:block!important;position:relative!important;overflow:hidden!important}
  .crm-conversation-list,.crm-chat-panel,.crm-contact-panel{width:100%!important;max-width:none!important;min-width:0!important;height:100%!important}
  .crm-list-head{height:auto!important;min-height:66px;padding:10px 12px}
  .crm-list-head-actions{gap:5px}
  .crm-search-wrap{padding:9px 10px 7px}
  .crm-search{height:44px!important;font-size:16px!important}
  .crm-filter-row{padding:0 10px 8px;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}
  .crm-filter{flex:0 0 auto;min-height:36px;padding:7px 10px;font-size:11px}
  .crm-conversation-item{padding:11px 10px;grid-template-columns:42px minmax(0,1fr)}
  .crm-chat-head{height:auto!important;min-height:68px;padding:8px 9px;gap:7px}
  .crm-chat-title{min-width:0}
  .crm-chat-actions{gap:5px;min-width:0}
  .crm-chat-actions .btn,.crm-details-btn{min-height:38px;padding:7px 9px;font-size:10px;white-space:nowrap}
  .crm-chat-summary{padding:7px 9px!important}
  .crm-message-area{padding:12px 10px max(12px,env(safe-area-inset-bottom))!important}
  .crm-message-bubble{max-width:92%!important;font-size:13px}
  .crm-composer{
    grid-template-columns:minmax(0,1fr) auto;
    padding:9px 9px max(10px,env(safe-area-inset-bottom))!important;
    gap:7px;
  }
  .crm-composer-input{min-width:0;min-height:44px!important;max-height:120px;font-size:16px!important}
  .crm-send-btn{min-width:68px;min-height:44px;font-size:12px}
  .crm-composer-hint{display:none}
  .crm-contact-panel{overflow:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .crm-side-head{height:auto!important;min-height:64px}
  .crm-summary-strip{width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding-bottom:4px}
  .request-board,.crm-board{scroll-snap-type:x proximity;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .request-column,.crm-stage{scroll-snap-align:start;min-height:calc(100dvh - var(--topbar) - 190px)}
}

@media(max-width:560px){
  :root{--topbar:calc(60px + env(safe-area-inset-top))}
  .topbar{gap:5px}
  .top-title h1{font-size:15px}
  #waStatus,#botStatus{display:none!important}
  .status-pill{width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;padding:0!important;justify-content:center!important;border-radius:50%!important}
  .status-dot{width:9px;height:9px}
  .content{padding-left:max(10px,env(safe-area-inset-left))!important;padding-right:max(10px,env(safe-area-inset-right))!important}
  .page-head h2{font-size:20px}
  .toolbar .btn{flex-basis:100%}
  .table{min-width:600px}
  .panel-head{padding:12px}
  .panel-body{padding:12px}

  .dashboard-period button{font-size:11px;padding:0 6px}
  .dashboard-storage-list{grid-template-columns:1fr!important}
  .dashboard-mini-strip{grid-template-columns:1fr!important}

  .modal{max-height:calc(96dvh - env(safe-area-inset-top))!important}
  .modal-foot .btn{flex-basis:100%}

  .flow-profile-main{grid-template-columns:minmax(0,1fr) auto!important}
  .flow-profile-select{height:42px!important;min-height:42px!important}
  .flow-profile-actions .btn{font-size:11px!important;padding:7px 9px!important;min-height:36px!important}

  .crm-chat-head{
    display:grid!important;
    grid-template-columns:auto auto minmax(0,1fr)!important;
    grid-template-areas:
      "back avatar title"
      "actions actions actions";
    row-gap:6px!important;
  }
  .crm-mobile-back{grid-area:back}
  .crm-chat-avatar{grid-area:avatar}
  .crm-chat-title{grid-area:title}
  .crm-chat-actions{grid-area:actions;width:100%;justify-content:flex-end}
  .crm-chat-actions .btn,.crm-details-btn{flex:0 0 auto;max-width:48vw;overflow:hidden;text-overflow:ellipsis}
  .crm-message-area{padding-left:8px!important;padding-right:8px!important}
  .crm-message-bubble{max-width:94%!important}
  .crm-composer{padding-left:7px!important;padding-right:7px!important}
  .crm-send-btn{min-width:62px}
  .request-board,.crm-board{grid-auto-columns:minmax(250px,90vw)!important}
}

/* Celular em paisagem: mantém tudo acessível via rolagem sem estourar a largura. */
@media(max-width:900px) and (orientation:landscape) and (max-height:620px){
  .login-layout{width:min(100%,720px)!important;padding-top:max(16px,env(safe-area-inset-top))!important}
  .login-logo-wrap{width:min(310px,46vw)!important;margin-bottom:14px!important}
  .login-brand h1{font-size:28px!important}
  .flow-visual{max-width:280px!important;min-height:190px!important;margin:-8px auto 0!important}
  .login-flow-art{max-width:280px!important;max-height:240px!important}
}


/* ==========================================================
   V8.2 · DESKTOP MAIS COMPACTO + MOBILE PRESERVADO
   Reduz apenas o hub/login em telas de PC. As regras mobile
   da V8.1 continuam intactas abaixo de 900px.
   ========================================================== */
@media (min-width:901px){
  .login-logo-wrap{
    width:min(565px,92%)!important;
    margin-bottom:32px!important;
  }
  .brand-message{
    max-width:595px!important;
    margin-bottom:24px!important;
  }
  .login-brand h1{
    font-size:clamp(34px,2.75vw,49px)!important;
    line-height:1.07!important;
    margin-bottom:16px!important;
  }
  .login-brand p{
    font-size:clamp(14px,1.02vw,17px)!important;
    line-height:1.55!important;
    max-width:595px!important;
  }
  .login-card{
    width:min(595px,100%)!important;
  }
  .login-field{
    height:60px!important;
    margin-bottom:13px!important;
    border-radius:13px!important;
  }
  .login-field-icon,.login-password-toggle{
    width:54px!important;
  }
  .login-field-icon svg,.login-password-toggle svg{
    width:21px!important;
    height:21px!important;
  }
  .login-submit{
    height:58px!important;
    border-radius:13px!important;
    font-size:16px!important;
  }
  .login-submit svg{
    width:22px!important;
    height:22px!important;
  }
  .login-access-row{
    margin-top:13px!important;
  }
  .login-remember-copy strong{font-size:13px!important}
  .login-remember-copy small{font-size:11px!important}
  .login-forgot{font-size:12px!important}
}

/* ========================================================================== */
/* V8.3 — protocolos, relatórios, áudio, encerramento e modo noturno completo */
/* ========================================================================== */
.theme-toggle{height:36px;display:inline-flex;align-items:center;gap:7px;padding:0 11px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:11px;font-weight:800;white-space:nowrap;transition:.15s ease}
.theme-toggle:hover{border-color:#b9cbd5;background:#f5f9fb}.theme-toggle-icon{font-size:15px;line-height:1}.theme-toggle-label{line-height:1}
.btn-danger-soft{border-color:#efc8c4!important;color:#a63830!important;background:#fff7f6!important}.btn-danger-soft:hover{background:#feecea!important;border-color:#e8aca6!important}

/* Composer com microfone */
.crm-composer{grid-template-columns:auto minmax(0,1fr) auto}
.crm-audio-btn{width:42px;min-width:42px;height:42px;align-self:end;border:1px solid #cfd9df;border-radius:10px;background:#fff;color:#31566a;display:grid;place-items:center;font-size:17px;transition:.15s ease}
.crm-audio-btn:hover{background:#eef7fb;border-color:#a9cedf}.crm-audio-btn.recording{background:#b42318;color:#fff;border-color:#b42318;animation:crm-record-pulse 1.25s infinite}.crm-audio-btn:disabled{opacity:.5;cursor:wait}
.crm-audio-state{grid-column:2/4;min-height:42px;display:flex;align-items:center;gap:9px;padding:0 10px;border:1px solid #efd0cc;border-radius:10px;background:#fff7f6;color:#7d2e28;font-size:11px}.crm-audio-state[hidden]{display:none!important}.crm-audio-state button{margin-left:auto;border:0;background:transparent;color:#9d332b;font-weight:800;font-size:10px}.crm-record-dot{width:9px;height:9px;border-radius:50%;background:#d92d20;box-shadow:0 0 0 4px rgba(217,45,32,.10)}
@keyframes crm-record-pulse{50%{box-shadow:0 0 0 5px rgba(180,35,24,.13)}}
.crm-chat-chip.protocol{background:#edf7fb;border-color:#c9e5f1;color:#135f82}.crm-chat-chip.protocol b{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.02em}

/* Protocolos */
.protocol-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 190px 150px;gap:10px;margin-bottom:12px}.protocol-toolbar .input,.protocol-toolbar .select{height:40px}
.protocol-summary{margin-bottom:14px}.protocol-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:var(--blue-800);letter-spacing:.015em;white-space:nowrap}.protocol-table tbody tr{cursor:pointer}.protocol-table tbody tr:hover{background:#f5fafc}.protocol-status{display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800}.protocol-status.open{background:#eaf8f1;color:#087a55}.protocol-status.closed{background:#eef2f4;color:#60707b}

/* Relatórios */
.report-page-head{align-items:flex-start}.report-toolbar{align-items:center;flex-wrap:wrap}.report-date-filter{display:flex;align-items:center;gap:9px;min-height:40px;padding:4px 5px 4px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}.report-date-filter>span{font-size:11px;font-weight:800;color:var(--muted);white-space:nowrap}.report-date-filter .input{width:150px;height:34px;min-height:34px;border:0;background:transparent;padding:0 8px;font-size:12px;font-weight:750;box-shadow:none}.report-date-filter .input:focus{outline:0;box-shadow:none}.report-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:28px;margin-bottom:16px;padding:22px 24px;border-radius:14px;background:#114b63;color:#fff;box-shadow:0 10px 28px rgba(7,59,92,.13)}.report-hero:after{display:none!important;content:none!important}.report-hero>div{position:relative;z-index:1}.report-hero span{font-size:10px;text-transform:uppercase;letter-spacing:.08em;font-weight:800;color:#d7edf7}.report-hero h3{font-size:23px;line-height:1.2;margin:5px 0 7px;letter-spacing:-.025em}.report-hero p{margin:0;color:#e4f2f8;font-size:12px}.report-hero-badge{flex:0 0 170px;text-align:center;padding:13px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.08)!important}.report-hero-badge strong{display:block;font-size:30px}.report-hero-badge span{display:block;margin-top:2px;text-transform:none;letter-spacing:0;color:#eef7fb}
.report-stats{grid-template-columns:repeat(6,minmax(130px,1fr));margin-bottom:16px}.report-stat-card small{display:block;margin-top:5px;color:var(--muted);font-size:10px;font-weight:600}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.report-grid .panel-body{min-height:225px}
.report-response{width:100%}.report-response-bar{height:16px;display:flex;overflow:hidden;border-radius:999px;background:#edf2f5;margin:18px 0 24px}.report-response-bar span.bot{background:#1694c7}.report-response-bar span.human{background:#20a36a}.report-response-legend{display:grid;grid-template-columns:1fr 1fr;gap:12px}.report-response-legend>div{display:grid;grid-template-columns:auto 1fr;gap:3px 7px;align-items:center;padding:11px;border:1px solid var(--line);border-radius:10px}.report-response-legend i{width:9px;height:9px;border-radius:50%;grid-row:1/3}.report-response-legend i.bot{background:#1694c7}.report-response-legend i.human{background:#20a36a}.report-response-legend span{font-size:10px;color:var(--muted)}.report-response-legend strong{font-size:13px}
.report-ranking{display:flex;flex-direction:column;gap:6px}.report-rank-row{display:grid;grid-template-columns:25px minmax(0,1fr) 36px;gap:9px;align-items:center;width:100%;border:0;background:transparent;padding:7px 5px;border-radius:8px;text-align:left;color:inherit}.report-rank-row:hover{background:#f3f8fa}.report-rank-row>b{width:24px;height:24px;border-radius:7px;background:#eef4f6;display:grid;place-items:center;font-size:10px;color:#657783}.report-rank-row>div{min-width:0}.report-rank-row strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.report-rank-row span{display:block;height:5px;margin-top:5px;background:#eef2f4;border-radius:999px;overflow:hidden}.report-rank-row span i{display:block;height:100%;background:#1694c7;border-radius:inherit}.report-rank-row em{font-style:normal;text-align:right;font-weight:800;font-size:11px;color:#51636f}
.service-rating-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px}.service-rating-summary>div{padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--surface)}.service-rating-summary span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:800}.service-rating-summary strong{display:block;margin-top:4px;font-size:20px;line-height:1;color:var(--ink)}.service-rating-summary strong small{font-size:10px;color:var(--muted);font-weight:700}.service-rating-ranking .dashboard-rank-copy>span{width:30px;font-size:9px}
html[data-theme="dark"] .service-rating-summary>div{background:#13232d;border-color:var(--line)}
@media(max-width:520px){.service-rating-summary{grid-template-columns:1fr 1fr}.service-rating-summary>div:last-child{grid-column:1/-1}}

/* Encerramento */
.finalize-box{display:flex;flex-direction:column;gap:14px}.finalize-box>p{margin:0;color:var(--muted);line-height:1.55}.finalize-protocol{padding:13px 14px;border:1px solid #cde5ef;border-radius:11px;background:#f2fafd}.finalize-protocol span{display:block;font-size:10px;color:#66818f;text-transform:uppercase;letter-spacing:.05em;font-weight:800}.finalize-protocol strong{display:block;margin-top:5px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:18px;color:#086b99}.finalize-note{font-size:11px;padding:9px 10px;border-radius:8px;background:#eef8f2;color:#297154}

/* ----------------------------- Modo noturno ----------------------------- */
html[data-theme="dark"]{color-scheme:dark;--ink:#e8f0f5;--muted:#92a4b0;--line:#293b47;--surface:#13232d;--canvas:#0b151c;--blue-100:#102f40;--danger-bg:#351c1c;--success-bg:#113127;--warning-bg:#332b16;--shadow:0 12px 34px rgba(0,0,0,.24)}
html[data-theme="dark"] body{background:#0b151c;color:var(--ink)}
html[data-theme="dark"] .sidebar{background:#101f29;border-color:var(--line)}
html[data-theme="dark"] .sidebar-bottom{background:rgba(16,31,41,.97);border-color:var(--line)}
html[data-theme="dark"] .sidebar-brand img{filter:brightness(0) invert(1) opacity(.92)}
html[data-theme="dark"] .sidebar-brand span{color:#83c9e8}html[data-theme="dark"] .sidebar-brand span::before,html[data-theme="dark"] .sidebar-brand span::after{background:#416476}
html[data-theme="dark"] .nav-btn{color:#aebdc6}html[data-theme="dark"] .nav-btn:hover{background:#172c38;color:#e8f5fb}html[data-theme="dark"] .nav-btn.active{background:#173647;color:#8ed4f2}
html[data-theme="dark"] .user-mini:hover{background:#172c38}html[data-theme="dark"] .avatar{background:#19394a;color:#9bdaef}
html[data-theme="dark"] .topbar{background:rgba(12,25,33,.96);border-color:var(--line)}
html[data-theme="dark"] .status-pill,html[data-theme="dark"] .theme-toggle{background:#13232d;border-color:#314550;color:#dce7ed}html[data-theme="dark"] .theme-toggle:hover{background:#1a303d}
html[data-theme="dark"] .notification-bell,html[data-theme="dark"] .notification-panel,html[data-theme="dark"] .notification-item,html[data-theme="dark"] .notification-panel-foot{background:#13232d;color:#e7eef2;border-color:var(--line)}html[data-theme="dark"] .notification-item:hover,html[data-theme="dark"] .notification-item.unread{background:#172e3b}
html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .entity-card,html[data-theme="dark"] .crm-summary-strip>div{background:#13232d;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .panel-head,html[data-theme="dark"] .panel-body{border-color:var(--line)}
html[data-theme="dark"] .input,html[data-theme="dark"] .select,html[data-theme="dark"] .textarea,html[data-theme="dark"] .mini-input,html[data-theme="dark"] .mini-select,html[data-theme="dark"] .crm-composer-input,html[data-theme="dark"] .crm-side-input{background:#0f1d26!important;border-color:#324550!important;color:#e7eef2!important}html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#6f8795!important}
html[data-theme="dark"] .btn-secondary,html[data-theme="dark"] .btn-ghost,html[data-theme="dark"] .icon-btn,html[data-theme="dark"] .crm-details-btn{background:#162832;border-color:#344854;color:#d2dee5}html[data-theme="dark"] .btn-secondary:hover,html[data-theme="dark"] .btn-ghost:hover{background:#1b3442}
html[data-theme="dark"] .btn-danger,html[data-theme="dark"] .btn-danger-soft{background:#2d1c1d!important;border-color:#653638!important;color:#f2aaa4!important}
html[data-theme="dark"] .table th{background:#111f28;color:#91a4b0;border-color:#2a3c47}html[data-theme="dark"] .table td{border-color:#253741;color:#d6e0e6}html[data-theme="dark"] .table tbody tr:hover,html[data-theme="dark"] .protocol-table tbody tr:hover{background:#172a35}
html[data-theme="dark"] .tag,html[data-theme="dark"] .file-meta{color:#93a5b0}
html[data-theme="dark"] .switch-row{border-color:#293d49}html[data-theme="dark"] .slider{background:#40515b}
html[data-theme="dark"] .option-row,html[data-theme="dark"] .action-row{background:#101e27;border-color:#2c404c}

/* Fluxos no escuro */
html[data-theme="dark"] .flow-layout{border-color:#2b3d48;background:#101e27}
html[data-theme="dark"] .flow-stage-wrap{background-color:#0e1a22;background-image:radial-gradient(#31444f 1px,transparent 1px)}
html[data-theme="dark"] .flow-node{background:#14252f;border-color:#39505e;color:#e2ebf0;box-shadow:0 5px 16px rgba(0,0,0,.24)}
html[data-theme="dark"] .node-head{border-color:#2a3d48}html[data-theme="dark"] .node-main .node-head{background:#153447}html[data-theme="dark"] .node-body,html[data-theme="dark"] .node-id{color:#92a5b0}
html[data-theme="dark"] .flow-line{stroke:#557080}html[data-theme="dark"] .flow-line.active{stroke:#2ca4da}
html[data-theme="dark"] .flow-inspector,html[data-theme="dark"] .inspector-head,html[data-theme="dark"] .inspector-save,html[data-theme="dark"] .flow-toolbox{background:#12232d!important;border-color:#2e424e;color:#e2ebf0}
html[data-theme="dark"] .flow-toolbox-head{background:rgba(18,35,45,.98);border-color:#2b3e49}html[data-theme="dark"] .flow-toolbox-head strong,html[data-theme="dark"] .flow-toolbox-group>button{color:#dfe9ee}html[data-theme="dark"] .flow-toolbox-group>button:hover{background:#1b3442}html[data-theme="dark"] .flow-toolbox-group>button>span{background:#19313e;color:#86cee9}html[data-theme="dark"] .flow-toolbox-head button{background:#1b303b;color:#9fb2bd}
html[data-theme="dark"] .flow-context-menu{background:#142630;border-color:#324753;box-shadow:0 12px 32px rgba(0,0,0,.3)}html[data-theme="dark"] .flow-context-menu button{color:#d9e4e9}html[data-theme="dark"] .flow-context-menu button:hover{background:#1b3644}

/* Conversas / CRM no escuro */
html[data-theme="dark"] .crm-inbox-shell{background:#0e1a22;border-color:#293d49}
html[data-theme="dark"] .crm-conversation-list,html[data-theme="dark"] .crm-chat-head,html[data-theme="dark"] .crm-contact-panel,html[data-theme="dark"] .crm-side-head,html[data-theme="dark"] .crm-side-section{background:#12222c!important;border-color:#293c47!important;color:#e5edf1}
html[data-theme="dark"] .crm-conversation-item{border-color:#253944;color:#dde7ec}html[data-theme="dark"] .crm-conversation-item:hover{background:#172b36}html[data-theme="dark"] .crm-conversation-item.active{background:#173647;border-left-color:#25a0d5}
html[data-theme="dark"] .crm-list-phone,html[data-theme="dark"] .crm-list-preview,html[data-theme="dark"] .crm-chat-meta,html[data-theme="dark"] .crm-side-section label,html[data-theme="dark"] .crm-mini-empty{color:#8fa2ae}
html[data-theme="dark"] .crm-chat-panel{background:#0d1820}html[data-theme="dark"] .crm-message-area{background-color:#0d1921;background-image:radial-gradient(rgba(117,148,164,.12) .75px,transparent .75px)}
html[data-theme="dark"] .crm-message-bubble{background:#182933;color:#e5edf1;box-shadow:0 1px 2px rgba(0,0,0,.28)}html[data-theme="dark"] .crm-message-row.outbound .crm-message-bubble{background:#173b31}html[data-theme="dark"] .crm-message-row.outbound .crm-message-bubble.bot{background:#163646}html[data-theme="dark"] .crm-day-sep span,html[data-theme="dark"] .crm-history-start{background:#152630;border-color:#2b3f4a;color:#9fb0ba}
html[data-theme="dark"] .crm-chat-summary{background:#101f28;border-color:#293c47}html[data-theme="dark"] .crm-chat-chip{background:#172b36;border-color:#2f4653;color:#aec0c9}html[data-theme="dark"] .crm-chat-chip.protocol{background:#143444;border-color:#24556b;color:#8bd2ef}
html[data-theme="dark"] .crm-composer{background:#111f28;border-color:#2b3e49}html[data-theme="dark"] .crm-audio-btn{background:#172b36;border-color:#344b58;color:#a9d8eb}html[data-theme="dark"] .crm-audio-btn:hover{background:#1d3947}html[data-theme="dark"] .crm-audio-state{background:#321d1e;border-color:#653537;color:#efaaa5}
html[data-theme="dark"] .crm-mini-card,html[data-theme="dark"] .crm-note{background:#101f28;border-color:#293d49;color:#dce6eb}html[data-theme="dark"] .crm-note span{color:#becbd2}html[data-theme="dark"] .crm-note strong{color:#9fb1bb}
html[data-theme="dark"] .request-column,html[data-theme="dark"] .crm-stage{background:#101f28;border-color:#293d49}html[data-theme="dark"] .request-column>header,html[data-theme="dark"] .crm-stage>header{background:#142731;border-color:#2b3f4a}html[data-theme="dark"] .request-card,html[data-theme="dark"] .crm-card{background:#152630;border-color:#2e424e;color:#e1eaef}html[data-theme="dark"] .crm-card-tags span{background:#20323c;color:#a9bac4}
html[data-theme="dark"] .crm-new-contact-btn{background:#152833;border-color:#34505e;color:#9bd9ef}html[data-theme="dark"] .crm-conversation-remove:hover{background:#203641;color:#b9d5e1}

/* Protocolos e relatórios no escuro */
html[data-theme="dark"] .protocol-status.open{background:#14372c;color:#83d5ae}html[data-theme="dark"] .protocol-status.closed{background:#26343c;color:#aebbc3}html[data-theme="dark"] .protocol-code{color:#84d0ed}
html[data-theme="dark"] .report-date-filter{background:#13242e;border-color:#2b3f4b}html[data-theme="dark"] .report-date-filter .input{background:transparent!important;color:#dce8ee!important;color-scheme:dark}html[data-theme="dark"] .report-hero{background:#11455a!important;box-shadow:0 12px 28px rgba(0,0,0,.22)}html[data-theme="dark"] .report-hero:after{display:none!important}html[data-theme="dark"] .report-hero-badge{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.12)!important}
html[data-theme="dark"] .report-response-bar,html[data-theme="dark"] .report-rank-row span{background:#253842}html[data-theme="dark"] .report-response-legend>div{border-color:#2c404c}html[data-theme="dark"] .report-rank-row:hover{background:#172c38}html[data-theme="dark"] .report-rank-row>b{background:#20333e;color:#a6b7c0}html[data-theme="dark"] .report-rank-row em{color:#b8c5cc}
html[data-theme="dark"] .finalize-protocol{background:#13303d;border-color:#265266}html[data-theme="dark"] .finalize-protocol span{color:#8cadbc}html[data-theme="dark"] .finalize-protocol strong{color:#8fd5f0}html[data-theme="dark"] .finalize-note{background:#163328;color:#8dd2ae}

/* Outras superfícies que tinham branco fixo */
html[data-theme="dark"] .intent-card,html[data-theme="dark"] .contact-card,html[data-theme="dark"] .file-card,html[data-theme="dark"] .dashboard-mini-item,html[data-theme="dark"] .dashboard-rank-row,html[data-theme="dark"] .dashboard-storage-row,html[data-theme="dark"] .team-user-card,html[data-theme="dark"] .notification-device-card,html[data-theme="dark"] .notification-check{background:#13232d!important;border-color:#293d49!important;color:#dfe8ed}
html[data-theme="dark"] .dashboard-rank-row,html[data-theme="dark"] .report-rank-row{background:transparent!important;border-color:transparent!important;box-shadow:none!important}
html[data-theme="dark"] .dashboard-rank-row:hover,html[data-theme="dark"] .report-rank-row:hover{background:rgba(23,44,56,.32)!important}
html[data-theme="dark"] .dashboard-rank-copy>span,html[data-theme="dark"] .report-rank-row>b{background:#173847!important;color:#d9eef7!important}
html[data-theme="dark"] .dashboard-period,html[data-theme="dark"] .intent-filter-row{background:#13242e;border-color:#2b3f4b}html[data-theme="dark"] .dashboard-period button,html[data-theme="dark"] .intent-filter{color:#9eb0bb}html[data-theme="dark"] .dashboard-period button.active,html[data-theme="dark"] .intent-filter.active{background:#1b3d4e;color:#a5ddf2}
html[data-theme="dark"] pre{background:#0c1820!important;border-color:#293d49!important;color:#cfe0e8!important}

/* Responsividade dos recursos V8.3 */
@media(max-width:1250px){.report-stats{grid-template-columns:repeat(3,minmax(150px,1fr))}}
@media(max-width:900px){.theme-toggle-label{display:none}.theme-toggle{width:36px;padding:0;justify-content:center}.protocol-toolbar{grid-template-columns:1fr 1fr}.protocol-toolbar .input{grid-column:1/-1}.report-grid{grid-template-columns:1fr}.report-hero{align-items:flex-start}.report-stats{grid-template-columns:repeat(2,minmax(140px,1fr))}}
@media(max-width:820px){.report-date-filter{width:100%;justify-content:space-between}.report-date-filter .input{width:170px}.report-toolbar .btn{flex:1 1 calc(50% - 6px)}.crm-chat-actions #crmFinalizeChat{padding:7px 8px}.crm-composer{grid-template-columns:auto minmax(0,1fr) auto!important}.crm-audio-btn{width:44px;min-width:44px;height:44px}.crm-audio-state{grid-column:1/-1}.protocol-table{min-width:760px}.report-toolbar{width:100%;justify-content:space-between}.report-toolbar .dashboard-period{overflow-x:auto;max-width:100%}.report-hero{padding:18px;flex-direction:column;gap:14px}.report-hero-badge{flex:0 0 auto;width:100%;text-align:left}.report-hero-badge strong{display:inline;margin-right:7px}.report-stats{grid-template-columns:1fr 1fr}.report-response-legend{grid-template-columns:1fr}}
@media(max-width:520px){.protocol-toolbar{grid-template-columns:1fr}.protocol-toolbar .input{grid-column:auto}.report-stats{grid-template-columns:1fr}.report-hero h3{font-size:20px}.crm-chat-actions #crmFinalizeChat{font-size:0;width:34px;padding:0}.crm-chat-actions #crmFinalizeChat:after{content:'✓';font-size:15px}.theme-toggle{display:grid}.protocol-summary>div{min-width:105px}}


/* ========================================================================== */
/* V8.4 — modo noturno coerente + contraste real + correção do seletor       */
/* ========================================================================== */
/* Selects de perfil: não herdam padding vertical de .select. Isso elimina o
   texto cortado no Edge/Chrome, inclusive com zoom do Windows. */
#intentProfileSelect,
.intent-profile-bar select{
  box-sizing:border-box!important;
  height:42px!important;
  min-height:42px!important;
  padding:0 42px 0 14px!important;
  line-height:normal!important;
  font-size:12.5px!important;
  font-weight:700!important;
  vertical-align:middle!important;
  text-indent:0!important;
  overflow:visible!important;
}

/* A paleta escura agora usa camadas visíveis em vez de “preto em cima de
   preto”. Cada nível tem contraste próprio e o texto não depende de cores
   fixas do tema claro. */
html[data-theme="dark"]{
  --ink:#f1f6f9;
  --muted:#a3b5bf;
  --line:#31505d;
  --surface:#142b36;
  --canvas:#0d1a22;
  --blue-100:#163645;
  --blue-600:#2aa3d3;
  --blue-700:#238fbd;
  --blue-800:#69c7e9;
  --blue-900:#d8f1fb;
  --shadow:0 14px 36px rgba(0,0,0,.25);
  scrollbar-color:#426372 #10232d;
}
html[data-theme="dark"] body{background:#0d1a22!important;color:#f1f6f9!important}
html[data-theme="dark"] .content{color:#f1f6f9}
html[data-theme="dark"] .page-head h2,
html[data-theme="dark"] .top-title h1,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4{color:#f4f8fa}
html[data-theme="dark"] .page-head p,
html[data-theme="dark"] .top-title p,
html[data-theme="dark"] .help,
html[data-theme="dark"] .muted{color:#9fb2bd!important}

/* Estrutura principal */
html[data-theme="dark"] .sidebar{background:#10242f!important;border-color:#2c4653!important}
html[data-theme="dark"] .sidebar-bottom{background:#10242f!important;border-color:#2c4653!important}
html[data-theme="dark"] .topbar{background:rgba(14,31,40,.98)!important;border-color:#2c4653!important}
html[data-theme="dark"] .nav-btn{color:#b7c6ce!important}
html[data-theme="dark"] .nav-btn .nav-icon{color:#7fa1b2!important}
html[data-theme="dark"] .nav-btn:hover{background:#17323f!important;color:#f4f8fa!important}
html[data-theme="dark"] .nav-btn.active{background:#1a4356!important;color:#9ddcf3!important;box-shadow:inset 3px 0 #2aa3d3}
html[data-theme="dark"] .nav-btn.active .nav-icon{color:#39afe0!important}
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .notification-bell{background:#152d38!important;border-color:#365462!important;color:#eef6f9!important}
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .notification-bell:hover{background:#1b3947!important}

/* Superfícies genéricas */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .entity-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-head,
html[data-theme="dark"] .modal-foot{background:#142b36!important;border-color:#31505d!important;color:#eef5f8!important}
html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .panel-body,
html[data-theme="dark"] .modal-head,
html[data-theme="dark"] .modal-foot{border-color:#31505d!important}
html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] .mini-input,
html[data-theme="dark"] .mini-select,
html[data-theme="dark"] .crm-composer-input,
html[data-theme="dark"] .crm-side-input{background:#10232d!important;border-color:#3b5966!important;color:#f1f6f9!important;box-shadow:none!important}
html[data-theme="dark"] .input:focus,
html[data-theme="dark"] .select:focus,
html[data-theme="dark"] .textarea:focus,
html[data-theme="dark"] .mini-input:focus,
html[data-theme="dark"] .mini-select:focus,
html[data-theme="dark"] .crm-composer-input:focus,
html[data-theme="dark"] .crm-side-input:focus{border-color:#3ba9d4!important;box-shadow:0 0 0 3px rgba(42,163,211,.13)!important}
html[data-theme="dark"] select option{background:#10232d;color:#eef5f8}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#78909c!important}
html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .btn-ghost,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .crm-details-btn,
html[data-theme="dark"] .crm-icon-btn{background:#18333f!important;border-color:#3a5865!important;color:#e0eaf0!important}
html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .btn-ghost:hover,
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .crm-details-btn:hover,
html[data-theme="dark"] .crm-icon-btn:hover{background:#204250!important;color:#fff!important}

/* Intenções: remove o bloco branco perdido e recupera todo o contraste. */
html[data-theme="dark"] .intent-profile-bar,
html[data-theme="dark"] .flow-profile-dock{
  background:#142b36!important;
  border-color:#355361!important;
  box-shadow:0 5px 18px rgba(0,0,0,.14)!important;
}
html[data-theme="dark"] .intent-profile-bar span{color:#9db1bc!important}
html[data-theme="dark"] .intent-profile-bar strong{color:#f3f8fa!important}
html[data-theme="dark"] .intent-profile-bar em{background:#173c36!important;color:#8dd8ba!important;border:1px solid #2e6657}
html[data-theme="dark"] #intentProfileSelect{background:#10232d!important;border-color:#3c5b69!important;color:#f2f7fa!important}
html[data-theme="dark"] .intent-filter-row{background:transparent!important;border:0!important}
html[data-theme="dark"] .intent-filter{background:#17303b!important;border:1px solid #355462!important;color:#b8c8d0!important}
html[data-theme="dark"] .intent-filter:hover{background:#1d3c49!important;color:#edf7fb!important}
html[data-theme="dark"] .intent-filter.active{background:#1d5269!important;border-color:#2a83a8!important;color:#c9effc!important;box-shadow:inset 0 0 0 1px rgba(85,195,235,.12)}
html[data-theme="dark"] .intent-section-head h3{color:#f3f7fa!important}
html[data-theme="dark"] .intent-section-head span{color:#91a7b2!important}
html[data-theme="dark"] .intent-card{background:#142b36!important;border-color:#31505d!important;color:#dce7ec!important}
html[data-theme="dark"] .intent-card-top h3{color:#f5f9fb!important}
html[data-theme="dark"] .intent-card p{color:#abc0ca!important}
html[data-theme="dark"] .intent-card p strong{color:#e7f0f4!important}
html[data-theme="dark"] .intent-code{color:#92a7b2!important}
html[data-theme="dark"] .intent-code code{background:#0d202a!important;color:#9bd7ee!important;border:1px solid #294957}
html[data-theme="dark"] .intent-card .phrase-count{color:#9eb2bc!important}
html[data-theme="dark"] .intent-card .tag.blue{background:#153f52!important;color:#8fd6f1!important;border-color:#28617a!important}
html[data-theme="dark"] .intent-help-btn{background:#18343f!important;border-color:#41616e!important;color:#a5e0f5!important}
html[data-theme="dark"] .intent-help-intro,
html[data-theme="dark"] .intent-help-step,
html[data-theme="dark"] .intent-help-example,
html[data-theme="dark"] .intent-help-flow>span:not(.intent-help-arrow),
html[data-theme="dark"] .intent-help-tip{background:#122731!important;border-color:#31505d!important;color:#b9c9d0!important}
html[data-theme="dark"] .intent-help-intro strong,
html[data-theme="dark"] .intent-help-step strong,
html[data-theme="dark"] .intent-help-example-title,
html[data-theme="dark"] .intent-help-flow b,
html[data-theme="dark"] .intent-help-fields h4,
html[data-theme="dark"] .intent-help-fields strong,
html[data-theme="dark"] .intent-help-tip strong{color:#eef5f8!important}
html[data-theme="dark"] .intent-help-step p,
html[data-theme="dark"] .intent-help-fields span{color:#a8bbc4!important}
html[data-theme="dark"] .intent-help-fields>div{border-color:#2c4653!important}

/* Conversas: nenhum item branco com texto claro em cima. */
html[data-theme="dark"] body:not(.flow-view-active) #view-inbox.active{background:#0d1a22!important}
html[data-theme="dark"] .crm-inbox-shell{background:#0f2029!important;border-color:#31505d!important}
html[data-theme="dark"] .crm-conversation-list,
html[data-theme="dark"] .crm-chat-head,
html[data-theme="dark"] .crm-contact-panel,
html[data-theme="dark"] .crm-side-head,
html[data-theme="dark"] .crm-side-section{background:#132934!important;border-color:#31505d!important;color:#edf5f8!important}
html[data-theme="dark"] .crm-list-head,
html[data-theme="dark"] .crm-filter-row{border-color:#2f4b58!important}
html[data-theme="dark"] .crm-list-head p{color:#91a6b1!important}
html[data-theme="dark"] .crm-search{background:#10232d!important;border-color:#395765!important;color:#eef5f8!important}
html[data-theme="dark"] .crm-filter{background:#19333e!important;color:#b3c4cc!important;border:1px solid #304d59!important}
html[data-theme="dark"] .crm-filter.active{background:#1d5268!important;color:#d3f3ff!important;border-color:#337d9b!important}
html[data-theme="dark"] .crm-conversation-item{
  background:#132934!important;
  border-color:#2f4a57!important;
  color:#eef5f8!important;
}
html[data-theme="dark"] .crm-conversation-item:hover{background:#193642!important}
html[data-theme="dark"] .crm-conversation-item.active{background:#1c4659!important;box-shadow:inset 3px 0 #2ca8da!important}
html[data-theme="dark"] .crm-list-row strong{color:#f5f9fb!important}
html[data-theme="dark"] .crm-list-row time{color:#8da3ae!important}
html[data-theme="dark"] .crm-list-phone{color:#9eb2bd!important}
html[data-theme="dark"] .crm-list-preview>span{color:#c0cdd3!important}
html[data-theme="dark"] .crm-list-tags{color:#91a5af!important}
html[data-theme="dark"] .mini-state{background:#1d3540!important;color:#b7c7cf!important}
html[data-theme="dark"] .mini-state.human{background:#3b2c1d!important;color:#f2c37f!important}
html[data-theme="dark"] .mini-state.auto{background:#173a31!important;color:#8ed8b5!important}
html[data-theme="dark"] .crm-list-avatar,
html[data-theme="dark"] .crm-chat-avatar{background:#1b3b49!important;color:#9fe1f6!important}
html[data-theme="dark"] .crm-avatar-photo{background:#1b3b49!important}
html[data-theme="dark"] .crm-chat-title strong{color:#f5f9fb!important}
html[data-theme="dark"] .crm-chat-title span{color:#9db0ba!important}
html[data-theme="dark"] .crm-chat-panel{background:#0d1a22!important}
html[data-theme="dark"] .crm-empty-chat{background:linear-gradient(180deg,#122731 0%,#0d1a22 100%)!important;color:#a9bbc4!important}
html[data-theme="dark"] .crm-empty-copy strong,
html[data-theme="dark"] .crm-empty-chat strong{color:#eef5f8!important}
html[data-theme="dark"] .crm-empty-copy span,
html[data-theme="dark"] .crm-empty-chat span{color:#a2b5bf!important}
html[data-theme="dark"] .crm-chat-summary{background:#10232d!important;border-color:#31505d!important}
html[data-theme="dark"] .crm-chat-chip{background:#17313c!important;border-color:#365462!important;color:#b8c9d1!important}
html[data-theme="dark"] .crm-chat-chip b{color:#eef5f8!important}
html[data-theme="dark"] .crm-message-area{background-color:#0d1a22!important;background-image:radial-gradient(rgba(126,164,181,.13) .75px,transparent .75px)!important}
html[data-theme="dark"] .crm-message-bubble{background:#18313c!important;color:#f1f6f9!important;box-shadow:0 1px 2px rgba(0,0,0,.22)!important}
html[data-theme="dark"] .crm-message-row.outbound .crm-message-bubble{background:#184536!important}
html[data-theme="dark"] .crm-message-row.outbound .crm-message-bubble.bot{background:#174053!important}
html[data-theme="dark"] .crm-message-foot{color:#93a9b3!important}
html[data-theme="dark"] .crm-media-label{color:#a9bbc4!important}
html[data-theme="dark"] .crm-day-sep span,
html[data-theme="dark"] .crm-history-start{background:#17303a!important;border-color:#35515e!important;color:#a9bcc5!important}
html[data-theme="dark"] .crm-composer{background:#112630!important;border-color:#31505d!important}

/* Dashboard: cartões internos também respeitam o modo escuro. */
html[data-theme="dark"] .dashboard-period{background:#142b36!important;border-color:#355361!important}
html[data-theme="dark"] .dashboard-period button{color:#a9bdc6!important}
html[data-theme="dark"] .dashboard-period button:hover{background:#1b3946!important;color:#f0f7fa!important}
html[data-theme="dark"] .dashboard-period button.active{background:#1f6481!important;color:#d9f5ff!important}
html[data-theme="dark"] .dashboard-stat-card.is-attention{background:linear-gradient(180deg,#2c281d 0%,#24251d 100%)!important;border-color:#705b32!important}
html[data-theme="dark"] .dashboard-mini-strip{background:#142b36!important;border-color:#31505d!important}
html[data-theme="dark"] .dashboard-mini-item{border-color:#2d4855!important}
html[data-theme="dark"] .dashboard-mini-item span,
html[data-theme="dark"] .dashboard-panel-head p,
html[data-theme="dark"] .dashboard-panel-note,
html[data-theme="dark"] .dashboard-empty-small,
html[data-theme="dark"] .dashboard-bar-item small,
html[data-theme="dark"] .dashboard-mix-total span,
html[data-theme="dark"] .dashboard-mix-grid em,
html[data-theme="dark"] .dashboard-mix-note,
html[data-theme="dark"] .dashboard-storage-total span,
html[data-theme="dark"] .dashboard-storage-total small,
html[data-theme="dark"] .dashboard-storage-list span,
html[data-theme="dark"] .dashboard-storage-list small,
html[data-theme="dark"] .dashboard-audit-row span,
html[data-theme="dark"] .dashboard-audit-row small{color:#98adb7!important}
html[data-theme="dark"] .dashboard-mini-item strong,
html[data-theme="dark"] .dashboard-mix-total strong,
html[data-theme="dark"] .dashboard-mix-grid strong,
html[data-theme="dark"] .dashboard-storage-total strong,
html[data-theme="dark"] .dashboard-storage-list strong,
html[data-theme="dark"] .dashboard-audit-row strong,
html[data-theme="dark"] .dashboard-rank-copy strong,
html[data-theme="dark"] .dashboard-node-title,
html[data-theme="dark"] .dashboard-contact-copy strong{color:#eef5f8!important}
html[data-theme="dark"] .dashboard-contact-phone,
html[data-theme="dark"] .dashboard-contact-preview,
html[data-theme="dark"] .dashboard-rank-copy b{color:#9eb2bd!important}
html[data-theme="dark"] .dashboard-mix-grid>div,
html[data-theme="dark"] .dashboard-storage-list>div{background:#10232d!important;border-color:#304d59!important}
html[data-theme="dark"] .dashboard-bar-track,
html[data-theme="dark"] .dashboard-storage-total,
html[data-theme="dark"] .dashboard-audit-row{border-color:#2e4956!important}
html[data-theme="dark"] .dashboard-mix-bar,
html[data-theme="dark"] .dashboard-rank-track{background:#213944!important}
html[data-theme="dark"] .dashboard-rank-copy>span{background:#1b3a48!important;color:#9dd9ef!important}
html[data-theme="dark"] .dashboard-contact-avatar{background:#1b3b49!important;border-color:#315765!important;color:#9fdef4!important}
html[data-theme="dark"] .dashboard-session-table .dashboard-contact-row:hover{background:#17313d!important}

/* Fluxos: partes internas dos blocos e dock não voltam para branco. */
html[data-theme="dark"] .flow-layout{background:#10232d!important;border-color:#31505d!important}
html[data-theme="dark"] .flow-stage-wrap{background-color:#0d1a22!important;background-image:radial-gradient(#34515e 1px,transparent 1px)!important}
html[data-theme="dark"] .flow-node{background:#142b36!important;border-color:#3a5966!important;color:#eef5f8!important}
html[data-theme="dark"] .flow-node .node-head,
html[data-theme="dark"] .node-main .node-head{background:#173441!important;border-color:#31505d!important}
html[data-theme="dark"] .flow-node .node-content{background:#112630!important}
html[data-theme="dark"] .flow-node .node-footer{background:#142b36!important;border-color:#2e4956!important;color:#9db0ba!important}
html[data-theme="dark"] .flow-node .node-kicker,
html[data-theme="dark"] .flow-node .node-id{color:#94a9b4!important}
html[data-theme="dark"] .flow-node .node-title{color:#f3f8fa!important}
html[data-theme="dark"] .flow-node .node-type{background:#1d4353!important;color:#9bdcf4!important}
html[data-theme="dark"] .flow-message-preview,
html[data-theme="dark"] .flow-choice-preview,
html[data-theme="dark"] .flow-node-special,
html[data-theme="dark"] .flow-input-preview,
html[data-theme="dark"] .flow-condition-preview,
html[data-theme="dark"] .mini-check,
html[data-theme="dark"] .new-block-template-note{background:#10232d!important;border-color:#304d59!important;color:#c4d1d7!important}
html[data-theme="dark"] .flow-message-preview{color:#d9e5ea!important}
html[data-theme="dark"] .flow-choice-preview{color:#d5e1e6!important}
html[data-theme="dark"] .flow-choice-preview>span,
html[data-theme="dark"] .flow-input-preview strong{background:#183e4f!important;color:#93daf5!important}
html[data-theme="dark"] .flow-node-special strong,
html[data-theme="dark"] .flow-condition-preview>div strong,
html[data-theme="dark"] .new-block-template-note strong{color:#e8f1f5!important}
html[data-theme="dark"] .flow-node-special small,
html[data-theme="dark"] .flow-input-preview span,
html[data-theme="dark"] .flow-condition-preview small,
html[data-theme="dark"] .new-block-template-note span{color:#9fb2bc!important}
html[data-theme="dark"] .flow-action-pill{background:#1b3541!important;color:#b8c9d1!important}
html[data-theme="dark"] .flow-port{fill:#17313c!important;stroke:#73a2b7!important}
html[data-theme="dark"] .flow-toolbox,
html[data-theme="dark"] .flow-toolbox-head{background:rgba(19,41,52,.98)!important;border-color:#31505d!important}
html[data-theme="dark"] .flow-toolbox-head strong,
html[data-theme="dark"] .flow-toolbox-group>button{color:#edf5f8!important}
html[data-theme="dark"] .flow-toolbox-head span,
html[data-theme="dark"] .flow-toolbox-group>button small,
html[data-theme="dark"] .flow-toolbox-label{color:#9db0ba!important}
html[data-theme="dark"] .flow-profile-label span{color:#9db0ba!important}
html[data-theme="dark"] .flow-profile-status{background:#1b3540!important;color:#a9bbc4!important}
html[data-theme="dark"] .flow-profile-status.active{background:#173b31!important;color:#91d9b7!important}
html[data-theme="dark"] .flow-profile-wide-exit{background:#18333f!important;border-color:#3a5865!important;color:#e0eaf0!important}
html[data-theme="dark"] body.flow-view-active.flow-wide #view-flows{background:#0d1a22!important}
html[data-theme="dark"] body.flow-view-active.flow-wide #view-flows .flow-profile-dock{background:#142b36!important}

/* CRM, solicitações, contatos, arquivos e configurações. */
html[data-theme="dark"] .crm-summary-strip>div,
html[data-theme="dark"] .team-user-row,
html[data-theme="dark"] .notification-check{background:#142b36!important;border-color:#31505d!important;color:#eaf2f6!important}
html[data-theme="dark"] .request-column,
html[data-theme="dark"] .crm-stage{background:#10232d!important;border-color:#31505d!important}
html[data-theme="dark"] .request-column>header,
html[data-theme="dark"] .crm-stage>header{background:#17313c!important;border-color:#31505d!important}
html[data-theme="dark"] .request-column>header span,
html[data-theme="dark"] .crm-stage>header span{background:#1d3a46!important;color:#b8c9d1!important}
html[data-theme="dark"] .request-card,
html[data-theme="dark"] .crm-card{background:#142b36!important;border-color:#31505d!important;color:#eef5f8!important}
html[data-theme="dark"] .request-card>p,
html[data-theme="dark"] .request-owner,
html[data-theme="dark"] .request-card>time,
html[data-theme="dark"] .crm-card>p,
html[data-theme="dark"] .crm-card-head span,
html[data-theme="dark"] .crm-card>time{color:#9fb2bc!important}
html[data-theme="dark"] .request-contact{border-color:#2e4956!important;color:#c1cfd5!important}
html[data-theme="dark"] .crm-card-tags span{background:#1b3540!important;color:#b7c8d0!important}
html[data-theme="dark"] .crm-card-tags span.warn{background:#3a2c1d!important;color:#efc27e!important}
html[data-theme="dark"] .crm-note{background:#10232d!important;border-color:#31505d!important}
html[data-theme="dark"] .crm-note strong{color:#a9bdc6!important}
html[data-theme="dark"] .crm-note span{color:#d7e2e7!important}
html[data-theme="dark"] .crm-context dt{color:#91a7b2!important}
html[data-theme="dark"] .crm-context dd{color:#dce7ec!important}
html[data-theme="dark"] .team-user-main strong{color:#eef5f8!important}
html[data-theme="dark"] .team-user-main span,
html[data-theme="dark"] .team-user-main small{color:#9fb2bc!important}

/* Notificações e ajuda/avisos */
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .notification-panel-foot{background:#142b36!important;border-color:#31505d!important;color:#eef5f8!important}
html[data-theme="dark"] .notification-item:hover,
html[data-theme="dark"] .notification-item.unread{background:#193743!important}
html[data-theme="dark"] .notification-item-copy span{color:#a9bbc4!important}
html[data-theme="dark"] .notification-permission-help,
html[data-theme="dark"] .notification-config-warning{background:#312a1c!important;border-color:#6e5b32!important;color:#e2cc98!important}

@media(max-width:820px){
  #intentProfileSelect,.intent-profile-bar select{height:46px!important;min-height:46px!important;font-size:14px!important}
  html[data-theme="dark"] .crm-conversation-item{background:#132934!important}
}

/* Relatório impresso / Salvar em PDF pelo navegador */
@media print{body{background:#fff!important;color:#111!important}.sidebar,.topbar,#view-reports .page-head .toolbar,.toast-wrap,.modal-backdrop{display:none!important}.app-shell,.main{display:block!important}.main{margin:0!important}.content{padding:0!important;max-width:none!important}.view{display:none!important}#view-reports{display:block!important}.report-hero{box-shadow:none!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.panel,.stat-card{break-inside:avoid;box-shadow:none!important}.report-grid{grid-template-columns:1fr 1fr!important}html[data-theme="dark"] #view-reports{color:#111!important}html[data-theme="dark"] #view-reports .panel,html[data-theme="dark"] #view-reports .stat-card{background:#fff!important;color:#111!important;border-color:#ddd!important}}

/* V8.42: remover fundos dos rankings em todo o sistema e melhorar legibilidade do dark */
.dashboard-rank-row,.report-rank-row{background:transparent!important;border:0!important;box-shadow:none!important;padding-left:0!important;padding-right:0!important}
.dashboard-rank-row:hover,.report-rank-row:hover{background:transparent!important}
.dashboard-rank-track,.report-rank-row span{background:rgba(92,168,201,.12)!important}
.dashboard-rank-copy>span,.report-rank-row>b{background:transparent!important;border:1px solid rgba(92,168,201,.38)!important;color:#69b7d6!important}
html[data-theme="dark"] .dashboard-rank-row,html[data-theme="dark"] .report-rank-row{background:transparent!important;border-color:transparent!important}
html[data-theme="dark"] .dashboard-rank-row:hover,html[data-theme="dark"] .report-rank-row:hover{background:transparent!important}
html[data-theme="dark"] .dashboard-rank-track,html[data-theme="dark"] .report-rank-row span{background:rgba(128,191,219,.12)!important}
html[data-theme="dark"] .dashboard-rank-copy>span,html[data-theme="dark"] .report-rank-row>b{background:transparent!important;border:1px solid rgba(120,197,226,.35)!important;color:#cdeaf5!important}
html[data-theme="dark"] .notification-panel-head{background:#142b36!important;border-color:#31505d!important}
html[data-theme="dark"] .notification-panel-head strong{color:#eef5f8!important}
html[data-theme="dark"] .notification-panel-head span{color:#a8bac3!important}
html[data-theme="dark"] .notification-item-copy strong{color:#eef5f8!important}
html[data-theme="dark"] .notification-item-copy small{color:#9db0ba!important}

/* V8.5 — consulta completa por protocolo */
.protocol-detail{display:flex;flex-direction:column;gap:16px}
.protocol-detail-top{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:13px;border-bottom:1px solid var(--line)}
.protocol-detail-top>div>span,.protocol-detail-grid span{display:block;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.045em;color:var(--muted);margin-bottom:4px}
.protocol-detail-top .protocol-code{font-size:20px}
.protocol-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.protocol-detail-grid>div{padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:transparent;min-width:0}
.protocol-detail-grid strong{display:block;font-size:12px;line-height:1.4;word-break:break-word}
.protocol-history-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:2px}
.protocol-history-title h4,.protocol-notes h4{margin:0;font-size:13px}
.protocol-history-title span{font-size:10px;color:var(--muted)}
.protocol-history{display:flex;flex-direction:column;gap:8px;max-height:360px;overflow:auto;padding:2px 2px 2px 0}
.protocol-msg{max-width:86%;padding:9px 10px;border:1px solid var(--line);border-radius:10px;background:transparent}
.protocol-msg.outbound{align-self:flex-end;border-color:#b8ddd0}
.protocol-msg.inbound{align-self:flex-start}
.protocol-msg-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:5px}
.protocol-msg-head strong{font-size:10px}.protocol-msg-head span{font-size:9px;color:var(--muted)}
.protocol-msg-body{font-size:11.5px;line-height:1.5;word-break:break-word}
.protocol-msg-media{display:inline-flex;margin-bottom:5px;padding:2px 6px;border:1px solid var(--line);border-radius:999px;font-size:9px;color:var(--muted)}
.protocol-notes{border-top:1px solid var(--line);padding-top:14px}.protocol-notes>div{padding:9px 0;border-bottom:1px solid var(--line)}.protocol-notes>div:last-child{border-bottom:0}.protocol-notes strong{font-size:10px}.protocol-notes span{float:right;font-size:9px;color:var(--muted)}.protocol-notes p{margin:4px 0 0;font-size:11px;line-height:1.45;color:var(--muted)}
html[data-theme="dark"] .protocol-detail-grid>div,html[data-theme="dark"] .protocol-msg{background:transparent!important;border-color:#31505d!important}
html[data-theme="dark"] .protocol-msg.outbound{border-color:#356a58!important}
html[data-theme="dark"] .protocol-msg-body,html[data-theme="dark"] .protocol-detail-grid strong{color:#eef5f8!important}
@media(max-width:620px){.protocol-detail-grid{grid-template-columns:1fr}.protocol-msg{max-width:94%}.protocol-detail-top{align-items:flex-start}}

/* V8.53 — mídia recebida dentro da conversa/protocolo */
.crm-media-asset{display:flex;flex-direction:column;align-items:flex-start;gap:5px;margin:0 0 6px;min-width:0}
.crm-media-asset>span{max-width:100%;font-size:9px;line-height:1.3;color:#7f909a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crm-media-open{display:block;padding:0;border:0;background:transparent;cursor:zoom-in;border-radius:9px;overflow:hidden;max-width:100%;text-align:left}
.crm-media-open:focus-visible{outline:2px solid var(--blue-500);outline-offset:2px}
.crm-media-open img{display:block;width:auto;height:auto;max-width:min(360px,100%);max-height:360px;object-fit:contain;border-radius:9px;background:#eef3f5}
.crm-media-asset.sticker .crm-media-open{overflow:visible}
.crm-media-asset.sticker .crm-media-open img{width:auto;max-width:180px;max-height:180px;background:transparent;border-radius:0}
.crm-media-asset.video video{display:block;width:min(420px,100%);max-height:360px;border-radius:9px;background:#081116}
.crm-media-asset.audio{width:min(360px,100%)}
.crm-media-asset.audio audio{display:block;width:100%;max-width:360px;height:38px}
.crm-media-asset.document{padding:7px 8px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.36)}
.crm-media-file-link,.crm-media-download{font-size:10.5px;font-weight:750;color:var(--blue-700);text-decoration:none;word-break:break-word}
.crm-media-download{font-size:9.5px;font-weight:700;text-decoration:underline;text-underline-offset:2px}
.crm-media-unavailable{display:flex;flex-direction:column;gap:2px;padding:7px 8px;margin-bottom:5px;border:1px dashed #c8d4da;border-radius:8px;color:#667984}
.crm-media-unavailable strong{font-size:10px}.crm-media-unavailable span{font-size:9px;line-height:1.4}
.crm-media-lightbox{display:grid;place-items:center;min-height:180px;max-height:72vh;overflow:auto;padding:8px}
.crm-media-lightbox img{display:block;max-width:100%;max-height:68vh;width:auto;height:auto;object-fit:contain;border-radius:8px}
.crm-media-lightbox.sticker img{max-width:min(420px,90%);background:transparent;border-radius:0}
.protocol-msg .crm-media-asset{margin-top:2px}.protocol-msg .crm-media-open img{max-width:min(300px,100%);max-height:280px}.protocol-msg .crm-media-asset.video video{width:min(340px,100%);max-height:280px}
html[data-theme="dark"] .crm-media-open img{background:#10232d}
html[data-theme="dark"] .crm-media-asset>span{color:#a9bbc4!important}
html[data-theme="dark"] .crm-media-asset.document{background:transparent!important;border-color:#31505d!important}
html[data-theme="dark"] .crm-media-file-link,html[data-theme="dark"] .crm-media-download{color:#9bdcf4!important}
html[data-theme="dark"] .crm-media-unavailable{border-color:#45606d!important;color:#c7d6dd!important;background:transparent!important}
html[data-theme="dark"] .crm-media-unavailable strong{color:#eef5f8!important}
html[data-theme="dark"] .crm-media-unavailable span{color:#a9bbc4!important}
@media(max-width:620px){.crm-media-open img{max-width:100%;max-height:300px}.crm-media-asset.video video{width:100%;max-height:300px}.crm-media-asset.audio{width:100%}.crm-media-asset.audio audio{max-width:none;width:100%}.crm-media-asset.sticker .crm-media-open img{max-width:150px;max-height:150px}}

/* V8.56 — áudio estilo WhatsApp + exclusão sincronizada de mensagens */
.crm-message-bubble{position:relative;padding-top:10px}
.crm-message-menu{position:absolute;right:5px;top:3px;width:28px;height:28px;border:0;border-radius:999px;background:transparent;color:#6f828d;font-size:18px;line-height:1;display:grid;place-items:center;cursor:pointer;opacity:.42;transition:.15s ease;z-index:2}
.crm-message-bubble:hover .crm-message-menu,.crm-message-menu:focus-visible{opacity:1;background:rgba(20,55,73,.08)}
.crm-message-text,.crm-media-asset,.crm-media-unavailable{padding-right:18px}
.crm-delete-message-box{padding:4px 2px 2px}.crm-delete-message-box strong{display:block;font-size:15px;color:var(--text)}.crm-delete-message-box p{margin:8px 0 0;line-height:1.55;color:var(--muted);font-size:12px}

.crm-composer.audio-active{grid-template-columns:1fr!important;padding-bottom:12px!important}
.crm-audio-state,.crm-audio-preview{grid-column:1/-1!important;width:100%;min-height:62px;display:grid;grid-template-columns:48px minmax(0,1fr) auto 50px;align-items:center;gap:10px;padding:7px 8px;border:1px solid #d8e2e7;border-radius:16px;background:#f8fafb;color:#263f4d}
.crm-audio-state[hidden],.crm-audio-preview[hidden]{display:none!important}
.crm-audio-trash,.crm-audio-rerecord,.crm-audio-send-now,.crm-audio-pause{border:0;cursor:pointer;min-width:44px;min-height:44px;border-radius:999px;display:grid;place-items:center;transition:.15s ease}
.crm-audio-trash{background:#fff1f1;color:#b42318;font-size:17px}
.crm-audio-trash:hover{background:#ffe1e1}
.crm-audio-rerecord{background:#e9f4f8;color:#16749d;font-size:17px}
.crm-audio-send-now{background:#17b964;color:#fff;font-size:22px;font-weight:900;padding-left:3px}
.crm-audio-send-now:hover{filter:brightness(.96);transform:translateY(-1px)}
.crm-audio-send-now:disabled,.crm-audio-trash:disabled,.crm-audio-rerecord:disabled,.crm-audio-pause:disabled{opacity:.45;cursor:wait;transform:none}
.crm-audio-live{display:grid;grid-template-columns:auto minmax(90px,1fr);align-items:center;gap:11px;min-width:0}
.crm-audio-live>strong{font-variant-numeric:tabular-nums;font-size:13px;color:#283f4d;white-space:nowrap}
.crm-audio-wave{height:30px;display:flex;align-items:center;gap:2px;min-width:0;overflow:hidden}
.crm-audio-wave i{width:3px;min-width:3px;height:var(--h);max-height:28px;border-radius:999px;background:#738b97;animation:crm-wave-live .72s ease-in-out infinite alternate;animation-delay:calc(var(--i) * -37ms);transform-origin:center}
@keyframes crm-wave-live{from{transform:scaleY(.35);opacity:.5}to{transform:scaleY(1);opacity:1}}
.crm-audio-pause{grid-auto-flow:column;grid-template-columns:auto auto;gap:6px;padding:0 15px;border-radius:22px;background:#e9edf0;color:#263f4d;font-size:12px}.crm-audio-pause span{font-size:14px}.crm-audio-pause b{font-weight:800}
.crm-audio-preview{grid-template-columns:48px minmax(0,1fr) 46px 50px}
.crm-audio-preview audio{width:100%;min-width:0;height:42px;display:block}

html[data-theme="dark"] .crm-message-menu{color:#d8e6ed!important}
html[data-theme="dark"] .crm-message-bubble:hover .crm-message-menu,html[data-theme="dark"] .crm-message-menu:focus-visible{background:rgba(255,255,255,.09)!important;color:#fff!important}
html[data-theme="dark"] .crm-delete-message-box strong{color:#fff!important}html[data-theme="dark"] .crm-delete-message-box p{color:#c3d2d9!important}
html[data-theme="dark"] .crm-audio-state,html[data-theme="dark"] .crm-audio-preview{background:#102631!important;border-color:#35515e!important;color:#fff!important}
html[data-theme="dark"] .crm-audio-live>strong{color:#fff!important}
html[data-theme="dark"] .crm-audio-wave i{background:#b6c9d2!important}
html[data-theme="dark"] .crm-audio-trash{background:#3a2326!important;color:#ffaaa3!important}
html[data-theme="dark"] .crm-audio-trash:hover{background:#4a282c!important}
html[data-theme="dark"] .crm-audio-rerecord{background:#173746!important;color:#a8e1f6!important}
html[data-theme="dark"] .crm-audio-pause{background:#263943!important;color:#fff!important}
html[data-theme="dark"] .crm-audio-send-now{background:#1fbd67!important;color:#071b10!important}

@media(max-width:820px){
  .crm-audio-state{grid-template-columns:44px minmax(0,1fr) 44px 48px;gap:7px;padding:6px}
  .crm-audio-pause{width:44px;padding:0;font-size:0}.crm-audio-pause span{font-size:16px}.crm-audio-pause b{display:none}
  .crm-audio-live{grid-template-columns:auto minmax(56px,1fr);gap:7px}.crm-audio-wave{gap:1px}.crm-audio-wave i{width:2px;min-width:2px}
  .crm-audio-preview{grid-template-columns:44px minmax(0,1fr) 44px 48px;gap:7px;padding:6px}
  .crm-audio-preview audio{height:44px}
  .crm-message-menu{opacity:.72;width:30px;height:30px}
}
@media(max-width:520px){
  .crm-audio-state{grid-template-columns:42px minmax(0,1fr) 42px 46px}
  .crm-audio-live>strong{font-size:11px}.crm-audio-wave{height:26px}.crm-audio-wave i:nth-child(n+25){display:none}
  .crm-audio-preview{grid-template-columns:42px minmax(0,1fr) 42px 46px}.crm-audio-preview audio{min-width:0}
}


/* ==========================================================
   V8.60 — Direção visual madura / operacional
   Objetivo: remover sinais visuais genéricos de "layout de IA"
   sem sacrificar clareza, identidade Maresias ou usabilidade.
   ========================================================== */

:root{
  --radius:8px;
  --shadow:none;
}

/* Nada de degradê, grade decorativa, glow ou textura artificial.
   Elementos funcionais do editor (conexões, handles, waveform etc.) permanecem. */
.login-brand,
.login-brand::before,
.login-brand::after,
.crm-empty-chat,
.crm-message-area,
.dashboard-stat-card,
.dashboard-stat-card.is-attention,
.dashboard-bar-track span,
.recovery-page,
.flow-stage-wrap,
.report-hero,
html[data-theme="dark"] .crm-empty-chat,
html[data-theme="dark"] .crm-message-area,
html[data-theme="dark"] .dashboard-stat-card.is-attention,
html[data-theme="dark"] .flow-stage-wrap{
  background-image:none!important;
}

/* Remove somente decoração sem função. */
.login-brand::before,
.login-brand::after,
.login-brand-orbit,
.sidebar::before,
.sidebar::after,
.sidebar-brand span::before,
.sidebar-brand span::after,
.dashboard-stat-card::after,
.login-art-halo,
.flow-visual::before,
.report-hero::after{
  display:none!important;
  content:none!important;
}
.flow-lockup-line{display:none!important}

/* Login: sólido, limpo e corporativo. */
.login-page,.login-shell,.login-brand{background:#073f60!important}
.login-layout{grid-template-columns:minmax(520px,1fr) minmax(420px,.86fr)!important;justify-content:stretch!important;gap:clamp(30px,4vw,64px)!important}.brand-copy{width:min(690px,100%)!important}.login-logo-wrap{width:min(620px,100%)!important}
.flow-lockup{width:auto;justify-content:flex-start;margin:14px 0 0;gap:0}
.flow-word{padding-left:0;letter-spacing:.42em;font-size:clamp(22px,1.8vw,30px);font-weight:600}
.login-logo{filter:none!important}
.login-field{border-radius:8px;background:#0a4b6f!important;box-shadow:none!important}
.login-field:focus-within{background:#0b5279!important;box-shadow:0 0 0 2px rgba(129,211,247,.18)!important}
.login-submit{border-radius:8px;box-shadow:none!important;transform:none!important}
.login-submit:hover{box-shadow:none!important;transform:none!important}
.login-remember-box{border-radius:4px;box-shadow:none!important}
.login-forgot{border-bottom:0!important;text-decoration:underline;text-underline-offset:3px}

/* Estrutura: menos "cards soltos", mais software de operação. */
.sidebar,.topbar,.panel,.stat-card,.entity-card,.modal,.crm-inbox-shell,.flow-layout,
.notification-panel,.notification-device-card,.notification-check,.request-column,.crm-stage{
  box-shadow:none!important;
}
.sidebar{background:#fff!important}
.topbar{backdrop-filter:none!important;background:#fff!important}
.nav-btn{border-radius:6px!important}
.nav-btn.active{box-shadow:inset 3px 0 var(--blue-700)!important}

/* Cabeçalho operacional: data/hora ao vivo. */
.top-actions{gap:8px!important}
.top-datetime{display:flex;align-items:baseline;gap:8px;padding:0 10px 0 2px;white-space:nowrap;font-variant-numeric:tabular-nums;color:#536571}
.top-date{font-size:11px;font-weight:700}
.top-time{font-size:13px;font-weight:800;color:#263b48;letter-spacing:.015em}

/* Controles mais sóbrios. */
.btn,.input,.select,.textarea,.mini-input,.mini-select,.crm-search,.crm-side-input,
.theme-toggle,.notification-bell,.status-pill,.crm-details-btn,.crm-icon-btn{
  border-radius:7px!important;
  box-shadow:none!important;
}
.btn-primary{background:#0873ad!important;border-color:#0873ad!important}
.btn-primary:hover{background:#075f91!important;border-color:#075f91!important;transform:none!important}
.btn-secondary:hover,.btn-ghost:hover{transform:none!important}
.status-pill{padding:7px 9px!important}

/* Pílulas decorativas viram marcadores compactos de estado. */
.tag,.mini-state,.crm-side-status,.crm-filter,.intent-filter,.dashboard-period,
.protocol-status,.flow-profile-status,.crm-chat-chip,.protocol-msg-media{
  border-radius:6px!important;
}
.dashboard-period button{border-radius:5px!important}

/* Cards/painéis com hierarquia por borda e espaçamento, não por efeitos. */
.panel,.stat-card,.entity-card,.flow-layout{border-radius:8px!important}
.stat-card{padding:16px!important;min-height:104px!important}
.stat-value{font-size:28px!important}
.panel-head{padding:13px 15px!important}
.panel-body{padding:15px!important}
.entity-card{transition:border-color .12s ease!important}
.entity-card:hover{box-shadow:none!important;border-color:#aebfc9!important}

/* Dashboard: remover ornamentos; preservar leitura dos dados. */
.dashboard-stat-card{background:#fff!important}
.dashboard-stat-card.is-attention{background:#fff!important;border-color:#d9b975!important}
.dashboard-bar-track span{background-color:#1187c5!important;box-shadow:none!important}
.dashboard-mini-strip,.dashboard-mini-item,.dashboard-mix-grid>div,.dashboard-storage-list>div,
.dashboard-rank-row,.report-rank-row{box-shadow:none!important}
.dashboard-rank-row,.report-rank-row{background:transparent!important}
.dashboard-rank-row:hover,.report-rank-row:hover{background:transparent!important}

/* Relatório: faixa sólida, sem hero de landing page. */
.report-hero{background:var(--surface)!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-left:4px solid var(--blue-700)!important;border-radius:8px!important;box-shadow:none!important}.report-hero span{color:var(--blue-700)!important}.report-hero h3{color:var(--ink)!important}.report-hero p{color:var(--muted)!important}
.report-hero-badge{border-radius:7px!important;background:transparent!important;border-color:var(--line)!important;color:var(--ink)!important}.report-hero-badge span{color:var(--muted)!important}

/* Conversa: superfície lisa; sem pontilhado/efeito de wallpaper artificial. */
.crm-chat-panel{background:#eef2f4!important}
.crm-empty-chat{background:#eef2f4!important}
.crm-message-area{background-color:#eef2f4!important;background-image:none!important}
.crm-empty-mark{border-radius:8px!important;box-shadow:none!important}
.crm-message-bubble{box-shadow:none!important;border:1px solid #e0e6ea!important;border-radius:8px!important}
.crm-message-row.outbound .crm-message-bubble{border-color:#c6e0d2!important;border-bottom-right-radius:3px!important}
.crm-message-row.inbound .crm-message-bubble{border-bottom-left-radius:3px!important}
.crm-day-sep span{box-shadow:none!important;border:1px solid #d8e1e6!important;border-radius:6px!important}
.crm-history-start{border-radius:7px!important}
.crm-conversation-item.active{box-shadow:inset 3px 0 #1689c0!important}
.crm-chat-chip{background:transparent!important}

/* Editor de fluxo: conexões são função; decoração de fundo não. */
.flow-stage-wrap{background-color:#f4f6f7!important;background-image:none!important}
.flow-node{border-radius:7px!important;box-shadow:none!important}
.flow-node:not(.selected){box-shadow:none!important}
.flow-node.selected{box-shadow:0 0 0 2px rgba(17,135,197,.13)!important}
.flow-layout{border-radius:8px!important}
.flow-profile-dock,.intent-profile-bar{box-shadow:none!important;border-radius:8px!important}

/* Modal e menus: apenas o necessário para separar camadas. */
.modal{border-radius:9px!important;box-shadow:0 16px 42px rgba(14,34,46,.18)!important}
.notification-panel{border-radius:9px!important;box-shadow:0 14px 34px rgba(14,34,46,.14)!important}

/* Recuperação de senha no mesmo padrão sólido. */
.recovery-page{background:#073f60!important}
.recovery-card{background:#073f60!important;backdrop-filter:none!important;border-radius:10px!important;box-shadow:none!important}
.recovery-field input,.recovery-security-note,.password-policy,.recovery-success,.recovery-invalid{border-radius:7px!important}

/* DARK: contraste real. Nada de texto cinza-escuro em fundo escuro. */
html[data-theme="dark"]{
  --ink:#f5f7f9!important;
  --muted:#c2cdd3!important;
  --line:#344853!important;
  --surface:#12232c!important;
  --canvas:#0b151b!important;
}
html[data-theme="dark"] body{background:#0b151b!important;color:#f5f7f9!important}
html[data-theme="dark"] .sidebar{background:#0f2028!important;border-color:#344853!important}
html[data-theme="dark"] .sidebar-bottom{background:#0f2028!important;border-color:#344853!important}
html[data-theme="dark"] .topbar{background:#0f2028!important;border-color:#344853!important;backdrop-filter:none!important}
html[data-theme="dark"] .content,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .entity-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .modal-head,
html[data-theme="dark"] .modal-foot,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .notification-panel-head,
html[data-theme="dark"] .notification-panel-foot{
  color:#f5f7f9!important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] strong,
html[data-theme="dark"] label,
html[data-theme="dark"] .field>label,
html[data-theme="dark"] .switch-copy strong,
html[data-theme="dark"] .notification-item-copy strong,
html[data-theme="dark"] .notification-panel-head strong,
html[data-theme="dark"] .crm-list-row strong,
html[data-theme="dark"] .crm-chat-title strong,
html[data-theme="dark"] .protocol-msg-body,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table td strong{
  color:#fff!important;
}
html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] .help,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .page-head p,
html[data-theme="dark"] .top-title p,
html[data-theme="dark"] .notification-item-copy span,
html[data-theme="dark"] .notification-item-copy small,
html[data-theme="dark"] .notification-panel-head span,
html[data-theme="dark"] .switch-copy span,
html[data-theme="dark"] .file-meta,
html[data-theme="dark"] .crm-list-phone,
html[data-theme="dark"] .crm-list-preview>span,
html[data-theme="dark"] .crm-list-tags,
html[data-theme="dark"] .crm-message-foot,
html[data-theme="dark"] .crm-media-label,
html[data-theme="dark"] .protocol-msg-head span{
  color:#c2cdd3!important;
}
html[data-theme="dark"] .top-datetime{color:#c4d0d6!important}
html[data-theme="dark"] .top-time{color:#fff!important}
html[data-theme="dark"] .nav-btn{color:#d5dee3!important}
html[data-theme="dark"] .nav-btn .nav-icon{color:#a8bac3!important}
html[data-theme="dark"] .nav-btn:hover{background:#172d37!important;color:#fff!important}
html[data-theme="dark"] .nav-btn.active{background:#173848!important;color:#fff!important;box-shadow:inset 3px 0 #35a8d5!important}
html[data-theme="dark"] .nav-btn.active .nav-icon{color:#7bd2f2!important}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .entity-card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .notification-panel,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .notification-panel-head,
html[data-theme="dark"] .notification-panel-foot,
html[data-theme="dark"] .crm-inbox-shell,
html[data-theme="dark"] .crm-conversation-list,
html[data-theme="dark"] .crm-chat-head,
html[data-theme="dark"] .crm-contact-panel,
html[data-theme="dark"] .crm-side-head,
html[data-theme="dark"] .crm-side-section,
html[data-theme="dark"] .flow-inspector,
html[data-theme="dark"] .inspector-head,
html[data-theme="dark"] .inspector-save{
  background:#12232c!important;
  border-color:#344853!important;
}
html[data-theme="dark"] .panel-head,
html[data-theme="dark"] .panel-body{border-color:#344853!important}
html[data-theme="dark"] .crm-chat-panel,
html[data-theme="dark"] .crm-empty-chat,
html[data-theme="dark"] .crm-message-area,
html[data-theme="dark"] body:not(.flow-view-active) #view-inbox.active{background:#0c181e!important;background-image:none!important}
html[data-theme="dark"] .crm-message-bubble{background:#172b34!important;color:#fff!important;border-color:#36505b!important}
html[data-theme="dark"] .crm-message-row.outbound .crm-message-bubble{background:#163c30!important;border-color:#356353!important}
html[data-theme="dark"] .crm-message-row.outbound .crm-message-bubble.bot{background:#153746!important;border-color:#356071!important}
html[data-theme="dark"] .crm-conversation-item{background:#12232c!important;border-color:#304651!important;color:#fff!important}
html[data-theme="dark"] .crm-conversation-item:hover{background:#162b35!important}
html[data-theme="dark"] .crm-conversation-item.active{background:#183847!important;box-shadow:inset 3px 0 #35a8d5!important}
html[data-theme="dark"] .crm-chat-chip{background:transparent!important;border-color:#405762!important;color:#eef4f6!important}
html[data-theme="dark"] .flow-stage-wrap{background:#0d1a20!important;background-image:none!important}
html[data-theme="dark"] .flow-node{background:#12252e!important;border-color:#405762!important;color:#fff!important;box-shadow:none!important}
html[data-theme="dark"] .flow-node .node-head,
html[data-theme="dark"] .node-main .node-head{background:#17303a!important;border-color:#344d58!important}
html[data-theme="dark"] .flow-node .node-content{background:#12252e!important}
html[data-theme="dark"] .report-hero{background:#12232c!important;background-image:none!important;border-color:#344853!important;border-left-color:#35a8d5!important;color:#fff!important}html[data-theme="dark"] .report-hero span{color:#7bd2f2!important}html[data-theme="dark"] .report-hero h3{color:#fff!important}html[data-theme="dark"] .report-hero p{color:#c2cdd3!important}
html[data-theme="dark"] .report-hero-badge{background:transparent!important;border-color:#405762!important;color:#fff!important}html[data-theme="dark"] .report-hero-badge span{color:#c2cdd3!important}

/* Configurações/notificações: texto principal sempre branco no dark. */
html[data-theme="dark"] .notification-check,
html[data-theme="dark"] .notification-device-card{background:transparent!important;border-color:#405762!important}
html[data-theme="dark"] .notification-check strong,
html[data-theme="dark"] .notification-device-card strong,
html[data-theme="dark"] .notification-repeat-field label,
html[data-theme="dark"] .notification-minutes span{color:#fff!important}
html[data-theme="dark"] .notification-check small,
html[data-theme="dark"] .notification-device-card span{color:#c2cdd3!important}

/* Tabelas sem faixa clara/artificial. */
html[data-theme="dark"] .table th{background:#102129!important;color:#d5dee3!important;border-color:#344853!important}
html[data-theme="dark"] .table td{border-color:#2f424c!important}

/* Mobile: mantém data/hora útil sem esmagar o cabeçalho. */
@media(max-width:1100px){
  .top-datetime{display:none!important}
}
@media(max-width:900px){
  .login-layout{grid-template-columns:1fr!important}
}
@media(max-width:560px){
  .flow-word{font-size:18px!important}
}


/* ================================================================
   V8.61 — Conversas mobile maduras + gravador pausável/retomável
   ================================================================ */
.crm-mobile-actions-toggle{display:none;width:38px;height:38px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:7px;font-size:22px;line-height:1;align-items:center;justify-content:center;cursor:pointer}
.crm-clear-chat-btn{white-space:nowrap}
.crm-audio-state.is-paused{grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center}
.crm-audio-state.is-paused .crm-audio-live{grid-column:2;min-width:0}
.crm-audio-pause-player{grid-column:1/-1;width:100%;height:38px;margin-top:4px;min-width:0}
.crm-audio-state.is-paused .crm-audio-pause{grid-column:2;justify-self:center}
.crm-audio-state.is-paused .crm-audio-send-now{grid-column:3;grid-row:1/3}
@media(max-width:820px){
body.inbox-view-active.crm-chat-open .topbar{display:none!important}body.inbox-view-active.crm-chat-open .content{height:100vh!important;height:100dvh!important;padding:0!important}body.inbox-view-active.crm-chat-open #view-inbox.active{height:100vh!important;height:100dvh!important;margin:0!important}body.inbox-view-active.crm-chat-open .crm-inbox-shell{height:100vh!important;height:100dvh!important}
.crm-conversation-list{background:var(--surface)!important}.crm-list-head{min-height:62px;padding:11px 12px!important;border-bottom:1px solid var(--line);background:var(--surface)}.crm-list-head h2{font-size:18px!important;margin:0!important}.crm-list-head p{font-size:10px!important;margin-top:1px!important}.crm-search-wrap{padding:10px 10px 5px!important}.crm-search{height:42px!important;font-size:16px!important}.crm-filter-row{padding:5px 10px 9px!important;gap:6px!important;overflow-x:auto;white-space:nowrap;scrollbar-width:none}.crm-filter-row::-webkit-scrollbar{display:none}.crm-filter{min-height:34px!important;padding:6px 10px!important;font-size:11px!important;flex:0 0 auto}.crm-conversations{padding-bottom:max(10px,env(safe-area-inset-bottom))}.crm-conversation-item{min-height:78px!important;padding:10px!important;gap:10px!important;border-bottom:1px solid var(--line)!important;border-radius:0!important}.crm-list-avatar{width:46px!important;height:46px!important;flex:0 0 46px!important}.crm-list-copy{min-width:0!important}.crm-list-row strong{font-size:13px!important;line-height:1.2;max-width:calc(100vw - 165px)!important}.crm-list-row time{font-size:9px!important}.crm-list-phone{font-size:10px!important;margin-top:2px!important}.crm-list-preview{margin-top:4px!important;gap:7px!important}.crm-list-preview>span{font-size:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.crm-list-tags{margin-top:4px!important;gap:4px!important}.crm-list-tags>span:not(.mini-state){display:none!important}.mini-state{font-size:9px!important;padding:2px 5px!important}
.crm-chat-head{position:relative!important;display:grid!important;grid-template-columns:38px 38px minmax(0,1fr) 38px!important;align-items:center!important;gap:7px!important;height:62px!important;min-height:62px!important;padding:8px 9px!important;background:var(--surface)!important;border-bottom:1px solid var(--line)!important;z-index:20}.crm-mobile-back{display:grid!important;place-items:center;width:38px!important;height:38px!important;border:0!important;background:transparent!important;font-size:21px!important}.crm-chat-avatar{width:38px!important;height:38px!important;flex-basis:38px!important}.crm-chat-title{min-width:0!important}.crm-chat-title strong{font-size:13px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.crm-chat-title span{font-size:10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;margin-top:2px}.crm-mobile-actions-toggle{display:grid!important}.crm-chat-actions{display:none!important;position:absolute!important;right:8px!important;top:56px!important;z-index:70!important;width:min(250px,calc(100vw - 20px))!important;padding:7px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--surface)!important;box-shadow:0 12px 30px rgba(0,0,0,.18)!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important}.crm-chat-actions.mobile-open{display:flex!important}.crm-chat-actions .crm-mode-chip{display:block!important;text-align:left!important;width:100%!important;padding:7px 9px!important;border:0!important;background:transparent!important}.crm-chat-actions .btn,.crm-chat-actions .crm-details-btn{display:flex!important;width:100%!important;min-height:40px!important;justify-content:flex-start!important;align-items:center!important;padding:9px 10px!important;font-size:12px!important;border-radius:6px!important}.crm-chat-actions #crmFinalizeChat{font-size:12px!important;width:100%!important;padding:9px 10px!important}.crm-chat-actions #crmFinalizeChat:after{content:none!important}
.crm-chat-summary{min-height:36px!important;max-height:42px!important;padding:5px 8px!important;display:flex!important;align-items:center!important;gap:6px!important;overflow-x:auto!important;overflow-y:hidden!important;white-space:nowrap!important;scrollbar-width:none;background:var(--surface)!important;border-bottom:1px solid var(--line)!important}.crm-chat-summary::-webkit-scrollbar{display:none}.crm-chat-chip{flex:0 0 auto!important;font-size:9.5px!important;padding:5px 7px!important}
.crm-message-area{padding:10px 8px 14px!important;overscroll-behavior:contain!important}.crm-message-row{margin:5px 0!important}.crm-message-bubble{max-width:87%!important;min-width:72px!important;padding:8px 9px 6px!important;border-radius:8px!important;font-size:13px!important;line-height:1.42!important}.crm-message-text{font-size:13px!important;line-height:1.42!important;word-break:break-word!important}.crm-message-foot{font-size:8.5px!important;margin-top:4px!important;gap:6px!important}.crm-message-menu{width:28px!important;height:28px!important;right:1px!important;top:1px!important;font-size:18px!important}.crm-media-asset img,.crm-media-asset video{max-width:min(72vw,320px)!important;max-height:52vh!important;height:auto!important;border-radius:7px!important}.crm-media-asset.audio audio{width:min(72vw,310px)!important;max-width:100%!important;height:42px!important}.crm-media-unavailable{max-width:min(74vw,330px)!important;padding:8px!important}.crm-media-unavailable strong{font-size:11px!important}.crm-media-unavailable span{font-size:9.5px!important;line-height:1.35!important}.crm-day-sep{margin:10px 0!important}.crm-day-sep span{font-size:9px!important;padding:4px 7px!important}
.crm-composer{position:relative!important;grid-template-columns:46px minmax(0,1fr) 48px!important;gap:6px!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;background:var(--surface)!important;border-top:1px solid var(--line)!important;align-items:end!important}.crm-audio-btn{width:44px!important;min-width:44px!important;height:44px!important;border-radius:8px!important;font-size:18px!important}.crm-composer-input{min-height:44px!important;max-height:92px!important;font-size:16px!important;line-height:1.3!important;padding:11px 12px!important;border-radius:8px!important;resize:none!important}.crm-send-btn{width:48px!important;min-width:48px!important;height:44px!important;padding:0!important;font-size:0!important;border-radius:8px!important}.crm-send-btn:after{content:'➤';font-size:18px!important}.crm-composer-hint{display:none!important}.crm-composer.audio-active{display:block!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important}.crm-audio-state,.crm-audio-preview{width:100%!important;min-height:58px!important;border:0!important;background:transparent!important;padding:2px!important;gap:7px!important}.crm-audio-state{grid-template-columns:44px minmax(0,1fr) auto 46px!important}.crm-audio-state.is-paused{grid-template-columns:44px minmax(0,1fr) 46px!important;grid-template-rows:auto auto auto!important}.crm-audio-state.is-paused .crm-audio-live{grid-column:2!important;grid-row:1!important}.crm-audio-state.is-paused .crm-audio-pause{grid-column:2!important;grid-row:3!important;justify-self:start!important}.crm-audio-state.is-paused .crm-audio-send-now{grid-column:3!important;grid-row:1/4!important;align-self:center!important}.crm-audio-pause-player{grid-column:1/3!important;grid-row:2!important;width:100%!important;height:40px!important;margin:2px 0!important}.crm-audio-live{min-width:0!important}.crm-audio-wave{min-width:0!important;overflow:hidden!important}.crm-audio-pause{min-height:40px!important;padding:7px 10px!important;border-radius:8px!important;font-size:11px!important}.crm-audio-trash,.crm-audio-send-now,.crm-audio-rerecord{width:44px!important;height:44px!important;min-width:44px!important;border-radius:8px!important}.crm-audio-preview{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;align-items:center!important}.crm-audio-preview[hidden]{display:none!important}.crm-audio-preview audio{width:100%!important;min-width:0!important;height:42px!important}.crm-audio-rerecord{display:none!important}
html[data-theme="dark"] .crm-chat-head,html[data-theme="dark"] .crm-chat-summary,html[data-theme="dark"] .crm-composer,html[data-theme="dark"] .crm-chat-actions{background:#12232c!important;border-color:#344853!important}
}
@media(max-width:420px){.crm-message-bubble{max-width:91%!important}.crm-media-asset img,.crm-media-asset video,.crm-media-asset.audio audio{max-width:79vw!important}.crm-chat-summary{min-height:34px!important}}


/* ==========================================================
   V8.62 — ARTE OFICIAL DO LOGIN É FIXA
   A peça criada pela Maresias (pessoa + celular + produtos/gel)
   faz parte da identidade do Flow e NÃO deve ser ocultada.
   Ornamentos ao redor podem continuar removidos.
   ========================================================== */
.flow-visual{display:flex!important}
.login-flow-art{display:block!important;visibility:visible!important;opacity:1!important}
@media(max-width:900px){
  .flow-visual{display:flex!important}
}

/* ================================================================
   V8.64 — áudio instantâneo: prévia estável enquanto pausado
   A prévia usa PCM/WAV local, não fragmentos WebM ainda abertos.
   ================================================================ */
.crm-audio-inline-player{min-width:0;width:100%;display:grid;grid-template-columns:34px minmax(70px,1fr) auto;align-items:center;gap:8px}
.crm-audio-inline-player[hidden]{display:none!important}
.crm-audio-play{width:34px;height:34px;min-width:34px;border:0;border-radius:50%;display:grid;place-items:center;background:#263f4d;color:#fff;cursor:pointer;padding:0;font-size:13px;line-height:1}
.crm-audio-play span{display:block;transform:translateX(1px)}
.crm-audio-seek{width:100%;min-width:0;height:28px;margin:0;accent-color:#267da4;cursor:pointer}
.crm-audio-play-time{font-size:10px;font-variant-numeric:tabular-nums;color:#667b86;white-space:nowrap;min-width:62px;text-align:right}
#crmAudioPausePlayer,#crmAudioPreviewPlayer{display:none!important}
.crm-audio-state.is-paused{grid-template-columns:48px minmax(0,1fr) auto 50px!important;grid-template-rows:auto auto!important}
.crm-audio-state.is-paused .crm-audio-trash{grid-column:1!important;grid-row:1/3!important;align-self:center}
.crm-audio-state.is-paused .crm-audio-live{grid-column:2!important;grid-row:1!important}
.crm-audio-state.is-paused .crm-audio-pause{grid-column:3!important;grid-row:1!important;justify-self:end!important}
.crm-audio-state.is-paused #crmAudioPauseControls{grid-column:2/4!important;grid-row:2!important;margin-top:2px}
.crm-audio-state.is-paused .crm-audio-send-now{grid-column:4!important;grid-row:1/3!important;align-self:center!important}
.crm-audio-preview .crm-audio-inline-player{grid-column:2!important;min-width:0}
html[data-theme="dark"] .crm-audio-play{background:#dce9ef!important;color:#10232d!important}
html[data-theme="dark"] .crm-audio-play-time{color:#c5d4dc!important}
html[data-theme="dark"] .crm-audio-seek{accent-color:#8ed7f3}

@media(max-width:820px){
  .crm-audio-state.is-paused{display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px 48px!important;grid-template-rows:auto!important;align-items:center!important;gap:7px!important}
  .crm-audio-state.is-paused .crm-audio-trash{grid-column:1!important;grid-row:1!important}
  .crm-audio-state.is-paused .crm-audio-live{display:none!important}
  .crm-audio-state.is-paused #crmAudioPauseControls{grid-column:2!important;grid-row:1!important;margin:0!important}
  .crm-audio-state.is-paused .crm-audio-pause{grid-column:3!important;grid-row:1!important;justify-self:center!important;width:44px!important;padding:0!important}
  .crm-audio-state.is-paused .crm-audio-send-now{grid-column:4!important;grid-row:1!important;align-self:center!important}
  .crm-audio-inline-player{grid-template-columns:32px minmax(54px,1fr) auto;gap:6px}
  .crm-audio-play{width:32px;height:32px;min-width:32px;font-size:12px}
  .crm-audio-play-time{font-size:9px;min-width:52px}
  .crm-audio-seek{height:26px}
  .crm-audio-preview{grid-template-columns:44px minmax(0,1fr) 48px!important}
  .crm-audio-preview .crm-audio-inline-player{grid-column:2!important}
  .crm-audio-preview .crm-audio-send-now{grid-column:3!important}
}
@media(max-width:390px){
  .crm-audio-inline-player{grid-template-columns:30px minmax(42px,1fr) auto;gap:4px}
  .crm-audio-play{width:30px;height:30px;min-width:30px}
  .crm-audio-play-time{font-size:8px;min-width:46px}
}

/* ========================================================================== 
   V8.65 · Lembretes individuais de clientes
   Operacional, direto e sem ornamentos decorativos.
   ========================================================================== */
.reminder-nav-count.urgent{background:#b42318!important;color:#fff!important}
.reminder-page-head{align-items:flex-start}
.reminder-levels{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 16px}
.reminder-level{display:inline-flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid #d8e0e5;border-radius:8px;background:#fff;color:#43535d;font-size:12px;line-height:1.25}
.reminder-level i{width:8px;height:8px;border-radius:50%;background:#7a8992;flex:0 0 auto}
.reminder-level b{color:#172b35}
.reminder-level.urgent i{background:#b42318}.reminder-level.normal i{background:#c56a08}.reminder-level.low i{background:#6c7b85}
.reminder-summary{margin-bottom:14px}
.reminder-summary>div.danger strong{color:#b42318}
.reminder-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}
.reminder-filter-row{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.reminder-filter{appearance:none;border:1px solid #ced9df;background:#fff;color:#42535d;border-radius:7px;padding:8px 12px;font:600 12px/1 Manrope,sans-serif;cursor:pointer}
.reminder-filter.active{background:#123f56;color:#fff;border-color:#123f56}
.reminder-search{width:min(360px,100%)}
.reminder-list{display:grid;gap:9px}
.reminder-empty{min-height:190px;border:1px dashed #cbd6dc;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;color:#6d7c85}
.reminder-empty strong{font-size:16px;color:#263a44;margin-bottom:5px}.reminder-empty span{font-size:13px;max-width:430px}
.reminder-card{display:grid;grid-template-columns:94px minmax(0,1fr) auto;align-items:center;gap:16px;background:#fff;border:1px solid #d9e1e5;border-left:4px solid #788790;border-radius:9px;padding:14px 14px 14px 12px}
.reminder-card.urgente{border-left-color:#b42318}.reminder-card.normal{border-left-color:#c56a08}.reminder-card.baixo{border-left-color:#6c7b85}
.reminder-card.overdue{border-color:#e7b9b4;border-left-color:#b42318}.reminder-card.completed{opacity:.7;border-left-color:#8b999f}
.reminder-card-priority{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#5a6972}
.reminder-card-priority i{width:8px;height:8px;border-radius:50%;background:#788790}.reminder-card.urgente .reminder-card-priority i{background:#b42318}.reminder-card.normal .reminder-card-priority i{background:#c56a08}
.reminder-card-main{min-width:0}.reminder-card-contact{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:2px}.reminder-card-contact strong{font-size:12px;color:#38505c}.reminder-card-contact span{font-size:11px;color:#7a8992}
.reminder-card-main h3{margin:2px 0 3px;font-size:15px;line-height:1.3;color:#132b36}.reminder-card-main p{margin:0 0 6px;color:#667780;font-size:12px;line-height:1.45}
.reminder-card-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:#74838c}.reminder-overdue-label{color:#b42318;text-transform:uppercase;font-size:10px;letter-spacing:.04em}
.reminder-card-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.reminder-client-fixed{border:1px solid #d8e0e5;border-radius:8px;padding:10px 12px;background:#f8fafb;display:flex;flex-direction:column;gap:2px}.reminder-client-fixed span{font-size:11px;color:#75848d}.reminder-client-fixed strong{font-size:14px;color:#1d333e}
.reminder-form{display:grid;gap:14px}.reminder-form .field{margin:0}.reminder-form .field label{display:block;margin-bottom:6px}.reminder-form .field label small{font-weight:500;color:#81909a}
.reminder-priority-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.reminder-priority-option{display:block;cursor:pointer}.reminder-priority-option input{position:absolute;opacity:0;pointer-events:none}.reminder-priority-option>span{display:flex;min-height:82px;flex-direction:column;gap:5px;padding:10px;border:1px solid #d5dfe4;border-radius:8px;background:#fff}.reminder-priority-option b{font-size:13px;color:#283d47}.reminder-priority-option small{font-size:10.5px;line-height:1.4;color:#718089}
.reminder-priority-option input:checked+span{border-width:2px;padding:9px;background:#f7fafb}.reminder-priority-option.urgente input:checked+span{border-color:#b42318}.reminder-priority-option.normal input:checked+span{border-color:#c56a08}.reminder-priority-option.baixo input:checked+span{border-color:#657680}
.reminder-owner-note{font-size:11px;line-height:1.4;color:#687983;border-top:1px solid #e1e7ea;padding-top:10px}.reminder-owner-note b{color:#314954}
.reminder-snooze-copy{display:flex;flex-direction:column;gap:4px;margin-bottom:14px}.reminder-snooze-copy strong{color:#1e333e}.reminder-snooze-copy span{font-size:12px;color:#71818a}
.reminder-snooze-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.reminder-snooze-options button{min-height:48px;border:1px solid #cbd8df;background:#fff;border-radius:8px;color:#173b4d;font-weight:800;cursor:pointer}.reminder-snooze-options button:hover{background:#f3f7f9}
.crm-chat-chip.reminder{border-left:3px solid #c56a08}.crm-chat-chip.reminder.urgente{border-left-color:#b42318}.crm-chat-chip.reminder.baixo{border-left-color:#6c7b85}
.crm-mini-card.reminder-open{border-left:3px solid #c56a08}.crm-mini-card.reminder-open.urgente{border-left-color:#b42318}.crm-mini-card.reminder-open.baixo{border-left-color:#6c7b85}
.priority-dot.baixo{background:#6c7b85}.priority-dot.normal{background:#c56a08}.priority-dot.urgente{background:#b42318}

.reminder-alert-stack{position:fixed;right:18px;bottom:18px;z-index:1200;width:min(410px,calc(100vw - 36px));display:grid;gap:9px;pointer-events:none}
.reminder-alert{pointer-events:auto;border:1px solid #cbd7dd;border-left:5px solid #c56a08;border-radius:9px;background:#fff;padding:13px 14px;color:#213741}
.reminder-alert.urgente{border-color:#e0aaa4;border-left-color:#b42318}
.reminder-alert-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}.reminder-alert-head>span{font-size:10px;font-weight:900;letter-spacing:.06em;color:#9b5407}.reminder-alert.urgente .reminder-alert-head>span{color:#b42318}.reminder-alert-head time{font-size:10px;color:#7a8991}
.reminder-alert>strong{font-size:11px;color:#53656e}.reminder-alert h4{font-size:15px;line-height:1.3;margin:2px 0 3px}.reminder-alert p{font-size:12px;line-height:1.4;margin:0 0 9px;color:#687983}
.reminder-alert-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}.reminder-alert-actions button{border:1px solid #c9d5db;background:#fff;color:#24414f;border-radius:7px;padding:7px 9px;font-size:11px;font-weight:800;cursor:pointer}.reminder-alert-actions .reminder-alert-complete{background:#0d5d79;border-color:#0d5d79;color:#fff}.reminder-alert.urgente .reminder-alert-complete{background:#a51f16;border-color:#a51f16}

html[data-theme="dark"] .reminder-level,html[data-theme="dark"] .reminder-filter,html[data-theme="dark"] .reminder-card,html[data-theme="dark"] .reminder-priority-option>span,html[data-theme="dark"] .reminder-snooze-options button,html[data-theme="dark"] .reminder-alert{background:#142b36;border-color:#31505d;color:#eef5f8}
html[data-theme="dark"] .reminder-level b,html[data-theme="dark"] .reminder-card-main h3,html[data-theme="dark"] .reminder-card-contact strong,html[data-theme="dark"] .reminder-client-fixed strong,html[data-theme="dark"] .reminder-priority-option b,html[data-theme="dark"] .reminder-snooze-copy strong,html[data-theme="dark"] .reminder-alert h4{color:#fff}
html[data-theme="dark"] .reminder-level,html[data-theme="dark"] .reminder-card-main p,html[data-theme="dark"] .reminder-card-meta,html[data-theme="dark"] .reminder-card-contact span,html[data-theme="dark"] .reminder-priority-option small,html[data-theme="dark"] .reminder-owner-note,html[data-theme="dark"] .reminder-snooze-copy span,html[data-theme="dark"] .reminder-alert p,html[data-theme="dark"] .reminder-alert-head time{color:#b5c5cc}
html[data-theme="dark"] .reminder-client-fixed{background:#10252f;border-color:#31505d}html[data-theme="dark"] .reminder-client-fixed span{color:#aebfc7}
html[data-theme="dark"] .reminder-filter.active{background:#eaf3f6;color:#10252f;border-color:#eaf3f6}
html[data-theme="dark"] .reminder-priority-option input:checked+span{background:#183440}
html[data-theme="dark"] .reminder-owner-note{border-color:#31505d}html[data-theme="dark"] .reminder-owner-note b{color:#fff}
html[data-theme="dark"] .reminder-snooze-options button,html[data-theme="dark"] .reminder-alert-actions button{background:#17333f;border-color:#3b5965;color:#eef5f8}
html[data-theme="dark"] .reminder-alert-actions .reminder-alert-complete{background:#0f6b8c;border-color:#0f6b8c;color:#fff}
html[data-theme="dark"] .reminder-alert.urgente .reminder-alert-complete{background:#a82b22;border-color:#a82b22}
html[data-theme="dark"] .reminder-empty{border-color:#38535f;color:#aebfc7}html[data-theme="dark"] .reminder-empty strong{color:#fff}

@media (max-width: 820px){
  .reminder-page-head{gap:10px}.reminder-page-head .toolbar{width:100%;display:grid;grid-template-columns:1fr 1fr}.reminder-page-head .toolbar .btn{width:100%}
  .reminder-levels{display:grid;grid-template-columns:1fr;gap:6px}.reminder-level{width:100%;padding:8px 9px}
  .reminder-toolbar{align-items:stretch;flex-direction:column;gap:9px}.reminder-filter-row{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}.reminder-filter{white-space:nowrap}.reminder-search{width:100%}
  .reminder-card{grid-template-columns:1fr;gap:8px;padding:12px;border-left-width:4px}.reminder-card-priority{order:0}.reminder-card-main{order:1}.reminder-card-actions{order:2;justify-content:flex-start}.reminder-card-actions .btn{flex:1 1 auto;min-height:40px}
  .reminder-priority-picker{grid-template-columns:1fr}.reminder-priority-option>span{min-height:0}
  .reminder-snooze-options{grid-template-columns:1fr}
  .reminder-alert-stack{right:10px;left:10px;bottom:10px;width:auto}.reminder-alert{padding:12px}.reminder-alert-actions{display:grid;grid-template-columns:1fr 1fr}.reminder-alert-actions .reminder-alert-complete{grid-column:1/-1;min-height:42px}
}


/* ================================================================
   V8.66 — lembretes que chamam atenção diretamente no contato
   Urgente pulsa continuamente; normal chama de forma mais suave;
   baixo fica marcado sem animação agressiva.
   ================================================================ */
.crm-conversation-item.reminder-attention{position:relative;isolation:isolate;transition:background-color .18s ease,box-shadow .18s ease}
.crm-conversation-item.reminder-urgente{border-bottom-color:#efc5c1!important;box-shadow:inset 4px 0 #b42318;animation:crmUrgentReminderPulse 1.25s ease-in-out infinite}
.crm-conversation-item.reminder-normal{border-bottom-color:#ecd2ad!important;box-shadow:inset 3px 0 #c56a08;animation:crmNormalReminderPulse 2.8s ease-in-out infinite}
.crm-conversation-item.reminder-baixo{box-shadow:inset 3px 0 #6c7b85}
.crm-conversation-item.reminder-urgente .crm-list-row>strong{color:#8f1b13;font-weight:900}
.crm-conversation-item.reminder-normal .crm-list-row>strong{color:#8a4c08;font-weight:850}
.mini-state.reminder-due{border:1px solid currentColor!important;font-weight:900!important;letter-spacing:.035em!important}
.mini-state.reminder-due.urgente{background:#fff0ee!important;color:#a61f16!important;animation:crmUrgentBadgePulse 1.25s ease-in-out infinite}
.mini-state.reminder-due.normal{background:#fff7e9!important;color:#985307!important}
.mini-state.reminder-due.baixo{background:#f1f4f5!important;color:#596a74!important}
.crm-chat-chip.reminder.is-due{font-weight:850!important}
.crm-chat-chip.reminder.is-due.urgente{border-color:#b42318!important;color:#9f2118!important;animation:crmUrgentChipPulse 1.25s ease-in-out infinite}
.crm-chat-chip.reminder.is-due.normal{border-color:#c56a08!important;color:#8c4d07!important}
@keyframes crmUrgentReminderPulse{
  0%,100%{background:#fff9f8;box-shadow:inset 4px 0 #b42318,0 0 0 0 rgba(180,35,24,0)}
  50%{background:#ffe9e6;box-shadow:inset 4px 0 #d92d20,0 0 0 2px rgba(180,35,24,.18)}
}
@keyframes crmNormalReminderPulse{
  0%,100%{background:#fff;box-shadow:inset 3px 0 #c56a08}
  50%{background:#fff7ea;box-shadow:inset 3px 0 #dd7a0d}
}
@keyframes crmUrgentBadgePulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.72;transform:scale(.97)}}
@keyframes crmUrgentChipPulse{0%,100%{background:transparent}50%{background:#fff0ee}}
html[data-theme="dark"] .crm-conversation-item.reminder-urgente{border-bottom-color:#6d3532!important;animation-name:crmUrgentReminderPulseDark}
html[data-theme="dark"] .crm-conversation-item.reminder-normal{border-bottom-color:#5f4a2d!important;animation-name:crmNormalReminderPulseDark}
html[data-theme="dark"] .crm-conversation-item.reminder-urgente .crm-list-row>strong{color:#fff!important}
html[data-theme="dark"] .crm-conversation-item.reminder-normal .crm-list-row>strong{color:#fff!important}
html[data-theme="dark"] .mini-state.reminder-due.urgente{background:#4b211f!important;color:#ffd2cd!important}
html[data-theme="dark"] .mini-state.reminder-due.normal{background:#46341f!important;color:#ffd69f!important}
html[data-theme="dark"] .mini-state.reminder-due.baixo{background:#263a44!important;color:#d9e3e8!important}
html[data-theme="dark"] .crm-chat-chip.reminder.is-due.urgente{color:#ffd0ca!important;border-color:#d4574f!important}
html[data-theme="dark"] .crm-chat-chip.reminder.is-due.normal{color:#ffd39a!important;border-color:#c98535!important}
@keyframes crmUrgentReminderPulseDark{
  0%,100%{background:#132934;box-shadow:inset 4px 0 #d04a41,0 0 0 0 rgba(208,74,65,0)}
  50%{background:#3a2628;box-shadow:inset 4px 0 #ef655b,0 0 0 2px rgba(239,101,91,.18)}
}
@keyframes crmNormalReminderPulseDark{
  0%,100%{background:#132934;box-shadow:inset 3px 0 #c98535}
  50%{background:#302a21;box-shadow:inset 3px 0 #e29a42}
}
@media(max-width:820px){
  .crm-conversation-item.reminder-urgente{box-shadow:inset 5px 0 #b42318}
  .crm-conversation-item.reminder-normal{box-shadow:inset 4px 0 #c56a08}
  .crm-conversation-item.reminder-baixo{box-shadow:inset 4px 0 #6c7b85}
  .mini-state.reminder-due{font-size:9px!important;padding:4px 6px!important}
}
@media(prefers-reduced-motion:reduce){
  .crm-conversation-item.reminder-urgente,.crm-conversation-item.reminder-normal,.mini-state.reminder-due.urgente,.crm-chat-chip.reminder.is-due.urgente{animation:none!important}
  .crm-conversation-item.reminder-urgente{background:#ffe9e6!important}
  html[data-theme="dark"] .crm-conversation-item.reminder-urgente{background:#3a2628!important}
}

/* YuCare / JET — carrinhos abandonados */
.ecommerce-runtime{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin-bottom:14px}.ecommerce-runtime-main{display:flex;align-items:center;gap:11px;min-width:0}.ecommerce-runtime-main>div{min-width:0}.ecommerce-runtime-main strong{display:block;font-size:14px}.ecommerce-runtime-main span:not(.ecommerce-runtime-dot){display:block;color:var(--muted);font-size:12px;margin-top:3px;white-space:normal;line-height:1.45}.ecommerce-runtime-dot{width:10px;height:10px;border-radius:50%;background:#8b98a2;flex:0 0 auto}.ecommerce-runtime-dot.ok{background:#20a36a}.ecommerce-runtime-dot.warn{background:#d39b19}.ecommerce-runtime-dot.danger{background:#c84438}.ecommerce-runtime-meta{color:#71808c;font-size:12px;text-align:right;white-space:nowrap}.ecommerce-runtime-meta strong{color:var(--ink)}
.ecommerce-stats .stat-card{min-height:108px}.ecommerce-money{font-size:25px!important;white-space:nowrap}.ecommerce-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}.ecommerce-panel-head{gap:16px}.ecommerce-panel-head>div:first-child h3{margin-bottom:3px}.ecommerce-panel-head>div:first-child p,.ecommerce-test-panel .panel-head p{margin:0;color:var(--muted);font-size:11px;line-height:1.45}.ecommerce-filters{display:flex;gap:8px;align-items:center;flex:0 0 auto}.ecommerce-filters .select{width:160px}.ecommerce-filters .input{width:280px}.ecommerce-table-wrap{max-height:calc(100vh - 355px);min-height:360px}.ecommerce-table td{vertical-align:middle}.ecommerce-client-link{border:0;background:transparent;text-align:left;padding:0;color:inherit;max-width:340px}.ecommerce-client-link strong{display:block;font-size:13px}.ecommerce-client-link span,.ecommerce-cell-sub{display:block;margin-top:3px;color:#7b8994;font-size:11px;line-height:1.35}.ecommerce-client-link:hover strong{color:var(--blue-700)}.ecommerce-row-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;min-width:210px}.ecommerce-error-inline{display:block;color:var(--danger);font-size:10px;margin-top:5px;max-width:240px;line-height:1.3}.ecommerce-status.warn{background:var(--warning-bg);color:var(--warning)}
.ecommerce-config-status{display:grid;gap:8px;margin-bottom:14px}.ecommerce-config-status>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border:1px solid #e4ebef;border-radius:9px;background:#fbfcfd}.ecommerce-config-status>div>span:first-child{font-size:12px;font-weight:700}.ecommerce-test-warning{padding:12px;border:1px solid #cfe2ec;background:#f3f9fc;border-radius:9px;margin-bottom:16px}.ecommerce-test-warning strong{display:block;font-size:12px;color:var(--blue-800)}.ecommerce-test-warning span{display:block;color:#607380;font-size:11px;line-height:1.5;margin-top:4px}.ecommerce-delay-field{display:flex;align-items:center;gap:8px}.ecommerce-delay-field .input{width:100px}.ecommerce-delay-field span{font-size:12px;color:var(--muted)}.ecommerce-auto-switch{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0 14px;border-top:1px solid #edf1f3;border-bottom:1px solid #edf1f3;margin:4px 0 15px}.ecommerce-auto-switch>span:first-child strong{display:block;font-size:12px}.ecommerce-auto-switch>span:first-child small{display:block;font-size:11px;color:var(--muted);margin-top:3px;line-height:1.35}.ecommerce-save-test{width:100%;margin-top:2px}.ecommerce-production-note{margin-top:14px;padding-top:13px;border-top:1px solid #edf1f3}.ecommerce-production-note strong{display:block;font-size:12px}.ecommerce-production-note span{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:4px}
.ecommerce-detail-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fbfcfd;margin-bottom:14px}.ecommerce-detail-hero>div span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:750}.ecommerce-detail-hero>div strong{display:block;font-size:26px;margin-top:4px;letter-spacing:-.035em}.ecommerce-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.ecommerce-detail-grid>div{border:1px solid var(--line);border-radius:9px;padding:10px 11px;min-width:0}.ecommerce-detail-grid span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:700}.ecommerce-detail-grid strong{display:block;font-size:12px;margin-top:4px;overflow-wrap:anywhere}.ecommerce-product-list{display:grid;gap:8px}.ecommerce-product-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 11px;border:1px solid var(--line);border-radius:9px}.ecommerce-product-row>div{min-width:0}.ecommerce-product-row>div:last-child{text-align:right;flex:0 0 auto}.ecommerce-product-row strong{display:block;font-size:12px}.ecommerce-product-row span{display:block;color:var(--muted);font-size:10px;margin-top:3px}.ecommerce-event-list{display:grid;gap:8px}.ecommerce-event{display:flex;align-items:center;gap:9px}.ecommerce-event i{width:8px;height:8px;border-radius:50%;background:var(--blue-600);flex:0 0 auto}.ecommerce-event strong{display:block;font-size:11px}.ecommerce-event span{display:block;font-size:10px;color:var(--muted);margin-top:2px}
.nav-count.ecommerce-nav-count{background:#e9f5fb;color:var(--blue-800)}
@media(max-width:1280px){.ecommerce-grid{grid-template-columns:1fr}.ecommerce-test-panel{order:-1}.ecommerce-test-panel .panel-body{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.ecommerce-test-panel .ecommerce-config-status,.ecommerce-test-panel .ecommerce-test-warning,.ecommerce-test-panel .ecommerce-production-note,.ecommerce-test-panel .ecommerce-save-test{grid-column:1/-1}.ecommerce-table-wrap{max-height:none}}
@media(max-width:900px){.ecommerce-panel-head{align-items:stretch;flex-direction:column}.ecommerce-filters{width:100%}.ecommerce-filters .input{width:100%;flex:1}.ecommerce-filters .select{width:150px}.ecommerce-test-panel .panel-body{display:block}.ecommerce-runtime{align-items:flex-start;flex-direction:column}.ecommerce-runtime-meta{text-align:left;white-space:normal}.ecommerce-table{min-width:840px}}
@media(max-width:560px){.ecommerce-filters{flex-direction:column;align-items:stretch}.ecommerce-filters .select,.ecommerce-filters .input{width:100%}.ecommerce-detail-grid{grid-template-columns:1fr}.ecommerce-detail-hero>div strong{font-size:22px}}
html[data-theme="dark"] .ecommerce-runtime,html[data-theme="dark"] .ecommerce-config-status>div,html[data-theme="dark"] .ecommerce-detail-hero,html[data-theme="dark"] .ecommerce-detail-grid>div,html[data-theme="dark"] .ecommerce-product-row{background:#13232d;border-color:#293d49;color:#e3edf2}html[data-theme="dark"] .ecommerce-test-warning{background:#15313e;border-color:#2d5264}html[data-theme="dark"] .ecommerce-test-warning strong{color:#9bdcf2}html[data-theme="dark"] .ecommerce-test-warning span{color:#9fb2bd}html[data-theme="dark"] .ecommerce-auto-switch,html[data-theme="dark"] .ecommerce-production-note{border-color:#293d49}html[data-theme="dark"] .ecommerce-client-link:hover strong{color:#8fd7f1}html[data-theme="dark"] .nav-count.ecommerce-nav-count{background:#18394a;color:#9bdcf2}

/* ========================================================================== */
/* MARESIAS FLOW — REBRANDING V1                                             */
/* Base visual premium + Central de Recuperação YuCare                        */
/* ========================================================================== */
:root{
  --flow-950:#0b2432;
  --flow-900:#0f3447;
  --flow-800:#123e56;
  --flow-700:#185a78;
  --flow-600:#14789c;
  --flow-500:#2493b8;
  --flow-100:#eaf4f8;
  --flow-50:#f4f9fb;
  --ink:#101828;
  --muted:#667085;
  --line:#e7ebef;
  --surface:#ffffff;
  --canvas:#f6f8fa;
  --danger:#d92d20;
  --danger-bg:#fff3f2;
  --success:#079455;
  --success-bg:#ecfdf3;
  --warning:#b54708;
  --warning-bg:#fffaeb;
  --shadow:none;
  --radius:12px;
  --sidebar:248px;
  --topbar:76px;
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
html,body{background:var(--canvas);color:var(--ink)}
body{font-size:14px;font-feature-settings:"cv02","cv03","cv04","cv11"}

/* Shell / navegação */
.sidebar{width:var(--sidebar)!important;background:#fff!important;border-right:1px solid #eaedf0!important}
.sidebar-head{min-height:112px!important;padding:20px 22px 18px!important;border-bottom:0!important;justify-content:flex-start!important}
.sidebar-brand{align-items:flex-start!important;gap:5px!important;text-align:left!important}
.sidebar-brand img{width:158px!important;max-height:58px!important;object-position:left center!important}
.sidebar-brand span{font-family:Inter,sans-serif!important;font-size:10px!important;letter-spacing:.34em!important;padding:0!important;color:var(--flow-600)!important;margin-left:4px!important;font-weight:800!important}
.nav{padding:9px 12px 18px!important;gap:3px!important}
.nav-section-label{padding:16px 12px 7px;color:#98a2b3;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.10em;line-height:1}
.nav-section-label:first-child{padding-top:7px}
.nav-btn{min-height:44px!important;border-radius:9px!important;padding:10px 12px!important;font-size:13px!important;font-weight:600!important;gap:11px!important;color:#475467!important;transform:none!important;box-shadow:none!important}
.nav-btn:hover{background:#f5f7f8!important;color:var(--flow-900)!important;transform:none!important}
.nav-btn.active{background:var(--flow-100)!important;color:var(--flow-900)!important;box-shadow:none!important}
.nav-btn.active::before{content:"";width:3px;height:22px;border-radius:999px;background:var(--flow-600);position:absolute;left:4px}
.nav-btn{position:relative}
.nav-icon{width:21px!important;height:21px!important;flex-basis:21px!important;color:#667085!important}
.nav-icon svg{width:20px!important;height:20px!important;stroke-width:1.75!important}
.nav-btn.active .nav-icon{color:var(--flow-600)!important}
.nav-count{margin-left:auto;min-width:21px;height:21px;display:grid;place-items:center;padding:0 6px;border-radius:999px!important;font-size:10px;font-weight:700}
.sidebar-bottom{padding:12px!important;border-top:1px solid #f0f2f4!important;background:#fff!important}
.user-mini{padding:9px 10px!important;border-radius:10px!important}
.avatar{width:36px!important;height:36px!important;font-size:13px!important;background:var(--flow-100)!important;color:var(--flow-800)!important}
.user-mini strong{font-size:12.5px!important}.user-mini small{font-size:10.5px!important}

/* Header global */
.topbar{height:var(--topbar)!important;padding:0 30px!important;border-bottom:1px solid #eaedf0!important;background:#fff!important}
.top-title h1{font-size:16px!important;font-weight:700!important;letter-spacing:-.018em!important;color:#1d2939}
.top-title p{font-size:11.5px!important;color:#98a2b3!important;margin-top:3px!important}
.top-datetime{display:none!important}
.top-actions{gap:8px!important}
.status-pill,.theme-toggle,.notification-bell{min-height:34px!important;border-radius:9px!important;border-color:#e4e7ec!important;background:#fff!important;font-size:11px!important;font-weight:650!important}
.status-pill{padding:7px 10px!important;color:#475467!important}
.status-dot{width:7px!important;height:7px!important}
.notification-bell{width:36px!important;height:36px!important;padding:0!important}
.theme-toggle{padding:7px 10px!important}
.content{padding:30px 32px 44px!important;max-width:1880px!important}
.page-head{margin-bottom:24px!important;align-items:center!important}
.page-head h2{font-size:27px!important;font-weight:750!important;letter-spacing:-.035em!important;color:#101828!important}
.page-head p{font-size:13px!important;color:#667085!important;line-height:1.55!important}

/* Controles do Design System v1 */
.btn{min-height:40px;border-radius:9px!important;padding:9px 14px!important;font-size:12.5px!important;font-weight:650!important;transition:background .15s,border-color .15s,color .15s!important}
.btn-primary{background:var(--flow-800)!important;border-color:var(--flow-800)!important;color:#fff!important}
.btn-primary:hover{background:var(--flow-900)!important;border-color:var(--flow-900)!important}
.btn-secondary{background:#fff!important;border-color:#dfe3e7!important;color:#344054!important}
.btn-secondary:hover{background:#f8fafb!important;border-color:#cfd5db!important}
.btn-ghost{background:transparent!important;border-color:transparent!important;color:#475467!important}
.btn-ghost:hover{background:#f5f7f8!important}
.btn-danger{background:#fff!important;border-color:#f3b5af!important;color:#b42318!important}
.input,.textarea,.select{min-height:42px;border-radius:9px!important;border-color:#dfe3e7!important;background:#fff!important;color:#1d2939!important;padding:10px 12px!important;font-size:12.5px!important}
.input:focus,.textarea:focus,.select:focus{border-color:#66a9c0!important;box-shadow:0 0 0 3px rgba(20,120,156,.10)!important}
.field>label,.field-label{font-size:12px!important;font-weight:650!important;color:#344054!important}.help{font-size:11px!important;color:#98a2b3!important}
.panel,.stat-card{border-color:#eaecf0!important;border-radius:12px!important;background:#fff!important}

/* E-commerce / Central de Recuperação */
.ecommerce-view{max-width:100%}
.ecommerce-page-head{margin-bottom:20px!important}
.ecommerce-title-block{min-width:0}
.ecommerce-eyebrow,.ecommerce-section-kicker{display:block;margin-bottom:7px;color:var(--flow-600);font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.10em}
.ecommerce-title-block h2{margin-bottom:7px!important}
.ecommerce-title-block p{max-width:760px!important}
.ecommerce-head-actions{align-items:center;justify-content:flex-end}
.ecommerce-icon-btn span:first-child{font-size:14px;line-height:1;color:#667085}

.ecommerce-runtime{display:block!important;padding:0!important;margin-bottom:18px!important;background:transparent!important;border:0!important;border-radius:0!important}
.ecommerce-runtime-statuses{display:flex;align-items:stretch;gap:10px;flex-wrap:wrap}
.ecommerce-connection-item{display:flex;align-items:center;gap:10px;padding:10px 13px;background:#fff;border:1px solid #eaecf0;border-radius:10px;min-width:190px}
.ecommerce-connection-item>div{min-width:0}
.ecommerce-connection-item strong{display:block;font-size:11.5px;font-weight:700;color:#344054;line-height:1.25}
.ecommerce-connection-item small{display:block;margin-top:2px;font-size:10px;color:#98a2b3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.ecommerce-runtime-dot{width:8px!important;height:8px!important}
.ecommerce-runtime-summary{margin-top:10px;display:flex;align-items:center;gap:7px 18px;flex-wrap:wrap;color:#98a2b3;font-size:10.5px;padding:0 3px}
.ecommerce-runtime-summary span{display:inline-flex;align-items:center;gap:4px}.ecommerce-runtime-summary strong{color:#475467;font-weight:700}
.ecommerce-runtime-latest{margin-top:8px;padding:9px 12px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-left:3px solid #d0d5dd;background:#f8fafb;border-radius:0 8px 8px 0;font-size:10.5px;color:#667085}
.ecommerce-runtime-latest span{color:#98a2b3}.ecommerce-runtime-latest strong{color:#344054}.ecommerce-runtime-latest b{color:var(--flow-800)}.ecommerce-runtime-latest em{font-style:normal;color:#667085}

.ecommerce-stats{gap:12px!important;margin-bottom:18px!important}
.ecommerce-kpi{min-height:132px!important;padding:18px 19px!important;position:relative;overflow:hidden}
.ecommerce-kpi-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}
.ecommerce-kpi-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;font-size:11px;font-weight:800;background:#f2f4f7;color:#667085}
.ecommerce-kpi-icon.is-blue{background:#eef8fb;color:#14789c}.ecommerce-kpi-icon.is-amber{background:#fffaeb;color:#b54708}.ecommerce-kpi-icon.is-green{background:#ecfdf3;color:#079455}.ecommerce-kpi-icon.is-neutral{background:#f2f4f7;color:#475467;font-size:9px}
.ecommerce-kpi-caption{color:#98a2b3;font-size:9.5px;font-weight:650;text-transform:uppercase;letter-spacing:.06em}
.ecommerce-kpi .stat-value{font-size:28px!important;line-height:1;margin:0 0 8px!important;color:#101828;font-weight:750!important;letter-spacing:-.045em}
.ecommerce-kpi .ecommerce-money{font-size:25px!important}
.ecommerce-kpi .stat-label{font-size:12px!important;color:#344054!important;font-weight:700!important;text-transform:none!important;letter-spacing:0!important}
.ecommerce-kpi .stat-meta{font-size:10.5px!important;color:#98a2b3!important;margin-top:5px;line-height:1.4}

.ecommerce-carts-panel{overflow:visible!important}
.ecommerce-panel-head{padding:20px 20px 17px!important;align-items:flex-end!important;gap:18px!important}
.ecommerce-panel-head>div:first-child{min-width:0;flex:1}
.ecommerce-panel-head h3{font-size:16px!important;font-weight:720!important;color:#1d2939!important;letter-spacing:-.018em;margin:0 0 4px!important}
.ecommerce-panel-head p{font-size:11.5px!important;color:#98a2b3!important;max-width:660px;line-height:1.5!important}
.ecommerce-section-kicker{margin-bottom:6px}
.ecommerce-filters{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.ecommerce-filters .select{width:190px!important}
.ecommerce-search-wrap{position:relative;display:flex;align-items:center;width:300px}
.ecommerce-search-wrap>span{position:absolute;left:12px;color:#98a2b3;font-size:18px;line-height:1;z-index:1;pointer-events:none}
.ecommerce-search-wrap .input{width:100%!important;padding-left:34px!important}
.ecommerce-list{padding:0 8px 8px}
.ecommerce-recovery-list{display:grid;gap:0}
.ecommerce-recovery-card{display:grid;grid-template-columns:minmax(260px,1.45fr) minmax(110px,.55fr) minmax(120px,.62fr) minmax(260px,1fr) minmax(170px,.72fr);gap:16px;align-items:center;padding:16px 12px;border-top:1px solid #f0f2f4;transition:background .14s}
.ecommerce-recovery-card:first-child{border-top:0}
.ecommerce-recovery-card:hover{background:#fafbfc}
.ecommerce-recovery-client{display:flex;align-items:center;gap:11px;min-width:0}
.ecommerce-source-dot{width:9px;height:9px;border-radius:50%;background:#98a2b3;box-shadow:0 0 0 4px #f2f4f7;flex:0 0 auto}
.ecommerce-source-dot.gtm{background:#14789c;box-shadow:0 0 0 4px #eef8fb}.ecommerce-source-dot.jet{background:#079455;box-shadow:0 0 0 4px #ecfdf3}
.ecommerce-recovery-client>div{min-width:0}.ecommerce-recovery-client strong{display:flex;align-items:center;gap:8px;min-width:0;font-size:12.5px;font-weight:700;color:#1d2939;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ecommerce-recovery-client strong small{font-size:9px;color:#667085;padding:3px 5px;background:#f2f4f7;border-radius:5px;font-weight:600}.ecommerce-recovery-client span:not(.ecommerce-source-dot){display:block;margin-top:4px;font-size:10.5px;color:#98a2b3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ecommerce-recovery-money strong{display:block;font-size:14px;color:#1d2939;font-weight:750;letter-spacing:-.02em}.ecommerce-recovery-money span,.ecommerce-recovery-time span{display:block;margin-top:4px;font-size:10px;color:#98a2b3}.ecommerce-recovery-time strong{display:block;font-size:11.5px;color:#475467;font-weight:650}
.ecommerce-recovery-state{min-width:0}.ecommerce-status{margin-bottom:8px!important}.ecommerce-status.warn{background:#fffaeb!important;color:#b54708!important}.ecommerce-status.blue{background:#eef8fb!important;color:#126a8b!important}.ecommerce-status.green{background:#ecfdf3!important;color:#067647!important}.ecommerce-status.red{background:#fff3f2!important;color:#b42318!important}
.ecommerce-progress{display:flex;align-items:center;gap:5px;min-width:230px;max-width:300px}
.ecommerce-progress>b{height:1px;flex:1;background:#e4e7ec}
.ecommerce-progress-step{display:flex;align-items:center;gap:4px;color:#98a2b3;font-size:9px;font-weight:650;white-space:nowrap}.ecommerce-progress-step i{display:block;width:7px;height:7px;border-radius:50%;background:#d0d5dd}.ecommerce-progress-step.done{color:#475467}.ecommerce-progress-step.done i{background:#079455}.ecommerce-progress-step.current{color:#b54708}.ecommerce-progress-step.current i{background:#f79009}.ecommerce-progress-step.muted{color:#b2bac5}
.ecommerce-recovery-actions{display:flex;justify-content:flex-end;min-width:0}.ecommerce-row-actions{display:flex;justify-content:flex-end;gap:5px;min-width:0!important;flex-wrap:wrap}.ecommerce-row-actions .btn{min-height:34px!important;padding:7px 9px!important;font-size:10.5px!important}.ecommerce-waiting-copy{font-size:10px;color:#98a2b3;text-align:right;line-height:1.4}
.ecommerce-error-inline{display:block;margin-top:6px;color:#b42318;font-size:9.5px;line-height:1.35}
.ecommerce-empty{min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:42px 20px;color:#98a2b3}.ecommerce-empty-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;margin-bottom:12px;background:#f2f4f7;color:#98a2b3;font-weight:700}.ecommerce-empty strong{font-size:13px;color:#475467}.ecommerce-empty span{font-size:11px;margin-top:5px;max-width:430px;line-height:1.5}

/* Drawer de configurações */
.ecommerce-drawer-backdrop{position:fixed;inset:0;background:rgba(16,24,40,.24);z-index:119;backdrop-filter:blur(1px)}
.ecommerce-settings-drawer{position:fixed;top:0;right:0;bottom:0;width:min(460px,94vw);z-index:120;background:#fff;border-left:1px solid #e4e7ec;transform:translateX(102%);transition:transform .22s ease;display:flex;flex-direction:column;box-shadow:-18px 0 40px rgba(16,24,40,.08)!important}
.ecommerce-settings-drawer.open{transform:translateX(0)}
.ecommerce-drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:24px 24px 20px;border-bottom:1px solid #eaecf0}.ecommerce-drawer-head>div{min-width:0}.ecommerce-drawer-head span{display:block;color:var(--flow-600);font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.08em;margin-bottom:5px}.ecommerce-drawer-head h3{font-size:20px;letter-spacing:-.025em;margin:0;color:#101828}.ecommerce-drawer-head p{font-size:11px;line-height:1.5;color:#98a2b3;margin:6px 0 0}.ecommerce-drawer-close{width:36px;height:36px;display:grid;place-items:center;border:1px solid #e4e7ec;background:#fff;border-radius:9px;color:#667085;font-size:22px;line-height:1}.ecommerce-drawer-close:hover{background:#f8fafb;color:#344054}
.ecommerce-drawer-body{padding:0 24px 28px;overflow:auto;min-height:0;flex:1}
.ecommerce-config-section{padding:22px 0;border-bottom:1px solid #f0f2f4}.ecommerce-config-section:last-child{border-bottom:0}.ecommerce-config-section-head{margin-bottom:15px}.ecommerce-config-section-head>span{display:block;font-size:12.5px;color:#344054;font-weight:720}.ecommerce-config-section-head p{font-size:10.5px;color:#98a2b3;line-height:1.5;margin:4px 0 0}.ecommerce-config-status{gap:8px!important;margin-bottom:0!important}.ecommerce-config-status>div{padding:10px 11px!important;border-color:#eaecf0!important;border-radius:9px!important;background:#fafbfc!important}.ecommerce-config-status>div>span:first-child{font-size:11.5px!important}.ecommerce-test-warning{border-color:#cfe7ef!important;background:#f4fafc!important;border-radius:9px!important;padding:11px 12px!important;margin-bottom:15px!important}.ecommerce-test-warning strong{font-size:11.5px!important;color:#126a8b!important}.ecommerce-test-warning span{font-size:10.5px!important;color:#667085!important}.ecommerce-auto-switch{margin:2px 0 15px!important;padding:12px 0!important}.ecommerce-config-actions{display:grid;gap:9px}.ecommerce-config-action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ecommerce-config-actions .ecommerce-save-test{width:100%;margin:0!important}.ecommerce-production-note{padding:16px 0 0!important;margin:0!important;border-top:0!important}.ecommerce-production-note strong{font-size:11px!important;color:#475467}.ecommerce-production-note span{font-size:10px!important;color:#98a2b3!important}
.ecommerce-drawer-open{overflow:hidden}

/* Details da recuperação */
.ecommerce-detail-hero{border-radius:11px!important;background:#fafbfc!important;border-color:#eaecf0!important;padding:16px!important}.ecommerce-detail-grid>div,.ecommerce-product-row{border-color:#eaecf0!important;border-radius:9px!important;background:#fff!important}

/* Responsividade da nova Central */
@media(max-width:1380px){
  .ecommerce-recovery-card{grid-template-columns:minmax(230px,1.3fr) 100px 110px minmax(220px,1fr);gap:12px}
  .ecommerce-recovery-actions{grid-column:1/-1;justify-content:flex-start;padding-left:20px;margin-top:-6px}
  .ecommerce-waiting-copy{text-align:left}
}
@media(max-width:1180px){
  :root{--sidebar:220px}.content{padding:24px!important}
  .ecommerce-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ecommerce-panel-head{align-items:stretch!important;flex-direction:column!important}.ecommerce-filters{width:100%}.ecommerce-search-wrap{flex:1;width:auto}.ecommerce-filters .select{width:180px!important}
}
@media(max-width:900px){
  .nav-section-label{display:none}.content{padding:18px 14px 30px!important}
  .ecommerce-page-head{align-items:flex-start!important}.ecommerce-head-actions{width:100%;justify-content:flex-start!important}
  .ecommerce-runtime-statuses{display:grid;grid-template-columns:1fr}.ecommerce-connection-item{min-width:0}
  .ecommerce-recovery-card{grid-template-columns:1fr 110px;gap:12px}.ecommerce-recovery-state,.ecommerce-recovery-time{grid-column:1/-1}.ecommerce-recovery-actions{grid-column:1/-1;padding-left:0;margin:0}.ecommerce-progress{max-width:420px}
}
@media(max-width:560px){
  .ecommerce-stats{grid-template-columns:1fr!important}.ecommerce-kpi{min-height:118px!important}
  .ecommerce-head-actions{display:grid!important;grid-template-columns:1fr 1fr;width:100%}.ecommerce-head-actions .ecommerce-icon-btn{grid-column:1/-1}.ecommerce-head-actions .btn{width:100%}
  .ecommerce-filters{flex-direction:column!important}.ecommerce-filters .select,.ecommerce-search-wrap{width:100%!important}
  .ecommerce-recovery-card{grid-template-columns:1fr;padding:16px 8px}.ecommerce-recovery-money,.ecommerce-recovery-time,.ecommerce-recovery-state,.ecommerce-recovery-actions{grid-column:1}.ecommerce-row-actions{justify-content:flex-start}.ecommerce-progress{min-width:0;width:100%}
}

/* Rebranding v1 — dark mode */
html[data-theme="dark"]{
  --ink:#eef4f7;--muted:#98a9b3;--line:#263842;--surface:#14222a;--canvas:#0d171d;--flow-100:#193746;
}
html[data-theme="dark"] body,html[data-theme="dark"] .content{background:#0d171d!important;color:#eef4f7!important}
html[data-theme="dark"] .sidebar,html[data-theme="dark"] .topbar,html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .ecommerce-settings-drawer{background:#14222a!important;border-color:#263842!important}
html[data-theme="dark"] .nav-btn{color:#a8bac4!important}html[data-theme="dark"] .nav-btn:hover{background:#192a33!important;color:#eef4f7!important}html[data-theme="dark"] .nav-btn.active{background:#193746!important;color:#d9f2fb!important}
html[data-theme="dark"] .top-title h1,html[data-theme="dark"] .page-head h2,html[data-theme="dark"] .ecommerce-kpi .stat-value,html[data-theme="dark"] .ecommerce-kpi .stat-label,html[data-theme="dark"] .ecommerce-panel-head h3,html[data-theme="dark"] .ecommerce-recovery-client strong,html[data-theme="dark"] .ecommerce-recovery-money strong,html[data-theme="dark"] .ecommerce-drawer-head h3{color:#eef4f7!important}
html[data-theme="dark"] .btn-secondary,html[data-theme="dark"] .input,html[data-theme="dark"] .textarea,html[data-theme="dark"] .select,html[data-theme="dark"] .ecommerce-drawer-close{background:#172832!important;border-color:#30444f!important;color:#d8e4ea!important}
html[data-theme="dark"] .ecommerce-connection-item,html[data-theme="dark"] .ecommerce-config-status>div,html[data-theme="dark"] .ecommerce-detail-hero,html[data-theme="dark"] .ecommerce-detail-grid>div,html[data-theme="dark"] .ecommerce-product-row{background:#172832!important;border-color:#2a3e49!important}
html[data-theme="dark"] .ecommerce-recovery-card{border-color:#22343e!important}html[data-theme="dark"] .ecommerce-recovery-card:hover{background:#172630!important}html[data-theme="dark"] .ecommerce-runtime-latest{background:#172630!important}html[data-theme="dark"] .ecommerce-runtime-summary,html[data-theme="dark"] .ecommerce-runtime-latest,html[data-theme="dark"] .ecommerce-recovery-client span:not(.ecommerce-source-dot),html[data-theme="dark"] .ecommerce-recovery-money span,html[data-theme="dark"] .ecommerce-recovery-time span,html[data-theme="dark"] .ecommerce-waiting-copy{color:#8fa2ad!important}
html[data-theme="dark"] .ecommerce-drawer-head,html[data-theme="dark"] .ecommerce-config-section{border-color:#263842!important}


/* ========================================================================== */
/* MARESIAS FLOW — REBRANDING V1.1 · ESCALA + DENSIDADE ÚTIL                 */
/* ========================================================================== */
@media(min-width:901px){
  :root{--sidebar:272px;--topbar:82px}
  body{font-size:15.5px!important}
  .sidebar-head{min-height:126px!important;padding:23px 24px 20px!important}
  .sidebar-brand img{width:174px!important;max-height:64px!important}
  .sidebar-brand span{font-size:11px!important}
  .nav{padding:12px 14px 22px!important;gap:5px!important}
  .nav-section-label{padding:19px 13px 8px!important;font-size:10.5px!important}
  .nav-btn{min-height:50px!important;border-radius:11px!important;padding:12px 14px!important;font-size:14.5px!important;gap:13px!important}
  .nav-icon{width:23px!important;height:23px!important;flex-basis:23px!important}
  .nav-icon svg{width:22px!important;height:22px!important}
  .nav-count{min-width:24px!important;height:24px!important;font-size:11px!important}
  .sidebar-bottom{padding:14px!important}.user-mini{padding:11px 12px!important}.avatar{width:40px!important;height:40px!important}.user-mini strong{font-size:13.5px!important}.user-mini small{font-size:11.5px!important}
  .topbar{padding:0 34px!important}
  .top-title h1{font-size:18px!important}.top-title p{font-size:12.5px!important}
  .status-pill,.theme-toggle,.notification-bell{min-height:38px!important;font-size:12px!important}.notification-bell{width:40px!important;height:40px!important}
  .content{padding:36px 38px 52px!important;max-width:1920px!important}
  .page-head{margin-bottom:28px!important}.page-head h2{font-size:31px!important}.page-head p{font-size:14px!important}
  .btn{min-height:44px!important;padding:10px 16px!important;font-size:13.5px!important;border-radius:10px!important}
  .btn-sm{min-height:38px!important;padding:8px 12px!important;font-size:12px!important}
  .input,.textarea,.select{min-height:46px!important;padding:11px 13px!important;font-size:13.5px!important;border-radius:10px!important}
  .field>label,.field-label{font-size:13px!important}.help{font-size:12px!important}
  .panel,.stat-card{border-radius:14px!important}
  .panel-head{padding:20px 22px!important}
  .panel-head h3{font-size:17px!important}.panel-head p{font-size:12.5px!important}
}

/* Central de recuperação — maior, mais informativa e menos "mini dashboard" */
.ecommerce-page-head{margin-bottom:24px!important}
.ecommerce-title-block h2{font-size:32px!important;margin-bottom:8px!important}
.ecommerce-title-block p{font-size:14px!important;max-width:840px!important}
.ecommerce-eyebrow{display:none!important}
.ecommerce-runtime{margin-bottom:22px!important}
.ecommerce-runtime-statuses{gap:12px!important}
.ecommerce-connection-item{min-width:225px!important;padding:13px 15px!important;border-radius:12px!important}
.ecommerce-connection-item strong{font-size:13px!important}.ecommerce-connection-item small{font-size:11px!important;max-width:220px!important}
.ecommerce-runtime-summary{font-size:11.5px!important;gap:9px 22px!important;margin-top:12px!important}
.ecommerce-runtime-latest{font-size:11.5px!important;padding:11px 14px!important;margin-top:10px!important}
.ecommerce-stats{gap:15px!important;margin-bottom:22px!important}
.ecommerce-kpi{min-height:154px!important;padding:22px 22px!important}
.ecommerce-kpi-top{margin-bottom:18px!important}.ecommerce-kpi-icon{width:34px!important;height:34px!important;border-radius:10px!important;font-size:13px!important}.ecommerce-kpi-caption{font-size:10.5px!important}
.ecommerce-kpi .stat-value{font-size:34px!important;margin-bottom:10px!important}.ecommerce-kpi .ecommerce-money{font-size:30px!important}.ecommerce-kpi .stat-label{font-size:13.5px!important}.ecommerce-kpi .stat-meta{font-size:11.5px!important;margin-top:6px!important}
.ecommerce-panel-head{padding:24px 24px 20px!important}.ecommerce-panel-head h3{font-size:19px!important}.ecommerce-panel-head p{font-size:12.5px!important}.ecommerce-section-kicker{font-size:10.5px!important}
.ecommerce-filters .select{width:210px!important}.ecommerce-search-wrap{width:340px!important}
.ecommerce-list{padding:0 12px 12px!important}
.ecommerce-recovery-card{grid-template-columns:minmax(310px,1.45fr) minmax(130px,.55fr) minmax(140px,.60fr) minmax(300px,1fr) minmax(210px,.72fr)!important;gap:20px!important;padding:21px 16px!important;min-height:104px}
.ecommerce-source-dot{width:10px!important;height:10px!important;box-shadow:0 0 0 5px #f2f4f7!important}.ecommerce-source-dot.gtm{box-shadow:0 0 0 5px #eef8fb!important}.ecommerce-source-dot.jet{box-shadow:0 0 0 5px #ecfdf3!important}
.ecommerce-recovery-client{gap:14px!important}.ecommerce-recovery-client strong{font-size:14.5px!important}.ecommerce-recovery-client span:not(.ecommerce-source-dot){font-size:11.5px!important;margin-top:5px!important}
.ecommerce-recovery-money strong{font-size:16px!important}.ecommerce-recovery-money span,.ecommerce-recovery-time span{font-size:11px!important;margin-top:5px!important}.ecommerce-recovery-time strong{font-size:13px!important}
.ecommerce-status{font-size:11px!important;padding:5px 8px!important;margin-bottom:10px!important}.ecommerce-progress{min-width:260px!important;max-width:330px!important}.ecommerce-progress-step{font-size:10px!important}.ecommerce-progress-step i{width:8px!important;height:8px!important}
.ecommerce-recovery-actions{align-items:center!important}.ecommerce-row-actions{gap:7px!important;align-items:center!important}.ecommerce-row-actions .btn{min-height:38px!important;padding:8px 11px!important;font-size:11.5px!important}.ecommerce-row-actions-signal{justify-content:flex-end!important}.ecommerce-waiting-copy{font-size:10.5px!important;white-space:nowrap}

/* Detalhes do cliente / sinal GTM */
.ecommerce-client-detail-card{display:flex;align-items:center;gap:14px;padding:16px;margin:0 0 16px;border:1px solid #e7ebef;border-radius:12px;background:#fff}
.ecommerce-client-detail-avatar{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;flex:0 0 auto;background:#eaf4f8;color:#123e56;font-size:17px;font-weight:800}
.ecommerce-client-detail-card>div:last-child{min-width:0}.ecommerce-client-detail-card span{display:block;color:#98a2b3;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em}.ecommerce-client-detail-card strong{display:block;margin-top:4px;font-size:14px;color:#1d2939;overflow-wrap:anywhere}.ecommerce-client-detail-card small{display:block;margin-top:5px;color:#667085;font-size:11px;line-height:1.45}
.ecommerce-signal-hero{margin-bottom:12px!important}.ecommerce-signal-note{margin-top:16px;padding:13px 14px;border-radius:10px;background:#f4f9fb;border:1px solid #dcecf2}.ecommerce-signal-note strong{display:block;color:#123e56;font-size:12px}.ecommerce-signal-note span{display:block;color:#667085;font-size:11px;line-height:1.5;margin-top:4px}.ecommerce-signal-empty{padding:18px;border:1px dashed #d0d5dd;border-radius:10px;text-align:center;color:#98a2b3;font-size:11px}
.ecommerce-detail-grid>div{padding:13px 14px!important}.ecommerce-detail-grid span{font-size:10.5px!important}.ecommerce-detail-grid strong{font-size:13px!important;margin-top:5px!important}.ecommerce-product-row{padding:13px 14px!important}.ecommerce-product-row strong{font-size:13px!important}.ecommerce-product-row span{font-size:11px!important}

html[data-theme="dark"] .ecommerce-client-detail-card{background:#172832;border-color:#2a3e49}html[data-theme="dark"] .ecommerce-client-detail-card strong{color:#eef4f7}html[data-theme="dark"] .ecommerce-client-detail-avatar{background:#193746;color:#d9f2fb}html[data-theme="dark"] .ecommerce-signal-note{background:#16303c;border-color:#2a4d5d}html[data-theme="dark"] .ecommerce-signal-note strong{color:#a8e0f3}html[data-theme="dark"] .ecommerce-signal-note span{color:#9fb2bd}

@media(max-width:1380px) and (min-width:901px){
  .ecommerce-recovery-card{grid-template-columns:minmax(280px,1.35fr) 120px 130px minmax(270px,1fr)!important;gap:15px!important}
  .ecommerce-recovery-actions{grid-column:1/-1!important;justify-content:flex-start!important;padding-left:25px!important;margin-top:-5px!important}
  .ecommerce-row-actions-signal{justify-content:flex-start!important}
}
\n\n/* ========================================================================== */
/* MARESIAS FLOW — REBRANDING VISUAL V1.2 · TOPBAR + STATUS PREMIUM          */
/* ========================================================================== */

/* O badge zero jamais aparece: a UI só chama atenção quando existe algo novo. */
.notification-badge[hidden]{display:none!important}

/* Cabeçalho: controles utilitários separados de status operacionais. */
.top-actions{display:flex!important;align-items:center!important;gap:12px!important}
.top-utility-actions{display:flex;align-items:center;gap:8px;padding-right:12px;border-right:1px solid #eaecf0}
.top-status-group{display:flex;align-items:center;gap:8px}

.top-icon-control{
  width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
  padding:0!important;display:grid!important;place-items:center!important;
  border:1px solid #e4e7ec!important;border-radius:12px!important;
  background:#fff!important;color:#475467!important;box-shadow:none!important;
  transition:background .15s ease,border-color .15s ease,color .15s ease!important;
}
.top-icon-control:hover{background:#f8fafc!important;border-color:#d0d5dd!important;color:#123e56!important}
.top-icon-control:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(20,120,156,.12)!important;border-color:#7bb9cf!important}
.theme-toggle-icon,.notification-bell-icon{display:grid;place-items:center;width:20px;height:20px}
.theme-toggle-icon svg,.notification-bell-icon svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.notification-bell{font-size:0!important}
.notification-badge{right:-5px!important;top:-6px!important;min-width:19px!important;height:19px!important;padding:0 5px!important;font-size:10px!important;border:2px solid #fff!important;background:#d92d20!important}

/* Status deixam de parecer tags antigas e viram mini indicadores operacionais. */
.status-service{
  min-width:152px!important;height:44px!important;min-height:44px!important;
  padding:7px 12px!important;gap:10px!important;border-radius:12px!important;
  border:1px solid #eaecf0!important;background:#fff!important;color:#344054!important;
  box-shadow:none!important;transition:border-color .15s ease,background .15s ease!important;
}
.status-service .status-dot{width:8px!important;height:8px!important;flex:0 0 auto;box-shadow:none!important}
.status-service-copy{display:flex;flex-direction:column;gap:1px;min-width:0;line-height:1.08}
.status-service-copy small{font-size:9.5px;font-weight:650;color:#98a2b3;letter-spacing:.01em}
.status-service-copy strong{font-size:11.5px;font-weight:700;color:#344054;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status-service.is-ok{background:#f6fef9!important;border-color:#d1fadf!important}
.status-service.is-ok .status-service-copy strong{color:#067647}
.status-service.is-warn{background:#fffcf5!important;border-color:#fef0c7!important}
.status-service.is-warn .status-service-copy strong{color:#b54708}
.status-service.is-danger{background:#fff8f7!important;border-color:#fee4e2!important}
.status-service.is-danger .status-service-copy strong{color:#b42318}
.status-service.is-neutral{background:#f8fafc!important;border-color:#eaecf0!important}

/* Topbar mais editorial: título de um lado, situação do sistema do outro. */
@media(min-width:901px){
  :root{--topbar:86px}
  .topbar{padding:0 36px!important;background:#fff!important;border-bottom:1px solid #eef0f2!important}
  .top-title h1{font-size:18.5px!important;font-weight:750!important;letter-spacing:-.025em!important}
  .top-title p{font-size:12px!important;color:#98a2b3!important;margin-top:4px!important}
}

/* Painéis e controles recebem acabamento mais atual sem efeitos artificiais. */
.panel,.stat-card,.entity-card{border-color:#e8ebee!important;border-radius:15px!important;box-shadow:none!important}
.panel-head{border-color:#eef0f2!important}
.btn{box-shadow:none!important}
.btn-primary{letter-spacing:-.005em}
.tag{border-radius:7px!important;font-weight:700!important}
.table th{font-size:10.5px!important;letter-spacing:.045em!important;text-transform:uppercase!important;color:#98a2b3!important;background:#fafbfc!important}
.table td{border-color:#eef0f2!important}

/* Notificações: painel com densidade de produto, não popup genérico. */
.notification-panel{
  top:52px!important;width:min(420px,calc(100vw - 24px))!important;
  border:1px solid #e4e7ec!important;border-radius:16px!important;
  box-shadow:0 18px 48px rgba(16,24,40,.12)!important;
}
.notification-panel-head{padding:16px 17px!important;background:#fff!important;border-color:#eef0f2!important}
.notification-panel-head strong{font-size:14.5px!important;color:#101828!important}
.notification-panel-head span{font-size:11.5px!important;color:#98a2b3!important}
.notification-item{padding:14px 16px!important;border-color:#f0f2f4!important}
.notification-item.unread{background:#f4f9fb!important}
.notification-panel-foot{padding:12px 16px!important;background:#fafbfc!important;border-color:#eef0f2!important}

/* Dark mode correspondente, sem simplesmente inverter branco/preto. */
html[data-theme="dark"] .top-utility-actions{border-color:#2b3d48}
html[data-theme="dark"] .top-icon-control{background:#13232d!important;border-color:#30444f!important;color:#c9d6dd!important}
html[data-theme="dark"] .top-icon-control:hover{background:#19303b!important;border-color:#3b5360!important;color:#e8f3f7!important}
html[data-theme="dark"] .notification-badge{border-color:#0c1921!important}
html[data-theme="dark"] .status-service{background:#13232d!important;border-color:#2d414d!important}
html[data-theme="dark"] .status-service-copy small{color:#7f95a2}
html[data-theme="dark"] .status-service-copy strong{color:#d9e4e9}
html[data-theme="dark"] .status-service.is-ok{background:#102a23!important;border-color:#205040!important}
html[data-theme="dark"] .status-service.is-ok .status-service-copy strong{color:#75d6aa}
html[data-theme="dark"] .status-service.is-warn{background:#2a2414!important;border-color:#52451e!important}
html[data-theme="dark"] .status-service.is-warn .status-service-copy strong{color:#f3c76b}
html[data-theme="dark"] .status-service.is-danger{background:#301b1b!important;border-color:#5b3030!important}
html[data-theme="dark"] .status-service.is-danger .status-service-copy strong{color:#f3a6a0}
html[data-theme="dark"] .status-service.is-neutral{background:#15252f!important;border-color:#2d414d!important}
html[data-theme="dark"] .notification-panel-head{background:#13232d!important}
html[data-theme="dark"] .notification-panel-head strong{color:#eef4f7!important}
html[data-theme="dark"] .notification-panel-foot{background:#101f28!important}
html[data-theme="dark"] .table th{background:#101f28!important;color:#8196a3!important}

/* Tablet: preserva os status, mas reduz largura para não esmagar o título. */
@media(max-width:1180px) and (min-width:821px){
  .topbar{padding-left:22px!important;padding-right:22px!important}
  .top-actions{gap:8px!important}
  .top-utility-actions{padding-right:8px!important;gap:6px}
  .status-service{min-width:126px!important;padding:7px 10px!important}
  .status-service-copy small{font-size:9px}
  .status-service-copy strong{font-size:10.5px}
}

/* Mobile: mantém leitura rápida sem ocupar metade da barra superior. */
@media(max-width:820px){
  .top-actions{gap:6px!important}
  .top-utility-actions{gap:5px;padding-right:6px;border-right:1px solid #eaecf0}
  .top-status-group{gap:5px}
  .top-icon-control{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;border-radius:11px!important}
  .status-service{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;justify-content:center!important;border-radius:11px!important}
  .status-service-copy{display:none!important}
  .status-service .status-dot{width:9px!important;height:9px!important}
}
@media(max-width:560px){
  .top-utility-actions{border-right:0;padding-right:0}
  .top-status-group{display:none}
}

/* ================================================================
   FLOW STUDIO v1.3 · 2026 visual system
   Moderniza somente o editor de Fluxos sem alterar regras/conexões.
   ================================================================ */
body.flow-view-active #view-flows .flow-stage-wrap{
  background:#f4f6f8!important;
  background-image:none!important;
}
body.flow-view-active #view-flows .flow-node{
  --flow-accent:#1f7aa5;
  --flow-accent-soft:#edf7fb;
  width:304px!important;
  background:#ffffff!important;
  border:1px solid #dce4e9!important;
  border-radius:18px!important;
  box-shadow:0 8px 28px rgba(27,47,58,.08)!important;
  overflow:visible!important;
  transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}
body.flow-view-active #view-flows .flow-node:hover{
  border-color:#c5d2d9!important;
  box-shadow:0 14px 36px rgba(27,47,58,.12)!important;
}
body.flow-view-active #view-flows .flow-node.selected{
  border-color:var(--flow-accent)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--flow-accent) 13%,transparent),0 16px 40px rgba(27,47,58,.13)!important;
  transform:translateY(-1px);
}
body.flow-view-active #view-flows .flow-node::before{
  content:"";
  position:absolute;
  left:17px;right:17px;top:-1px;
  height:3px;
  border-radius:0 0 6px 6px;
  background:var(--flow-accent);
  opacity:.9;
}
body.flow-view-active #view-flows .flow-kind-menu{--flow-accent:#178265;--flow-accent-soft:#eef9f5}
body.flow-view-active #view-flows .flow-kind-quiz{--flow-accent:#7057b7;--flow-accent-soft:#f4f1fb}
body.flow-view-active #view-flows .flow-kind-delay{--flow-accent:#8a68c2;--flow-accent-soft:#f6f2fb}
body.flow-view-active #view-flows .flow-kind-input{--flow-accent:#b26f24;--flow-accent-soft:#fff6ea}
body.flow-view-active #view-flows .flow-kind-media{--flow-accent:#2778b8;--flow-accent-soft:#eef6fc}
body.flow-view-active #view-flows .flow-kind-condition{--flow-accent:#7b5aa9;--flow-accent-soft:#f5f1fa}
body.flow-view-active #view-flows .flow-kind-action{--flow-accent:#586974;--flow-accent-soft:#f2f5f6}
body.flow-view-active #view-flows .node-main{--flow-accent:#0d6f98;--flow-accent-soft:#edf8fc}

body.flow-view-active #view-flows .flow-node .node-head{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) 18px!important;
  gap:12px!important;
  align-items:center!important;
  min-height:72px!important;
  padding:15px 16px 13px!important;
  background:#fff!important;
  border:0!important;
  border-radius:18px 18px 0 0!important;
  overflow:hidden!important;
}
body.flow-view-active #view-flows .flow-node .node-type{
  width:40px!important;height:40px!important;
  display:grid!important;place-items:center!important;
  margin:0!important;
  color:var(--flow-accent)!important;
  background:var(--flow-accent-soft)!important;
  border:1px solid color-mix(in srgb,var(--flow-accent) 11%,#fff)!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
body.flow-view-active #view-flows .flow-node .node-type svg{
  width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round
}
body.flow-view-active #view-flows .flow-node .node-title-wrap{min-width:0!important}
body.flow-view-active #view-flows .flow-node .node-kicker{
  margin:0 0 4px!important;
  color:#84939c!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:800!important;
  letter-spacing:.09em!important;
}
body.flow-view-active #view-flows .flow-node .node-title{
  color:#172832!important;
  font-size:14px!important;
  line-height:1.22!important;
  font-weight:760!important;
  letter-spacing:-.012em!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.flow-view-active #view-flows .flow-node .node-id{
  margin-top:5px!important;
  color:#97a4ab!important;
  font-size:9px!important;
  font-weight:600!important;
}
body.flow-view-active #view-flows .node-drag-handle{
  width:18px;height:28px;display:grid;grid-template-columns:repeat(2,3px);grid-auto-rows:3px;gap:3px;align-content:center;justify-content:center;opacity:.38
}
body.flow-view-active #view-flows .node-drag-handle i{display:block;width:3px;height:3px;border-radius:50%;background:#6e7f88}

body.flow-view-active #view-flows .flow-node .node-content{
  padding:0 14px 14px!important;
  min-height:0!important;
  background:#fff!important;
  border:0!important;
  overflow:visible!important;
}
body.flow-view-active #view-flows .flow-message-preview{
  max-height:110px!important;
  padding:11px 12px!important;
  color:#41535e!important;
  background:#f7f9fa!important;
  border:0!important;
  border-radius:12px!important;
  font-size:11.5px!important;
  line-height:1.48!important;
  box-shadow:inset 0 0 0 1px #edf1f3!important;
}
body.flow-view-active #view-flows .flow-message-preview.compact{margin-top:9px!important}
body.flow-view-active #view-flows .flow-message-preview.empty{color:#98a5ac!important;background:#fafbfb!important}

body.flow-view-active #view-flows .flow-choices-preview{gap:7px!important;margin-top:9px!important}
body.flow-view-active #view-flows .flow-choice-preview{
  min-height:39px!important;
  display:grid!important;
  grid-template-columns:26px minmax(0,1fr)!important;
  gap:9px!important;
  align-items:center!important;
  padding:6px 30px 6px 7px!important;
  color:#334852!important;
  background:#fff!important;
  border:1px solid #e4e9ec!important;
  border-radius:11px!important;
  font-size:10.5px!important;
  box-shadow:0 2px 5px rgba(24,45,56,.025)!important;
}
body.flow-view-active #view-flows .flow-choice-preview:hover{border-color:#cbd7dd!important;background:#fbfcfd!important}
body.flow-view-active #view-flows .flow-choice-preview>span{
  width:25px!important;height:25px!important;
  color:var(--flow-accent)!important;
  background:var(--flow-accent-soft)!important;
  border-radius:8px!important;
  font-size:9.5px!important;
  font-weight:850!important;
}
body.flow-view-active #view-flows .flow-choice-preview>em{font-size:10.5px!important;font-weight:650!important}
body.flow-view-active #view-flows .flow-more-choices{
  display:block!important;
  padding:3px 3px 0!important;
  color:#8d9aa2!important;
  font-size:9px!important;
  font-weight:650!important;
}

body.flow-view-active #view-flows .flow-node-special{
  min-height:56px!important;
  display:grid!important;
  grid-template-columns:40px minmax(0,1fr)!important;
  gap:11px!important;
  align-items:center!important;
  padding:9px 10px!important;
  color:#334852!important;
  background:#f8fafb!important;
  border:0!important;
  border-radius:12px!important;
  box-shadow:inset 0 0 0 1px #ebeff1!important;
}
body.flow-view-active #view-flows .flow-special-icon{
  width:38px!important;height:38px!important;
  display:grid!important;place-items:center!important;
  color:var(--flow-accent)!important;
  background:var(--flow-accent-soft)!important;
  border-radius:11px!important;
  font-size:0!important;
}
body.flow-view-active #view-flows .flow-special-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.flow-view-active #view-flows .flow-node-special strong{color:#293d47!important;font-size:11.5px!important;font-weight:750!important}
body.flow-view-active #view-flows .flow-node-special small{margin-top:4px!important;color:#87959d!important;font-size:9.5px!important}
body.flow-view-active #view-flows .flow-input-preview{
  min-height:42px!important;
  margin-top:8px!important;
  padding:8px 10px!important;
  background:#f8fafb!important;
  border:1px solid #e5eaed!important;
  border-radius:11px!important;
}
body.flow-view-active #view-flows .flow-input-preview span{font-size:10px!important;color:#687983!important}
body.flow-view-active #view-flows .flow-input-preview strong{padding:5px 8px!important;color:var(--flow-accent)!important;background:var(--flow-accent-soft)!important;font-size:9px!important}

body.flow-view-active #view-flows .flow-condition-preview{
  gap:8px!important;
  padding:10px!important;
  background:#f8fafb!important;
  border:0!important;
  border-radius:12px!important;
  box-shadow:inset 0 0 0 1px #e9edf0!important;
}
body.flow-view-active #view-flows .flow-condition-preview>div:first-child{padding:3px 2px 6px!important;border-bottom:1px solid #e7ecef!important}
body.flow-view-active #view-flows .flow-condition-preview>div span{font-size:9px!important;color:var(--flow-accent)!important}
body.flow-view-active #view-flows .flow-condition-preview>div strong{font-size:10.5px!important;color:#334852!important}
body.flow-view-active #view-flows .flow-condition-preview small{font-size:9.5px!important;color:#687983!important}

body.flow-view-active #view-flows .flow-action-pills{gap:5px!important;margin-top:9px!important}
body.flow-view-active #view-flows .flow-action-pill{
  padding:5px 7px!important;
  color:#5d707b!important;
  background:#f1f4f5!important;
  border-radius:7px!important;
  font-size:8.5px!important;
  font-weight:700!important;
}
body.flow-view-active #view-flows .flow-node .node-footer{
  min-height:36px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:14px!important;
  padding:9px 15px 10px!important;
  color:#96a2a9!important;
  background:#fff!important;
  border-top:1px solid #eef1f3!important;
  border-radius:0 0 18px 18px!important;
  font-size:9px!important;
  font-weight:700!important;
  letter-spacing:.01em!important;
  overflow:hidden!important;
}
body.flow-view-active #view-flows .flow-node .node-footer span{display:inline-flex;align-items:center;gap:5px}
body.flow-view-active #view-flows .flow-node .node-footer span+span::before{content:"·";margin-right:8px;color:#c0c9ce}

/* Portas discretas no repouso, muito claras ao conectar. */
body.flow-view-active #view-flows .flow-connect-handle{
  width:16px!important;height:16px!important;
  color:var(--flow-accent)!important;
  background:#fff!important;
  border:2px solid #c6d2d8!important;
  box-shadow:0 2px 7px rgba(25,48,60,.12)!important;
}
body.flow-view-active #view-flows .flow-input-handle{left:-9px!important}
body.flow-view-active #view-flows .flow-input-handle::after{width:4px!important;height:4px!important;background:#7f949f!important}
body.flow-view-active #view-flows .flow-output-default{right:-9px!important}
body.flow-view-active #view-flows .flow-connect-row>.flow-output-handle,
body.flow-view-active #view-flows .flow-condition-route>.flow-output-handle{right:-17px!important}
body.flow-view-active #view-flows .flow-connect-handle:hover,
body.flow-view-active #view-flows .flow-connect-handle.dragging{
  border-color:var(--flow-accent)!important;
  background:var(--flow-accent-soft)!important;
  box-shadow:0 0 0 5px color-mix(in srgb,var(--flow-accent) 12%,transparent)!important;
}
body.flow-view-active #view-flows .flow-line{stroke:#a8b7bf!important;stroke-width:1.55!important;opacity:.86}
body.flow-view-active #view-flows .flow-line.active{stroke:#2581aa!important;stroke-width:2.25!important;opacity:1}
body.flow-view-active #view-flows .flow-arrow-head{fill:#96a8b1!important}

/* Cabeçalho do editor e controles do canvas. */
body.flow-view-active #view-flows .flow-profile-dock{
  min-height:64px!important;
  padding:10px 12px!important;
  border:1px solid #e1e7ea!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 6px 20px rgba(27,47,58,.06)!important;
}
body.flow-view-active #view-flows .flow-profile-label span{color:#8a979f!important;font-size:9px!important;letter-spacing:.1em!important}
body.flow-view-active #view-flows .flow-profile-select{
  height:42px!important;min-height:42px!important;
  padding:0 40px 0 13px!important;
  color:#233640!important;
  background:#f8fafb!important;
  border:1px solid #dde5e9!important;
  border-radius:10px!important;
  font-family:Inter,"Segoe UI",Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:650!important;
}
body.flow-view-active #view-flows .flow-profile-status{
  min-height:28px!important;padding:0 10px!important;
  border-radius:8px!important;
  font-size:8.5px!important;
  letter-spacing:.03em!important;
}
body.flow-view-active #view-flows .flow-profile-actions .btn{
  min-height:38px!important;
  padding:0 12px!important;
  border-radius:9px!important;
  font-size:11px!important;
  font-weight:700!important;
}
body.flow-view-active #view-flows .flow-canvas-controls{
  display:flex!important;align-items:center!important;
  gap:2px!important;
  padding:5px!important;
  background:rgba(255,255,255,.96)!important;
  border:1px solid #dfe6e9!important;
  border-radius:13px!important;
  box-shadow:0 8px 24px rgba(24,45,56,.10)!important;
}
body.flow-view-active #view-flows .flow-canvas-controls button{
  width:36px!important;height:36px!important;
  border:0!important;
  border-radius:9px!important;
  color:#51636d!important;
  background:transparent!important;
  font-size:13px!important;
  font-weight:750!important;
}
body.flow-view-active #view-flows .flow-canvas-controls button:hover{background:#f0f4f6!important;color:#173b4d!important}
body.flow-view-active #view-flows .flow-canvas-controls .flow-add-block{color:#fff!important;background:#146f97!important;font-size:19px!important}
body.flow-view-active #view-flows .flow-canvas-controls .flow-add-block:hover{background:#0e6489!important}
body.flow-view-active #view-flows .flow-canvas-controls .flow-zoom-value{width:auto!important;min-width:54px!important;padding:0 8px!important}
body.flow-view-active #view-flows .flow-link-hint{
  padding:8px 11px!important;
  color:#677983!important;
  background:rgba(255,255,255,.94)!important;
  border:1px solid #e0e7ea!important;
  border-radius:10px!important;
  box-shadow:0 5px 16px rgba(24,45,56,.07)!important;
  font-size:9.5px!important;
}
body.flow-view-active #view-flows .flow-link-hint span{color:#16749d!important}

/* DARK: mantém a mesma linguagem, sem ficar "painel hacker". */
html[data-theme="dark"] body.flow-view-active #view-flows .flow-stage-wrap{background:#0d171d!important;background-image:none!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node{
  background:#142229!important;
  border-color:#263a44!important;
  box-shadow:0 10px 30px rgba(0,0,0,.18)!important;
}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node:hover{border-color:#36515e!important;box-shadow:0 14px 38px rgba(0,0,0,.24)!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node .node-head,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node .node-content,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node .node-footer{background:#142229!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node .node-title{color:#eef4f6!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node .node-kicker{color:#82949e!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node .node-id{color:#73858e!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-message-preview,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node-special,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-input-preview,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-condition-preview{
  color:#c8d5db!important;
  background:#102028!important;
  box-shadow:inset 0 0 0 1px #233740!important;
  border-color:#233740!important;
}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-message-preview{color:#cbd8de!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-choice-preview{
  color:#cbd8de!important;
  background:#112129!important;
  border-color:#263a44!important;
  box-shadow:none!important;
}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-choice-preview:hover{background:#162831!important;border-color:#38515c!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-choice-preview>em{color:#cbd8de!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node-special strong{color:#e1eaee!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node-special small,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-input-preview span,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-condition-preview small{color:#8fa1aa!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node .node-footer{border-color:#263942!important;color:#82949d!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-node .node-footer span+span::before{color:#40545e!important}
html[data-theme="dark"] body.flow-view-active #view-flows .node-drag-handle i{background:#93a4ad!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-connect-handle{background:#15262e!important;border-color:#4b626e!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-profile-dock,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-canvas-controls,
html[data-theme="dark"] body.flow-view-active #view-flows .flow-link-hint{background:#122128!important;border-color:#263b45!important;color:#a9bac2!important;box-shadow:none!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-profile-select{color:#e4ecef!important;background:#0f1c23!important;border-color:#2a414c!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-profile-actions .btn{border-color:#314953!important;background:#14262f!important;color:#d9e4e9!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-canvas-controls button{color:#a9bbc3!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-canvas-controls button:hover{background:#1c3039!important;color:#fff!important}
html[data-theme="dark"] body.flow-view-active #view-flows .flow-canvas-controls .flow-add-block{background:#16769f!important;color:#fff!important}

@media(max-width:820px){
  body.flow-view-active #view-flows .flow-node{width:286px!important}
  body.flow-view-active #view-flows .flow-node .node-head{grid-template-columns:38px minmax(0,1fr) 16px!important;padding:13px 14px 11px!important}
  body.flow-view-active #view-flows .flow-node .node-type{width:36px!important;height:36px!important}
}


/* ================================================================
   FLOW v1.3.3 · FULL-BLEED REAL
   Correção estrutural: o editor ocupa a largura real da janela.
   Não tenta mais "encaixar" todos os blocos automaticamente ao abrir.
   ================================================================ */
@media (min-width:821px){
  body.flow-view-active{
    overflow:hidden!important;
  }
  body.flow-view-active .app-shell{
    display:block!important;
    width:100vw!important;
    max-width:none!important;
    min-height:100vh!important;
  }
  body.flow-view-active .sidebar{
    display:none!important;
  }
  body.flow-view-active .main{
    display:flex!important;
    flex-direction:column!important;
    width:100vw!important;
    max-width:none!important;
    min-width:0!important;
    height:100vh!important;
    height:100dvh!important;
    margin:0!important;
    padding:0!important;
    grid-column:auto!important;
  }
  body.flow-view-active .topbar{
    flex:0 0 var(--topbar)!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  body.flow-view-active .content{
    flex:1 1 auto!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.flow-view-active #view-flows{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.flow-view-active #view-flows .flow-profile-dock{
    box-sizing:border-box!important;
    flex:0 0 auto!important;
    width:calc(100% - 24px)!important;
    max-width:none!important;
    min-width:0!important;
    margin:10px 12px 8px!important;
  }
  body.flow-view-active #view-flows .flow-layout{
    position:relative!important;
    flex:1 1 auto!important;
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
  }
  body.flow-view-active #view-flows .flow-stage-wrap{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
}


/* ================================================================
   FLOW v1.3.5 · SIDEBAR OVERLAY CORRIGIDA
   O v1.3.4 foi gravado com \n literais e o navegador ignorou o bloco.
   ================================================================ */
@media (min-width:821px){
  body.flow-view-active .topbar{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:12px!important;
  }
  body.flow-view-active #mobileNavToggle{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    width:auto!important;
    min-width:108px!important;
    height:42px!important;
    padding:0 13px!important;
    margin:0!important;
    border:1px solid #dbe4e9!important;
    border-radius:11px!important;
    background:#fff!important;
    color:#203844!important;
    font-family:Inter,"Segoe UI",Arial,sans-serif!important;
    font-size:18px!important;
    font-weight:800!important;
    line-height:1!important;
    box-shadow:none!important;
    cursor:pointer!important;
  }
  body.flow-view-active #mobileNavToggle::after{
    content:"Módulos"!important;
    display:inline-block!important;
    font-size:12px!important;
    font-weight:800!important;
    letter-spacing:.01em!important;
  }
  body.flow-view-active #mobileNavToggle:hover,
  body.flow-view-active #mobileNavToggle:focus-visible{
    background:#f4f8fa!important;
    border-color:#c9d7de!important;
    outline:none!important;
  }
  body.flow-view-active .top-title{
    min-width:0!important;
    justify-self:start!important;
  }
  body.flow-view-active .top-actions{
    justify-self:end!important;
  }

  body.flow-view-active .sidebar{
    display:flex!important;
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    left:0!important;
    width:286px!important;
    max-width:calc(100vw - 40px)!important;
    height:100dvh!important;
    z-index:1002!important;
    transform:translateX(calc(-100% - 20px))!important;
    transition:transform .2s cubic-bezier(.2,.8,.2,1)!important;
    box-shadow:18px 0 48px rgba(15,35,46,.16)!important;
    border-right:1px solid #e1e8ec!important;
  }
  body.flow-view-active .sidebar.mobile-open{
    transform:translateX(0)!important;
  }
  body.flow-view-active #sidebarBackdrop.open{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    z-index:1001!important;
    background:rgba(13,28,36,.30)!important;
    backdrop-filter:blur(2px)!important;
  }
  body.flow-view-active.nav-open{overflow:hidden!important;}

  html[data-theme="dark"] body.flow-view-active #mobileNavToggle{
    color:#dce7eb!important;
    background:#14242c!important;
    border-color:#2a404a!important;
  }
  html[data-theme="dark"] body.flow-view-active #mobileNavToggle:hover,
  html[data-theme="dark"] body.flow-view-active #mobileNavToggle:focus-visible{
    background:#1a3039!important;
    border-color:#36515d!important;
  }
  html[data-theme="dark"] body.flow-view-active .sidebar{
    border-right-color:#263b45!important;
    box-shadow:18px 0 48px rgba(0,0,0,.32)!important;
  }
}

/* Rebranding v1.4 — histórico persistente da recuperação YuCare */
.ecommerce-history-head{
  display:flex;align-items:flex-end;justify-content:space-between;gap:18px;
  margin:28px 0 12px;padding-top:22px;border-top:1px solid var(--line,#e7ecf1)
}
.ecommerce-history-head>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.ecommerce-history-head strong{font-size:18px;line-height:1.2;color:var(--text,#10212b);font-weight:750;letter-spacing:-.02em}
.ecommerce-history-head span{font-size:12.5px;color:var(--muted,#6d7d87)}
.ecommerce-history-head>span{flex:0 0 auto;background:var(--surface-2,#f4f7f9);border:1px solid var(--line,#e2e8ed);border-radius:999px;padding:7px 10px;font-weight:700}
.ecommerce-history-list{opacity:.96}
.ecommerce-history-list .ecommerce-recovery-card{background:var(--surface,#fff)}
@media(max-width:760px){
  .ecommerce-history-head{align-items:flex-start;flex-direction:column;margin-top:22px}
}

/* V8.9 · stand-by e encerramento automático */
.mini-state.standby{background:#fff6dd;color:#8a5a00}.mini-state.waiting-staff{background:#ffecec;color:#b42318;font-weight:800}.crm-mode-chip.standby{background:#fff6dd;color:#8a5a00}.crm-mode-chip.waiting-staff{background:#ffecec;color:#b42318}.crm-chat-chip.standby{background:#fff6dd;border-color:#f4d58a;color:#7a5100}.crm-chat-chip.waiting-staff{background:#fff0f0;border-color:#ffc7c7;color:#a61b1b}
.crm-conversation-item.campaign-opt-out{border-left:3px solid #b42318}
.crm-conversation-item.campaign-opt-out .crm-list-tags{flex-wrap:wrap}
.crm-card.campaign-opt-out{border-left:3px solid #b42318}
.mini-state.campaign-opt-out,.crm-card-tags span.campaign-opt-out{background:#fff0ed;color:#9f2118;font-weight:800}
.crm-chat-chip.campaign-opt-out{border-left:3px solid #b42318!important;font-weight:700}
.crm-campaign-opt-out{display:grid;gap:4px;margin:12px;padding:11px 12px;border:1px solid #e7b6b0;border-left:3px solid #b42318;border-radius:8px;background:#fff8f6;color:#6f302a}
.crm-campaign-opt-out strong{font-size:12px;color:#9f2118}
.crm-campaign-opt-out span{font-size:11px;line-height:1.5}
html[data-theme="dark"] .mini-state.campaign-opt-out,html[data-theme="dark"] .crm-card-tags span.campaign-opt-out{background:#3a2625!important;color:#ffcbc5!important}
html[data-theme="dark"] .crm-campaign-opt-out{background:#2a1e20;border-color:#804740;color:#ffcbc5}
html[data-theme="dark"] .crm-campaign-opt-out strong{color:#ffcbc5}

/* Service rating refresh — 2026-10-02 */
#dashboardServiceRating{padding-top:14px}
.service-rating-overview{display:grid;grid-template-columns:minmax(145px,.8fr) minmax(0,1.2fr);gap:14px;align-items:stretch;margin-bottom:18px}
.service-rating-score{border:1px solid #dfe8ed;border-radius:12px;padding:14px 15px;background:#fff;min-width:0}
.service-rating-eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:.045em;text-transform:uppercase;color:#7d8e98}
.service-rating-score-value{display:flex;align-items:flex-end;gap:4px;margin-top:6px}
.service-rating-score-value strong{font-size:36px;line-height:.95;letter-spacing:-.045em;color:#17394b}
.service-rating-score-value>span{font-size:12px;line-height:1.25;color:#8797a1;font-weight:750;margin-bottom:3px}
.service-rating-stars{display:flex;gap:3px;margin-top:9px;font-size:16px;line-height:1;color:#d9e2e7}
.service-rating-stars span.is-on{color:#1795c5}
.service-rating-score>small{display:block;margin-top:9px;font-size:10.5px;color:#72848f;font-weight:650}
.service-rating-response{display:flex;flex-direction:column;justify-content:center;border:1px solid #dfe8ed;border-radius:12px;padding:14px 15px;background:#fbfcfd;min-width:0}
.service-rating-response-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.service-rating-response-head span{font-size:11px;color:#607582;font-weight:750}
.service-rating-response-head strong{font-size:24px;line-height:1;color:#17394b;letter-spacing:-.03em}
.service-rating-response-track{height:7px;border-radius:999px;background:#eaf0f3;overflow:hidden;margin:10px 0 8px}
.service-rating-response-track i{display:block;height:100%;border-radius:inherit;background:#1795c5}
.service-rating-response small{font-size:10.5px;line-height:1.35;color:#87959e}
.service-rating-response small b{color:#526b79;font-weight:800}
.service-rating-distribution{display:flex;flex-direction:column;gap:11px}
.service-rating-row{min-width:0}
.service-rating-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.service-rating-row-label{display:flex;align-items:center;gap:8px;min-width:0}
.service-rating-row-label>span{min-width:34px;height:23px;padding:0 7px;border:1px solid #dce8ee;border-radius:7px;display:inline-grid;place-items:center;font-size:10px;font-weight:850;color:#6e8794;background:#fff}
.service-rating-row-label strong{font-size:11.5px;color:#395666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.service-rating-row-head>b{font-size:11.5px;color:#80909a}
.service-rating-row-track{height:6px;border-radius:999px;background:#edf2f4;overflow:hidden;margin-left:42px}
.service-rating-row-track i{display:block;height:100%;border-radius:inherit;background:#b8dce9}
.service-rating-row.has-value .service-rating-row-label>span{border-color:#9fd2e4;color:#0f7eac;background:#f6fbfd}
.service-rating-row.has-value .service-rating-row-label strong,.service-rating-row.has-value .service-rating-row-head>b{color:#1f536d}
.service-rating-row.has-value .service-rating-row-track i{background:#1795c5}
html[data-theme="dark"] .service-rating-score,html[data-theme="dark"] .service-rating-response{background:#13232d;border-color:#2b414d}
html[data-theme="dark"] .service-rating-score-value strong,html[data-theme="dark"] .service-rating-response-head strong{color:#e7f1f6}
html[data-theme="dark"] .service-rating-row-label>span{background:#13232d;border-color:#304955;color:#9eb0ba}
html[data-theme="dark"] .service-rating-row.has-value .service-rating-row-label>span{background:#102c39;border-color:#37677c;color:#8ed3ef}
html[data-theme="dark"] .service-rating-row-label strong{color:#b9c9d1}
html[data-theme="dark"] .service-rating-row-track,html[data-theme="dark"] .service-rating-response-track{background:#243843}
@media(max-width:720px){.service-rating-overview{grid-template-columns:1fr}.service-rating-score{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"eyebrow score" "stars score" "meta meta";column-gap:14px}.service-rating-eyebrow{grid-area:eyebrow}.service-rating-score-value{grid-area:score;margin-top:0;align-self:center}.service-rating-stars{grid-area:stars}.service-rating-score>small{grid-area:meta}.service-rating-response{padding:13px 14px}}
@media(max-width:420px){#dashboardServiceRating{padding-left:12px;padding-right:12px}.service-rating-score-value strong{font-size:32px}.service-rating-row-track{margin-left:0}.service-rating-row-label strong{font-size:11px}}


/* ================================================================
   V10.0 · CONVERSAS · MENSAGEIRO LIMPO
   Escopo exclusivo da aba Conversas.
   Lista 340–390px, chat dominante e detalhes em drawer sobreposto.
   ================================================================ */
body.inbox-view-active{
  overflow:hidden!important;
}
body.inbox-view-active #view-inbox.active{
  background:#eef2f4!important;
}
body.inbox-view-active .crm-inbox-shell,
body.inbox-view-active .crm-inbox-shell *{
  box-sizing:border-box;
}
body.inbox-view-active .crm-inbox-shell{
  position:relative!important;
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
body.inbox-view-active .crm-conversation-list{
  min-width:0!important;
  height:100%!important;
  background:#fff!important;
  border:0!important;
  border-right:1px solid #dfe5e8!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
body.inbox-view-active .crm-list-head{
  min-height:72px!important;
  height:72px!important;
  padding:11px 14px 10px 16px!important;
  background:#fff!important;
  border-bottom:1px solid #eef1f3!important;
}
body.inbox-view-active .crm-list-head h2{
  margin:0!important;
  color:#182630!important;
  font-size:20px!important;
  line-height:1.1!important;
  font-weight:760!important;
  letter-spacing:-.025em!important;
}
body.inbox-view-active .crm-list-head p{
  margin:4px 0 0!important;
  color:#7a8993!important;
  font-size:11px!important;
  line-height:1.2!important;
}
body.inbox-view-active .crm-list-head-actions{
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
}
body.inbox-view-active .crm-new-contact-btn,
body.inbox-view-active .crm-icon-btn{
  height:36px!important;
  min-height:36px!important;
  border:1px solid #d8e0e5!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#31505f!important;
  box-shadow:none!important;
  font-family:Inter,"Segoe UI",Arial,sans-serif!important;
  font-size:11px!important;
  font-weight:750!important;
}
body.inbox-view-active .crm-new-contact-btn{
  padding:0 10px!important;
}
body.inbox-view-active .crm-icon-btn{
  width:36px!important;
  padding:0!important;
  font-size:18px!important;
}
body.inbox-view-active .crm-new-contact-btn:hover,
body.inbox-view-active .crm-icon-btn:hover{
  background:#f5f8fa!important;
  border-color:#c7d4db!important;
  color:#126d97!important;
}
body.inbox-view-active .crm-search-wrap{
  padding:10px 12px 7px!important;
  background:#fff!important;
}
body.inbox-view-active .crm-search{
  width:100%!important;
  height:42px!important;
  min-height:42px!important;
  padding:0 13px!important;
  border:1px solid #dce4e8!important;
  border-radius:9px!important;
  background:#f7f9fa!important;
  color:#1d2e38!important;
  box-shadow:none!important;
  font-size:12.5px!important;
}
body.inbox-view-active .crm-search:focus{
  border-color:#9cc5d8!important;
  background:#fff!important;
  outline:0!important;
  box-shadow:0 0 0 2px rgba(20,115,156,.08)!important;
}
body.inbox-view-active .crm-filter-row{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  padding:0 12px 9px!important;
  background:#fff!important;
  border-bottom:1px solid #e9eef1!important;
  overflow-x:auto!important;
  scrollbar-width:none!important;
}
body.inbox-view-active .crm-filter-row::-webkit-scrollbar{display:none!important}
body.inbox-view-active .crm-filter{
  flex:0 0 auto!important;
  min-height:31px!important;
  padding:6px 10px!important;
  border:1px solid transparent!important;
  border-radius:7px!important;
  background:#f1f4f6!important;
  color:#61717b!important;
  box-shadow:none!important;
  font-size:10.5px!important;
  font-weight:750!important;
}
body.inbox-view-active .crm-filter:hover{
  background:#e9eff2!important;
  color:#294b5d!important;
}
body.inbox-view-active .crm-filter.active{
  background:#e4f1f7!important;
  border-color:#c5deea!important;
  color:#0d678f!important;
}
body.inbox-view-active .crm-conversations{
  flex:1 1 auto!important;
  min-height:0!important;
  padding:0!important;
  background:#fff!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
}
body.inbox-view-active .crm-conversation-item{
  position:relative!important;
  display:grid!important;
  grid-template-columns:48px minmax(0,1fr)!important;
  gap:11px!important;
  min-height:88px!important;
  margin:0!important;
  padding:11px 12px 10px 14px!important;
  border:0!important;
  border-bottom:1px solid #edf1f3!important;
  border-radius:0!important;
  background:#fff!important;
  color:#24343e!important;
  box-shadow:none!important;
  transition:background .12s ease!important;
}
body.inbox-view-active .crm-conversation-item::before{
  content:""!important;
  position:absolute!important;
  left:0!important;
  top:0!important;
  bottom:0!important;
  width:3px!important;
  background:transparent!important;
}
body.inbox-view-active .crm-conversation-item:hover{
  background:#f5f8fa!important;
}
body.inbox-view-active .crm-conversation-item.active{
  background:#eaf4f8!important;
  box-shadow:none!important;
}
body.inbox-view-active .crm-conversation-item.active::before{
  background:#1378a4!important;
}
body.inbox-view-active .crm-list-avatar{
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  flex:0 0 48px!important;
  border-radius:50%!important;
  background:#dfeef4!important;
  color:#166789!important;
  box-shadow:none!important;
  font-size:15px!important;
  font-weight:800!important;
}
body.inbox-view-active .crm-list-copy{
  min-width:0!important;
  padding-top:1px!important;
}
body.inbox-view-active .crm-list-row{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
}
body.inbox-view-active .crm-list-row strong{
  min-width:0!important;
  flex:1 1 auto!important;
  overflow:hidden!important;
  color:#1d2b34!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13.5px!important;
  line-height:1.25!important;
  font-weight:720!important;
}
body.inbox-view-active .crm-list-row time{
  color:#87949c!important;
  font-size:9.5px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
body.inbox-view-active .crm-list-phone{
  margin-top:2px!important;
  color:#88959d!important;
  font-size:10px!important;
  line-height:1.2!important;
}
body.inbox-view-active .crm-list-preview{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin-top:5px!important;
  min-width:0!important;
}
body.inbox-view-active .crm-list-preview>span{
  flex:1 1 auto!important;
  min-width:0!important;
  overflow:hidden!important;
  color:#5f6f79!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:11.5px!important;
  line-height:1.3!important;
}
body.inbox-view-active .crm-list-preview>b{
  display:grid!important;
  place-items:center!important;
  min-width:19px!important;
  height:19px!important;
  padding:0 5px!important;
  border-radius:10px!important;
  background:#23a56e!important;
  color:#fff!important;
  font-size:9px!important;
  font-weight:800!important;
}
body.inbox-view-active .crm-list-tags{
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  min-width:0!important;
  margin-top:6px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
body.inbox-view-active .crm-list-tags>span{
  flex:0 0 auto!important;
  max-width:160px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.inbox-view-active .mini-state{
  min-height:20px!important;
  padding:3px 6px!important;
  border-radius:5px!important;
  font-size:8.5px!important;
  line-height:1.2!important;
  font-weight:780!important;
}
body.inbox-view-active .crm-conversation-remove{
  width:26px!important;
  height:26px!important;
  border-radius:6px!important;
  color:#7c8a93!important;
}
body.inbox-view-active .crm-conversation-remove:hover{
  background:#e4ecef!important;
  color:#294c5d!important;
}

/* Chat: ocupa o espaço principal, sem sensação de dashboard. */
body.inbox-view-active .crm-chat-panel{
  position:relative!important;
  min-width:0!important;
  width:100%!important;
  height:100%!important;
  border:0!important;
  background:#eef2f3!important;
  overflow:hidden!important;
}
body.inbox-view-active .crm-chat-active{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  flex-direction:column!important;
  background:#eef2f3!important;
}
body.inbox-view-active .crm-empty-chat{
  inset:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:36px!important;
  background:#eef2f3!important;
  background-image:none!important;
  text-align:center!important;
}
body.inbox-view-active .crm-empty-copy{
  max-width:430px!important;
}
body.inbox-view-active .crm-empty-copy strong,
body.inbox-view-active .crm-empty-chat>strong{
  margin:0 0 8px!important;
  color:#31424c!important;
  font-size:20px!important;
  font-weight:740!important;
}
body.inbox-view-active .crm-empty-copy span,
body.inbox-view-active .crm-empty-chat>span{
  color:#75848d!important;
  font-size:12.5px!important;
  line-height:1.6!important;
}
body.inbox-view-active .crm-chat-head{
  position:relative!important;
  z-index:5!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-height:72px!important;
  height:72px!important;
  padding:10px 14px!important;
  border:0!important;
  border-bottom:1px solid #dce3e6!important;
  background:#fff!important;
  box-shadow:none!important;
}
body.inbox-view-active .crm-mobile-back{
  display:none!important;
}
body.inbox-view-active .crm-chat-avatar{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  flex:0 0 42px!important;
  border-radius:50%!important;
  background:#dfeef4!important;
  color:#166789!important;
  box-shadow:none!important;
  font-size:14px!important;
  font-weight:800!important;
}
body.inbox-view-active .crm-chat-title{
  flex:1 1 auto!important;
  min-width:0!important;
}
body.inbox-view-active .crm-chat-title strong{
  display:block!important;
  overflow:hidden!important;
  color:#1c2b34!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:14px!important;
  line-height:1.2!important;
  font-weight:760!important;
}
body.inbox-view-active .crm-chat-title span{
  display:block!important;
  margin-top:3px!important;
  overflow:hidden!important;
  color:#78868e!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:10.5px!important;
  line-height:1.2!important;
}
body.inbox-view-active .crm-chat-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:5px!important;
  min-width:0!important;
  margin-left:auto!important;
}
body.inbox-view-active .crm-chat-actions .btn,
body.inbox-view-active .crm-details-btn,
body.inbox-view-active .crm-mode-chip{
  min-height:34px!important;
  height:34px!important;
  padding:0 9px!important;
  border-radius:7px!important;
  box-shadow:none!important;
  font-size:9.5px!important;
  line-height:1!important;
  font-weight:760!important;
  white-space:nowrap!important;
}
body.inbox-view-active .crm-mode-chip{
  display:inline-flex!important;
  align-items:center!important;
  border:1px solid #dce5e9!important;
  background:#f5f8f9!important;
  color:#4f626d!important;
}
body.inbox-view-active .crm-details-btn{
  display:inline-grid!important;
  place-items:center!important;
  border:1px solid #d6e0e5!important;
  background:#fff!important;
  color:#365461!important;
}
body.inbox-view-active .crm-details-btn:hover{
  background:#f2f6f8!important;
  border-color:#c4d3da!important;
}
body.inbox-view-active .crm-chat-summary{
  flex:0 0 auto!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  gap:5px!important;
  width:100%!important;
  min-height:0!important;
  padding:7px 10px!important;
  border:0!important;
  border-bottom:1px solid #dde5e8!important;
  background:#f8fafb!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important;
}
body.inbox-view-active .crm-chat-summary::-webkit-scrollbar{display:none!important}
body.inbox-view-active .crm-chat-summary:empty{display:none!important}
body.inbox-view-active .crm-chat-chip{
  flex:0 0 auto!important;
  min-height:26px!important;
  padding:5px 8px!important;
  border:1px solid #dbe4e8!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#64737c!important;
  box-shadow:none!important;
  font-size:9.5px!important;
  line-height:1.15!important;
}
body.inbox-view-active .crm-chat-chip b{
  color:#30434e!important;
  font-weight:780!important;
}
body.inbox-view-active .crm-message-area{
  flex:1 1 auto!important;
  width:100%!important;
  min-height:0!important;
  padding:18px clamp(18px,3vw,40px) 20px!important;
  background:#eef2f3!important;
  background-image:none!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
body.inbox-view-active .crm-message-row{
  margin:5px 0!important;
}
body.inbox-view-active .crm-message-bubble{
  position:relative!important;
  max-width:min(68%,760px)!important;
  min-width:72px!important;
  padding:8px 10px 6px!important;
  border:1px solid #dde4e7!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#1f2d35!important;
  box-shadow:none!important;
  font-size:13.5px!important;
  line-height:1.45!important;
}
body.inbox-view-active .crm-message-row.inbound .crm-message-bubble{
  border-top-left-radius:3px!important;
}
body.inbox-view-active .crm-message-row.outbound .crm-message-bubble{
  border-color:#cfe8cc!important;
  border-top-right-radius:3px!important;
  background:#dcf8d7!important;
  color:#173224!important;
}
body.inbox-view-active .crm-message-row.outbound .crm-message-bubble.bot{
  border-color:#c9e1eb!important;
  background:#dff1f7!important;
  color:#17313d!important;
}
body.inbox-view-active .crm-message-text{
  color:inherit!important;
  font-size:13.5px!important;
  line-height:1.45!important;
}
body.inbox-view-active .crm-message-foot{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:7px!important;
  margin-top:4px!important;
  color:#7b898f!important;
  font-size:8.5px!important;
  line-height:1!important;
}
body.inbox-view-active .crm-message-menu{
  width:25px!important;
  height:25px!important;
  border-radius:5px!important;
  background:transparent!important;
  color:#7d898f!important;
}
body.inbox-view-active .crm-day-sep{
  margin:12px 0!important;
}
body.inbox-view-active .crm-day-sep span,
body.inbox-view-active .crm-history-start{
  border:1px solid #d7e1e5!important;
  border-radius:7px!important;
  background:#f8fafb!important;
  box-shadow:none!important;
  color:#667680!important;
}
body.inbox-view-active .crm-day-sep span{
  padding:5px 8px!important;
  font-size:9px!important;
}
body.inbox-view-active .crm-history-start{
  max-width:440px!important;
  margin:20px auto!important;
  padding:13px 15px!important;
}
body.inbox-view-active .crm-media-asset img,
body.inbox-view-active .crm-media-asset video{
  border-radius:7px!important;
}

/* Composer inspirado em mensageiro: baixo, limpo e sem card flutuante. */
body.inbox-view-active .crm-composer{
  position:relative!important;
  z-index:5!important;
  flex:0 0 auto!important;
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) 76px!important;
  align-items:end!important;
  gap:7px!important;
  width:100%!important;
  min-height:66px!important;
  padding:9px 11px!important;
  border:0!important;
  border-top:1px solid #dbe3e6!important;
  background:#f3f5f6!important;
  box-shadow:none!important;
}
body.inbox-view-active .crm-audio-btn{
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  border:1px solid #d6e0e4!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#43606e!important;
  box-shadow:none!important;
  font-size:17px!important;
}
body.inbox-view-active .crm-composer-input{
  width:100%!important;
  min-width:0!important;
  min-height:44px!important;
  max-height:116px!important;
  padding:11px 13px!important;
  border:1px solid #d7e0e4!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#1c2c34!important;
  box-shadow:none!important;
  font-size:13px!important;
  line-height:1.35!important;
  resize:none!important;
}
body.inbox-view-active .crm-composer-input:focus{
  border-color:#a9c9d7!important;
  outline:0!important;
  box-shadow:0 0 0 2px rgba(20,115,156,.07)!important;
}
body.inbox-view-active .crm-send-btn{
  width:76px!important;
  min-width:76px!important;
  height:44px!important;
  padding:0 12px!important;
  border:1px solid #0c6f9b!important;
  border-radius:9px!important;
  background:#0d78a7!important;
  color:#fff!important;
  box-shadow:none!important;
  font-size:11px!important;
  font-weight:800!important;
}
body.inbox-view-active .crm-send-btn:hover{
  background:#0b6992!important;
}
body.inbox-view-active .crm-composer-hint{
  display:none!important;
}

/* Drawer de detalhes: nunca rouba largura do chat. */
body.inbox-view-active .crm-contact-panel{
  display:flex!important;
  flex-direction:column!important;
  position:absolute!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:auto!important;
  z-index:50!important;
  width:min(390px,calc(100vw - 40px))!important;
  min-width:340px!important;
  max-width:100%!important;
  height:100%!important;
  border:0!important;
  border-left:1px solid #d7e0e4!important;
  background:#fff!important;
  box-shadow:none!important;
  transform:translateX(102%)!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  transition:transform .18s ease,opacity .18s ease,visibility 0s linear .18s!important;
}
body.inbox-view-active.crm-side-open .crm-contact-panel{
  transform:translateX(0)!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
  transition:transform .18s ease,opacity .18s ease!important;
}
body.inbox-view-active .crm-side-head{
  min-height:72px!important;
  padding:12px 14px!important;
  border:0!important;
  border-bottom:1px solid #e1e7ea!important;
  background:#fff!important;
}
body.inbox-view-active .crm-side-head strong{
  color:#21323b!important;
  font-size:14px!important;
}
body.inbox-view-active .crm-side-head>div>span{
  color:#7a8992!important;
  font-size:9.5px!important;
}
body.inbox-view-active .crm-side-close{
  display:grid!important;
  place-items:center!important;
  width:34px!important;
  height:34px!important;
  border:1px solid #d9e1e5!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#65747d!important;
}
body.inbox-view-active .crm-side-scroll{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
}
body.inbox-view-active .crm-side-section{
  border:0!important;
  border-bottom:1px solid #e8edef!important;
  background:#fff!important;
  box-shadow:none!important;
}
body.inbox-view-active .crm-side-input{
  border-radius:7px!important;
  box-shadow:none!important;
}

/* Desktop */
@media(min-width:821px){
  body.inbox-view-active .content{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:calc(100vh - var(--topbar))!important;
    height:calc(100dvh - var(--topbar))!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.inbox-view-active #view-inbox.active{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.inbox-view-active .crm-inbox-shell{
    display:grid!important;
    grid-template-columns:clamp(340px,25vw,390px) minmax(0,1fr)!important;
  }
  body.inbox-view-active .crm-conversation-list,
  body.inbox-view-active .crm-chat-panel{
    position:relative!important;
    inset:auto!important;
    transform:none!important;
  }
}

/* Desktop intermediário: ações continuam cabendo sem esmagar o nome. */
@media(min-width:821px) and (max-width:1280px){
  body.inbox-view-active .crm-inbox-shell{
    grid-template-columns:340px minmax(0,1fr)!important;
  }
  body.inbox-view-active .crm-mode-chip{
    display:none!important;
  }
  body.inbox-view-active .crm-chat-actions .btn,
  body.inbox-view-active .crm-details-btn{
    padding:0 7px!important;
    font-size:9px!important;
  }
}

/* Mobile: lista -> conversa, cada uma ocupando a tela toda. */
@media(max-width:820px){
  body.inbox-view-active .content{
    width:100%!important;
    max-width:none!important;
    height:calc(100vh - var(--topbar))!important;
    height:calc(100dvh - var(--topbar))!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.inbox-view-active #view-inbox.active,
  body.inbox-view-active .crm-inbox-shell{
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
  }
  body.inbox-view-active .crm-inbox-shell{
    display:block!important;
    position:relative!important;
  }
  body.inbox-view-active .crm-conversation-list{
    position:absolute!important;
    inset:0!important;
    z-index:5!important;
    width:100%!important;
    height:100%!important;
    border-right:0!important;
    transform:none!important;
  }
  body.inbox-view-active .crm-chat-panel{
    position:absolute!important;
    inset:0!important;
    z-index:10!important;
    width:100%!important;
    height:100%!important;
    transform:translateX(102%)!important;
    transition:transform .18s ease!important;
  }
  body.inbox-view-active.crm-chat-open .crm-chat-panel{
    transform:translateX(0)!important;
  }
  body.inbox-view-active.crm-chat-open .topbar{
    display:none!important;
  }
  body.inbox-view-active.crm-chat-open .content,
  body.inbox-view-active.crm-chat-open #view-inbox.active,
  body.inbox-view-active.crm-chat-open .crm-inbox-shell{
    height:100vh!important;
    height:100dvh!important;
  }
  body.inbox-view-active .crm-list-head{
    min-height:64px!important;
    height:64px!important;
    padding:9px 10px 8px 12px!important;
  }
  body.inbox-view-active .crm-list-head h2{font-size:18px!important}
  body.inbox-view-active .crm-list-head p{font-size:9.5px!important}
  body.inbox-view-active .crm-new-contact-btn{
    width:36px!important;
    min-width:36px!important;
    padding:0!important;
    overflow:hidden!important;
    color:transparent!important;
    font-size:0!important;
  }
  body.inbox-view-active .crm-new-contact-btn::after{
    content:"+"!important;
    color:#31505f!important;
    font-size:20px!important;
    line-height:1!important;
  }
  body.inbox-view-active .crm-search-wrap{padding:8px 9px 6px!important}
  body.inbox-view-active .crm-search{
    height:42px!important;
    font-size:16px!important;
  }
  body.inbox-view-active .crm-filter-row{padding:0 9px 8px!important}
  body.inbox-view-active .crm-filter{
    min-height:33px!important;
    padding:6px 9px!important;
    font-size:10px!important;
  }
  body.inbox-view-active .crm-conversation-item{
    grid-template-columns:46px minmax(0,1fr)!important;
    min-height:82px!important;
    gap:10px!important;
    padding:10px!important;
  }
  body.inbox-view-active .crm-list-avatar{
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
  }
  body.inbox-view-active .crm-list-row strong{
    max-width:none!important;
    font-size:13px!important;
  }
  body.inbox-view-active .crm-list-preview>span{font-size:11px!important}
  body.inbox-view-active .crm-chat-head{
    display:grid!important;
    grid-template-columns:38px 40px minmax(0,1fr) 38px!important;
    gap:6px!important;
    min-height:62px!important;
    height:62px!important;
    padding:7px 8px!important;
  }
  body.inbox-view-active .crm-mobile-back{
    display:grid!important;
    place-items:center!important;
    width:38px!important;
    height:38px!important;
    border:0!important;
    border-radius:7px!important;
    background:transparent!important;
    color:#334b57!important;
    font-size:21px!important;
  }
  body.inbox-view-active .crm-chat-avatar{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
  }
  body.inbox-view-active .crm-chat-title strong{font-size:13px!important}
  body.inbox-view-active .crm-chat-title span{font-size:9.5px!important}
  body.inbox-view-active .crm-mobile-actions-toggle{
    display:grid!important;
    place-items:center!important;
    width:38px!important;
    height:38px!important;
    border:0!important;
    border-radius:7px!important;
    background:transparent!important;
    color:#405762!important;
    font-size:21px!important;
  }
  body.inbox-view-active .crm-chat-actions{
    display:none!important;
  }
  body.inbox-view-active .crm-chat-actions.mobile-open{
    display:flex!important;
    position:absolute!important;
    top:54px!important;
    right:8px!important;
    z-index:60!important;
    width:min(250px,calc(100vw - 16px))!important;
    padding:7px!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:5px!important;
    border:1px solid #d9e2e6!important;
    border-radius:9px!important;
    background:#fff!important;
    box-shadow:0 10px 28px rgba(25,45,55,.14)!important;
  }
  body.inbox-view-active .crm-chat-actions.mobile-open .btn,
  body.inbox-view-active .crm-chat-actions.mobile-open .crm-details-btn,
  body.inbox-view-active .crm-chat-actions.mobile-open .crm-mode-chip{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    height:38px!important;
    min-height:38px!important;
    padding:0 10px!important;
    font-size:10px!important;
  }
  body.inbox-view-active .crm-chat-summary{
    padding:6px 8px!important;
  }
  body.inbox-view-active .crm-message-area{
    padding:11px 8px 14px!important;
  }
  body.inbox-view-active .crm-message-bubble{
    max-width:88%!important;
    padding:8px 9px 6px!important;
    font-size:13px!important;
  }
  body.inbox-view-active .crm-message-text{
    font-size:13px!important;
  }
  body.inbox-view-active .crm-composer{
    grid-template-columns:44px minmax(0,1fr) 48px!important;
    min-height:62px!important;
    gap:6px!important;
    padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important;
  }
  body.inbox-view-active .crm-composer-input{
    min-height:44px!important;
    max-height:96px!important;
    font-size:16px!important;
  }
  body.inbox-view-active .crm-send-btn{
    width:48px!important;
    min-width:48px!important;
    padding:0!important;
    font-size:0!important;
  }
  body.inbox-view-active .crm-send-btn::after{
    content:"➤"!important;
    font-size:18px!important;
  }
  body.inbox-view-active .crm-contact-panel{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    border-left:0!important;
  }
}

/* Tema escuro do novo layout de Conversas. */
html[data-theme="dark"] body.inbox-view-active #view-inbox.active,
html[data-theme="dark"] body.inbox-view-active .crm-chat-panel,
html[data-theme="dark"] body.inbox-view-active .crm-chat-active,
html[data-theme="dark"] body.inbox-view-active .crm-message-area,
html[data-theme="dark"] body.inbox-view-active .crm-empty-chat{
  background:#0d181e!important;
  background-image:none!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-inbox-shell,
html[data-theme="dark"] body.inbox-view-active .crm-conversation-list,
html[data-theme="dark"] body.inbox-view-active .crm-list-head,
html[data-theme="dark"] body.inbox-view-active .crm-search-wrap,
html[data-theme="dark"] body.inbox-view-active .crm-filter-row,
html[data-theme="dark"] body.inbox-view-active .crm-chat-head,
html[data-theme="dark"] body.inbox-view-active .crm-contact-panel,
html[data-theme="dark"] body.inbox-view-active .crm-side-head,
html[data-theme="dark"] body.inbox-view-active .crm-side-section{
  background:#12232c!important;
  border-color:#2c414b!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-conversation-item{
  background:#12232c!important;
  border-color:#263a44!important;
  color:#eef5f8!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-conversation-item:hover{
  background:#172c36!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-conversation-item.active{
  background:#183a49!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-list-row strong,
html[data-theme="dark"] body.inbox-view-active .crm-chat-title strong,
html[data-theme="dark"] body.inbox-view-active .crm-side-head strong{
  color:#f2f7f9!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-list-phone,
html[data-theme="dark"] body.inbox-view-active .crm-list-preview>span,
html[data-theme="dark"] body.inbox-view-active .crm-chat-title span,
html[data-theme="dark"] body.inbox-view-active .crm-list-head p{
  color:#9bafb9!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-search,
html[data-theme="dark"] body.inbox-view-active .crm-composer-input,
html[data-theme="dark"] body.inbox-view-active .crm-audio-btn{
  background:#0f1d24!important;
  border-color:#314751!important;
  color:#eef5f8!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-filter{
  background:#1a3039!important;
  color:#aebfc7!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-filter.active{
  background:#1c4a5e!important;
  border-color:#2f6d87!important;
  color:#d8f4ff!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-chat-summary{
  background:#102029!important;
  border-color:#2a3e48!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-chat-chip,
html[data-theme="dark"] body.inbox-view-active .crm-mode-chip{
  background:#162a33!important;
  border-color:#314751!important;
  color:#afc0c8!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-chat-chip b{
  color:#edf5f8!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-message-bubble{
  background:#172b34!important;
  border-color:#304751!important;
  color:#f1f6f8!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-message-row.outbound .crm-message-bubble{
  background:#174034!important;
  border-color:#315b4d!important;
  color:#eff8f3!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-message-row.outbound .crm-message-bubble.bot{
  background:#173947!important;
  border-color:#315363!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-composer{
  background:#102029!important;
  border-color:#2a3f49!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-details-btn,
html[data-theme="dark"] body.inbox-view-active .crm-new-contact-btn,
html[data-theme="dark"] body.inbox-view-active .crm-icon-btn,
html[data-theme="dark"] body.inbox-view-active .crm-side-close{
  background:#142731!important;
  border-color:#324852!important;
  color:#d6e2e7!important;
}
html[data-theme="dark"] body.inbox-view-active .crm-chat-actions.mobile-open{
  background:#13252e!important;
  border-color:#334852!important;
}

/* SETTINGS TOPICS · 2026-10-02 */
body.ui-readable #view-settings.active{
  display:block;
  min-height:0!important;
}
body.ui-readable #view-settings .settings-page-head{
  margin-bottom:12px;
}
.settings-topic-nav{
  position:sticky;
  top:calc(var(--topbar) + 8px);
  z-index:12;
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:6px;
  padding:6px;
  margin-bottom:14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px);
}
.settings-topic-nav button{
  min-width:0;
  border:1px solid transparent;
  background:transparent;
  border-radius:8px;
  padding:9px 10px;
  text-align:left;
  color:#526572;
  cursor:pointer;
  transition:.15s ease;
}
.settings-topic-nav button span{
  display:block;
  font-size:12.5px;
  line-height:1.2;
  font-weight:800;
  color:#2d4654;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.settings-topic-nav button small{
  display:block;
  margin-top:2px;
  font-size:9.5px;
  line-height:1.2;
  color:#8797a1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.settings-topic-nav button:hover{background:#f4f8fa}
.settings-topic-nav button.active{
  background:#edf7fb;
  border-color:#b8ddec;
}
.settings-topic-nav button.active span{color:#096c99}
.settings-topic-content{
  width:100%;
  max-width:1240px;
}
.settings-topic-content>[data-settings-topic][data-topic-hidden]{
  display:none!important;
}
.settings-topic-panel{
  width:100%;
  height:auto!important;
  min-height:0!important;
}
body.ui-readable #view-settings .panel-head{
  min-height:0;
  padding:13px 16px;
}
body.ui-readable #view-settings .panel-head h3{
  font-size:16px;
  line-height:1.25;
}
body.ui-readable #view-settings .panel-body{
  padding:14px 16px 15px;
  font-size:14px;
}
body.ui-readable #view-settings .panel-head .help{
  margin-top:2px!important;
  font-size:11.5px;
}
.settings-switch-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 22px;
}
body.ui-readable #view-settings .settings-switch-grid .switch-row{
  padding:10px 0;
}
.settings-fields-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px 12px;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
body.ui-readable #view-settings .settings-fields-grid .field{
  margin:0;
}
.settings-message-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 14px;
}
body.ui-readable #view-settings .settings-message-grid .field{
  margin:0;
}
body.ui-readable #view-settings .settings-message-grid .textarea{
  min-height:82px;
}
.settings-action-row{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.weekend-message-field{margin:12px 0 10px!important}
body.ui-readable #view-settings #setWeekendNoticeMessage{
  min-height:155px;
  max-height:235px;
}
.weekend-status{margin:0!important;padding:9px 10px!important}
.settings-security-grid{
  display:grid;
  grid-template-columns:minmax(300px,.8fr) minmax(340px,1.2fr);
  gap:14px;
  align-items:start;
}
.settings-security-grid>.settings-team-panel{
  grid-column:1/-1;
}
body.ui-readable #view-settings .field{
  gap:5px;
  margin-bottom:11px;
}
body.ui-readable #view-settings .field>label,
body.ui-readable #view-settings .field-label{font-size:13px}
body.ui-readable #view-settings .input,
body.ui-readable #view-settings .select,
body.ui-readable #view-settings .textarea{
  font-size:13.5px;
  padding:9px 11px;
}
body.ui-readable #view-settings .help{
  font-size:11.5px;
  line-height:1.4;
}
body.ui-readable #view-settings .switch-copy strong{
  font-size:13.5px;
  line-height:1.25;
}
body.ui-readable #view-settings .switch-copy span{
  font-size:11.5px;
  line-height:1.35;
  margin-top:2px;
}
html[data-theme="dark"] .settings-topic-nav{
  background:rgba(16,35,45,.96);
  border-color:#31505d;
}
html[data-theme="dark"] .settings-topic-nav button span{color:#cbd9df}
html[data-theme="dark"] .settings-topic-nav button small{color:#7f96a2}
html[data-theme="dark"] .settings-topic-nav button:hover{background:#18343f}
html[data-theme="dark"] .settings-topic-nav button.active{
  background:#153f52;
  border-color:#28617a;
}
html[data-theme="dark"] .settings-topic-nav button.active span{color:#8fd6f1}
@media(max-width:1180px){
  .settings-topic-nav{
    grid-template-columns:none;
    grid-auto-flow:column;
    grid-auto-columns:minmax(145px,1fr);
    overflow-x:auto;
    overscroll-behavior-inline:contain;
  }
  .settings-fields-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
  .settings-topic-nav{
    position:sticky;
    top:calc(var(--topbar) + 4px);
    margin-left:-2px;
    margin-right:-2px;
    grid-auto-columns:142px;
  }
  .settings-topic-nav button{padding:9px}
  .settings-switch-grid,
  .settings-message-grid,
  .settings-fields-grid,
  .settings-security-grid{grid-template-columns:1fr}
  .settings-security-grid>.settings-team-panel{grid-column:auto}
  .settings-action-row{justify-content:stretch}
  .settings-action-row .btn{width:100%}
  body.ui-readable #view-settings #setWeekendNoticeMessage{min-height:185px;max-height:none}
}

/* REQUEST CONTEXT · 2026-10-05 */
.request-context{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:8px 0 9px;
  padding:8px 9px;
  border:1px solid #dbe7ed;
  border-radius:8px;
  background:#f8fbfc;
}
.request-context-item{min-width:0}
.request-context-item span{
  display:block;
  margin-bottom:2px;
  font-size:8px;
  font-weight:850;
  letter-spacing:.055em;
  text-transform:uppercase;
  color:#7a8b96;
}
.request-context-item strong,.request-context-item b{
  display:block;
  font-size:10px;
  line-height:1.42;
  color:#243b48;
  font-weight:750;
  word-break:break-word;
}
.request-context-need strong{font-size:10.5px;color:#152f3d}
.ui-readable #view-requests .request-context{padding:10px 11px;gap:8px}
.ui-readable #view-requests .request-context-item span{font-size:10px}
.ui-readable #view-requests .request-context-item strong,.ui-readable #view-requests .request-context-item b{font-size:12.5px;line-height:1.45}
.request-modal-context{
  margin:0 0 16px;
  padding:13px 14px;
  border:1px solid #cfe1ea;
  border-radius:10px;
  background:#f5fafc;
}
.request-modal-context>strong{display:block;margin-bottom:10px;color:#173a4b;font-size:14px}
.request-modal-context>div+div{margin-top:9px}
.request-modal-context span{display:block;margin-bottom:3px;color:#788994;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.request-modal-context p{margin:0;color:#263e4b;font-size:13px;line-height:1.5}
html[data-theme="dark"] .request-context,html[data-theme="dark"] .request-modal-context{background:#102731!important;border-color:#31505d!important}
html[data-theme="dark"] .request-context-item strong,html[data-theme="dark"] .request-context-item b,html[data-theme="dark"] .request-modal-context p{color:#e4eef3!important}
html[data-theme="dark"] .request-modal-context>strong{color:#f0f7fa!important}

/* OPERATION CLEAR · 2026-10-05 */
.operation-clean{width:100%}
.op-section{
  padding:2px 0 18px;
  margin-bottom:18px;
  border-bottom:1px solid var(--line);
}
.op-section-last{margin-bottom:0;padding-bottom:4px;border-bottom:0}
.op-section-title{margin-bottom:10px}
.op-section-title h4{margin:0;font-size:15px;line-height:1.25;color:#173242}
.op-section-title p{margin:3px 0 0;font-size:11.5px;line-height:1.4;color:#7d8f99}

.op-toggle-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0 18px;
  margin-bottom:12px;
}
.op-toggle-grid-human{grid-template-columns:minmax(0,1fr)}
body.ui-readable #view-settings .op-toggle-grid .switch-row{
  min-height:58px;
  padding:8px 0;
  border-bottom:1px solid #edf1f3;
}

.op-fields-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px 12px;
}
body.ui-readable #view-settings .op-fields-grid .field{margin:0}

.input-with-unit{display:flex;align-items:stretch}
.input-with-unit .input{min-width:0;border-radius:8px 0 0 8px}
.input-with-unit>span{
  display:flex;align-items:center;padding:0 9px;
  border:1px solid #d9e1e6;border-left:0;border-radius:0 8px 8px 0;
  background:#f7f8f9;color:#74848d;font-size:11px;font-weight:750;
}
.input-with-unit.compact{width:106px;flex:0 0 106px}
.input-with-unit.compact .input{width:68px}

.op-sentence-rule,
.op-sentence-line{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  min-height:44px;
  font-size:12.5px;
  line-height:1.4;
  color:#445b68;
}
.op-sentence-rule{
  margin-top:12px;
  padding:10px 0 2px;
  border-top:1px solid #edf1f3;
}
.op-sentence-rule>input{
  width:78px;
  flex:0 0 78px;
}
.op-sentence-list{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top:6px;
}
.op-sentence-line{
  padding:7px 0;
}
.op-rating-line{
  margin-top:6px;
  padding-top:10px;
  border-top:1px solid #edf1f3;
}
.op-sentence-rule.is-disabled,
.human-auto-close-field.is-disabled,
.protocol-dependent.is-disabled,
.rating-dependent.is-disabled{opacity:.42}

.op-status-line{
  margin-top:6px;
  font-size:11px;
  line-height:1.35;
  color:#7d8f99;
}
.op-status-line.is-on{color:#557467}
.op-status-line.is-off{color:#8a7c69}

html[data-theme="dark"] .op-section-title h4{color:#eef7fa}
html[data-theme="dark"] .op-section-title p,
html[data-theme="dark"] .op-status-line,
html[data-theme="dark"] .op-sentence-rule,
html[data-theme="dark"] .op-sentence-line{color:#91a7b2}
html[data-theme="dark"] .input-with-unit>span{
  background:#173440;border-color:#31505d;color:#a5bac4
}
html[data-theme="dark"] body.ui-readable #view-settings .op-toggle-grid .switch-row,
html[data-theme="dark"] .op-sentence-rule,
html[data-theme="dark"] .op-rating-line{border-color:#294652}

@media(max-width:1050px){
  .op-toggle-grid,.op-fields-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:700px){
  .op-toggle-grid,.op-fields-grid{grid-template-columns:1fr}
  .op-sentence-rule,.op-sentence-line{align-items:flex-start}
  .input-with-unit.compact{width:112px;flex-basis:112px}
}


/* Player de áudio do CRM — sem controles nativos encolhidos, mobile first. */
.crm-media-asset.audio{
  box-sizing:border-box;
  width:min(322px,calc(100vw - 78px));
  max-width:100%;
  min-width:0;
  padding-right:0!important;
  margin-bottom:2px;
}
.crm-voice-player{
  box-sizing:border-box;
  display:grid;
  grid-template-columns:40px minmax(0,1fr) 27px;
  align-items:center;
  column-gap:10px;
  width:100%;
  min-width:0;
  min-height:64px;
  padding:6px 1px 4px;
  color:inherit;
}
.crm-voice-player audio{display:none!important}
.crm-voice-toggle{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  flex-shrink:0;
  border:0;
  border-radius:50%;
  background:#d8f2e8;
  color:#086d58;
  cursor:pointer;
  padding:0;
}
.crm-voice-toggle:hover{background:#c2e9dc}
.crm-voice-player.is-playing .crm-voice-toggle{background:#087f66;color:#fff}
.crm-voice-toggle:disabled{opacity:.55;cursor:not-allowed}
.crm-voice-main{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:3px}
.crm-voice-top,.crm-voice-bottom{display:flex;justify-content:space-between;align-items:center;min-width:0;gap:7px}
.crm-voice-title{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11.2px;
  line-height:1.25;
  font-weight:650;
}
.crm-voice-rate{
  min-width:32px;
  min-height:24px;
  padding:2px 5px;
  border:1px solid rgba(69,108,116,.18);
  border-radius:7px;
  background:rgba(93,138,149,.06);
  color:inherit;
  font-size:10px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  cursor:pointer;
}
.crm-voice-rate:hover{background:rgba(66,135,143,.13)}
.crm-voice-seek{
  position:relative;
  height:17px;
  display:flex;
  align-items:center;
  width:100%;
  min-width:0;
}
.crm-voice-seek-line,.crm-voice-seek-fill{
  position:absolute;
  pointer-events:none;
  top:7px;
  left:0;
  height:4px;
  border-radius:9px;
}
.crm-voice-seek-line{right:0;background:rgba(95,126,131,.28)}
.crm-voice-seek-fill{width:0;background:#18826a}
.crm-voice-range{
  position:relative;
  z-index:1;
  display:block;
  width:100%;
  height:20px;
  min-width:0;
  padding:0;
  margin:0;
  border:0;
  appearance:none;
  -webkit-appearance:none;
  background:transparent;
  cursor:pointer;
}
.crm-voice-range:disabled{cursor:default}
.crm-voice-range::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:11px;
  height:11px;
  border:0;
  border-radius:50%;
  background:#18826a;
}
.crm-voice-range::-moz-range-thumb{
  width:11px;
  height:11px;
  border:0;
  border-radius:50%;
  background:#18826a;
}
.crm-voice-bottom{color:#778b91;font-size:9px;line-height:1.3;font-variant-numeric:tabular-nums}
.crm-voice-size{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-voice-download{
  display:grid;
  place-items:center;
  flex-shrink:0;
  width:27px;
  height:30px;
  padding:0;
  border-radius:7px;
  color:#6d8088;
  text-decoration:none;
}
.crm-voice-download:hover{background:rgba(70,127,133,.1);color:#117c65}
.crm-voice-player.has-error .crm-voice-title{color:#a34834;font-size:10px}
.crm-voice-toggle:focus-visible,
.crm-voice-rate:focus-visible,
.crm-voice-range:focus-visible,
.crm-voice-download:focus-visible{outline:2px solid #20866f;outline-offset:2px}
html[data-theme="dark"] .crm-voice-toggle{background:#21443f;color:#a8f1d6}
html[data-theme="dark"] .crm-voice-toggle:hover{background:#285a50}
html[data-theme="dark"] .crm-voice-player.is-playing .crm-voice-toggle{background:#16a282;color:#fff}
html[data-theme="dark"] .crm-voice-rate{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.13)}
html[data-theme="dark"] .crm-voice-rate:hover{background:rgba(255,255,255,.14)}
html[data-theme="dark"] .crm-voice-seek-line{background:rgba(211,231,234,.32)}
html[data-theme="dark"] .crm-voice-seek-fill,
html[data-theme="dark"] .crm-voice-range::-webkit-slider-thumb,
html[data-theme="dark"] .crm-voice-range::-moz-range-thumb{background:#65d4af}
html[data-theme="dark"] .crm-voice-bottom{color:#a9bfc1}
html[data-theme="dark"] .crm-voice-download{color:#acc9cc}
html[data-theme="dark"] .crm-voice-download:hover{background:rgba(255,255,255,.1);color:#fff}
html[data-theme="dark"] .crm-voice-player.has-error .crm-voice-title{color:#ffb5a4}
@media(max-width:480px){
  .crm-media-asset.audio{width:min(310px,calc(100vw - 64px));}
  .crm-voice-player{column-gap:8px;grid-template-columns:40px minmax(0,1fr) 24px}
  .crm-voice-download{width:24px}
}


/* Estado real de edição no WhatsApp e no histórico do Flow */
.crm-message-foot .crm-message-edited{
  display:inline-flex;align-items:center;gap:3px;
  font-size:9px;font-weight:650;line-height:1.2;white-space:nowrap;
  color:#647b80;opacity:.9;
}
html[data-theme="dark"] .crm-message-foot .crm-message-edited{color:#b4c6ca}
.crm-edit-error{
  margin-top:9px;padding:9px 11px;border:1px solid #ebc8c4;
  border-radius:7px;background:#fff4f2;color:#a7372d;
  font-size:12px;line-height:1.5;white-space:pre-wrap;
}
html[data-theme="dark"] .crm-edit-error{border-color:#754740;background:#402823;color:#ffbbb0}


/* Avaliações: histórico simples, legível e clicável, sem cards artificiais. */
.service-rating-recent{margin-top:22px;padding-top:14px;border-top:1px solid var(--line,#e0e8ed)}
.service-rating-recent-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
.service-rating-recent-title strong{font-size:12px;color:var(--text,#17394b)}
.service-rating-recent-title span{font-size:11px;color:var(--muted,#70838e)}
.service-rating-recent-item{appearance:none;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:10px 3px;background:transparent;color:inherit;border:0;border-bottom:1px solid var(--line,#e9eff2);text-align:left;cursor:pointer;font:inherit}
.service-rating-recent-item:hover{background:rgba(50,137,173,.055)}
.service-rating-recent-contact{display:flex;flex-direction:column;gap:3px;min-width:0}
.service-rating-recent-contact strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.service-rating-recent-contact small{font-size:10.5px;color:var(--muted,#71838b);line-height:1.35}
.service-rating-recent-score{font-size:13px;font-weight:800;color:var(--text,#17394b);white-space:nowrap}
.service-rating-recent-empty{font-size:12px;color:var(--muted,#73818b);padding:9px 0}
.crm-rating-history{display:flex;flex-direction:column}
.crm-rating-entry{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line,#e9eff2)}
.crm-rating-entry>span{display:flex;flex-direction:column;gap:4px;min-width:0}
.crm-rating-entry strong{font-size:12px}
.crm-rating-entry small{font-size:10.5px;color:var(--muted,#70838e)}
.crm-rating-entry>b{font-size:12px;white-space:nowrap}

.service-rating-scope{font-size:11px;line-height:1.5;color:var(--muted,#72848f);margin:0 0 12px}


/* Backups: apresentação operacional sem sombras ou degradês. */
.backup-intro{margin-bottom:15px}
.backup-intro strong{display:block;font-size:14px}
.backup-intro p{color:var(--muted,#687a85);font-size:12px;line-height:1.6;margin:5px 0 0}
.backup-warning{padding:12px 14px;border:1px solid var(--line,#dce5eb);border-radius:10px;font-size:12px;line-height:1.65;margin-bottom:16px}
.backup-data{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
.backup-data>div{padding:12px;border:1px solid var(--line,#e0e7eb);border-radius:9px;min-width:0}
.backup-data small{display:block;font-size:11px;color:var(--muted,#6a7a87);margin-bottom:7px}
.backup-data strong{font-size:12px;word-break:break-word}
.backup-actions{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 22px}
.backup-list-title{font-size:14px;margin-bottom:10px}
.backup-list{border-top:1px solid var(--line,#dce5e9)}
.backup-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid var(--line,#dce5e9)}
.backup-entry>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.backup-entry strong{font-size:12px}
.backup-entry small{font-size:11px;color:var(--muted,#70808a)}
.backup-entry .btn{white-space:nowrap}
.backup-error{color:#b34237;font-size:12px;font-weight:650}
@media(max-width:730px){.backup-data{grid-template-columns:repeat(2,minmax(0,1fr))}.backup-entry{align-items:flex-start;flex-direction:column}.backup-entry .btn{width:100%;justify-content:center}}

[data-settings-topic-button="backups"][hidden]{display:none!important}


/* Recuperação de carrinho: contato manual 1:1, sem sombras ou cards exagerados. */
.ecommerce-manual-workspace-note{padding:11px 14px;margin:0 0 12px;border:1px solid var(--line,#dce7ec);border-radius:8px;background:var(--surface,#fff);font-size:12px;line-height:1.6;color:var(--text,#17394b)}
.ecommerce-manual-destination{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
.ecommerce-manual-destination>div{border:1px solid var(--line,#dce7ec);padding:11px 12px;border-radius:8px;min-width:0}
.ecommerce-manual-destination small{display:block;font-size:10.5px;color:var(--muted,#6c7d86);margin-bottom:5px}
.ecommerce-manual-destination strong{display:block;font-size:13px;overflow-wrap:anywhere}
.ecommerce-manual-preview{margin:13px 0}
.ecommerce-manual-preview>strong{display:block;font-size:12px;margin-bottom:8px}
#ecommerceManualPreview{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--surface,#fff);border:1px solid var(--line,#dce7ec);border-radius:10px;padding:15px;line-height:1.6;font-size:13px;max-height:230px;overflow-y:auto}
.ecommerce-manual-consent{display:flex;gap:10px;align-items:flex-start;font-size:12px;line-height:1.5;cursor:pointer;margin:15px 0}
.ecommerce-manual-consent input{accent-color:#1781b1;width:17px;height:17px;flex:0 0 auto;margin-top:1px}
.ecommerce-manual-safety{font-size:11px;line-height:1.55;color:var(--muted,#687d89)}
@media(max-width:520px){.ecommerce-manual-destination{grid-template-columns:1fr}}

.ecommerce-manual-sender{font-size:11.5px;color:var(--muted,#6e818b);line-height:1.5;margin:-6px 0 15px}
.ecommerce-manual-sender strong{color:var(--text,#183e50)}
.ecommerce-manual-record{border:1px solid var(--line,#dce6ed);border-radius:8px;padding:13px;margin:15px 0}
.ecommerce-manual-record>strong{display:block;font-size:12.5px}
.ecommerce-manual-record>small{display:block;font-size:10.5px;color:var(--muted,#687c87);margin:4px 0 10px}
.ecommerce-manual-record>div{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6}
.ecommerce-manual-record>p{font-size:11px;color:#9b543a;margin:9px 0 0}
.ecommerce-manual-unavailable{font-size:12px;color:var(--muted,#6c7d88);margin:12px 0}


/* Relatórios por período — visual editorial, sem sombras ou gradientes. */
.report-page-head{gap:18px;flex-wrap:wrap}
.report-toolbar{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;justify-content:flex-end}
.report-range{display:flex;gap:8px;flex-wrap:wrap}
.report-range .report-date-filter{gap:8px;min-width:0;border-radius:7px;box-shadow:none}
.report-range .report-date-filter span{font-size:12px;font-weight:600}
.report-range .report-date-filter .input{min-width:138px;width:148px}
.report-quick-periods{display:flex;gap:4px;align-items:center;padding:4px;border:1px solid var(--line);border-radius:7px}
.report-period-btn{background:transparent;color:var(--muted);border:0;border-radius:5px;padding:8px 10px;cursor:pointer;font:inherit;font-size:12px;font-weight:600;white-space:nowrap}
.report-period-btn.active{background:var(--surface,#fff);color:var(--ink);outline:1px solid var(--line)}
.report-period-btn:hover{color:var(--ink)}
.report-export-actions{display:flex;gap:8px}
.report-topic-overview{margin-bottom:17px;overflow:hidden}
.report-topic-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.report-topic-filter{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted)}
.report-topic-filter .input{width:150px;max-width:100%;min-width:0}
.report-topic-table-wrap{max-height:360px;overflow:auto}
.report-subject-table{border-collapse:collapse;width:100%;min-width:610px;font-size:12px}
.report-subject-table th{text-align:left;font-size:11px;font-weight:700;color:var(--muted);padding:10px 15px;border-bottom:1px solid var(--line);background:var(--surface)}
.report-subject-table td{padding:11px 15px;border-bottom:1px solid var(--line);color:var(--ink);vertical-align:top}
.report-subject-table tr:last-child td{border-bottom:0}
.report-subject-brand{font-weight:700}
.report-subject-quantity{font-variant-numeric:tabular-nums;font-weight:700;text-align:right;white-space:nowrap}
@media(max-width:980px){.report-toolbar{justify-content:flex-start}.report-page-head{display:block}.report-range{width:100%}.report-export-actions{width:100%}.report-export-actions .btn{flex:1}}
@media(max-width:520px){.report-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.report-range .report-date-filter{width:100%;padding:5px 7px}.report-range .report-date-filter .input{min-width:0;width:100%;font-size:12px}.report-quick-periods{width:100%;justify-content:space-between}.report-period-btn{flex:1}.report-toolbar{gap:8px}.report-topic-head{align-items:flex-start}.report-topic-filter{width:100%;justify-content:space-between}.report-topic-table-wrap{max-height:380px}}

/* Relatórios — critérios claros, legíveis, sem botões redundantes. */
.report-toolbar .report-quick-periods{display:none!important}
.report-stat-card{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.report-stat-card strong{display:block;font-variant-numeric:tabular-nums;line-height:1.2}
.report-stat-card>span,.report-stat-card>small{display:block;line-height:1.4}
.report-topic-overview .panel-head{background:var(--surface);border-bottom:1px solid var(--line)}
.report-subject-table th{position:sticky;top:0;z-index:1}
.report-subject-table td:nth-child(3){font-weight:500}
.report-subject-table tr:nth-child(even){background:color-mix(in srgb,var(--surface) 95%,var(--ink) 5%)}


/* Assuntos e assistências separados; a tabela vira lista no celular. */
.topic-section-count{margin:0 0 14px;font-size:11px;color:var(--muted);line-height:1.5}
.topic-section-review[hidden]{display:none!important}
.report-topic-filter .input{width:250px}
.report-grid>.panel{min-width:0}
.report-subject-table td{overflow-wrap:anywhere}
@media(max-width:600px){
  .report-topic-filter .input{width:100%;max-width:285px}
  .report-subject-table{display:block;min-width:0}
  .report-subject-table thead{display:none}
  .report-subject-table tbody{display:block}
  .report-subject-table tr{display:block;padding:12px 15px;border-bottom:1px solid var(--line)}
  .report-subject-table td{display:grid;grid-template-columns:95px minmax(0,1fr);gap:9px;padding:4px 0;border:0;text-align:left;white-space:normal}
  .report-subject-table td::before{content:attr(data-label);font-size:11px;font-weight:500;color:var(--muted)}
  .report-grid .panel-body{min-height:0}
}

@media(min-width:981px){
  #view-dashboard .dashboard-secondary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.topic-status{display:flex;align-items:center;gap:12px;margin:0 0 16px;padding:13px 16px;border:1px solid var(--line);border-radius:9px;background:var(--surface);overflow-wrap:anywhere}
.topic-status strong,.topic-status span{display:block;line-height:1.5}
.topic-status strong{font-size:13px}
.topic-status span{margin-top:3px;font-size:12px;color:var(--muted)}
.topic-review-records{display:grid;gap:8px;margin-top:12px}
.topic-review-records button{display:block;width:100%;text-align:left;padding:11px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);overflow-wrap:anywhere}
.topic-review-records strong,.topic-review-records span,.topic-review-records small{display:block;line-height:1.5}
.topic-review-records span,.topic-review-records small{font-size:11px;color:var(--muted)}
.topic-review-records button:hover{border-color:var(--blue-600)}
