/* Data overview: reference dashboard proportions, scoped to this view. */
body.portal-dashboard-active{background:#f5f7fb}
body.portal-dashboard-active .workspace-main{max-width:none!important;background:#f5f7fb;padding:0!important}
body.portal-dashboard-active .workspace-main>.context-bar,body.portal-dashboard-active #workspace-page-heading{display:none!important}
body.portal-dashboard-active .workspace-scroll{padding:0!important;overflow:visible}

.portal-ui .db-page{--db-blue:#2166ff;color:#222934;min-width:0;padding:0 24px 28px;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}
.portal-ui .db-page *{box-sizing:border-box}
.portal-ui .db-page h1,.portal-ui .db-page h2,.portal-ui .db-page p{margin:0}
.portal-ui .db-page h1{font-size:20px;font-weight:700;line-height:1.5}
.portal-ui .db-page h2{font-size:16px;font-weight:700;line-height:1.5}
.portal-ui .db-page svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.portal-ui .db-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:88px;padding:16px 2px}
.portal-ui .db-heading p{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:12px;color:#69788f;margin-top:5px;line-height:1.5}
.portal-ui .db-date-note{padding-left:10px;border-left:1px solid #dbe2ec}
.portal-ui .db-heading-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px 18px;color:#66758b;font-size:12px}
.portal-ui .db-heading-meta{display:flex;align-items:flex-end;flex-direction:column;gap:4px}
.portal-ui .db-refresh-tools{display:flex;align-items:center;gap:14px}
.portal-ui .db-heading-actions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:72px;height:36px;min-height:36px;padding:0 12px;border:1px solid #dce4ef;border-radius:10px;background:#fff;color:#475a75;font-size:12px;font-weight:600;transition:background-color .15s,border-color .15s,color .15s,box-shadow .15s}
.portal-ui .db-heading-actions button:hover:not(:disabled){color:#1d56cf;background:#f0f5ff;border-color:#b8cdfa;box-shadow:0 2px 5px #2455a70b}
.portal-ui .db-heading-actions button:disabled{cursor:wait;opacity:.6}
.portal-ui .db-heading-actions button:disabled svg{animation:db-refresh-spin 1.2s linear infinite}
.portal-ui .db-heading-actions svg{width:18px;height:18px}
.portal-ui .db-heading-actions select{max-width:180px;min-height:32px;font:inherit;color:#64728a;border:1px solid #e4e9f2;background:#fff;border-radius:6px;padding:4px 26px 4px 10px}
.portal-ui .db-error{padding:10px 14px;margin-bottom:12px;border:1px solid #f0d6b9;border-radius:7px;color:#9d6525;background:#fffbf4;font-size:13px}
.portal-ui .db-card{min-width:0;background:#fff;border:1px solid #e4eaf3;border-radius:14px;box-shadow:0 2px 6px rgb(31 57 99 / 3%);overflow:hidden}
.portal-ui .db-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.portal-ui .db-metric{position:relative;min-height:136px;padding:16px 18px 14px}
.portal-ui .db-metric-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.portal-ui .db-metric-heading h2{font-size:13px;color:#52617a;font-weight:600}
.portal-ui .db-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#edf3ff;color:#366ee1}
.portal-ui [data-db-card="incoming"] .db-icon{color:#168473;background:#e9f7f3}
.portal-ui [data-db-card="transferred"] .db-icon{color:#8060bc;background:#f2edfb}
.portal-ui [data-db-card="rate"] .db-icon{color:#ad721c;background:#fff6e6}
.portal-ui .db-icon svg{width:18px;height:18px}
.portal-ui .db-metric-value{display:block;margin-top:5px;font-size:30px;font-weight:700;line-height:1.35;font-variant-numeric:tabular-nums;letter-spacing:-.4px}
.portal-ui .db-metric-value small{font-size:15px;margin-left:3px}
.portal-ui .db-metric footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 7px;color:#6b7890;font-size:11px;min-height:24px;margin-top:4px}
.portal-ui .db-change{padding:2px 8px;border-radius:14px;background:#e6f6ef;color:#09a777;font-size:11px;font-weight:650;white-space:nowrap}
.portal-ui .db-change-down{color:#bd6b43;background:#fdf0e7}
.portal-ui .db-analysis{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(0,1fr);gap:14px;margin-top:14px}
.portal-ui .db-section-heading{display:flex;align-items:center;min-height:54px;padding:8px 16px;border-bottom:1px solid #f0f2f6}
.portal-ui .db-section-heading p{color:#6e798c;font-size:12px;line-height:1.4}
.portal-ui .db-section-note{margin-left:auto;color:#738198;font-size:11px;white-space:nowrap;padding:3px 9px;background:#f4f6fa;border-radius:6px}
.portal-ui .db-trend,.portal-ui .db-ranking{height:324px}
.portal-ui .db-chart-wrap{height:calc(100% - 54px);position:relative;padding:10px 16px 12px}
.portal-ui .db-chart-wrap canvas{display:block;width:100%;height:100%;outline-offset:-2px}
.portal-ui .db-tooltip{position:absolute;top:16px;z-index:1;max-width:180px;padding:8px 12px;color:#40506a;background:#fff;border:1px solid #e5eaf3;border-radius:6px;box-shadow:0 3px 16px #243e6b18;pointer-events:none;font-size:12px}
.portal-ui .db-ranking .db-section-heading h2{font-weight:700}
.portal-ui .db-rank-list{padding:10px 16px}
.portal-ui .db-rank{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit;min-height:47px;margin-bottom:2px;border-radius:8px;padding:3px 6px;transition:background-color .15s}
.portal-ui .db-rank:hover{background:#f0f5ff}
.portal-ui .db-rank-number{font-size:14px;font-weight:700;width:23px;height:25px;display:grid;place-items:center;color:#6d87b3;background:#eef4ff;border-radius:5px}
.portal-ui .db-rank:first-child .db-rank-number{background:#276bff;color:#fff}
.portal-ui .db-rank>div{flex:1;min-width:0}
.portal-ui .db-rank strong{display:inline-block;vertical-align:bottom;max-width:calc(100% - 65px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:600}
.portal-ui .db-rank small{font-size:10px;color:#8a96a8;margin-left:6px}
.portal-ui .db-rank-track{display:block;height:4px;margin:7px 0 2px;background:#edf3fd;border-radius:8px;overflow:hidden}
.portal-ui .db-rank-track i{display:block;height:100%;background:#377aff;border-radius:8px}
.portal-ui .db-rank>b{font-size:16px;color:#3269d8;font-variant-numeric:tabular-nums;white-space:nowrap}
.portal-ui .db-empty{display:flex;align-items:center;justify-content:center;min-height:218px;color:#78869c;font-size:13px}
.portal-ui .db-bottom{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:14px}
.portal-ui .db-accuracy,.portal-ui .db-knowledge{height:322px;padding:22px}
.portal-ui .db-bottom header{display:flex;align-items:center;justify-content:space-between;gap:12px}
.portal-ui .db-accuracy-badge{padding:4px 14px;border-radius:20px;font-size:14px;font-weight:650;color:#00a777;background:#e0f8ed}
.portal-ui .db-donut-wrap{position:relative;width:212px;height:212px;margin:0 auto}
.portal-ui .db-donut{display:block;width:100%;height:100%;transform:rotate(-90deg)}
.portal-ui .db-donut circle{fill:none;stroke-width:18;stroke-linecap:butt}
.portal-ui .db-donut-track{stroke:#edf2fa}
.portal-ui .db-donut-value{stroke:#2166ff;transition:stroke-dasharray .3s}
.portal-ui .db-donut-label{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;pointer-events:none}
.portal-ui .db-donut-label strong{color:#2166ff;font-size:40px;font-weight:700;line-height:1.2;letter-spacing:-1px}
.portal-ui .db-donut-label span{font-size:13px;color:#68758a;margin-top:3px}
.portal-ui .db-accuracy-note{text-align:center;color:#97a2b3;font-size:12px}
.portal-ui .db-knowledge header a{display:inline-flex;align-items:center;gap:3px;color:#2166ff;font-size:14px;font-weight:600;text-decoration:none}
.portal-ui .db-knowledge header a:hover{text-decoration:underline}
.portal-ui .db-knowledge header svg{width:16px;height:16px}
.portal-ui .db-library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:30px}
.portal-ui .db-library-grid>div{min-width:0;height:122px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;border:1px solid #e8eef7;border-radius:12px;background:#f7f9fd}
.portal-ui .db-library-grid strong{font-size:32px;font-weight:700;color:#0659df;line-height:1.4;font-variant-numeric:tabular-nums}
.portal-ui .db-library-grid span{font-size:14px;font-weight:600;color:#667085}
.portal-ui .db-library-progress{height:6px;margin-top:32px;border-radius:16px;overflow:hidden;background:#edf1f8}
.portal-ui .db-library-progress>span{display:block;width:0;height:100%;background:#075adf;border-radius:16px;transition:width .2s}
.portal-ui .db-knowledge footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;font-size:13px;color:#7d889b}
.portal-ui .db-page [hidden]{display:none!important}
@media(min-width:1900px){.portal-ui .db-page{padding-left:26px;padding-right:26px}.portal-ui .db-heading{min-height:82px}}
@media(max-width:1100px){.portal-ui .db-page{padding:0 16px 24px}.portal-ui .db-library-grid{gap:10px}.portal-ui .db-accuracy,.portal-ui .db-knowledge{padding:18px}.portal-ui .db-rank small{display:none}.portal-ui .db-analysis{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}}
@media(max-width:760px){.portal-ui .db-heading{align-items:flex-start;gap:8px;flex-wrap:wrap;padding:14px 0}.portal-ui .db-heading-actions{gap:8px}.portal-ui .db-heading-actions>[data-db-sync]{display:none}.portal-ui .db-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.portal-ui .db-metric{padding:12px;min-height:116px}.portal-ui .db-metric-heading h2{font-size:12px}.portal-ui .db-metric-value{font-size:25px}.portal-ui .db-analysis,.portal-ui .db-bottom{grid-template-columns:minmax(0,1fr);gap:12px;margin-top:12px}.portal-ui .db-trend{height:280px}.portal-ui .db-ranking{height:auto;min-height:250px}.portal-ui .db-bottom{margin-top:12px}.portal-ui .db-library-grid{gap:8px}.portal-ui .db-library-grid span{font-size:12px}.portal-ui .db-change{font-size:10px;padding:2px 6px}.portal-ui .db-icon{width:25px;height:25px}.portal-ui .db-icon svg{width:15px;height:15px}.portal-ui .db-knowledge{height:300px}}
@media(prefers-reduced-motion:reduce){.portal-ui .db-donut-value,.portal-ui .db-library-progress>span{transition:none}}

/* Adapted from https://uiverse.io/Voxybuns/horrible-shrimp-47
 * Copyright - 2026 Voxybuns. MIT License.
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
.portal-ui .db-auto-refresh{display:inline-flex;align-items:center;gap:9px;min-height:36px;margin:0;cursor:pointer;color:#52617a;font-size:12px;font-weight:500;white-space:nowrap}
.portal-ui .db-switch{position:relative;display:inline-block;flex:none;width:38px;height:20px;--db-switch-outline:#a0aec0}
.portal-ui .db-switch input{position:absolute;inset:-8px 0;width:100%;height:36px;margin:0;padding:0;opacity:0;cursor:pointer;z-index:1}
.portal-ui .db-switch-track{box-sizing:border-box;position:absolute;inset:0;border:1px solid var(--db-switch-outline);border-radius:20px;background:#e6ebf2;transition:background-color .18s,border-color .18s}
.portal-ui .db-switch-track:before{content:"";box-sizing:border-box;position:absolute;left:-1px;top:-1px;width:20px;height:20px;border:1px solid var(--db-switch-outline);border-radius:50%;background:#fff;transform:translateY(-1px);box-shadow:0 1px 2px #53688930;transition:transform .18s,border-color .18s,box-shadow .18s}
.portal-ui .db-switch input:checked+.db-switch-track{background:#2b68e8;border-color:#2b68e8;--db-switch-outline:#2b68e8}
.portal-ui .db-switch input:checked+.db-switch-track:before{transform:translateX(18px) translateY(-1px)}
.portal-ui .db-switch input:focus-visible+.db-switch-track{outline:3px solid #92b6fc;outline-offset:3px}
@media(hover:hover){.portal-ui .db-switch input:hover+.db-switch-track:before{transform:translateY(-2px);box-shadow:0 2px 3px #53688930}.portal-ui .db-switch input:hover:checked+.db-switch-track:before{transform:translateX(18px) translateY(-2px)}}
.portal-ui .db-page :is(button,a,canvas):focus-visible{outline:3px solid #92b6fc;outline-offset:3px}
.portal-ui .db-heading-meta [data-db-sync]{display:inline-flex;align-items:center;gap:5px;font-size:11px}
.portal-ui .db-heading-meta [data-db-sync]:before{content:"";width:5px;height:5px;flex:none;border-radius:50%;background:#8e9bb0}
.portal-ui .db-heading-meta [data-db-sync][data-state="ready"]:before{background:#209b79}
.portal-ui .db-heading-meta [data-db-sync][data-state="partial"]:before,.portal-ui .db-heading-meta [data-db-sync][data-state="error"]:before{background:#c38127}
.portal-ui .db-heading-meta [data-db-sync][data-state="loading"]:before{background:#397dff}
@keyframes db-refresh-spin{to{transform:rotate(360deg)}}
@media(max-width:1100px){.portal-ui .db-heading-actions{gap:8px 12px}}
@media(max-width:760px){.portal-ui .db-heading{padding:16px 0;gap:12px}.portal-ui .db-heading-actions{justify-content:space-between;width:100%}.portal-ui .db-heading-meta{align-items:flex-start}.portal-ui .db-refresh-tools{gap:10px}.portal-ui .db-metric-note{font-size:10px}}
@media(max-width:420px){.portal-ui .db-heading-actions{align-items:flex-start;flex-direction:column}.portal-ui .db-refresh-tools{width:100%;justify-content:space-between}.portal-ui .db-heading-meta{flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.portal-ui .db-page *,.portal-ui .db-page *:before{animation:none!important;transition:none!important}}
@media(forced-colors:active){.portal-ui .db-switch input{appearance:auto;opacity:1;inset:0;width:38px;height:20px}.portal-ui .db-switch-track{display:none}}

/* Reserve the first screen for metrics and daily work. */
.portal-ui .db-page .db-heading{min-height:64px;padding:10px 2px}
.portal-ui .db-page h1{font-size:22px}

/* Daily queues: readable counts and direct actions in a bounded card grid. */
.portal-ui .db-tasks-page{max-width:1488px;margin:0 auto;padding-top:12px}
.portal-ui .db-tasks-page .db-heading{padding:10px 0 22px;min-height:88px}
.portal-ui .db-tasks-page h1{font-size:24px}
.portal-ui .db-tasks-page .db-heading p,.portal-ui .db-tasks-page .db-heading-meta [data-db-sync]{font-size:14px}
.portal-ui .db-tasks-page .db-auto-refresh{font-size:16px!important}
.portal-ui .db-tasks-page .db-heading-actions button{height:42px;font-size:16px;padding:0 14px}
.portal-ui .db-tasks-page .db-tasks{margin:0 0 20px}
.db-tasks [data-db-tasks]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.portal-ui .db-tasks-summary{grid-column:1/-1;display:flex;align-items:center;gap:10px;min-height:66px;padding:14px 22px;border:1px solid #dfe7f4;border-radius:12px;background:#edf3ff;color:#344e7a;font-size:16px;margin-bottom:4px}
.portal-ui .db-tasks-summary strong{font-size:24px;font-weight:700;color:#1d4fa6}
.portal-ui .db-tasks-summary svg{width:24px;height:24px}
.portal-ui .db-tasks-summary.is-clear{background:#f0f8f5;border-color:#dcece4;color:#33836c}
.portal-ui .db-tasks-summary.is-clear strong{font-size:18px;font-weight:600;color:#256e59}
.portal-ui .db-page .db-task{display:flex;flex-direction:column;gap:16px;min-height:238px;min-width:0;padding:22px 24px 16px;border:1px solid #e1e7f0;border-radius:12px;background:#fff;box-shadow:0 2px 4px #20355403}
.portal-ui .db-page .db-task.has-tasks{border-color:#cbdafa}
.db-task-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
.db-task-heading strong{font-size:18px;font-weight:600;color:#253247}
.db-task-icon{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:11px;background:#f0f4fc;color:#5575ad}
.db-task-icon svg{width:22px;height:22px}
.db-task-volume{display:flex;align-items:baseline;gap:12px}
.db-task-count{font-size:36px;font-weight:700;color:#344054;line-height:1.2;font-variant-numeric:tabular-nums}
.db-task-count.has-tasks{color:#a05b10}
.db-task-state{color:#798498;font-size:14px}
.has-tasks .db-task-state{color:#9a621f}
.db-task-count.is-unavailable{font-size:20px;font-weight:600;color:#b42318;line-height:1.6}
.portal-ui .db-page .db-task p{font-size:16px;line-height:1.6;color:#596579;margin:0;overflow-wrap:anywhere}
.db-task-action{margin-top:auto;padding-top:8px;border-top:1px solid #eef1f6}
.portal-ui .db-page .db-task a,.portal-ui .db-page [data-db-tasks-retry]{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;width:100%;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;min-height:40px;padding:7px 0;background:transparent;border:0;color:#165dff;text-decoration:none;cursor:pointer}
.db-task-action svg{width:18px;height:18px}
.db-product-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 20px}
.portal-ui .db-page .db-product-actions a{width:auto}
.portal-ui .db-page [data-db-review-products]{min-height:40px;padding:7px 14px;border:1px solid #cad8ff;border-radius:7px;background:#f0f5ff;color:#165dff;font-family:inherit;font-size:16px;font-weight:600;line-height:1.5;white-space:nowrap;cursor:pointer}
.portal-ui .db-page [data-db-review-products]:disabled{color:#86909c;background:#f5f6f8;border-color:#e5e9f0;cursor:default}
.portal-ui .db-page [data-db-review-products]:focus-visible{outline:2px solid #165dff;outline-offset:3px}
.portal-ui .db-page .db-task a:hover,.portal-ui .db-page [data-db-tasks-retry]:hover{text-decoration:underline}
.db-task a:focus-visible,[data-db-tasks-retry]:focus-visible{outline:2px solid #165dff;outline-offset:3px;border-radius:3px}
.db-task-error{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:20px;min-height:200px;padding:24px;background:#fff;border:1px solid #e1e7f0;border-radius:12px;color:#b42318;font-size:18px}
.portal-ui .db-page .db-task-error [data-db-tasks-retry]{width:auto}
.db-tasks .db-empty{grid-column:1/-1}
@media(max-width:1100px){.db-tasks [data-db-tasks]{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.portal-ui .db-page .db-task{padding:20px;min-height:226px}}
@media(max-width:600px){.db-tasks [data-db-tasks]{grid-template-columns:minmax(0,1fr);gap:14px}.portal-ui .db-page .db-task{min-height:216px;padding:18px 20px;gap:14px}.portal-ui .db-tasks-page .db-heading{gap:16px}.portal-ui .db-tasks-summary{padding:14px 18px}.db-task-count{font-size:32px}}
