.robot-modal{width:min(960px,calc(100% - 28px));padding:30px 32px}.robot-heading{display:flex;gap:20px;align-items:center;justify-content:space-between}.robot-heading h2{font-size:23px}.robot-heading>.pill{white-space:nowrap}.robot-notice{font-size:12px;line-height:1.8;background:#f1f7f3;border:1px solid #dceadf;border-radius:8px;padding:11px 14px;margin:18px 0;color:#2b6143;min-height:42px}.robot-notice.error{color:#a33129;background:#fff4f1;border-color:#efdbd5}.robot-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);margin-bottom:23px}.robot-tabs button{background:transparent;border:0;border-bottom:2px solid transparent;padding:12px 16px;font-size:13px;color:var(--muted);cursor:pointer}.robot-tabs button[aria-selected=true]{color:var(--green);border-bottom-color:var(--green);font-weight:600}.robot-columns{display:grid;grid-template-columns:1fr 1fr;gap:30px}.robot-form h3{font-size:15px;margin:0 0 9px}.robot-help{color:var(--muted);font-size:11px;line-height:1.85;margin:7px 0 12px}.robot-panel label{display:block;font-size:12px;font-weight:550;margin:15px 0 7px}.robot-panel input:not([type=checkbox]),.robot-panel select,.robot-panel textarea{display:block;width:100%;min-width:0;border:1px solid #dbe4df;border-radius:8px;background:#fff;color:var(--ink);padding:10px 12px;font:inherit;font-size:13px;line-height:1.6;outline:none}.robot-panel textarea{resize:vertical}.robot-panel input:focus,.robot-panel select:focus,.robot-panel textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #11855c14}.robot-panel .robot-check{display:flex;align-items:flex-start;gap:9px;font-weight:400;font-size:12px;line-height:1.8}.robot-check input{margin-top:4px;accent-color:var(--green);width:16px;height:16px;flex-shrink:0}.robot-check small{display:block;color:var(--muted);font-size:11px;line-height:1.8;margin-top:5px}.robot-enable{padding:13px;background:#f7faf8;border-radius:8px;margin:18px 0!important}.robot-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.robot-knowledge{border-left:1px solid var(--line);padding-left:28px}.robot-kb-card{display:flex;gap:12px;padding:16px;border:1px solid #dceadf;background:#f7faf8;border-radius:10px;font-size:12px;line-height:1.8;margin:14px 0}.robot-kb-card>svg{width:23px;height:23px;color:var(--green);flex-shrink:0}.robot-kb-card p{color:var(--muted);font-size:11px;margin-top:6px}.robot-actions{display:flex;flex-wrap:wrap;gap:8px;margin:13px 0}.robot-actions .button{font-size:11px;padding:9px 11px}.robot-preview{background:#f8faf9;border:1px solid var(--line);border-radius:9px;padding:14px;font-size:12px;line-height:1.8;overflow-wrap:anywhere}.robot-preview details{border-top:1px solid var(--line);padding:9px 0}.robot-preview summary{cursor:pointer;color:#3f6452}.robot-answer{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.85;font-size:13px;margin:9px 0 13px}.robot-group-layout{display:grid;grid-template-columns:1fr 1.5fr;gap:28px}.robot-runs-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.robot-run{border:1px solid var(--line);border-radius:9px;padding:16px;margin:12px 0}.robot-run strong{font-size:13px}.robot-run time{margin:0;white-space:nowrap}.robot-empty{padding:45px 20px;text-align:center;font-size:13px;line-height:1.9;color:var(--muted)}.robot-evidence{display:inline-block;background:#edf4ee;color:#42614b;font-size:10px;border-radius:5px;padding:3px 7px;margin:2px 5px 2px 0}.robot-panel #robot-key-status{font-weight:400;font-size:10px;color:var(--muted);margin-left:6px}.robot-panel .button{min-height:42px}.robot-panel .button:disabled{opacity:.6;cursor:wait}
@media(max-width:760px){.robot-modal{padding:23px 19px}.robot-heading{align-items:flex-start;flex-direction:column;gap:8px}.robot-heading h2{font-size:20px}.robot-columns,.robot-group-layout{grid-template-columns:1fr;gap:24px}.robot-knowledge{border-left:0;border-top:1px solid var(--line);padding:23px 0 0}.robot-tabs{gap:0}.robot-tabs button{font-size:12px;padding:11px 8px;flex:1}.robot-panel input:not([type=checkbox]),.robot-panel select,.robot-panel textarea{font-size:16px}.robot-runs-heading{align-items:flex-start;flex-wrap:wrap}}

.preview-thread{max-height:240px;overflow:auto;display:flex;flex-direction:column;gap:8px;margin:10px 0}.preview-turn{font-size:12px;line-height:1.85;white-space:pre-wrap;padding:10px 12px;border-radius:8px;background:#f2f7f3;overflow-wrap:anywhere}.preview-turn.user{background:#eef3f7}.knowledge-search{display:grid;grid-template-columns:minmax(160px,1fr) 150px 145px auto;gap:8px;margin:20px 0 12px}.knowledge-search input,.knowledge-search select{min-width:0;border:1px solid var(--line);border-radius:8px;padding:10px;background:#fff;color:var(--ink);font-size:12px}.knowledge-case{border:1px solid var(--line);border-radius:9px;padding:14px;margin:10px 0;cursor:pointer}.knowledge-case:hover{background:#f7faf8}.knowledge-case h3{font-size:13px;margin-bottom:7px;line-height:1.7}.knowledge-case p{font-size:11px;line-height:1.8;color:var(--muted)}.knowledge-original{font-size:12px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;border-bottom:1px solid var(--line)}.knowledge-original small{color:var(--muted)}#knowledge-detail{border-top:1px solid var(--line);margin-top:20px;padding-top:15px}#knowledge-detail h3{font-size:14px}.knowledge-origin{font-size:10px;color:var(--muted);overflow-wrap:anywhere;margin:8px 0}@media(max-width:760px){.knowledge-search{grid-template-columns:1fr 1fr}.knowledge-search input{grid-column:1/-1}.knowledge-search input,.knowledge-search select{font-size:16px}.knowledge-search button{grid-column:1/-1}}

.knowledge-case{display:block;width:100%;text-align:left;background:#fff;color:var(--ink);overflow-wrap:anywhere}.knowledge-case:focus-visible{outline:2px solid var(--green);outline-offset:2px}

.robot-smart-options{padding:15px;border:1px solid var(--line);border-radius:9px;background:#f7faf8;margin:15px 0}.robot-smart-options h3,.robot-smart-preview h3{font-size:14px}.robot-smart-preview{border-top:1px solid var(--line);margin-top:24px;padding-top:20px}.robot-smart-preview textarea{margin:10px 0}.robot-smart-preview .robot-preview{margin-top:12px}

.attachment-open{display:block;margin-top:9px;border:0;background:transparent;color:var(--green);font-size:12px;text-align:left;cursor:pointer;padding:4px 0}.attachment-open:focus-visible{outline:2px solid var(--green)}.attachment-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0}.attachment-content{background:#f7faf8;border:1px solid var(--line);border-radius:10px;padding:16px;font-family:inherit;font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;max-height:380px;overflow:auto;min-height:100px}.attachment-question{border-top:1px solid var(--line);margin-top:24px;padding-top:20px}.attachment-question h3{font-size:15px}.attachment-question textarea{display:block;width:100%;border:1px solid var(--line);border-radius:8px;padding:12px;margin:10px 0;font:inherit;resize:vertical}.attachment-question .preview-thread{max-height:320px}#attachment-title{overflow-wrap:anywhere}@media(max-width:760px){.attachment-question textarea{font-size:16px}.attachment-content{max-height:300px}}

.robot-pacing{border:1px solid var(--line);border-radius:9px;padding:15px;margin:18px 0}.robot-pacing legend{font-size:14px;font-weight:650;padding:0 6px}

/* The robot manager is a full workspace; other document dialogs stay compact. */
#robot-dialog{width:100vw;max-width:none;height:100dvh;max-height:none;inset:0;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;background:#f6f8f7;box-shadow:none}
#robot-dialog[open]{display:flex;flex-direction:column}
#robot-dialog .robot-workspace-header{display:flex;align-items:center;gap:24px;padding:18px 30px;background:#fff;border-bottom:1px solid var(--line);flex-shrink:0}
#robot-dialog .robot-workspace-header h2{font-size:21px;margin:0 0 5px;letter-spacing:0}
#robot-dialog .robot-workspace-header p{font-size:12px;color:var(--muted);margin:0}
#robot-dialog .robot-workspace-header>.pill{margin-left:auto;white-space:nowrap}
#robot-dialog .robot-exit{min-height:42px;border-radius:8px;background:#f7faf8;white-space:nowrap}
#robot-dialog .robot-tabs{margin:0;padding:0 30px;background:#fff;flex-shrink:0}
#robot-dialog .robot-tabs button{min-height:49px;font-size:14px;padding:12px 22px}
#robot-dialog .robot-notice{margin:0;padding:9px 30px;min-height:0;border:0;border-bottom:1px solid #e1ece5;border-radius:0;flex-shrink:0;font-size:12px}
#robot-dialog .robot-notice:empty{display:none}
#robot-dialog>.robot-panel{min-height:0;flex:1;overflow:auto;padding:28px 32px;overscroll-behavior:contain}
#robot-dialog #robot-groups-panel{padding:0;overflow:hidden}
#robot-dialog .robot-columns{max-width:1250px;margin:0 auto;gap:28px}
#robot-dialog .robot-columns>.robot-form{background:#fff;border:1px solid var(--line);border-radius:12px;padding:25px;min-width:0}
#robot-dialog .robot-runs-heading,#robot-dialog #robot-runs{max-width:1250px;margin-left:auto;margin-right:auto}
.robot-group-workspace{height:100%;display:grid;grid-template-columns:320px minmax(0,1fr);min-height:0}
.robot-conversation-sidebar{min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--line);background:#fff}
.robot-directory-top{padding:21px 18px 5px;flex-shrink:0}
.robot-directory-top h3{font-size:16px;margin:0 0 16px}
#robot-dialog #robot-conversation-search{min-height:44px;background:#f7f9f8;font-size:13px}
.robot-kind-filters{display:flex;gap:4px;border-radius:8px;background:#f0f4f2;padding:4px;margin:13px 0 11px}
.robot-kind-filters button{flex:1;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:12px;min-height:36px}
.robot-kind-filters button[aria-pressed=true]{background:#fff;color:var(--green-dark);font-weight:600;box-shadow:0 1px 4px #233d2a0c}
#robot-dialog #robot-conversation-status{font-size:12px;min-height:40px;padding:8px 10px}
#robot-conversation-count{margin:10px 1px;font-size:11px}
.robot-conversation-list{overflow-y:auto;flex:1;min-height:0;padding:2px 9px 10px;scrollbar-width:thin;overscroll-behavior:contain}
.robot-conversation-row{display:flex;gap:12px;align-items:flex-start;width:100%;text-align:left;border:1px solid transparent;background:transparent;padding:14px 10px;border-radius:9px;min-height:92px;color:var(--ink);margin:3px 0}
.robot-conversation-row:hover{background:#f5f8f6}
.robot-conversation-row[aria-current=true]{border-color:#cfe5d8;background:#edf7f1}
.robot-conversation-row:focus-visible{outline:2px solid var(--green);outline-offset:-2px}
.robot-conversation-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;background:#e6f0e9;color:#4b735d;border-radius:10px;font-size:17px;overflow:hidden}
.robot-conversation-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.robot-conversation-copy{display:flex;flex:1;flex-direction:column;min-width:0;gap:4px}
.robot-conversation-copy>strong{font-size:13px;font-weight:600;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.robot-conversation-copy>small{color:var(--muted);font-size:11px}
.robot-conversation-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:3px}
.robot-conversation-badges span{font-size:10px;color:#6c7782;background:#f0f3f2;padding:2px 5px;border-radius:4px;line-height:1.5}
.robot-conversation-badges .is-on{color:#237349;background:#dcefe2}
.robot-conversation-badges .is-draft{color:#936110;background:#fff0d5}
.robot-directory-pages{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 16px;border-top:1px solid var(--line);font-size:12px;color:var(--muted);flex-shrink:0}
#robot-dialog .robot-directory-pages .button{padding:7px 10px;min-height:40px;font-size:12px}
.robot-directory-empty{padding:35px 15px;color:var(--muted);font-size:12px;line-height:1.9;text-align:center}
.robot-conversation-detail{display:flex;flex-direction:column;min-width:0;min-height:0}
.robot-selected-header{display:flex;align-items:center;gap:15px;padding:20px 28px;border-bottom:1px solid var(--line);background:#fff;flex-shrink:0}
.robot-selected-header #robot-selected-avatar{display:flex}
.robot-selected-header .robot-conversation-avatar{width:46px;height:46px;flex-basis:46px}
.robot-selected-name{min-width:0;flex:1}
.robot-selected-name h3{font-size:18px;line-height:1.5;font-weight:600;margin:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere}
.robot-selected-name p{font-size:12px;color:var(--muted);margin:5px 0 0}
.robot-selected-header>.pill{white-space:nowrap}
#robot-back-to-list{display:none}
.robot-settings-scroll{overflow-y:auto;flex:1;min-height:0;padding:20px 28px 28px;overscroll-behavior:contain;scrollbar-width:thin}
.robot-current-summary{font-size:12px;color:#50695b;line-height:1.7;margin:0 auto 16px;max-width:1180px}
.robot-settings-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:22px;max-width:1180px;margin:auto;align-items:start}
.robot-settings-main{min-width:0}
#robot-dialog #robot-group-form,#robot-dialog .robot-smart-preview{padding:23px;background:#fff;border:1px solid var(--line);border-radius:12px;margin:0 0 20px}
#robot-dialog #robot-group-form>h3{font-size:16px}
#robot-trigger{display:none!important}
.robot-mode-picker{border:0;padding:0;margin:21px 0}
.robot-mode-picker legend{font-size:13px;font-weight:600;margin-bottom:12px}
.robot-mode-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px}
#robot-dialog .robot-mode-grid>label{display:flex;gap:8px;align-items:flex-start;border:1px solid #dbe4df;border-radius:9px;padding:14px 11px;margin:0;background:#fff;cursor:pointer;font-weight:400;min-height:86px}
#robot-dialog .robot-mode-grid>label:has(input:checked){border-color:var(--green);background:#f0f8f3;box-shadow:0 0 0 1px #13865d15}
#robot-dialog input[type=radio]{width:16px;height:16px;min-width:16px;padding:0;display:block;margin:3px 0 0;accent-color:var(--green);box-shadow:none;flex-shrink:0}
.robot-mode-grid strong{display:block;font-size:13px;font-weight:600;line-height:1.6}
.robot-mode-grid small{display:block;font-size:11px;color:var(--muted);font-weight:400;line-height:1.8;margin-top:4px}
#robot-extra-modes{margin-top:13px;color:var(--muted);font-size:12px}
#robot-extra-modes>summary{cursor:pointer;min-height:32px;padding:7px 0}
.robot-access-card{background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.robot-access-card>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;min-height:65px;padding:18px;font-size:13px;list-style:none}
.robot-access-card>summary:after{content:'⌄';color:#718173;font-size:18px;line-height:1}
.robot-access-card[open]>summary:after{content:'⌃'}
.robot-access-card>summary .pill{margin-left:auto;font-size:10px}
.robot-access-content{padding:0 18px 10px;border-top:1px solid var(--line)}
#robot-dialog .robot-access-content .robot-check{font-weight:550;font-size:12px;margin-top:19px}
.robot-setting-tip{padding:19px 5px;color:var(--muted);font-size:12px;line-height:1.9}
.robot-setting-tip strong{font-size:12px;color:#54675b;font-weight:550}
.robot-setting-tip p{margin:7px 0 0}
.robot-group-savebar{display:flex;align-items:center;gap:12px;background:#fff;border-top:1px solid var(--line);padding:15px 28px;flex-shrink:0}
.robot-group-savebar>div{flex:1;min-width:0}
.robot-group-savebar strong{font-size:12px;font-weight:600}
.robot-group-savebar p{font-size:11px;color:var(--muted);margin:5px 0 0;line-height:1.6}
.robot-group-savebar .button{font-size:12px;min-height:42px;white-space:nowrap}
.robot-group-workspace[data-empty=true] .robot-settings-scroll,.robot-group-workspace[data-empty=true] .robot-group-savebar{display:none}
@media(max-width:1200px){.robot-group-workspace{grid-template-columns:290px minmax(0,1fr)}.robot-settings-grid{grid-template-columns:minmax(0,1fr)}.robot-access-column{grid-row:1}.robot-setting-tip{display:none}.robot-mode-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.robot-selected-header{padding:18px 22px}.robot-settings-scroll{padding:18px 22px}.robot-group-savebar{padding:13px 22px}}
@media(max-width:760px){
 #robot-dialog .robot-workspace-header{gap:12px;padding:12px 14px;min-height:76px}#robot-dialog .robot-exit{font-size:12px;padding:8px 10px}#robot-dialog .robot-workspace-header h2{font-size:16px;margin:0 0 4px}#robot-dialog .robot-workspace-header p{display:none}#robot-dialog .robot-workspace-header>.pill{font-size:10px}
 #robot-dialog .robot-tabs{padding:0 10px}#robot-dialog .robot-tabs button{padding:10px 8px;font-size:12px;min-height:46px}#robot-dialog .robot-notice{padding:8px 15px;font-size:11px}
 #robot-dialog>.robot-panel{padding:18px 14px}#robot-dialog .robot-columns{gap:16px}#robot-dialog .robot-columns>.robot-form{padding:19px}
 .robot-group-workspace{grid-template-columns:1fr}.robot-conversation-sidebar{border-right:0}.robot-directory-top{padding:18px 17px 4px}#robot-dialog #robot-conversation-search{font-size:16px}.robot-directory-top h3{margin-bottom:12px}.robot-conversation-row{min-height:96px;padding:14px}.robot-conversation-copy>strong{font-size:14px}.robot-kind-filters button{min-height:40px;font-size:13px}#robot-dialog #robot-conversation-status{font-size:14px}.robot-conversation-list{padding:0 8px 10px}
 .robot-group-workspace[data-view=list] .robot-conversation-detail{display:none}.robot-group-workspace[data-view=detail] .robot-conversation-sidebar{display:none}
 #robot-back-to-list{display:inline-flex;font-size:11px;min-height:35px;padding:7px 8px;flex-shrink:0}.robot-selected-header{padding:12px 13px;gap:9px;flex-wrap:wrap}.robot-selected-header #robot-selected-avatar{display:none}.robot-selected-name h3{font-size:14px;-webkit-line-clamp:1}.robot-selected-name p{font-size:10px}.robot-selected-header>.pill{font-size:10px}.robot-settings-scroll{padding:15px 13px}.robot-settings-grid{gap:15px}
 #robot-dialog #robot-group-form,#robot-dialog .robot-smart-preview{padding:17px}.robot-mode-grid{grid-template-columns:1fr}.robot-mode-grid small{margin-top:2px}#robot-dialog .robot-mode-grid>label{min-height:64px;padding:12px}.robot-access-card>summary{min-height:57px;padding:15px}.robot-group-savebar{gap:8px;padding:11px 12px}.robot-group-savebar p{font-size:10px}.robot-group-savebar strong{font-size:11px}.robot-group-savebar .button{padding:9px 10px;font-size:11px;min-height:42px}.robot-group-savebar>div{min-width:85px}
}
#robot-dialog .robot-mode-grid>label:focus-within{outline:2px solid var(--green);outline-offset:2px}
#robot-dialog .robot-group-savebar .button:disabled,#robot-dialog .robot-directory-pages .button:disabled{cursor:not-allowed}

#redemption-tasks .robot-run{overflow-wrap:anywhere}#robot-redemptions-panel code{overflow-wrap:anywhere}.robot-tabs{overflow-x:auto;flex-shrink:0}.robot-tabs button{white-space:nowrap}
