:root{color-scheme:light;--navy:#111b33;--navy-soft:#1d2b48;--blue:#1760e8;--blue-light:#eef4ff;--text:#17243c;--muted:#758299;--border:#e4e9f2;--bg:#f5f7fb;--green:#16865b;--red:#b44150;--amber:#ad781f;--radius:13px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:700px;background:var(--bg);color:var(--text);font-size:13px;line-height:1.5}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.58}button,input,select,textarea{outline-offset:3px}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #6c9fff}button{transition:background .15s ease,border-color .15s ease}h1,h2,h3,p{margin:0}h1{font-size:28px;line-height:1.25;letter-spacing:-.7px;font-weight:690}h2{font-size:15px;font-weight:650;letter-spacing:-.1px}h3{font-size:17px;font-weight:600}small{font-size:11px}.hidden{display:none!important}.muted{color:var(--muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sidebar{position:fixed;inset:0 auto 0 0;width:215px;background:var(--navy);color:#fff;padding:31px 17px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;gap:10px;align-items:center;padding:0 7px 41px;font-size:17px;font-weight:650;letter-spacing:-.5px}.brand-mark{background:var(--blue);width:34px;height:38px;display:grid;place-items:center;border-radius:10px 10px 10px 3px;font-size:22px;font-weight:750}.brand small{display:block;font-size:9px;letter-spacing:.2px;color:#92a0bb;font-weight:400;margin-top:1px}.sidebar nav{display:flex;flex-direction:column;gap:7px}.nav-button{display:flex;align-items:center;gap:10px;text-align:left;width:100%;background:transparent;border:0;border-radius:8px;color:#9aabc8;padding:11px 12px;font-size:12px}.nav-button:hover{background:#172540;color:white}.nav-button.active{color:#fff;background:var(--navy-soft);box-shadow:inset 3px 0 #4f8bff}.nav-icon{font-size:19px;line-height:20px;min-width:20px}.sidebar-bottom{margin-top:auto;padding:20px 9px 0;font-size:10px;color:#a5b1c8}.sidebar-bottom p{font-size:9px;margin:5px 0 0 13px;color:#6c7e9f}.local-dot{display:inline-block;background:#64b896;width:5px;height:5px;border-radius:50%;vertical-align:middle;margin-right:8px}
main{margin-left:215px;padding:35px 34px 20px;max-width:1900px}.page-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.eyebrow{color:#8a97ad;font-weight:650;font-size:9px;letter-spacing:1.7px;margin-bottom:7px}.subtitle{margin-top:7px;color:var(--muted);font-size:12px}.header-actions{display:flex;gap:9px;flex-shrink:0}.button{border:1px solid #dce3ef;background:#fff;color:#3b4a65;border-radius:7px;padding:9px 14px;white-space:nowrap;font-size:12px;font-weight:550;min-height:37px}.button:hover{background:#f6f9ff;border-color:#c4d2e8}.button.primary{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 2px 5px #1760e81c}.button.primary:hover{background:#1155d3}.button.small{padding:7px 11px;min-height:33px;font-size:11px}.button span{margin-right:3px}.icon-button{background:transparent;border:0;color:#94a0b4;padding:1px 7px;font-size:25px;line-height:1.2;border-radius:5px}.icon-button:hover{background:#eef3fb;color:#344764}
.connection-panel{display:flex;gap:11px;align-items:center;border:1px solid #e3e9f3;border-radius:10px;padding:13px 16px;background:#fff;margin-bottom:23px}.connection-panel strong{font-size:12px;font-weight:600}.connection-panel p{font-size:11px;color:var(--muted);margin-top:2px}.status-dot{display:inline-block;width:7px;height:7px;flex-shrink:0;border-radius:50%;background:#a1aabd;box-shadow:0 0 0 4px #a1aabd16}.status-dot.caution{background:#d2a04d;box-shadow:0 0 0 4px #d2a04d15}.status-dot.good{background:#38a576;box-shadow:0 0 0 4px #38a57614}.status-dot.error{background:#c85867;box-shadow:0 0 0 4px #c8586715}.capture-label{font-size:10px;color:#8190a8;margin-left:auto;white-space:nowrap}.notice{border:1px solid #cdddf6;background:#edf4ff;border-radius:8px;padding:11px 14px;margin-bottom:17px;color:#385b8e;font-size:12px}.notice.error{border-color:#efccd2;background:#fff1f3;color:#ad4051}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:23px}.stat-card{padding:17px 19px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);display:flex;flex-direction:column}.stat-card>span{font-size:11px;color:#65758f}.stat-card strong{font-size:29px;font-weight:650;line-height:1.4;letter-spacing:-1px;margin:5px 0 2px}.stat-card small{font-size:9px;color:#96a2b5}.surface{border:1px solid var(--border);border-radius:var(--radius);background:#fff;overflow:hidden}.section-toolbar{padding:21px 21px 17px;display:flex;align-items:center;justify-content:space-between;gap:20px}.section-toolbar p{color:var(--muted);font-size:10px;margin-top:4px}.filters{padding:0 21px 18px;display:flex;align-items:center;gap:10px}.filters select{height:34px;max-width:200px;min-width:140px;border:1px solid var(--border);border-radius:6px;background:white;padding:5px 25px 5px 10px;color:#51637f;font-size:11px}.search-field{display:flex;align-items:center;gap:8px;height:34px;border:1px solid var(--border);border-radius:6px;max-width:370px;flex:1;padding:0 10px;color:#8290a6}.search-field span{font-size:22px;line-height:1}.search-field input{border:0;background:transparent;width:100%;outline:0;font-size:11px;color:var(--text)}input::placeholder,textarea::placeholder{color:#a0acbf}.filters>.muted{font-size:10px;margin-left:auto;white-space:nowrap}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{background:#fafbfd;font-size:9px;font-weight:600;color:#8793a7;padding:11px 16px;border-block:1px solid #edf0f6;text-transform:uppercase;letter-spacing:.45px}td{padding:13px 16px;font-size:11px;border-bottom:1px solid #edf0f6;color:#63728b;vertical-align:middle}th:first-child,td:first-child{padding-left:21px}th:last-child,td:last-child{padding-right:21px}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfcff}.positions-table td:first-child{min-width:250px;max-width:390px}.product-title{font-size:10px;color:#8491a8;max-width:350px;overflow:hidden;text-overflow:ellipsis;margin-bottom:3px}.query-title{font-size:12px;font-weight:560;color:#273d61;max-width:400px;white-space:normal;overflow-wrap:anywhere}.sku-line{font-size:10px;color:#9ba6b9;margin-top:3px}.number-cell{text-align:right;font-variant-numeric:tabular-nums}.rank-number{font-size:18px;font-weight:650;letter-spacing:-.5px;color:#23446f}.rank-number.unknown{color:#adb7c8;font-size:15px;font-weight:500}.delta{font-size:11px;font-weight:600}.delta.up{color:var(--green)}.delta.down{color:var(--red)}.delta.flat{color:#98a5b8}.date-cell{font-size:10px;color:#71819c}.date-cell small{display:block;color:#a2adbd;font-size:9px}.status-badge{display:inline-block;border-radius:4px;padding:3px 6px;background:#f2f5f9;font-size:9px;color:#8794aa;max-width:195px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.status-badge.measured,.status-badge.success,.status-badge.completed{background:#edf8f2;color:#328664}.status-badge.error,.status-badge.failed,.status-badge.login_required{background:#fff0f2;color:#b75767}.status-badge.not_found,.status-badge.beyond_1000{background:#fff7e9;color:#a68343}.status-badge.running{background:#eef4ff;color:#5480c0}.history-button{background:transparent;border:1px solid #e8edf5;color:#7e91af;padding:2px 6px;border-radius:5px;font-size:15px;line-height:20px}.history-button:hover{border-color:#bdd2fa;color:var(--blue);background:#eef4ff}.table-footnote{padding:13px 21px;border-top:1px solid #edf0f6;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:9px;color:#98a3b6}.empty-state{text-align:center;padding:43px 20px 48px}.empty-state p{max-width:430px;margin:8px auto 18px;color:#8694ad;font-size:12px}.empty-symbol{color:#7c9ec9;border:1px solid #e2eaf6;background:#f6f9ff;display:grid;place-items:center;width:43px;height:43px;border-radius:12px;margin:0 auto 15px;font-size:25px}.settings-panel{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:22px 1px;margin-top:5px}.settings-panel h2{font-size:12px;font-weight:600}.settings-panel p{font-size:10px;color:#8997ae;margin-top:4px}.settings-panel form{display:flex;gap:15px;align-items:center;font-size:11px;flex-shrink:0;color:#6b7c96}.switch-label{display:flex;gap:6px;align-items:center;white-space:nowrap}.switch-label input{accent-color:var(--blue);width:15px;height:15px;margin:0}.interval-label{display:flex;gap:6px;align-items:center;white-space:nowrap}.interval-label input{width:58px;height:32px;border:1px solid #dfe6f0;border-radius:5px;padding:5px 7px;background:#fff;color:#465b7a}.page-footer{color:#a3aec0;font-size:9px;margin-top:9px;padding-bottom:4px}.inventory-title{color:#344c70;font-size:12px;font-weight:550;max-width:420px;white-space:normal}.keyword-preview{font-size:10px;white-space:normal;max-width:240px;color:#8795ae;margin-top:4px}.row-actions{display:flex;align-items:center;gap:8px}.text-button{border:0;background:transparent;font-size:10px;padding:4px 0;color:#6484b3}.text-button:hover{color:var(--blue);text-decoration:underline}.text-button.danger{color:#b1838c}.run-message{white-space:normal;min-width:260px;max-width:650px;color:#7f8ea6;font-size:11px}
dialog{padding:0;border:1px solid #e1e8f2;border-radius:15px;box-shadow:0 25px 100px #1127483b;color:var(--text);max-height:92vh;background:white}dialog::backdrop{background:#14244170;backdrop-filter:blur(2px)}.product-dialog{width:540px}.history-dialog{width:min(880px,92vw)}.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;padding:22px 25px 18px;border-bottom:1px solid #edf1f7;gap:18px}.dialog-heading h2{font-size:20px;font-weight:600;overflow-wrap:anywhere}.dialog-heading .eyebrow{font-size:8px}.dialog-heading .muted{font-size:10px;margin-top:5px}.dialog-content{padding:20px 25px}.product-dialog .dialog-content{display:flex;flex-direction:column;gap:13px}.product-dialog label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#6d7f99}.product-dialog label input,.product-dialog label select,.product-dialog label textarea{width:100%;border:1px solid #dfe6f1;border-radius:6px;padding:9px 11px;min-height:37px;color:#405674;background:white;font-size:12px}.product-dialog label textarea{resize:vertical;line-height:1.6}.product-dialog label input[readonly]{background:#f5f7fb;color:#8997ad}.product-dialog label small{font-size:9px;color:#9aa6ba}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.dialog-actions{padding:15px 25px;border-top:1px solid #edf1f7;background:#fafbfd;display:flex;justify-content:flex-end;gap:9px}.form-error{color:#b44c60;font-size:11px;padding:8px 10px;border-radius:6px;background:#fff1f3}.chart-heading{display:flex;justify-content:space-between;gap:20px;font-size:11px;color:#6d7f98;align-items:center;margin-bottom:18px}.chart-heading strong{color:#344e75;font-weight:550}.chart-heading .muted{font-size:9px}.chart-wrap{height:225px;width:100%}#history-chart{display:block;width:100%;height:225px}.chart-empty{text-align:center;padding:55px 15px;color:#91a0b7;background:#f9fbfe;border:1px dashed #e3eaf4;border-radius:9px;font-size:12px}.history-note{font-size:9px;color:#9ba7b9;margin:9px 0 17px}.history-table{max-height:250px;border:1px solid #eaf0f7;border-radius:8px}.history-table th{position:sticky;top:0;z-index:1}.history-table td{font-size:10px}.history-table .rank-number{font-size:13px}
/* Secondary labels remain readable on a remote desktop at normal zoom. */
.subtitle,.muted,.eyebrow,.connection-panel p,.capture-label,.stat-card>span,.stat-card small,.section-toolbar p,.filters>.muted,.product-title,.sku-line,.date-cell,.date-cell small,.table-footnote,.empty-state p,.settings-panel p,.page-footer,.keyword-preview,.run-message,.history-note,.product-dialog label small,.chart-empty{color:#64748b}
.status-badge.complete{background:#edf8f2;color:#328664}.status-badge.partial{background:#fff7e9;color:#916920}
.heartbeat-label{display:block;font-size:10px;color:#986a20;margin-top:5px;font-variant-numeric:tabular-nums}.heartbeat-label.online{color:#34765d}.heartbeat-label::before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:currentColor;margin-right:6px;vertical-align:middle}
th{color:#65738a;font-size:10px}td{font-size:12px}.section-toolbar p,.table-footnote,.stat-card small,.settings-panel p,.page-footer,.history-note,.product-dialog label small,.chart-heading .muted{font-size:10px}.status-badge{font-size:10px}.status-badge.pending{color:#65758e}.rank-number.unknown{color:#708199}.delta.flat{color:#71809a}.sidebar .sidebar-bottom p{color:#94a4c0}.product-dialog label input[readonly]{color:#64748b}.chart-heading .muted{color:#64748b}
@media(min-width:1600px){main{padding-inline:45px}.positions-table td:first-child{max-width:510px}.product-title{max-width:490px}.query-title{max-width:510px}.stat-card{padding:20px 23px}}
@media(max-width:1200px){.sidebar{width:184px;padding-inline:12px}.brand{font-size:14px;gap:8px}.brand small{font-size:8px}.brand-mark{width:29px;height:33px;font-size:19px}.nav-button{font-size:11px;padding-inline:10px}main{margin-left:184px;padding:27px 23px 18px}.page-header{gap:12px}h1{font-size:25px}.header-actions{gap:7px}.header-actions .button{font-size:11px;padding-inline:11px}.capture-label{display:none}.stats-grid{gap:10px}.stat-card{padding:14px}.stat-card>span{font-size:10px}.stat-card small{font-size:8px}.settings-panel{align-items:flex-start;flex-direction:column;gap:13px}th,td{padding-inline:12px}.section-toolbar{padding:18px 17px 15px}.filters{padding-inline:17px}th:first-child,td:first-child{padding-left:17px}}
@media(max-width:920px){body{min-width:640px}.sidebar{position:static;width:auto;padding:13px 20px;flex-direction:row;align-items:center;justify-content:space-between;gap:20px}.brand{padding:0;flex-shrink:0}.brand small{display:none}.brand-mark{width:25px;height:28px;font-size:17px;border-radius:7px}.sidebar nav{flex-direction:row;gap:3px}.nav-button{padding:8px 9px;font-size:10px;white-space:nowrap;gap:6px}.nav-icon{font-size:16px;min-width:16px}.nav-button.active{box-shadow:inset 0 -2px #4f8bff}.sidebar-bottom{display:none}main{margin:0;padding:24px 20px 16px}.page-header{margin-bottom:20px}.stats-grid{margin-bottom:18px}.connection-panel{margin-bottom:18px}.table-footnote{font-size:8px}.settings-panel{flex-direction:row;align-items:center}.settings-panel p{max-width:245px}.settings-panel form{gap:9px}.settings-panel form label{font-size:10px}.settings-panel .button{font-size:10px}.filters>.muted{display:none}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* Freshness, results and lazy history. The same layout serves the local extension and web cabinet. */
body{min-width:0}main,.view,.surface,.page-header>div,.connection-panel>div{min-width:0}.filters{flex-wrap:wrap}.filters select{max-width:220px}.search-field{min-width:180px}.filters>.muted{display:block}.text-button{min-height:32px}.snapshot-summary{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:-10px 0 20px;color:#64748b;font-size:11px}.momentum-summary{border:1px solid var(--border);border-radius:12px;padding:14px 15px;background:#fff;margin:0 0 18px}.momentum-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}.momentum-toolbar .text-button{min-height:30px;font-size:11px;padding:6px 10px}.momentum-toolbar .text-button.strong{background:#f0f4ff;border-color:#c2d4f7;color:#1d4ea7;box-shadow:inset 0 0 0 1px #c2d4f7}.momentum-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px;color:#2f476b;font-size:12px;font-weight:650}.momentum-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.momentum-column-title{font-size:10px;font-weight:650;color:#4a6088;margin:0 0 8px}.momentum-list{display:grid;gap:7px;min-height:74px}.momentum-item{width:100%;text-align:left;background:#fcfdff;border:1px solid #e6edf7;border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:4px;color:#304a75}.momentum-item:hover{background:#f2f7ff;border-color:#d2e1fb}.momentum-item-title{font-size:10px;font-weight:650;white-space:normal;overflow-wrap:anywhere}.momentum-item-query{font-size:12px;font-weight:600;line-height:1.35;white-space:normal;overflow-wrap:anywhere}.momentum-item-meta{font-size:10px;color:#6f819c}.momentum-empty-item{padding:0 4px;font-size:11px;color:#8f9cb2}.momentum-delta{display:block;font-size:11px;font-weight:700}.momentum-delta.up{color:#1f754f}.momentum-delta.down{color:#a33c4d}.momentum-summary .feature-footnote{margin:3px 0 9px}.summary-chips{display:flex;gap:8px;flex-wrap:wrap}.summary-chip{display:inline-flex;gap:9px;align-items:center;padding:5px 10px;background:#fff;border:1px solid var(--border);border-radius:6px;font-size:11px}.summary-chip strong{color:#244c88;font-size:13px}.positions-table td{white-space:normal}.positions-table .store-cell{min-width:110px;max-width:180px;overflow-wrap:anywhere}.positions-table .region-cell{white-space:nowrap}.positions-table .product-cell{width:32%}.positions-table .date-cell{min-width:145px}.rank-cell{min-width:90px}.earlier-rank{display:block;color:#6a7586;font-size:11px;white-space:nowrap;margin-top:4px;font-weight:500}.earlier-rank span{display:block;font-size:9px}.date-cell .age-label{font-size:10px;color:#567161;margin-top:4px}.date-cell .age-label.stale{color:#916119;font-weight:550}.stale-row .rank-number{color:#806736}.stale-row .rank-number.unknown{color:#708199}.row-error{white-space:normal;overflow-wrap:anywhere;font-size:10px;line-height:1.45;color:#a14b59;min-width:145px;max-width:300px;margin-top:5px}.history-button{font-size:11px;line-height:20px;padding:5px 8px;color:#386099;min-height:32px;white-space:nowrap}.table-footnote{font-size:10px;line-height:1.6}.stat-card small{font-size:10px}.connection-panel{align-items:flex-start}.connection-panel .status-dot{margin-top:6px}.heartbeat-label{overflow-wrap:anywhere}.settings-panel form{flex-wrap:wrap}.history-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.history-toolbar label{display:flex;align-items:center;gap:9px;color:#566b87;font-size:12px}.history-toolbar select{min-height:35px;padding:6px 30px 6px 10px;color:#2c466b;background:#fff;border:1px solid #dce3ef;border-radius:6px}.history-message{padding:10px 12px;background:#f1f5fc;border-radius:7px;color:#4a6082;font-size:12px;margin-bottom:13px}.history-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.history-stat{display:flex;flex-direction:column;min-width:0;padding:11px 12px;border:1px solid var(--border);border-radius:8px;background:#fcfdff}.history-stat>span{font-size:10px;color:#65748a}.history-stat strong{font-size:24px;letter-spacing:-.5px;line-height:1.5;color:#254774}.history-stat small{font-size:10px;color:#68778f;overflow-wrap:anywhere}.history-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:13px;font-size:11px}.history-pagination>div{display:flex;gap:7px}.history-pagination button:disabled{cursor:default}.history-table{max-height:340px}.history-dialog .dialog-heading{position:sticky;top:0;background:#fff;z-index:3}.history-dialog .dialog-content{padding-top:17px}.chart-heading{margin-top:18px}.history-note{font-size:10px}.icon-button{min-width:32px;min-height:32px}.page-footer{font-size:10px}
@media(max-width:1100px){.positions-table .product-cell{min-width:230px}.positions-table .date-cell{min-width:145px}.filters .search-field{max-width:none}.filters>.muted{margin-left:0}}
@media(max-width:640px){
  body{min-width:0}.sidebar{padding:12px;display:block}.brand{font-size:15px;padding:0 3px 11px}.sidebar nav{width:100%;justify-content:space-between;gap:3px}.nav-button{flex:1;width:auto;justify-content:center;padding:9px 5px;font-size:10px;gap:4px}.nav-icon{font-size:15px;min-width:14px}main{padding:20px 12px 16px}.page-header{align-items:flex-start;gap:15px;flex-direction:column;margin-bottom:16px}h1{font-size:25px}.header-actions{width:100%;flex-wrap:wrap;gap:8px}.header-actions .button{font-size:12px;min-height:39px}.header-actions .primary{margin-left:auto}.connection-panel{padding:12px;gap:10px;margin-bottom:16px}.connection-panel strong{font-size:12px}.connection-panel p{font-size:11px}.heartbeat-label{font-size:10px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:16px}.stat-card{padding:12px 13px}.stat-card>span{font-size:11px}.stat-card strong{font-size:28px;margin:3px 0}.stat-card small{font-size:10px;line-height:1.4}.snapshot-summary{margin:0 0 17px;gap:9px}.momentum-columns{grid-template-columns:1fr}.momentum-list{min-height:unset}.summary-chips{gap:6px}.summary-chip{padding:4px 9px}.snapshot-summary p{font-size:10px}.section-toolbar{padding:16px 13px 13px;gap:12px;align-items:flex-start}.section-toolbar h2{font-size:14px}.section-toolbar p{font-size:10px}.section-toolbar .button{font-size:10px;padding-inline:9px;min-height:35px}.filters{padding:0 13px 14px;gap:8px}.filters select{flex:1;width:calc(50% - 4px);max-width:none;min-width:0;height:37px;font-size:11px;padding-left:8px}.search-field{flex-basis:100%;height:38px;max-width:none;min-width:0}.search-field input{font-size:12px}.filters>.muted{display:block;font-size:10px;margin-left:auto}.filters .text-button{padding:0 2px;font-size:11px;min-height:26px}.table-scroll{max-width:100%;overscroll-behavior-inline:contain}.positions-table,.positions-table tbody{display:block;width:100%;white-space:normal}.positions-table thead{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}.positions-table tbody tr{display:grid;grid-template-columns:1fr 1fr;gap:0 12px;margin:0;padding:13px;border-top:1px solid var(--border)}.positions-table tbody tr:hover{background:#fff}.positions-table tbody tr.stale-row{background:#fffdf8}.positions-table td,.positions-table td:first-child,.positions-table td:last-child{display:block;border:0;padding:5px 0;min-width:0;max-width:none;width:auto;font-size:11px;vertical-align:top;text-align:left}.positions-table td::before{content:attr(data-label);display:block;font-size:9px;color:#687a94;letter-spacing:.1px;margin-bottom:3px;font-weight:500}.positions-table .product-cell{grid-column:1/-1;padding-top:0!important;padding-bottom:7px!important}.positions-table .product-cell::before,.positions-table .history-cell::before{display:none}.product-title{max-width:none;white-space:normal;overflow-wrap:anywhere;font-size:10px;line-height:1.5;margin-bottom:5px}.query-title{max-width:none;font-size:14px}.positions-table .region-cell{min-width:0}.positions-table .rank-cell,.positions-table .change-cell{padding-top:8px}.positions-table .rank-number{font-size:24px}.positions-table .rank-number.unknown{font-size:22px}.positions-table .delta{font-size:16px;line-height:36px}.positions-table .date-cell{grid-column:1/-1;margin-top:5px}.positions-table .date-cell::before{display:inline-block;margin-right:8px}.positions-table .date-cell small{display:inline-block;margin:0 0 0 8px}.positions-table .result-cell{grid-column:1/-1}.positions-table .result-cell::before{display:none}.positions-table .history-cell{grid-column:1/-1;text-align:right;padding-top:7px}.history-button{font-size:11px;min-height:35px;padding:5px 12px}.row-error{max-width:none;min-width:0;font-size:11px}.earlier-rank{font-size:11px}.earlier-rank span{font-size:9px;white-space:normal}.status-badge{font-size:10px}.table-footnote{padding:12px 13px;gap:7px;font-size:10px}.settings-panel{flex-direction:column;align-items:flex-start;padding-top:20px;gap:13px}.settings-panel p{max-width:none;font-size:11px}.settings-panel form{gap:12px;width:100%;justify-content:space-between}.settings-panel form label{font-size:11px}.settings-panel .button{font-size:11px;min-height:36px}.page-footer{font-size:10px}.notice{font-size:12px;overflow-wrap:anywhere}.inventory-title{min-width:190px}.run-message{min-width:200px}.row-actions{gap:14px}.row-actions .text-button{font-size:11px;min-height:36px}
  dialog{max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:10px}.product-dialog,.history-dialog{width:calc(100vw - 16px)}.dialog-heading{padding:16px;gap:10px}.dialog-heading h2{font-size:18px;line-height:1.4}.dialog-heading .muted{overflow-wrap:anywhere}.dialog-content{padding:16px}.dialog-actions{padding:12px 16px}.form-row{grid-template-columns:1fr;gap:13px}.product-dialog label input,.product-dialog label select,.product-dialog label textarea{font-size:16px}.history-toolbar{gap:8px;align-items:flex-start;flex-wrap:wrap}.history-toolbar label{font-size:11px}.history-toolbar .button{font-size:10px;min-height:35px}.history-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.history-stat{padding:10px}.history-stat strong{font-size:23px}.history-stat small{font-size:10px}.chart-heading{display:block;margin-top:16px;margin-bottom:10px}.chart-heading>.muted{display:block;margin-top:4px}.chart-wrap,#history-chart{height:200px}.history-pagination{flex-wrap:wrap;font-size:10px}.history-pagination>div{margin-left:auto}.history-pagination .button{min-height:35px}.history-table{max-height:310px}.history-table th,.history-table td{padding-inline:10px}.history-table .run-message{min-width:140px}.history-note{font-size:10px;line-height:1.6}
}

.backup-status{margin-top:14px;padding:12px 14px;border:1px solid #dce4ee;border-radius:9px;background:#fff;color:#63738a;font-size:11px;line-height:1.7;overflow-wrap:anywhere}.backup-status.backup-ok{border-color:#dcebe3;color:#416b54}.backup-status.backup-error{border-color:#edc6cc;background:#fff4f5;color:#a34451}

.status-badge.queued{background:#eef4ff;color:#456eaa}
/* Keep every position column inside the desktop surface; mobile position cards stay unchanged. */
@media(min-width:641px){
  .positions-table{table-layout:fixed;width:100%}
  .positions-table .product-cell,.positions-table .store-cell,.positions-table .region-cell,.positions-table .rank-cell,.positions-table .date-cell{min-width:0;max-width:none}
  .positions-table th,.positions-table td,.positions-table td:first-child,.positions-table td:last-child{min-width:0;max-width:none;padding-inline:10px;white-space:normal;overflow-wrap:anywhere}
  .positions-table th:first-child,.positions-table td:first-child{padding-left:14px}
  .positions-table th:last-child,.positions-table td:last-child{padding-right:14px}
  .positions-table th:nth-child(1){width:27%}.positions-table th:nth-child(2){width:11%}.positions-table th:nth-child(3){width:7%}.positions-table th:nth-child(4){width:7%}.positions-table th:nth-child(5){width:8%}.positions-table th:nth-child(6){width:14%}.positions-table th:nth-child(7){width:17%}.positions-table th:nth-child(8){width:9%}
  .positions-table .product-cell{width:auto}
  .positions-table .product-title,.positions-table .query-title{max-width:100%;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
  .positions-table .row-error{min-width:0;max-width:none}
  .positions-table .status-badge{max-width:100%;white-space:normal}
  .positions-table .earlier-rank{white-space:normal;overflow-wrap:anywhere}
  .positions-table .history-button{max-width:100%;padding-inline:5px;font-size:10px;white-space:normal;overflow-wrap:anywhere}
}
@media(max-width:640px){
  .history-table{overflow-x:hidden}
  .history-table table,.history-table tbody{display:block;width:100%;min-width:0;white-space:normal}
  .history-table thead{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}
  .history-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;padding:12px;border-bottom:1px solid var(--border)}
  .history-table tbody tr:last-child{border-bottom:0}
  .history-table td,.history-table td:first-child,.history-table td:last-child{display:block;min-width:0;max-width:none;padding:0;border:0;white-space:normal;overflow-wrap:anywhere;font-size:11px}
  .history-table td::before{display:block;margin-bottom:3px;color:#687a94;font-size:9px;font-weight:500}
  .history-table td:nth-child(1)::before{content:"Время проверки"}
  .history-table td:nth-child(2)::before{content:"Позиция"}
  .history-table td:nth-child(3){grid-column:1/-1}
  .history-table td:nth-child(3)::before{content:"Результат"}
  .history-table td:nth-child(4){grid-column:1/-1;line-height:1.6}
  .history-table td:nth-child(4)::before{content:"Подробности"}
  .history-table td[colspan]{grid-column:1/-1}
  .history-table td[colspan]::before{display:none}
  .history-table .rank-number{font-size:18px;line-height:1.3}
  .history-table .status-badge{max-width:100%;white-space:normal}
}

@media(min-width:1100px){.positions-table th{white-space:nowrap;overflow-wrap:normal;padding-inline:6px;font-size:9px}.positions-table th:nth-child(1){width:25%}.positions-table th:nth-child(4){width:8%}.positions-table th:nth-child(5){width:9%}}

/* Archived history is separate from live monitoring and never marked overdue. */
.archive-note{margin:0;padding:0 20px 14px;color:var(--muted);font-size:12px;line-height:1.6}
.archive-label{display:block;margin-top:5px;color:#64748b;font-size:10px}
.status-badge.skipped{background:#fff4d9;color:#8a5c09}
.empty-keywords{color:#9a6700}
.event-target-row>td,.event-target-row>th{background:#eaf2ff!important;box-shadow:inset 0 2px #93bafa,inset 0 -2px #93bafa}
.comparison-baseline{display:block;margin-top:5px;font-size:9px;line-height:1.5;font-weight:400;color:#64748b;white-space:normal}
.manager-tools{padding-top:6px}.export-tools{padding-top:16px;align-items:center}.export-tools input{min-height:36px;border:1px solid #d7e0ed;border-radius:7px;padding:6px;font:inherit}.export-tools small{font-size:10px;line-height:1.6;color:#758299}
.alert-section-title{margin:10px 0 0;font-size:13px;color:#3f5673}.alert-group{border:1px solid #e4e9f2;border-radius:8px}.alert-group>summary{padding:14px 16px;cursor:pointer;font-size:13px;font-weight:600}.alert-group>summary small{display:block;margin-top:6px;font-size:11px;font-weight:400;line-height:1.6;color:#64748b}.alert-group .alert-item{margin:10px;border-left-width:2px}
.note-form>.switch-label{flex-direction:row;align-items:center;gap:8px}.note-form input[type=checkbox]{width:16px;min-width:16px;min-height:16px;height:16px;padding:0;box-shadow:none}
.settings-panel{flex-wrap:wrap}
.edit-conflict{flex-basis:100%;padding-top:10px;color:#ad3d2c;font-size:12px;line-height:1.6}
.edit-conflict p{margin:0 0 8px!important;color:inherit!important}

/* Common matrix, events and history tools remain usable on small screens. */
.nav-count{margin-left:auto;min-width:20px;border-radius:20px;padding:2px 5px;background:#364864;font-size:10px;text-align:center}
.ongoing-alert{padding:3px 6px;border-radius:5px;background:#fdeced;color:#ae4651;font-size:10px;font-weight:600;white-space:nowrap}
.feature-toolbar{display:flex;flex-wrap:wrap;gap:12px 20px;align-items:center;padding:0 20px 14px}
.feature-toolbar label{display:flex;align-items:center;gap:8px;font-size:12px;color:#506078}
.feature-toolbar select{max-width:100%}
.feature-toolbar select,.history-toolbar select,.alert-rule-grid input{box-sizing:border-box;min-width:0;max-width:100%;min-height:40px;border:1px solid #d7e0ed;border-radius:8px;background:#fff;color:#17243c;padding:9px 12px;font:inherit;font-size:12px;line-height:1.5;box-shadow:0 1px 2px #17243c04;transition:border-color .15s,box-shadow .15s}
.feature-toolbar select,.history-toolbar select{padding-right:28px;cursor:pointer}
.feature-toolbar select:focus,.history-toolbar select:focus,.alert-rule-grid input:focus{outline:none;border-color:#1760e8;box-shadow:0 0 0 3px #1760e81a}
.feature-toolbar select:disabled,.history-toolbar select:disabled,.alert-rule-grid input:disabled{background:#f4f7fb;color:#758299}
.feature-message{margin:12px 20px;padding:10px 12px;background:#fff5df;color:#7e590f;border-radius:8px;font-size:12px;line-height:1.6}
.feature-footnote{margin:0;padding:12px 20px;font-size:11px;line-height:1.65;color:#758299}
.feature-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 20px;flex-wrap:wrap}
.feature-pagination>div{display:flex;gap:8px}
.matrix-legend{display:flex;flex-wrap:wrap;gap:8px;padding:0 20px 14px;color:#5e6c82;font-size:10px}
.matrix-legend span{padding:4px 7px;border-radius:5px}
.matrix-scroll{overflow:auto;max-height:65vh;border-block:1px solid #e4e9f2}
.matrix-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;table-layout:fixed}
.matrix-table th,.matrix-table td{box-sizing:border-box;border-right:1px solid #e8edf5;border-bottom:1px solid #e8edf5;padding:0;vertical-align:middle}
.matrix-table thead th{position:sticky;top:0;z-index:2;background:#f4f7fb;font-size:10px;text-align:center;padding:12px 8px;white-space:nowrap}
.matrix-table .matrix-pair{position:sticky;left:0;z-index:1;width:230px;min-width:230px;max-width:230px;background:#fff;text-align:left;padding:12px 14px;white-space:normal;box-shadow:2px 0 5px #17243c08}
.matrix-table thead .matrix-pair{z-index:3;background:#f4f7fb}
.matrix-pair small{display:block;font-weight:400;font-size:10px;color:#758299;line-height:1.5;margin-top:3px;overflow-wrap:anywhere}
.matrix-query{border:0;background:none;padding:0;text-align:left;color:#1e4f91;font:inherit;font-weight:600;font-size:12px;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
.matrix-time,.matrix-cell{min-width:78px;width:78px;text-align:center}
.matrix-result{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:transparent;color:inherit;width:100%;min-height:70px;padding:10px;font:inherit;font-size:18px;font-weight:650;cursor:pointer}
.matrix-result small{font-size:9px;font-weight:400;opacity:.75}
.matrix-cell.missing{color:#a5afbe;background:#fafbfd}
.top10{background:#e0f3e9;color:#117449}.top20{background:#edf7ef;color:#3d7950}.top100{background:#fff5db;color:#986614}.failed{background:#fdeced;color:#ae4651}.unranked{background:#f2f3f8;color:#6c7280}.ranked{background:#f8fafc;color:#536078}
.history-toolbar{align-items:end;gap:12px;flex-wrap:wrap}
.history-toolbar label{display:flex;flex-direction:column;align-items:flex-start;gap:6px;font-size:11px;font-weight:600}
.history-toolbar select{min-width:140px}
.history-aggregation-note{font-size:11px;line-height:1.7;color:#405a7a;padding:10px 12px;background:#eff5ff;border-radius:8px;margin:12px 0}
.history-notes{border:1px solid #e4e9f2;border-radius:10px;padding:0;margin:20px 0 0;background:#fff}
.history-notes>summary{padding:14px 16px;font-size:13px;font-weight:650;color:#263f60;cursor:pointer;line-height:1.5;border-radius:10px}
.history-notes>summary::marker{color:#1760e8}
.history-notes>summary:focus-visible{outline:2px solid #1760e8;outline-offset:2px}
.history-notes[open]>summary{border-bottom:1px solid #e4e9f2;border-radius:10px 10px 0 0;background:#f7f9fd}
.notes-content{padding:16px}
.notes-heading,.note-heading,.alert-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.notes-heading h3{font-size:14px;margin:0 0 5px}.notes-heading p{font-size:11px;line-height:1.5;color:#758299;margin:0}
.notes-list{display:flex;flex-direction:column;gap:8px;max-height:260px;overflow:auto;margin:12px 0}
.note-item{padding:12px 14px;background:#f8f6fc;border-left:3px solid #9c73c8;border-radius:6px}
.note-heading strong{font-size:11px}.note-heading .text-button{font-size:10px}
.note-copy{font-size:12px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 0}
.note-form{display:flex;flex-direction:column;gap:10px}.note-form>label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:600}
.note-time{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid #d7e0ed;border-radius:8px;background:#f7faff;color:#405674}.note-time span{font-size:10px;color:#758299}.note-time strong{font-size:13px}.note-time small{font-size:10px;line-height:1.45;color:#758299}.history-table tbody tr.history-sample-row{cursor:pointer}.history-table tbody tr.history-sample-row:hover{background:#f3f7ff}.history-table tbody tr.history-sample-row:focus-visible{outline:2px solid #1760e8;outline-offset:-2px}
.note-form input,.note-form textarea{box-sizing:border-box;min-width:0;max-width:100%;border:1px solid #d7e0ed;border-radius:8px;background:#fff;color:#17243c;padding:10px 12px;font:inherit;font-size:13px;line-height:1.5;box-shadow:0 1px 2px #17243c04;transition:border-color .15s,box-shadow .15s}
.note-form input{width:250px;min-height:42px}.note-form textarea{width:100%;resize:vertical;min-height:92px}
.note-form input:focus,.note-form textarea:focus{outline:none;border-color:#1760e8;box-shadow:0 0 0 3px #1760e81a}
.note-form input:disabled,.note-form textarea:disabled{background:#f4f7fb;color:#758299}
.note-form-actions{display:flex;gap:8px;flex-wrap:wrap}
.alerts-list{display:flex;flex-direction:column;padding:0 20px 20px;gap:12px}
.alert-item{border:1px solid #e4e9f2;border-left:3px solid #dc9a42;border-radius:8px;padding:14px 16px}
.alert-item.collector-alert{border-left-color:#c25d68}.alert-heading strong{font-size:13px}.alert-heading time{font-size:10px;color:#758299;white-space:nowrap}
.alert-item p{font-size:12px;line-height:1.7;margin:8px 0;overflow-wrap:anywhere}
.alert-item .text-button{text-align:left;font-size:11px;overflow-wrap:anywhere}
.alert-preferences{margin-top:20px}.alert-preferences-form{display:flex;flex-direction:column;align-items:flex-start;gap:16px;padding:0 20px 20px}
.alert-rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;width:100%}
.alert-rule-grid label{display:flex;flex-direction:column;gap:8px;font-size:12px}.alert-rule-grid input{width:100%}.alert-rule-grid small{font-size:10px;line-height:1.5;color:#758299}
@media(max-width:920px){.sidebar{display:block}.brand{padding-bottom:10px}.sidebar nav{width:100%;overflow-x:auto;justify-content:flex-start}.sidebar .nav-button{flex:none;width:auto}}
@media(max-width:760px){.alert-rule-grid{grid-template-columns:1fr}.alert-heading{flex-direction:column;gap:4px}.feature-toolbar{gap:10px}.feature-toolbar label{align-items:flex-start;flex-direction:column;gap:5px}.matrix-table .matrix-pair{width:170px;min-width:170px;max-width:170px;padding:10px}.matrix-query{font-size:11px}.matrix-pair small{font-size:9px}.matrix-time,.matrix-cell{min-width:68px;width:68px}.matrix-result{font-size:16px}.notes-heading{flex-wrap:wrap}.note-heading{flex-direction:column;gap:6px}}
@media(max-width:640px){.sidebar nav{display:flex;overflow-x:auto;gap:3px;padding-bottom:3px}.sidebar .nav-button{flex:none;white-space:nowrap;padding-inline:10px}.nav-count{margin-left:5px}.history-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.history-toolbar label,.history-toolbar select{min-width:0;width:100%;box-sizing:border-box}.history-toolbar>button{grid-column:1/-1}.feature-toolbar,.matrix-legend{padding-inline:12px}.feature-footnote,.feature-pagination{padding-inline:12px}.alerts-list{padding-inline:12px}.alert-preferences-form{padding-inline:12px}.note-form input{width:100%;max-width:none;min-width:0;box-sizing:border-box}.matrix-scroll{max-height:65vh}.matrix-table .matrix-pair{width:145px;min-width:145px;max-width:145px}}

/* Keep the selected query and chart in the same working page. */
.history-panel{margin-top:18px;scroll-margin-top:16px;overflow:hidden}
.history-panel .dialog-heading{position:static;padding:16px 20px}
.history-panel .dialog-content{padding:16px 20px}
.history-panel .dialog-actions{border-radius:0 0 12px 12px}
.history-panel .history-summary{margin-bottom:6px}
#matrix-product{max-width:340px}
.matrix-scroll{max-height:42vh}
.matrix-table .matrix-pair{padding:8px 12px}
.matrix-result{min-height:52px;padding:7px;font-size:16px}
.matrix-selected .matrix-pair{background:#eaf2ff;box-shadow:inset 3px 0 #2e72ed}
.matrix-selected .matrix-query{color:#134fab}
.matrix-selected .matrix-cell{box-shadow:inset 0 2px #91b7ee,inset 0 -2px #91b7ee}
@media(max-width:640px){#matrix-product{max-width:100%}.history-panel .dialog-content,.history-panel .dialog-heading{padding:12px}.matrix-scroll{max-height:40vh}}

.matrix-table tbody th{text-transform:none;letter-spacing:normal}
.product-info,.history-heading{display:flex;align-items:center;gap:10px;min-width:0}.product-info>div{min-width:0}.product-thumb,.matrix-thumb,.history-product-image{object-fit:cover;border:1px solid #e1e8f3;background:#f7f9fc}.product-thumb{width:42px;height:42px;border-radius:7px;cursor:zoom-in;flex:0 0 auto}.matrix-thumb{float:left;width:34px;height:34px;border-radius:6px;margin:0 7px 3px 0;cursor:zoom-in}.history-product-image{width:58px;height:58px;border-radius:9px;cursor:zoom-in}
.product-open-link{border:0;background:none;padding:0;text-align:left;color:inherit;font:inherit;cursor:pointer;max-width:100%;border-radius:7px}
.product-open-link:hover .product-title,.product-open-link:hover .inventory-title{color:#1760e8;text-decoration:underline}
.product-open-link:focus-visible{outline:2px solid #1760e8;outline-offset:4px}.product-open-link .product-thumb{cursor:pointer}
.product-open-button{display:block;margin-bottom:7px;white-space:normal}.product-detail{padding:18px 20px;margin-bottom:18px;scroll-margin-top:16px}
.product-detail-heading{display:flex;align-items:center;gap:18px;margin-top:16px}.product-detail-heading>div{min-width:0}.product-detail h2{font-size:21px;line-height:1.4;margin:4px 0;overflow-wrap:anywhere}.product-detail .muted{margin:6px 0 0;font-size:12px;line-height:1.6}
.product-detail-image{width:86px;height:86px;flex:0 0 auto;object-fit:contain;border:1px solid #e1e8f3;border-radius:12px;background:#f7f9fc}
@media(max-width:640px){.product-detail{padding:14px}.product-detail-heading{gap:12px}.product-detail-image{width:64px;height:64px}.product-detail h2{font-size:17px}.row-actions{flex-wrap:wrap}}
.matrix-time-note{border:0;border-radius:5px;background:#e5eefc;color:#1e4f91;padding:7px 8px;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}.matrix-time-note:hover{background:#cfdef8}.matrix-time-note:focus-visible{outline:2px solid #1760e8;outline-offset:2px}
.product-notes-panel{margin-top:18px}.product-notes-panel .section-toolbar{flex-wrap:wrap;gap:12px}.product-notes-list{max-height:380px;margin:0;padding:0 20px 18px}.product-note-drafts{display:flex;flex-wrap:wrap;gap:8px;padding:0 20px 10px}.product-note-drafts:empty{padding:0}.product-notes-panel .note-item{flex-shrink:0}#product-note-dialog .muted{font-size:11px;line-height:1.6}
.product-query-selectors{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:20px}.product-query-selectors label{display:flex;flex-direction:column;gap:7px;color:#344e75;font-size:13px;font-weight:650}.product-query-selectors select{width:100%;min-width:0;min-height:44px;padding:10px 30px 10px 12px;border:1px solid #c7d6ec;border-radius:8px;background:#fff;color:#17243c;font:inherit;font-size:13px}.product-query-selectors select:focus{outline:2px solid #1760e8;outline-offset:2px}.product-query-navigation{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:14px}.product-query-navigation .row-actions{flex-wrap:wrap}.product-query-navigation .muted{margin:0}#product-history-slot .history-panel{margin:0 0 18px}#product-query-empty{margin:14px 0 0}.matrix-query-action{display:block;width:max-content;margin-top:5px;padding:3px 6px;border-radius:5px;background:#e5eefc;color:#1e4f91;font-size:10px;font-weight:600}
@media(max-width:760px){.product-query-selectors{grid-template-columns:1fr;gap:12px}.product-query-selectors select{font-size:14px}.product-query-navigation .row-actions{gap:6px}}
