@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,400;6..144,500;6..144,600;6..144,700&display=swap');
:root{
  --blue:#2563eb;--blue2:#1749c6;--blueSoft:#edf4ff;--bg:#eef2f7;--panel:#fff;
  --line:#dde4ee;--lineStrong:#ccd6e4;--text:#152033;--muted:#6f7c90;--green:#1faa59;
  --sidebar:350px;--contact:340px;--top:58px;--footer:28px;--radius:14px;
  --shadow:0 8px 26px rgba(35,53,82,.09);--shadowSoft:0 3px 12px rgba(35,53,82,.07)
}
*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:"Google Sans Flex","Google Sans","Product Sans","Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg);font-size:15px;overflow:hidden;-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit}button{font-family:inherit}.topbar{height:var(--top);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:flex-end;padding:0 20px;background:#fff;position:relative;z-index:20;box-shadow:0 1px 0 rgba(30,50,80,.02)}.top-actions{display:flex;align-items:center;gap:7px}.link-btn{border:0;background:#f5f7fa;color:#435168;text-decoration:none;cursor:pointer;padding:9px 13px;border-radius:10px;font-weight:650}.link-btn:hover{background:#eaf1fb;color:#173c78}.app-shell{height:calc(100dvh - var(--top) - var(--footer));display:grid;grid-template-columns:var(--sidebar) minmax(540px,1fr) var(--contact);overflow:hidden;background:#fff}.sidebar{border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0;background:#fff;min-height:0}.side-head{display:flex;align-items:center;justify-content:space-between;padding:17px 16px 11px}.side-head h2{font-size:21px;margin:0;letter-spacing:-.35px}.primary{background:linear-gradient(180deg,#2e6ff3,#245fd8);color:#fff;border:0;border-radius:11px;padding:10px 16px;cursor:pointer;font-weight:700;box-shadow:0 4px 12px rgba(37,99,235,.22)}.primary:hover{background:linear-gradient(180deg,#2865e5,#1f54c4)}.primary.small,.ghost.small{padding:8px 11px;font-size:13px}.wide{width:100%}.search{margin:0 16px 11px;border:1px solid var(--line);border-radius:12px;padding:11px 13px;outline:none;background:#f7f9fc;color:var(--text);font-size:14px}.search:focus{border-color:#aec6f4;background:#fff;box-shadow:0 0 0 4px #eff5ff}.clinic-tabs,.channel-tabs,.settings-tabs{display:flex;gap:7px;overflow:auto;scrollbar-width:none}.clinic-tabs::-webkit-scrollbar,.channel-tabs::-webkit-scrollbar,.settings-tabs::-webkit-scrollbar{display:none}.clinic-tabs{padding:0 16px 12px;border-bottom:1px solid var(--line)}.tab{border:0;background:transparent;padding:9px 11px;border-radius:10px;cursor:pointer;white-space:nowrap;color:#65748a;font-weight:650;font-size:13px}.tab:hover{background:#f1f4f8;color:#23334b}.tab.active{background:var(--blueSoft);color:#1959c7;box-shadow:inset 0 0 0 1px #dbe8ff}.chat-list{overflow:auto;min-height:0}.chat-item{display:grid;grid-template-columns:46px minmax(0,1fr) 10px;gap:11px;padding:13px 16px;border-bottom:1px solid #edf0f4;text-decoration:none;color:inherit;position:relative;transition:.15s}.chat-item:hover{background:#f8faff}.chat-item.selected{background:linear-gradient(90deg,#edf4ff,#f7faff)}.chat-item.selected:before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:4px;border-radius:0 4px 4px 0;background:var(--blue)}.avatar{width:44px;height:44px;border-radius:14px;background:linear-gradient(145deg,#dfeaff,#eef4ff);display:flex;align-items:center;justify-content:center;font-weight:800;color:#315fa8;font-size:17px;box-shadow:inset 0 0 0 1px #d8e5fb}.avatar.large{width:56px;height:56px;border-radius:17px;font-size:21px}.chat-main{min-width:0}.chat-row{display:flex;justify-content:space-between;align-items:center;gap:9px;line-height:1.25}.chat-row b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-row span{color:#929dad;font-size:12px}.preview{color:#647287;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:5px 0 8px;font-size:13px}.badges{display:flex;gap:6px;align-items:center;min-width:0}.clinic-badge,.clinic-chip,.primary-label,.status-pill{font-size:11px;padding:4px 7px;border-radius:8px;background:#f0f3f7;color:#607086;white-space:nowrap;font-weight:600}.clinic-badge{max-width:150px;overflow:hidden;text-overflow:ellipsis}.channel-badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;padding:4px 7px;border-radius:8px;font-weight:700;white-space:nowrap}.channel-badge.whatsapp{background:#e8f9ef;color:#147c42}.channel-badge.telegram{background:#e8f5ff;color:#1879b5}.channel-badge.max{background:#eeebff;color:#5c47c7}.channel-badge.site{background:#edf1f5;color:#586a80}.unread-dot{width:9px;height:9px;border-radius:50%;background:var(--blue);color:transparent;margin-top:6px;box-shadow:0 0 0 3px #e5efff}.channel-icon{display:inline-flex;width:22px;height:22px;align-items:center;justify-content:center;border-radius:7px;vertical-align:middle;flex:0 0 auto}.channel-icon svg{width:14px;height:14px;display:block}.channel-icon.whatsapp{background:#e4f8ec;color:#119c4d}.channel-icon.telegram{background:#e4f5ff;color:#1696d2}.channel-icon.max{background:#ece8ff;color:#5f4bd4;font-weight:900;font-size:12px}.channel-icon.site{background:#edf1f5;color:#607083}.chat-pane{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;background:#f4f7fb;min-width:0;min-height:0;overflow:hidden}.chat-header{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 20px}.chat-title{display:flex;align-items:center;gap:12px;min-width:0}.chat-header h2,.contact-head h2{margin:0 0 3px;font-size:20px;letter-spacing:-.3px}.muted{color:var(--muted);font-size:13px}.status-pill{background:#e8f8ee;color:#257848;font-weight:700;padding:6px 10px}.channel-tabs{padding:9px 16px;background:#fff;border-bottom:1px solid var(--line);min-height:50px}.channel-tabs .tab{display:flex;align-items:center;gap:6px}.channel-tabs .tab.active{background:#edf4ff}.message-list{min-height:0;overflow:auto;padding:20px 22px 16px;display:flex;flex-direction:column;gap:10px;scroll-behavior:auto;background:radial-gradient(circle at 50% 0,#fbfdff 0,#f4f7fb 55%)}.message{max-width:72%;padding:12px 14px;border-radius:15px;background:#fff;box-shadow:var(--shadowSoft);border:1px solid #e5eaf1;cursor:default}.message:hover{border-color:#d3dce8}.message.in{align-self:flex-start;cursor:pointer}.message.in:hover{box-shadow:0 5px 16px rgba(35,53,82,.11)}.message.out{align-self:flex-end;background:#e7f1ff;border-color:#d0e1f8}.msg-meta{display:flex;align-items:center;gap:6px;font-size:11px;color:#697b92;margin-bottom:7px;line-height:22px;font-weight:600}.msg-meta .channel-icon{width:19px;height:19px;border-radius:6px}.msg-meta .channel-icon svg{width:12px;height:12px}.msg-text{line-height:1.45;font-size:15px;white-space:normal}.msg-foot{display:flex;justify-content:flex-end;align-items:center;gap:6px;margin-top:6px;font-size:11px;color:#7f8da0}.edit-msg{border:0;background:transparent;cursor:pointer;color:#667991;padding:2px 4px;border-radius:5px}.edit-msg:hover{background:rgba(255,255,255,.8);color:#263b58}.composer{background:#fff;border-top:1px solid var(--line);padding:10px 14px 12px;position:relative;z-index:8;box-shadow:0 -5px 20px rgba(40,57,83,.04)}.reply-route-wrap{position:relative;margin-bottom:8px}.reply-route-button{width:100%;border:1px solid #dce4ef;background:#f6f9fd;color:#40516a;border-radius:10px;padding:8px 11px;display:flex;align-items:center;gap:8px;cursor:pointer;text-align:left;font-size:12px;font-weight:650}.reply-route-button:hover{background:#eef4fc;border-color:#cddbef}.reply-route-dot{width:8px;height:8px;border-radius:50%;background:#27a85b;box-shadow:0 0 0 3px #e3f6ea;flex:0 0 auto}.reply-route-chevron{margin-left:auto;color:#738198;font-size:13px}.reply-route-menu{display:none;position:absolute;left:0;bottom:calc(100% + 7px);width:min(520px,100%);background:#fff;border:1px solid var(--lineStrong);border-radius:14px;padding:14px;box-shadow:0 18px 45px rgba(28,48,78,.2);z-index:30}.reply-route-menu.open{display:grid;grid-template-columns:1fr 1fr;gap:10px}.reply-route-menu .route-menu-title{grid-column:1/-1;font-size:15px;font-weight:750;color:#26364d;margin-bottom:1px}.reply-route-menu label{font-size:11px;color:#758296;font-weight:700;display:flex;flex-direction:column;gap:5px}.reply-route-menu label:nth-of-type(3){grid-column:1/-1}.route-select{width:100%;height:39px;border:1px solid var(--line);background:#f8fafc;border-radius:10px;padding:0 34px 0 10px;color:#28394f;outline:none;font-size:13px}.route-select:focus{border-color:#a9c3f1;background:#fff;box-shadow:0 0 0 3px #eff5ff}.route-apply{grid-column:1/-1;justify-self:end;padding:9px 18px}.compose-row{background:#fff;border:1px solid var(--lineStrong);border-radius:14px;display:grid;grid-template-columns:42px 42px minmax(0,1fr) 48px;align-items:end;padding:6px;box-shadow:0 4px 15px rgba(30,50,80,.05)}.compose-row:focus-within{border-color:#adc4ef;box-shadow:0 0 0 4px #eff5ff}.compose-row textarea{border:0;resize:none;min-height:44px;max-height:120px;outline:none;padding:11px 8px;background:transparent;line-height:21px;font-size:15px}.emoji,.attach{border:0;background:transparent;font-size:21px;cursor:pointer;color:#6e7d92;height:44px;border-radius:10px}.emoji:hover,.attach:hover{background:#f0f4f9}.send-btn{border:0;background:linear-gradient(180deg,#2e6ff3,#235bd1);color:white;border-radius:11px;height:44px;cursor:pointer;font-size:19px;box-shadow:0 4px 10px rgba(37,99,235,.22)}.send-btn:hover{background:#1f55c3}.contact-pane{border-left:1px solid var(--line);overflow:auto;background:#fff;min-height:0}.contact-head{padding:18px;display:flex;gap:12px;align-items:center;border-bottom:1px solid var(--line)}.contact-pane section{padding:16px 18px;border-bottom:1px solid var(--line)}.contact-pane h3{margin:0 0 11px;font-size:12px;text-transform:uppercase;letter-spacing:.055em;color:#758397}.phone-row,.channel-row,.operator-row{display:flex;justify-content:space-between;align-items:center;gap:9px;padding:7px 0}.phone-row>span:first-child{font-size:14px}.channel-row{min-height:42px}.channel-name{display:flex;align-items:center;gap:8px;font-weight:700;color:#33445a;font-size:14px}.edit-channel{border:1px solid #e2e8f0;background:#f7f9fc;color:#465a73;cursor:pointer;text-align:right;padding:8px 10px;border-radius:9px;max-width:185px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;font-weight:600}.edit-channel:hover{background:#edf4ff;color:#1959c7;border-color:#ceddf5}.channel-empty{color:#8e99a8}.text-action{border:0;background:transparent;color:#1d62d5;padding:7px 0;cursor:pointer;font-size:13px;font-weight:700}.clinic-chip{display:inline-block;margin:2px;padding:5px 8px}.note-area{width:100%;border:1px solid var(--line);border-radius:10px;padding:10px;min-height:78px;resize:vertical;margin-bottom:8px;background:#fafbfd;outline:none;font-size:13px}.note-area:focus{border-color:#adc4ef;background:#fff;box-shadow:0 0 0 3px #eff5ff}.footer{height:var(--footer);border-top:1px solid var(--line);display:flex;justify-content:center;align-items:center;font-size:11px;color:#8590a1;background:#fff}.login-page{min-height:100vh;background:var(--bg);display:flex;align-items:center;justify-content:center;overflow:auto}.login-card{width:390px;background:#fff;padding:32px;border-radius:20px;box-shadow:0 18px 50px rgba(26,45,74,.14)}.login-card h1{margin:12px 0 5px;font-size:25px}.login-card p{margin:0 0 22px;color:var(--muted)}.brand-mark{width:50px;height:50px;border-radius:15px;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:23px;box-shadow:0 8px 20px rgba(37,99,235,.22)}.login-card label,.modal label{display:block;font-weight:650;margin:13px 0}.login-card input,.modal input{width:100%;margin-top:6px;border:1px solid var(--line);border-radius:10px;padding:11px;outline:none}.demo-note{margin-top:17px;padding:12px;background:#f6f8fb;border-radius:10px;font-size:12px;line-height:1.7}.alert.error{background:#fff0f0;color:#a52a2a;padding:10px;border-radius:9px;margin-bottom:12px}.ghost{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px 11px;cursor:pointer;color:#506077}.ghost:hover{background:#f3f6fa}.modal{position:fixed;inset:0;background:rgba(13,26,45,.45);display:none;align-items:center;justify-content:center;z-index:40;padding:20px}.modal.open{display:flex}.modal-card{background:#fff;width:520px;max-width:95vw;max-height:90vh;overflow:auto;border-radius:18px;padding:24px;position:relative;box-shadow:0 28px 80px rgba(20,38,65,.25)}.wide-modal{width:850px}.modal-card h2{margin-top:0;font-size:21px}.modal-close{position:absolute;right:14px;top:11px;border:0;background:transparent;font-size:24px;cursor:pointer;color:#748298}.settings-tabs{padding:0 0 11px;border-bottom:1px solid var(--line);margin-bottom:14px}.hidden{display:none!important}.two-col{display:grid;grid-template-columns:1.1fr .9fr;gap:30px}.checks label{font-weight:400;margin:9px 0}.checks input{width:auto;margin:0}.hint{color:#64748a;background:#f5f8fc;padding:11px;border-radius:10px}.big-textarea{width:100%;min-height:150px;border:1px solid var(--line);border-radius:11px;padding:11px;margin:10px 0}.toast{position:fixed;right:18px;bottom:42px;background:#172033;color:#fff;padding:11px 14px;border-radius:10px;opacity:0;transform:translateY(10px);transition:.2s;z-index:50;box-shadow:var(--shadow)}.toast.show{opacity:1;transform:none}.toast.error{background:#a43131}.empty{margin:auto;color:var(--muted)}code{background:#f0f2f6;padding:2px 5px;border-radius:4px}.modal-select{width:100%;margin-top:6px;border:1px solid var(--line);border-radius:10px;padding:11px;background:#fff}.operator-actions{display:flex;gap:6px}.number-choice{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;margin:7px 0;border:1px solid var(--line);background:#fff;border-radius:10px;cursor:pointer;text-align:left;font-size:14px}.number-choice:hover{background:#f6f9fd;border-color:#c9d8ef}.number-choice.active{background:#edf4ff;border-color:#abc5f2;color:#174ea6;box-shadow:inset 0 0 0 1px #d5e5ff}.number-choice .check{font-weight:900}.channel-modal-current{font-size:12px;color:#718096;margin:-3px 0 11px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
@media(max-width:1280px){:root{--sidebar:320px;--contact:310px}.message{max-width:80%}}
@media(max-width:1050px){.app-shell{grid-template-columns:300px minmax(0,1fr)}.contact-pane{display:none}}
@media(max-width:760px){body{overflow:auto}.app-shell{height:calc(100dvh - var(--top) - var(--footer));grid-template-columns:1fr}.sidebar{display:none}.message{max-width:92%}.two-col{grid-template-columns:1fr}.reply-route-menu.open{grid-template-columns:1fr}.reply-route-menu label:nth-of-type(3),.route-apply,.reply-route-menu .route-menu-title{grid-column:1}.chat-header{padding:0 12px}.message-list{padding:14px 12px}.composer{padding:8px}}

