:root{font-family:system-ui,sans-serif;color:#183047;background:#f3f6f8;line-height:1.5}*{box-sizing:border-box}body{margin:0}header{background:#102c41;color:white;padding:1rem 2rem;display:flex;justify-content:space-between;align-items:center}header span{font-weight:400}nav{display:flex;gap:.5rem;flex-wrap:wrap;padding:1rem;background:white}nav a{padding:.5rem .7rem;text-decoration:none;border-radius:5px}a{color:#086d85}a[aria-current]{background:#dceef2;font-weight:700}main{max-width:1300px;margin:auto;padding:1.5rem}h1{font-size:1.8rem}h2{font-size:1.2rem}article,.login{background:white;border:1px solid #dae2e8;border-radius:8px;padding:1.2rem;margin:.7rem 0;overflow-wrap:anywhere}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:1rem}.metric{display:block;font-size:2rem;color:#086d85}label{display:block;margin:.7rem 0}input,select,textarea,button{font:inherit;border:1px solid #9eafb9;border-radius:4px;padding:.55rem}input:not([type=checkbox]),select,textarea{display:block;width:100%;max-width:600px}textarea{max-width:none}button{background:#086d85;color:white;cursor:pointer}button:hover{background:#075367}button:focus,a:focus,input:focus,textarea:focus{outline:3px solid #d4a92e;outline-offset:2px}.inline{display:inline-block;margin:.4rem .4rem 0 0}.split{display:grid;grid-template-columns:1fr 2fr;gap:1rem}.pre,pre{white-space:pre-wrap;overflow-wrap:anywhere}footer{padding:2rem;color:#566b79}.login{max-width:480px;margin:3rem auto}table{border-collapse:collapse;width:100%;background:white}td,th{text-align:left;padding:.7rem;border-bottom:1px solid #dae2e8}.table{overflow:auto}@media(max-width:700px){header{padding:1rem;gap:1rem}header span{display:block}main{padding:1rem}.split{grid-template-columns:1fr}nav{gap:0;padding:.5rem}nav a{font-size:.9rem}}

header{flex-wrap:wrap}.context{overflow-wrap:anywhere}.notice,.error{padding:1rem;border:1px solid;border-radius:6px}.notice{background:#e4f5ed;color:#185c3b}.error{background:#fff0ef;color:#8d2923}details{background:white;padding:1rem;margin:1rem 0;border-radius:8px}summary{cursor:pointer;font-weight:600}

/* SHADOW response center */
.rc-title,.rc-section-head,.rc-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap}.rc-title h1,.rc-section-head h2{margin-bottom:.2rem}.rc-title p,.rc-section-head p{margin-top:0;color:#617684}.rc-pill{display:inline-flex;align-items:center;border-radius:999px;padding:.35rem .7rem;background:#e8f0f3;color:#315365;font-size:.75rem;font-weight:800;letter-spacing:.03em}.rc-shadow{background:#fff3cd;color:#6d5700;border:1px solid #ead47e}.rc-danger{background:#ffe6e3;color:#8b281f}.rc-human{background:#eee7ff;color:#503390}.rc-status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin:1rem 0}.rc-status-grid article{display:flex;flex-direction:column}.rc-status-grid span{color:#667b88;font-size:.88rem}.rc-simulator,.rc-history{background:white;border:1px solid #dae2e8;border-radius:10px;padding:1.2rem;margin:1rem 0}.rc-simulator textarea{max-width:none}.rc-preview{margin-top:1rem;border-top:1px solid #dae2e8;padding-top:1rem}.rc-analysis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.7rem}.rc-analysis div{background:#f5f8fa;border-radius:7px;padding:.7rem}.rc-analysis small,.rc-two small,.rc-reply small{display:block;color:#657986;font-size:.72rem;font-weight:800;letter-spacing:.04em}.rc-analysis strong{display:block;margin-top:.15rem}.rc-reply{background:#eaf6f2;border-left:4px solid #0b8173;border-radius:7px;padding:.9rem}.rc-reply p{margin:.3rem 0 0}.rc-note{background:#fff6d8;border-radius:6px;padding:.65rem .8rem}.rc-extracted{background:#f4f7f9;border-radius:6px;padding:.65rem .8rem}.rc-metrics{margin:1rem 0}.rc-filters{display:flex;align-items:end;gap:.7rem;flex-wrap:wrap;margin:.8rem 0 1rem}.rc-filters label{margin:0;min-width:160px}.rc-card{border-left:4px solid #0b8173}.rc-card-head span{display:block;color:#647986;margin-top:.15rem}.rc-tags{display:flex;gap:.4rem}.rc-meta{display:flex;gap:1rem;flex-wrap:wrap;color:#647986;font-size:.82rem;margin:.6rem 0}.rc-two{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.rc-two>div:first-child{background:#f7f9fa;border-radius:7px;padding:.9rem}.rc-empty{padding:2rem;text-align:center;color:#657986;background:#f7f9fa;border-radius:8px}@media(max-width:800px){.rc-status-grid,.rc-two{grid-template-columns:1fr}.rc-status-grid{gap:.6rem}}


/* Live conversations */
.chat-live{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);min-height:640px;border:1px solid #d8e1e8;border-radius:14px;overflow:hidden;background:#fff}
.chat-sidebar{border-right:1px solid #d8e1e8;background:#f8fafb;min-width:0}
.chat-sidebar-head,.chat-thread-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid #d8e1e8;background:#fff}
.chat-sidebar-head h2,.chat-thread-head h2{margin:0;font-size:1.05rem}
.chat-sidebar-head small,.chat-thread-head small{color:#657786}
.chat-live-dot{width:10px;height:10px;border-radius:999px;background:#22a06b;box-shadow:0 0 0 4px rgba(34,160,107,.12);flex:0 0 auto}
.chat-live-dot.offline{background:#c93737;box-shadow:0 0 0 4px rgba(201,55,55,.12)}
.chat-search-label{display:block;padding:12px 14px 8px;font-size:.82rem;color:#52616b}
.chat-search-label input{display:block;width:100%;margin-top:6px;padding:10px 12px;border:1px solid #cbd6dd;border-radius:10px;background:#fff}
.chat-list{max-height:570px;overflow:auto}
.chat-list-item{display:flex;align-items:flex-start;gap:11px;padding:13px 14px;border-bottom:1px solid #e6ecef;text-decoration:none;color:inherit;background:#fff}
.chat-list-item:hover,.chat-list-item.active{background:#eaf5f7}
.chat-list-item.active{box-shadow:inset 3px 0 0 #087b91}
.chat-avatar{width:42px;height:42px;border-radius:999px;display:grid;place-items:center;background:#dceff3;color:#0b5260;font-weight:700;flex:0 0 auto}
.chat-list-copy{min-width:0;flex:1}
.chat-list-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.chat-list-top strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-list-top time{font-size:.75rem;color:#75838c;white-space:nowrap}
.chat-list-copy>span{display:block;margin-top:3px;color:#657786;font-size:.86rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-list-tags,.chat-thread-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.chat-badge{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;font-size:.68rem;font-weight:700;background:#edf2f5;color:#4b5a63}
.chat-badge.human{background:#eee9ff;color:#5a42a6}
.chat-badge.urgent{background:#fff0ef;color:#b52c26}
.chat-badge.ai{background:#e9f7f1;color:#16734f}
.chat-badge.status{background:#eef5ff;color:#315f9a}
.chat-thread{display:flex;flex-direction:column;min-width:0;background:#eef1f3}
.chat-thread-head{min-height:74px}
.chat-messages{flex:1;max-height:570px;overflow:auto;padding:20px;background:linear-gradient(180deg,#eef1f3 0,#f6f8f9 100%)}
.chat-bubble-row{display:flex;margin:8px 0}
.chat-bubble-row.in{justify-content:flex-start}
.chat-bubble-row.out{justify-content:flex-end}
.chat-bubble{max-width:min(74%,760px);padding:10px 12px;margin:0;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.chat-bubble-row.out .chat-bubble{background:#dff4ea}
.chat-bubble .pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-bubble-meta{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-top:6px;color:#6f7d85}
.chat-bubble-meta small{font-size:.72rem}
.chat-empty{padding:18px;color:#6f7d85;text-align:center}
@media (max-width:820px){
  .chat-live{grid-template-columns:1fr}
  .chat-sidebar{border-right:0;border-bottom:1px solid #d8e1e8}
  .chat-list{max-height:260px}
  .chat-messages{min-height:420px;max-height:560px}
  .chat-bubble{max-width:88%}
}

.chat-compose{background:#fff;border-top:1px solid #d8e1e8;padding:12px 18px}.chat-compose label{margin:0 0 6px;font-weight:600}.chat-compose textarea{max-width:none;resize:vertical}.chat-compose-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:8px}.chat-compose-actions small{color:#657786}.chat-compose-status,#chat-compose-status{margin:6px 0 0;font-size:.85rem}button:disabled{cursor:not-allowed;opacity:.55}.chat-compose textarea:disabled{background:#f3f6f8}@media(max-width:650px){.chat-compose-actions{align-items:stretch;flex-direction:column}}

/* Keep the operator composer visible while only the conversation scrolls. */
.chat-live{height:clamp(540px,calc(100dvh - 220px),900px);min-height:0}
.chat-sidebar{display:flex;flex-direction:column;min-height:0}
.chat-list{flex:1;min-height:0;max-height:none}
.chat-thread{min-height:0;overflow:hidden}
.chat-thread-head,.chat-compose{flex:0 0 auto}
.chat-messages{flex:1 1 0;min-height:0;max-height:none}
.chat-compose{margin:0}
.chat-compose textarea{max-height:140px}
@media(max-width:820px){.chat-live{height:auto}.chat-list{flex:none;max-height:220px}.chat-thread{height:560px}.chat-messages{min-height:0;max-height:none}}

/* Persistent automatic reply controls */
.chat-selection-row {display:flex; align-items:center; border-bottom:1px solid #dbe4ec;}
.chat-selection-row .chat-list-item {flex:1; min-width:0; border-bottom:0;}
.chat-select-checkbox {width:20px; height:20px; flex-shrink:0; margin:0 0 0 12px;}
.chat-bulk-controls {display:flex; flex-wrap:wrap; gap:8px; padding:12px; border-bottom:1px solid #dbe4ec;}
.chat-bulk-controls button {font-size:.8rem; padding:6px 9px;}
.chat-bulk-controls span {font-size:.8rem; align-self:center;}
.chat-automation-controls {padding:10px 18px; border-bottom:1px solid #dbe4ec; background:#fff;}
.chat-automation-controls label {display:flex; align-items:center; gap:9px; margin:0;}
.chat-automation-controls label[hidden] {display:none;}
.chat-automation-controls input {width:22px; height:22px;}
.chat-automation-controls p {margin:5px 0 0; font-size:.85rem;}
