:root {
  --bg: #eef3fa;
  --card: #ffffff;
  --text: #10264d;
  --muted: #6e7f9f;
  --line: #dbe4f0;
  --blue: #3b82f6;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --radius: 24px;
}
*{box-sizing:border-box} body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);overflow-x:hidden}
a{text-decoration:none;color:inherit} table{width:100%;border-collapse:collapse} th,td{padding:14px 16px;border-bottom:1px solid var(--line);text-align:left}
th{font-size:12px;text-transform:uppercase;color:var(--muted)}
.layout{display:grid;grid-template-columns:clamp(220px,18vw,270px) minmax(0,1fr);min-height:100vh;transition:grid-template-columns .24s ease}.sidebar{position:sticky;top:0;align-self:start;height:100vh;max-height:100vh;padding:20px;border-right:1px solid var(--line);background:#f7faff;display:flex;flex-direction:column;gap:20px;overflow-y:auto;overflow-x:hidden;transition:opacity .2s ease,padding .2s ease,border-color .2s ease}.brand{display:flex;align-items:center;gap:14px;padding:14px;border-radius:22px;background:var(--card);box-shadow:0 8px 30px rgba(15,45,90,.06)}.brand img{width:54px;height:54px}.brand span{display:block;color:var(--muted);font-size:13px}
.sidebar nav{display:flex;flex-direction:column;gap:8px;background:var(--card);padding:18px;border-radius:28px;box-shadow:0 8px 30px rgba(15,45,90,.06)}.sidebar nav a{padding:12px 14px;border-radius:14px;font-weight:600;color:#36507c}.sidebar nav a:hover{background:#e8f0ff}.sidebar-user{margin-top:auto;background:var(--card);padding:18px;border-radius:24px;box-shadow:0 8px 30px rgba(15,45,90,.06)}
.layout-toolbar{display:flex;justify-content:flex-end;margin-bottom:12px}
.sidebar-toggle{display:inline-flex;align-items:center;gap:10px;border:1px solid #d7e3f4;background:#f6f9ff;color:#27416d;border-radius:999px;padding:9px 14px;font:inherit;font-weight:700;cursor:pointer;box-shadow:0 8px 24px rgba(15,45,90,.06)}
.sidebar-toggle:hover{background:#edf3ff}
.sidebar-toggle-icon{position:relative;width:14px;height:2px;display:inline-block;background:currentColor;border-radius:999px;transition:transform .2s ease,background .2s ease}
.sidebar-toggle-icon::before,.sidebar-toggle-icon::after{content:"";position:absolute;left:0;width:14px;height:2px;border-radius:999px;background:currentColor;transition:transform .2s ease,opacity .2s ease}
.sidebar-toggle-icon::before{top:-4px}
.sidebar-toggle-icon::after{top:4px}
.sidebar-toggle-hint{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#5f7395;padding:3px 7px;border-radius:999px;background:#e9f0ff;border:1px solid #d6e3fb}
body.sidebar-collapsed .layout{grid-template-columns:0 minmax(0,1fr)}
body.sidebar-collapsed .sidebar{opacity:0;pointer-events:none;padding-left:0;padding-right:0;border-right-color:transparent}
body.sidebar-collapsed .sidebar-toggle{background:#eaf2ff}
body.sidebar-collapsed .sidebar-toggle-icon{transform:rotate(45deg)}
body.sidebar-collapsed .sidebar-toggle-icon::before{opacity:0;transform:translateX(-5px)}
body.sidebar-collapsed .sidebar-toggle-icon::after{transform:translateY(-4px) rotate(-90deg)}
.content{padding:clamp(16px,2vw,28px);min-width:0}.hero{background:var(--card);border-radius:30px;padding:28px 34px;box-shadow:0 10px 32px rgba(15,45,90,.06);margin-bottom:20px}.hero h1{margin:0 0 8px;font-size:52px;line-height:1}.hero p{margin:0;color:var(--muted);font-size:22px}
.cards-grid{display:grid;gap:18px;margin-bottom:20px}.top-cards{grid-template-columns:repeat(5,1fr)}.sector-cards{grid-template-columns:repeat(5,1fr)}.metric-card{background:var(--card);border-radius:24px;padding:22px;box-shadow:0 10px 28px rgba(15,45,90,.06);position:relative;min-height:120px}.metric-card span{display:block;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.04em;font-size:13px}.metric-card strong{display:block;font-size:48px;margin-top:12px}.accent-blue{border-left:4px solid var(--blue)}.accent-green{border-left:4px solid var(--green)}.accent-yellow{border-left:4px solid var(--yellow)}.accent-red{border-left:4px solid var(--red)}.colored-left{border-left:4px solid var(--card-color)}
.dashboard-grid{display:grid;grid-template-columns:2fr 1fr;gap:20px}.panel{background:var(--card);border-radius:28px;padding:24px;box-shadow:0 10px 28px rgba(15,45,90,.06)}.panel.big{min-height:420px}.panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.panel-header h2,.page-head h1{margin:0}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.page-head p{margin:6px 0 0;color:var(--muted)}.split{gap:16px}
.team-list{display:flex;flex-direction:column;gap:12px}.team-item{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.team-item span{display:block;color:var(--muted);font-size:13px}.status-pill{padding:6px 12px;border-radius:999px;font-size:12px;font-weight:700}.status-pill.ok{background:#e8fff0;color:#167a38}.status-pill.off{background:#f1f5f9;color:#64748b}
.btn{display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:14px;padding:12px 18px;font-weight:700;cursor:pointer}.btn.primary{background:#3f79ff;color:white}.btn.danger{background:#ff4a4a;color:white;width:100%;margin-top:12px}.btn.ghost{background:#eef4ff;color:#2a4b8d}.flash-wrap{position:fixed;top:18px;right:22px;z-index:10010;display:grid;gap:10px;max-width:min(420px,calc(100vw - 24px));pointer-events:none}.flash{padding:12px 14px;border-radius:14px;box-shadow:0 14px 34px rgba(15,45,90,.15);border:1px solid transparent;pointer-events:auto}.flash.success{background:#e9fff0;color:#156e34;border-color:#b8e7c8}.flash.error,.flash.danger{background:#fff0f0;color:#a11f1f;border-color:#ffc9c9}.flash.warning{background:#fff8e8;color:#995d00;border-color:#ffe0a6}.flash.info{background:#ecf4ff;color:#204f96;border-color:#bfd7ff}
.form-panel{background:var(--card);padding:20px;border-radius:24px;box-shadow:0 10px 28px rgba(15,45,90,.06);margin-bottom:18px}.grid-form{display:grid;grid-template-columns:2fr 3fr 120px 180px;gap:12px}.grid-form.four{grid-template-columns:repeat(4,1fr)} input,select,textarea{width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:#fbfdff;font:inherit}textarea{min-height:90px;resize:vertical}.color-dot{display:inline-block;width:14px;height:14px;border-radius:50%;margin-right:8px;vertical-align:middle}
.status-badge{display:inline-flex;align-items:center;padding:4px 12px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}
.badge-pendente{background:#fff4e0;color:#b45309}
.badge-em-andamento{background:#e0f0ff;color:#1d4ed8}
.badge-concluido{background:#e8fff0;color:#15803d}
.badge-default{background:#f1f5f9;color:#475569}
.section-kicker{margin:0 0 10px;color:#315ea7;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.soft-chip{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#f4f7fd;color:#36507c;font-size:12px;font-weight:700;border:1px solid #dbe4f0}
.lock-badge{display:inline-flex;align-items:center;margin-left:8px;margin-top:6px;padding:3px 9px;border-radius:999px;background:#ffe7e7;color:#9f1239;font-size:11px;font-weight:700;white-space:nowrap}
.login-page{display:flex;align-items:center;justify-content:center;min-height:100vh}.login-card{width:min(420px,92vw);background:var(--card);padding:34px;border-radius:28px;box-shadow:0 14px 36px rgba(15,45,90,.1);display:grid;gap:14px}.login-card h1{margin:0}.login-card p{margin:0;color:var(--muted)}.login-logo{width:72px;height:72px}
.chat-layout{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(320px,1fr);gap:20px}.chat-panel{display:flex;flex-direction:column;min-height:70vh;background:linear-gradient(180deg,#ffffff 0,#fbfdff 100%)}.messages{display:flex;flex-direction:column;gap:14px;max-height:60vh;overflow:auto;padding-right:6px}.msg{display:flex}.msg.in{justify-content:flex-start}.msg.out{justify-content:flex-end}.msg-bubble{max-width:75%;padding:16px 18px;border-radius:22px;background:#f7fbff;box-shadow:0 12px 28px rgba(15,45,90,.06);border:1px solid #e6eef8}.msg.out .msg-bubble{background:linear-gradient(180deg,#edf8ef 0,#e3f6e8 100%);border-color:#d1ebd8}.msg-bubble small{display:block;color:var(--muted);margin-bottom:8px;font-weight:700}.msg-bubble p{margin:0 0 8px;line-height:1.55;white-space:pre-wrap;word-break:break-word}.msg-bubble time{font-size:12px;color:var(--muted)}.send-form{display:grid;grid-template-columns:1fr 220px;gap:12px;margin-top:18px;padding-top:18px;border-top:1px solid #e6edf7}.info-list{padding-left:18px;color:#2c4675}.inline-form{display:flex;gap:10px;align-items:center}
.tickets-hero,.ticket-detail-hero{display:flex;justify-content:space-between;gap:18px;align-items:stretch;padding:28px 30px;border-radius:32px;background:linear-gradient(135deg,rgba(46,104,214,.12),rgba(34,197,94,.08)),linear-gradient(180deg,#ffffff 0,#f6f9ff 100%);box-shadow:0 18px 50px rgba(15,45,90,.08);margin-bottom:20px;border:1px solid #dfe8f6}
.tickets-hero h1,.ticket-detail-hero h1{margin:0;font-size:40px;line-height:1.02;letter-spacing:-.03em}
.tickets-hero-text,.ticket-detail-subtitle{margin:12px 0 0;color:#587093;max-width:700px;font-size:15px;line-height:1.6}
.tickets-hero-stats{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:12px;min-width:min(100%,340px)}
.tickets-summary-grid{display:grid;grid-template-columns:minmax(220px,1.3fr) repeat(4,minmax(140px,1fr));gap:16px;margin-bottom:20px}
.tickets-title-card,.mini-stat-card{background:linear-gradient(180deg,#ffffff 0,#f8fbff 100%);border:1px solid #dfe8f6;border-radius:28px;box-shadow:0 14px 32px rgba(15,45,90,.06)}
.tickets-title-card{padding:26px 28px;display:flex;align-items:center;min-height:132px}
.tickets-title-card h1{margin:0;font-size:42px;line-height:1.02;letter-spacing:-.03em;color:#10264d}
.mini-stat-card{padding:18px 20px;min-height:132px;display:flex;flex-direction:column;justify-content:center}
.mini-stat-card span{display:block;color:#6480a7;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.mini-stat-card strong{display:block;margin-top:10px;font-size:28px;color:#10264d}
.tickets-panel{padding:0;overflow:hidden}
.tickets-panel-header{padding:26px 26px 8px}
.tickets-panel-header p{margin:8px 0 0;color:var(--muted)}
.tickets-table-wrap{overflow:auto;padding:0 12px 12px}
.tickets-table{min-width:980px}
.tickets-table th{padding-top:18px;padding-bottom:18px}
.tickets-table td{vertical-align:middle;background:#fff}
.tickets-table tbody tr{transition:background .18s ease}
.tickets-table tbody tr:hover td{background:#f9fbff}
.ticket-protocol-cell,.ticket-person-cell,.ticket-owner-cell{display:grid;gap:4px}
.ticket-protocol-cell strong,.ticket-person-cell strong,.ticket-owner-cell strong{font-size:15px}
.ticket-protocol-cell span,.ticket-person-cell span,.ticket-owner-subtle{font-size:12px;color:var(--muted)}
.ticket-actions{display:flex;gap:10px;align-items:center}
.danger-ghost{background:#fff1f1;color:#c62828}
.tickets-empty{display:grid;justify-items:center;gap:6px;padding:34px 18px;color:var(--muted)}
.tickets-empty strong{color:var(--text);font-size:16px}
.tickets-toast-stack{position:fixed;right:20px;bottom:20px;z-index:10020;display:grid;gap:10px;max-width:min(420px,calc(100vw - 24px));pointer-events:none}
.tickets-toast{pointer-events:auto;position:relative;padding:12px 42px 12px 14px;border-radius:14px;border:1px solid #bfd7ff;background:#ecf4ff;color:#204f96;box-shadow:0 14px 34px rgba(15,45,90,.15);animation:ticketsToastIn .26s ease forwards}
.tickets-toast-title{font-size:13px;font-weight:800;letter-spacing:.02em}
.tickets-toast-text{margin-top:4px;font-size:13px;line-height:1.4;color:#355d99}
.tickets-toast-close{position:absolute;top:8px;right:10px;border:none;background:transparent;color:#315ea7;font-size:17px;line-height:1;cursor:pointer;padding:2px}
.tickets-toast.is-leaving{animation:ticketsToastOut .24s ease forwards}
@keyframes ticketsToastIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes ticketsToastOut{from{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(8px) scale(.98)}}
.ticket-detail-main{display:grid;gap:16px;flex:1}
.ticket-detail-actions{display:flex;align-items:flex-start}
.ticket-title-row{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.ticket-status-box{display:grid;gap:8px;justify-items:end;text-align:right}
.ticket-status-box small{color:var(--muted);font-size:12px}
.back-link{display:inline-flex;align-items:center;gap:8px;color:#2d5ca8;font-weight:700}
.back-link:hover{text-decoration:underline}
.status-inline-form{padding:14px;background:rgba(255,255,255,.78);border:1px solid #dce6f4;border-radius:18px;box-shadow:0 10px 24px rgba(15,45,90,.05)}
.chat-panel-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:18px}
.chat-panel-head h2,.details-section h3{margin:0}
.chat-panel-head p{margin:8px 0 0;color:var(--muted)}
.live-indicator{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:999px;background:#f5f8fd;color:#577095;font-size:13px;border:1px solid #dce6f4}
.live-indicator #live-dot{width:8px;height:8px;border-radius:50%;background:#22c55e;display:inline-block}
.details-panel{display:grid;gap:18px;background:linear-gradient(180deg,#ffffff 0,#fbfdff 100%)}
.details-section{display:grid;gap:14px;padding:18px;border-radius:22px;border:1px solid #e3ebf6;background:#fdfefe}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.detail-card{padding:14px 16px;border-radius:18px;background:#f5f8fd;border:1px solid #e2eaf5;display:grid;gap:6px}
.detail-card span{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#6780a2}
.detail-card strong{font-size:15px;line-height:1.4;color:#17335f}
.detail-card-wide{grid-column:1 / -1}
.stack-form{display:grid;gap:8px}
.stack-form label{display:block;font-size:13px;font-weight:700;color:#27416d}
.inline-select-action{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center}
.send-form-check{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.send-form-check input{width:auto}
.notification-line{padding:12px 14px;border:1px solid #e3ebf6;border-radius:16px;background:#f7faff}
.panel-note{margin:8px 0 0;font-size:13px;color:var(--muted)}
.chat-audio-player{width:100%;min-width:240px;margin-top:8px;border-radius:8px}
.msg-bubble:has(audio){min-width:260px}
.chat-image-link{display:block;margin-top:8px}
.chat-image-preview{display:block;max-width:min(320px,100%);max-height:320px;border-radius:12px;border:1px solid #d8e2f1;object-fit:cover;background:#f8fbff}
.chat-image-link.is-broken{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:10px;border:1px solid #d8e2f1;background:#f8fbff;color:#2d5ca8;font-weight:700;text-decoration:none}
.chat-image-link.is-broken::after{content:attr(data-fallback-label)}
.permissions-panel{max-width:1100px}
.permissions-intro{margin:0 0 22px;color:var(--muted);font-size:15px}
.permissions-grid{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:18px 90px;margin-bottom:26px}
.permission-item{display:flex;align-items:center;gap:14px;min-height:30px;cursor:pointer}
.permission-item.is-disabled{cursor:not-allowed;opacity:.9}
.permission-label{font-size:28px;font-weight:700;letter-spacing:.01em;color:#203558}
.permission-switch-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;width:54px;height:30px;flex:0 0 54px}
.permission-checkbox{position:absolute;inset:0;opacity:0;cursor:pointer;margin:0}
.permission-item.is-disabled .permission-checkbox{cursor:not-allowed}
.permission-switch{position:relative;width:42px;height:24px;border-radius:999px;background:#c9d6ea;transition:.2s ease;display:inline-block}
.permission-switch::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(16,38,77,.18);transition:.2s ease}
.permission-checkbox:checked + .permission-switch{background:#6d90d8}
.permission-checkbox:checked + .permission-switch::after{transform:translateX(18px)}
.permission-checkbox:focus-visible + .permission-switch{outline:2px solid #8db6ff;outline-offset:2px}
.permissions-note{font-size:13px;color:var(--muted);margin:0 0 14px}
.modal-backdrop{position:fixed;inset:0;background:rgba(16,38,77,.35);display:flex;align-items:center;justify-content:center;padding:20px;z-index:9999}
.modal-backdrop.hidden{display:none}
.modal-card{width:min(460px,100%);background:var(--card);border-radius:24px;padding:24px;box-shadow:0 20px 60px rgba(16,38,77,.18)}
.modal-card h3{margin:0 0 10px}
.modal-card p{margin:0;color:var(--muted);line-height:1.5}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}

.avaliacao-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px;position:relative;overflow:hidden;background:radial-gradient(circle at 10% 10%,#d6e6ff 0,#eef3fa 45%,#f3f7ff 100%)}
.avaliacao-bg-shape{position:fixed;inset:auto auto -140px -120px;width:420px;height:420px;border-radius:50%;background:linear-gradient(140deg,#1f69ff,#6ad2ff);filter:blur(4px);opacity:.25;pointer-events:none}
.avaliacao-wrap{width:min(720px,100%);position:relative;z-index:1}
.avaliacao-card{background:#fff;border-radius:28px;padding:34px;box-shadow:0 24px 60px rgba(22,52,102,.16);border:1px solid #d9e6fb}
.avaliacao-head h1,.obrigado-card h1{margin:6px 0 10px;font-size:34px;line-height:1.05;letter-spacing:-.02em}
.avaliacao-kicker{margin:0;color:#315ea7;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.avaliacao-head p,.obrigado-card p{margin:0;color:#4f6488;line-height:1.55}
.avaliacao-form{display:grid;gap:14px;margin-top:24px}
.stars-fieldset{border:none;padding:0;margin:0}
.stars-fieldset legend{font-size:13px;color:#5c6f91;margin-bottom:10px}
.stars-input{display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:6px}
.stars-input input{display:none}
.stars-input label{font-size:40px;line-height:1;cursor:pointer;color:#c4d2e8;transition:transform .16s ease,color .16s ease}
.stars-input label.pulse{transform:scale(1.12)}
.stars-input label:hover,.stars-input label:hover ~ label,.stars-input input:checked ~ label{color:#f7b500}
.avaliacao-label{font-size:13px;color:#5c6f91;font-weight:700}
.avaliacao-form textarea{min-height:120px;background:#f8fbff}
.avaliacao-error{margin:0;color:#b42318;font-weight:600;background:#fff3f1;border:1px solid #ffd5d1;border-radius:12px;padding:10px 12px}
.obrigado-card{text-align:center}
.nota-resultado{font-size:44px;line-height:1;color:#f7b500;margin:10px 0 6px}
.muted-text{margin-top:8px;color:#62769a}
.avaliacoes-feed{display:grid;gap:12px;max-height:520px;overflow:auto;padding-right:6px}
.avaliacao-item{border:1px solid var(--line);border-radius:16px;padding:12px 14px;background:#fbfdff}
.avaliacao-item-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.avaliacao-item p{margin:10px 0 8px;color:#27416d;line-height:1.5}
.avaliacao-item small{color:var(--muted)}
.rating-stars{font-size:16px;line-height:1;color:#f7b500;white-space:nowrap}
@media (max-width: 1200px){.top-cards,.sector-cards{grid-template-columns:repeat(2,1fr)}.dashboard-grid,.chat-layout,.layout,.tickets-summary-grid{grid-template-columns:1fr}.sidebar{position:static;align-self:auto;height:auto;max-height:none;overflow:visible;border-right:none;border-bottom:1px solid var(--line)}.hero h1,.tickets-hero h1,.ticket-detail-hero h1,.tickets-title-card h1{font-size:40px}.hero p{font-size:18px}.grid-form,.grid-form.four,.send-form,.inline-select-action{grid-template-columns:1fr}.tickets-hero,.ticket-detail-hero,.ticket-title-row{display:grid}.ticket-status-box{justify-items:start;text-align:left}.ticket-detail-actions{justify-content:flex-start}.tickets-hero-stats{min-width:0}.tickets-title-card,.mini-stat-card{min-height:auto}}
@media (max-width: 1200px){body.sidebar-collapsed .sidebar{display:none}body.sidebar-collapsed .layout{grid-template-columns:1fr}}
@media (max-width: 900px){.permissions-grid{grid-template-columns:1fr;gap:16px}.permission-label{font-size:20px}}
@media (max-width: 720px){.content{padding:18px}.panel,.tickets-hero,.ticket-detail-hero,.tickets-title-card,.mini-stat-card{padding:20px}.tickets-hero-stats,.detail-grid{grid-template-columns:1fr}.chat-panel-head{flex-direction:column}.msg-bubble{max-width:92%}.tickets-table{min-width:760px}.tickets-title-card h1{font-size:34px}}
.hidden{display:none !important}
.flash-wrap{position:static;max-width:none;margin-bottom:18px;pointer-events:auto}
.flash{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;box-shadow:0 10px 26px rgba(15,45,90,.08)}
.flash-close{margin-left:auto;background:transparent;border:none;color:currentColor;font:inherit;font-size:18px;line-height:1;cursor:pointer;padding:0 2px}
.chat-layout{display:grid;gap:20px}
.send-form{grid-template-columns:minmax(0,1fr) auto;align-items:end}
.send-form textarea{min-height:130px}
.send-form-side{display:grid;gap:10px}
.send-form-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.send-form-meter{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.detail-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.details-panel{grid-template-columns:repeat(2,minmax(0,1fr))}
.details-section.full-span{grid-column:1 / -1}
.panel-feedback{margin:0 0 12px;padding:12px 14px;border-radius:14px;border:1px solid #bfd7ff;background:#ecf4ff;color:#204f96}
.panel-feedback.error{border-color:#ffc9c9;background:#fff0f0;color:#a11f1f}
.modal-card.modal-lg{width:min(760px,100%)}
@media (max-width: 900px){.details-panel{grid-template-columns:1fr}}
@media (max-width: 720px){.send-form-tools{flex-direction:column;align-items:stretch}}
.whatsapp-chat-panel{padding-bottom:18px;background:linear-gradient(180deg,#fdfaf5 0,#fffefe 100%)}
.whatsapp-messages{max-height:62vh;padding:20px 12px;border:1px solid #ebe1d3;border-radius:26px;background:
radial-gradient(circle at 20px 20px,rgba(207,190,165,.15) 2px,transparent 2px) 0 0/34px 34px,
linear-gradient(180deg,#f8f2e9 0,#fdfbf8 100%)}
.whatsapp-bubble{border-radius:18px;box-shadow:0 6px 18px rgba(83,67,43,.08)}
.msg.in .whatsapp-bubble{background:#fff;border-color:#eadfce}
.msg.out .whatsapp-bubble{background:linear-gradient(180deg,#dfffd7 0,#cef7c2 100%);border-color:#c8eab8}
.whatsapp-send-form{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:10px;align-items:end;margin-top:16px;padding:10px 12px;border:1px solid #e2d7c8;border-radius:28px;background:#fff8ef}
.composer-icon-btn{width:46px;height:46px;border:none;border-radius:50%;background:#eef3ff;color:#24498a;font-size:24px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 8px 20px rgba(36,73,138,.08)}
.composer-icon-btn.send{background:#3f79ff;color:#fff;font-size:18px}
.composer-icon-btn.mic{background:#eafbf0;color:#1f8d49;font-size:20px}
.composer-icon-btn.mic.is-recording{background:#ffe8e8;color:#c62828}
.composer-input-shell{display:grid;gap:6px;min-width:0;padding:10px 14px;border:1px solid #e4dacc;border-radius:22px;background:#fff}
.composer-input-shell textarea{min-height:24px;max-height:120px;padding:0;border:none;background:transparent;resize:none;box-shadow:none}
.composer-input-shell textarea:focus{outline:none}
.composer-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#7a6d5b;font-size:12px}
.composer-level{height:6px;border-radius:999px;background:#e8e1d8;overflow:hidden}
.composer-level #record-level-bar{height:100%;width:0;background:linear-gradient(90deg,#22c55e,#f59e0b,#ef4444);transition:width .08s linear}
.details-panel-bottom{margin-top:18px;grid-template-columns:repeat(3,minmax(0,1fr))}
.details-panel-bottom .details-section{min-height:auto}
@media (max-width: 900px){.details-panel-bottom{grid-template-columns:1fr}}
@media (max-width: 720px){.whatsapp-send-form{grid-template-columns:auto minmax(0,1fr) auto auto;padding:10px}.composer-icon-btn{width:42px;height:42px}}

.triage-page{
  display:grid;
  gap:20px;
  color:#11284a;
  font-family:"Manrope","Segoe UI","Tahoma",sans-serif;
}

.triage-top-menu{
  position:sticky;
  top:8px;
  z-index:50;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:10px;
  border-radius:18px;
  background:rgba(244,249,255,.94);
  border:1px solid #d4e3f8;
  backdrop-filter:blur(6px);
}

.triage-top-btn{
  min-width:145px;
  background:#fff;
  border:1px solid #cfe0f7;
  color:#264f8a;
}

.triage-hero{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:stretch;
  padding:30px 32px;
  border-radius:32px;
  background:linear-gradient(135deg,rgba(34,197,94,.12),rgba(59,130,246,.12)),linear-gradient(180deg,#fff 0,#f7fbff 100%);
  border:1px solid #dce7f6;
  box-shadow:0 18px 44px rgba(16,38,77,.08);
}

.triage-hero h1{
  margin:0;
  font-size:44px;
  line-height:1.02;
  letter-spacing:-.03em;
}

.triage-hero-text{
  margin:12px 0 0;
  max-width:760px;
  color:#587093;
  line-height:1.6;
}

.triage-hero-side{
  display:grid;
  gap:12px;
  align-content:start;
  min-width:220px;
}

.triage-hero-chip{
  display:grid;
  gap:6px;
  padding:16px 18px;
  border-radius:22px;
  background:rgba(255,255,255,.88);
  border:1px solid #dbe6f4;
}

.triage-hero-chip span,
.triage-kpi-card span,
.triage-flow-card span{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#6480a7;
}

.triage-hero-chip strong{
  font-size:18px;
}

.triage-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.triage-kpi-card{
  padding:20px 22px;
  border-radius:26px;
  background:#fff;
  border:1px solid #dde7f4;
  box-shadow:0 14px 30px rgba(16,38,77,.06);
  position:relative;
  overflow:hidden;
}

.triage-kpi-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:6px;
  border-radius:26px 0 0 26px;
  background:var(--kpi-accent,#3b82f6);
}

.triage-kpi-card strong{
  display:block;
  margin-top:10px;
  font-size:34px;
  color:#10264d;
}

.triage-kpi-card--blue{--kpi-accent:#3b82f6}
.triage-kpi-card--amber{--kpi-accent:#f59e0b}
.triage-kpi-card--cyan{--kpi-accent:#06b6d4}
.triage-kpi-card--green{--kpi-accent:#22c55e}

.triage-main-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:20px;
}

.triage-panel-header{
  align-items:flex-start;
}

.triage-panel-header p{
  margin:8px 0 0;
  color:var(--muted);
}

.triage-flow-panel,
.triage-list-panel{
  border:1px solid #dde7f4;
  box-shadow:0 16px 34px rgba(16,38,77,.06);
}

.triage-flow-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:12px;
  margin-bottom:16px;
}

.triage-flow-card{
  padding:16px 18px;
  border-radius:20px;
  background:linear-gradient(180deg,#fff 0,#f8fbff 100%);
  border:1px solid #dce7f5;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  position:relative;
  cursor:pointer;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.triage-flow-card:hover{
  transform:translateY(-1px);
  border-color:#bfd3f6;
}

.triage-flow-card.is-selected{
  border-color:#87aef2;
  box-shadow:0 0 0 3px rgba(99,136,216,.14), inset 0 1px 0 rgba(255,255,255,.9);
}

.triage-flow-card::after{
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  top:0;
  height:4px;
  border-radius:999px;
  background:var(--triage-accent,#3b82f6);
}

.triage-flow-card strong{
  display:block;
  margin-top:8px;
  font-size:28px;
}

.triage-flow-canvas{
  padding:18px;
  border-radius:26px;
  min-height:420px;
  background:
    radial-gradient(circle at 1px 1px,rgba(255,255,255,.16) 1.2px,transparent 0) 0 0/11px 11px,
    linear-gradient(180deg,#121826 0,#0f1726 100%);
  border:1px solid #1f2937;
  overflow:auto;
}

.triage-flow-graph{
  min-width:680px;
}

.triage-flow-graph svg{
  width:100%;
  height:auto;
}

.triage-fallback-pre{
  margin:0;
  color:#dbe7ff;
  white-space:pre-wrap;
  font:13px/1.6 "Consolas","Courier New",monospace;
}

.triage-config-form{
  display:grid;
  gap:14px;
}

.triage-builder-toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding:10px;
  border-radius:22px;
  background:linear-gradient(180deg,#f8fbff 0,#f2f7ff 100%);
  border:1px solid #dbe6f4;
}

.triage-toolbar-pill{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid #d9e5f5;
  color:#5d769b;
  font-size:12px;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
}

.triage-toolbar-btn{
  min-width:148px;
  background:#fff;
  border:1px solid #d8e3f2;
  color:#2c558f;
}

.triage-builder-note{
  display:grid;
  gap:6px;
  padding:14px 16px;
  border-radius:18px;
  background:#f8fbff;
  border:1px solid #dbe6f4;
}

.triage-builder-note p{
  margin:0;
  color:#61799d;
  line-height:1.5;
}

.triage-builder-workspace{
  display:grid;
  grid-template-columns:minmax(260px,.8fr) minmax(0,1.2fr);
  gap:14px;
  align-items:start;
}

.triage-builder-column{
  display:grid;
  gap:14px;
}

.triage-builder-section{
  display:grid;
  gap:12px;
  padding:16px;
  border-radius:22px;
  background:linear-gradient(180deg,#fff 0,#f8fbff 100%);
  border:1px solid #dbe6f4;
}

.triage-builder-section--editor{
  min-height:280px;
}

.triage-builder-section-head h3{
  margin:0;
  font-size:16px;
}

.triage-builder-section-head p{
  margin:6px 0 0;
  color:#60779a;
  font-size:13px;
  line-height:1.5;
}

.triage-builder-list{
  display:grid;
  gap:12px;
}

.triage-builder-picker-list{
  display:grid;
  gap:10px;
}

.triage-picker-item{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:12px 14px;
  border:none;
  border-radius:16px;
  background:#fff;
  border:1px solid #dbe6f4;
  cursor:pointer;
  text-align:left;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.triage-picker-item:hover{
  transform:translateY(-1px);
  border-color:#bfd3f6;
}

.triage-picker-item.is-selected{
  border-color:#7fa7ef;
  box-shadow:0 0 0 3px rgba(99,136,216,.12);
  background:linear-gradient(180deg,#fff 0,#f5f9ff 100%);
}

.triage-picker-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  flex:0 0 12px;
}

.triage-picker-copy{
  display:grid;
  gap:3px;
  min-width:0;
}

.triage-picker-copy strong,
.triage-picker-copy small{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.triage-picker-copy small{
  color:#7187a8;
}

.triage-builder-card{
  display:grid;
  gap:12px;
  padding:16px;
  border-radius:18px;
  border:1px solid #dce6f4;
  background:#fff;
}

.triage-builder-card--editor{
  min-height:190px;
}

.triage-builder-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.triage-builder-grid--link{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.triage-builder-grid--editor{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.triage-builder-grid--link-editor{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.triage-builder-grid label{
  display:grid;
  gap:6px;
}

.triage-builder-grid span{
  font-size:12px;
  font-weight:800;
  color:#5f789d;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.triage-builder-actions{
  display:flex;
  justify-content:flex-end;
}

.triage-builder-editor{
  display:grid;
  align-content:start;
  min-height:180px;
}

.triage-builder-empty{
  display:grid;
  gap:8px;
  align-content:center;
  min-height:180px;
  padding:18px;
  border-radius:18px;
  border:1px dashed #cad8ee;
  background:#fbfdff;
}

.triage-builder-empty p{
  margin:0;
  color:#6b82a4;
  line-height:1.5;
}

.triage-advanced-json{
  border:1px solid #dbe6f4;
  border-radius:18px;
  padding:14px;
  background:#f8fbff;
}

.triage-advanced-json summary{
  cursor:pointer;
  font-weight:800;
  color:#24498a;
}

.triage-advanced-json textarea{
  margin-top:12px;
}

.triage-modal-card{
  display:grid;
  gap:16px;
  max-height:min(82vh,760px);
}

.triage-edit-modal-card{
  width:100vw;
  max-width:100vw;
  height:100vh;
  max-height:100vh;
  min-height:100vh;
  border-radius:0;
}

#triage-edit-modal{
  position:fixed !important;
  top:0 !important;
  right:0 !important;
  bottom:0 !important;
  left:0 !important;
  inset:0 !important;
  width:100vw !important;
  height:100vh !important;
  margin:0 !important;
  padding:0 !important;
  align-items:stretch !important;
  justify-content:stretch !important;
  z-index:12000 !important;
}

#triage-edit-modal .triage-edit-modal-card{
  margin:0 !important;
  width:100vw !important;
  max-width:100vw !important;
  height:100vh !important;
  max-height:100vh !important;
  min-height:100vh !important;
}

body.triage-edit-open{
  overflow:hidden;
}

.triage-edit-grid{
  display:grid;
  grid-template-columns:minmax(280px,360px) minmax(0,1fr);
  gap:14px;
  min-height:0;
}

.triage-edit-right{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  min-height:0;
}

.triage-edit-links-panel{
  min-height:0;
}

.triage-edit-grid .triage-builder-section{
  min-height:0;
}

.triage-edit-grid .triage-builder-picker-list,
.triage-edit-grid .triage-builder-editor{
  max-height:66vh;
  overflow:auto;
  padding-right:4px;
}

.triage-edit-grid .triage-builder-editor{
  border:1px solid #dbe6f4;
  border-radius:16px;
  background:#fbfdff;
  padding:12px;
}

.triage-edit-grid .triage-builder-card--editor{
  min-height:auto;
  border-radius:14px;
}

.triage-edit-grid .triage-builder-grid--editor,
.triage-edit-grid .triage-builder-grid--link-editor{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.triage-edit-grid .triage-builder-grid--link-editor label:last-child{
  grid-column:1 / -1;
}

.triage-edit-grid input,
.triage-edit-grid select,
.triage-edit-grid textarea{
  min-height:46px;
  padding:11px 12px;
  font-size:15px;
}

.triage-edit-grid .triage-builder-grid span{
  font-size:11px;
  letter-spacing:.08em;
}

.triage-edit-grid .triage-builder-actions .btn{
  min-height:44px;
}

.triage-edit-modal-card .modal-actions{
  position:sticky;
  bottom:0;
  padding:10px 12px 4px;
  border-top:1px solid #dce7f5;
  background:linear-gradient(180deg,rgba(255,255,255,.92) 0,#fff 45%);
}

.triage-modal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.triage-modal-head h3{
  margin:0;
}

.triage-modal-head p{
  margin:8px 0 0;
  color:#5f7799;
}

.triage-modal-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  min-height:0;
}

.triage-modal-section{
  display:grid;
  gap:10px;
  min-height:0;
  padding:12px;
  border-radius:16px;
  border:1px solid #dce7f5;
  background:#f9fbff;
}

.triage-modal-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.triage-modal-section-head h4{
  margin:0;
}

.triage-modal-section-head span{
  min-width:28px;
  text-align:center;
  border-radius:999px;
  padding:2px 8px;
  background:#e7f0ff;
  color:#2f5ea6;
  font-weight:800;
}

.triage-modal-list{
  display:grid;
  gap:8px;
  max-height:52vh;
  overflow:auto;
  padding-right:4px;
}

.triage-modal-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#fff;
  border:1px solid #dce7f5;
}

.triage-modal-item-btn{
  width:100%;
  text-align:left;
  cursor:pointer;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.triage-modal-item-btn:hover{
  transform:translateY(-1px);
  border-color:#9fc0ef;
  box-shadow:0 0 0 3px rgba(99,136,216,.12);
}

.triage-modal-item div{
  display:grid;
  gap:4px;
}

.triage-modal-item small{
  color:#6f86a8;
}

.triage-modal-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  flex:0 0 12px;
  margin-top:4px;
}

.triage-modal-link-arrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  border-radius:999px;
  background:#e8f2ff;
  color:#2e5da4;
  font-size:11px;
  font-weight:800;
  margin-top:2px;
}

.triage-modal-empty{
  padding:10px 12px;
  border-radius:12px;
  border:1px dashed #c9d9ef;
  color:#6d83a5;
  background:#fff;
}

.triage-config-form label{
  font-size:13px;
  font-weight:800;
  color:#28456f;
}

.triage-config-form textarea{
  min-height:340px;
  font:13px/1.5 "Consolas","Courier New",monospace;
  background:#0f172a;
  color:#dbe7ff;
  border-color:#1e293b;
}

.triage-readonly-box,
.triage-config-hint{
  display:grid;
  gap:8px;
  padding:16px 18px;
  border-radius:18px;
  background:#f7faff;
  border:1px solid #dbe6f4;
}

.triage-readonly-box p,
.triage-config-hint p{
  margin:0;
  color:#5b7396;
  line-height:1.55;
}

.triage-config-hint{
  margin-top:16px;
}

.triage-table-wrap{
  overflow:auto;
}

.triage-table{
  min-width:980px;
}

.triage-ticket-main{
  display:grid;
  gap:4px;
}

.triage-ticket-main strong{
  font-size:15px;
}

.triage-ticket-main span{
  font-size:12px;
  color:var(--muted);
}

.triage-open-btn{
  min-width:88px;
}

@media (max-width: 1200px){
  .triage-kpis,
  .triage-main-grid{
    grid-template-columns:1fr;
  }
  .triage-edit-right{grid-template-columns:1fr;}
  .triage-hero{
    display:grid;
  }
}

@media (max-width: 720px){
  .triage-page{
    gap:16px;
  }
  .triage-top-menu{
    top:0;
    border-radius:14px;
  }
  .triage-top-btn{
    width:100%;
  }
  .triage-hero,
  .triage-kpi-card{
    padding:22px;
  }
  .triage-hero h1{
    font-size:34px;
  }
  .triage-kpis{
    grid-template-columns:1fr;
  }
  .triage-flow-canvas{
    min-height:340px;
    padding:12px;
  }
  .triage-flow-graph{
    min-width:560px;
  }
  .triage-builder-toolbar{
    flex-direction:column;
  }
  .triage-toolbar-btn{
    width:100%;
  }
  .triage-builder-grid,
  .triage-builder-grid--link,
  .triage-builder-grid--editor,
  .triage-builder-grid--link-editor{
    grid-template-columns:1fr;
  }
  .triage-modal-grid{
    grid-template-columns:1fr;
  }
  .triage-edit-grid{
    grid-template-columns:1fr;
  }
  .triage-edit-grid .triage-builder-grid--editor,
  .triage-edit-grid .triage-builder-grid--link-editor{
    grid-template-columns:1fr;
  }
  .triage-edit-modal-card{
    width:100vw;
    max-width:100vw;
    min-height:100vh;
    max-height:100vh;
  }
}

.atendimento-v2{
  position:relative;
  display:grid;
  gap:18px;
  color:#1a2338;
  font-family:"Manrope","Segoe UI","Tahoma",sans-serif;
}

.atendimento-v2 .v2-orb{
  position:absolute;
  z-index:0;
  pointer-events:none;
  border-radius:999px;
  filter:blur(10px);
}

.atendimento-v2 .v2-orb-a{
  width:260px;
  height:260px;
  top:-55px;
  right:2%;
  background:radial-gradient(circle,#55d4c7 0,rgba(85,212,199,0) 65%);
  opacity:.35;
}

.atendimento-v2 .v2-orb-b{
  width:300px;
  height:300px;
  left:-70px;
  bottom:12%;
  background:radial-gradient(circle,#89a9ff 0,rgba(137,169,255,0) 65%);
  opacity:.25;
}

.atendimento-v2 .v2-ticket-head,
.atendimento-v2 .v2-conversation-card,
.atendimento-v2 .v2-action-card{
  position:relative;
  z-index:1;
}

.atendimento-v2 .v2-ticket-head{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:stretch;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.atendimento-v2 .v2-head-card{
  flex:1 1 160px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  padding:18px 22px;
  border:1px solid #d7deeb;
  border-radius:20px;
  background:linear-gradient(120deg,rgba(255,255,255,.95) 0,rgba(245,250,255,.96) 100%);
  box-shadow:0 4px 16px rgba(23,33,57,.07);
}

.atendimento-v2 .v2-head-card--protocol{
  flex:1.2 1 240px;
  min-width:240px;
}

.atendimento-v2 .v2-kicker{
  margin:0;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:10px;
  font-weight:800;
  color:#3f5f9b;
}

.atendimento-v2 .v2-ticket-head h1{
  margin:0;
  font-size:22px;
  line-height:1;
  letter-spacing:-.02em;
  color:#0d1830;
}

.atendimento-v2 .v2-head-value{
  margin:0;
  color:#0d1830;
  font-size:15px;
  font-weight:700;
}

.atendimento-v2 .v2-ticket-side{
  display:grid;
  gap:12px;
  align-content:start;
}

.atendimento-v2 .v2-ticket-status{
  display:grid;
  justify-items:start;
  gap:6px;
  padding:14px 16px;
  border:1px solid #dae1ef;
  border-radius:18px;
  background:rgba(255,255,255,.9);
}

.atendimento-v2 .v2-ticket-status small{
  color:#637697;
  font-size:12px;
}

.atendimento-v2 .v2-status-form{
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid #d6deec;
  border-radius:18px;
  background:rgba(248,252,255,.92);
}

.atendimento-v2 .v2-status-form select{
  border-color:#ccd6e8;
  background:#fff;
}

.atendimento-v2 .v2-workspace{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(260px,1fr);
  gap:18px;
  align-items:start;
}

.atendimento-v2 .v2-conversation-card{
  display:grid;
  gap:14px;
  padding:18px;
  border:1px solid #d8dfea;
  border-radius:28px;
  background:linear-gradient(180deg,#ffffff 0,#fbfcff 65%,#fffcf7 100%);
  box-shadow:0 14px 34px rgba(23,33,57,.09);
}

.atendimento-v2 .v2-chat-head{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  gap:14px;
  padding-bottom:12px;
  border-bottom:1px solid #e2e8f3;
}

.atendimento-v2 .v2-chat-head h2{
  margin:0;
  font-size:28px;
  letter-spacing:-.02em;
}

.atendimento-v2 .v2-chat-head p{
  margin:8px 0 0;
  color:#5f7398;
  font-weight:600;
}

.atendimento-v2 .v2-head-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.atendimento-v2 .v2-chat-status{
  display:flex;
  align-items:center;
}

.atendimento-v2 .v2-chat-status .status-badge{
  font-size:13px;
  padding:7px 12px;
}

.atendimento-v2 .live-indicator{
  background:#f1f6ff;
  border:1px solid #d6e1f2;
  border-radius:999px;
  color:#36598f;
  font-weight:700;
}

.atendimento-v2 .whatsapp-messages{
  max-height:min(63vh,560px);
  padding:18px 12px;
  border:1px solid #e4eaf3;
  border-radius:22px;
  background:#fff;
}

.atendimento-v2 .msg{animation:v2MessageIn .22s ease}

.atendimento-v2 .msg .whatsapp-bubble{
  border-radius:20px;
  border:1px solid #d7dfec;
  box-shadow:0 8px 14px rgba(23,33,57,.07);
}

.atendimento-v2 .msg.in .whatsapp-bubble{background:#ffffff}

.atendimento-v2 .msg.out .whatsapp-bubble{
  background:linear-gradient(180deg,#e8ffe3 0,#d6f8ce 100%);
  border-color:#c2e4b8;
}

.atendimento-v2 .msg-bubble small{
  color:#617595;
  font-weight:800;
}

.atendimento-v2 .v2-composer{
  display:grid;
  grid-template-columns:minmax(0,1fr) 46px 46px 56px;
  gap:10px;
  align-items:center;
  padding:9px;
  border:1px solid #d8e0ee;
  border-radius:20px;
  background:#fff;
}

.atendimento-v2 .v2-icon-btn{
  width:46px;
  height:46px;
  border:none;
  border-radius:13px;
  cursor:pointer;
  font-weight:800;
  font-size:20px;
  line-height:1;
  color:#1b3b73;
  background:#eaf1ff;
  box-shadow:0 8px 16px rgba(29,59,112,.12);
  transition:transform .18s ease,box-shadow .18s ease;
}

.atendimento-v2 .v2-icon-btn:hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:0 12px 22px rgba(29,59,112,.16);
}

.atendimento-v2 .v2-icon-btn.send{
  color:#fff;
  background:linear-gradient(150deg,#1e4bcb 0,#2a68f7 100%);
}

.atendimento-v2 .v2-icon-btn.mic{
  color:#146c4a;
  background:linear-gradient(160deg,#e8fff3 0,#d9f8e8 100%);
  font-size:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.atendimento-v2 .v2-icon-btn.mic .v2-mic-symbol{
  position:relative;
  width:13px;
  height:17px;
  border:2.2px solid currentColor;
  border-bottom:none;
  border-radius:10px 10px 7px 7px;
}

.atendimento-v2 .v2-icon-btn.mic .v2-mic-symbol::before{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:-7px;
  width:2.2px;
  height:7px;
  background:currentColor;
  border-radius:2px;
}

.atendimento-v2 .v2-icon-btn.mic .v2-mic-symbol::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:-12px;
  width:13px;
  height:6px;
  border:2.2px solid currentColor;
  border-top:none;
  border-radius:0 0 10px 10px;
}

.atendimento-v2 .v2-icon-btn.image{
  width:56px;
  font-size:12px;
  letter-spacing:.08em;
  color:#6a3b00;
  background:linear-gradient(160deg,#fff6e7 0,#ffe4b8 100%);
}

.atendimento-v2 .v2-icon-btn.mic.is-recording{
  color:#b42318;
  background:#ffe8e8;
  box-shadow:0 0 0 0 rgba(180,35,24,.35),0 10px 20px rgba(180,35,24,.18);
  animation:v2MicPulse 1.15s ease infinite;
}

@keyframes v2MicPulse{
  0%{box-shadow:0 0 0 0 rgba(180,35,24,.35),0 10px 20px rgba(180,35,24,.18)}
  70%{box-shadow:0 0 0 9px rgba(180,35,24,0),0 10px 20px rgba(180,35,24,.18)}
  100%{box-shadow:0 0 0 0 rgba(180,35,24,0),0 10px 20px rgba(180,35,24,.18)}
}

.atendimento-v2 .v2-input-wrap{
  display:grid;
  gap:6px;
  padding:9px 12px;
  border:1px solid #d6dfed;
  border-radius:14px;
  background:#fdfefe;
}

.atendimento-v2 .v2-input-wrap textarea{
  min-height:24px;
  max-height:120px;
  border:none;
  padding:0;
  resize:none;
  box-shadow:none;
  background:transparent;
}

.atendimento-v2 .v2-input-wrap textarea:focus{outline:none}

.atendimento-v2 .v2-meta-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#6c7f9f;
  font-size:12px;
}

.atendimento-v2 .v2-level{
  height:6px;
  overflow:hidden;
  border-radius:999px;
  background:#e8eef9;
}

.atendimento-v2 .v2-level #record-level-bar{
  height:100%;
  width:0;
  background:linear-gradient(90deg,#18a85f,#f59e0b,#dc2626);
  transition:width .08s linear;
}

.atendimento-v2 .v2-side-panel{
  display:grid;
  gap:12px;
}

.atendimento-v2 .v2-action-card{
  display:grid;
  gap:12px;
  padding:16px;
  border:1px solid #d9e1ee;
  border-radius:20px;
  background:linear-gradient(180deg,#fff 0,#f8fbff 100%);
  box-shadow:0 12px 24px rgba(23,33,57,.07);
}

.atendimento-v2 .v2-action-card h3{
  margin:0;
  color:#152a52;
}

.atendimento-v2 .v2-switch-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid #dbe3f0;
  border-radius:14px;
  background:#f2f6ff;
  color:#51688f;
  font-weight:700;
  cursor:pointer;
}

.atendimento-v2 .v2-stack-form{display:grid;gap:8px}

.atendimento-v2 .v2-inline-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}

.atendimento-v2 .panel-note{
  margin:2px 0 0;
  color:#60739a;
  font-size:13px;
}

.atendimento-v2 .panel-feedback{
  position:absolute;
  top:74px;
  left:18px;
  right:18px;
  margin:0;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid #bfd7ff;
  background:#ecf4ff;
  color:#204f96;
  box-shadow:0 12px 26px rgba(16,38,77,.16);
  z-index:7;
  pointer-events:none;
}

.atendimento-v2 .panel-feedback.error{
  border-color:#ffc9c9;
  background:#fff0f0;
  color:#a11f1f;
}

.atendimento-v2 .modal-backdrop{
  background:rgba(19,29,52,.45);
  backdrop-filter:blur(2px);
}

.atendimento-v2 .modal-card{
  border:1px solid #d9e3f0;
}

@keyframes v2MessageIn{
  from{opacity:0;transform:translateY(5px)}
  to{opacity:1;transform:translateY(0)}
}

@media (max-width: 1080px){
  .atendimento-v2 .v2-ticket-head h1{font-size:26px}
  .atendimento-v2 .v2-workspace{grid-template-columns:1fr}
}

@media (max-width: 760px){
  .atendimento-v2 .v2-ticket-head{gap:8px}
  .atendimento-v2 .v2-head-card{padding:14px 16px}
  .atendimento-v2 .v2-head-card--protocol{min-width:unset}
  .atendimento-v2 .v2-chat-head{flex-direction:column}
  .atendimento-v2 .v2-inline-row{grid-template-columns:1fr}
  .atendimento-v2 .v2-icon-btn{width:42px;height:42px}
}

/* ===================== DASH V2 ===================== */
.dash-v2{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:18px;
  overflow:hidden;
}

.dash-orb{
  position:fixed;
  border-radius:50%;
  filter:blur(90px);
  pointer-events:none;
  z-index:0;
  opacity:.18;
}
.dash-orb-a{
  width:520px;height:520px;
  top:-120px;right:-100px;
  background:radial-gradient(circle,#3b82f6,#7c3aed);
}
.dash-orb-b{
  width:400px;height:400px;
  bottom:80px;left:-80px;
  background:radial-gradient(circle,#22c55e,#0ea5e9);
}

/* Hero */
.dash-v2 .dash-hero{
  position:relative;z-index:1;
  display:grid;
  grid-template-columns:minmax(320px,1.6fr) repeat(3,minmax(180px,1fr));
  gap:12px;
  align-items:stretch;
}

.dash-v2 .dash-hero-card{
  display:flex;flex-direction:column;justify-content:center;gap:8px;
  padding:20px 26px;
  min-height:128px;
  border-radius:22px;
  border:1px solid #d7deeb;
  background:linear-gradient(120deg,rgba(255,255,255,.97) 0,rgba(240,248,255,.98) 100%);
  box-shadow:0 6px 20px rgba(15,45,90,.07);
}

.dash-v2 .dash-hero-card--title{
  grid-column:1;
}

.dash-v2 .dash-hero-card form{
  margin-top:0;
}

.dash-v2 .dash-hero-card .btn{
  min-width:110px;
}

.dash-v2 .dash-hero-card .btn.danger{
  width:auto;
  margin-top:0;
}

.dash-v2 .dash-hero-controls{
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:12px;
  padding:20px 26px;
  border-radius:22px;
  border:1px solid #d7deeb;
  background:#fff;
  box-shadow:0 6px 20px rgba(15,45,90,.07);
}

.dash-v2 .dash-kicker{
  margin:0;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:10px;
  font-weight:800;
  color:#3f5f9b;
}

.dash-v2 .dash-hero h1{
  margin:0;
  font-size:34px;
  letter-spacing:-.03em;
  color:#0d1830;
  line-height:1;
}

.dash-v2 .dash-notif-label{
  display:flex;align-items:center;gap:10px;
  font-size:13px;font-weight:600;color:#596d93;cursor:pointer;
}

.dash-v2 .dash-notif-label--tight{
  gap:6px;
}

/* ---- Toggle switch (global) ---- */
.dash-toggle-input{
  position:absolute;
  opacity:0;
  width:0;height:0;
  pointer-events:none;
}

.dash-toggle-track{
  position:relative;
  display:inline-flex;
  align-items:center;
  width:44px;height:24px;
  border-radius:999px;
  background:#cbd5e8;
  transition:background .2s ease;
  flex-shrink:0;
  cursor:pointer;
}

.dash-toggle-thumb{
  position:absolute;
  left:3px;
  width:18px;height:18px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.18);
  transition:left .2s ease;
}

.dash-toggle-input:checked + .dash-toggle-track{
  background:#3b82f6;
}

.dash-toggle-input:checked + .dash-toggle-track .dash-toggle-thumb{
  left:23px;
}

.dash-v2 .dash-live{
  display:flex;align-items:center;gap:7px;
  font-size:12px;font-weight:600;color:#596d93;
}

.dash-v2 .dash-live-dot{
  width:8px;height:8px;border-radius:50%;background:#22c55e;
  box-shadow:0 0 0 3px rgba(34,197,94,.2);
  display:inline-block;flex-shrink:0;
}

/* KPI cards */
.dash-v2 .dash-kpis{
  position:relative;z-index:1;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:14px;
}

.dash-v2 .dash-kpi{
  display:flex;flex-direction:column;gap:8px;
  padding:20px 22px;
  min-height:112px;
  border-radius:22px;
  border:1px solid #dae3f0;
  border-top:4px solid;
  background:#fff;
  box-shadow:0 6px 20px rgba(15,45,90,.06);
}
.dash-v2 .dash-kpi--blue  {border-top-color:#3b82f6}
.dash-v2 .dash-kpi--green {border-top-color:#22c55e}
.dash-v2 .dash-kpi--yellow{border-top-color:#f59e0b}
.dash-v2 .dash-kpi--red   {border-top-color:#ef4444}
.dash-v2 .dash-kpi--indigo{border-top-color:#6366f1}

.dash-v2 .dash-kpi-label{
  margin:0;
  font-size:11px;font-weight:800;
  text-transform:uppercase;letter-spacing:.08em;
  color:#6e7f9f;
}

.dash-v2 .dash-kpi strong{
  font-size:44px;font-weight:800;
  line-height:1;color:#0d1830;
}

/* Sector cards */
.dash-v2 .dash-sectors{
  position:relative;z-index:1;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;
}

.dash-v2 .dash-sector-card{
  display:flex;flex-direction:column;gap:6px;
  padding:16px 18px;
  border-radius:18px;
  border:1px solid #dbe4f0;
  border-left:4px solid var(--sc,#3b82f6);
  background:#fff;
  box-shadow:0 4px 14px rgba(15,45,90,.05);
}

.dash-v2 .dash-sector-card p{
  margin:0;
  font-size:11px;font-weight:800;
  text-transform:uppercase;letter-spacing:.07em;
  color:#6e7f9f;
}

.dash-v2 .dash-sector-card strong{
  font-size:32px;font-weight:800;
  line-height:1;color:#0d1830;
}

/* Main grid */
.dash-v2 .dash-grid{
  position:relative;z-index:1;
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(260px,1fr);
  gap:16px;
  align-items:start;
}

.dash-v2 .dash-panel{
  background:#fff;
  border-radius:24px;
  border:1px solid #dbe4f0;
  box-shadow:0 8px 26px rgba(15,45,90,.07);
  overflow:hidden;
}

.dash-v2 .dash-panel-head{
  display:flex;align-items:flex-start;justify-content:space-between;
  padding:20px 22px 14px;
  border-bottom:1px solid #eef2f8;
}

.dash-v2 .dash-panel-head h2{
  margin:0;
  font-size:17px;font-weight:800;color:#0d1830;
}

.dash-v2 .dash-panel-head p{
  margin:4px 0 0;
  font-size:12px;color:#6e7f9f;
}

/* Table */
.dash-v2 .dash-table-wrap{overflow-x:auto}

.dash-v2 .dash-table{
  width:100%;border-collapse:collapse;min-width:700px;
}

.dash-v2 .dash-table th{
  padding:11px 16px;
  font-size:11px;font-weight:800;
  text-transform:uppercase;letter-spacing:.07em;
  color:#8898b3;
  border-bottom:1px solid #eef2f8;
  background:#fafbfd;
  white-space:nowrap;
}

.dash-v2 .dash-table td{
  padding:13px 16px;
  border-bottom:1px solid #f2f5fb;
  vertical-align:middle;
  font-size:14px;color:#1e3254;
}

.dash-v2 .dash-table tbody tr:last-child td{border-bottom:none}

.dash-v2 .dash-table tbody tr:hover td{background:#f7faff}

.dash-v2 .dash-protocol a{
  font-weight:700;color:#2e6cec;
  font-size:13px;letter-spacing:-.01em;
}

.dash-v2 .dash-protocol a:hover{text-decoration:underline}

.dash-v2 .dash-setor-chip{
  display:inline-flex;align-items:center;
  padding:3px 10px;border-radius:999px;
  background:#eef3ff;color:#2e55a0;
  font-size:12px;font-weight:700;
}

.dash-v2 .dash-muted{color:#8898b3;font-size:13px}

.dash-v2 .dash-wait-badge{
  display:inline-flex;align-items:center;
  padding:3px 10px;border-radius:999px;
  background:#f0fdf4;color:#166534;
  font-size:12px;font-weight:700;
}

.dash-v2 .dash-empty{
  padding:24px;text-align:center;
  color:#8898b3;font-size:14px;
}

/* Team */
.dash-v2 .dash-team{
  display:flex;flex-direction:column;
  padding:8px 0;
}

.dash-v2 .dash-team-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 22px;
  border-bottom:1px solid #f2f5fb;
}
.dash-v2 .dash-team-item:last-child{border-bottom:none}

.dash-v2 .dash-team-avatar{
  width:36px;height:36px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#3b82f6,#6366f1);
  color:#fff;font-size:14px;font-weight:800;
}

.dash-v2 .dash-team-info{
  flex:1;min-width:0;
  display:flex;flex-direction:column;gap:2px;
}

.dash-v2 .dash-team-info strong{
  font-size:14px;font-weight:700;color:#0d1830;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

.dash-v2 .dash-team-info span{
  font-size:12px;color:#8898b3;
}

@media (max-width:1200px){
  .dash-v2 .dash-hero{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-v2 .dash-hero-card--title{grid-column:1 / -1}
  .dash-v2 .dash-kpis{grid-template-columns:repeat(3,1fr)}
  .dash-v2 .dash-grid{grid-template-columns:1fr}
}

@media (max-width:1360px){
  .atendimento-v2 .v2-workspace{grid-template-columns:1fr}
  .atendimento-v2 .v2-head-card--protocol{min-width:unset}
}

@media (max-width:760px){
  .dash-v2 .dash-hero{grid-template-columns:1fr}
  .dash-v2 .dash-hero-card{min-height:unset}
  .dash-v2 .dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-v2 .dash-hero h1{font-size:26px}
  .dash-v2 .dash-hero-card{padding:16px}
  .dash-v2 .dash-notif-label{font-size:12px}
  .atendimento-v2 .whatsapp-messages{max-height:52vh}
}

@media (max-width:640px){
  .atendimento-v2 .v2-composer{grid-template-columns:minmax(0,1fr) 46px 46px 46px}
  .atendimento-v2 .v2-icon-btn.image{width:46px;letter-spacing:.02em}
}