/* v0.6 workflow additions */
.top-title{margin-right:auto;font-size:18px;font-weight:800;letter-spacing:-.25px;color:#1d2b40}.side-role{display:block;margin-top:3px;color:#8995a6;font-size:12px}.queue-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0 14px 12px;border-bottom:1px solid var(--line)}.queue-tab{display:flex;justify-content:center;align-items:center;text-align:center;min-height:38px;padding:7px 6px;border-radius:10px;text-decoration:none;color:#65748a;font-size:12px;font-weight:750;background:#f7f9fc;border:1px solid transparent}.queue-tab:hover{background:#eff4fb;color:#2d4668}.queue-tab.active{background:#eaf2ff;color:#1959c7;border-color:#d3e2fb}.owner-mini{margin-top:6px;color:#748399;font-size:11px;font-weight:650}.return-badge{font-size:10px;padding:4px 6px;border-radius:7px;background:#fff0ef;color:#b4483d;font-weight:750}.chat-state{display:flex;gap:7px;align-items:center}.status-pill.neutral{background:#f2f5f9;color:#67768a}.lock-pill{background:#fff3df;color:#9b6412;border:1px solid #f0d8ad;border-radius:9px;padding:7px 10px;font-size:12px;font-weight:750}.live-claim{margin-right:6px}.internal-event{align-self:center;max-width:82%;background:#f3f5f8;border:1px dashed #cbd5e1;border-radius:12px;padding:9px 12px;color:#5d6b7d;font-size:12px;line-height:1.45;text-align:left}.internal-event.comment{background:#fff8df;border-color:#ecd897;color:#67592b}.internal-event b{display:block;color:#39495f;margin-bottom:2px}.internal-event span{display:block;font-size:10px;color:#8994a4;margin-bottom:4px}.composer-actions{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:7px;align-items:center;margin-bottom:8px}.composer-actions .reply-route-wrap{margin:0}.action-chip{height:37px;border:1px solid #dce4ef;border-radius:10px;background:#f7f9fc;color:#45576f;padding:0 11px;cursor:pointer;font-weight:700;font-size:12px;white-space:nowrap}.action-chip:hover{background:#edf3fb;border-color:#cad8eb}.action-chip.transfer{color:#1b5fc5;background:#eef5ff}.action-chip.finish{color:#23744a;background:#edf9f1}.observer-banner,.locked-composer{border-radius:11px;padding:12px 14px;font-size:13px}.observer-banner{background:#eef4ff;color:#3e5e8c;border:1px solid #d9e7fb}.locked-composer{background:#fff5e8;color:#7a5a25;border:1px solid #f1dfc1}.detail-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;font-size:13px}.detail-row span{color:#7a8798}.return-note{margin-top:9px;padding:9px;background:#fff1ef;color:#a74c43;border-radius:9px;font-size:12px}.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.result-choice{border:1px solid var(--line);background:#f7f9fc;border-radius:12px;padding:14px;cursor:pointer;font-weight:750;color:#42536a}.result-choice:hover{background:#edf4ff;color:#1d5bc0;border-color:#cbdcf6}.send-btn:disabled,.compose-row textarea:disabled{opacity:.5;cursor:not-allowed}

/* Statistics */
.stats-page{height:calc(100dvh - var(--top) - var(--footer));overflow:auto;padding:28px 34px 42px;background:#f3f6fa}.stats-head{max-width:1500px;margin:0 auto 18px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.stats-head h1{margin:0;font-size:29px;letter-spacing:-.6px}.stats-head p{margin:6px 0 0;color:var(--muted)}.date-filter{display:flex;gap:10px;align-items:flex-end;background:#fff;padding:12px;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadowSoft)}.date-filter label{display:flex;flex-direction:column;gap:5px;color:#748197;font-size:11px;font-weight:750}.date-filter input{height:38px;border:1px solid var(--line);border-radius:9px;padding:0 10px;color:#29394f}.stat-cards{max-width:1500px;margin:0 auto 18px;display:grid;grid-template-columns:repeat(6,minmax(140px,1fr));gap:10px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:16px;box-shadow:var(--shadowSoft)}.stat-card span{display:block;color:#748197;font-size:12px;font-weight:700;margin-bottom:7px}.stat-card b{font-size:25px;letter-spacing:-.5px}.stat-card.danger{border-color:#f1d5d2;background:#fffafa}.stat-card.warn{border-color:#f1e1bd;background:#fffdf6}.stat-card.good{border-color:#d4ebdc;background:#fbfffc}.stats-table-wrap{max-width:1500px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:auto;box-shadow:var(--shadowSoft)}.stats-table{width:100%;border-collapse:collapse;min-width:1050px}.stats-table th,.stats-table td{padding:13px 14px;border-bottom:1px solid #edf0f4;text-align:left;font-size:13px}.stats-table th{background:#f7f9fc;color:#69778c;font-size:11px;text-transform:uppercase;letter-spacing:.03em;position:sticky;top:0}.stats-table tr:hover td{background:#fafcff}.num-danger{color:#b44038;font-weight:800}.num-warn{color:#9c6a18;font-weight:800}

@media(max-width:1350px){.composer-actions{grid-template-columns:minmax(0,1fr) auto auto}.action-chip.finish{grid-column:2/4}.stat-cards{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.stats-head{align-items:stretch;flex-direction:column}.date-filter{align-self:stretch}.stat-cards{grid-template-columns:repeat(2,1fr)}.composer-actions{grid-template-columns:1fr 1fr}.composer-actions .reply-route-wrap{grid-column:1/-1}.action-chip.finish{grid-column:auto}}
.response-timer{margin-top:6px;font-size:11px;font-weight:750;color:#976918;background:#fff8e8;border-radius:7px;padding:4px 7px;width:max-content}.response-timer.urgent{color:#b23e34;background:#fff0ef}.missed-mini{margin-top:6px;font-size:11px;font-weight:800;color:#b0443b}

/* v0.7 clarity and workflow fixes */
.queue-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;margin-left:5px;border-radius:999px;background:#dce9ff;color:#174ea6;font-size:11px;font-weight:800;line-height:1}.queue-tab.active .queue-count{background:#cfe0ff}.internal-event.system-event{background:#f4f7fb;border-style:solid;border-color:#dbe3ee;color:#53657d}.internal-event.system-event b{color:#2f425d}.internal-event.comment{background:#fff8df;border-style:solid;border-color:#ead494}.internal-event.comment b{color:#625326}.stats-section{max-width:1500px;margin:0 auto 18px}.stats-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin:0 2px 10px}.stats-section-head h2{margin:0;font-size:19px;letter-spacing:-.25px}.stats-section-head span{color:#7a8798;font-size:12px;text-align:right}.stats-table-units{min-width:900px}.missed-mini{display:inline-flex;align-items:center;max-width:100%;padding:5px 8px;border-radius:8px;background:#fff0ef}.response-timer{display:inline-flex;align-items:center}.modal #commentScope{margin-bottom:4px}
@media(max-width:900px){.stats-section-head{align-items:flex-start;flex-direction:column}.stats-section-head span{text-align:left}}

/* v0.8 — Telegram-like visual system and layout cleanup */
:root{
  --rail:86px;
  --sidebar:326px;
  --contact:332px;
  --top:60px;
  --footer:26px;
  --text:#172033;
  --muted:#758196;
  --line:#e2e7ee;
  --lineStrong:#d6dde7;
  --bg:#f4f6f9;
  --blue:#2f6fed;
  --blueSoft:#edf4ff;
  --shadowSoft:0 1px 2px rgba(24,39,60,.04);
}
body{font-size:14px;font-weight:400;background:#fff}
.topbar{height:var(--top);padding:0 18px;border-color:var(--line);box-shadow:none}
.top-title{display:flex;align-items:center;gap:10px;margin-right:auto;font-size:16px;font-weight:600;letter-spacing:-.1px;color:#172033}
.app-logo{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:11px;background:linear-gradient(145deg,#4c86f7,#2765e7);color:#fff;font-size:16px;box-shadow:0 4px 10px rgba(47,111,237,.18)}
.top-actions{gap:6px}
.link-btn{padding:8px 11px;border-radius:9px;font-size:13px;font-weight:500;background:#f5f7fa;color:#475569}
.link-btn:hover{background:#edf2f8;color:#1f3b63}
.app-shell{height:calc(100dvh - var(--top) - var(--footer));grid-template-columns:var(--rail) var(--sidebar) minmax(470px,1fr) var(--contact);background:#fff}

.nav-rail{display:flex;flex-direction:column;min-width:0;border-right:1px solid var(--line);background:#f8fafc;padding:12px 8px 10px;overflow:hidden}
.nav-rail-main{display:flex;flex-direction:column;gap:5px}
.nav-item{position:relative;display:flex;min-height:58px;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:7px 4px;border-radius:12px;color:#607086;text-decoration:none;font-size:10px;font-weight:500;text-align:center;transition:background .15s,color .15s}
.nav-item:hover{background:#eef3f8;color:#30445f}
.nav-item.active{background:#e8f1ff;color:#1d5fd0}
.nav-icon{width:22px;height:22px;display:flex;align-items:center;justify-content:center}
.nav-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-label{max-width:70px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-count{position:absolute;right:5px;top:5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;display:flex;align-items:center;justify-content:center;background:#fff;color:#3a5f92;border:1px solid #dce5f1;font-size:9px;font-weight:600;line-height:1}
.nav-item.active .nav-count{background:#2f6fed;color:#fff;border-color:#2f6fed}
.nav-rail-user{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 3px 2px;color:#5d6c80;text-align:center}
.nav-rail-user>div{min-width:0;max-width:76px}
.nav-rail-user b{display:block;font-size:10px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-rail-user span:not(.user-presence){display:block;margin-top:2px;font-size:9px;color:#929cad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-presence{width:9px;height:9px;border-radius:50%;background:#27b466;box-shadow:0 0 0 3px #e4f6eb}

.sidebar{background:#fff;border-color:var(--line)}
.side-head{padding:15px 16px 9px}
.side-title-block{min-width:0}
.side-title-row{display:flex;align-items:center;gap:8px}
.side-head h2{font-size:17px;font-weight:600;letter-spacing:-.1px;line-height:1.2}
.side-count{min-width:24px;height:24px;padding:0 7px;border-radius:8px;background:#f0f3f7;color:#65758b;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:500}
.side-role{margin-top:4px;font-size:11px;color:#8a95a5;font-weight:400}
.search-wrap{position:relative;margin:0 14px 12px}
.search-icon{position:absolute;left:11px;top:50%;transform:translateY(-50%);z-index:1;color:#8491a3;font-size:18px;line-height:1;pointer-events:none}
.search{width:100%;margin:0;padding:10px 12px 10px 34px;border-radius:11px;background:#f4f6f9;border-color:#e5e9ef;font-size:13px}
.search:focus{background:#fff;border-color:#bcd0f2;box-shadow:0 0 0 3px #eff5ff}
.chat-list{border-top:1px solid #f0f2f5}
.chat-item{grid-template-columns:44px minmax(0,1fr) 8px;gap:10px;padding:11px 13px;border-bottom:0;min-height:82px;align-items:start}
.chat-item+.chat-item{border-top:1px solid #f0f2f5}
.chat-item:hover{background:#f7f9fc}
.chat-item.selected{background:#eaf2ff}
.chat-item.selected:before{top:8px;bottom:8px;width:3px;background:#2f6fed}
.avatar{width:42px;height:42px;border-radius:50%;font-size:15px;font-weight:600;box-shadow:none;background:#eaf1fb;color:#3564a6}
.avatar.large{width:48px;height:48px;border-radius:50%;font-size:17px}
.chat-row{gap:7px}
.chat-row b{font-size:14px;font-weight:600;color:#1d2736}
.chat-row span{font-size:11px;color:#8f99a8}
.preview{font-size:12.5px;margin:4px 0 6px;color:#69788c}
.badges{gap:5px;flex-wrap:wrap}
.clinic-badge,.channel-badge,.return-badge{font-size:10px;font-weight:500;padding:3px 6px;border-radius:7px}
.clinic-badge{max-width:128px;background:#f1f3f6;color:#6c7a8c}
.owner-mini,.response-timer,.missed-mini{font-size:10px;font-weight:500;margin-top:5px}
.response-timer,.missed-mini{padding:3px 6px;border-radius:7px}
.unread-dot{width:8px;height:8px;margin-top:7px;box-shadow:0 0 0 2px #dfeaff}

.chat-pane{grid-template-rows:auto auto minmax(0,1fr) auto;background:#f4f6f9}
.chat-header{height:68px;padding:0 17px;background:#fff}
.chat-title{gap:10px}
.chat-header h2,.contact-head h2{font-size:17px;font-weight:600;letter-spacing:-.1px;margin:0 0 2px}
.muted{font-size:11.5px;color:#7d8999;font-weight:400}
.chat-state{gap:5px}
.status-pill,.lock-pill{font-size:11px;font-weight:500;padding:6px 9px;border-radius:9px}
.channel-tabs{min-height:46px;padding:7px 14px;gap:4px}
.channel-tabs .tab{padding:8px 10px;font-size:12px;font-weight:500;border-radius:9px;color:#52637a}
.channel-tabs .tab.active{background:#e8f1ff;color:#1b5fcf;box-shadow:none}
.channel-icon{width:20px;height:20px;border-radius:50%;font-size:11px;font-weight:600}
.channel-icon svg{width:12px;height:12px}

.message-list{padding:18px 20px 14px;gap:8px;background:linear-gradient(180deg,#f7f9fc 0,#f4f6f9 100%)}
.message{max-width:min(72%,680px);padding:10px 12px;border-radius:14px;border-color:#e6eaf0;box-shadow:0 1px 2px rgba(32,47,67,.04)}
.message.in{border-bottom-left-radius:5px}
.message.out{border-bottom-right-radius:5px;background:#e5f0ff;border-color:#d7e5f7}
.message:hover{border-color:#d7dde6}
.msg-meta{font-size:10.5px;font-weight:500;margin-bottom:5px;gap:5px;line-height:18px;color:#718096}
.msg-meta .channel-icon{width:17px;height:17px}
.msg-text{font-size:14px;line-height:1.42;color:#1d2735}
.msg-foot{font-size:10.5px;margin-top:5px;color:#8793a3}
.internal-event{max-width:76%;padding:8px 11px;border-radius:11px;font-size:11px;line-height:1.4;box-shadow:none}
.internal-event b{font-size:11px;font-weight:600}
.internal-event span{font-size:9.5px}
.internal-event.comment{background:#fff8df;border-color:#ead8a4}
.internal-event.system-event{background:#f3f5f8;border-color:#dde3ea}

.composer{padding:8px 12px 10px;box-shadow:0 -1px 0 rgba(31,45,62,.04);border-top-color:#e4e8ee}
.composer-actions{grid-template-columns:minmax(0,1fr) auto auto auto;gap:6px;margin-bottom:7px}
.reply-route-wrap{margin-bottom:0}
.reply-route-button{min-height:35px;padding:7px 10px;border-radius:10px;font-size:11.5px;font-weight:500;background:#f5f7fa;border-color:#e1e6ed;color:#46576d}
.reply-route-dot{width:7px;height:7px;box-shadow:0 0 0 2px #e3f6ea}
.reply-route-menu{width:min(500px,calc(100vw - 30px));padding:13px;border-radius:13px}
.reply-route-menu .route-menu-title{font-size:14px;font-weight:600}
.reply-route-menu label{font-size:10.5px;font-weight:500}
.route-select{height:38px;font-size:12.5px}
.action-chip{height:35px;padding:0 10px;font-size:11.5px;font-weight:500;border-radius:9px}
.compose-row{grid-template-columns:38px 38px minmax(0,1fr) 45px;padding:5px;border-radius:13px;box-shadow:none;background:#fff}
.compose-row textarea{min-height:42px;padding:10px 7px;font-size:14px;line-height:20px}
.emoji,.attach{height:42px;font-size:18px}
.send-btn{height:42px;border-radius:10px;font-size:18px;box-shadow:0 3px 8px rgba(47,111,237,.18)}
.observer-banner,.locked-composer{font-size:12px;padding:10px 12px;border-radius:10px}

.contact-pane{background:#fff;border-color:var(--line)}
.contact-head{padding:16px 15px;gap:10px}
.contact-eyebrow{display:block;margin-bottom:2px;color:#9aa3af;font-size:9px;font-weight:500;text-transform:uppercase;letter-spacing:.06em}
.contact-pane section{padding:14px 15px;border-color:#edf0f3}
.contact-pane h3{margin:0 0 10px;font-size:10px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:#8792a2}
.phone-row,.channel-row,.detail-row{font-size:12.5px;padding:6px 0}
.phone-row>span:first-child,.channel-name{color:#334155;font-weight:500}
.primary-label{font-size:9.5px;font-weight:500}
.edit-channel{font-size:11.5px;font-weight:500;background:#f4f6f9;border:1px solid #e3e7ed;border-radius:9px;padding:7px 9px;color:#41536b}
.edit-channel:hover{background:#edf3fa}
.text-action{font-size:12px;font-weight:500}
.note-area{font-size:12.5px;min-height:86px;border-radius:10px;background:#fafbfc}
.detail-row b{font-weight:600;color:#2b3748}
.return-note{font-size:11px}
.ghost{font-weight:500}
.primary{font-weight:600}

.footer{height:var(--footer);font-size:10px;color:#98a2b1;background:#fff;border-color:#edf0f3}

/* Modal typography: quieter hierarchy, clearer controls */
.modal-card{border-radius:16px;padding:21px;box-shadow:0 24px 70px rgba(24,39,60,.22)}
.modal-card h2{font-size:18px;font-weight:600;letter-spacing:-.1px}
.modal-card h3{font-size:14px;font-weight:600}
.modal-card label{font-weight:500}
.number-choice{font-size:13px;font-weight:400}
.result-choice{font-weight:500}
.settings-tabs .tab{font-weight:500}
.operator-row b{font-weight:600}

/* Statistics: reduce oversized bold typography while preserving scanability */
.stats-page{padding:24px 28px 38px;background:#f5f7fa}
.stats-head h1{font-size:23px;font-weight:600;letter-spacing:-.2px}
.stats-head p{font-size:13px}
.stat-card{padding:14px;border-radius:13px;box-shadow:none}
.stat-card span{font-size:11px;font-weight:500}
.stat-card b{font-size:22px;font-weight:600;letter-spacing:-.25px}
.stats-section-head h2{font-size:17px;font-weight:600}
.stats-table th{font-weight:600}
.stats-table td b{font-weight:600}
.num-danger,.num-warn{font-weight:600}
.date-filter label{font-weight:500}

@media(max-width:1380px){
  :root{--rail:78px;--sidebar:302px;--contact:300px}
  .app-shell{grid-template-columns:var(--rail) var(--sidebar) minmax(440px,1fr) var(--contact)}
  .nav-label{max-width:62px}
  .contact-pane section{padding-left:13px;padding-right:13px}
  .message{max-width:78%}
  .composer-actions{grid-template-columns:minmax(0,1fr) auto auto}
  .action-chip.finish{grid-column:auto}
  .action-chip{padding:0 8px}
}
@media(max-width:1180px){
  :root{--rail:72px;--sidebar:294px}
  .app-shell{grid-template-columns:var(--rail) var(--sidebar) minmax(430px,1fr)}
  .contact-pane{display:none}
  .nav-item{min-height:54px}
  .message{max-width:76%}
}
@media(max-width:940px){
  :root{--rail:66px;--sidebar:274px}
  .app-shell{grid-template-columns:var(--rail) var(--sidebar) minmax(0,1fr)}
  .nav-label{font-size:9px;max-width:56px}
  .nav-count{right:2px;top:3px}
  .composer-actions{grid-template-columns:minmax(0,1fr) auto}
  .reply-route-wrap{grid-column:1/-1}
  .action-chip.finish{grid-column:auto}
}
@media(max-width:760px){
  body{overflow:hidden}
  .app-shell{grid-template-columns:62px minmax(0,1fr)}
  .sidebar{display:none}
  .nav-rail{display:flex}
  .chat-header{padding:0 10px}
  .chat-title .avatar{display:none}
  .message-list{padding:12px 10px}
  .message{max-width:92%}
  .composer{padding:7px}
  .composer-actions{grid-template-columns:1fr 1fr}
  .composer-actions .reply-route-wrap{grid-column:1/-1}
  .reply-route-menu.open{grid-template-columns:1fr}
  .reply-route-menu label:nth-of-type(3),.route-apply,.reply-route-menu .route-menu-title{grid-column:1}
  .top-title span:last-child{display:none}
}

/* v0.8 composer responsive refinement after browser QA */
@media(max-width:1380px) and (min-width:941px){
  .composer-actions{grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center}
  .composer-actions .reply-route-wrap{grid-column:1/-1}
  .action-chip.finish{grid-column:auto}
}
@media(max-width:940px){
  .composer-actions{grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center}
  .composer-actions .reply-route-wrap{grid-column:1/-1}
  .action-chip.finish{grid-column:auto}
}
@media(max-width:1380px) and (min-width:761px){
  .composer-actions #commentBtn{grid-column:2}
  .composer-actions #transferBtn{grid-column:3}
  .composer-actions #finishBtn{grid-column:4}
}

/* v0.9.1 GREEN-API integrations */
.settings-modal-card{width:min(1120px,96vw);padding:24px;overflow:auto}
.settings-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-right:34px;margin-bottom:6px}
.settings-title-row h2{margin:0 0 4px}.settings-title-row p{margin:0}
.integrations-section{padding-top:2px}
.integration-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,420px);align-items:start;gap:18px;margin-bottom:18px;padding:14px 16px;border:1px solid #e3e9f1;border-radius:14px;background:#f8fafc}
.integration-head h3{margin:0 0 5px;font-size:15px}.integration-head p{margin:0;line-height:1.45}
.webhook-box{min-width:0;padding:10px 12px;border:1px solid #dfe6ef;border-radius:11px;background:#fff;font-size:11px}
.webhook-box span{display:block;color:var(--muted);margin-bottom:5px;font-weight:600}
.webhook-box code{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#f4f6f9;padding:7px 8px;border-radius:7px;color:#3d4f68}
.integration-brand-group{margin:0 0 20px;padding:0}
.integration-brand-group-head{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:0 2px 9px}
.integration-brand-group-head h4{margin:0;font-size:15px;font-weight:650;color:#27364a}
.integration-brand-group-head span{display:block;margin-top:2px;font-size:11px;color:#8792a2}
.integration-channel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.integration-card{display:flex;flex-direction:column;min-width:0;border:1px solid #dde5ef;border-radius:14px;padding:14px;background:#fff;box-shadow:0 1px 2px rgba(30,50,80,.025)}
.integration-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid #edf1f5}
.integration-channel-title{display:flex;align-items:center;gap:8px;min-width:0}.integration-channel-title b{font-size:14px;font-weight:650;color:#293b52}
.integration-channel-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto;background:#8e9bad}.integration-channel-dot.whatsapp{background:#22a861}.integration-channel-dot.telegram{background:#2a9bd8}.integration-channel-dot.max{background:#6a5ae0}
.integration-status{font-size:10.5px;padding:5px 8px;border-radius:999px;background:#f0f2f5;color:#6c7888;white-space:nowrap;border:1px solid #e6e9ed}
.integration-status.ok{background:#e8f7ee;color:#217946;border-color:#caecd7}
.integration-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px 10px}
.integration-field-wide{grid-column:1/-1}
.integration-card label{display:block;margin:0;font-size:11px;color:#68778a;font-weight:600}
.integration-card input[type=text],.integration-card input[type=password],.integration-card input:not([type]){width:100%;height:39px;margin-top:5px;border:1px solid #dfe6ee;border-radius:9px;padding:0 10px;background:#fbfcfd;color:var(--text);outline:none;font-size:12px;font-weight:450}
.integration-card input:focus{border-color:#a9c3f1;background:#fff;box-shadow:0 0 0 3px #eff5ff}
.integration-card-bottom{margin-top:auto;padding-top:12px}
.integration-toggle{display:flex!important;align-items:center;gap:8px!important;color:#354256!important;font-size:11.5px!important;font-weight:600!important}.integration-toggle input{width:16px!important;height:16px!important;margin:0!important;flex:0 0 auto}
.integration-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}
.integration-actions button{min-width:0;min-height:38px;padding:8px 10px;font-size:11.5px;white-space:nowrap}
.integration-actions .integration-save{grid-column:1/-1}
.integration-actions button:disabled{opacity:.6;cursor:wait}
.integration-meta{font-size:10.5px;color:#7d8997;margin-top:8px;line-height:1.4}
.integration-error{font-size:10.5px;color:#a53b3b;background:#fff2f2;border:1px solid #f8d7d7;border-radius:8px;padding:8px 9px;margin-top:8px;overflow-wrap:anywhere;line-height:1.4}
.integration-feedback{display:none;font-size:10.5px;border-radius:8px;padding:8px 9px;margin-top:8px;line-height:1.4;overflow-wrap:anywhere}
.integration-feedback:not(:empty){display:block}.integration-feedback.ok{background:#eef8f2;color:#2a7047;border:1px solid #d8eddf}.integration-feedback.error{background:#fff2f2;color:#9b3838;border:1px solid #f2d6d6}
.integrations-hint{margin-top:4px;line-height:1.5}
@media(max-width:1040px){
  .settings-modal-card{width:min(900px,96vw)}
  .integration-head{grid-template-columns:1fr}.webhook-box{max-width:none}
  .integration-channel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .settings-modal-card{padding:18px}
  .integration-channel-grid{grid-template-columns:1fr}
  .integration-fields{grid-template-columns:1fr}.integration-field-wide{grid-column:1}
  .integration-head{padding:12px}.settings-tabs{overflow:auto;white-space:nowrap}
}
.profile-password-form{max-width:360px;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.profile-password-form h3{margin:0 0 10px}.profile-password-form label{display:block;margin:9px 0;font-size:11px;color:var(--muted)}.profile-password-form input{width:100%;margin-top:4px;border:1px solid var(--line);border-radius:9px;padding:9px 10px}
.attachment-card{display:flex;align-items:center;gap:7px;margin-top:8px;padding:8px 10px;border:1px solid rgba(72,96,128,.15);border-radius:9px;background:rgba(255,255,255,.55);color:#3564a6;text-decoration:none;font-size:12px;font-weight:500}.attachment-card:hover{text-decoration:underline}

/* v0.10.0 functional UI refinements */
.contact-name-wrap{display:flex;align-items:center;gap:7px;min-width:0}
.contact-name-display{display:flex;align-items:center;gap:6px;min-width:0}
.contact-name-display h2{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inline-name-edit{border:0;background:transparent;color:#7890ad;cursor:pointer;padding:3px 5px;border-radius:6px;font-size:13px}
.inline-name-edit:hover{background:#f0f5fb;color:#2e6fd0}
.contact-name-editor{display:flex;align-items:center;gap:5px;min-width:0}
.contact-name-editor input{width:min(220px,100%);height:34px;border:1px solid #b9cae1;border-radius:8px;padding:0 9px;font:inherit;font-weight:600;color:var(--text);outline:none;background:#fff}
.contact-name-editor input:focus{border-color:#72a0e9;box-shadow:0 0 0 3px #edf4ff}
.inline-name-save,.inline-name-cancel{width:30px;height:30px;border:0;border-radius:8px;cursor:pointer;font-weight:700}
.inline-name-save{background:#e8f7ee;color:#248052}.inline-name-cancel{background:#f2f4f7;color:#6e7c8e}

.chat-image{display:block;border:0;background:transparent;padding:0;margin-top:8px;cursor:zoom-in;max-width:min(360px,100%);border-radius:12px;overflow:hidden}
.chat-image img{display:block;width:auto;max-width:100%;max-height:320px;object-fit:contain;border-radius:12px;border:1px solid rgba(72,96,128,.12);background:#f4f6f8}
.media-lightbox{position:fixed;inset:0;z-index:80;display:none;align-items:center;justify-content:center;padding:38px;background:rgba(18,27,41,.82);backdrop-filter:blur(4px)}
.media-lightbox.open{display:flex}.media-lightbox img{display:block;max-width:min(94vw,1500px);max-height:88vh;object-fit:contain;border-radius:10px;background:#fff;box-shadow:0 18px 60px rgba(0,0,0,.32)}
.media-lightbox-close{position:absolute;top:18px;right:20px;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-size:28px;line-height:1;cursor:pointer}

.manager-review-composer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #dce6f3;border-radius:12px;background:#f7faff;color:#56667a;font-size:12px}
.manager-review-composer .action-chip{flex:0 0 auto}

.integration-sync-report{display:grid;gap:4px;margin:9px 0 0;padding:9px 10px;border:1px solid #dfe8f2;border-radius:9px;background:#f8fafc;color:#566578;font-size:10.5px;line-height:1.45}
.integration-sync-report>b{color:#304158}.integration-sync-report>span{display:block}
.integration-sync-report details{margin-top:3px}.integration-sync-report summary{cursor:pointer;color:#3569ae;font-weight:600}
.sync-error-row{display:grid;grid-template-columns:minmax(100px,.8fr) minmax(0,2fr);gap:7px;padding:6px 0;border-top:1px solid #e8edf3;overflow-wrap:anywhere}
.sync-error-row code{font-size:10px;white-space:normal}

.notification-settings{display:flex;align-items:center;gap:10px;margin-top:12px;padding:11px 12px;border:1px solid #e1e7ef;border-radius:11px;background:#f8fafc}
.notification-settings span{font-size:11.5px;color:#66768a;line-height:1.4}

.action-chip:disabled,.primary:disabled,.ghost:disabled{opacity:.55;cursor:wait}
.finish-feedback{font-size:11px;color:#298052;font-weight:600}

@media(max-width:760px){
  .media-lightbox{padding:18px}.media-lightbox img{max-width:96vw;max-height:84vh}
  .manager-review-composer{align-items:flex-start;flex-direction:column}
  .contact-name-editor input{width:150px}
}

/* v0.11 manager consultation + instant chat positioning */
.manager-badge{font-size:11px;padding:4px 7px;border-radius:8px;background:#f1ecff;color:#6545bd;font-weight:700;white-space:nowrap}
.manager-consult-note{margin-top:10px;padding:9px 10px;border-radius:10px;background:#f3efff;color:#6047a8;font-size:12px;font-weight:650}
.manager-review-composer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #ded8f5;background:#f8f6ff;border-radius:12px;color:#594b78;font-size:13px}
.manager-review-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.message-list{scroll-behavior:auto}

/* v0.11.1 data safety + rollback */
.data-safety-banner{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 16px;border-bottom:1px solid #f1caca;background:#fff4f4;color:#8c3434;font-size:12px;line-height:1.4}
.data-safety-banner b{font-weight:700}.data-safety-banner .link-btn{padding:3px 6px;color:#8c3434;text-decoration:underline}
.backup-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.backup-head h3{margin:0 0 4px}.backup-head p{margin:0;max-width:720px;line-height:1.5}
.backup-list{display:grid;gap:8px}
.backup-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #e1e7ef;border-radius:12px;background:#fff}
.backup-main{display:grid;gap:3px;min-width:0}.backup-main b{font-size:12.5px;font-weight:650;color:#2f3e52}.backup-main span{font-size:11px;color:#798698;overflow-wrap:anywhere}
.backup-empty{padding:18px;border:1px dashed #d9e1eb;border-radius:12px;color:#7a8798;text-align:center;background:#fafbfd}
.backup-danger{display:grid;gap:4px;margin:0 0 12px;padding:11px 12px;border:1px solid #efcccc;border-radius:11px;background:#fff3f3;color:#8f3939;font-size:11.5px;line-height:1.45}
.backup-danger b{font-size:12px}.backup-hint{margin-top:12px}
@media(max-width:720px){.backup-head{flex-direction:column}.backup-head .primary{width:100%}.backup-row{align-items:flex-start;flex-direction:column}.backup-row .ghost{width:100%}}
/* 0.12.0 — сайт-виджет */
.widget-settings-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}.widget-site-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.widget-site-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:16px;display:flex;flex-direction:column;gap:12px}.widget-site-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.widget-site-card-head>div{display:flex;flex-direction:column;gap:3px}.widget-site-card label{display:flex;flex-direction:column;gap:6px;font-weight:600}.widget-site-card textarea,.widget-site-card input[type="number"]{width:100%;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:#fff;color:var(--text);resize:vertical}.widget-code{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:12px;background:#f6f8fb}.widget-code>span{font-size:12px;color:var(--muted);font-weight:600}.widget-code code{display:block;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;background:#eef2f7;padding:10px;border-radius:9px}.widget-site-feedback{min-height:18px;font-size:12px;color:var(--muted)}.widget-site-feedback.ok{color:#18864b}.widget-site-feedback.error{color:#b42318}@media(max-width:1100px){.widget-site-grid{grid-template-columns:1fr}}
