.tg-task-launcher{position:fixed;right:18px;bottom:28px;z-index:29;height:48px;padding:0 21px 0 10px;border:0;border-radius:24px;color:#fff;background:linear-gradient(135deg,#173b67,#2775d1);box-shadow:0 8px 24px rgba(23,59,103,.35);cursor:pointer;font-size:15px;font-weight:700}.tg-task-launcher span{display:inline-grid;width:30px;height:30px;margin-right:9px;place-items:center;border-radius:9px;color:#173b67;background:#fff;font-size:12px}.tg-task-launcher:hover{transform:translateY(-1px);box-shadow:0 10px 28px rgba(23,59,103,.42)}
.tg-task-overlay{position:fixed;inset:0;z-index:100;display:none;background:rgba(15,23,42,.46);font:14px/1.5 "Helvetica Neue",Helvetica,"PingFang SC",Arial,sans-serif}
.tg-task-overlay.show{display:block}.tg-task-shell{position:absolute;inset:2.5vh 2.5vw;display:flex;flex-direction:column;overflow:hidden;background:#f3f6fa;border:1px solid rgba(255,255,255,.65);border-radius:18px;box-shadow:0 28px 90px rgba(15,23,42,.38)}
.tg-task-head{display:flex;align-items:center;gap:13px;padding:17px 20px;color:#fff;background:linear-gradient(120deg,#142f52,#1f548d)}.tg-brand-mark{display:grid;width:42px;height:42px;flex:0 0 auto;place-items:center;border-radius:12px;color:#173b67;background:#fff;font-size:14px;font-weight:800;box-shadow:0 4px 12px rgba(0,0,0,.12)}.tg-task-head h2{margin:0;font-size:20px}.tg-task-head p{margin:2px 0 0;color:#cfe0f5;font-size:12px}.tg-head-safety{margin-left:auto;padding:5px 10px;border:1px solid rgba(255,255,255,.22);border-radius:999px;color:#dceaff;background:rgba(255,255,255,.08);font-size:11px}.tg-task-close{width:38px;height:38px;margin-left:5px;border:0;border-radius:9px;color:#173b67;background:#fff;cursor:pointer;font-size:24px}
.tg-task-tabs{display:flex;align-items:center;gap:4px;padding:9px 16px;background:#fff;border-bottom:1px solid #d9e1ea;box-shadow:0 2px 8px rgba(31,49,70,.04)}.tg-task-tabs button{padding:9px 14px;border:0;border-radius:8px;color:#43556a;background:transparent;cursor:pointer;font-weight:600}.tg-task-tabs button:hover{color:#1d5fa7;background:#f0f6fc}.tg-task-tabs button.active{color:#fff;background:#2775d1;box-shadow:0 3px 9px rgba(39,117,209,.22)}.tg-tab-divider{width:1px;height:24px;margin:0 6px;background:#dce4ed}.tg-task-tabs button[data-tg-tab="settings"]{margin-left:auto}
.tg-task-main{flex:1;overflow:auto;padding:18px}.tg-view{display:none}.tg-view.active{display:block}.tg-card{margin-bottom:14px;padding:16px;background:#fff;border:1px solid #dce4ed;border-radius:10px;box-shadow:0 2px 8px rgba(31,49,70,.04)}
.tg-card h3{margin:0 0 12px;font-size:16px}.tg-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px}.tg-grid.two{grid-template-columns:repeat(2,minmax(220px,1fr))}.tg-field{display:flex;flex-direction:column;gap:5px}.tg-field span{color:#586b80;font-size:12px}.tg-field input,.tg-field select,.tg-field textarea{min-height:38px;padding:8px 10px;border:1px solid #cbd6e2;border-radius:7px;background:#fff;font:inherit}.tg-field textarea{min-height:120px;resize:vertical}
.tg-task-dashboard{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(330px,.65fr);gap:14px}.tg-create-card,.tg-flow-card{min-height:260px}.tg-section-head,.tg-history-head,.tg-tool-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.tg-section-head h3,.tg-history-head h3,.tg-tool-page-head h3{margin:0;color:#263b50;font-size:17px}.tg-section-head p,.tg-history-head p,.tg-tool-page-head p{margin:4px 0 0;color:#78899b;font-size:12px}.tg-section-kicker{display:block;margin-bottom:4px;color:#2775d1;font-size:10px;font-weight:800;letter-spacing:.11em}.tg-mode-badge{padding:5px 10px;border-radius:999px;color:#1d64ae;background:#eaf3fc;font-size:12px;font-weight:700}.tg-job-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}.tg-field-wide{grid-column:1 / -1}.tg-create-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px;padding-top:14px;border-top:1px solid #edf1f5}.tg-create-footer>div{display:flex;flex-direction:column}.tg-create-footer strong{color:#344b62;font-size:12px}.tg-create-footer span{color:#7b8b9b;font-size:11px}.tg-main-action{min-height:42px!important;padding:9px 18px!important}.tg-flow-stack{display:grid;gap:9px;margin-top:18px}.tg-flow-stack>div{display:flex;align-items:center;gap:11px;padding:10px 11px;border:1px solid #e0e8f0;border-radius:9px;background:#f8fafc}.tg-flow-stack b{display:grid;width:28px;height:28px;flex:0 0 auto;place-items:center;border-radius:8px;color:#fff;background:#2775d1;font-size:12px}.tg-flow-stack span{display:flex;flex-direction:column}.tg-flow-stack strong{color:#32495f;font-size:12px}.tg-flow-stack small{color:#8090a1;font-size:11px}.tg-tool-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.tg-tool-shortcuts button,.tg-tool-page-head>button{min-height:36px;padding:7px 10px;border:1px solid #cbd7e3;border-radius:7px;color:#2c628f;background:#fff;cursor:pointer}.tg-history-head{align-items:center;margin-bottom:12px}.tg-history-head h3{margin:0}.tg-history-head .tg-button{min-height:34px}
.tg-next-step-card{display:flex;align-items:center;justify-content:space-between;gap:22px;border-color:#b8d5f3;background:linear-gradient(135deg,#f7fbff,#eef6ff)}
.tg-next-step-card[data-state="blocked"]{border-color:#efd59c;background:linear-gradient(135deg,#fffdf7,#fff7e7)}
.tg-next-step-card[data-state="running"]{border-color:#a9dec1;background:linear-gradient(135deg,#f7fffa,#ecf9f1)}
.tg-next-step-card h3{margin:2px 0 5px;color:#243d57;font-size:18px}.tg-next-step-card p{margin:0;color:#667c92;font-size:12px}.tg-next-step-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.tg-next-step-actions button{white-space:nowrap}
.tg-progressive-options,.tg-tool-details{margin-top:12px;border:1px solid #dce6f0;border-radius:8px;background:#fbfcfe}.tg-progressive-options>summary,.tg-tool-details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;cursor:pointer;color:#35516d;font-size:12px;font-weight:700;list-style:none}.tg-progressive-options>summary::-webkit-details-marker,.tg-tool-details>summary::-webkit-details-marker{display:none}.tg-progressive-options>summary span{display:grid;gap:2px}.tg-progressive-options>summary small{color:#7c8fa3;font-size:11px;font-weight:500}.tg-progressive-options>summary i{color:#2775d1;font-style:normal;font-size:11px}.tg-progressive-options[open]>summary i{font-size:0}.tg-progressive-options[open]>summary i:after{content:"收起";font-size:11px}.tg-progressive-body{display:grid;gap:10px;padding:0 12px 12px}.tg-progressive-body .tg-recognition,.tg-progressive-body .tg-reprocess-option{margin:0}.tg-tool-details>p{margin:0;padding:0 12px;color:#7d8fa1;font-size:11px}.tg-tool-details>.tg-tool-shortcuts{margin:9px 12px 12px}
.tg-distribution-options{margin-bottom:14px}.tg-distribution-options>.tg-card{margin:0;border:0;border-top:1px solid #e4ebf2;border-radius:0;box-shadow:none}.tg-flow-readiness{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px;padding:8px 10px;border-radius:8px;color:#26734b;background:#edf8f2;font-size:12px}.tg-flow-readiness.warn{color:#8a5a0a;background:#fff5df}.tg-flow-readiness button{border:0;color:inherit;background:transparent;cursor:pointer;font-weight:700}
.tg-tool-page{display:grid;gap:14px}.tg-tool-page-head{padding:16px 18px;border:1px solid #dce4ed;border-radius:11px;background:#fff;box-shadow:0 2px 8px rgba(31,49,70,.04)}.tg-tool-page-head>button{align-self:center}.tg-tool-host{min-width:0}.tg-tool-host .pull-panel,.tg-tool-host .beautify-panel{position:static!important;inset:auto!important;z-index:auto!important;display:block!important;width:100%!important;max-height:none!important;box-sizing:border-box;overflow:visible!important}.tg-tool-host .pull-panel{border-radius:12px;box-shadow:0 3px 14px rgba(31,49,70,.07)}.tg-tool-host .pull-header{cursor:default;background:linear-gradient(135deg,#f7faff,#fff)}.tg-tool-host .pull-header-actions,.tg-tool-host .beautify-head-actions{display:none}.tg-tool-host .pull-body{max-height:none;padding:18px}.tg-tool-host .pull-grid{grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px}.tg-tool-host .pull-log{height:150px}.tg-tool-host .pull-actions{max-width:560px}.tg-tool-host .beautify-panel{padding:0;color:#24384d;background:#fff;border:1px solid #d7dee8;border-radius:12px;box-shadow:0 3px 14px rgba(31,49,70,.07);font:14px/1.5 "Helvetica Neue",Helvetica,"PingFang SC",Arial,sans-serif}.tg-tool-host .beautify-header{min-height:50px;margin:0;padding:12px 16px;border-bottom:1px solid #dfe6ed;cursor:default;color:#263b50;background:linear-gradient(135deg,#f7faff,#fff)}.tg-tool-host .beautify-body{display:block;padding:18px}.tg-tool-host .beautify-form-grid{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:14px}.tg-tool-host .beautify-field{display:flex;flex-direction:column;gap:6px;margin:0;color:#526173}.tg-tool-host .beautify-field-wide{grid-column:1 / -1}.tg-tool-host .beautify-panel input{width:100%;height:38px;box-sizing:border-box;margin:0;padding:7px 10px;color:#263442;border:1px solid #c7d1dd;border-radius:7px;font-size:13px}.tg-tool-host .beautify-quick{grid-template-columns:1fr 80px;margin:0}.tg-tool-host .beautify-time-row{grid-template-columns:1fr 130px;margin:0}.tg-tool-host .beautify-panel button{min-height:38px;border-radius:7px}.tg-tool-host .beautify-run{width:auto;min-width:180px;margin-top:16px;padding:8px 18px;background:#2775d1}.tg-tool-host .beautify-msg{min-height:22px;margin-top:10px;color:#177245}
#pullLauncher[hidden],#beautifyLauncher[hidden]{display:none!important}
.tg-task-tabs button:focus{outline:0}.tg-task-tabs button:focus-visible{box-shadow:0 0 0 3px rgba(39,117,209,.2)}
.tg-main-action{min-height:42px!important;padding:9px 18px!important;border:1px solid #2775d1!important;border-radius:8px!important;color:#fff!important;background:#2775d1!important;box-shadow:0 4px 12px rgba(39,117,209,.22);cursor:pointer;font-weight:700}.tg-main-action:hover{background:#1f68bb!important}
.tg-recognition{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin-top:14px;padding:12px;border:1px solid #dce4ed;border-radius:8px;background:#f8fafc}.tg-recognition strong{color:#30465d}.tg-recognition label{display:inline-flex;align-items:center;gap:6px;color:#43556a}.tg-recognition input{width:17px;height:17px}.tg-recognition small{flex-basis:100%;color:#6b7d90}
.tg-screenshot-range{display:grid;grid-template-columns:minmax(230px,1fr) minmax(180px,260px) 28px minmax(180px,260px) minmax(220px,1fr);gap:12px;align-items:end;margin-top:14px;padding:14px;border:1px solid #d7e3ef;border-radius:10px;background:linear-gradient(135deg,#f7faff,#fff)}.tg-screenshot-range>div:first-child{align-self:center;display:flex;flex-direction:column;gap:3px}.tg-screenshot-range>div:first-child strong{color:#2c455e;font-size:14px}.tg-screenshot-range>div:first-child span{color:#75879a;font-size:12px}.tg-range-arrow{align-self:center;color:#2775d1;text-align:center;font-size:21px;font-weight:700}.tg-range-preview{align-self:center;padding:9px 12px;border-radius:8px;color:#176b43;background:#e8f7ef;font-size:12px;font-weight:600}.tg-range-preview.error{color:#b42318;background:#fff0ee}
.tg-screenshot-template{grid-column:1/-1;max-width:360px}.tg-shot-scroll.xypay table{color:#666;font:14px/20px "Helvetica Neue",Helvetica,"PingFang SC",Tahoma,Arial,sans-serif}.tg-shot-scroll.xypay th,.tg-shot-scroll.xypay td{height:39px;padding:5px 15px;text-align:left}.tg-shot-scroll.xypay th{color:#666;background:#fff;font-weight:400}.tg-shot-status.xypay{height:18px;padding:0 6px;border-radius:2px;background:#009688;font:12px/18px "Helvetica Neue",Helvetica,"PingFang SC",Tahoma,Arial,sans-serif}.tg-shot-callback{color:green;font-size:14px}.tg-shot-scroll.image-reference{padding-top:22px}.tg-shot-scroll.image-reference table{color:#666;font:12px "Helvetica Neue",Helvetica,"PingFang SC",Tahoma,Arial,sans-serif}.tg-shot-scroll.image-reference thead{display:none}.tg-shot-scroll.image-reference td{height:35px;padding:0 6px;border-right:0;border-bottom:1px solid #e6e6e6;text-align:left}.tg-shot-status.image-reference{height:18px;padding:0 5px;border-radius:1px;background:#009688;font:12px/18px "Helvetica Neue",Helvetica,"PingFang SC",Tahoma,Arial,sans-serif}.tg-shot-reference-no{display:inline-block;height:18px;padding:0 4px;color:#666;background:#f1f1f1;line-height:18px}
.tg-shot-preview{grid-column:1/-1;min-width:0;margin-top:3px;padding:13px;border:1px solid #d8e3ee;border-radius:10px;background:#fff}.tg-shot-preview>header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:11px}.tg-shot-preview>header div{display:flex;flex-direction:column;gap:2px}.tg-shot-preview>header strong{color:#2c455e;font-size:13px}.tg-shot-preview>header span{color:#7a8b9d;font-size:11px}.tg-shot-preview>header em{padding:4px 9px;border-radius:999px;color:#1f65aa;background:#eaf3fc;font-size:11px;font-style:normal;font-weight:700}.tg-shot-frame{position:relative;display:flex;min-height:126px;overflow:hidden;border:1px solid #bad2e9;border-radius:8px;background:#f6f9fc;box-shadow:inset 4px 0 #2775d1,inset -4px 0 #2775d1}.tg-shot-scroll{width:100%;overflow-x:auto;padding:22px 4px 5px}.tg-shot-scroll table{min-width:100%;table-layout:fixed;border-collapse:collapse;color:#555;background:#fff;font:11px/1.35 Arial,"PingFang SC",sans-serif}.tg-shot-scroll th,.tg-shot-scroll td{height:34px;box-sizing:border-box;overflow:hidden;padding:6px 8px;border-right:1px solid #e0e0e0;border-bottom:1px solid #e1e1e1;text-align:center;text-overflow:ellipsis;white-space:nowrap}.tg-shot-scroll th{height:30px;color:#454545;background:#f1f1f1;font-weight:600}.tg-shot-scroll .col-pay_no{color:#111}.tg-shot-status{display:inline-block;padding:4px 9px;border-radius:6px;color:#fff;background:#009900;font-weight:700}.tg-shot-action{color:#357050}.tg-shot-boundary{position:absolute;top:0;z-index:2;height:22px;color:#fff;background:#2775d1;font-size:10px;line-height:22px}.tg-shot-boundary.left{left:0;padding:0 9px 0 11px;border-radius:0 0 7px 0}.tg-shot-boundary.right{right:0;padding:0 11px 0 9px;border-radius:0 0 0 7px}.tg-shot-error{display:grid;width:100%;place-items:center;color:#b42318;background:#fff5f4;font-size:12px}
@media(min-width:901px){
  .tg-screenshot-range{grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr) minmax(180px,.9fr)}
  .tg-screenshot-range>div:first-child{grid-column:1/-1;grid-row:1}
  .tg-screenshot-template{grid-column:1;grid-row:2;max-width:none}
  .tg-screenshot-start{grid-column:1;grid-row:3}
  .tg-range-arrow{grid-column:2;grid-row:3}
  .tg-screenshot-end{grid-column:3;grid-row:3}
  .tg-range-preview{grid-column:4;grid-row:3;min-width:0;white-space:nowrap}
  .tg-shot-preview{grid-column:1/-1;grid-row:4}
  .tg-screenshot-start>span,.tg-screenshot-end>span{white-space:nowrap}
}
.tg-compact-field select{width:118px;height:32px;padding:4px 7px;border:1px solid #cbd6e2;border-radius:6px;background:#fff;font:inherit}
.tg-compact-field select:focus{outline:0;border-color:#4b91df;box-shadow:0 0 0 3px rgba(39,117,209,.12)}
.tg-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.tg-actions button,.tg-button{min-height:38px;padding:8px 14px;border:1px solid #c4d0dd;border-radius:7px;color:#30465d;background:#eef3f8;cursor:pointer}.tg-actions .primary,.tg-button.primary{color:#fff;background:#2775d1;border-color:#2775d1}.tg-actions .danger{color:#fff;background:#b42318;border-color:#b42318}.tg-actions button:disabled{cursor:not-allowed;opacity:.5}.tg-job-pause{border-color:#efc36a!important;color:#8a5b00!important;background:#fff8e8!important}.tg-job-pause:hover:not(:disabled){background:#ffefc5!important}
.tg-button.danger{color:#fff;background:#b42318;border-color:#b42318}
.tg-confirm-layer{position:absolute;inset:0;z-index:12;display:grid;place-items:center;padding:24px;background:rgba(15,31,49,.62);backdrop-filter:blur(2px)}.tg-confirm-layer[hidden]{display:none}.tg-confirm-dialog{display:grid;grid-template-columns:46px 1fr;gap:14px;width:min(520px,calc(100vw - 48px));padding:24px;border:1px solid #efc9c5;border-radius:14px;background:#fff;box-shadow:0 24px 64px rgba(15,31,49,.3)}.tg-confirm-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;color:#fff;background:#b42318;font-size:24px;font-weight:800}.tg-confirm-copy h3{margin:1px 0 7px;color:#293f56}.tg-confirm-copy p{margin:0;color:#65798e;line-height:1.65}.tg-confirm-field,.tg-confirm-actions,.tg-confirm-dialog>.tg-status{grid-column:1/-1}.tg-confirm-field strong{display:block;margin:2px 0 8px;padding:9px 11px;border-radius:7px;color:#8f1d15;background:#fff1f0;word-break:break-all}.tg-confirm-actions{display:flex;justify-content:flex-end;gap:9px}.tg-confirm-actions button{min-height:40px;padding:8px 18px;border:1px solid #c4d0dd;border-radius:7px;color:#30465d;background:#eef3f8;cursor:pointer}.tg-confirm-actions .danger{color:#fff;background:#b42318;border-color:#b42318}.tg-confirm-actions button:disabled{cursor:not-allowed;opacity:.45}
.tg-notice{padding:10px 12px;color:#7a5010;background:#fff7df;border-left:4px solid #f4b740;border-radius:6px}.tg-status{min-height:24px;margin-top:10px;color:#36536f}.tg-status.error{color:#b42318}.tg-status.success{color:#177245}
.tg-account-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.tg-account-head h3{margin:0}.tg-account-head p{margin:3px 0 0;color:#718197;font-size:12px}.tg-account-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:14px;margin-top:14px}.tg-account-list{display:flex;max-height:390px;flex-direction:column;gap:7px;overflow:auto;padding:8px;border:1px solid #dce4ed;border-radius:9px;background:#f7f9fc}.tg-account-row{display:grid;grid-template-columns:1fr auto;gap:2px;padding:11px;border:1px solid transparent;border-radius:8px;color:#3d5268;background:#fff;text-align:left;cursor:pointer}.tg-account-row:hover{border-color:#bcd2e9}.tg-account-row.selected{border-color:#2775d1;background:#edf5ff;box-shadow:inset 3px 0 #2775d1}.tg-account-row strong{overflow:hidden;color:#263d55;text-overflow:ellipsis;white-space:nowrap}.tg-account-row span{color:#75869a;font-size:12px}.tg-account-row em{grid-row:1 / 3;grid-column:2;align-self:center;padding:3px 6px;border-radius:999px;background:#edf1f6;color:#65788b;font-size:11px;font-style:normal}.tg-account-row em.ok{color:#176b43;background:#e4f5ec}.tg-account-row em.warn{color:#945c00;background:#fff0ce}.tg-account-empty{padding:28px 10px;color:#75869a;text-align:center;line-height:1.7}.tg-account-form{min-width:0;padding:2px}
.tg-table-wrap{overflow:auto;border:1px solid #dce4ed;border-radius:8px}.tg-table{width:100%;border-collapse:collapse;background:#fff}.tg-table th,.tg-table td{padding:9px 10px;border-bottom:1px solid #e5ebf1;text-align:left;white-space:nowrap}.tg-table th{position:sticky;top:0;color:#4b5f74;background:#eef3f8}.tg-table textarea{width:420px;min-height:72px;padding:7px;border:1px solid #ccd7e2;border-radius:6px}.tg-badge{display:inline-block;padding:2px 8px;border-radius:999px;background:#e8eef5;color:#40566d;font-size:12px}.tg-badge.ok{color:#176b43;background:#e4f5ec}.tg-badge.warn{color:#945c00;background:#fff0ce}.tg-progress{height:10px;overflow:hidden;background:#dce5ee;border-radius:999px}.tg-progress span{display:block;width:0;height:100%;background:#2775d1;transition:width .2s}
.tg-execution-flow{display:flex;align-items:center;gap:8px;margin:14px 0 10px;padding:10px 12px;border:1px solid #dce4ed;border-radius:9px;background:#f8fafc}.tg-execution-flow span{padding:5px 10px;border-radius:999px;color:#718197;background:#e9eef4;font-size:12px;transition:.2s}.tg-execution-flow span.active{color:#fff;background:#2775d1;box-shadow:0 3px 10px rgba(39,117,209,.25)}.tg-execution-flow span.done{color:#176b43;background:#dff4e9}.tg-execution-flow i{color:#9aa8b7;font-style:normal}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.tg-products-page{display:grid;gap:14px}.tg-products-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:2px 2px 0}.tg-products-heading h3{margin:0;color:#263b50;font-size:18px}.tg-products-heading p{margin:3px 0 0;color:#718197;font-size:12px}
.tg-local-product-manager{overflow:hidden;border:1px solid #dce4ed;border-radius:12px;background:#fff;box-shadow:0 3px 12px rgba(31,49,70,.05)}.tg-local-product-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #e6ebf1;background:linear-gradient(135deg,#f7faff,#fff)}.tg-local-product-head h4{margin:2px 0 0;color:#24384d;font-size:15px}.tg-local-product-head p{margin:3px 0 0;color:#8090a3;font-size:12px}.tg-local-product-selection{max-width:44%;overflow:hidden;padding:6px 10px;border-radius:999px;color:#2368b3;background:#eaf3fc;font-size:12px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.tg-local-product-body{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:14px;padding:16px 16px 6px}.tg-local-product-section{min-width:0;padding:14px;border:1px solid #e0e8f0;border-radius:10px;background:#fafbfd}.tg-local-product-unified{max-width:none}.tg-local-amount-summary{display:grid;gap:12px;padding-top:14px;border-top:1px solid #e2eaf2}.tg-local-amount-summary[hidden]{display:none}.tg-local-section-copy{display:flex;flex-direction:column;gap:3px;margin-bottom:12px}.tg-local-section-copy strong{color:#304962;font-size:14px}.tg-local-section-copy span{color:#7b8da0;font-size:11px}.tg-local-product-manager>.tg-status{margin:0;padding:4px 16px 14px}.tg-local-product-manager .pull-grid{grid-template-columns:repeat(2,minmax(180px,1fr));gap:12px}.tg-local-product-manager .pull-product-actions,.tg-local-product-manager .pull-rule-actions{flex-wrap:wrap;margin:0 0 12px}.tg-local-product-manager .pull-product-editor{margin:0 0 14px;padding:14px;border-radius:9px;background:#fff}.tg-local-product-manager .pull-field input,.tg-local-product-manager .pull-field select,.tg-local-product-manager .pull-field textarea{box-sizing:border-box}.tg-local-product-manager .pull-field textarea{background:#fff}.tg-local-product-manager button:disabled{cursor:not-allowed;opacity:.55}
.tg-product-ratio-editor{overflow:hidden;border:1px solid #dce4ed;border-radius:12px;background:#fff;box-shadow:0 3px 12px rgba(31,49,70,.05)}.tg-ratio-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-bottom:1px solid #e6ebf1;background:linear-gradient(135deg,#f7faff,#fff)}.tg-ratio-header h4{margin:1px 0 0;color:#24384d;font-size:15px}.tg-ratio-header p{margin:3px 0 0;color:#718197;font-size:12px}.tg-ratio-live{flex:0 0 auto;padding:4px 9px;border-radius:999px;color:#176b43;background:#e4f5ec;font-size:11px;font-weight:700}.tg-ratio-layout{display:grid;grid-template-columns:minmax(210px,240px) minmax(360px,520px) minmax(320px,1fr);gap:14px;align-items:stretch;padding:14px 16px 16px}.tg-ratio-settings,.tg-ratio-weights,.tg-ratio-result{min-width:0;padding:13px;border:1px solid #dfe7ef;border-radius:10px;background:#fafbfd}.tg-ratio-settings{display:grid;align-content:start;gap:10px}.tg-ratio-settings>strong,.tg-ratio-panel-title strong{color:#304962;font-size:13px}.tg-ratio-settings>small,.tg-ratio-note{color:#74869a;font-size:11px;line-height:1.55}.tg-ratio-weights{display:flex;flex-direction:column}.tg-ratio-panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:9px}.tg-ratio-panel-title span{color:#7b8da0;font-size:11px;text-align:right}.tg-product-ratio-editor .tg-field textarea{width:100%;min-height:112px;max-height:160px;box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.55;resize:vertical}.tg-ratio-weights .tg-actions{align-items:center;margin-top:10px}.tg-ratio-result{display:flex;flex-direction:column;background:#f7fbff}.tg-ratio-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:8px;align-items:stretch;margin:0}.tg-ratio-summary strong{grid-column:1/-1;padding:9px 11px;border-radius:8px;color:#1f5f9f;background:#e7f1fc;font-size:12px}.tg-ratio-summary span{display:flex;min-height:36px;align-items:center;justify-content:center;padding:6px 9px;border:1px solid #d7e5f3;border-radius:8px;color:#405a73;background:#fff;font-size:12px;white-space:nowrap}.tg-ratio-summary.error{display:block;padding:10px;border-radius:8px;color:#b3261e;background:#fff0ee}.tg-ratio-note{display:block;margin-top:auto;padding-top:10px}
.tg-products-workbench{display:grid;grid-template-columns:minmax(560px,1.08fr) minmax(430px,.92fr);gap:14px;align-items:start}.tg-product-list-panel,.tg-product-editor{overflow:hidden;border:1px solid #dce4ed;border-radius:12px;background:#fff;box-shadow:0 3px 12px rgba(31,49,70,.05)}.tg-panel-head,.tg-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid #e6ebf1}.tg-panel-head h4,.tg-editor-head h4{margin:0;color:#24384d;font-size:15px}.tg-panel-head p{margin:2px 0 0;color:#8090a3;font-size:12px}.tg-count{padding:4px 9px;border-radius:999px;color:#50677f;background:#edf2f7;font-size:12px}
.tg-product-list-scroll{max-height:540px;overflow:auto}.tg-product-list{width:100%;border-collapse:collapse;table-layout:fixed}.tg-product-list th{position:sticky;top:0;z-index:1;padding:10px 12px;color:#64778b;background:#f4f7fa;border-bottom:1px solid #dfe6ed;text-align:left;font-size:12px;font-weight:600}.tg-product-list td{height:58px;padding:8px 12px;border-bottom:1px solid #edf1f5;color:#43566a;vertical-align:middle}.tg-product-list tr:last-child td{border-bottom:0}.tg-product-list tbody tr{transition:background .15s,box-shadow .15s}.tg-product-list tbody tr:hover{background:#f8fbff}.tg-product-list tbody tr.selected{background:#eef5ff;box-shadow:inset 3px 0 #2775d1}.tg-product-list th:nth-child(1){width:34%}.tg-product-list th:nth-child(2){width:15%}.tg-product-list th:nth-child(3){width:13%}.tg-product-list th:nth-child(4){width:12%}.tg-product-list th:nth-child(5){width:12%}.tg-product-list th:nth-child(6){width:14%}.tg-product-name{display:flex;min-width:0;flex-direction:column;gap:2px}.tg-product-name strong{color:#24384d;font-size:13px}.tg-product-name span{overflow:hidden;color:#617387;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.tg-row-action{min-height:32px;padding:5px 10px;border:1px solid #c9d7e5;border-radius:6px;color:#2368b3;background:#fff;cursor:pointer;font:inherit}.tg-product-list tr.selected .tg-row-action{color:#fff;border-color:#2775d1;background:#2775d1}
.tg-product-editor{position:sticky;top:0}.tg-editor-head{background:linear-gradient(135deg,#f7faff 0%,#fff 65%)}.tg-editor-kicker{display:block;margin-bottom:3px;color:#2775d1;font-size:11px;font-weight:700;letter-spacing:.08em}.tg-editor-badges{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}.tg-editor-settings{display:grid;grid-template-columns:1fr 150px;gap:10px;padding:14px 16px 0}.tg-toggle-row,.tg-compact-field{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #dfe6ed;border-radius:8px;background:#f8fafc}.tg-toggle-row span{display:flex;flex-direction:column}.tg-toggle-row strong{color:#344b62;font-size:13px}.tg-toggle-row small{color:#8190a1;font-size:11px}.tg-toggle-row input{width:18px;height:18px;accent-color:#2775d1}.tg-compact-field span{color:#64778b;font-size:12px}.tg-compact-field input{width:78px;height:32px;padding:4px 7px;border:1px solid #cbd6e2;border-radius:6px;background:#fff;font:inherit}
.tg-editor-caption{display:flex;flex-direction:column;gap:7px;padding:14px 16px 0}.tg-editor-caption>span{display:flex;align-items:center;justify-content:space-between;color:#344b62}.tg-editor-caption>span small{color:#8a99a9}.tg-editor-caption textarea{width:100%;min-height:190px;box-sizing:border-box;padding:11px 12px;border:1px solid #cbd6e2;border-radius:8px;color:#26394d;background:#fff;font-size:14px;line-height:1.6;font-family:"Helvetica Neue",Helvetica,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","PingFang SC",Arial,sans-serif;font-variant-emoji:emoji;resize:vertical}.tg-editor-caption textarea:focus,.tg-template-fields input:focus,.tg-template-fields select:focus,.tg-compact-field input:focus{outline:0;border-color:#4b91df;box-shadow:0 0 0 3px rgba(39,117,209,.12)}
.tg-marker-hint{display:flex;align-items:center;gap:9px;margin:10px 16px 0;padding:9px 11px;border-radius:8px}.tg-marker-hint>span{display:grid;width:22px;height:22px;place-items:center;border-radius:50%;font-weight:700}.tg-marker-hint div{display:flex;min-width:0;flex-direction:column}.tg-marker-hint strong{font-size:12px}.tg-marker-hint small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tg-marker-hint.ok{color:#176b43;background:#eef9f3}.tg-marker-hint.ok>span{color:#fff;background:#27a46a}.tg-marker-hint.warn{color:#8d5b0a;background:#fff7df}.tg-marker-hint.warn>span{color:#fff;background:#e6a72f}
.tg-template-import{margin:12px 16px 0;padding:12px;border:1px solid #dbe7f3;border-radius:9px;background:#f6f9fd}.tg-template-copy{display:flex;flex-direction:column;margin-bottom:10px}.tg-template-copy strong{color:#304962;font-size:13px}.tg-template-copy span{color:#7c8da0;font-size:11px}.tg-template-fields{display:grid;grid-template-columns:1fr;gap:8px;margin-bottom:9px}.tg-template-fields label{display:flex;min-width:0;flex-direction:column;gap:4px}.tg-template-fields label span{color:#667a90;font-size:11px}.tg-template-fields select,.tg-template-fields input{width:100%;height:36px;box-sizing:border-box;padding:5px 8px;border:1px solid #cbd6e2;border-radius:6px;background:#fff;font:inherit}.tg-template-import>.tg-button{width:100%;min-height:36px;background:#eef4fb}.tg-template-import .tg-actions .tg-button{width:100%}.tg-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding:12px 16px;border-top:1px solid #e6ebf1;background:#fafbfd}.tg-editor-footer>span{color:#7d8d9e;font-size:12px}.tg-editor-footer>span.dirty{color:#ad6b00}.tg-editor-empty{display:flex;min-height:360px;align-items:center;justify-content:center;flex-direction:column;gap:5px;color:#7d8d9e}.tg-editor-empty strong{color:#43566a}
.tg-product-ratio-editor .tg-actions{align-items:center}.tg-ratio-feedback{display:inline-flex;min-height:32px;align-items:center;padding:3px 10px;border-radius:7px;color:#176b43;background:#e8f7ef;font-size:12px;font-weight:700;white-space:nowrap}.tg-ratio-feedback.info{color:#2368b3;background:#eaf3fc}.tg-ratio-feedback.error{color:#b42318;background:#fff0ee}.tg-ratio-feedback[hidden]{display:none}
.tg-products-heading-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}.tg-create-product-panel{display:grid;gap:12px;margin:12px 0;padding:16px;border:1px solid #cfe0f0;border-radius:10px;background:#f7fbff}.tg-create-product-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.tg-create-product-panel h4{margin:3px 0 4px;color:#2e4d6c;font-size:15px}.tg-create-product-panel p{margin:0;color:#6d8196;font-size:12px}.tg-create-product-panel .tg-grid{margin:0}.tg-create-product-panel .tg-field-wide{grid-column:1/-1}.tg-create-product-panel textarea{width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid #cbd6e2;border-radius:7px;background:#fff;font:inherit;resize:vertical}.tg-create-product-actions{display:flex;justify-content:flex-end;gap:8px}.tg-product-row-actions{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.tg-row-action-danger{color:#a9231a;border-color:#efc2be;background:#fff}.tg-row-action-danger:hover:not(:disabled){color:#fff;border-color:#a9231a;background:#a9231a}.tg-create-product-panel[hidden]{display:none!important}
.tg-split-share{display:flex;flex-wrap:wrap;gap:4px}.tg-split-share em{padding:3px 6px;border-radius:999px;color:#245f94;background:#eaf3fc;font-size:10px;font-style:normal;font-weight:700}.tg-split-share em+em{color:#2b754e;background:#e7f5ed}
@media(max-width:1180px){.tg-task-dashboard{grid-template-columns:1fr}.tg-create-card,.tg-flow-card{min-height:0}.tg-flow-stack{grid-template-columns:repeat(3,1fr)}.tg-tool-host .pull-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}.tg-local-product-body{grid-template-columns:1fr}.tg-ratio-layout{grid-template-columns:minmax(200px,240px) minmax(320px,1fr)}.tg-ratio-result{grid-column:1/-1}.tg-products-workbench,.tg-config-workbench{grid-template-columns:1fr}.tg-product-list-scroll{max-height:320px}.tg-product-editor,.tg-config-editor{position:static}.tg-product-list th:nth-child(1){width:36%}}
@media(max-width:900px){.tg-task-shell{inset:1vh 1vw}.tg-head-safety{display:none}.tg-grid,.tg-grid.two,.tg-account-layout,.tg-screenshot-range,.tg-job-form,.tg-tool-host .pull-grid,.tg-tool-host .beautify-form-grid,.tg-local-product-manager .pull-grid{grid-template-columns:1fr}.tg-ratio-layout{grid-template-columns:1fr}.tg-ratio-result{grid-column:auto}.tg-ratio-header{align-items:flex-start}.tg-ratio-layout{padding:10px}.tg-field-wide,.tg-tool-host .beautify-field-wide{grid-column:auto}.tg-range-arrow{display:none}.tg-task-launcher{right:16px;bottom:24px}.tg-task-tabs{overflow:auto}.tg-task-tabs button{white-space:nowrap}.tg-tab-divider{display:none}.tg-task-tabs button[data-tg-tab="settings"]{margin-left:0}.tg-task-main{padding:10px}.tg-create-footer{align-items:flex-start;flex-direction:column}.tg-flow-stack{grid-template-columns:1fr}.tg-product-ratio-editor .tg-actions{justify-content:flex-start}.tg-products-heading,.tg-local-product-head{align-items:flex-start;flex-direction:column}.tg-local-product-selection{max-width:100%}.tg-local-product-body{padding:10px}.tg-product-list-scroll{overflow:auto}.tg-product-list{min-width:650px}.tg-editor-settings,.tg-template-fields{grid-template-columns:1fr}.tg-editor-head{align-items:flex-start}.tg-editor-badges{justify-content:flex-start}.tg-account-list{max-height:220px}.tg-execution-flow{overflow-x:auto}.tg-execution-flow span{white-space:nowrap}.tg-tool-host .beautify-time-row{grid-template-columns:1fr}.tg-tool-shortcuts{grid-template-columns:1fr}}

/* Task 045: workspace shell, hierarchy and responsive layout. */
:root{--tg-primary:#2775d1;--tg-primary-hover:#1f68bb;--tg-text:#263b50;--tg-muted:#5f7184;--tg-border:#d7e1eb;--tg-surface:#fff;--tg-surface-soft:#f6f8fb;--tg-success:#176b43;--tg-success-bg:#e4f5ec;--tg-warning:#855600;--tg-warning-bg:#fff2cf;--tg-danger:#a9231a;--tg-danger-bg:#fff1f0;--tg-focus:rgba(39,117,209,.28)}
html:has(body .tg-task-overlay.show),body:has(.tg-task-overlay.show){overflow:hidden;overscroll-behavior:none}
.tg-task-overlay.show{overflow:hidden;overscroll-behavior:contain}
.tg-task-shell{max-width:1920px;max-height:95dvh;margin:auto;overscroll-behavior:contain}
.tg-task-head,.tg-task-tabs{flex:0 0 auto}
.tg-task-main{min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.tg-view,.tg-card,.tg-field,.tg-table-wrap{min-width:0}
.tg-task-overlay button,.tg-task-overlay input,.tg-task-overlay select,.tg-task-overlay textarea{box-sizing:border-box}
.tg-task-overlay :is(button,input,select,textarea,a,[tabindex]):focus-visible,.pull-panel :is(button,input,select,textarea):focus-visible,.beautify-panel :is(button,input,select,textarea):focus-visible{outline:3px solid var(--tg-focus);outline-offset:2px;box-shadow:none}
.tg-task-overlay :is(.tg-section-head p,.tg-history-head p,.tg-tool-page-head p,.tg-panel-head p,.tg-account-head p,.tg-products-heading p,.tg-local-product-head p,.tg-ratio-copy span,.tg-local-section-copy span,.tg-template-copy span,.tg-template-fields label span,.tg-toggle-row small,.tg-editor-footer>span){color:var(--tg-muted)}
.tg-mode-badge{white-space:nowrap}
.tg-button,.tg-actions button,.tg-row-action,.tg-task-close{transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease}
.tg-button:hover:not(:disabled),.tg-actions button:hover:not(:disabled),.tg-row-action:hover:not(:disabled){border-color:#9ebbd8;background:#e7f0fa;color:#174f88}
.tg-actions .primary:hover:not(:disabled),.tg-button.primary:hover:not(:disabled){border-color:var(--tg-primary-hover);background:var(--tg-primary-hover);color:#fff}
.tg-button:disabled,.tg-actions button:disabled,.tg-row-action:disabled{cursor:not-allowed;opacity:.48}
.tg-task-close:hover{background:#eaf3fc;transform:none}
.tg-status{color:#40566d}.tg-status.success{color:var(--tg-success)}.tg-status.error{color:var(--tg-danger)}
.tg-badge.ok,.tg-badge.completed{color:var(--tg-success);background:var(--tg-success-bg)}
.tg-badge.warn,.tg-badge.paused,.tg-badge.pending,.tg-badge.running{color:var(--tg-warning);background:var(--tg-warning-bg)}
.tg-badge.error,.tg-badge.failed,.tg-badge.missed,.tg-badge.cancelled{color:var(--tg-danger);background:var(--tg-danger-bg)}
.tg-badge.draft{color:#40566d;background:#e8eef5}
.tg-table td[colspan]{height:116px;color:var(--tg-muted);text-align:center;white-space:normal}
.tg-table td[colspan]::first-line{color:var(--tg-text);font-weight:700}
.tg-empty-state{display:grid;min-height:150px;place-items:center;padding:28px;color:var(--tg-muted);border:1px dashed #cdd9e5;border-radius:10px;background:var(--tg-surface-soft);text-align:center}
.tg-empty-state strong{display:block;margin-bottom:4px;color:var(--tg-text);font-size:14px}

/* Keep the workspace entry in the page header instead of covering table actions. */
.tg-task-launcher{top:25px;right:76px;bottom:auto;height:38px;padding:0 15px 0 7px;border-radius:19px;font-size:13px;line-height:38px}
.tg-task-launcher span{width:26px;height:26px;margin-right:7px;border-radius:7px;font-size:11px}
body:has(.tg-task-overlay.show) .tg-task-launcher{visibility:hidden;pointer-events:none}

/* Monthly jobs: controls stay visible and the large table gets its own bounded viewport. */
#tgJobPreviewCard:not([hidden]){display:flex;flex-direction:column}
#tgJobPreviewCard>h3{order:0}
#tgJobPreviewCard>#tgJobNotice{order:1}
#tgJobPreviewCard>.tg-actions{position:sticky;top:0;z-index:7;order:2;margin:10px -4px 0;padding:10px 4px;border-bottom:1px solid var(--tg-border);background:rgba(255,255,255,.97);box-shadow:0 8px 14px -14px rgba(31,49,70,.75);backdrop-filter:blur(8px)}
#tgJobPreviewCard>.tg-execution-flow{order:3;margin:10px 0 8px}
#tgJobPreviewCard>.tg-progress{order:4;margin-top:2px}
#tgJobPreviewCard>#tgRunStatus{order:5;margin:7px 0 9px}
#tgJobPreviewCard>.tg-table-wrap{order:6;max-height:clamp(260px,54vh,560px);margin-top:0!important;overscroll-behavior:contain;scrollbar-gutter:stable both-edges}
#tgJobPreviewCard>.tg-job-sticky-controls{position:sticky;top:0;z-index:8;order:2;margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid var(--tg-border);background:rgba(255,255,255,.98);box-shadow:0 9px 15px -16px rgba(31,49,70,.9);backdrop-filter:blur(8px)}
#tgJobPreviewCard>.tg-job-sticky-controls .tg-history-head{gap:10px;margin-bottom:8px}
#tgJobPreviewCard>.tg-job-sticky-controls .tg-actions{margin-top:0}
#tgJobPreviewCard>.tg-job-sticky-controls .tg-job-list-tools{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-top:9px}
#tgJobPreviewCard>.tg-job-sticky-controls .tg-pagination{display:flex;align-items:center;gap:8px;color:var(--tg-muted)}
#tgJobPreviewCard>.tg-job-table-scroll{order:6;max-height:clamp(260px,54vh,560px);overscroll-behavior:contain;scrollbar-gutter:stable both-edges}
#tgJobPreviewCard>.tg-job-table-scroll[hidden],#tgJobPreviewCard>.tg-job-table-collapsed[hidden]{display:none!important}
#tgJobPreviewCard .tg-table-toggle{color:#28689f;background:#eef6fd;border-color:#bdd5eb}
#tgJobPreviewCard>.tg-job-table-collapsed{order:6;display:flex;align-items:center;justify-content:center;gap:10px;min-height:72px;padding:14px 18px;border:1px dashed #b9cde0;border-radius:9px;color:#587087;background:#f7fafc;text-align:center}
#tgJobPreviewCard>.tg-job-table-collapsed strong{color:#2d506e;font-size:13px}
#tgJobPreviewCard>.tg-job-table-collapsed span{font-size:12px}
#tgJobPreviewCard .tg-table{min-width:1130px;table-layout:fixed}
#tgJobPreviewCard .tg-table :is(th,td){overflow:hidden;text-overflow:ellipsis}
#tgJobPreviewCard .tg-table th:nth-child(1){width:50px}
#tgJobPreviewCard .tg-table th:nth-child(2){width:145px}
#tgJobPreviewCard .tg-table th:nth-child(3){width:82px}
#tgJobPreviewCard .tg-table th:nth-child(4){width:104px}
#tgJobPreviewCard .tg-table th:nth-child(5){width:220px}
#tgJobPreviewCard .tg-table th:nth-child(6),#tgJobPreviewCard .tg-table th:nth-child(7){width:60px}
#tgJobPreviewCard .tg-table th:nth-child(8){width:115px}
#tgJobPreviewCard .tg-table th:nth-child(9){width:85px}
#tgJobPreviewCard .tg-table th:nth-child(10){width:210px}
#tgJobPreviewCard .tg-table select{display:block;width:100%;max-width:100%;min-width:0;height:34px;padding:5px 28px 5px 8px;border:1px solid #cbd6e2;border-radius:6px;background:#fff;font:inherit;text-overflow:ellipsis}
#tgJobPreviewCard #tgJobItems td:last-child{overflow:visible;white-space:normal}
#tgJobPreviewCard #tgJobItems td:last-child .tg-button{min-height:32px;margin:2px;padding:5px 8px;font-size:12px}
#tgJobPreviewCard #tgJobItems .tg-button.danger{color:var(--tg-danger);border-color:#efc2be;background:#fff}
#tgJobPreviewCard #tgJobItems .tg-button.danger:hover{color:#fff;background:var(--tg-danger)}
#tgJobPreviewCard #tgJobNotice.tg-unknown-notice{color:#8f1d15;border-left-color:#d92d20;background:#fff1f0}
#tgJobPreviewCard #tgJobNotice.tg-reprocess-notice{color:#8a4b08;border-left-color:#e7981d;background:#fff7e6}
.tg-reprocess-option{display:flex;align-items:flex-start;gap:10px;margin-top:12px;padding:12px 14px;border:1px solid #efcf91;border-radius:10px;background:#fffaf0;color:#65481d;cursor:pointer}
.tg-reprocess-option input{width:18px;height:18px;margin-top:2px;accent-color:#d97706}
.tg-reprocess-option span{display:grid;gap:3px}.tg-reprocess-option small{color:#8b6a38;line-height:1.45}
#tgJobPreviewCard #tgJobItems tr.tg-unknown-job-item{background:#fff8f7;box-shadow:inset 4px 0 #d92d20}
#tgJobPreviewCard #tgJobItems tr.tg-unknown-job-item:hover{background:#fff1f0}
#tgJobPreviewCard #tgJobItems .tg-item-error{max-width:190px;margin-top:5px;color:var(--tg-danger);font-size:11px;line-height:1.4;white-space:normal}
#tgJobPreviewCard #tgJobItems tr.tg-unknown-job-item td:nth-child(9){overflow:visible;white-space:normal}
#tgJobPreviewCard #tgJobItems tr.tg-unknown-job-item td:nth-child(9){min-width:190px}
#tgJobPreviewCard #tgJobItems tr.tg-unknown-job-item td:nth-child(10){min-width:380px}

/* Scheduled publishing follows the same vertical information architecture as monthly tasks. */
/* Keep the scheduled workspace hidden until its tab is selected.  The base
   .tg-view rule hides inactive views; this selector must retain that state so
   the scheduled editor never leaks into the operations center. */
body .tg-task-overlay .tg-view.active[data-tg-view="scheduled"]{display:grid;gap:14px}
body .tg-task-overlay [data-tg-view="scheduled"] .tg-task-dashboard{grid-template-columns:minmax(0,1.65fr) minmax(290px,.58fr)!important;align-items:stretch;gap:14px}
body .tg-task-overlay [data-tg-view="scheduled"] .tg-task-dashboard>.tg-create-card,
body .tg-task-overlay [data-tg-view="scheduled"] .tg-task-dashboard>.tg-flow-card{margin-bottom:0}
body .tg-task-overlay [data-tg-view="scheduled"] #tgPostDayPanel{position:static;display:flex;min-height:0!important;max-height:none!important;flex-direction:column;overflow:visible!important;padding:16px;border-radius:8px}
[data-tg-view="scheduled"] #tgPostDayPanel>.tg-history-head{margin-bottom:2px}
[data-tg-view="scheduled"] #tgPostDayPanel>.tg-actions{display:grid;grid-template-columns:minmax(150px,220px) auto auto;align-items:end;margin:14px 0 0;padding:12px;border:1px solid #e0e9f3;border-radius:7px;background:#fafbfd}
[data-tg-view="scheduled"] #tgPostDayPanel>.tg-actions .tg-field{max-width:none!important}
[data-tg-view="scheduled"] #tgPostDayPanel>.tg-table-wrap{min-height:0;max-height:430px;margin-top:8px;overflow:auto;overscroll-behavior:contain}
[data-tg-view="scheduled"] #tgPostDayItems td[colspan]{height:180px;color:#6f8297;text-align:center}
[data-tg-view="scheduled"] .tg-day-batch-progress{display:grid;grid-template-columns:minmax(240px,1fr) minmax(240px,1.6fr);gap:10px 18px;align-items:center;margin-top:12px;padding:12px;border:1px solid #dfe8f1;border-radius:7px;background:#fafbfd}
[data-tg-view="scheduled"] .tg-day-progress-copy{display:grid;gap:3px;color:#526980}
[data-tg-view="scheduled"] .tg-day-progress-copy strong{color:#2f4861;font-size:15px}
[data-tg-view="scheduled"] .tg-day-progress-copy span{font-size:12px}
[data-tg-view="scheduled"] .tg-progress-track{height:10px;overflow:hidden;border-radius:999px;background:#e4ebf3}
[data-tg-view="scheduled"] .tg-progress-track>span{display:block;width:0;height:100%;border-radius:inherit;background:#2d76d2;transition:width .25s ease}
[data-tg-view="scheduled"] .tg-day-batch-progress.generating .tg-progress-track>span{width:100%!important;background:linear-gradient(90deg,#2d76d2 0,#75a9e6 45%,#2d76d2 100%);background-size:220% 100%;animation:tgDayPreviewProgress 1.1s linear infinite}
@keyframes tgDayPreviewProgress{to{background-position:-220% 0}}
[data-tg-view="scheduled"] .tg-day-list-tools{grid-column:1/-1;display:flex;align-items:end;justify-content:space-between;gap:12px;padding-top:2px;border-top:1px solid #e7edf4}
[data-tg-view="scheduled"] .tg-day-list-tools .tg-field{width:180px}
[data-tg-view="scheduled"] .tg-day-task-table-wrap{max-height:520px!important;scrollbar-gutter:stable}
[data-tg-view="scheduled"] .tg-day-task-table{min-width:1480px;table-layout:fixed}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(1),[data-tg-view="scheduled"] .tg-day-task-table td:nth-child(1){width:52px;text-align:center}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(2){width:190px}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(3){width:210px}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(4){width:145px}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(5){width:130px}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(6){width:280px}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(7){width:225px}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(8){width:110px}
[data-tg-view="scheduled"] .tg-day-task-table th:nth-child(9){width:125px}
[data-tg-view="scheduled"] .tg-day-order-range{display:grid;gap:2px;font-variant-numeric:tabular-nums}
[data-tg-view="scheduled"] .tg-day-order-range small{color:#7b8da0}
body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-card{max-height:none!important;padding:0!important;overflow:visible!important;border-radius:8px}
[data-tg-view="scheduled"] .tg-create-card>.tg-section-head{padding:16px 16px 14px;border-bottom:1px solid #e7edf4;background:#fbfcfe;border-radius:8px 8px 0 0}
body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-card .tg-job-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px;margin:0;padding:14px}
.tg-post-form-section{min-width:0;padding:12px;border:1px solid #dfe8f1;border-radius:7px;background:#fafbfd}
.tg-post-form-section>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-12px;padding:12px;cursor:pointer;color:#2e465f;font-size:13px;font-weight:700;list-style:none}.tg-post-form-section>summary::-webkit-details-marker{display:none}.tg-post-form-section>summary>span{display:grid;gap:2px}.tg-post-form-section>summary small{color:#7c8fa3;font-size:11px;font-weight:500}.tg-post-form-section>summary i{color:#2775d1;font-style:normal;font-size:11px;font-weight:600}.tg-post-form-section[open]>summary{margin-bottom:11px;border-bottom:1px solid #e5edf5}.tg-post-form-section[open]>summary i{font-size:0}.tg-post-form-section[open]>summary i:after{content:"收起";font-size:11px}.tg-post-form-section:not([open]){align-self:start;background:#fff}details.tg-post-form-section:not([open]) .tg-post-form-fields{display:none}
.tg-post-form-section>header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:11px}
.tg-post-form-section>header strong{display:block;color:#2e465f;font-size:13px}
.tg-post-form-section>header span{display:block;margin-top:2px;color:#8392a2;font-size:11px;line-height:1.45}
.tg-post-form-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tg-post-form-basics .tg-post-form-fields>label:last-child,.tg-post-form-products .tg-post-form-fields>*{grid-column:1/-1}
.tg-post-form-schedule .tg-post-form-fields>label:last-child,.tg-post-form-content .tg-post-form-fields>*{grid-column:1/-1}
[data-tg-view="scheduled"] .tg-post-form-section .tg-field{min-width:0}
[data-tg-view="scheduled"] .tg-post-form-section .tg-field>span{color:#50667d;font-weight:650}
[data-tg-view="scheduled"] .tg-post-form-section .tg-field input:not([type=checkbox]),[data-tg-view="scheduled"] .tg-post-form-section .tg-field select,[data-tg-view="scheduled"] .tg-post-form-section .tg-field textarea{box-sizing:border-box;width:100%;border-color:#cfdbe7;background:#fff}
[data-tg-view="scheduled"] .tg-post-form-section .tg-field textarea{min-height:94px}
[data-tg-view="scheduled"] .tg-type-pool,[data-tg-view="scheduled"] .tg-type-checks{gap:7px}
[data-tg-view="scheduled"] .tg-type-pool{grid-template-columns:minmax(0,1fr);padding:8px;border:0;background:transparent}
[data-tg-view="scheduled"] .tg-type-pool p{padding:0 2px 5px}
[data-tg-view="scheduled"] .tg-type-pool label{grid-column:1/-1}
[data-tg-view="scheduled"] .tg-type-pool label,[data-tg-view="scheduled"] #tgProductChecks label{min-width:0;min-height:42px;box-sizing:border-box;padding:8px 10px;border-color:#d7e2ed;background:#fff;transition:border-color .15s,box-shadow .15s,background .15s}
[data-tg-view="scheduled"] .tg-type-pool label{display:grid;grid-template-columns:18px minmax(0,1fr) 68px;align-items:center}
[data-tg-view="scheduled"] .tg-type-pool label>span{overflow:hidden;color:#3e5369;font-size:13px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
[data-tg-view="scheduled"] .tg-type-pool input[type=checkbox],[data-tg-view="scheduled"] #tgProductChecks input[type=checkbox],[data-tg-view="scheduled"] #tgPostAllowRepeat{width:17px!important;height:17px!important;min-height:0!important;margin:0;accent-color:#2775d1}
[data-tg-view="scheduled"] .tg-type-pool input[type=number]{width:68px!important;min-height:34px!important}
[data-tg-view="scheduled"] .tg-type-pool label:has(input:checked),[data-tg-view="scheduled"] #tgProductChecks label:has(input:checked){border-color:#73a9e4;background:#f1f7ff;box-shadow:inset 3px 0 #2775d1}
[data-tg-view="scheduled"] #tgProductChecks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
[data-tg-view="scheduled"] #tgPostRepeatWrap{min-height:48px;padding:10px 12px;border:1px solid #dce5ee;border-radius:7px;background:#fff}
body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-footer{position:static;display:flex;margin:0;padding:12px 14px;border-top:1px solid var(--tg-border);border-radius:0 0 8px 8px;background:#fff;box-shadow:none;backdrop-filter:none}
.tg-post-footer-copy{display:grid!important;gap:1px}
.tg-post-footer-copy strong{color:#304962!important}
.tg-post-footer-copy span{color:#7b8da0!important}
.tg-post-footer-actions{display:flex!important;flex-direction:row!important;gap:8px;margin-left:auto}
[data-tg-view="scheduled"] .tg-create-card>.tg-status{margin:0;padding:0 14px 12px}
[data-tg-view="scheduled"] .tg-flow-card{min-height:0}
[data-tg-view="scheduled"] #tgScheduledDistributionCard,
[data-tg-view="scheduled"] #tgPostDayPanel,
[data-tg-view="scheduled"] #tgScheduledPlansCard,
[data-tg-view="scheduled"] #tgScheduledRunsCard{margin-bottom:0}
.tg-segment-planner{display:grid;gap:16px}
.tg-task-overlay [hidden]{display:none!important}
.tg-segment-template-bar{display:grid;grid-template-columns:minmax(240px,1fr) minmax(260px,1fr) auto;gap:10px;align-items:center;padding:14px;border:1px solid #dbe6f2;border-radius:10px;background:#f8fbff}
.tg-segment-template-summary{padding-top:2px;color:#6d8096;font-size:12px;font-weight:700}.tg-template-management{position:relative}.tg-template-management>summary{cursor:pointer;color:#3d678f;font-size:12px;font-weight:700}.tg-template-management>div{position:absolute;right:0;z-index:6;display:flex;gap:8px;align-items:end;margin-top:8px;padding:12px;border:1px solid #d7e2ee;border-radius:9px;background:#fff;box-shadow:0 12px 30px rgba(31,49,70,.14)}
.tg-segment-summary{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:9px;background:#eef4fa;color:#53687f}
.tg-segment-summary strong{color:#294866}.tg-segment-summary.ok{background:#eaf7f0;color:#28734a}.tg-segment-summary.warn{background:#fff4df;color:#8a5b12}
.tg-segment-list{display:grid;gap:12px}.tg-segment-row{border:1px solid #d8e3ef;border-radius:10px;background:#fff;overflow:hidden}
.tg-segment-row>header{display:grid;grid-template-columns:34px minmax(180px,1.25fr) minmax(130px,.75fr) minmax(130px,.75fr) minmax(100px,.45fr) auto;gap:10px;align-items:end;padding:12px 14px;background:#f8fbff;border-bottom:1px solid #e4ecf5}
.tg-segment-row header label,.tg-segment-quotas label{display:grid;gap:5px;color:#53687f;font-size:12px}.tg-segment-row input{width:100%;box-sizing:border-box;border:1px solid #cbd8e6;border-radius:7px;padding:8px 9px;background:#fff;color:#263e57}
.tg-segment-index{display:grid;place-items:center;width:28px;height:28px;border-radius:7px;background:#2c78d6;color:#fff;font-weight:800}
.tg-segment-total{display:grid;gap:5px;align-content:center;min-height:38px;padding:0 10px;border:1px solid #cfe0f1;border-radius:8px;background:#eef6ff;color:#5b7188}.tg-segment-total span{font-size:11px}.tg-segment-total strong{color:#1f5fa9;font-size:15px;white-space:nowrap}
.tg-segment-quotas{display:grid;grid-template-columns:auto repeat(5,minmax(120px,1fr));gap:10px;align-items:end;padding:12px 14px}.tg-segment-quotas>strong{align-self:center;color:#294866}.tg-segment-quotas small{grid-column:1/-1;color:#71849a}
.tg-segment-actions{display:flex;align-items:center;gap:12px;color:#71849a;font-size:12px}.tg-segment-timeline{border:1px solid #d7e2ee;border-radius:10px;overflow:hidden;background:#fff}
.tg-segment-timeline>header{display:flex;justify-content:space-between;gap:16px;padding:12px 14px;background:#eef5fd}.tg-segment-timeline>header div{display:grid;gap:3px}.tg-segment-timeline>header span{color:#6c8097;font-size:12px}
.tg-segment-timeline-scroll{max-height:360px;overflow:auto}.tg-segment-timeline table{width:100%;border-collapse:collapse}.tg-segment-timeline th,.tg-segment-timeline td{padding:9px 12px;border-bottom:1px solid #e6edf5;text-align:left}.tg-segment-timeline th{position:sticky;top:0;background:#f7faff;color:#4c6480;font-size:12px}
.tg-scheduled-fallback-card{margin-top:-8px}.tg-scheduled-fallback-card .tg-ratio-header{margin-bottom:8px}
@media(max-width:1280px){.tg-segment-template-bar{grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto}.tg-segment-row>header{grid-template-columns:34px minmax(170px,1.2fr) minmax(120px,.72fr) minmax(120px,.72fr) minmax(90px,.42fr) auto}.tg-segment-quotas{grid-template-columns:repeat(3,minmax(140px,1fr))}}
@media(max-width:760px){.tg-segment-template-bar{grid-template-columns:1fr}.tg-segment-template-bar button{width:100%}.tg-template-management>div{position:static;display:grid}.tg-segment-template-summary{grid-column:1/-1}}
[data-tg-view="scheduled"] .tg-folder-toolbar{position:sticky;top:0;z-index:4;padding:8px 0;background:#fff}
[data-tg-view="scheduled"] .tg-folder-toolbar .tg-selection-count{display:inline-flex;min-height:36px;align-items:center;padding:0 10px;border-radius:8px;color:#526980;background:#edf2f7;font-size:12px;font-weight:700}
[data-tg-view="scheduled"] .tg-folder-toolbar #tgTaskDeleteSelected{margin-left:auto}
[data-tg-view="scheduled"] .tg-wps-sheet{max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-gutter:stable}
[data-tg-view="scheduled"] .tg-scheduled-preview-table{width:100%;min-width:1430px!important;table-layout:fixed}
.tg-scheduled-preview-table col.tg-preview-col-type{width:160px}
.tg-scheduled-preview-table col.tg-preview-col-time{width:255px}
.tg-scheduled-preview-table col.tg-preview-col-product{width:130px}
.tg-scheduled-preview-table col.tg-preview-col-text{width:280px}
.tg-scheduled-preview-table col.tg-preview-col-media{width:230px}
.tg-scheduled-preview-table col.tg-preview-col-shot{width:220px}
.tg-scheduled-preview-table col.tg-preview-col-action{width:155px}
.tg-scheduled-preview-table [data-sheet-send]{display:block;width:100%;min-width:220px;height:38px;font-variant-numeric:tabular-nums}
[data-tg-view="scheduled"] .tg-task-dashboard+ .tg-card{border-radius:8px}
[data-tg-view="scheduled"] .tg-editor-empty{min-height:120px!important;padding:28px 16px!important}

/* Product workspace: the list and selected product details remain in view. */
@media(min-width:1181px){
  .tg-products-workbench{align-items:start}
  .tg-product-list-panel,.tg-product-editor{position:sticky;top:0;max-height:calc(100dvh - 172px)}
  .tg-product-list-panel{display:flex;flex-direction:column;overflow:hidden}
  .tg-product-list-scroll{max-height:none;min-height:260px;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  .tg-product-editor{overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
}

.tg-rates-page{display:grid;gap:16px;max-width:1500px;margin:0 auto}.tg-rate-search-card{padding:18px}.tg-rate-search-row{display:grid;grid-template-columns:minmax(320px,1fr) auto;gap:12px;align-items:end;margin-top:16px}.tg-rate-search-row>button{min-height:40px;padding:8px 18px;border:1px solid var(--nb-blue);border-radius:6px;color:#fff;background:var(--nb-blue);font-weight:700;cursor:pointer}.tg-rate-window{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;color:#65788c;font-size:11px}.tg-rate-window button{padding:6px 10px;border:1px solid var(--nb-border);border-radius:999px;color:#52677d;background:#fff;cursor:pointer}.tg-rate-window button.active{border-color:var(--nb-blue);color:var(--nb-blue);background:#edf5ff}.tg-rate-summary{display:grid;grid-template-columns:repeat(3,minmax(120px,.45fr)) minmax(280px,1.65fr);gap:10px;margin:14px 0 6px}.tg-rate-summary>div{display:flex;flex-direction:column;gap:3px;padding:12px;border:1px solid #e2e9f0;border-radius:8px;background:#f8fafc}.tg-rate-summary small{color:#73859a;font-size:10px}.tg-rate-summary strong{color:#17324d;font-size:20px}.tg-rate-summary .tg-rate-summary-note strong{font-size:13px}.tg-rate-summary-note span{margin-top:4px;color:#64778b;font-size:10px}.tg-rate-summary-note .tg-rate-expanded{color:#9a6700}.tg-rate-result-note{margin:0 0 12px;color:#718398;font-size:10px}.tg-rate-result-note b{color:#31516e}.tg-rate-candidates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:start}.tg-rate-candidate{overflow:hidden;border:1px solid #dce5ee;border-left:4px solid #8397aa;border-radius:9px;background:#fff}.tg-rate-candidate.confidence-high{border-left-color:#16845b}.tg-rate-candidate.confidence-medium{border-left-color:#d59418}.tg-rate-candidate.outside-window{background:#fffcf5}.tg-rate-candidate>header{display:flex;justify-content:space-between;gap:16px;padding:13px 14px}.tg-rate-main{min-width:0;flex:1}.tg-rate-channel-line{display:flex;align-items:center;gap:7px;min-width:0;color:#728397;font-size:10px}.tg-rate-channel-line b{overflow:hidden;color:#3f5870;text-overflow:ellipsis;white-space:nowrap}.tg-rate-channel-line mark{padding:2px 5px;border-radius:3px;color:#8b5c08;background:#fff0c9}.tg-rate-channel-line a{margin-left:auto;color:var(--nb-blue);text-decoration:none;white-space:nowrap}.tg-rate-candidate h4{margin:7px 0;color:#243d56;font-size:14px}.tg-rate-candidate header p{display:flex;gap:5px;flex-wrap:wrap;margin:0}.tg-rate-candidate header p em{padding:2px 6px;border-radius:4px;color:#556b81;background:#eef3f7;font-size:10px;font-style:normal}.tg-rate-fee{display:flex;min-width:110px;flex-direction:column;align-items:flex-end}.tg-rate-fee small,.tg-rate-fee span{color:#74869a;font-size:9px}.tg-rate-fee strong{color:#6b25a8;font-size:28px;line-height:1.15}.tg-rate-fee.missing strong{font-size:17px}.tg-rate-candidate-more{border-top:1px solid #edf1f5;background:#fafbfd}.tg-rate-candidate-more>summary{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:8px 14px;color:#47657f;cursor:pointer;font-size:10px;font-weight:700;list-style:none}.tg-rate-candidate-more>summary::-webkit-details-marker{display:none}.tg-rate-candidate-more>summary:after{content:'⌄';color:#8293a3}.tg-rate-candidate-more[open]>summary:after{content:'⌃'}.tg-rate-candidate-more>summary span{margin-right:auto;color:#718398;font-weight:600}.tg-rate-more-body{padding:0 14px 13px}.tg-rate-reason{min-height:16px;margin:0;padding:10px 0;color:#556b80;font-size:11px}.tg-rate-reason b{color:#ae3227}.tg-rate-learning-actions{display:flex;gap:7px;flex-wrap:wrap}.tg-rate-learning-actions button,.tg-rate-undo{padding:6px 9px;border:1px solid #cdd8e2;border-radius:5px;color:#3e5871;background:#fff;cursor:pointer;font-size:10px}.tg-rate-learning-actions button:first-child{border-color:#8ecab4;color:#136949;background:#f0faf6}.tg-rate-history{border-top:1px solid #edf1f5;background:#fffdf8}.tg-rate-history>summary{padding:7px 14px;color:#8a681c;cursor:pointer;font-size:10px;font-weight:700}.tg-rate-history>summary b{display:inline-flex;min-width:18px;justify-content:center;margin-left:4px;padding:1px 5px;border-radius:10px;background:#fff0c9}.tg-rate-history-list{border-top:1px solid #f1e8d4}.tg-rate-history-list>article{display:grid;grid-template-columns:1fr auto;gap:7px 12px;align-items:center;padding:9px 14px}.tg-rate-history-list>article+article{border-top:1px solid #f2eadc}.tg-rate-history-list>article>div{display:flex;align-items:baseline;gap:9px}.tg-rate-history-list>article strong{color:#6b25a8;font-size:16px}.tg-rate-history-list>article span{color:#7c8996;font-size:9px}.tg-rate-history-list>article>a{color:var(--nb-blue);font-size:9px;text-decoration:none}.tg-rate-history-list .tg-rate-source-message{grid-column:1/-1}.tg-rate-empty{padding:24px;border:1px dashed #ced8e2;border-radius:8px;color:#78899a;text-align:center;background:#fafbfd;font-size:12px}.tg-rate-market-row{display:grid;grid-template-columns:minmax(200px,.8fr) minmax(150px,.45fr) minmax(320px,1.4fr);gap:16px;align-items:start;padding:14px 16px;border-bottom:1px solid #e8edf2}.tg-rate-market-row:last-child{border-bottom:0}.tg-rate-market-row h4{margin:0 0 5px;color:#253e57;font-size:13px}.tg-rate-market-row p,.tg-rate-market-row small,.tg-rate-market-row span{margin:0;color:#6c7f92;font-size:10px}.tg-rate-market-row>div:nth-child(2){display:flex;flex-direction:column;gap:3px}.tg-rate-market-row>div:nth-child(2)>strong{color:#5e2591;font-size:18px}.tg-rate-market-quotes{display:flex;flex-direction:column;gap:6px}.tg-rate-market-quotes>span{display:flex;gap:6px}.tg-rate-market-quotes details summary{cursor:pointer;color:#687b8f;font-size:10px}.tg-rate-market-quotes details span{display:block;padding-top:5px}.tg-rate-watch{padding:0;overflow:hidden}.tg-rate-watch>summary{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;cursor:pointer}.tg-rate-watch>summary span{display:flex;flex-direction:column;gap:3px}.tg-rate-watch>summary small{color:#74869a;font-size:10px;font-weight:400}.tg-rate-watch>summary b{color:#16845b;font-size:11px}.tg-rate-watch-list{display:grid;grid-template-columns:repeat(2,minmax(300px,1fr));gap:8px;padding:0 16px 16px}.tg-rate-watch-list .tg-toggle-row{margin:0;border:1px solid #e2e8ee;border-radius:7px;background:#fafbfd}
.tg-rate-result-note{display:flex;align-items:center;justify-content:space-between;gap:12px}.tg-rate-result-note button{padding:5px 9px;border:1px solid #cdd9e4;border-radius:999px;color:#315f87;background:#f7fafc;cursor:pointer;font-size:10px;font-weight:700}
.tg-rate-learning{margin:12px;border:1px solid #ead9ad;border-radius:8px;background:#fffaf0}.tg-rate-learning header,.tg-rate-learning>div{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 11px}.tg-rate-learning header{border-bottom:1px solid #f0e4c6;color:#795a17}.tg-rate-learning header span,.tg-rate-learning>div span{color:#7b8793;font-size:10px}.tg-rate-learning>div+div{border-top:1px solid #f2ead6}.tg-rate-learning>div b{color:#425970;font-size:11px}
.tg-rate-profiles{display:grid;gap:10px;padding:12px}.tg-rate-profile{overflow:hidden;border:1px solid #dce5ed;border-radius:9px;background:#fff}.tg-rate-profile.is-confirmed{border-left:4px solid #16845b}.tg-rate-profile.is-draft{border-left:4px solid #d39a24}.tg-rate-profile>summary{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 16px;cursor:pointer;list-style:none}.tg-rate-profile>summary::-webkit-details-marker{display:none}.tg-rate-profile>summary>div:first-child{min-width:0}.tg-rate-profile-status{display:inline-block;margin-bottom:5px;padding:2px 6px;border-radius:999px;color:#166748;background:#e9f7f1;font-size:9px;font-weight:750}.tg-rate-profile.is-draft .tg-rate-profile-status{color:#875d0b;background:#fff3d5}.tg-rate-profile h4{margin:0;color:#253e57;font-size:14px}.tg-rate-profile summary p{display:flex;gap:5px;flex-wrap:wrap;margin:6px 0 0}.tg-rate-profile summary p em{padding:2px 6px;border-radius:4px;color:#5d7185;background:#eef3f7;font-size:9px;font-style:normal}.tg-rate-profile-price{display:flex;min-width:130px;flex-direction:column;align-items:flex-end}.tg-rate-profile-price small,.tg-rate-profile-price span{color:#75879a;font-size:9px}.tg-rate-profile-price strong{color:#6b25a8;font-size:27px;line-height:1.15}.tg-rate-profile-body{padding:14px 16px 16px;border-top:1px solid #e8edf2;background:#fbfcfe}.tg-rate-trend-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.tg-rate-trend-toolbar>div{display:flex;gap:6px;flex-wrap:wrap}.tg-rate-trend-toolbar button{padding:5px 9px;border:1px solid #d6e0e9;border-radius:999px;color:#526a81;background:#fff;cursor:pointer;font-size:10px}.tg-rate-trend-toolbar button.active{border-color:#4b8ee8;color:#1769cf;background:#edf5ff}.tg-rate-trend-toolbar>span{color:#718398;font-size:9px}.tg-rate-trend-chart{padding:10px 12px;border:1px solid #e1e8ef;border-radius:8px;background:#fff}.tg-rate-trend-chart svg{display:block;width:100%;height:176px;overflow:visible}.tg-rate-trend-chart svg line{stroke:#dce4eb;stroke-width:1}.tg-rate-trend-chart svg text{fill:#8493a2;font-size:9px}.tg-rate-trend-band{fill:#ddd0f0;fill-opacity:.55}.tg-rate-trend-line{fill:none;stroke:#6b25a8;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.tg-rate-trend-dot{fill:#fff;stroke:#6b25a8;stroke-width:2}.tg-rate-trend-chart>div{display:flex;align-items:center;gap:14px;padding:2px 4px 0;color:#63778a;font-size:9px}.tg-rate-trend-chart>div span{display:flex;align-items:center;gap:5px}.tg-rate-trend-chart>div span i{width:14px;height:3px;border-radius:3px;background:#6b25a8}.tg-rate-trend-chart>div span:nth-child(2) i{height:8px;background:#ddd0f0}.tg-rate-trend-chart>div small{margin-left:auto;color:#8997a5}.tg-rate-trend-empty{display:grid;min-height:112px;place-items:center;border:1px dashed #cfd9e3;border-radius:8px;color:#76899c;background:#fff;font-size:11px}.tg-rate-trend-stats{display:grid;grid-template-columns:repeat(4,minmax(100px,1fr));gap:8px;margin-top:10px}.tg-rate-trend-stats>div{display:flex;flex-direction:column;gap:3px;padding:9px 10px;border:1px solid #e2e8ee;border-radius:7px;background:#fff}.tg-rate-trend-stats small{color:#78899a;font-size:9px}.tg-rate-trend-stats strong{color:#304a62;font-size:14px}.tg-rate-trend-stats strong.up{color:#c54635}.tg-rate-trend-stats strong.down{color:#16845b}.tg-rate-aliases{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:10px 0 0;color:#617589;font-size:9px}.tg-rate-aliases span{padding:2px 6px;border-radius:4px;background:#eef3f7}.tg-rate-profile-body>.tg-rate-market-quotes{margin-top:11px;padding-top:10px;border-top:1px solid #e5ebf0}.tg-rate-profile-body>.tg-rate-market-quotes>strong{color:#3d5871;font-size:10px}
@media(max-width:760px){.tg-rate-profile>summary{align-items:flex-start}.tg-rate-profile-price{min-width:90px}.tg-rate-trend-toolbar{align-items:flex-start;flex-direction:column}.tg-rate-trend-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tg-rate-trend-chart>div{align-items:flex-start;flex-wrap:wrap}.tg-rate-trend-chart>div small{width:100%;margin-left:0}}
.tg-rate-source-message{margin:0 0 10px;border:1px solid #dce5ed;border-radius:7px;background:#f8fafc}.tg-rate-source-message summary{padding:8px 10px;color:#365f85;cursor:pointer;font-size:10px;font-weight:700}.tg-rate-source-message pre{max-height:360px;margin:0;padding:12px;overflow:auto;border-top:1px solid #e3eaf0;color:#263c52;background:#fff;font:12px/1.65 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"PingFang SC",sans-serif;white-space:pre-wrap;word-break:break-word}.tg-rate-source-message small{display:block;padding:8px 10px;color:#7a8998;font-size:9px}
.tg-rate-source-message>.tg-rate-source-scope{padding:7px 10px;border-top:1px solid #e3eaf0;color:#317257;background:#f2faf6;font-weight:700}.tg-rate-full-source{margin:9px;border:1px solid #e1e7ed;border-radius:6px;background:#fff}.tg-rate-full-source>summary{color:#6b7785;background:#f6f8fa}.tg-rate-full-source>pre{max-height:420px}.tg-rate-full-source>small{border-top:1px solid #e5ebf0}
.tg-custom-emoji{position:relative;display:inline-block;width:1.35em;height:1.35em;margin:0 .02em;vertical-align:-.28em}.tg-custom-emoji video,.tg-custom-emoji img{position:absolute;inset:0;z-index:1;display:block;width:100%;height:100%;object-fit:contain}.tg-custom-emoji i{visibility:hidden;display:inline-block;width:100%;height:100%;overflow:hidden;font-style:normal;line-height:1.35em;text-align:center}
@media(max-width:1180px){.tg-rate-candidates{grid-template-columns:1fr}}@media(max-width:900px){.tg-rate-search-row,.tg-rate-market-row{grid-template-columns:1fr}.tg-rate-summary{grid-template-columns:repeat(2,1fr)}.tg-rate-summary-note{grid-column:1/-1}.tg-rate-watch-list{grid-template-columns:1fr}.tg-rate-candidate>header{align-items:flex-start}}

/* Tenant email preferences use the existing desktop settings workspace. The
   delivery provider and its credential remain exclusive to the admin plane. */
.tg-tenant-email-card{display:grid;gap:14px}
.tg-tenant-email-grid{display:grid;grid-template-columns:minmax(250px,.75fr) minmax(420px,1.25fr);gap:12px;align-items:end}
.tg-tenant-email-card .tg-toggle-row{min-height:58px}
.tg-tenant-email-card .tg-field-wide{grid-column:auto}
.tg-tenant-email-events{display:grid;grid-template-columns:minmax(260px,420px);gap:9px}
.tg-tenant-email-events label{display:flex;align-items:flex-start;gap:8px;min-height:62px;padding:11px;border:1px solid #dfe7ef;border-radius:9px;background:#f8fafc;color:#344b62;cursor:pointer}
.tg-tenant-email-events input{flex:0 0 auto;width:17px;height:17px;margin:1px 0 0;accent-color:#2775d1}
.tg-tenant-email-events span{display:grid;gap:2px}
.tg-tenant-email-events strong{font-size:12px}
.tg-tenant-email-events small{color:#7d8ea1;font-size:10px;line-height:1.4}
.tg-tenant-email-service{display:grid;grid-template-columns:130px minmax(220px,auto) 1fr;gap:10px;align-items:center;padding:10px 12px;border:1px solid #d8e8f6;border-radius:9px;background:#f4f9fe;color:#64778b;font-size:11px}
.tg-tenant-email-service strong{color:#294d70;font-size:12px}
.tg-tenant-email-service small{text-align:right}
.tg-profile-page{display:grid;gap:16px}.tg-profile-hero{display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:16px;align-items:center;padding:22px 24px;border:1px solid #d7e3ef;border-radius:10px;background:linear-gradient(135deg,#fff 0%,#f3f8fd 100%)}.tg-profile-avatar{display:grid;width:58px;height:58px;place-items:center;border-radius:16px;color:#fff;background:linear-gradient(145deg,#1767b1,#19a36f);box-shadow:0 10px 24px rgba(22,103,177,.18);font-size:18px;font-weight:900}.tg-profile-hero h3{margin:4px 0 3px;color:#183b5d;font-size:22px}.tg-profile-hero p{margin:0;color:#718399;font-size:12px}.tg-profile-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid #dce6f0;border-radius:10px;background:#fff}.tg-profile-stats>div{display:grid;gap:3px;padding:15px 18px;border-right:1px solid #e5ebf2}.tg-profile-stats>div:last-child{border-right:0}.tg-profile-stats strong{color:#173d61;font-size:21px}.tg-profile-stats span{color:#75869a;font-size:11px}.tg-profile-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:16px}.tg-profile-card{display:grid;align-content:start;gap:15px}.tg-profile-readonly{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0;border:1px solid #e0e8f0;border-radius:9px;background:#f8fafc}.tg-profile-readonly>div{display:grid;gap:4px;padding:11px 13px;border-right:1px solid #e5ebf2;border-bottom:1px solid #e5ebf2}.tg-profile-readonly>div:nth-child(2n){border-right:0}.tg-profile-readonly>div:nth-last-child(-n+2){border-bottom:0}.tg-profile-readonly dt{color:#7a8c9f;font-size:10px}.tg-profile-readonly dd{overflow:hidden;margin:0;color:#2a455f;font-size:12px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.tg-profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tg-profile-managed{display:grid;gap:10px}.tg-profile-managed>div{display:grid;gap:4px;padding:12px 13px;border:1px solid #dfe8f1;border-radius:9px;background:#f8fafc}.tg-profile-managed span{color:#74879a;font-size:10px}.tg-profile-managed strong{color:#274764;font-size:12px}.tg-profile-managed small{color:#8494a5;font-size:10px;line-height:1.5}.tg-profile-security{display:grid;gap:15px}.tg-profile-security-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.tg-profile-security-grid h4{margin:0 0 9px;color:#2d4863;font-size:12px}.tg-profile-device-list,.tg-profile-login-list{display:grid;gap:7px}.tg-profile-device-list article,.tg-profile-login-list article{display:flex;min-height:46px;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;border:1px solid #e0e8ef;border-radius:8px;background:#f9fbfd}.tg-profile-device-list article.current{border-color:#b8dbc9;background:#f1faf5}.tg-profile-device-list article>div,.tg-profile-login-list article>div{display:grid;gap:3px}.tg-profile-device-list strong,.tg-profile-login-list strong{color:#304a63;font-size:11px}.tg-profile-device-list span,.tg-profile-login-list span{color:#7a8b9d;font-size:10px}.tg-profile-login-list article{justify-content:flex-start}.tg-profile-login-list i{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#e4a22a}.tg-profile-login-list i.ok{background:#28a066}.tg-profile-empty{margin:0;padding:20px;color:#7b8c9e;background:#f8fafc;text-align:center;font-size:11px}.tg-password-panel{border-top:1px solid #e1e8ef;padding-top:12px}.tg-password-panel summary{color:#31516f;font-size:12px;font-weight:800;cursor:pointer}.tg-password-panel .tg-profile-form{margin-top:12px;grid-template-columns:repeat(3,minmax(0,1fr))}#tgProfileNotificationHost{display:grid;gap:16px}

@media(max-width:820px){.tg-desktop-email-only{display:none!important}}

/* Desktop-only task ↔ Telegram reconciliation surface.  Mobile keeps its
   existing scheduled-message flow unchanged for this phase. */
.tg-config-health{display:none}
@media(min-width:821px){
  .tg-config-health{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;margin:0 0 18px;padding:15px 16px;border:1px solid #dbe5f1;border-radius:14px;background:linear-gradient(135deg,#f8fbff,#fff)}
  .tg-config-health-copy{min-width:0}
  .tg-config-health-copy strong{display:block;color:#14375d;font-size:14px;line-height:1.4}
  .tg-config-health-copy p{margin:4px 0 0;color:#60748a;font-size:12px;line-height:1.55}
  .tg-config-health-facts{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
  .tg-config-health-facts span{display:grid;min-width:62px;padding:6px 9px;border-radius:9px;background:#eaf2fb;text-align:center}
  .tg-config-health-facts span.warn{background:#fff2d8;color:#96610c}
  .tg-config-health-facts span.danger{background:#fde7e7;color:#a23b3b}
  .tg-config-health-facts b{font-size:12px;line-height:1.2}.tg-config-health-facts small{margin-top:2px;font-size:10px;white-space:nowrap}
  .tg-config-health button{min-height:34px;padding:0 12px;border:1px solid #bfd1e5;border-radius:9px;background:#fff;color:#214f7c;font-weight:700;cursor:pointer;white-space:nowrap}
  .tg-config-health button:hover{background:#edf5fd;border-color:#8fb1d3}
  .tg-channel-reconcile-card{display:block}
  .tg-channel-reconcile-wrap{max-width:100%;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
  .tg-channel-reconcile-table{width:1980px;min-width:1980px;table-layout:fixed}
  .tg-channel-reconcile-table col.tg-reconcile-col-time{width:190px}
  .tg-channel-reconcile-table col.tg-reconcile-col-channel{width:140px}
  .tg-channel-reconcile-table col.tg-reconcile-col-task{width:280px}
  .tg-channel-reconcile-table col.tg-reconcile-col-type{width:150px}
  .tg-channel-reconcile-table col.tg-reconcile-col-scheduled-id{width:150px}
  .tg-channel-reconcile-table col.tg-reconcile-col-message-id{width:140px}
  .tg-channel-reconcile-table col.tg-reconcile-col-channel-check{width:230px}
  .tg-channel-reconcile-table col.tg-reconcile-col-promotion{width:170px}
  .tg-channel-reconcile-table col.tg-reconcile-col-order{width:150px}
  .tg-channel-reconcile-table col.tg-reconcile-col-promotion-status{width:180px}
  .tg-channel-reconcile-table col.tg-reconcile-col-views{width:200px}
  .tg-channel-reconcile-table th,.tg-channel-reconcile-table td{height:auto;vertical-align:middle}
  .tg-channel-reconcile-table td:nth-child(1),.tg-channel-reconcile-table td:nth-child(2),.tg-channel-reconcile-table td:nth-child(5),.tg-channel-reconcile-table td:nth-child(6),.tg-channel-reconcile-table td:nth-child(9){white-space:nowrap}
  .tg-reconcile-task,.tg-reconcile-type{display:grid;min-width:0;gap:3px;white-space:normal}
  .tg-reconcile-task strong,.tg-reconcile-task small,.tg-reconcile-type,.tg-reconcile-type small{max-width:100%;overflow-wrap:anywhere;word-break:break-word}
  .tg-reconcile-task strong{line-height:1.4}
  .tg-reconcile-task small,.tg-reconcile-type small{color:var(--nb-muted);font-size:10px;line-height:1.4}
  .tg-channel-reconcile-table td small{display:block;margin-top:4px;color:var(--nb-muted);font-size:10px;line-height:1.45}
  .tg-channel-reconcile-table tr.is-attention td{background:#fff9f1}
  .tg-reconcile-error{display:block;max-width:320px;margin-top:5px;color:var(--nb-danger);white-space:normal}
}
@media(max-width:820px){.tg-channel-reconcile-card{display:none!important}}

/* Desktop workspaces: one primary task per screen, following the Open SaaS
   layout principle of a compact page header plus explicit local navigation. */
.tg-workspace-intro{display:grid;grid-template-columns:minmax(280px,.72fr) minmax(620px,1.28fr);gap:24px;align-items:center;margin-bottom:16px;padding:20px 22px;border:1px solid #dce4ed;border-radius:10px;background:#fff;box-shadow:0 2px 8px rgba(31,49,70,.04)}
.tg-workspace-intro h2{margin:0;color:#20364c;font-size:21px;line-height:1.25;letter-spacing:-.015em}.tg-workspace-intro p{max-width:620px;margin:6px 0 0;color:#718397;font-size:12px;line-height:1.6}
.tg-workspace-stage-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:5px;border:1px solid #dde6ef;border-radius:9px;background:#f5f7fa}
.tg-workspace-stage-nav button{display:flex;min-width:0;align-items:center;gap:9px;padding:10px;border:1px solid transparent;border-radius:7px;color:#52677d;background:transparent;text-align:left;cursor:pointer;transition:.16s ease}
.tg-workspace-stage-nav button:hover{color:#255f9b;background:#fff;border-color:#d7e3ef}.tg-workspace-stage-nav button.active{color:#174f8b;background:#fff;border-color:#b9d2eb;box-shadow:0 3px 10px rgba(25,72,121,.08)}
.tg-workspace-stage-nav b{display:grid;width:26px;height:26px;flex:0 0 auto;place-items:center;border-radius:6px;color:#4f6c88;background:#e7edf3;font-size:11px}.tg-workspace-stage-nav button.active b{color:#fff;background:#2775d1}
.tg-workspace-stage-nav span{display:grid;min-width:0;gap:1px}.tg-workspace-stage-nav strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.tg-workspace-stage-nav small{overflow:hidden;color:#8796a5;font-size:10px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.tg-workspace-stage{display:grid;min-width:0;gap:14px}.tg-workspace-stage[hidden]{display:none!important}.tg-workspace-stage>.tg-card:last-child{margin-bottom:0}
.tg-workspace-stage>[hidden]{display:none!important}
[data-tg-view="tasks"] .tg-workspace-stage[data-workspace-stage="create"]>.tg-task-dashboard{grid-template-columns:minmax(0,1fr) 320px}
[data-tg-view="tasks"] .tg-workspace-stage[data-workspace-stage="run"] #tgMonthlyWorkflow{margin-bottom:0}
[data-tg-view="scheduled"] .tg-workspace-stage[data-workspace-stage="create"]>.tg-task-dashboard{grid-template-columns:minmax(0,1fr) 300px!important}
[data-tg-view="scheduled"] .tg-workspace-stage[data-workspace-stage="review"] #tgScheduledPreviewEditor:empty{display:none}
[data-tg-view="scheduled"] .tg-workspace-stage[data-workspace-stage="manage"]{grid-template-columns:minmax(0,1fr)}
@media(max-width:1180px){.tg-workspace-intro{grid-template-columns:1fr}.tg-workspace-stage-nav{max-width:none}}
@media(max-width:760px){.tg-workspace-intro{padding:16px}.tg-workspace-stage-nav{grid-template-columns:1fr}.tg-workspace-stage-nav small{white-space:normal}[data-tg-view="tasks"] .tg-workspace-stage[data-workspace-stage="create"]>.tg-task-dashboard,[data-tg-view="scheduled"] .tg-workspace-stage[data-workspace-stage="create"]>.tg-task-dashboard{grid-template-columns:1fr!important}}

/* Channel history tasks: a single, state-driven SaaS workflow. */
.tg-workflow-rail{display:grid;grid-template-columns:minmax(0,1fr) 48px minmax(0,1fr) 48px minmax(0,1fr);align-items:center;gap:10px;margin:0 0 16px;padding:14px 16px;border:1px solid var(--nb-border,#dce4ec);border-radius:8px;background:#fff;box-shadow:0 1px 2px rgba(15,39,70,.035)}
.tg-workflow-rail>div{display:flex;align-items:center;gap:10px;min-width:0;color:#75879a}
.tg-workflow-rail>div>b{display:grid;flex:0 0 30px;width:30px;height:30px;place-items:center;border:1px solid #cbd6e2;border-radius:50%;color:#6d8094;background:#f5f7fa;font-size:12px}
.tg-workflow-rail>div span{display:grid;min-width:0;gap:2px}
.tg-workflow-rail>div strong{color:#5b6d80;font-size:12px}
.tg-workflow-rail>div small{overflow:hidden;color:#8a99a9;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.tg-workflow-rail>i{display:block;height:1px;background:#d9e1e9}
.tg-workflow-rail>div.active>b{color:#fff;border-color:var(--nb-blue,#1769d2);background:var(--nb-blue,#1769d2);box-shadow:0 0 0 4px rgba(23,105,210,.09)}
.tg-workflow-rail>div.active strong{color:var(--nb-text,#16283c)}
.tg-workflow-rail>div.done>b{color:#fff;border-color:var(--nb-success,#16834b);background:var(--nb-success,#16834b)}
.tg-workflow-rail>div.done>b::after{content:'✓'}
.tg-workflow-rail>div.done>b{font-size:0}
.tg-workflow-rail>div.done strong{color:#315d47}
.tg-workflow-rail>div.stopped>b{color:#fff;border-color:var(--nb-warning,#b66b12);background:var(--nb-warning,#b66b12)}

#tgJobPreviewCard .tg-job-heading{display:grid;gap:5px;min-width:0}
#tgJobPreviewCard .tg-job-heading>div{display:flex;align-items:center;gap:9px}
#tgJobPreviewCard .tg-job-heading h3{margin:0}
#tgJobPreviewCard .tg-job-state-badge{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border-radius:999px;color:#496078;background:#edf2f7;font-size:10px;font-weight:750}
#tgJobPreviewCard .tg-job-state-badge.ok{color:#17653b;background:#e6f6ed}
#tgJobPreviewCard .tg-job-state-badge.warn{color:#8a550d;background:#fff3d7}
#tgJobPreviewCard .tg-job-actions{justify-content:flex-end}
#tgJobPreviewCard .tg-job-actions [hidden]{display:none!important}
#tgJobPreviewCard .tg-job-actions .tg-table-toggle{order:8}
#tgJobPreviewCard .tg-job-actions .danger{order:9}

@media(max-width:860px){
  .tg-workflow-rail{grid-template-columns:1fr;padding:12px}
  .tg-workflow-rail>i{display:none}
  .tg-workflow-rail>div{padding:7px 8px;border-radius:7px}
  .tg-workflow-rail>div.active{background:#f2f7fd}
  #tgJobPreviewCard .tg-history-head{align-items:flex-start}
  #tgJobPreviewCard .tg-job-actions{width:100%;justify-content:flex-start}
}

/* Product-level 30-order completion rules. */
.tg-product-list th:nth-child(1){width:27%}
.tg-product-list th:nth-child(2){width:14%}
.tg-product-list th:nth-child(3){width:11%}
.tg-product-list th:nth-child(4){width:13%}
.tg-product-list th:nth-child(5){width:14%}
.tg-product-list th:nth-child(6){width:10%}
.tg-product-list th:nth-child(7){width:11%}
.tg-success-rate-cell{display:flex;flex-direction:column;gap:2px}
.tg-success-rate-cell strong{color:#176b43;font-size:12px}
.tg-success-rate-cell small{color:#7a8999;font-size:10px}
.tg-success-rate-preview{display:flex;grid-column:1/-1;flex-direction:column;gap:3px;padding:10px 12px;border:1px solid #cce8d9;border-radius:8px;color:#176b43;background:#edf9f2}
.tg-success-rate-preview strong{font-size:13px}
.tg-success-rate-preview span{font-size:11px;line-height:1.5}
.tg-success-rate-preview.warn{color:#855600;border-color:#efd99d;background:#fff8e5}

/* Task 060: desktop operations center and read-only storage management. */
.tg-dashboard-page,.tg-storage-page{display:grid;gap:14px;max-width:1500px;margin:0 auto}
.tg-operations-hero,.tg-dashboard-work{margin:0}
#tgDiagnostics.tg-diagnostic-grid{display:grid;gap:12px}
#tgDiagnostics .tg-diagnostic-card{appearance:none;position:relative;display:flex;min-width:0;align-items:center;justify-content:space-between;gap:16px;box-sizing:border-box;margin:0;padding:17px 18px;border:1px solid #dce6f0;border-radius:12px;color:#344a60;background:linear-gradient(145deg,#fbfdff,#f5f8fc);font:inherit;text-align:left;box-shadow:0 2px 8px rgba(31,64,99,.04)}
#tgDiagnostics button.tg-diagnostic-card{cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease}
#tgDiagnostics button.tg-diagnostic-card:hover{transform:translateY(-2px);border-color:#9fc3e8;background:#fff;box-shadow:0 9px 22px rgba(39,117,209,.12)}
#tgDiagnostics button.tg-diagnostic-card:focus-visible{outline:0;border-color:#2775d1;box-shadow:0 0 0 3px rgba(39,117,209,.2)}
.tg-diagnostic-copy{display:grid;min-width:0;gap:3px}.tg-diagnostic-copy strong{color:#203d5a;font-size:14px}.tg-diagnostic-copy small{overflow:hidden;color:#7a8da1;font-size:11px;font-weight:400;text-overflow:ellipsis;white-space:nowrap}
.tg-diagnostic-value{display:flex;min-width:max-content;align-items:center;gap:11px}.tg-diagnostic-value em{max-width:210px;overflow:hidden;font-style:normal;font-weight:750;text-overflow:ellipsis;white-space:nowrap}.tg-diagnostic-value i{display:grid;width:27px;height:27px;place-items:center;border-radius:50%;color:#2671c4;background:#e8f2fd;font-size:15px;font-style:normal;font-weight:700}
.tg-diagnostic-value em.ok{color:#18754a}.tg-diagnostic-value em.warn{color:#a6650a}.tg-diagnostic-value em.error{color:#b42318}
.tg-dashboard-work .tg-dashboard-actions{margin-top:0;padding:2px 0 12px;border-bottom:1px solid #edf1f5}.tg-dashboard-work .tg-alert-list{margin-top:12px}.tg-dashboard-work .tg-alert-list>span,.tg-dashboard-work .tg-dashboard-actions>span{color:#728398}
.tg-storage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 20px;border:1px solid #dce4ed;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(31,49,70,.04)}.tg-storage-heading h3{margin:0;color:#263b50;font-size:20px}.tg-storage-heading p{margin:4px 0 0;color:#78899b;font-size:12px}
.tg-storage-overview{display:grid;gap:14px}.tg-storage-total{padding:20px;border:1px solid #dce6f0;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(31,49,70,.04)}.tg-storage-total header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.tg-storage-total header div{display:grid;gap:3px}.tg-storage-total strong{color:#294158;font-size:14px}.tg-storage-total header span{color:#8493a3;font-size:11px}.tg-storage-total em{color:#1c5f9f;font-size:20px;font-style:normal;font-weight:800}
.tg-storage-total p{margin:9px 0 0;color:#718396;font-size:11px}
.tg-storage-breakdown{display:grid;gap:12px}.tg-storage-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:12px;align-items:center;padding:17px;border:1px solid #dce6f0;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(31,49,70,.04)}.tg-storage-icon{display:grid;width:40px;height:40px;place-items:center;border-radius:11px;background:#eaf3fc}.tg-storage-icon::before{color:#2876c6;font-size:16px;font-weight:800}.tg-storage-icon.database::before{content:"DB"}.tg-storage-icon.screenshots::before{content:"▧"}.tg-storage-icon.backups::before{content:"↺"}.tg-storage-icon.logs::before{content:"≡"}.tg-storage-item div{display:grid;gap:2px}.tg-storage-item strong{color:#2c4359;font-size:13px}.tg-storage-item small{color:#718397;font-size:11px}.tg-storage-item em{color:#1e5e9c;font-size:15px;font-style:normal;font-weight:800}.tg-storage-safety{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0}.tg-storage-safety>div{display:grid;gap:3px}.tg-storage-safety strong{color:#314a62}.tg-storage-safety span{color:#7c8d9f;font-size:11px}.tg-storage-safety button{min-height:36px;padding:7px 12px;border:1px solid #cbd7e3;border-radius:7px;color:#2c628f;background:#fff;cursor:pointer}
.tg-storage-attribution{grid-column:1/-1;padding:16px;border:1px solid #dce6f0;border-radius:12px;background:#fff}.tg-storage-attribution>header{display:flex;justify-content:space-between;gap:12px;color:#566c82;font-size:12px}.tg-storage-attribution>header strong{color:#294158;font-size:14px}.tg-storage-attribution-list{display:grid;margin-top:10px;border-top:1px solid #e8edf3}.tg-storage-attribution-list>div{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 2px;border-bottom:1px solid #edf1f5}.tg-storage-attribution-list span{display:grid;gap:2px}.tg-storage-attribution-list small{color:#718397;font-size:11px}.tg-storage-attribution-list em{color:#355d84;font-size:12px;font-style:normal;font-weight:700}.tg-storage-attribution>p{margin:10px 0 0;color:#718397;font-size:12px}
.tg-history-actions{display:flex;align-items:end;gap:8px}.tg-history-actions label{display:grid;gap:3px;color:#718397;font-size:11px}.tg-history-actions select{min-height:34px;padding:5px 28px 5px 8px;border:1px solid #cbd7e3;border-radius:6px;background:#fff;color:#344b62}.tg-history-pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px;color:#718397;font-size:12px}.tg-history-archive{display:block;margin-top:3px;color:#8b6a27;font-size:11px}

@media(min-width:721px){
  #tgDiagnostics.tg-diagnostic-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  #tgDiagnostics .tg-diagnostic-card{min-height:104px;align-items:flex-start;flex-direction:column}
  #tgDiagnostics .tg-diagnostic-value{width:100%;justify-content:space-between}
  .tg-storage-overview{grid-template-columns:minmax(0,1fr)}
  .tg-storage-breakdown{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.tg-product-editor .tg-editor-settings{margin:12px 16px 0;padding:12px;border:1px solid #e0e8f0;border-radius:9px;background:#f8fafc}
.tg-product-editor .tg-editor-caption{margin:12px 16px 0;padding:12px;border:1px solid #e0e8f0;border-radius:9px;background:#fff}
.tg-product-editor .tg-template-import{margin-top:12px}
.tg-product-editor .tg-editor-footer{position:sticky;bottom:0;z-index:3;background:rgba(250,251,253,.97);backdrop-filter:blur(8px)}

/* Reusable disclosure for advanced parameters introduced by task 045. */
.tg-advanced{margin:12px 0;border:1px solid var(--tg-border);border-radius:9px;background:#fff}
.tg-advanced>summary{display:flex;min-height:42px;align-items:center;gap:8px;padding:9px 12px;color:#40566d;cursor:pointer;font-weight:700;list-style:none}
.tg-advanced>summary::-webkit-details-marker{display:none}
.tg-advanced>summary::before{content:"›";display:inline-grid;width:20px;height:20px;place-items:center;border-radius:5px;color:#376eaa;background:#eaf3fc;font-size:18px;transition:transform .15s ease}
.tg-advanced[open]>summary::before{transform:rotate(90deg)}
.tg-advanced>summary small{margin-left:auto;color:var(--tg-muted);font-weight:400}
.tg-advanced-content{padding:12px;border-top:1px solid #e6edf4;background:#fafbfd}

/* The base order page remains horizontally scrollable inside the table, never at document level. */
.table-scroll{overscroll-behavior-x:contain;scrollbar-gutter:stable}

/* Task 047: scheduled-plan folders keep long IDs and actions inside their own columns. */
.tg-post-plan-table{min-width:1240px!important;table-layout:fixed}
.tg-post-plan-table col.tg-post-col-select{width:44px}
.tg-post-plan-table col.tg-post-col-plan{width:230px}
.tg-post-plan-table col.tg-post-col-type{width:150px}
.tg-post-plan-table col.tg-post-col-channel{width:105px}
.tg-post-plan-table col.tg-post-col-time{width:185px}
.tg-post-plan-table col.tg-post-col-preview{width:165px}
.tg-post-plan-table col.tg-post-col-status{width:112px}
.tg-post-plan-table col.tg-post-col-actions{width:250px}
.tg-post-plan-table :is(th,td){box-sizing:border-box;vertical-align:middle}
.tg-post-plan-table tbody td{height:104px;padding:12px 10px;overflow:hidden}
.tg-post-plan-table .tg-post-select{text-align:center}
.tg-post-plan-table .tg-post-select input{width:16px;height:16px;margin:0;accent-color:var(--tg-primary)}
.tg-post-plan{display:grid;min-width:0;gap:4px}
.tg-post-plan strong{overflow:hidden;color:#304962;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.tg-post-plan small{display:block;overflow:hidden;max-width:100%;color:#7a8ca0;font-size:11px;font-weight:400;text-overflow:ellipsis;white-space:nowrap}
.tg-post-type,.tg-post-channel,.tg-post-time{display:block;overflow:hidden;max-width:100%;color:#405a73;text-overflow:ellipsis;white-space:nowrap}
.tg-post-type{font-weight:600}
.tg-post-plan-table .tg-plan-status{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-post-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:0}
.tg-post-actions .tg-button{width:100%;min-width:0;min-height:34px;padding:6px 8px;font-size:12px;white-space:nowrap}
.tg-post-actions .tg-post-preview-action{grid-column:1/-1}
.tg-post-actions .danger{width:100%;min-width:0}

@media(max-width:1279px){
  .wrapper{width:100%;padding:12px}
  .ibox-content{padding:12px}
  .search-form{height:auto}
  .form-row{height:auto;min-height:44px;overflow-x:auto;overflow-y:hidden;padding:2px 0 6px;overscroll-behavior-x:contain;scrollbar-width:thin}
  .form-row.actions{height:auto;padding-bottom:8px}
  .column-form{height:auto;min-height:38px;overflow-x:auto;padding-bottom:7px;scrollbar-width:thin}
  .quote{height:auto;min-height:55px;overflow-x:auto}
  .table-view{margin-top:16px}
}
@media(max-height:760px) and (min-width:901px){
  .tg-task-shell{inset:8px 12px;max-height:none}
  .tg-task-head{padding:10px 16px}.tg-brand-mark{width:34px;height:34px;border-radius:9px}.tg-task-head h2{font-size:17px}.tg-task-head p{margin-top:0;font-size:11px}.tg-task-close{width:34px;height:34px}
  .tg-task-tabs{padding:6px 12px}.tg-task-tabs button{padding:7px 10px;font-size:12px}
  .tg-task-main{padding:12px}.tg-card{padding:13px;margin-bottom:10px}
  body .tg-task-overlay [data-tg-view="scheduled"] #tgPostDayPanel,body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-card{max-height:none}
  body .tg-task-overlay [data-tg-view="scheduled"] #tgPostDayPanel{min-height:0}
}
@media(max-width:1100px){
  body .tg-task-overlay [data-tg-view="scheduled"] .tg-task-dashboard{grid-template-columns:minmax(0,1fr)!important}
  body .tg-task-overlay [data-tg-view="scheduled"] #tgPostDayPanel{position:static;min-height:280px;max-height:520px}
  body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-card{max-height:none;overflow:visible}
  body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-footer{margin-right:-16px;margin-left:-16px}
}
@media(max-width:900px){
  .tg-task-shell{inset:0;border-radius:0;max-height:100dvh}
  .tg-task-head{padding:10px 12px}.tg-task-head p{display:none}.tg-brand-mark{width:34px;height:34px}.tg-task-head h2{font-size:17px}.tg-task-close{width:36px;height:36px}
  .tg-task-tabs{padding:6px 8px;scrollbar-width:thin}
  .tg-task-main{padding:10px;scrollbar-gutter:auto}
  .tg-card{padding:12px}
  .tg-task-launcher{top:22px;right:68px;bottom:auto;max-width:170px}
  body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-card .tg-job-form{grid-template-columns:1fr}
  [data-tg-view="scheduled"] .tg-create-card .tg-job-form>label{grid-column:1}
  body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-footer{margin-right:-12px;margin-left:-12px;padding:10px 12px}
  .tg-product-list-panel,.tg-product-editor{position:static;max-height:none;overflow:visible}
  .tg-editor-footer{gap:8px;align-items:stretch;flex-direction:column}
  #tgJobPreviewCard>.tg-job-sticky-controls .tg-history-head,#tgJobPreviewCard>.tg-job-sticky-controls .tg-job-list-tools{align-items:stretch;flex-direction:column}
  #tgJobPreviewCard>.tg-job-sticky-controls .tg-pagination{justify-content:space-between}
}
@media(max-width:720px){
  #tgJobPreviewCard>.tg-job-sticky-controls{position:static}
  #tgJobPreviewCard>.tg-job-table-collapsed{align-items:flex-start;flex-direction:column;text-align:left}
  #tgJobPreviewCard>.tg-table-wrap,#tgJobPreviewCard>.tg-job-table-scroll{max-height:50dvh;overflow:auto;border:1px solid var(--tg-border)}
  #tgJobPreviewCard .tg-table{display:block;min-width:0;background:transparent}
  #tgJobPreviewCard .tg-table thead{display:none}
  #tgJobPreviewCard .tg-table tbody{display:grid;gap:10px}
  #tgJobPreviewCard .tg-table tr{display:grid;overflow:hidden;border:1px solid var(--tg-border);border-radius:10px;background:#fff;box-shadow:0 2px 7px rgba(31,49,70,.05)}
  #tgJobPreviewCard .tg-table td{display:grid;width:100%!important;max-width:none!important;min-width:0;height:auto;box-sizing:border-box;grid-template-columns:106px minmax(0,1fr);gap:10px;align-items:center;padding:8px 10px;border-bottom:1px solid #edf1f5;white-space:normal;text-align:left}
  #tgJobPreviewCard .tg-table td:last-child{border-bottom:0}
  #tgJobPreviewCard .tg-table td::before{color:var(--tg-muted);font-size:11px;font-weight:700}
  #tgJobPreviewCard .tg-table td:nth-child(1)::before{content:"序号"}
  #tgJobPreviewCard .tg-table td:nth-child(2)::before{content:"历史时间"}
  #tgJobPreviewCard .tg-table td:nth-child(3)::before{content:"消息 ID"}
  #tgJobPreviewCard .tg-table td:nth-child(4)::before{content:"原消息类型"}
  #tgJobPreviewCard .tg-table td:nth-child(5)::before{content:"产品"}
  #tgJobPreviewCard .tg-table td:nth-child(6)::before{content:"提前"}
  #tgJobPreviewCard .tg-table td:nth-child(7)::before{content:"耗时"}
  #tgJobPreviewCard .tg-table td:nth-child(8)::before{content:"支付中位置"}
  #tgJobPreviewCard .tg-table td:nth-child(9)::before{content:"状态"}
  #tgJobPreviewCard .tg-table td:nth-child(10)::before{content:"操作"}
  #tgJobPreviewCard .tg-table td[colspan]{display:block;height:auto;padding:28px 14px;text-align:center}
  #tgJobPreviewCard .tg-table td[colspan]::before{content:none}
  #tgJobPreviewCard>.tg-actions{top:0;margin-right:-2px;margin-left:-2px}
  #tgJobPreviewCard>.tg-execution-flow{margin-top:8px}
  .tg-task-launcher{right:58px;padding-right:10px}.tg-task-launcher>span{margin-right:0}.tg-task-launcher{font-size:0}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* NB-155: the order view is a pure live preview of the current pull run. */
.tg-order-page-view{min-width:0}
.tg-order-page{min-width:0}
.tg-order-page #tgOrderPageHost{min-width:0}
.tg-order-page #tgOrderPageHost>.tg-order-management-root{width:100%;min-width:0;padding:0}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root>.ibox{margin:0;border:0;border-radius:0;background:#fff;box-shadow:none;overflow:hidden}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .ibox-title,
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .search-form,
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .column-form,
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .table-view-presets,
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .quote,
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .pager-row{display:none!important}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .ibox-content{padding:0!important}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .table-view{height:auto;min-height:0;margin:0;border:0;background:#fff;overflow:visible}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .table-scroll{max-width:100%;overflow:auto;background:#fff;scrollbar-gutter:stable}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .table-scroll thead{display:none}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .table-scroll tbody td{text-align:left}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .template-status-badge{display:inline-block;height:18px;padding:0 5px;border-radius:1px;color:#fff;font-size:12px;line-height:18px;vertical-align:middle}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .template-status-success{background:#009688}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .template-status-pending{background:#ffb800}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .template-status-closed{color:#666;background:#eee}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .template-status-callback{color:green;vertical-align:middle}
.tg-order-page #tgOrderPageHost>.tg-order-preview-root .template-status-no{display:inline-block;height:18px;padding:0 4px;color:#666;background:#f1f1f1;line-height:18px;vertical-align:middle}
.tg-order-page #tgOrderPageHost>.tg-order-management-root.order-template-image-reference .table-scroll table{border-collapse:collapse}
.tg-order-page #tgOrderPageHost>.tg-order-management-root.order-template-image-reference .table-scroll tbody td{height:35px;padding:0;border-right:0;border-left:0;border-bottom:1px solid #e6e6e6;font-size:12px;line-height:34px;color:#666}
.tg-order-page #tgOrderPageHost>.tg-order-management-root.order-template-image-reference .table-scroll tbody tr:nth-child(even) td{background:#fff}
.tg-order-page #tgOrderPageHost>.tg-order-management-root.order-template-image-reference .table-scroll .cell{height:34px;padding:0 6px;line-height:34px;white-space:nowrap}
.tg-order-page #tgOrderPageHost>.tg-order-management-root.order-template-xypay .table-scroll tbody td{height:39px;padding:5px 0;border-right:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;color:#666;font-size:14px;line-height:20px}
.tg-order-page #tgOrderPageHost>.tg-order-management-root.order-template-xypay .table-scroll .cell{height:28px;padding:0 15px;line-height:28px}
@media(max-width:720px){.tg-order-page #tgOrderPageHost>.tg-order-management-root{padding:0}}

/* Task 059: permanent NB workbench with the legacy order page in an independent floating window. */
.tg-task-launcher,.tg-task-close{display:none!important}
.tg-task-overlay,.tg-task-overlay.show{display:block;background:#f3f6fa}
.tg-task-shell{inset:0;width:100%;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;box-shadow:none}
.tg-order-open{display:inline-flex;min-height:40px;align-items:center;gap:8px;padding:7px 14px;border:1px solid rgba(255,255,255,.42);border-radius:10px;color:#173b67;background:#fff;cursor:pointer;font:700 13px/1.2 "Helvetica Neue",Helvetica,"PingFang SC",Arial,sans-serif;box-shadow:0 4px 12px rgba(0,0,0,.12);transition:background-color .15s ease,box-shadow .15s ease,transform .15s ease}
.tg-order-open span{display:grid;width:23px;height:23px;place-items:center;border-radius:7px;color:#fff;background:#2775d1;font-size:14px}
.tg-order-open:hover{background:#edf5ff;box-shadow:0 6px 16px rgba(0,0,0,.16);transform:translateY(-1px)}
.tg-order-open:focus-visible,.tg-order-window-head button:focus-visible{outline:3px solid rgba(145,197,255,.55);outline-offset:2px}
.tg-order-overlay{position:fixed;inset:0;z-index:300;display:none;place-items:center;padding:18px;background:rgba(15,23,42,.56);backdrop-filter:blur(4px);font:14px/1.5 "Helvetica Neue",Helvetica,"PingFang SC",Arial,sans-serif}
.tg-order-overlay.show{display:grid}
.tg-order-window{display:flex;width:min(1920px,calc(100vw - 36px));height:calc(100dvh - 36px);min-width:0;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.72);border-radius:16px;background:#eef2f6;box-shadow:0 28px 90px rgba(8,20,34,.48)}
.tg-order-window-head{display:flex;min-height:70px;flex:0 0 auto;align-items:center;justify-content:space-between;gap:18px;padding:11px 14px 11px 18px;color:#fff;background:linear-gradient(120deg,#142f52,#1f548d)}
.tg-order-window-head>div{min-width:0}.tg-order-window-head span{display:block;margin-bottom:1px;color:#90c6ff;font-size:10px;font-weight:800;letter-spacing:.1em}.tg-order-window-head h2{margin:0;font-size:18px}.tg-order-window-head p{margin:2px 0 0;overflow:hidden;color:#cfe0f5;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.tg-order-window-head button{width:42px;height:42px;flex:0 0 auto;border:0;border-radius:10px;color:#173b67;background:#fff;cursor:pointer;font-size:25px;line-height:40px}
.tg-order-window-head button:hover{background:#eaf3fc}
.tg-order-window-host{min-width:0;min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#eee}
.tg-order-window-host>.tg-order-management-root{width:100%;min-width:1180px;padding:14px}
.tg-order-window-host>.tg-order-management-root>.ibox{margin:0;border-radius:10px;box-shadow:0 5px 18px rgba(30,44,60,.16)}
body.tg-workspace-open,body.tg-order-window-open{overflow:hidden;overscroll-behavior:none}

@media(max-width:720px){
  .tg-order-open{min-height:40px;margin-left:auto;padding:7px 10px;font-size:12px}.tg-order-open span{width:21px;height:21px}
  .tg-order-overlay{padding:0;background:#eef2f6;backdrop-filter:none}
  .tg-order-window{width:100%;height:100dvh;border:0;border-radius:0;box-shadow:none}
  .tg-order-window-head{min-height:60px;padding:max(8px,env(safe-area-inset-top)) 10px 8px 12px}.tg-order-window-head h2{font-size:16px}.tg-order-window-head p{display:none}.tg-order-window-head button{width:40px;height:40px}
  .tg-order-window-host>.tg-order-management-root{padding:8px}
}

/* Task 052: iPhone/mobile workbench. Desktop rules above remain unchanged. */
@media(max-width:720px){
  .tg-task-overlay{font-size:14px;background:#f3f6fa}
  .tg-task-shell{inset:0;width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;box-shadow:none}
  .tg-task-head{order:1;min-height:58px;padding:max(9px,env(safe-area-inset-top)) 12px 9px;gap:9px}
  .tg-brand-mark{width:34px;height:34px;border-radius:9px;font-size:11px}
  .tg-task-head h2{font-size:16px;line-height:1.2}
  .tg-task-head p,.tg-head-safety{display:none}
  .tg-task-close{width:40px;height:40px;margin-left:auto;flex:0 0 auto;font-size:22px}
  .tg-system-banner{order:2;align-items:flex-start;padding:8px 10px;font-size:12px}
  .tg-system-banner .tg-button{min-width:92px;flex:0 0 auto}
  .tg-task-main{order:3;min-height:0;padding:10px 9px calc(14px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .tg-task-main::-webkit-scrollbar{display:none}
  .tg-task-tabs{order:4;z-index:20;min-height:62px;flex:0 0 auto;gap:5px;padding:7px 8px max(7px,env(safe-area-inset-bottom));overflow-x:auto;overflow-y:hidden;border-top:1px solid #d6e0ea;border-bottom:0;box-shadow:0 -5px 18px rgba(28,48,69,.08);scroll-padding-inline:12px;scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .tg-task-tabs::-webkit-scrollbar{display:none}
  .tg-task-tabs button{min-width:max-content;min-height:44px;flex:0 0 auto;padding:9px 12px;border:1px solid transparent;border-radius:10px;scroll-snap-align:center;font-size:13px;white-space:nowrap}
  .tg-task-tabs button.active{border-color:#1f68bb}
  .tg-card{margin-bottom:10px;padding:12px;border-radius:12px;box-shadow:0 1px 5px rgba(31,49,70,.04)}
  .tg-section-head,.tg-history-head,.tg-tool-page-head,.tg-account-head,.tg-ratio-header{gap:9px;align-items:flex-start}
  .tg-section-head h3,.tg-history-head h3,.tg-tool-page-head h3{font-size:16px}
  .tg-section-head p,.tg-history-head p,.tg-tool-page-head p{line-height:1.45}
  .tg-mode-badge{padding:4px 8px;flex:0 0 auto;font-size:11px}
  .tg-flow-card{display:none}
  .tg-task-dashboard,.tg-grid,.tg-grid.two,.tg-job-form,.tg-post-form-fields,.tg-account-layout,.tg-screenshot-range,.tg-ratio-layout,.tg-local-product-body,.tg-tool-host .pull-grid,.tg-tool-host .beautify-form-grid{grid-template-columns:minmax(0,1fr)!important}
  .tg-job-form{margin-top:14px}
  .tg-field-wide,.tg-post-form-fields>*,.tg-post-form-basics .tg-post-form-fields>label:last-child,.tg-post-form-schedule .tg-post-form-fields>label:last-child{grid-column:1!important}
  .tg-field input,.tg-field select,.tg-field textarea,.tg-tool-host input,.tg-tool-host select,.tg-tool-host textarea{max-width:100%;min-height:44px;font-size:16px}
  .tg-field input[type=checkbox],.tg-field input[type=radio]{min-height:0;font-size:inherit}
  input[type=date],input[type=time],input[type=datetime-local]{width:100%;min-width:0}
  input[type=file]{padding:8px 6px}
  .tg-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .tg-actions>.tg-field{grid-column:1/-1;max-width:none!important}
  .tg-actions button,.tg-button,.tg-main-action{min-height:44px;padding:9px 11px}
  .tg-actions button:only-child,.tg-actions .danger:last-child{grid-column:1/-1}
  .tg-create-footer,body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-footer{position:static;gap:10px;align-items:stretch;flex-direction:column;margin:12px 0 0!important;padding:12px 0 0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
  .tg-create-footer .tg-main-action,.tg-post-footer-actions,.tg-post-footer-actions .tg-button{width:100%}
  .tg-post-footer-actions{display:grid!important;grid-template-columns:1fr 1fr;margin-left:0}
  .tg-post-form-section{padding:11px}
  [data-tg-view="scheduled"] #tgProductChecks{grid-template-columns:1fr}
  [data-tg-view="scheduled"] .tg-type-pool label{grid-template-columns:18px minmax(0,1fr) 58px}
  [data-tg-view="scheduled"] .tg-type-pool input[type=number]{width:58px!important}
  [data-tg-view="scheduled"] #tgPostDayPanel>.tg-actions{grid-template-columns:1fr;margin-top:10px;padding:10px}
  [data-tg-view="scheduled"] #tgPostDayPanel>.tg-table-wrap{max-height:none;overflow:visible;border:0}
  [data-tg-view="scheduled"] .tg-folder-toolbar{position:static;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  [data-tg-view="scheduled"] .tg-folder-toolbar .tg-selection-count,[data-tg-view="scheduled"] .tg-folder-toolbar #tgTaskDeleteSelected{grid-column:1/-1;margin-left:0}
  .tg-post-folder summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 8px;padding:12px}
  .tg-post-folder summary>small{grid-column:1/-1;grid-row:2;white-space:normal}
  .tg-folder-count{grid-column:2;grid-row:1;margin-left:0}
  .tg-folder-detail{overflow:visible}
  .tg-folder-detail table{min-width:0}

  /* Saved scheduled plans become readable action cards instead of a 1240px sheet. */
  .tg-post-plan-table{display:block;width:100%;min-width:0!important;background:transparent}
  .tg-post-plan-table colgroup,.tg-post-plan-table thead{display:none}
  .tg-post-plan-table tbody{display:grid;gap:10px;padding:10px}
  .tg-post-plan-table tr{display:grid;overflow:hidden;border:1px solid #dce5ee;border-radius:11px;background:#fff;box-shadow:0 2px 7px rgba(31,49,70,.05)}
  .tg-post-plan-table tbody td{display:grid;width:100%;height:auto;min-height:38px;box-sizing:border-box;grid-template-columns:94px minmax(0,1fr);gap:9px;align-items:center;padding:8px 10px;overflow:visible;border-bottom:1px solid #edf1f5;white-space:normal;text-align:left}
  .tg-post-plan-table tbody td:last-child{border-bottom:0}
  .tg-post-plan-table tbody td::before{color:#718397;font-size:11px;font-weight:700}
  .tg-post-plan-table tbody td:nth-child(1)::before{content:"选择"}
  .tg-post-plan-table tbody td:nth-child(2)::before{content:"计划"}
  .tg-post-plan-table tbody td:nth-child(3)::before{content:"消息类型"}
  .tg-post-plan-table tbody td:nth-child(4)::before{content:"频道"}
  .tg-post-plan-table tbody td:nth-child(5)::before{content:"发送时间"}
  .tg-post-plan-table tbody td:nth-child(6)::before{content:"成品预览"}
  .tg-post-plan-table tbody td:nth-child(7)::before{content:"发送状态"}
  .tg-post-plan-table tbody td:nth-child(8)::before{content:"操作"}
  .tg-post-plan-table .tg-post-select{text-align:left}
  .tg-post-plan-table .tg-post-select input{width:20px;height:20px}
  .tg-post-plan strong,.tg-post-plan small,.tg-post-type,.tg-post-channel,.tg-post-time,.tg-post-plan-table .tg-plan-status{overflow:visible;white-space:normal;text-overflow:clip;word-break:break-word}
  .tg-post-actions{grid-column:1/-1;grid-template-columns:1fr 1fr}
  .tg-post-actions .tg-button{min-height:42px;font-size:13px}

  /* Single-message preview keeps WPS-like fields, but stacks them for touch editing. */
  [data-tg-view="scheduled"] .tg-wps-sheet{overflow:visible}
  [data-tg-view="scheduled"] .tg-scheduled-preview-table{display:block;width:100%;min-width:0!important;background:transparent}
  .tg-scheduled-preview-table colgroup,.tg-scheduled-preview-table thead{display:none}
  .tg-scheduled-preview-table tbody,.tg-scheduled-preview-table tr{display:block}
  .tg-scheduled-preview-table tr{overflow:hidden;border:1px solid #dbe5ef;border-radius:11px;background:#fff}
  .tg-scheduled-preview-table td{display:grid!important;width:100%;height:auto!important;min-height:52px;box-sizing:border-box;grid-template-columns:92px minmax(0,1fr);gap:9px;align-items:start;padding:9px 10px!important;border-bottom:1px solid #edf1f5;white-space:normal!important}
  .tg-scheduled-preview-table td:last-child{border-bottom:0}
  .tg-scheduled-preview-table td::before{color:#718397;font-size:11px;font-weight:700;line-height:44px}
  .tg-scheduled-preview-table td:nth-child(1)::before{content:"消息类型"}
  .tg-scheduled-preview-table td:nth-child(2)::before{content:"发送时间"}
  .tg-scheduled-preview-table td:nth-child(3)::before{content:"产品"}
  .tg-scheduled-preview-table td:nth-child(4)::before{content:"文字内容"}
  .tg-scheduled-preview-table td:nth-child(5)::before{content:"图片文件"}
  .tg-scheduled-preview-table td:nth-child(6)::before{content:"订单截图"}
  .tg-scheduled-preview-table td:nth-child(7)::before{content:"操作"}
  .tg-scheduled-preview-table :is(select,input,textarea,[data-sheet-send]){width:100%!important;min-width:0!important;min-height:44px;box-sizing:border-box;font-size:16px}
  .tg-scheduled-preview-table textarea{min-height:132px}
  .tg-shot-cell{min-width:0}
  .tg-shot-cell img{display:block;width:100%;height:auto;max-height:none;object-fit:contain}
  .tg-shot-cell .tg-button{width:100%;margin-top:7px}
  .tg-time-link{font-size:12px;line-height:1.55;word-break:break-word}

  /* Day review, monthly history and send records use the same mobile card language. */
  .tg-mobile-day-table,.tg-mobile-history-table,.tg-mobile-runs-table{display:block;width:100%;background:transparent}
  .tg-mobile-day-table thead,.tg-mobile-history-table thead,.tg-mobile-runs-table thead{display:none}
  .tg-mobile-day-table tbody,.tg-mobile-history-table tbody,.tg-mobile-runs-table tbody{display:grid;gap:9px}
  .tg-mobile-day-table tr,.tg-mobile-history-table tr,.tg-mobile-runs-table tr{display:grid;overflow:hidden;border:1px solid #dce5ee;border-radius:10px;background:#fff}
  .tg-mobile-day-table td,.tg-mobile-history-table td,.tg-mobile-runs-table td{display:grid;width:100%;height:auto;min-height:38px;box-sizing:border-box;grid-template-columns:94px minmax(0,1fr);gap:9px;align-items:center;padding:8px 10px;border-bottom:1px solid #edf1f5;white-space:normal;word-break:break-word}
  .tg-mobile-day-table td:last-child,.tg-mobile-history-table td:last-child,.tg-mobile-runs-table td:last-child{border-bottom:0}
  .tg-mobile-day-table td::before,.tg-mobile-history-table td::before,.tg-mobile-runs-table td::before{color:#718397;font-size:11px;font-weight:700}
  .tg-mobile-day-table td:nth-child(1)::before{content:"发送时间"}
  .tg-mobile-day-table td:nth-child(2)::before{content:"类型"}
  .tg-mobile-day-table td:nth-child(3)::before{content:"产品"}
  .tg-mobile-day-table td:nth-child(4)::before{content:"预览状态"}
  .tg-mobile-day-table td:nth-child(5)::before{content:"成品"}
  .tg-mobile-day-table td:nth-child(6)::before{content:"操作"}
  .tg-mobile-history-table td:nth-child(1)::before{content:"日期范围"}
  .tg-mobile-history-table td:nth-child(2)::before{content:"频道"}
  .tg-mobile-history-table td:nth-child(3)::before{content:"状态"}
  .tg-mobile-history-table td:nth-child(4)::before{content:"更新时间"}
  .tg-mobile-history-table td:nth-child(5)::before{content:"操作"}
  .tg-mobile-runs-table td:nth-child(1)::before{content:"计划时间"}
  .tg-mobile-runs-table td:nth-child(2)::before{content:"计划"}
  .tg-mobile-runs-table td:nth-child(3)::before{content:"产品"}
  .tg-mobile-runs-table td:nth-child(4)::before{content:"状态"}
  .tg-mobile-runs-table td:nth-child(5)::before{content:"消息 ID"}
  .tg-mobile-runs-table td:nth-child(6)::before{content:"结果"}
  :is(.tg-mobile-day-table,.tg-mobile-history-table,.tg-mobile-runs-table) td[colspan]{display:block;padding:24px 12px;text-align:center}
  :is(.tg-mobile-day-table,.tg-mobile-history-table,.tg-mobile-runs-table) td[colspan]::before{content:none}

  .tg-diagnostic-grid,.tg-quick-grid{grid-template-columns:1fr}
  .tg-diagnostic-card,.tg-quick-grid button{min-height:72px;padding:12px}
  .tg-dashboard-actions .tg-button{width:100%}
  .tg-execution-flow{margin-right:-4px;margin-left:-4px;padding:8px;scroll-snap-type:x proximity}
  .tg-execution-flow span{min-height:34px;display:inline-flex;align-items:center;scroll-snap-align:start}
  .tg-products-heading,.tg-local-product-head,.tg-ratio-header{align-items:stretch}
  .tg-local-product-manager,.tg-product-ratio-editor,.tg-product-list-panel,.tg-product-editor{border-radius:11px}
  .tg-local-product-body,.tg-ratio-layout{padding:10px}
  .tg-product-list-scroll{max-height:50dvh}
  .tg-account-list{max-height:34dvh}
  .tg-confirm-layer{padding:12px}
  .tg-confirm-dialog{width:100%;grid-template-columns:38px minmax(0,1fr);gap:10px;padding:17px}
  .tg-confirm-actions{display:grid;grid-template-columns:1fr 1fr}
  .tg-confirm-actions button{min-height:44px}
  .tg-toast-region{right:10px;bottom:calc(72px + env(safe-area-inset-bottom));left:10px}
  .tg-toast{min-width:0;max-width:none}
  .tg-task-launcher{right:12px;bottom:calc(14px + env(safe-area-inset-bottom));height:50px;padding:0 12px;font-size:13px}
  .tg-task-launcher>span{margin-right:7px}
}

@media(max-width:430px){
  .tg-task-main{padding-right:8px;padding-left:8px}
  .tg-card{padding:11px}
  .tg-section-head,.tg-history-head,.tg-tool-page-head{flex-wrap:wrap}
  .tg-history-head>.tg-button,.tg-tool-page-head>.tg-button{width:100%}
  .tg-actions,.tg-post-footer-actions,.tg-confirm-actions{grid-template-columns:1fr}
  .tg-actions>*{grid-column:1!important}
  .tg-post-plan-table tbody td,.tg-scheduled-preview-table td,.tg-mobile-day-table td,.tg-mobile-history-table td,.tg-mobile-runs-table td{grid-template-columns:82px minmax(0,1fr);gap:7px;padding:8px}
  .tg-post-actions{grid-template-columns:1fr}
  .tg-post-actions .tg-post-preview-action{grid-column:1}
  #tgJobPreviewCard .tg-table td{grid-template-columns:88px minmax(0,1fr)}
  #tgJobPreviewCard #tgJobItems td:last-child .tg-button{width:100%;min-height:40px;margin:3px 0}
}

/* Task 066: desktop operations console. The existing mobile workbench stays unchanged. */
@media(min-width:721px){
  :root{
    --nb-navy:#0e2746;
    --nb-navy-deep:#0a1f39;
    --nb-blue:#246dd8;
    --nb-blue-hover:#1c5fc2;
    --nb-canvas:#f5f7fa;
    --nb-panel:#fff;
    --nb-border:#dde4ec;
    --nb-text:#1f2d3d;
    --nb-muted:#718096;
  }
  .tg-task-overlay{font:14px/1.5 "Helvetica Neue",Helvetica,"PingFang SC",Arial,sans-serif;background:var(--nb-canvas)}
  .tg-task-shell{
    position:absolute;inset:0;display:grid;width:100%;height:100dvh;
    grid-template-columns:232px minmax(0,1fr);grid-template-rows:72px minmax(0,1fr);
    overflow:hidden;border:0;border-radius:0;background:var(--nb-canvas);box-shadow:none
  }
  .tg-task-head{
    grid-column:1;grid-row:1;display:flex;min-width:0;align-items:center;gap:11px;
    padding:15px 18px;color:#fff;background:var(--nb-navy-deep);border-bottom:1px solid rgba(255,255,255,.08)
  }
  .tg-brand-mark{width:40px;height:40px;border-radius:10px;color:var(--nb-navy);background:#fff;box-shadow:none}
  .tg-task-head>div:nth-child(2){min-width:0}
  .tg-task-head h2{overflow:hidden;margin:0;font-size:16px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
  .tg-task-head p{overflow:hidden;margin:3px 0 0;color:#9fb4cc;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
  .tg-task-head .tg-head-safety,.tg-task-head .tg-order-open{display:none}
  .tg-task-tabs{
    grid-column:1;grid-row:2;display:flex;min-height:0;align-items:stretch;flex-direction:column;gap:3px;
    overflow:auto;padding:14px 10px 12px;color:#d5e1ee;background:linear-gradient(180deg,var(--nb-navy) 0%,#0b223e 100%);
    border:0;box-shadow:none;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent
  }
  .tg-task-tabs::-webkit-scrollbar{width:5px}.tg-task-tabs::-webkit-scrollbar-thumb{border-radius:6px;background:rgba(255,255,255,.2)}
  .tg-nav-group-label{display:block;margin:8px 11px 4px;color:#718ba6;font-size:10px;font-weight:800;letter-spacing:.12em}
  .tg-task-tabs button{
    position:relative;display:flex;min-height:40px;align-items:center;gap:11px;padding:9px 12px;border:0;border-radius:7px;
    color:#cbd8e6;background:transparent;text-align:left;font-size:13px;font-weight:600;box-shadow:none
  }
  .tg-task-tabs button::before{
    display:inline-grid;width:18px;flex:0 0 18px;place-items:center;color:#91a9c2;
    font:15px/1 system-ui,-apple-system,"Segoe UI",sans-serif
  }
  .tg-task-tabs button:hover{color:#fff;background:rgba(255,255,255,.07)}
  .tg-task-tabs button:hover::before{color:#d9e8f7}
  .tg-task-tabs button.active{color:#fff;background:rgba(88,143,205,.22);box-shadow:inset 3px 0 #5aa2f4}
  .tg-task-tabs button.active::before{color:#fff}
  .tg-task-tabs button[data-tg-tab="dashboard"]::before{content:"◉"}
  .tg-task-tabs button[data-tg-tab="tasks"]::before{content:"▣"}
  .tg-task-tabs button[data-tg-tab="scheduled"]::before{content:"◷"}
  .tg-order-nav::before{content:"▦"}
  .tg-task-tabs button[data-tg-tab="pull"]::before{content:"⇩"}
  .tg-task-tabs button[data-tg-tab="beautify"]::before{content:"✓"}
  .tg-task-tabs button[data-tg-tab="products"]::before{content:"◇"}
  .tg-task-tabs button[data-tg-tab="channels"]::before{content:"⌁"}
  .tg-task-tabs button[data-tg-tab="telegram"]::before{content:"➤"}
  .tg-task-tabs button[data-tg-tab="storage"]::before{content:"▤"}
  .tg-task-tabs button[data-tg-tab="settings"]::before{content:"⚙"}
  .tg-task-tabs button[data-tg-tab="settings"]{margin-left:0}
  .tg-tab-divider{display:none}
  .tg-sidebar-account{display:block;min-height:50px;margin-top:auto;padding:12px 10px 3px;border-top:1px solid rgba(255,255,255,.1);color:#fff}
  .tg-sidebar-avatar{display:grid;width:32px;height:32px;place-items:center;border-radius:50%;color:#fff;background:#19a36f;font-size:11px;font-weight:800}
  .tg-sidebar-account-trigger>span:nth-child(2){display:flex;min-width:0;flex-direction:column}
  .tg-sidebar-account strong{overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
  .tg-sidebar-account small{color:#87a0ba;font-size:10px}.tg-sidebar-account i{color:#8fa6bd;font-style:normal}
  .tg-content-head{
    grid-column:2;grid-row:1;display:flex;min-width:0;align-items:center;justify-content:space-between;gap:20px;
    padding:0 24px;border-bottom:1px solid var(--nb-border);background:#fff
  }
  .tg-content-head>div:first-child{display:flex;min-width:0;align-items:baseline;gap:12px}
  .tg-content-eyebrow{color:#7b8b9d;font-size:10px;font-weight:800;letter-spacing:.11em;text-transform:uppercase}
  .tg-content-head h1{margin:0;color:var(--nb-text);font-size:20px;line-height:1.2}
  .tg-content-context{display:flex;align-items:center;gap:14px;color:#607286;font-size:12px}
  .tg-content-context>span:first-child{padding-right:14px;border-right:1px solid var(--nb-border)}
  .tg-content-health{display:inline-flex;align-items:center;gap:6px;color:#26965a;font-weight:700}
  .tg-content-health i{width:7px;height:7px;border-radius:50%;background:#31ad68;box-shadow:0 0 0 3px #e4f6eb}
  .tg-task-main{
    grid-column:2;grid-row:2;min-width:0;min-height:0;overflow:auto;padding:20px 22px 26px;background:var(--nb-canvas);
    scrollbar-gutter:stable;overscroll-behavior:contain
  }
  .tg-task-main>.tg-view{width:min(100%,var(--saas-content-max));margin-right:auto;margin-left:auto}
  .tg-system-banner{position:fixed;z-index:350;top:12px;right:24px;left:auto;width:min(560px,calc(100vw - 280px));box-shadow:0 8px 24px rgba(15,39,70,.16)}
  .tg-card,.tg-tool-page-head,.tg-local-product-manager,.tg-product-ratio-editor,.tg-product-list-panel,.tg-product-editor{
    border-color:var(--nb-border);border-radius:8px;background:#fff;box-shadow:none
  }
  .tg-card{margin-bottom:14px;padding:16px}
  .tg-section-head h3,.tg-history-head h3,.tg-tool-page-head h3,.tg-products-heading h3{color:#24364b;font-size:16px}
  .tg-section-head p,.tg-history-head p,.tg-tool-page-head p,.tg-products-heading p{color:#7a8b9d}
  .tg-section-kicker{color:var(--nb-blue);font-size:9px}
  .tg-mode-badge,.tg-ratio-live{border-radius:5px}
  .tg-field{gap:5px}.tg-field span{color:#586d82;font-size:11px;font-weight:600}
  .tg-field input,.tg-field select,.tg-field textarea{
    min-height:38px;padding:8px 10px;border-color:#cfd9e4;border-radius:6px;color:#26384a;background:#fff
  }
  .tg-field input:focus,.tg-field select:focus,.tg-field textarea:focus{
    outline:0;border-color:#6ba3ea;box-shadow:0 0 0 3px rgba(36,109,216,.12)
  }
  .tg-actions button,.tg-button,.tg-main-action,.tg-tool-shortcuts button,.tg-tool-page-head>button{
    min-height:36px;padding:7px 13px;border-radius:6px;box-shadow:none;font-weight:600
  }
  .tg-main-action,.tg-actions .primary,.tg-button.primary{border-color:var(--nb-blue)!important;background:var(--nb-blue)!important}
  .tg-main-action:hover,.tg-actions .primary:hover,.tg-button.primary:hover{background:var(--nb-blue-hover)!important}
  .tg-task-dashboard{grid-template-columns:minmax(0,1.65fr) minmax(290px,.58fr);gap:14px}
  .tg-create-card,.tg-flow-card{min-height:0}
  .tg-flow-stack{gap:7px}.tg-flow-stack>div{padding:9px 10px;border-radius:7px;background:#f8fafc}.tg-flow-stack b{border-radius:6px}
  .tg-recognition,.tg-screenshot-range,.tg-post-form-section,.tg-ratio-settings,.tg-ratio-weights,.tg-ratio-result{border-radius:7px;background:#fafbfd}
  .tg-create-footer{margin-top:14px}
  .tg-table-wrap{border-radius:6px;border-color:var(--nb-border);background:#fff}
  .tg-table th,.tg-table td{height:44px;box-sizing:border-box;padding:8px 10px;border-bottom-color:#e7ecf1}
  .tg-table th{z-index:2;color:#516579;background:#f7f9fb;font-size:12px;font-weight:700}
  .tg-table tbody tr:hover td{background:#f8fbff}
  .tg-badge,.tg-plan-status{border-radius:4px}
  .tg-order-nav{display:flex}
  .tg-order-window{border-radius:10px}.tg-order-window-head{min-height:62px;background:var(--nb-navy)}
  .tg-order-window-host>.tg-order-management-root{padding:12px}
  .tg-products-page{gap:12px}.tg-products-heading{padding:0}
  .tg-local-product-head,.tg-ratio-header{padding:12px 14px;background:#fbfcfe}
  .tg-ratio-layout{grid-template-columns:220px minmax(340px,480px) minmax(300px,1fr);padding:12px 14px 14px}
  .tg-products-workbench{gap:12px}
  .tg-product-list-panel,.tg-product-editor{top:0;max-height:calc(100dvh - 116px)}
  [data-tg-view="scheduled"] .tg-create-card>.tg-section-head{border-radius:8px 8px 0 0;background:#fbfcfe}
  body .tg-task-overlay [data-tg-view="scheduled"] .tg-create-card{border-radius:8px}
  [data-tg-view="scheduled"] .tg-post-form-section{padding:12px}
  [data-tg-view="scheduled"] #tgPostDayPanel>.tg-table-wrap{max-height:390px}
  [data-tg-view="scheduled"] .tg-folder-toolbar{background:#fff}
  [data-tg-view="scheduled"] .tg-scheduled-preview-table{min-width:1280px!important}
  .tg-post-plan-table{min-width:1120px!important}
}

@media(max-width:720px){
  .tg-nav-group-label,.tg-sidebar-account,.tg-content-head,.tg-order-nav{display:none!important}
}

.tg-inline-search{display:flex;min-width:180px;margin-left:auto}
.tg-inline-search input{width:100%;min-height:34px;padding:7px 10px;border:1px solid var(--nb-border);border-radius:6px;color:var(--nb-text);background:#fff}
.tg-inline-search input:focus{outline:0;border-color:var(--nb-blue);box-shadow:0 0 0 3px rgba(36,109,216,.12)}
.tg-security-card{margin-top:14px}
.tg-security-facts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 10px}
.tg-security-facts span{display:flex;flex-direction:column;gap:3px;min-width:150px;padding:9px 11px;border:1px solid var(--nb-border);border-radius:7px;background:#fafbfd;color:#52677d;font-size:12px}
.tg-security-facts strong{color:#2a4058;font-size:11px}
.tg-audit-list{display:grid;gap:5px;margin:0;padding:0;list-style:none;max-height:180px;overflow:auto}
.tg-audit-list li{display:flex;gap:12px;padding:6px 8px;border-bottom:1px solid #edf1f5;color:#5a6f84;font-size:11px}
.tg-audit-list time{flex:0 0 150px;color:#8795a4}
.tg-audit-empty{color:#8795a4!important}

/* SMM-X third-party provider workspace */
.tg-smmx-page{display:grid;gap:14px}
.tg-smmx-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;background:linear-gradient(135deg,#f7fbff,#fff)}
.tg-smmx-hero h3{margin:4px 0 5px;color:#1d3959;font-size:20px}
.tg-smmx-hero p{margin:0;color:#6c8096;font-size:12px}
.tg-smmx-grid{display:grid;grid-template-columns:minmax(300px,.72fr) minmax(520px,1.28fr);gap:14px;align-items:start}
.tg-smmx-config-card,.tg-smmx-service-card,.tg-smmx-order-card{min-width:0}
.tg-smmx-config-card .tg-grid{grid-template-columns:1fr}
.tg-smmx-switches{display:flex;flex-wrap:wrap;gap:10px 18px;margin:14px 0;padding:11px 12px;border:1px solid var(--nb-border);border-radius:7px;background:#fafbfd}
.tg-smmx-switches label,.tg-danger-check{display:flex;align-items:center;gap:7px;color:#425b74;font-size:12px}
.tg-smmx-switches input,.tg-danger-check input{accent-color:var(--nb-blue)}
.tg-smmx-service-tools{display:grid;grid-template-columns:minmax(180px,1fr) 260px;gap:9px;margin:4px 0 12px}
.tg-smmx-allowlist{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:10px 0 12px;padding:9px 11px;border:1px solid #d9e6f6;border-radius:7px;background:#f6faff;color:#58708a;font-size:12px}
.tg-smmx-allowlist strong{color:#365575;margin-right:2px}
.tg-smmx-allowlist span{padding:3px 8px;border-radius:999px;background:#e5f2ff;color:#1767b1;font-weight:700}
.tg-smmx-allowlist small{flex-basis:100%;color:#8594a4}
.tg-smmx-service-tools input,.tg-smmx-service-tools select{min-height:36px;padding:7px 10px;border:1px solid var(--nb-border);border-radius:6px;background:#fff;color:var(--nb-text)}
.tg-smmx-service-table-wrap{max-height:390px;overflow:auto}
.tg-smmx-service-table-wrap .tg-table{min-width:760px}
.tg-smmx-service-table-wrap small,.tg-smmx-page .tg-table small{display:block;color:#8594a4;font-size:11px}
.tg-smmx-order-grid{grid-template-columns:1fr 1fr}
.tg-smmx-order-grid .tg-field-wide{grid-column:1 / -1}
.tg-smmx-order-actions{align-items:center;flex-wrap:wrap}
.tg-smmx-order-actions .tg-danger-check{margin-left:auto;padding:9px 11px;border:1px solid #f2c2bc;border-radius:6px;background:#fff7f6;color:#8f392f}
.tg-notice-inline{padding:6px 9px;border-radius:5px;background:#eef6ff;color:#3972a9;font-size:11px}
.tg-error-text{max-width:260px;color:#a4473d!important;white-space:normal}
.tg-smmx-page .tg-table td{vertical-align:middle}
@media(max-width:980px){.tg-smmx-grid{grid-template-columns:1fr}.tg-smmx-service-table-wrap{max-height:300px}}
@media(max-width:620px){.tg-smmx-service-tools,.tg-smmx-order-grid{grid-template-columns:1fr}.tg-smmx-order-grid .tg-field-wide{grid-column:auto}.tg-smmx-order-actions .tg-danger-check{margin-left:0}.tg-smmx-hero{align-items:flex-start;flex-direction:column}}
.tg-smmx-auto-card{grid-column:1 / -1;border:1px solid #cfe0f2;background:linear-gradient(180deg,#fbfdff,#fff)}
.tg-smmx-auto-head{align-items:flex-start;margin-bottom:12px}.tg-smmx-auto-head h4{margin:3px 0 5px;color:#1d3959;font-size:17px}.tg-smmx-auto-head p{margin:0;color:#71869d;font-size:12px;line-height:1.55}.tg-smmx-auto-rule{display:grid;gap:5px;margin:0 0 14px;padding:11px 13px;border:1px solid #f1d29b;border-left:4px solid #e4a22c;border-radius:7px;background:#fff9ec;color:#765829;font-size:12px;line-height:1.55}.tg-smmx-auto-rule strong{color:#614514;font-size:13px}.tg-smmx-auto-rule b{color:#a35d00}.tg-smmx-auto-controls{display:grid;gap:12px}.tg-smmx-auto-toggle{display:flex;align-items:center;gap:10px;padding:11px 13px;border:1px solid #d8e6f5;border-radius:8px;background:#f5f9fe;color:#304f70}.tg-smmx-auto-toggle input{width:17px;height:17px;accent-color:var(--nb-blue)}.tg-smmx-auto-toggle span{display:grid;gap:2px}.tg-smmx-auto-toggle small,.tg-smmx-quantity-card small{color:#8194a8;font-size:11px}.tg-smmx-quantity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tg-smmx-quantity-card{display:grid;gap:6px;padding:11px 12px;border:1px solid var(--nb-border);border-radius:8px;background:#fff}.tg-smmx-quantity-card>span{font-weight:700;color:#3b5875}.tg-smmx-quantity-card input{width:100%;min-height:36px;border:1px solid var(--nb-border);border-radius:6px;padding:7px 9px;color:var(--nb-text);font-size:14px}.tg-smmx-auto-timing{display:grid;grid-template-columns:180px 180px 1fr;gap:10px;align-items:end}.tg-smmx-auto-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}.tg-smmx-charge-note{margin-top:13px;padding:9px 11px;border-radius:7px;background:#edf8f1;color:#257449;font-size:12px}.tg-smmx-promotion-wrap{margin-top:16px;border-top:1px solid #e7eef5;padding-top:14px}.tg-smmx-promotion-wrap h5{margin:0 0 4px;color:#304f70;font-size:15px}.tg-smmx-promotion-wrap p{margin:0;color:#8294a6;font-size:11px}.tg-smmx-promotion-table{min-width:900px}.tg-smmx-promotion-table td{vertical-align:middle}.tg-smmx-promotion-table small{display:block;max-width:230px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tg-smmx-promotion-table .tg-button{margin-top:5px;padding:5px 9px;font-size:11px}.tg-smmx-promotion-table .tg-error-text{color:#8c5b45}.tg-smmx-auto-card .tg-status{min-height:18px}
.tg-smmx-channel-picker{display:grid;gap:10px;padding:12px 13px;border:1px solid #d8e6f5;border-radius:8px;background:#f8fbff}.tg-smmx-channel-picker-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.tg-smmx-channel-picker-head>div:first-child{display:grid;gap:3px}.tg-smmx-channel-picker-head strong{color:#304f70;font-size:13px}.tg-smmx-channel-picker-head small{color:#8194a8;font-size:11px;line-height:1.5}.tg-smmx-channel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:8px}.tg-smmx-channel-card{display:flex;align-items:center;gap:9px;min-width:0;padding:10px 11px;border:1px solid #d8e3ef;border-radius:7px;background:#fff;cursor:pointer}.tg-smmx-channel-card:has(input:checked){border-color:#7db4ed;background:#eef6ff;box-shadow:0 0 0 2px rgba(36,109,216,.08)}.tg-smmx-channel-card input{width:16px;height:16px;flex:0 0 auto;accent-color:var(--nb-blue)}.tg-smmx-channel-card span{display:grid;gap:3px;min-width:0;flex:1}.tg-smmx-channel-card strong{overflow:hidden;color:#3b5875;text-overflow:ellipsis;white-space:nowrap}.tg-smmx-channel-card small{overflow:hidden;color:#8194a8;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.tg-smmx-channel-card b{color:#246dd8;font-size:11px}.tg-smmx-channel-hint{font-size:11px;line-height:1.45}.tg-smmx-channel-hint.ok{color:#257449}.tg-smmx-channel-hint.warn{color:#a66b0d}.tg-smmx-channel-empty{padding:10px;color:#a66b0d;border:1px dashed #edc777;border-radius:7px;background:#fffaf0;font-size:12px}.tg-smmx-channel-library{border-top:1px solid #d8e6f5;padding-top:9px}.tg-smmx-channel-library>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#246dd8;font-weight:700;cursor:pointer;list-style:none}.tg-smmx-channel-library>summary::-webkit-details-marker{display:none}.tg-smmx-channel-library>summary:before{content:'＋';font-size:16px}.tg-smmx-channel-library[open]>summary:before{content:'−'}.tg-smmx-channel-library>summary span{margin-right:auto}.tg-smmx-channel-library>summary small{color:#8194a8;font-weight:500}.tg-smmx-channel-library:not([open])>.tg-smmx-channel-grid{display:none}.tg-smmx-channel-library>.tg-smmx-channel-grid{margin-top:10px;max-height:340px;overflow:auto}.tg-smmx-channel-option{background:#fbfdff}
.tg-smmx-operational-summary{display:grid;grid-template-columns:repeat(3,minmax(130px,180px)) 1fr;gap:10px;align-items:center;margin:0 0 14px;padding:12px 14px;border:1px solid #d8e6f5;border-radius:8px;background:#f7fbff}.tg-smmx-operational-summary>div{display:grid;gap:2px}.tg-smmx-operational-summary span{color:#71869d;font-size:11px}.tg-smmx-operational-summary strong{color:#244b73;font-size:18px}.tg-smmx-operational-summary p{margin:0;color:#58708a;font-size:12px;line-height:1.5}.tg-smmx-operational-summary.active{border-color:#b9daf5;background:#f1f8ff}.tg-smmx-operational-summary.warn{border-color:#edc777;background:#fff9ec}.tg-smmx-operational-summary.warn strong{color:#a66b0d}.tg-smmx-operational-summary.ok{border-color:#cce8d7;background:#f3fbf6}.tg-smmx-advanced{padding:0;overflow:hidden}.tg-smmx-advanced>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 18px;cursor:pointer;list-style:none}.tg-smmx-advanced>summary::-webkit-details-marker{display:none}.tg-smmx-advanced>summary span{display:grid;gap:3px}.tg-smmx-advanced>summary strong{color:#304f70;font-size:14px}.tg-smmx-advanced>summary small{color:#8194a8;font-size:11px}.tg-smmx-advanced>summary b{color:#246dd8;font-size:12px}.tg-smmx-advanced[open]>summary{border-bottom:1px solid #e4edf5;background:#f8fbff}.tg-smmx-advanced[open]>summary b{font-size:0}.tg-smmx-advanced[open]>summary b::after{content:'收起';font-size:12px}.tg-smmx-advanced>.tg-smmx-grid{padding:14px}.tg-smmx-advanced>.tg-card{margin:0 14px 14px;box-shadow:none}
@media(max-width:760px){.tg-smmx-quantity-grid{grid-template-columns:1fr}.tg-smmx-auto-timing{grid-template-columns:1fr}.tg-smmx-auto-actions{justify-content:flex-start}.tg-smmx-channel-picker-head{flex-direction:column}.tg-smmx-channel-picker-actions{justify-content:flex-start}}
@media(max-width:900px){.tg-smmx-operational-summary{grid-template-columns:repeat(3,1fr)}.tg-smmx-operational-summary p{grid-column:1 / -1}}

/* Task 141: commercial UI finish — clearer hierarchy, quieter components and
   progressive disclosure. Desktop only; existing mobile workflows stay intact. */
@media(min-width:721px){
  .tg-task-overlay{
    --nb-control-height:38px;
    --nb-page-gap:16px;
    color:#24364b;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  }
  .tg-task-main{padding:20px 24px 32px;background:#f5f7fa}
  .tg-task-main>.tg-view{width:min(100%,1480px)}
  .tg-content-head h1{font-size:20px;font-weight:720}

  .tg-dashboard-page{gap:14px}
  .tg-next-step-card{
    min-height:88px;padding:17px 20px 17px 23px;border-color:#c9d9eb;background:#fff;
    box-shadow:0 1px 2px rgba(15,39,70,.04),0 6px 18px rgba(23,105,210,.055)
  }
  .tg-next-step-card h3{margin-bottom:3px;font-size:18px;letter-spacing:-.015em}
  .tg-next-step-card p{max-width:820px;font-size:12px;line-height:1.5}
  .tg-next-step-actions .primary{min-width:132px;min-height:40px}
  .tg-operations-hero{padding:17px 18px 18px}
  .tg-operations-hero>.tg-section-head{align-items:flex-start}
  body .tg-task-overlay #tgDiagnostics.tg-diagnostic-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:12px}
  body .tg-task-overlay #tgDiagnostics .tg-diagnostic-card.is-core{grid-column:span 2;min-height:96px;padding:15px 16px}
  body .tg-task-overlay #tgDiagnostics .tg-diagnostic-card.is-support{
    grid-column:span 2;min-height:68px;padding:11px 14px;border-color:#e3e8ee;background:#fafbfd
  }
  #tgDiagnostics .tg-diagnostic-card.is-core::before{
    content:"";position:absolute;top:14px;bottom:14px;left:0;width:3px;border-radius:0 3px 3px 0;background:#a9bed4
  }
  #tgDiagnostics .tg-diagnostic-card.is-core.is-warn::before{background:#d99a26}
  #tgDiagnostics .tg-diagnostic-card.is-core.is-error::before{background:#c94a42}
  #tgDiagnostics .tg-diagnostic-card.is-core .tg-diagnostic-value em{font-size:20px}
  #tgDiagnostics .tg-diagnostic-card.is-support .tg-diagnostic-copy{gap:2px}
  #tgDiagnostics .tg-diagnostic-card.is-support .tg-diagnostic-copy strong{font-size:11px}
  #tgDiagnostics .tg-diagnostic-card.is-support .tg-diagnostic-copy small{font-size:10px}
  #tgDiagnostics .tg-diagnostic-card.is-support .tg-diagnostic-value em{font-size:15px}
  #tgDiagnostics .tg-diagnostic-card.is-support .tg-diagnostic-value i{width:24px;height:24px}
  .tg-health-strip{min-height:34px;margin-top:12px;padding:7px 10px;background:#f8fafc}
  .tg-health-strip.is-healthy{border-color:#d8e9df;background:#f5faf7}
  .tg-health-strip.is-healthy span{gap:7px}.tg-health-strip.is-healthy strong{color:#2e6649;font-size:11px}.tg-health-strip.is-healthy small{color:#71877a;font-size:10px}
  .tg-dashboard-work[data-empty="true"]{display:grid;grid-template-columns:minmax(260px,1fr) auto;align-items:center;gap:18px;padding:14px 18px}
  .tg-dashboard-work[data-empty="true"] .tg-history-head{margin:0}
  .tg-dashboard-work[data-empty="true"] .tg-history-head p{display:none}
  .tg-dashboard-work[data-empty="true"] .tg-dashboard-actions:empty{display:none}
  .tg-dashboard-work[data-empty="true"] .tg-alert-list{margin:0}
  .tg-dashboard-clear{display:inline-flex;align-items:center;gap:8px;color:#547261;font-size:12px;font-weight:650}
  .tg-dashboard-clear i{width:8px;height:8px;border-radius:50%;background:#2c9a62;box-shadow:0 0 0 4px #e9f6ef}

  .tg-card,.tg-tool-page-head,.tg-local-product-manager,.tg-product-ratio-editor,.tg-product-list-panel,.tg-product-editor{
    border-color:#dfe5ec;border-radius:9px;box-shadow:0 1px 2px rgba(15,39,70,.035)
  }
  .tg-card{margin-bottom:14px;padding:17px}
  .tg-section-head h3,.tg-history-head h3,.tg-tool-page-head h3,.tg-products-heading h3{font-size:16px;font-weight:720}
  .tg-section-head p,.tg-history-head p,.tg-tool-page-head p,.tg-products-heading p{font-size:11px;line-height:1.5}

  .tg-actions button,.tg-button,.tg-main-action,.tg-tool-shortcuts button,.tg-tool-page-head>button,.tg-confirm-actions button{
    min-height:var(--nb-control-height);padding:7px 14px;border-color:#cfd8e2;color:#334a62;background:#fff;font-size:12px;font-weight:650
  }
  .tg-actions button:hover:not(:disabled),.tg-button:hover:not(:disabled),.tg-tool-shortcuts button:hover:not(:disabled),.tg-tool-page-head>button:hover:not(:disabled){border-color:#aab8c7;background:#f6f8fa}
  .tg-actions .danger,.tg-button.danger{color:#a6332c!important;border-color:#e6b9b5!important;background:#fff7f6!important}
  .tg-actions .danger:hover:not(:disabled),.tg-button.danger:hover:not(:disabled){color:#8f241e!important;border-color:#cf837d!important;background:#fff0ee!important}
  .tg-smmx-order-actions .danger,.tg-confirm-actions .danger{color:#fff!important;border-color:var(--nb-danger)!important;background:var(--nb-danger)!important}
  .tg-actions button:disabled,.tg-button:disabled,.tg-main-action:disabled{color:#8a98a7!important;border-color:#dde3ea!important;background:#f3f5f7!important;opacity:1}

  .tg-field{gap:6px}.tg-field span{color:#4c6176;font-size:12px;font-weight:650}
  .tg-field small{color:#7b8b9c;font-size:11px;line-height:1.45}
  .tg-field input,.tg-field select,.tg-field textarea{min-height:var(--nb-control-height);padding:8px 10px;border-color:#cdd6e0;border-radius:6px;font-size:13px}
  .tg-field input::placeholder,.tg-field textarea::placeholder{color:#9aa6b3}

  .tg-table-wrap{border-color:#dfe5ec;background:#fff;scrollbar-gutter:stable}
  .tg-table{font-size:12px;font-variant-numeric:tabular-nums}
  .tg-table thead th{position:sticky;z-index:3;top:0;height:42px;color:#4f6378;background:#f6f8fa;font-size:11px;font-weight:720}
  .tg-table td{height:46px;vertical-align:middle}
  .tg-table tbody tr:nth-child(even) td{background:#fcfdfe}
  .tg-table tbody tr:hover td{background:#f3f7fc}
  .tg-badge,.tg-plan-status{font-weight:650;line-height:1.4}

  [data-tg-view="products"] .tg-products-page.is-empty #tgLocalProductManager,
  [data-tg-view="products"] .tg-products-page.is-empty .tg-product-ratio-editor,
  [data-tg-view="products"] .tg-products-page.is-empty .tg-products-workbench{display:none}
  [data-tg-view="products"] .tg-products-page.is-empty .tg-products-heading-actions{display:none}
  [data-tg-view="products"] .tg-products-page.is-empty .tg-config-health{
    width:min(100%,940px);min-height:132px;box-sizing:border-box;grid-template-columns:minmax(0,1fr) auto;
    margin:34px auto 0;padding:24px;border-color:#cadced;background:#fff;box-shadow:0 8px 24px rgba(25,72,121,.06)
  }
  [data-tg-view="products"] .tg-products-page.is-empty .tg-config-health-copy strong{font-size:18px}
  [data-tg-view="products"] .tg-products-page.is-empty .tg-config-health-copy p{max-width:560px;font-size:12px}
  [data-tg-view="products"] .tg-products-page.is-empty .tg-config-health-facts{display:none}
  .tg-config-health-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px}
  [data-tg-view="products"] .tg-products-page.is-empty .tg-products-heading{padding-top:8px}

  .tg-settings-page{display:grid;gap:14px;max-width:1480px;margin:0 auto}
  .tg-settings-page>.tg-card{margin:0}
  .tg-settings-primary>.tg-history-head{margin-bottom:16px;padding-bottom:13px;border-bottom:1px solid #e6ebf0}
  .tg-settings-grid{grid-template-columns:repeat(4,minmax(180px,1fr));gap:13px}
  .tg-settings-grid .tg-field:last-child{grid-column:span 2;max-width:620px}
  .tg-history-speed{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:14px;padding:12px 14px;border:1px solid #d5e3f1;border-radius:8px;background:#f7fbff}.tg-history-speed>div:first-child{display:grid;gap:3px}.tg-history-speed strong{color:#31516f;font-size:13px}.tg-history-speed small{color:#71869a;font-size:11px;line-height:1.45}.tg-history-speed .tg-actions{margin:0;flex-wrap:wrap;justify-content:flex-end}
  .tg-settings-advanced{margin-top:17px;overflow:hidden;border:1px solid #dfe6ed;border-radius:8px;background:#fafbfd}
  .tg-settings-advanced>summary{display:flex;min-height:58px;align-items:center;justify-content:space-between;gap:16px;padding:11px 14px;cursor:pointer;list-style:none}
  .tg-settings-advanced>summary::-webkit-details-marker{display:none}
  .tg-settings-advanced>summary span{display:grid;gap:2px}.tg-settings-advanced>summary strong{color:#334b63;font-size:13px}.tg-settings-advanced>summary small{color:#7e8e9f;font-size:11px}
  .tg-settings-advanced>summary b{color:#246dd8;font-size:11px}.tg-settings-advanced[open]>summary{border-bottom:1px solid #e3e9ef;background:#f7faff}
  .tg-settings-advanced[open]>summary b{font-size:0}.tg-settings-advanced[open]>summary b::after{content:"收起设置";font-size:11px}
  .tg-settings-advanced .tg-screenshot-range{margin:0;padding:15px;border:0;border-radius:0;background:#fff}
  .tg-settings-footer{display:flex;min-height:58px;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;padding-top:14px;border-top:1px solid #e6ebf0}
  .tg-settings-footer .tg-status{margin:0}.tg-settings-footer .tg-actions{margin:0}

  .tg-confirm-dialog{width:min(480px,calc(100vw - 48px));gap:13px;padding:22px;border-radius:11px}
  .tg-confirm-icon{width:38px;height:38px;font-size:20px}
  .tg-confirm-copy h3{font-size:17px}.tg-confirm-copy p{font-size:12px;line-height:1.6}
  .tg-confirm-actions{padding-top:3px}

  .tg-toast-region{right:24px;bottom:22px;gap:7px}
  .tg-toast{min-width:280px;max-width:380px;padding:10px 13px;border-radius:7px;font-size:12px;line-height:1.45;box-shadow:0 10px 28px rgba(15,39,70,.18)}
  .tg-toast.is-repeat{animation:tgToastRepeat .22s ease-out}
  @keyframes tgToastRepeat{50%{transform:translateY(-2px);filter:brightness(1.06)}}
}

/* Task 088: commercial desktop UI hierarchy and component consistency. */
@media(min-width:721px){
  :root{
    --nb-canvas:var(--saas-background);
    --nb-panel:var(--saas-card);
    --nb-border:var(--saas-border);
    --nb-border-strong:var(--saas-border-strong);
    --nb-text:var(--saas-foreground);
    --nb-muted:var(--saas-muted-foreground);
    --nb-blue:var(--saas-primary);
    --nb-blue-hover:var(--saas-primary-hover);
    --nb-focus:var(--saas-ring);
    --nb-success:var(--saas-success);
    --nb-warning:var(--saas-warning);
    --nb-danger:var(--saas-destructive);
    --nb-shadow:var(--saas-shadow-sm)
  }
  .tg-task-overlay{color:var(--nb-text);font-size:13px;line-height:1.5}
  .tg-task-main{padding:22px 24px 30px}
  .tg-content-head{padding:0 24px}
  .tg-content-head h1{font-size:19px;font-weight:750;letter-spacing:-.01em}
  .tg-content-eyebrow{color:#8a98a8;font-size:9px}
  .tg-content-context{color:#65778b}
  .tg-task-tabs button{font-weight:650;transition:background-color .15s ease,color .15s ease,box-shadow .15s ease}
  .tg-task-tabs button.active{background:rgba(90,153,225,.2);box-shadow:inset 3px 0 #5aa2f4}

  .tg-card,.tg-tool-page-head,.tg-local-product-manager,.tg-product-ratio-editor,.tg-product-list-panel,.tg-product-editor{
    border:1px solid var(--nb-border);border-radius:9px;box-shadow:var(--nb-shadow)
  }
  .tg-card{margin-bottom:16px;padding:18px}
  .tg-section-head,.tg-history-head,.tg-tool-page-head,.tg-products-heading{align-items:center}
  .tg-section-head h3,.tg-history-head h3,.tg-tool-page-head h3,.tg-products-heading h3{
    color:var(--nb-text);font-size:16px;font-weight:750;letter-spacing:-.01em
  }
  .tg-section-head p,.tg-history-head p,.tg-tool-page-head p,.tg-products-heading p{
    max-width:760px;margin-top:3px;color:var(--nb-muted);font-size:11px;line-height:1.55
  }
  .tg-section-kicker{display:none}
  .tg-mode-badge,.tg-ratio-live,.tg-count{border-radius:5px;font-size:11px}

  .tg-dashboard-page{display:grid;gap:16px}
  .tg-dashboard-page>.tg-card{margin:0}
  .tg-next-step-card{
    position:relative;min-height:104px;box-sizing:border-box;padding:20px 22px 20px 25px;
    border-color:#b8d2ef;background:#fff;box-shadow:0 1px 2px rgba(15,39,70,.05),0 8px 22px rgba(23,105,210,.07)
  }
  .tg-next-step-card::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;border-radius:9px 0 0 9px;background:var(--nb-blue)}
  .tg-next-step-card[data-state="blocked"]::before{background:var(--nb-warning)}
  .tg-next-step-card[data-state="running"]::before{background:var(--nb-success)}
  .tg-next-step-card h3{margin:0 0 5px;color:var(--nb-text);font-size:20px;font-weight:760;letter-spacing:-.02em}
  .tg-next-step-card p{color:#63768b;font-size:12px}
  .tg-next-step-actions{flex:0 0 auto}
  .tg-next-step-actions .primary{
    min-width:148px;min-height:40px;padding:8px 17px;border:1px solid var(--nb-blue);border-radius:6px;
    color:#fff;background:var(--nb-blue);cursor:pointer;font:650 13px/1.3 inherit;transition:background-color .15s ease,transform .15s ease,box-shadow .15s ease
  }
  .tg-next-step-actions .primary:hover:not(:disabled){background:var(--nb-blue-hover);box-shadow:0 4px 12px rgba(23,105,210,.18);transform:translateY(-1px)}
  .tg-next-step-actions .primary:disabled{cursor:not-allowed;opacity:.5}
  .tg-operations-hero{padding:20px}
  body .tg-task-overlay #tgDiagnostics.tg-diagnostic-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
  body .tg-task-overlay .tg-diagnostic-grid{gap:12px;margin-top:16px}
  body .tg-task-overlay .tg-diagnostic-card{
    position:relative;display:flex;min-height:92px;box-sizing:border-box;align-items:center;justify-content:space-between;gap:14px;
    padding:15px 16px;border:1px solid var(--nb-border);border-radius:8px;color:#40556e;background:#fff;box-shadow:none
  }
  body .tg-task-overlay button.tg-diagnostic-card{cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
  body .tg-task-overlay button.tg-diagnostic-card:hover{border-color:#a9c8eb;box-shadow:0 5px 14px rgba(15,62,112,.08);transform:translateY(-1px)}
  .tg-diagnostic-copy{gap:5px}.tg-diagnostic-copy strong{color:#42576d;font-size:12px;font-weight:700}.tg-diagnostic-copy small{color:#718397;font-size:11px}
  .tg-diagnostic-value em{color:var(--nb-text);font-size:20px;font-weight:760;letter-spacing:-.02em}
  .tg-diagnostic-value em.ok{color:var(--nb-success)}.tg-diagnostic-value em.warn{color:var(--nb-warning)}.tg-diagnostic-value em.error{color:var(--nb-danger)}
  .tg-diagnostic-value i{width:26px;height:26px;border-radius:6px}
  .tg-dashboard-work{border-style:solid}.tg-dashboard-actions,.tg-alert-list{margin-top:12px}
  .tg-alert-item{padding:11px 13px;border-color:#ebd8ad;border-radius:7px;background:#fffaf0}
  button.tg-alert-item{appearance:none;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 16px;align-items:center;color:#53687f;font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
  button.tg-alert-item strong,button.tg-alert-item span{grid-column:1;display:block}button.tg-alert-item strong{color:#334c65}button.tg-alert-item span{font-size:11px}button.tg-alert-item em{grid-column:2;grid-row:1/3;color:var(--nb-blue);font-size:11px;font-style:normal;font-weight:700;white-space:nowrap}
  button.tg-alert-item:hover{transform:translateY(-1px);border-color:#dfb95e;box-shadow:0 5px 14px rgba(100,72,15,.09)}button.tg-alert-item:focus-visible{outline:0;box-shadow:0 0 0 3px var(--nb-focus)}
  .tg-health-strip{display:flex;align-items:center;gap:18px;margin-top:16px;padding:10px 12px;border:1px solid #e2e8ef;border-radius:7px;background:#f7f9fb;color:#566b80;font-size:11px}
  .tg-health-strip span,.tg-health-strip button{display:inline-flex;align-items:center;gap:7px;border:0;color:inherit;background:transparent;font:inherit}
  .tg-health-strip button{margin-left:auto;cursor:pointer}.tg-health-strip button+button{margin-left:0}.tg-health-strip button:hover{color:var(--nb-blue)}
  .tg-health-strip i{width:7px;height:7px;border-radius:50%;background:#98a7b7}.tg-health-strip .ok i{background:var(--nb-success)}.tg-health-strip .error i,.tg-health-strip button i{background:var(--nb-danger)}

  .tg-config-page{display:grid;gap:16px;max-width:1500px;margin:0 auto}
  .tg-config-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:2px 2px 0}
  .tg-config-heading h3{margin:2px 0 4px;color:var(--nb-text);font-size:18px;font-weight:760;letter-spacing:-.015em}
  .tg-config-heading p{margin:0;color:#718397;font-size:11px}
  .tg-config-workbench{display:grid;grid-template-columns:minmax(640px,1.35fr) minmax(380px,.65fr);gap:16px;align-items:start}
  .tg-config-list-panel,.tg-account-card{overflow:hidden;border:1px solid var(--nb-border);border-radius:8px;background:#fff;box-shadow:var(--saas-shadow-sm)}
  .tg-config-list-panel .tg-table-wrap{border:0;border-radius:0;box-shadow:none}
  .tg-config-editor{position:sticky;top:0;margin:0;padding:0;overflow:hidden}
  .tg-config-editor-body{display:grid;gap:13px;padding:16px}.tg-config-editor-body .tg-actions{justify-content:flex-end;margin:0}.tg-config-editor-body .tg-notice{margin:0}
  .tg-account-card{margin:0;padding:16px}

  .tg-field{gap:6px}.tg-field span{color:#516579;font-size:11px;font-weight:700}
  .tg-field input,.tg-field select,.tg-field textarea,
  .tg-compact-field input,.tg-inline-search input,.tg-table textarea{
    box-sizing:border-box;border:1px solid var(--nb-border-strong);border-radius:6px;color:var(--nb-text);background:#fff;
    transition:border-color .15s ease,box-shadow .15s ease,background-color .15s ease
  }
  .tg-field input:hover,.tg-field select:hover,.tg-field textarea:hover,.tg-compact-field input:hover,.tg-inline-search input:hover{border-color:#aebccc}
  .tg-field input:focus,.tg-field select:focus,.tg-field textarea:focus,
  .tg-compact-field input:focus,.tg-inline-search input:focus,.tg-table textarea:focus{
    outline:0;border-color:var(--nb-blue);box-shadow:0 0 0 3px var(--nb-focus)
  }
  .tg-field input:disabled,.tg-field select:disabled,.tg-field textarea:disabled{color:#8b98a7;background:#f3f5f7;cursor:not-allowed}

  .tg-actions button,.tg-button,.tg-main-action,.tg-tool-shortcuts button,.tg-tool-page-head>button,.tg-confirm-actions button{
    min-height:36px;box-sizing:border-box;padding:7px 13px;border:1px solid var(--nb-border-strong);border-radius:6px;
    color:#334a62;background:#f7f9fb;box-shadow:none;cursor:pointer;font-size:12px;font-weight:650;
    transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease
  }
  .tg-actions button:hover:not(:disabled),.tg-button:hover:not(:disabled),.tg-tool-shortcuts button:hover:not(:disabled),.tg-tool-page-head>button:hover:not(:disabled){border-color:#aebdcc;background:#eef3f8}
  .tg-main-action,.tg-actions .primary,.tg-button.primary{color:#fff!important;border-color:var(--nb-blue)!important;background:var(--nb-blue)!important}
  .tg-main-action:hover:not(:disabled),.tg-actions .primary:hover:not(:disabled),.tg-button.primary:hover:not(:disabled){background:var(--nb-blue-hover)!important;box-shadow:0 4px 11px rgba(23,105,210,.16)}
  .tg-actions .danger,.tg-button.danger,.tg-confirm-actions .danger{color:#fff!important;border-color:var(--nb-danger)!important;background:var(--nb-danger)!important}
  .tg-actions .danger:hover:not(:disabled),.tg-button.danger:hover:not(:disabled),.tg-confirm-actions .danger:hover:not(:disabled){background:#9f1e15!important}
  .tg-actions button:focus-visible,.tg-button:focus-visible,.tg-main-action:focus-visible,.tg-next-step-actions button:focus-visible,.tg-task-tabs button:focus-visible{
    outline:0;box-shadow:0 0 0 3px var(--nb-focus)
  }
  .tg-actions button:disabled,.tg-button:disabled,.tg-main-action:disabled{cursor:not-allowed;opacity:.5}

  .tg-table-wrap{border-color:var(--nb-border);border-radius:7px;box-shadow:0 1px 2px rgba(15,39,70,.025)}
  .tg-table{color:#35495e;font-size:12px}
  .tg-table th,.tg-table td{height:46px;padding:9px 11px;border-bottom:1px solid #e8edf2}
  .tg-table th{color:#52667b;background:#f6f8fa;font-size:11px;font-weight:750;letter-spacing:.01em}
  .tg-table tbody tr:last-child td{border-bottom:0}
  .tg-table tbody tr:nth-child(even) td{background:#fbfcfd}
  .tg-table tbody tr:hover td{background:#f3f7fc}
  .tg-badge,.tg-plan-status{padding:3px 7px;border-radius:4px;font-size:11px;font-weight:650}

  .tg-notice{padding:10px 12px;border:1px solid #ecd59c;border-left:3px solid #e2a72f;border-radius:6px;color:#76551d;background:#fffaf0}
  .tg-status{min-height:20px;margin-top:8px;color:#526b83;font-size:11px}
  .tg-status.success{color:var(--nb-success)}.tg-status.error{color:var(--nb-danger)}
  .tg-toast{border-radius:7px;box-shadow:0 10px 28px rgba(15,39,70,.22)}
  .tg-confirm-layer{background:rgba(15,31,49,.48);backdrop-filter:blur(3px)}
  .tg-confirm-dialog{border-color:var(--nb-border);border-radius:10px;box-shadow:0 24px 64px rgba(15,31,49,.24)}

  .tg-task-dashboard{align-items:start;gap:16px}.tg-create-card,.tg-flow-card{min-height:0}
  .tg-flow-card{background:#fbfcfe;box-shadow:none}.tg-flow-stack>div{border-color:#e3e9ef;background:#fff}
  .tg-recognition,.tg-screenshot-range,.tg-ratio-settings,.tg-ratio-weights,.tg-ratio-result{border-color:#e1e7ed;background:#f8fafc}
  .tg-post-form-section{border-color:#e1e7ed;background:#f8fafc}
  .tg-post-form-section[open]>summary{border-bottom-color:#e5eaf0}
  .tg-local-product-head,.tg-ratio-header,.tg-panel-head,.tg-editor-head{background:#f8fafc;border-bottom-color:#e5eaf0}
  .tg-local-product-section{border:0;border-radius:7px;background:#f7f9fb}
  .tg-local-product-manager .pull-product-editor{border:1px solid var(--nb-border);border-radius:7px;box-shadow:none}
  .tg-product-editor .tg-editor-settings,.tg-product-editor .tg-editor-caption{border-color:#e2e8ee;border-radius:7px;box-shadow:none}
  .tg-products-heading{padding:2px 2px 1px}
  .tg-products-heading h3{font-size:15px}.tg-products-heading p{font-size:11px}
  .tg-product-list tbody tr.selected td{background:#eef5ff}
  .tg-product-list tbody tr.selected td:first-child{box-shadow:inset 3px 0 var(--nb-blue)}
  *{scrollbar-width:thin;scrollbar-color:#b8c4d0 transparent}
}
