*,:after,:before{box-sizing:border-box;margin:0;padding:0}:root{--green:#25d366;--green-dark:#128c7e;--green-bg:#0d2318;--red:#e74c3c;--red-bg:#2a0e0e;--orange:#f5a623;--orange-bg:#2a1e0e;--bg:#0b0b0b;--surface:#131313;--surface2:#1a1a1a;--border:#242424;--border2:#2e2e2e;--text:#e8e8e8;--text-muted:#888;--text-dim:#555;--mono:"SF Mono","Fira Code","Cascadia Code",monospace}body,html{height:100%;overflow:hidden}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);line-height:1.5}.app{display:flex;flex-direction:column;height:100vh}.topbar{background:var(--surface);border-bottom:1px solid var(--border);gap:.75rem;padding:.6rem 1.25rem}.topbar,.topbar-logo{align-items:center;display:flex;flex-shrink:0}.topbar-logo{gap:.5rem}.topbar-logo svg{flex-shrink:0}.topbar-logo-text{color:var(--text);font-size:.85rem;font-weight:700;white-space:nowrap}.badge-local{background:#1a1200;border:1px solid #4a3800;border-radius:4px;color:var(--orange);font-size:.6rem;font-weight:700;letter-spacing:.07em;padding:.1rem .35rem;text-transform:uppercase}.topbar-divider{background:var(--border);flex-shrink:0;height:24px;width:1px}.topbar-fields{flex:1 1;gap:.5rem}.topbar-field,.topbar-fields{align-items:center;display:flex;min-width:0}.topbar-field{background:var(--bg);border:1px solid var(--border2);border-radius:6px;gap:.4rem;padding:0 .6rem;transition:border-color .15s}.topbar-field:focus-within{border-color:#3a3a3a}.topbar-field-label{color:var(--text-dim);flex-shrink:0;font-size:.68rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}.topbar-field input{background:transparent;border:none;color:var(--text);font-family:var(--mono);font-size:.78rem;min-width:0;outline:none;padding:.45rem 0;width:100%}.topbar-field input::placeholder{color:var(--text-dim)}.topbar-field.topbar-field-url{flex:2 1}.topbar-field.topbar-field-id{flex:1.2 1}.topbar-field.topbar-field-secret{flex:1.5 1}.status-indicator{align-items:center;border-radius:6px;display:flex;flex-shrink:0;gap:.4rem;padding:.35rem .7rem}.status-indicator.ready{background:var(--green-bg)}.status-indicator.not-ready{background:#1a1a1a}.status-dot{border-radius:50%;flex-shrink:0;height:7px;width:7px}.status-indicator.ready .status-dot{background:var(--green);box-shadow:0 0 6px var(--green)}.status-indicator.not-ready .status-dot{background:#444}.status-text{font-size:.72rem;font-weight:600;white-space:nowrap}.status-indicator.ready .status-text{color:var(--green)}.status-indicator.not-ready .status-text{color:var(--text-dim)}.panels{display:grid;flex:1 1;grid-template-columns:420px 1fr;min-height:0;overflow:hidden}@media (min-width:1200px){.panels{grid-template-columns:440px 1fr}}.panel-phone{border-right:1px solid var(--border);gap:0;min-height:0;overflow:hidden}.panel-phone,.source-tabs{display:flex;flex-direction:column}.source-tabs{background:var(--surface);border-bottom:1px solid var(--border);flex-shrink:0;gap:.35rem;padding:.5rem .75rem .4rem}.source-tabs-label{color:var(--text-dim);font-size:.62rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.source-tabs-list{display:flex;flex-wrap:wrap;gap:.3rem}.source-tab{align-items:center;background:transparent;border:1px solid var(--border2);border-radius:6px;color:var(--text-muted);cursor:pointer;display:inline-flex;font-family:var(--mono);font-size:.7rem;gap:.25rem;padding:.2rem .5rem;transition:all .15s}.source-tab:hover{border-color:#3a3a3a;color:var(--text)}.source-tab.active{background:var(--green-bg);border-color:var(--green);color:var(--green)}.source-tab-add{font-family:inherit;font-weight:700;min-width:28px;justify-content:center;padding:.2rem .4rem}.source-tab-add,.source-tab-close{color:var(--text-dim);font-size:.85rem}.source-tab-close{line-height:1;margin-left:.15rem;opacity:.6}.source-tab-close:hover{color:var(--red);opacity:1}.chat-empty-hint,.log-empty-hint{color:var(--text-dim);font-size:.72rem;max-width:260px}.panel-tabs{display:flex;gap:.25rem}.panel-tab{align-items:center;background:transparent;border:1px solid transparent;border-radius:6px;color:var(--text-muted);cursor:pointer;display:flex;font-family:inherit;font-size:.78rem;font-weight:600;gap:.35rem;padding:.3rem .6rem;transition:all .15s}.panel-tab:hover{color:var(--text)}.panel-tab.active{background:var(--surface2);border-color:var(--border2);color:var(--text)}.log-toolbar-actions{display:flex;gap:.4rem}.events-log-tabs{border-bottom:1px solid var(--border);display:flex;gap:.25rem;margin-bottom:.75rem;padding-bottom:.5rem}.outbound-status-panel{background:var(--surface);border:1px solid var(--border);border-radius:8px;margin-bottom:.75rem;padding:.65rem .75rem}.btn-send-compact{margin-top:.35rem;min-height:34px;padding:.4rem .9rem;width:100%}.outbound-list{display:flex;flex-direction:column;gap:.5rem}.outbound-card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:.65rem .75rem}.outbound-card-header{align-items:center;display:flex;gap:.5rem;margin-bottom:.3rem}.outbound-to{color:var(--text);font-size:.78rem;font-weight:600}.mono,.outbound-time{font-family:var(--mono)}.outbound-time{color:var(--text-dim);font-size:.65rem;margin-left:auto}.outbound-source-badge{background:hsla(0,0%,100%,.06);border-radius:3px;color:var(--text-dim);font-size:.6rem;font-weight:700;letter-spacing:.04em;padding:.1rem .3rem;text-transform:uppercase}.outbound-preview{color:var(--text-muted);font-size:.8rem;line-height:1.35;margin-bottom:.35rem;word-break:break-word}.outbound-wamid-row{align-items:center;display:flex;gap:.5rem;margin-bottom:.45rem}.outbound-wamid{background:#080808;border-radius:4px;color:#888;font-size:.68rem;padding:.15rem .35rem}.outbound-current-status{background:var(--green-bg);border-radius:4px;color:var(--green);font-size:.65rem;font-weight:600;padding:.1rem .35rem}.outbound-actions{display:flex;flex-wrap:wrap;gap:.3rem}.btn-status{background:var(--bg);border:1px solid var(--border2);border-radius:5px;color:var(--text-muted);cursor:pointer;font-family:inherit;font-size:.68rem;padding:.2rem .45rem;transition:all .12s}.btn-status:hover:not(:disabled){border-color:#3a3a3a;color:var(--text)}.btn-status:disabled{cursor:not-allowed;opacity:.4}.btn-status.current{border-color:var(--green);color:var(--green)}.btn-status-edit{margin-left:auto}.label-with-tip{align-items:center;display:flex;gap:.3rem}.field-tip{align-items:center;background:var(--border2);border-radius:50%;color:var(--text-dim);cursor:help;display:inline-flex;font-size:.6rem;font-weight:700;height:14px;justify-content:center;width:14px}.field-hint{color:var(--text-dim);font-size:.65rem;line-height:1.3}.sender-bar{background:var(--surface2);border-bottom:1px solid var(--border);gap:.5rem;padding:.5rem .75rem}.sender-avatar,.sender-bar{align-items:center;display:flex}.sender-avatar{background:var(--green-dark);border-radius:50%;color:#fff;flex-shrink:0;font-size:.8rem;font-weight:700;height:34px;justify-content:center;width:34px}.sender-fields{display:flex;flex:1 1;flex-direction:column;gap:.2rem;min-width:0}.sender-input{background:transparent;border:none;color:var(--text);font-family:inherit;font-size:.82rem;font-weight:600;outline:none;width:100%}.sender-input::placeholder{color:var(--text-dim)}.sender-input.phone{color:var(--text-muted);font-family:var(--mono);font-size:.72rem;font-weight:400}.sender-label{color:var(--text-dim);font-size:.65rem}.chat-area{flex:1 1;min-height:0;overflow-y:auto;padding:.75rem;scrollbar-color:#2a2a2a transparent;scrollbar-width:thin}.chat-area::-webkit-scrollbar{width:4px}.chat-area::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:2px}.chat-empty{align-items:center;color:var(--text-dim);display:flex;flex-direction:column;font-size:.8rem;gap:.5rem;height:100%;justify-content:center;text-align:center}.chat-empty-icon{font-size:2rem;opacity:.4}.bubble-wrap{display:flex;margin-bottom:.5rem}.bubble-wrap.inbound{justify-content:flex-end}.bubble-wrap.outbound{justify-content:flex-start}.bubble{background:#1f3a2a;border-radius:12px 12px 2px 12px;max-width:85%;padding:.6rem .75rem;position:relative}.bubble-wrap.selected .bubble{box-shadow:0 0 0 2px var(--green)}.bubble-clickable{border:none;cursor:pointer;font:inherit;text-align:inherit;width:100%}.bubble-clickable:hover{filter:brightness(1.08)}.bubble-outbound{background:#1e2a35;border-radius:12px 12px 12px 2px}.bubble.pending{opacity:.6}.bubble.failed{background:#2a1a1a;border:1px solid #4a2020}.bubble-event-type{display:flex;gap:.4rem;align-items:center;margin-bottom:.25rem}.bubble-type-icon{font-size:.7rem}.bubble-type-label{background:hsla(0,0%,100%,.08);border-radius:3px;color:#aaa;font-size:.6rem;font-weight:600;letter-spacing:.05em;padding:.1rem .3rem;text-transform:uppercase}.bubble-text{color:var(--text);font-size:.875rem;line-height:1.4;word-break:break-word}.bubble-footer{align-items:center;color:var(--text-dim);display:flex;font-size:.65rem;gap:.35rem;justify-content:flex-end;margin-top:.3rem}.bubble-status-ok{color:var(--green)}.bubble-status-fail{color:var(--red)}.bubble-delivery-status,.bubble-status-pending{color:var(--text-dim)}.bubble-delivery-status.read{color:#53bdeb}.bubble-delivery-status.failed{color:var(--red)}.status-bubble-wrap{display:flex;justify-content:center;margin-bottom:.5rem}.status-bubble{align-items:center;background:hsla(0,0%,100%,.04);border:1px solid var(--border);border-radius:20px;color:var(--text-muted);display:flex;font-size:.72rem;gap:.4rem;padding:.3rem .8rem}.status-bubble.pending{opacity:.5}.send-area{background:var(--surface);border-top:1px solid var(--border);padding:.75rem}.event-group{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.6rem}.event-group-label{color:var(--text-dim);font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.event-pills{display:flex;gap:.35rem;margin-bottom:.6rem;overflow-x:auto;scrollbar-width:none}.event-pills::-webkit-scrollbar{display:none}.event-pill{align-items:center;background:transparent;border:1px solid var(--border2);border-radius:20px;color:var(--text-muted);cursor:pointer;display:flex;flex-shrink:0;font-family:inherit;font-size:.75rem;gap:.35rem;padding:.3rem .7rem;transition:all .15s;white-space:nowrap}.event-pill:hover{border-color:#3a3a3a;color:var(--text)}.event-pill.active{background:var(--green-bg);border-color:var(--green);color:var(--green)}.event-pill-icon{font-size:.8rem}.send-form{flex-direction:column}.send-form,.send-row{display:flex;gap:.4rem}.send-row{align-items:flex-end}.send-input-wrap{display:flex;flex:1 1;flex-direction:column;gap:.4rem}.field-pair{display:grid;grid-gap:.4rem;gap:.4rem;grid-template-columns:1fr 1fr}.input-group{display:flex;flex-direction:column;gap:.2rem}.input-group label{color:var(--text-dim);font-size:.68rem;font-weight:500}input.form-input,select.form-input,textarea.form-input{background:var(--bg);border:1px solid var(--border2);border-radius:6px;color:var(--text);font-family:inherit;font-size:.82rem;outline:none;padding:.45rem .6rem;transition:border-color .15s;width:100%}input.form-input:focus,select.form-input:focus,textarea.form-input:focus{border-color:#3a3a3a}input.form-input::placeholder,textarea.form-input::placeholder{color:var(--text-dim)}textarea.form-input{min-height:64px;resize:vertical}select.form-input option{background:var(--surface2)}input.form-input.mono{font-family:var(--mono);font-size:.78rem}.btn-send{align-items:center;background:var(--green);border:none;border-radius:8px;color:#000;cursor:pointer;display:flex;flex-shrink:0;font-family:inherit;font-size:.85rem;font-weight:700;gap:.4rem;justify-content:center;min-height:38px;padding:.5rem 1.25rem;transition:background .15s,opacity .15s;white-space:nowrap}.btn-send:hover:not(:disabled){background:#20bf5a}.btn-send:disabled{cursor:not-allowed;opacity:.3}.btn-send-icon{font-size:1rem}.no-config-hint{color:var(--text-dim);font-size:.72rem;padding:.25rem 0;text-align:center}.panel-inspect{display:flex;flex-direction:column;min-height:0;overflow:hidden}.inspect-toolbar{align-items:center;background:var(--surface);border-bottom:1px solid var(--border);display:flex;flex-shrink:0;gap:.75rem;justify-content:space-between;padding:.6rem 1rem}.inspect-title{color:var(--text);font-size:.82rem;font-weight:700}.inspect-toolbar-actions{display:flex;gap:.4rem}.inspect-body{flex:1 1;min-height:0;overflow-y:auto;padding:.85rem 1rem 1rem;scrollbar-color:#2a2a2a transparent;scrollbar-width:thin}.inspect-section+.inspect-section{margin-top:1rem}.inspect-section-title{color:var(--text-muted);font-size:.68rem;font-weight:600;letter-spacing:.05em;margin:0 0 .5rem;text-transform:uppercase}.inspect-card{background:var(--surface);border:1px solid var(--border);border-radius:8px;display:flex;flex-direction:column;gap:.45rem;padding:.7rem .8rem}.inspect-row{display:grid;grid-gap:.2rem;gap:.2rem;grid-template-columns:110px 1fr}.inspect-label{color:var(--text-dim);font-size:.72rem}.inspect-value{color:var(--text);font-size:.78rem;line-height:1.35;word-break:break-word}.inspect-value.mono{font-family:var(--mono);font-size:.72rem}.inspect-hint{color:var(--text-dim);font-size:.78rem;line-height:1.45;margin:0}.inspect-block{display:flex;flex-direction:column;gap:.35rem;margin-top:.35rem}.inspect-block-label{color:var(--text-dim);font-size:.68rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.inspect-pre{background:#080808;border:1px solid var(--border);border-radius:6px;color:#aaa;font-family:var(--mono);font-size:.68rem;line-height:1.45;margin:0;max-height:220px;overflow:auto;padding:.55rem .65rem;white-space:pre-wrap;word-break:break-word}.inspect-subsection{border-top:1px solid var(--border);display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;padding-top:.65rem}.inspect-subsection-title{color:var(--text-muted);font-size:.72rem;font-weight:600}.inspect-status-actions{margin-bottom:.15rem}.inspect-status-form{gap:.45rem}.panel-log{display:flex;flex-direction:column;min-height:0;overflow:hidden}.log-toolbar{background:var(--surface);border-bottom:1px solid var(--border);flex-shrink:0;gap:.75rem;justify-content:space-between;padding:.6rem 1rem}.log-toolbar,.log-toolbar-left{align-items:center;display:flex}.log-toolbar-left{gap:.5rem}.log-title{color:var(--text);font-size:.82rem;font-weight:700}.log-count{background:var(--surface2);border:1px solid var(--border);border-radius:10px;color:var(--text-muted);font-family:var(--mono);font-size:.68rem;padding:.1rem .45rem}.btn-clear{background:transparent;border:1px solid var(--border2);border-radius:5px;color:var(--text-dim);cursor:pointer;font-family:inherit;font-size:.72rem;padding:.3rem .6rem;transition:all .15s}.btn-clear:hover{border-color:var(--red);color:var(--red)}.log-body{flex:1 1;min-height:0;overflow-y:auto;padding:.75rem;scrollbar-color:#2a2a2a transparent;scrollbar-width:thin}.log-body::-webkit-scrollbar{width:4px}.log-body::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:2px}.log-empty{align-items:center;color:var(--text-dim);display:flex;flex-direction:column;font-size:.8rem;gap:.5rem;height:100%;justify-content:center;text-align:center}.log-empty-icon{font-size:2rem;opacity:.3}.log-entries{display:flex;flex-direction:column;gap:.5rem}.log-entry{background:var(--surface);border:1px solid var(--border);border-left:3px solid transparent;border-radius:8px;overflow:hidden}.log-entry.ok{border-left-color:var(--green)}.log-entry.fail{border-left-color:var(--red)}.log-entry.network-err{border-left-color:var(--orange)}.log-entry-header{align-items:center;cursor:pointer;display:flex;gap:.6rem;padding:.6rem .75rem;transition:background .1s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.log-entry-header:hover{background:hsla(0,0%,100%,.03)}.log-entry-icon{font-size:.9rem;flex-shrink:0}.log-type-badge{background:hsla(0,0%,100%,.06);color:var(--text);font-size:.7rem;font-weight:600;letter-spacing:.02em}.log-status-badge,.log-type-badge{border-radius:4px;font-family:var(--mono);padding:.2rem .45rem}.log-status-badge{font-size:.72rem;font-weight:700}.log-status-badge.ok{background:var(--green-bg);color:var(--green)}.log-status-badge.fail{background:var(--red-bg);color:var(--red)}.log-status-badge.network-err{background:var(--orange-bg);color:var(--orange)}.log-time{color:var(--text-dim);font-family:var(--mono);font-size:.68rem;margin-left:auto}.log-expand-btn{color:var(--text-dim);flex-shrink:0;font-size:.7rem}.log-error-text{background:var(--orange-bg);border-top:1px solid #3a2a10;color:var(--orange);font-family:var(--mono);font-size:.75rem;padding:.5rem .75rem}.log-details{border-top:1px solid var(--border)}.log-section{border-bottom:1px solid var(--border)}.log-section:last-child{border-bottom:none}.log-section-header{align-items:center;color:var(--text-dim);cursor:pointer;display:flex;font-size:.7rem;font-weight:600;gap:.4rem;letter-spacing:.04em;padding:.4rem .75rem;text-transform:uppercase;-webkit-user-select:none;-moz-user-select:none;user-select:none}.log-section-header:hover{color:var(--text-muted)}.log-section-arrow{font-size:.65rem;transition:transform .15s}.log-section-arrow.open{transform:rotate(90deg)}.log-pre{background:#080808;color:#b0b0b0;font-family:var(--mono);font-size:.7rem;line-height:1.6;max-height:280px;overflow:auto;padding:.6rem .75rem;scrollbar-color:#2a2a2a transparent;scrollbar-width:thin;white-space:pre}.log-pre::-webkit-scrollbar{height:4px;width:4px}.log-pre::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:2px}