@font-face {
  font-family:"DM Sans";
  src:url("/dm-sans-latin.woff2") format("woff2");
  font-style:normal;
  font-weight:400 800;
  font-display:swap;
}
:root {
  color-scheme:light;
  --ink:#121f3e;
  --muted:#53637b;
  --blue:#0170ff;
  --blue-dark:#0057cc;
  --line:#dce3ed;
  --paper:#fff;
  --bg:#f4f6f9;
  --rail:248px;
  --gutter:clamp(16px,2.1vw,32px);
  font:14px/1.5 "DM Sans","Segoe UI",Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
}
*, *::before, *::after { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
a { color:var(--blue-dark); }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
:focus-visible { outline:3px solid #3686fd; outline-offset:3px; }
.sr-only, .skip-link:not(:focus) { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.skip-link:focus { position:fixed; inset:8px auto auto 8px; z-index:10; padding:8px 14px; background:white; }
main:focus { outline:none; }
body:not(.signed-in) #main { min-height:calc(100dvh - 64px); display:grid; align-content:center; padding:36px 16px; background:linear-gradient(#eef3f520,#f0f4f52b),url("/atendimento-escritorio.webp") center/cover no-repeat; }
.entry { width:min(100%,440px); margin:0 auto; background:white; padding:34px 24px 25px; border-radius:24px; text-align:center; box-shadow:0 18px 50px #14284219,0 7px 0 -3px #ffffff9c; }
.entry-brand { margin:0 auto 24px; }
.brand, .footer-brand { display:inline-flex; align-items:center; color:#152c50; white-space:nowrap; text-decoration:none; }
.wordmark { font-weight:750; font-size:26px; line-height:1; letter-spacing:-1.35px; }
.wordmark b, .footer-brand b { color:var(--blue); font-weight:650; }
.mark { display:inline-flex; position:relative; flex:none; width:35px; height:35px; align-items:flex-end; border-radius:10px; margin-right:9px; background:var(--blue); }
.mark::before { content:""; position:absolute; inset:8px 7px; background:linear-gradient(white,white) left bottom/4px 8px no-repeat,linear-gradient(white,white) center bottom/4px 13px no-repeat,linear-gradient(white,white) right bottom/4px 19px no-repeat; }
.entry h1 { margin:0; font-size:25px; letter-spacing:-.045em; line-height:1.17; }
.entry .tenant { display:block; margin:-8px 0 8px; font-size:13px; font-weight:600; color:var(--muted); overflow-wrap:anywhere; }
.entry > p { margin:9px 0 30px; color:var(--muted); font-size:13px; }
.entry form { display:grid; gap:21px; }
.field { display:grid; gap:5px; font-weight:600; }
.entry .field { position:relative; text-align:left; }
.entry .field span { position:absolute; top:-9px; left:11px; padding:0 4px; background:#fff; color:var(--muted); font-size:12px; font-weight:500; }
.entry input, .dialog-body input:not([type=checkbox]):not([type=hidden]), .dialog-body select {
  min-width:0; width:100%; min-height:46px; border:1px solid var(--line); border-radius:8px; padding:9px 14px; color:var(--ink); background:white;
}
.entry input:focus, .dialog-body input:focus, .dialog-body select:focus, .ib-sidebar>input:focus, .ib-sidebar>select:focus, .ib-reply input:focus { border-color:var(--blue); outline:none; box-shadow:0 0 0 3px #0170ff23; }
.entry .btn { width:100%; min-height:50px; }
.entry .change-company { display:inline-block; margin-top:20px; color:var(--ink); text-underline-offset:4px; }
.entry-footer { min-height:64px; display:flex; gap:24px; align-items:center; justify-content:space-between; padding:12px var(--gutter); background:white; border-top:1px solid var(--line); }
.entry-footer > a:last-child { font-size:13px; color:var(--muted); }
.footer-brand { font-size:17px; font-weight:700; letter-spacing:-.7px; }
.signed-in .entry-footer, .mobile-back, .rail-close.icon-button, .rail-overlay { display:none; }
.signed-in { background:var(--bg); }
.signed-in::before { content:""; position:absolute; top:0; right:0; left:0; height:115px; background:var(--blue); }
.rail { position:fixed; inset:0 auto 0 0; z-index:4; display:flex; flex-direction:column; overflow:auto; width:var(--rail); background:#fff; box-shadow:1px 0 12px #1d304009; border-right:1px solid #e9edf4; }
.rail-head { height:77px; flex:none; padding:0 24px; display:flex; align-items:center; gap:8px; }
.rail nav { display:grid; gap:4px; margin:13px 13px 0; }
.rail nav a { display:flex; align-items:center; gap:14px; min-height:46px; border-radius:8px; padding:7px 13px; text-decoration:none; color:#445369; font-size:14px; font-weight:550; }
.rail nav a:hover { background:#f3f6fc; }
.rail nav a[aria-current] { color:#005ccf; background:#eaf3ff; font-weight:700; }
.nav-icon { display:inline-block; width:20px; height:20px; flex:none; position:relative; color:inherit; }
.inbox-icon::before { content:""; position:absolute; inset:2px 1px 5px; border:1.8px solid; border-radius:5px; }
.inbox-icon::after { content:""; position:absolute; left:5px; bottom:3px; width:6px; height:6px; background:white; border-left:1.8px solid; border-bottom:1.8px solid; transform:skewY(-28deg); }
nav a[aria-current] .inbox-icon::after { background:#eaf3ff; }
.ai-icon::before, .ai-icon::after { content:""; display:block; position:absolute; background:currentColor; clip-path:polygon(50% 0,64% 35%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 35%); }
.ai-icon::before { inset:3px 4px 0 0; }
.ai-icon::after { inset:0 0 11px 12px; }
.funnel-icon::before { content:""; position:absolute; inset:2px 1px; background:currentColor; clip-path:polygon(0 0,100% 0,61% 52%,61% 85%,42% 100%,42% 52%,0 0,17% 10%,48% 47%,48% 85%,54% 80%,54% 47%,83% 10%,13% 10%); }
.admin-icon::before { content:""; position:absolute; inset:2px auto auto 1px; width:7px; height:7px; border:1.7px solid; border-radius:2px; box-shadow:10px 0 0 -1.5px currentColor,0 10px 0 -1.5px currentColor,10px 10px 0 -1.5px currentColor; }
.rail-bottom { margin:auto 14px 16px; padding:14px 9px 0; border-top:1px solid #e8edf4; display:flex; align-items:center; gap:12px; }
.rail-bottom > div:last-child { display:grid; min-width:0; }
.rail-bottom small { color:var(--muted); font-size:11px; }
.rail-bottom strong { font-size:13px; overflow-wrap:anywhere; }
.org-icon { height:30px; width:30px; position:relative; flex:none; background:#edf4ff; color:#1f66c3; border-radius:8px; }
.org-icon::after { content:""; position:absolute; inset:7px 8px 6px; border:1.6px solid; border-radius:2px; background:linear-gradient(currentColor,currentColor) center 35%/5px 1.6px no-repeat,linear-gradient(currentColor,currentColor) center 70%/5px 1.6px no-repeat; }
.topbar { position:relative; min-height:70px; padding:10px var(--gutter); margin-left:var(--rail); color:#fff; display:flex; align-items:center; gap:13px; }
.icon-button, .logout { display:inline-grid; place-items:center; min-width:34px; height:34px; padding:0; border:none; border-radius:8px; background:#ffffff26; color:inherit; }
.icon-button:hover, .logout:hover { background:#ffffff40; }
.menu-icon { width:16px; height:12px; border-block:1.6px solid; position:relative; }
.menu-icon::after { content:""; position:absolute; inset:4px 0 auto; border-top:1.6px solid; }
.location-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.identity { margin-left:auto; display:flex; align-items:center; gap:10px; }
.identity strong { font-weight:600; font-size:13px; }
#presence { font-size:12px; display:inline-flex; align-items:center; white-space:nowrap; padding:4px 8px; background:#003b8a59; border-radius:6px; }
#presence[data-online]::before { content:""; background:#c7ced9; width:7px; height:7px; border-radius:50%; margin-right:5px; }
#presence[data-online="true"]::before { background:#8cf5ba; }
.user-avatar { border:1px solid #ffffff91; height:33px; min-width:33px; display:grid; place-items:center; border-radius:50%; font-size:12px; font-weight:700; color:white; background:#153764; }
.logout { padding:0 11px; font-weight:600; }
.rail-collapsed { --rail:74px; }
.rail-collapsed .rail-head { padding:0; justify-content:center; }
.rail-collapsed .rail nav { margin-inline:10px; }
.rail-collapsed .rail nav a { justify-content:center; padding:0; }
.rail-collapsed .rail nav a span, .rail-collapsed .rail .wordmark, .rail-collapsed .rail-bottom > div:last-child { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.rail-collapsed .rail .mark { margin:0; }
.rail-collapsed .rail-bottom { justify-content:center; }
.signed-in #main { position:relative; margin-left:var(--rail); padding:0 var(--gutter) 24px; }
.signed-in #main:has(.entry) { padding-top:30px; }
.btn { display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:8px; min-height:38px; padding:7px 14px; font-size:13px; font-weight:600; line-height:1.35; color:var(--ink); background:#fff; }
.btn:hover { color:var(--blue-dark); background:#f5f8ff; border-color:#b5cced; }
.btn-primary { background:var(--blue); color:#fff; border-color:var(--blue); }
.btn-primary:hover { background:var(--blue-dark); color:white; }
.btn-sm { min-height:32px; font-size:12px; padding:5px 10px; }
.btn:disabled { opacity:.55; cursor:default; }
.btn.mobile-back { display:none; }
#actions { position:absolute; top:25px; right:calc(var(--gutter) + 22px); z-index:1; }
#actions:not(:empty) + .mobile-back + #view .ib-toolbar { padding-right:170px; }
#actions:not(:empty) + .mobile-back + #view .ib-live { display:none; }
#actions .btn { background:#fff; color:#142d4e; border:0; }
.ib-shell { background:transparent; border:0; border-radius:0; box-shadow:none; overflow:visible; color:var(--ink); }
.ib-toolbar, .ai-heading {
  min-height:97px; color:#fff; border:0; border-radius:13px; margin:0 0 16px; padding:22px 25px;
  background:radial-gradient(ellipse at 93% 145%,#ffffff0e 0 23%,transparent 23.3%),linear-gradient(110deg,#23282f,#2c3139 65%,#353c47);
}
.ib-toolbar h2, .ai-heading h1 { font-size:clamp(21px,2.2vw,28px); letter-spacing:-.045em; line-height:1.15; margin:0 0 7px; font-weight:700; }
.ib-toolbar p, .ai-heading p { font-size:13px; color:#e0e5ec; line-height:1.5; margin:0; }
.ib-count { font-size:11px; letter-spacing:normal; background:#ffffff20; color:#fff; vertical-align:middle; }
.ib-live { color:#c9f5dc; }
.ib-layout, .card { border:1px solid #e5eaf0; border-radius:14px; background:white; box-shadow:0 4px 10px #192b4105; }
.ib-layout { overflow:hidden; grid-template-columns:clamp(255px,25vw,350px) minmax(0,1fr); height:calc(100dvh - 212px); min-height:420px; max-height:none; }
.ib-sidebar { background:#fff; border-color:var(--line); }
.ib-sidebar>select, .ib-sidebar>input, .ib-reply input { border-color:var(--line); font:inherit; font-size:13px; color:var(--ink); }
.ib-sidebar>input { background:#f6f8fb; }
.ib-list { border-top:1px solid #edf0f6; }
.ib-conversation { color:var(--ink); }
.ib-conversation:hover { background:#f3f7fc; }
.ib-conversation.selected { background:#eef5ff; border-left-color:var(--blue); }
.ib-avatar { background:#e5efff; color:#285da3; font-weight:700; }
.ib-bm, .ib-file { color:#215cb5; background:#eaf2ff; }
.ib-unread { background:var(--blue-dark); }
.ib-thread { background:#f7f9fc; }
.ib-thread-header { padding:16px 19px; }
.ib-welcome { color:var(--muted); font-size:14px; }
.ib-welcome > span { width:68px; height:68px; border-radius:20px; background:#e3eeff; color:#1766d0; }
.ib-welcome h3 { color:var(--ink); font-size:20px; letter-spacing:-.04em; margin:14px 0 5px; }
.ib-welcome p { margin:6px 0; }
.ib-bubble.outgoing { background:#e8f1ff; border-color:#d0e2fb; }
.ib-author { color:#395f8c; }
.ib-reply input { min-width:0; }
.card { padding:22px; }
.sf-page, #funnel-panel, .sf-leads { min-width:0; }
.sf-page .ai-heading { margin:0; }
.sf-page .ai-heading h1 { margin:0; padding-right:135px; }
.sf-page .sf-leads table { width:100%; min-width:800px; border-collapse:collapse; text-align:left; font-size:13px; }
.sf-page .sf-leads th, .sf-page .sf-leads td { padding:10px; border-bottom:1px solid #e4e9f0; }
.sf-page .sf-leads th { padding-block:12px; color:var(--muted); font-weight:600; font-size:11px; text-transform:uppercase; }
.sf-stage-atendimento { background:#e5efff; color:#2458a3; }
.sf-stage-aceite { background:#def4e8; color:#176940; }
.sf-stage-encerrado { background:#edf0f4; color:#515e70; }
.sf-track progress { display:block; width:100%; height:100%; border:0; appearance:none; accent-color:var(--sf-accent,#17a569); }
.sf-track progress::-webkit-progress-bar { background:#dce8e2; }
.sf-track progress::-webkit-progress-value { background:var(--sf-accent,#17a569); border-radius:5px; }
.sf-track progress::-moz-progress-bar { background:var(--sf-accent,#17a569); border-radius:5px; }
.ai-page { margin:0; }
.ai-heading { display:flex; flex-direction:column; justify-content:center; }
.ai-status, .admin-heading, .people-list li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; }
.ai-status { margin-bottom:16px; }
.ai-status h2, .ai-boxes h2, .admin-heading h2 { margin:0; font-size:18px; letter-spacing:-.035em; }
.ai-status p, .ai-boxes p, .admin-heading p, .people-list small, .small, .muted { display:block; color:var(--muted); font-size:13px; margin:4px 0; }
.ai-list, .people-list { margin:16px 0 0; padding:0; list-style:none; }
.ai-list li, .people-list li { padding:14px 0; border-top:1px solid var(--line); }
.ai-list li { display:flex; align-items:center; gap:14px; }
.ai-list li strong { flex:1; overflow-wrap:anywhere; }
.status-pill, .badge { display:inline-block; padding:3px 9px; border-radius:20px; background:#edf1f5; color:#45576a; font-size:12px; font-weight:600; }
.status-pill.on, .badge-entregue { color:#11623a; background:#e0f6e8; }
.badge-pausada { color:#774a12; background:#fff1d4; }
.form-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
dialog { width:min(440px,calc(100vw - 28px)); max-height:85dvh; padding:0; color:var(--ink); border:1px solid var(--line); border-radius:16px; box-shadow:0 18px 65px #12244230; }
dialog.large { width:min(700px,calc(100vw - 28px)); }
dialog::backdrop { background:#16294769; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:16px 20px; border-bottom:1px solid var(--line); }
.dialog-head h2 { font-size:18px; margin:0; }
.dialog-body { padding:20px; }
.dialog-body form, .dialog-body label:not(:has([type=checkbox])) { display:grid; gap:8px; }
.dialog-body form { gap:16px; }
.dialog-body p:first-child { margin-top:0; }
.dialog-body .form-actions { justify-content:flex-end; margin-top:16px; }
.loading { text-align:center; color:var(--muted); padding:48px; }
.form-error, .page-error { color:#ab282d; }
.form-error { margin:0; text-align:left; }
.form-error:empty, #feedback:empty { display:none; }
#feedback { position:fixed; bottom:18px; left:50%; transform:translateX(-50%); z-index:8; max-width:95vw; padding:10px 16px; border-radius:8px; color:white; background:#152a49; box-shadow:0 4px 18px #13284622; }
#feedback[data-type="error"] { background:#963437; }
@media(max-width:1100px) and (min-width:801px) {
  :root { --rail:205px; --gutter:16px; }
  .rail-head { padding-inline:17px; }
  .rail nav { margin-inline:8px; }
  .rail nav a { gap:9px; padding-inline:9px; }
  .ib-layout { grid-template-columns:250px minmax(0,1fr); }
  .ib-thread-tools { gap:4px; }
}
@media(max-width:800px) {
  :root { --rail:0px; }
  .rail { width:min(290px,82vw); visibility:hidden; transform:translateX(-105%); }
  .menu-open .rail { visibility:visible; transform:translateX(0); }
  .menu-open { overflow:hidden; }
  .menu-open .rail-overlay { display:block; position:fixed; z-index:3; inset:0; border:0; background:#14264178; }
  .rail-close.icon-button { margin-left:auto; display:grid; font-size:24px; background:#eff4fa; color:var(--ink); }
  .rail-close:hover { background:#e1eaf5; }
  .identity strong { display:none; }
  .identity { gap:7px; }
  .topbar { min-height:60px; gap:9px; }
  .ib-layout { grid-template-columns:230px minmax(0,1fr); }
}
@media(max-width:650px) {
  :root { --gutter:12px; }
  .topbar { min-height:57px; }
  .location-name { min-width:0; max-width:30vw; font-size:12px; }
  .identity { gap:5px; }
  .user-avatar { width:27px; min-width:27px; height:27px; font-size:10px; }
  #presence { font-size:10px; padding:4px; }
  .logout { min-width:29px; padding-inline:6px; }
  #actions { top:12px; right:calc(var(--gutter) + 10px); }
  #actions .btn { min-height:29px; font-size:11px; padding:5px 8px; }
  .ib-toolbar, .ai-heading, #actions:not(:empty) + .mobile-back + #view .ib-toolbar { min-height:74px; padding:13px 14px; margin-bottom:10px; }
  #actions:not(:empty) + .mobile-back + #view .ib-toolbar h2 { padding-right:90px; }
  .ib-toolbar p, .ai-heading p { font-size:12px; }
  .ib-count { margin-left:3px; padding:3px 7px; }
  .ib-layout { display:flex; flex-direction:column; height:calc(100dvh - 185px); min-height:325px; max-height:none; }
  .ib-sidebar { flex:1; max-height:none; border:0; }
  .ib-list { min-height:0; }
  .ib-thread { display:none; }
  #main:not(.show-list) .ib-layout:has(.ib-thread[data-key]) .ib-sidebar { display:none; }
  #main:not(.show-list) .ib-thread[data-key] { height:100%; display:flex; }
  #main:not(.show-list):has(.ib-thread[data-key]) .mobile-back { display:inline-flex; margin:0 0 9px; color:var(--blue-dark); }
  #main:not(.show-list):has(.ib-thread[data-key]) .ib-toolbar,
  #main:not(.show-list):has(.ib-thread[data-key]) #actions { display:none; }
  #main:not(.show-list):has(.ib-thread[data-key]) .ib-layout { height:calc(100dvh - 119px); }
  .ib-thread-header { padding:12px; }
  .ib-messages { padding:10px; }
  .ib-reply { padding:9px; }
  .ai-list li { flex-wrap:wrap; }
  .ai-list li strong { min-width:42%; }
  .card { padding:16px; }
  .entry { padding:29px 18px 24px; }
}
