:root{color-scheme:dark;--bg:#0a0c0f;--panel:#11151a;--line:#252c34;--text:#eef3f6;--muted:#88949e;--accent:#7cf5c7;--accent2:#60a5fa;--danger:#ff7b7b}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 15% -10%,#18312b 0,transparent 32%),var(--bg);color:var(--text);font:14px/1.5 Inter,ui-sans-serif,system-ui,"Microsoft YaHei",sans-serif}main{width:min(1120px,calc(100% - 32px));margin:48px auto 80px}header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:28px}.eyebrow{color:var(--accent);letter-spacing:.2em;font-size:11px;font-weight:700;margin:0 0 8px}h1{font-size:clamp(30px,5vw,54px);letter-spacing:-.04em;margin:0}.subtitle{color:var(--muted);margin:8px 0 0}.badge{border:1px solid var(--line);border-radius:999px;padding:9px 14px;color:var(--muted);background:#0d1115}.badge.ok{color:var(--accent);border-color:#28644f}.badge.bad{color:var(--danger);border-color:#613131}.panel{background:linear-gradient(145deg,rgba(19,24,29,.97),rgba(14,17,21,.97));border:1px solid var(--line);border-radius:18px;padding:26px;margin-bottom:18px;box-shadow:0 22px 60px rgba(0,0,0,.22)}.primary-setting{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;padding:0 0 24px;margin-bottom:24px;border-bottom:1px solid var(--line)}.section-title{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:700;margin:4px 0 16px}.section-title:not(:first-child){margin-top:30px}.section-title span{font:11px/1 ui-monospace,monospace;color:var(--accent);border:1px solid #28644f;border-radius:5px;padding:5px}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}label{display:flex;flex-direction:column;gap:7px;color:#aab4bc;font-size:12px}.wide{grid-column:1/-1}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:9px;background:#0b0f13;color:var(--text);padding:11px 12px;outline:none;font:inherit;transition:.2s}textarea{resize:vertical;font-family:ui-monospace,Consolas,monospace}input:focus,select:focus,textarea:focus{border-color:#387a64;box-shadow:0 0 0 3px rgba(124,245,199,.08)}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:26px}button{border:0;border-radius:9px;background:var(--accent);color:#07120e;font-weight:750;padding:11px 18px;cursor:pointer}button:hover{filter:brightness(1.07)}button:disabled{opacity:.5;cursor:wait}.secondary,.ghost{background:#1d252c;color:var(--text);border:1px solid var(--line)}.ghost{padding:8px 12px}.input-action{display:flex;gap:8px}.input-action input{min-width:0}.inline-button{flex:0 0 auto;padding:8px 12px;background:#1d252c;color:var(--text);border:1px solid var(--line);font-size:12px}.detect-state{margin-left:6px;color:var(--muted);font-size:11px}.detect-state.online{color:var(--accent)}.detect-state.offline{color:var(--danger)}.results-head{display:flex;justify-content:space-between;align-items:flex-start}.results .section-title{margin-top:0}.results p{color:var(--muted);margin:0}.tasks{display:grid;gap:10px;margin-top:18px}.task{border:1px solid var(--line);border-radius:12px;background:#0c1014;padding:15px;display:grid;grid-template-columns:1.2fr .8fr auto;gap:12px;align-items:center}.task-main strong{display:block;margin-bottom:4px}.task-main small,.meta{color:var(--muted)}.status{font-family:ui-monospace,monospace;color:var(--accent2)}.status.error{color:var(--danger)}.status.imported,.status.done{color:var(--accent)}.stop{padding:7px 11px;background:#302020;color:#ffaaaa;border:1px solid #593030}.empty{text-align:center;color:var(--muted);padding:28px}#toast{position:fixed;right:22px;bottom:22px;background:#1a2229;border:1px solid var(--line);border-radius:10px;padding:12px 16px;opacity:0;transform:translateY(8px);transition:.2s;pointer-events:none}#toast.show{opacity:1;transform:none}@media(max-width:760px){main{margin-top:24px}.primary-setting,.grid{grid-template-columns:1fr}.wide{grid-column:auto}header{gap:16px}.badge{font-size:11px}.task{grid-template-columns:1fr}.actions button{flex:1}.input-action{align-items:stretch}}

main{width:min(1560px,calc(100% - 32px))}.workspace{display:grid;grid-template-columns:minmax(0,2.15fr) minmax(360px,.85fr);gap:18px;align-items:start}.workspace>.panel{margin-bottom:0}.field-label{display:flex;align-items:center;min-height:18px}.detect-state{display:inline-flex;align-items:center;margin-left:8px}.log-panel{position:sticky;top:18px;display:flex;flex-direction:column;min-height:640px;max-height:calc(100vh - 36px);overflow:hidden}.log-panel .results-head{flex:0 0 auto}.log-panel .tasks{flex:1;overflow-y:auto;padding-right:4px;align-content:start}.log-panel .task{display:block}.task-head,.task-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}.task-head strong{min-width:0;overflow-wrap:anywhere}.task-message{color:var(--muted);font-size:12px;margin:7px 0;overflow-wrap:anywhere}.task-foot .meta{font-size:12px}.log-panel .empty{margin:auto 0}.inline-button{white-space:nowrap}
.proxy-field-label{justify-content:space-between;gap:10px}
@media(max-width:1180px){main{width:min(1000px,calc(100% - 32px))}.workspace{grid-template-columns:1fr}.log-panel{position:static;min-height:320px;max-height:600px}.workspace>.panel{margin-bottom:0}}
.title-line{position:relative;display:flex;align-items:center;gap:16px;flex-wrap:wrap}.path-button{padding:8px 13px;background:#14221e;color:var(--accent);border:1px solid #28644f;font-size:12px;white-space:nowrap}.paths-popover{position:absolute;z-index:20;top:calc(100% + 12px);left:0;width:min(620px,calc(100vw - 48px));padding:16px;background:#11181d;border:1px solid #2c3b42;border-radius:13px;box-shadow:0 24px 70px rgba(0,0,0,.55)}.paths-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.paths-close{padding:2px 8px;background:transparent;color:var(--muted);font-size:22px;line-height:1}.paths-list{display:grid;gap:8px}.path-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 11px;background:#0b1014;border:1px solid var(--line);border-radius:9px}.path-row span{display:block;color:#aab4bc;font-size:11px;margin-bottom:3px}.path-row code{display:block;color:var(--text);font:12px/1.4 ui-monospace,Consolas,monospace;overflow-wrap:anywhere}.copy-path{padding:7px 10px;background:#1d2a30;color:var(--text);border:1px solid #33424a;font-size:12px}.paths-loading,.paths-error{padding:18px;color:var(--muted);text-align:center}.paths-error{color:var(--danger)}[hidden]{display:none!important}@media(max-width:760px){.title-line{gap:10px}.path-button{padding:7px 10px}.paths-popover{left:-4px}.path-row{grid-template-columns:1fr}.copy-path{justify-self:start}}
.header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}.path-control,.download-control{position:relative}.header-actions .paths-popover{left:auto;right:0}.header-actions .path-button,.header-actions .badge{height:42px;display:inline-flex;align-items:center}.download-popover{width:min(520px,calc(100vw - 48px))}.download-popover .download-bar{margin-top:0}@media(max-width:760px){header{align-items:flex-start}.header-actions{flex-direction:column-reverse;align-items:flex-end}.header-actions .paths-popover{position:fixed;top:110px;right:16px;left:16px;width:auto}}
#toast{z-index:100;top:50%;right:auto;bottom:auto;left:50%;min-width:280px;max-width:min(560px,calc(100vw - 40px));padding:16px 22px;text-align:center;font-size:15px;font-weight:650;border-color:#36504a;background:rgba(22,31,35,.98);box-shadow:0 26px 90px rgba(0,0,0,.65),0 0 0 1px rgba(124,245,199,.08);transform:translate(-50%,-42%) scale(.96)}#toast.show{transform:translate(-50%,-50%) scale(1)}
#toast{top:112px}@media(max-width:760px){#toast{top:96px;min-width:240px}}
.config-panel,.log-panel{height:650px;min-height:650px;max-height:650px}.config-panel{display:flex;flex-direction:column;overflow:hidden;padding:0}.config-toolbar{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:72px;padding:14px 26px;border-bottom:1px solid var(--line);background:rgba(18,23,28,.96)}.config-toolbar-title{font-size:16px;font-weight:750;color:var(--text)}.config-toolbar .actions{margin:0}.config-scroll{flex:1;min-height:0;overflow-y:auto;padding:24px 26px 28px;scrollbar-gutter:stable}.config-scroll::-webkit-scrollbar,.log-panel .tasks::-webkit-scrollbar{width:8px}.config-scroll::-webkit-scrollbar-track,.log-panel .tasks::-webkit-scrollbar-track{background:#0b0f13;border-radius:8px}.config-scroll::-webkit-scrollbar-thumb,.log-panel .tasks::-webkit-scrollbar-thumb{background:#34414a;border-radius:8px}.config-scroll::-webkit-scrollbar-thumb:hover,.log-panel .tasks::-webkit-scrollbar-thumb:hover{background:#465862}.log-panel{min-height:650px;max-height:650px}@media(max-width:1180px){.config-panel,.log-panel{height:620px;min-height:620px;max-height:620px}}@media(max-width:760px){.config-toolbar{padding:12px 16px;align-items:flex-start}.config-toolbar-title{display:none}.config-toolbar .actions{width:100%}.config-toolbar .actions button{flex:1}.config-scroll{padding:20px 16px 24px}}
.download-bar{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;margin-top:16px;padding:13px;background:#0b1014;border:1px solid var(--line);border-radius:11px}.download-bar label{gap:5px}.download-bar select{padding:8px 9px;font-size:12px}.download-button{grid-column:1/-1;padding:9px 12px}.log-panel .tasks{margin-top:12px}.status.queued,.status.starting,.status.started,.status.running,.status.waiting_solver,.status.solving_turnstile,.status.registering,.status.waiting_email,.status.creating_account,.status.fetching_sso,.status.importing,.status.probing,.status.auto_importing{color:#f4c76b}.status.cancelled,.status.stopped,.status.partial{color:#aab4bc}
.side-column{display:block;height:650px;min-height:650px}.side-column>.panel{margin:0}.side-column .log-panel{position:static;height:650px;min-height:650px;max-height:650px}@media(max-width:1180px){.side-column{height:auto;min-height:0}.side-column .log-panel{height:620px;min-height:620px;max-height:620px}}@media(max-width:760px){.side-column .log-panel{height:720px;min-height:720px;max-height:720px}.download-bar{grid-template-columns:1fr}}
.config-panel,.side-column,.side-column .log-panel{height:720px;min-height:720px;max-height:720px}@media(max-width:1180px){.config-panel{height:680px;min-height:680px;max-height:680px}.side-column{height:auto;min-height:0;max-height:none}.side-column .log-panel{height:680px;min-height:680px;max-height:680px}}@media(max-width:760px){.config-panel{height:620px;min-height:620px;max-height:620px}.side-column .log-panel{height:720px;min-height:720px;max-height:720px}}
.pipeline-group{display:grid;gap:9px;padding-bottom:12px;border-bottom:1px solid var(--line)}.pipeline-group:last-child{border-bottom:0}.flow-task{border-left:3px solid #34414a}.flow-task:nth-child(1){border-left-color:#60a5fa}.flow-task:nth-child(2){border-left-color:#f4c76b}.flow-task:nth-child(3){border-left-color:#7cf5c7}.flow-error{margin-top:8px;padding:7px 9px;border-radius:7px;background:rgba(255,123,123,.08);color:#ffaaaa;font-size:11px;line-height:1.45;overflow-wrap:anywhere}.flow-task .task-message{margin:6px 0}.flow-task .task-foot{align-items:flex-end}.flow-task .meta{line-height:1.5}
.toolbar-format{min-width:155px;gap:4px;font-size:11px}.toolbar-format select{height:42px;padding:8px 10px}.config-toolbar .actions{align-items:flex-end}@media(max-width:760px){.toolbar-format{min-width:0;flex:1}.config-toolbar .actions{flex-wrap:wrap}.toolbar-format select{height:40px}}
.pause-task,.resume-task{padding:7px 11px}.pause-task{background:#302a20;color:#ffd792;border:1px solid #5d4c2d}.resume-task{background:#173429;color:var(--accent);border:1px solid #28644f}.status.pausing,.status.paused{color:#f4c76b}
.results-head>div:first-child{min-width:0;flex:1}.results-actions{display:flex;flex:0 0 auto;gap:8px}.results-actions button{white-space:nowrap}.reset-round{color:#ffb0b0;border-color:#593030;background:#2b1d1d}
.retry-task{padding:7px 11px;background:#172b38;color:#8dccff;border:1px solid #29506a}#manual-import-button{height:42px;white-space:nowrap}
.primary-setting{grid-template-columns:repeat(4,minmax(0,1fr))}.tune-toggle{display:grid;grid-template-columns:auto 48px;align-content:end;align-items:center;justify-content:start;column-gap:10px}.tune-toggle input{appearance:none;width:48px;height:26px;padding:0;border-radius:13px;background:#242d34;position:relative;cursor:pointer}.tune-toggle input::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#8b969f;transition:.2s}.tune-toggle input:checked{background:#28644f;border-color:#387a64}.tune-toggle input:checked::after{left:25px;background:var(--accent)}.performance-profile{padding:10px 12px;border:1px solid #2b3941;border-radius:8px;background:#0b1014;color:var(--muted);font-size:12px}.performance-profile strong{color:var(--accent);font-weight:700}@media(max-width:760px){.primary-setting{grid-template-columns:1fr}.tune-toggle{align-content:start}}
@media(max-width:760px){.config-toolbar .actions{display:grid;grid-template-columns:1fr 1fr;align-items:end}.toolbar-format{grid-column:1/-1;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px}.toolbar-format select{width:100%}#manual-import-button,#save{grid-column:1/-1}.config-toolbar .actions button{width:100%}}
.safety-modal{position:fixed;z-index:110;inset:0;display:grid;place-items:center;padding:20px;background:rgba(3,7,10,.76);backdrop-filter:blur(5px)}.safety-dialog{width:min(560px,100%);padding:28px;border:1px solid #654b2e;border-radius:16px;background:linear-gradient(145deg,#17191b,#101418);box-shadow:0 30px 100px rgba(0,0,0,.72);text-align:center}.safety-icon{display:grid;place-items:center;width:44px;height:44px;margin:0 auto 12px;border:1px solid #8b6337;border-radius:50%;background:#332719;color:#ffd08a;font-size:24px;font-weight:800}.safety-dialog h2{margin:0 0 10px;font-size:22px}.safety-dialog p{margin:0;color:#aab4bc;line-height:1.75}.safety-dialog p strong{color:#ffd08a}.safety-actions{display:flex;justify-content:center;gap:10px;margin-top:22px}.safety-actions button{min-height:42px}@media(max-width:650px){.safety-dialog{padding:24px 18px}.safety-actions{display:grid;grid-template-columns:1fr}.safety-actions button{width:100%}}
.monitor-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:16px}.monitor-stat{min-width:0;padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:#0b1014}.monitor-stat span{display:block;color:var(--muted);font-size:10px;white-space:nowrap}.monitor-stat strong{display:block;margin-top:2px;font:700 19px/1.25 ui-monospace,Consolas,monospace;color:var(--text)}.monitor-stat.success strong{color:var(--accent)}.monitor-stat.danger strong{color:#ff9a9a}.manual-probe-card{grid-column:1/-1;display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:7px;padding:10px 13px;text-align:left;background:#152a25;color:var(--accent);border:1px solid #28644f}.manual-probe-card strong{font:750 18px/1 ui-monospace,Consolas,monospace}.manual-probe-card small{color:#9ccab9;font-size:10px}.activity-label{display:flex;align-items:center;justify-content:space-between;margin-top:16px;padding-top:13px;border-top:1px solid var(--line);color:#cbd4da;font-size:12px;font-weight:700}.activity-label small{color:var(--muted);font-weight:400}.log-panel .activity-feed{position:relative;margin-top:8px;padding-left:17px}.activity-feed:before{content:"";position:absolute;top:5px;bottom:5px;left:5px;width:1px;background:#2b3941}.activity-item{position:relative;padding:10px 11px;border:1px solid var(--line);border-radius:10px;background:#0b1014}.activity-item:before{content:"";position:absolute;top:15px;left:-17px;width:9px;height:9px;border:2px solid #11151a;border-radius:50%;background:#66727b}.activity-item.running:before,.activity-item.waiting:before{background:#f4c76b}.activity-item.success:before{background:var(--accent)}.activity-item.failed:before{background:var(--danger)}.activity-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.activity-title{min-width:0;color:var(--text);font-size:12px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.activity-time{flex:0 0 auto;color:#66727b;font:10px/1 ui-monospace,Consolas,monospace}.activity-message{margin-top:5px;color:#aab4bc;font-size:11px;line-height:1.5;overflow-wrap:anywhere}.activity-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px}.activity-status{color:var(--muted);font-size:10px}.activity-item.running .activity-status,.activity-item.waiting .activity-status{color:#f4c76b}.activity-item.success .activity-status{color:var(--accent)}.activity-item.failed .activity-status{color:var(--danger)}.activity-actions{display:flex;gap:6px}.activity-actions button{padding:5px 8px;border-radius:6px;font-size:10px}.activity-empty{color:var(--muted);text-align:center;padding:24px 8px}@media(max-width:760px){.side-column .log-panel{height:720px;min-height:720px;max-height:720px}.monitor-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.manual-probe-card{grid-column:1/-1}.log-panel .activity-feed{padding-left:15px}.activity-item:before{left:-15px}}
.pause-current{height:42px;white-space:nowrap;background:#302a20;color:#ffd792;border:1px solid #5d4c2d}.pause-current.resume{background:#173429;color:var(--accent);border-color:#28644f}
.log-panel .tasks{overflow-x:hidden;scrollbar-width:thin}.log-panel .tasks::-webkit-scrollbar:horizontal{height:4px}.activity-item{min-width:0;max-width:100%}.activity-message{word-break:break-word}.safety-performance{display:grid;gap:4px;margin-top:16px;padding:13px 15px;border:1px solid #4e4934;border-radius:10px;background:#171914;text-align:left}.safety-performance span{color:#c8b98a;font-size:11px}.safety-performance strong{color:#f3f6f7;font-size:14px}.safety-performance small{color:#ffd08a;font-size:12px;line-height:1.55}
.batches-panel{margin-top:14px;padding:12px;background:#0b1014;border:1px solid var(--line);border-radius:11px;flex:0 0 auto;max-height:220px;overflow-y:auto}
.batches-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.batches-title{font-size:12px;font-weight:750;color:var(--text);display:flex;align-items:center;gap:6px}
.batches-badge{background:#1c2730;color:var(--accent);padding:1px 7px;border-radius:999px;font-size:11px}
.batches-tabs{display:flex;gap:4px;overflow-x:auto}
.batch-tab-btn{padding:3px 8px;font-size:11px;border-radius:6px;background:#131920;border:1px solid var(--line);color:var(--muted);cursor:pointer;white-space:nowrap}
.batch-tab-btn.active{background:#1a2c38;border-color:#3b82f6;color:#93c5fd;font-weight:600}
.batch-cards{display:grid;grid-template-columns:1fr;gap:8px}
.batch-card{background:#10161c;border:1px solid #222d36;border-radius:8px;padding:10px 12px;transition:border-color .15s,background .15s;cursor:pointer}
.batch-card:hover{background:#141c24;border-color:#324452}
.batch-card.selected{border-color:#3b82f6;box-shadow:0 0 0 1px #3b82f6}
.batch-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.batch-card-title-wrap{display:flex;align-items:center;gap:7px;min-width:0}
.batch-card-title{font-size:13px;font-weight:700;color:var(--text);white-space:nowrap}
.batch-id-badge{font:10px/1 ui-monospace,Consolas,monospace;color:var(--muted);background:#172028;padding:2px 5px;border-radius:4px}
.batch-status-badge{font-size:10px;padding:2px 6px;border-radius:4px;font-weight:600}
.batch-status-badge.running{background:rgba(244,199,107,.15);color:#f4c76b}
.batch-status-badge.paused{background:rgba(251,191,36,.15);color:#fbbf24}
.batch-status-badge.success{background:rgba(46,204,113,.15);color:var(--accent)}
.batch-status-badge.failed{background:rgba(239,68,68,.15);color:var(--danger)}
.batch-card-actions{display:flex;gap:5px}
.batch-action-btn{padding:3px 7px;font-size:11px;border-radius:5px;background:#1e2832;border:1px solid var(--line);color:var(--text);cursor:pointer}
.batch-action-btn:hover{background:#2b3947}
.batch-action-btn.pause{color:#f4c76b}
.batch-action-btn.resume{color:var(--accent)}
.batch-action-btn.stop{color:var(--danger)}
.batch-action-btn.retry{color:#60a5fa}
.batch-action-btn.delete{color:#94a3b8}
.batch-action-btn.delete:hover{color:var(--danger);border-color:var(--danger)}
.batch-progress-bar{height:6px;background:#18222b;border-radius:999px;overflow:hidden;display:flex;margin-bottom:8px}
.batch-progress-segment.success{background:var(--accent);transition:width .3s ease}
.batch-progress-segment.failed{background:var(--danger);transition:width .3s ease}
.batch-card-stats{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--muted)}
.batch-card-stats strong{color:var(--text)}
.text-success strong{color:var(--accent)}
.text-danger strong{color:var(--danger)}
.sync-import-banner{margin-top:14px;padding:12px;background:#112019;border:1px solid #1f5e42;border-radius:11px;flex:0 0 auto}
.sync-banner-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}
.sync-banner-title{font-size:12px;font-weight:700;color:var(--accent)}
.sync-banner-pct{font:11px/1 ui-monospace,Consolas,monospace;color:var(--accent);font-weight:700}
.sync-progress-bar{height:6px;background:#0d1a14;border-radius:999px;overflow:hidden;margin-bottom:7px}
.sync-progress-fill{height:100%;background:var(--accent);transition:width .3s ease}
.sync-banner-info{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#8bb7a2}


/* Compact Horizontal Summary & Layout Optimization */
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
}
.results-head .section-title {
  margin: 0;
  white-space: nowrap;
}
.results-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  margin-top: 7px;
  margin-bottom: 2px;
  background: #0b1014;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
  line-height: 1.4;
}
.results-summary-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.results-summary-row strong {
  color: var(--text);
  font-family: ui-monospace, Consolas, monospace;
}
.monitor-stats {
  gap: 5px !important;
  margin-top: 7px !important;
}
.monitor-stat {
  padding: 6px 9px !important;
  border-radius: 8px !important;
}
.monitor-stat strong {
  font-size: 16px !important;
  margin-top: 1px !important;
}
.batches-panel {
  margin-top: 7px !important;
  padding: 8px 10px !important;
  max-height: 180px !important;
}
.batches-head {
  margin-bottom: 6px !important;
}
.activity-label {
  margin-top: 7px !important;
  padding-top: 7px !important;
  font-size: 11px !important;
}
.side-column, .side-column .log-panel, .config-panel {
  height: calc(100vh - 90px) !important;
  min-height: 720px !important;
  max-height: 980px !important;
}
.log-panel .tasks {
  flex: 1 1 220px !important;
  min-height: 180px !important;
  overflow-y: auto !important;
  margin-top: 6px !important;
}

/* ========================================================
   Session Detail Modal & Interactive Card Styling
   ======================================================== */
.activity-item.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.activity-item.clickable:hover {
  background: #131b22;
  border-color: #3b5062;
  transform: translateX(3px);
}
.activity-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.activity-detail-hint {
  font-size: 10px;
  color: #728a9c;
  background: #14202a;
  border: 1px solid #233644;
  border-radius: 4px;
  padding: 1px 5px;
  opacity: 0.8;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s;
}
.activity-item:hover .activity-detail-hint {
  opacity: 1;
  color: #93c5fd;
  border-color: #3b82f6;
}

/* Detail Modal */
.detail-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 7, 10, 0.82);
  backdrop-filter: blur(8px);
}
.detail-modal[hidden] {
  display: none !important;
}
.detail-dialog {
  width: min(780px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #131920 0%, #0c1015 100%);
  border: 1px solid #283745;
  border-radius: 14px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85);
  color: var(--text);
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #1f2b37;
  background: #151d26;
  gap: 12px;
}
.detail-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.detail-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
}
.detail-badge.success { background: #133324; color: var(--accent); border: 1px solid #235d41; }
.detail-badge.error { background: #351717; color: #ff8c8c; border: 1px solid #632a2a; }
.detail-badge.running { background: #362912; color: #f4c76b; border: 1px solid #64491a; }
.detail-badge.waiting { background: #222a33; color: #8eb3cf; border: 1px solid #334354; }

.detail-email-title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  color: #f3f6f8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-close-btn {
  background: transparent;
  border: none;
  color: #7b8b98;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.detail-close-btn:hover {
  color: #fff;
  background: #23313e;
}

.detail-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.detail-field {
  background: #0f151c;
  border: 1px solid #1e2832;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field-label {
  font-size: 10px;
  color: #6d7f8e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field-value {
  font-size: 12px;
  color: #cbd8e2;
  word-break: break-all;
}
.field-value.code {
  font-family: ui-monospace, Consolas, monospace;
}
.field-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.mini-copy-btn {
  font-size: 10px;
  padding: 2px 7px;
  background: #192530;
  border: 1px solid #283a4c;
  color: #92b8d8;
  border-radius: 4px;
  cursor: pointer;
}
.mini-copy-btn:hover {
  background: #223444;
  color: #fff;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.section-title {
  font-size: 12px;
  font-weight: 700;
  color: #99abb9;
  display: flex;
  align-items: center;
  gap: 6px;
}
.phase-durations-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.phase-card {
  background: #111820;
  border: 1px solid #222d38;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.phase-card-name {
  font-size: 10px;
  color: #728492;
}
.phase-card-val {
  font-size: 14px;
  font-weight: 750;
  font-family: ui-monospace, Consolas, monospace;
  color: #8ed0bb;
}

.error-section {
  background: #201012;
  border: 1px solid #522026;
  border-radius: 8px;
  padding: 12px;
}
.error-title {
  color: #ff8c8c;
}
.error-analysis {
  font-size: 12px;
  line-height: 1.5;
  color: #ffd2d2;
  background: #2e1518;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #ff4d4f;
}
.error-content {
  margin: 0;
  padding: 10px;
  background: #14080a;
  border: 1px solid #3d1419;
  border-radius: 6px;
  color: #ff9898;
  font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 160px;
  overflow-y: auto;
}

.success-section {
  background: #0f1d18;
  border: 1px solid #1f4738;
  border-radius: 8px;
  padding: 12px;
}
.success-title {
  color: var(--accent);
}
.token-status-box {
  font-size: 12px;
  color: #a7dfc9;
  line-height: 1.5;
}

/* Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 20px;
}
.timeline:before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 2px;
  background: #212c36;
}
.timeline-step {
  position: relative;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.timeline-step:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475560;
  border: 2px solid #0f151b;
}
.timeline-step.success .timeline-dot { background: var(--accent); }
.timeline-step.error .timeline-dot { background: #ff4d4f; }
.timeline-step.running .timeline-dot { background: #f4c76b; }
.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.timeline-status {
  font-size: 11px;
  font-weight: 700;
  color: #b3c2ce;
}
.timeline-time {
  font-size: 10px;
  color: #5c6e7c;
  font-family: ui-monospace, Consolas, monospace;
}
.timeline-message {
  font-size: 11px;
  color: #8c9da9;
  line-height: 1.45;
  word-break: break-all;
}

/* Modal Footer */
.detail-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid #1f2b37;
  background: #11171f;
  gap: 12px;
}
.detail-foot-actions {
  display: flex;
  gap: 8px;
}
.detail-foot-right {
  display: flex;
  gap: 8px;
}
.detail-foot button {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 12px;
}