#ceo-phone-pilot[hidden],#ceo-phone-pilot [hidden]{display:none!important}
#ceo-phone-pilot{position:fixed;inset:0;z-index:2147483647;background:rgba(2,6,23,.7);display:flex;align-items:center;justify-content:center;padding:14px;color:#edf4ff;font:14px/1.5 system-ui,'Malgun Gothic',sans-serif}
#ceo-phone-pilot *{box-sizing:border-box}
#ceo-phone-pilot .phone-pilot-sheet{width:min(640px,100%);max-height:94dvh;background:#101c30;border:1px solid #6982a3;border-radius:16px;display:flex;flex-direction:column;overflow:hidden}
#ceo-phone-pilot header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid #64748b;gap:12px}
#ceo-phone-pilot h2{font-size:19px;margin:0}#ceo-phone-pilot h3{font-size:17px}
#ceo-phone-pilot .phone-pilot-body{padding:16px;overflow:auto;overscroll-behavior:contain}
#ceo-phone-pilot label{display:block;margin:12px 0;font-weight:650}
#ceo-phone-pilot :is(input,textarea,select){display:block;width:100%;margin-top:5px;padding:11px;border:1px solid #7993b6;border-radius:8px;background:#182b45;color:#f8fafc;font:inherit}
#ceo-phone-pilot textarea{min-height:84px;resize:vertical}
#ceo-phone-pilot button,[data-phone-pilot-button]{cursor:pointer;border:1px solid #93b8ff;border-radius:8px;background:#245dd6;color:#fff!important;-webkit-text-fill-color:currentColor!important;font:700 14px/1.4 system-ui;padding:10px 14px;margin:5px 4px 5px 0;min-height:42px}
#ceo-phone-pilot button:disabled{opacity:.5;cursor:not-allowed}
#ceo-phone-pilot details{border:1px solid #64748b;border-radius:9px;padding:12px}#ceo-phone-pilot summary{cursor:pointer;font-weight:700}
#ceo-phone-pilot :is(pre,article){white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;border:1px solid #64748b;border-radius:8px}
#ceo-phone-pilot article{margin:10px 0}#ceo-phone-pilot article p{margin-bottom:5px}
#ceo-phone-pilot-image,#ceo-phone-pilot-review-image{max-width:100%;max-height:200px;object-fit:contain;background:white}
#ceo-phone-pilot-notice{color:#ffe09a;font-weight:700}
html[data-ceo-policy-theme="light"] #ceo-phone-pilot{color:#19334a}
html[data-ceo-policy-theme="light"] #ceo-phone-pilot .phone-pilot-sheet{background:#fff;border-color:#8aa8c3}
html[data-ceo-policy-theme="light"] #ceo-phone-pilot :is(input,textarea,select){background:#fff;color:#102b45}
html[data-ceo-policy-theme="light"] #ceo-phone-pilot-notice{color:#945500}
@media(max-width:520px){#ceo-phone-pilot{padding:0}#ceo-phone-pilot .phone-pilot-sheet{max-height:100dvh;border-radius:0;width:100%;height:100dvh}#ceo-phone-pilot header{padding:12px}#ceo-phone-pilot .phone-pilot-body{padding:12px}}

#ceo-phone-pilot-customer-items{max-height:280px;overflow:auto;border:1px solid #7993b6;border-radius:8px;padding:8px}#ceo-phone-pilot-customer-items label{display:flex;gap:10px;align-items:center;font-size:14px}#ceo-phone-pilot-customer-items input[type=checkbox]{display:inline-block;width:20px;min-width:20px;height:20px;margin:0}#ceo-phone-pilot-customer-picker{border:1px solid #7993b6;padding:12px;border-radius:8px}

/* Confirmed phone state controls the switch; no optimistic ON state. */
#ceo-phone-pilot #ceo-phone-pilot-remote-toggle{display:flex!important;align-items:center;gap:14px;width:100%;text-align:left;min-height:80px;margin:12px 0;padding:14px 16px;background:#334155!important;border:2px solid #94a3b8!important;color:#fff!important;-webkit-text-fill-color:currentColor!important;box-shadow:none!important;opacity:1}
#ceo-phone-pilot .phone-arm-track{display:block;flex:0 0 58px;width:58px;height:32px;padding:3px;border-radius:999px;background:#64748b;border:1px solid #cbd5e1}
#ceo-phone-pilot .phone-arm-thumb{display:block;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0005;transition:transform .15s}
#ceo-phone-pilot .phone-arm-copy{display:flex;flex-direction:column;gap:4px;line-height:1.45;white-space:normal}
#ceo-phone-pilot .phone-arm-copy strong{color:inherit!important;font-size:16px}
#ceo-phone-pilot .phone-arm-copy>span{color:inherit!important;font-size:14px}
#ceo-phone-pilot #ceo-phone-pilot-remote-toggle[data-phase="on"]{background:#166534!important;border-color:#4ade80!important}
#ceo-phone-pilot [data-phase="on"] .phone-arm-track{background:#15803d;border-color:#86efac}
#ceo-phone-pilot [data-phase="on"] .phone-arm-thumb{transform:translateX(26px)}
#ceo-phone-pilot #ceo-phone-pilot-remote-toggle:is([data-phase="pending-on"],[data-phase="pending-off"]){background:#713f12!important;border-color:#fbbf24!important}
#ceo-phone-pilot #ceo-phone-pilot-remote-toggle:is([data-phase="unavailable"],[data-phase="unknown"]){background:#475569!important;border-style:dashed!important}
#ceo-phone-pilot #ceo-phone-pilot-remote-toggle:focus-visible{outline:3px solid #60a5fa;outline-offset:3px}
#ceo-phone-pilot #ceo-phone-pilot-remote-toggle:disabled{cursor:not-allowed}
@media(prefers-reduced-motion:reduce){#ceo-phone-pilot .phone-arm-thumb{transition:none}}

/* Light theme: pale neutral OFF surface, keep confirmed ON green. */
html[data-ceo-policy-theme="light"] #ceo-phone-pilot #ceo-phone-pilot-remote-toggle:is([data-phase="off"],[data-phase="unknown"],[data-phase="unavailable"]){background:#f1f5f9!important;border-color:#94a3b8!important;color:#19334a!important;-webkit-text-fill-color:currentColor!important}
html[data-ceo-policy-theme="light"] #ceo-phone-pilot #ceo-phone-pilot-remote-toggle:is([data-phase="off"],[data-phase="unknown"],[data-phase="unavailable"]) .phone-arm-track{background:#64748b;border-color:#64748b}

#ceo-phone-pilot .unified-client{padding:12px;background:#182b45;border:1px solid #7993b6;border-radius:10px;font-weight:750;margin:10px 0;overflow-wrap:anywhere}
html[data-ceo-policy-theme="light"] #ceo-phone-pilot .unified-client{background:#eff7f4}
#ceo-phone-pilot .unified-send-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
#ceo-phone-pilot .unified-send-actions button{flex:1 1 140px;min-height:48px;margin:0}
#ceo-phone-pilot .unified-help{font-size:12px}
#ceo-phone-pilot-sender-summary{font-size:12px;overflow-wrap:anywhere}

#ceo-phone-pilot-image-box{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #94a3b8;border-radius:10px;margin:10px 0}
#ceo-phone-pilot #ceo-phone-pilot-image{width:96px!important;max-width:30%!important;max-height:72px!important;object-fit:contain;margin:0;border-radius:6px}
#ceo-phone-pilot-image-status{font-size:13px;margin:0}

/* Match adjacent mobile header actions; preserve send controls. */
html[data-ceo-policy-theme] #app .topbar button#ceo-phone-pilot-open#ceo-phone-pilot-open{background:#13243a!important;background-image:none!important;border-color:#385168!important;color:#f5f9ff!important;-webkit-text-fill-color:currentColor!important}
html[data-ceo-policy-theme="light"] #app .topbar button#ceo-phone-pilot-open#ceo-phone-pilot-open{background:#fff!important;background-image:none!important;border-color:#9bbcad!important;color:#17384a!important}

/* Read-only customer message history, scoped to the account's existing composer. */
#ceo-phone-pilot-customer-items .sms-h-customer-row{padding:8px 0;border-bottom:1px solid #64748b55}
#ceo-phone-pilot-customer-items .sms-h-customer-row:last-child{border-bottom:0}
#ceo-phone-pilot-customer-items .sms-h-customer-row>label{margin:0}
#ceo-phone-pilot .sms-h-customer-meta{display:flex;gap:8px;align-items:center;justify-content:space-between;padding-left:30px;margin:5px 0}
#ceo-phone-pilot .sms-h-customer-summary{white-space:pre-line;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
#ceo-phone-pilot .sms-h-customer-meta button{flex:none;font-size:12px;min-height:36px;padding:6px 9px}
#ceo-phone-pilot .sms-h-customer-summary[data-state="failed"],#ceo-phone-pilot .sms-h-customer-summary[data-state="unknown"],#ceo-phone-pilot .sms-h-customer-summary[data-state="expired"]{color:#ffc48f}
#ceo-sms-history-dialog{width:min(760px,calc(100vw - 24px));max-height:94dvh;margin:auto;padding:0;border:1px solid #7189aa;border-radius:14px;background:#101c30;color:#edf4ff;box-shadow:0 14px 70px #0007;overflow:hidden}
#ceo-sms-history-dialog[open]{display:flex;flex-direction:column}
#ceo-sms-history-dialog::backdrop{background:#020617b3}
#ceo-phone-pilot #ceo-sms-history-dialog header{flex:none}
#ceo-sms-history-dialog .sms-h-body{overflow:auto;padding:16px;overscroll-behavior:contain}
#ceo-phone-pilot .sms-h-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
#ceo-phone-pilot .sms-h-filters label{margin:0;font-size:13px}
#ceo-phone-pilot .sms-h-filters label:first-child{grid-column:1/-1}
#ceo-phone-pilot .sms-h-filters :is(input,select){min-width:0;font-size:14px}
#ceo-phone-pilot .sms-h-note{font-size:12px;color:#bad0e8;line-height:1.6}
#ceo-phone-pilot #sms-h-load[data-error="true"]{color:#ffc48f;font-weight:700}
#ceo-phone-pilot .sms-h-record{border:1px solid #7189aa;border-radius:10px;padding:14px;margin:12px 0;white-space:normal;overflow-wrap:anywhere}
#ceo-phone-pilot .sms-h-record h3{margin:0 0 6px;font-size:15px}
#ceo-phone-pilot .sms-h-record-state{font-weight:750}
#ceo-phone-pilot .sms-h-record:is([data-state="failed"],[data-state="unknown"],[data-state="expired"]){border-left:4px solid #f5ad65}
#ceo-phone-pilot .sms-h-record[data-mode="simulate"]{border-style:dashed}
#ceo-phone-pilot .sms-h-record dl{display:grid;grid-template-columns:95px minmax(0,1fr);gap:4px;font-size:13px}
#ceo-phone-pilot .sms-h-record dd{margin:0}
#ceo-phone-pilot .sms-h-record pre{max-height:260px;overflow:auto;font:inherit;margin-bottom:0}
#ceo-phone-pilot .sms-h-advice{font-size:13px;color:#bad0e8}
#ceo-phone-pilot .sms-h-reason{font-size:13px;white-space:pre-wrap}
#ceo-phone-pilot .sms-h-pages{display:flex;align-items:center;justify-content:space-between;gap:8px}
html[data-ceo-policy-theme="light"] #ceo-sms-history-dialog{background:#fff;color:#17384a;border-color:#91afa4}
html[data-ceo-policy-theme="light"] #ceo-phone-pilot :is(.sms-h-note,.sms-h-advice){color:#445f70}
html[data-ceo-policy-theme="light"] #ceo-phone-pilot .sms-h-customer-summary:is([data-state="failed"],[data-state="unknown"],[data-state="expired"]),html[data-ceo-policy-theme="light"] #ceo-phone-pilot #sms-h-load[data-error="true"]{color:#964b0b}
@media(max-width:520px){#ceo-sms-history-dialog{width:calc(100vw - 12px);max-height:96dvh}#ceo-sms-history-dialog .sms-h-body{padding:12px}#ceo-phone-pilot .sms-h-filters{grid-template-columns:minmax(0,1fr)}#ceo-phone-pilot .sms-h-customer-meta{padding-left:0;align-items:flex-start}#ceo-phone-pilot .sms-h-record dl{grid-template-columns:80px minmax(0,1fr)}}

#ceo-sms-history-dialog{width:min(1240px,calc(100vw - 24px))}
#ceo-phone-pilot #ceo-sms-history-dialog .sms-h-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
#ceo-phone-pilot #ceo-sms-history-dialog .sms-h-filters label:first-child{grid-column:auto}
#ceo-sms-history-dialog .sms-o-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0}
#ceo-sms-history-dialog .sms-o-metrics>div{padding:12px;border:1px solid #7189aa;border-radius:10px;display:flex;flex-direction:column;gap:5px}
#ceo-sms-history-dialog .sms-o-metrics strong{font-size:21px}
#ceo-sms-history-dialog .sms-o-daily{max-height:180px;overflow:auto;padding:8px 12px;border:1px solid #7189aa;border-radius:9px;margin-bottom:12px}
#ceo-sms-history-dialog .sms-o-daily:empty{display:none}
#ceo-sms-history-dialog .sms-o-table{width:100%;border-collapse:collapse;table-layout:fixed;font:inherit;color:inherit}
#ceo-sms-history-dialog .sms-o-table :is(th,td){padding:10px 8px;text-align:left;border-bottom:1px solid #7189aa;vertical-align:top;overflow-wrap:anywhere;color:inherit;white-space:normal}
#ceo-sms-history-dialog .sms-o-table th:nth-child(1){width:16%}
#ceo-sms-history-dialog .sms-o-table th:nth-child(2){width:19%}
#ceo-sms-history-dialog .sms-o-table th:nth-child(3){width:14%}
#ceo-sms-history-dialog .sms-o-table th:nth-child(4){width:11%}
#ceo-sms-history-dialog .sms-o-table th:nth-child(5){width:14%}
#ceo-sms-history-dialog .sms-o-table th:nth-child(6){width:26%}
#ceo-sms-history-dialog .sms-o-table details>div{max-height:350px;overflow:auto}
#ceo-sms-history-dialog .sms-o-table pre{font:inherit;white-space:pre-wrap;word-break:break-word;max-width:100%}
#ceo-sms-history-dialog .sms-o-table tr:is([data-state=failed],[data-state=unknown],[data-state=expired]){border-left:4px solid #ce904b}
#ceo-sms-history-dialog .sms-o-filter-panel{margin:10px 0}
#ceo-sms-history-dialog .sms-o-filter-panel>summary{cursor:pointer;font-weight:700;padding:9px;border:1px solid #7189aa;border-radius:8px}
@media(min-width:1000px){#ceo-sms-history-dialog .sms-o-metrics{grid-template-columns:repeat(7,minmax(0,1fr))}}
#ceo-sms-history-dialog .sms-o-metrics span{font-size:12px}
@media(max-width:700px){#ceo-sms-history-dialog .sms-o-table td[data-label=상세]{display:block}#ceo-sms-history-dialog .sms-o-table td[data-label=상세]::before{display:none}}
@media(max-width:700px){#ceo-phone-pilot #ceo-sms-history-dialog .sms-h-filters{grid-template-columns:repeat(2,minmax(0,1fr))}#ceo-sms-history-dialog .sms-o-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}#ceo-sms-history-dialog .sms-o-table,#ceo-sms-history-dialog .sms-o-table tbody,#ceo-sms-history-dialog .sms-o-table tr{display:block}#ceo-sms-history-dialog .sms-o-table thead{display:none}#ceo-sms-history-dialog .sms-o-table tr{border:1px solid #7189aa;border-radius:10px;margin:12px 0;padding:8px}#ceo-sms-history-dialog .sms-o-table td{display:grid;grid-template-columns:110px minmax(0,1fr);gap:6px;border:0;padding:6px;width:auto}#ceo-sms-history-dialog .sms-o-table td::before{content:attr(data-label);font-weight:700}}
@media(max-width:420px){#ceo-phone-pilot #ceo-sms-history-dialog .sms-h-filters{grid-template-columns:minmax(0,1fr)}#ceo-sms-history-dialog .sms-o-table td{grid-template-columns:90px minmax(0,1fr)}}
@media(max-width:520px){#ceo-sms-history-dialog .sms-o-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}#ceo-sms-history-dialog .sms-o-metrics>div{padding:8px}#ceo-phone-pilot #ceo-sms-history-dialog .sms-h-actions{gap:5px}#ceo-phone-pilot #ceo-sms-history-dialog .sms-h-actions button{min-height:36px;padding:6px 8px;font-size:12px}}
