/* Simply Gadgets Operations UI v0.9.6
   Inspired by high-volume ecommerce consoles: dense, task-led, information-first.
   Brand remains Simply Gadgets; no provider UI is copied verbatim. */
:root {
  --sg-bg:#eef1f4; --sg-surface:#fff; --sg-surface-2:#f7f8fa; --sg-surface-3:#eef2f5;
  --sg-border:#d5dbe1; --sg-border-strong:#b6bec8; --sg-text:#17202a; --sg-text-secondary:#536170; --sg-text-muted:#778493;
  --sg-primary:#1467b3; --sg-primary-hover:#0e4f8a; --sg-primary-subtle:#e7f2fb;
  --sg-accent:#f3a847; --sg-accent-strong:#e58c1a;
  --sg-success:#177245; --sg-success-bg:#e8f5ee; --sg-warning:#9a5a00; --sg-warning-bg:#fff4d8;
  --sg-danger:#b42318; --sg-danger-bg:#feeceb; --sg-info:#0c5ea8; --sg-info-bg:#e6f1fb;
  --sg-sidebar:#172332; --sg-sidebar-2:#203043; --sg-sidebar-text:#d8e0e8;
  --sg-amazon:#ff9900; --sg-ebay:#e53238; --sg-shopify:#659c3e; --sg-veeqo:#0e9cd6;
  --sg-radius:4px; --sg-radius-lg:6px; --sg-space-1:4px; --sg-space-2:8px; --sg-space-3:12px; --sg-space-4:16px; --sg-space-5:20px; --sg-space-6:24px;
  --sg-font:Inter,"Segoe UI",system-ui,-apple-system,sans-serif; --sg-font-mono:"JetBrains Mono","SF Mono",ui-monospace,monospace;
  --sg-text-xs:11px; --sg-text-sm:12px; --sg-text-base:13px; --sg-text-lg:16px; --sg-text-xl:20px; --sg-text-2xl:26px;
  --sg-sidebar-width:208px; --sg-header-height:52px;
  --sg-shadow-sm:0 1px 2px rgba(15,23,42,.06); --sg-shadow:0 2px 8px rgba(15,23,42,.07);
}
*{box-sizing:border-box} html,body{margin:0;padding:0;font-family:var(--sg-font);font-size:var(--sg-text-base);line-height:1.45;color:var(--sg-text);background:var(--sg-bg);-webkit-font-smoothing:antialiased}
body.sg-no-scroll{overflow:hidden} a{color:var(--sg-primary);text-decoration:none} a:hover{text-decoration:underline}
button,input,select,textarea{font:inherit}.sg-muted{color:var(--sg-text-muted)}.sg-secondary{color:var(--sg-text-secondary)}.mono{font-family:var(--sg-font-mono);font-size:11px}.sg-nowrap{white-space:nowrap}
/* Shell */
.sg-shell{min-height:100vh;display:grid;grid-template-columns:var(--sg-sidebar-width) minmax(0,1fr);grid-template-rows:var(--sg-header-height) minmax(0,1fr)}
.sg-sidebar{grid-row:1/-1;background:var(--sg-sidebar);color:var(--sg-sidebar-text);display:flex;flex-direction:column;min-height:100vh;position:sticky;top:0;height:100vh;overflow:auto;border-right:1px solid #0e1722}
.sg-brand{padding:14px 16px 13px;border-bottom:1px solid rgba(255,255,255,.08);display:flex;align-items:center;gap:10px}
.sg-brand-mark{width:28px;height:28px;border-radius:5px;background:var(--sg-accent);color:#13202c;display:grid;place-items:center;font-weight:900;font-size:13px}
.sg-brand strong{font-size:14px;color:#fff;letter-spacing:.01em}.sg-brand small{display:block;color:#a9b5c1;font-size:10px;margin-top:1px}
.sg-side-section{padding:12px 10px 6px;color:#8392a2;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.sg-sidebar-nav{padding:0 8px 8px}.sg-sidebar-nav a{display:flex;align-items:center;gap:10px;padding:9px 10px;color:#c8d1db;border-radius:4px;text-decoration:none;margin:2px 0;font-size:12px;font-weight:500}.sg-sidebar-nav a:hover{background:rgba(255,255,255,.06);color:#fff;text-decoration:none}.sg-sidebar-nav a.active{background:#25374a;color:#fff;box-shadow:inset 3px 0 0 var(--sg-accent)}
.sg-side-icon{width:16px;text-align:center;color:#9fb0c0;font-size:12px}.sg-sidebar-nav a.active .sg-side-icon{color:#fff}
.sg-side-spacer{flex:1}.sg-side-footer{padding:10px;border-top:1px solid rgba(255,255,255,.08);font-size:11px;color:#9eabb9}
.sg-header{grid-column:2;background:#fff;border-bottom:1px solid var(--sg-border);display:flex;align-items:center;gap:12px;padding:0 16px;min-width:0}.sg-header-left,.sg-header-right{display:flex;align-items:center;gap:10px}.sg-header-left{min-width:0}.sg-header-title{margin:0;font-size:16px;font-weight:700;white-space:nowrap}.sg-header-context{font-size:11px;color:var(--sg-text-muted);border-left:1px solid var(--sg-border);padding-left:12px}.sg-header-spacer{flex:1}
.sg-global-search{width:min(400px,36vw);height:32px;border:1px solid var(--sg-border);background:var(--sg-surface-2);border-radius:4px;padding:0 10px}.sg-global-search:focus{background:#fff;outline:2px solid #b8d6ec;border-color:var(--sg-primary)}
.sg-user-menu{display:flex;align-items:center;gap:8px;padding-left:8px;border-left:1px solid var(--sg-border);font-size:12px}.sg-avatar{width:26px;height:26px;border-radius:50%;background:#dbe7f1;color:#24415c;display:grid;place-items:center;font-size:11px;font-weight:800}
.sg-main{grid-column:2;padding:16px 18px 22px;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto}.sg-page{width:100%;max-width:1480px;margin:0 auto;min-width:0}.sg-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px}.sg-page-head h2{margin:0;font-size:20px;line-height:1.2}.sg-page-head p{margin:4px 0 0;color:var(--sg-text-secondary);font-size:12px}.sg-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
/* Controls */
.sg-btn{height:32px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 11px;border:1px solid var(--sg-border-strong);border-radius:4px;background:#fff;color:var(--sg-text);font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}.sg-btn:hover:not(:disabled){background:#f4f6f8}.sg-btn:disabled{opacity:.48;cursor:not-allowed}.sg-btn-primary{background:var(--sg-primary);border-color:var(--sg-primary);color:#fff}.sg-btn-primary:hover:not(:disabled){background:var(--sg-primary-hover)}.sg-btn-accent{background:var(--sg-accent);border-color:var(--sg-accent-strong);color:#17202a}.sg-btn-ghost{border-color:transparent;background:transparent;color:var(--sg-text-secondary)}.sg-btn-danger{background:var(--sg-danger);border-color:var(--sg-danger);color:#fff}.sg-btn-sm{height:28px;padding:0 9px;font-size:11px}.sg-btn-lg{height:38px;padding:0 14px;font-size:13px}
.sg-input,.sg-select,.sg-textarea{width:100%;height:34px;border:1px solid var(--sg-border-strong);border-radius:4px;background:#fff;color:var(--sg-text);padding:0 10px;font-size:12px}.sg-input:focus,.sg-select:focus,.sg-textarea:focus{outline:2px solid #b8d6ec;border-color:var(--sg-primary)}.sg-textarea{height:auto;min-height:80px;padding:8px 10px}.sg-field{display:grid;gap:5px}.sg-label{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--sg-text-secondary)}
/* Cards / metrics */
.sg-grid{display:grid;gap:12px}.sg-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sg-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sg-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sg-card{background:#fff;border:1px solid var(--sg-border);border-radius:var(--sg-radius);box-shadow:var(--sg-shadow-sm)}.sg-card-header{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-bottom:1px solid var(--sg-border);font-weight:700;font-size:12px}.sg-card-body{padding:14px}
.sg-kpi{padding:13px 14px;display:flex;justify-content:space-between;gap:12px}.sg-kpi-label{font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--sg-text-muted)}.sg-kpi-value{font-size:24px;font-weight:750;line-height:1.1;margin-top:3px;font-variant-numeric:tabular-nums}.sg-kpi-sub{margin-top:5px;font-size:11px;color:var(--sg-text-secondary)}.sg-kpi-accent{width:4px;border-radius:2px;background:var(--sg-accent);flex:none}.sg-kpi-info{background:var(--sg-primary-subtle)}
/* Tabs / filters */
.sg-tabs{display:flex;gap:2px;overflow:auto;border-bottom:1px solid var(--sg-border);margin-bottom:10px}.sg-tab{border:0;background:transparent;color:var(--sg-text-secondary);padding:9px 13px;font-size:12px;font-weight:600;cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap}.sg-tab:hover{color:var(--sg-text)}.sg-tab.active{color:var(--sg-primary);border-bottom-color:var(--sg-primary);font-weight:800}.sg-count{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;padding:0 5px;margin-left:5px;border-radius:9px;background:#edf0f3;color:#5c6570;font-size:10px}.sg-tab.active .sg-count{background:var(--sg-primary-subtle);color:var(--sg-primary)}
.sg-toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:10px;background:#fff;border:1px solid var(--sg-border);border-bottom:0;border-radius:4px 4px 0 0}.sg-toolbar-spacer{flex:1}.sg-chipbar{display:flex;gap:6px;flex-wrap:wrap}.sg-chip{height:26px;padding:0 8px;border:1px solid var(--sg-border);background:#fff;border-radius:13px;display:inline-flex;align-items:center;gap:5px;color:var(--sg-text-secondary);font-size:11px;font-weight:650;cursor:pointer}.sg-chip:hover{border-color:var(--sg-border-strong);color:var(--sg-text)}.sg-chip.active{background:var(--sg-primary-subtle);border-color:#aacbe8;color:var(--sg-primary)}
/* Tables */
.sg-table-wrap{background:#fff;border:1px solid var(--sg-border);border-radius:0 0 4px 4px;overflow:auto}.sg-table-wrap.rounded{border-radius:4px}.sg-table{width:100%;border-collapse:separate;border-spacing:0;font-size:12px;min-width:920px}.sg-table th{position:sticky;top:0;z-index:2;background:#f2f4f6;color:#5b6774;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;text-align:left;padding:8px 10px;border-bottom:1px solid var(--sg-border);white-space:nowrap}.sg-table td{padding:9px 10px;border-bottom:1px solid #e9edf1;vertical-align:middle}.sg-table tbody tr{cursor:pointer}.sg-table tbody tr:hover td{background:#f7fafc}.sg-table tbody tr.selected td{background:#eef6fc}.sg-table tbody tr:last-child td{border-bottom:0}.sg-right{text-align:right}.sg-center{text-align:center}
.sg-order-id{font-weight:750;color:#1e2c38}.sg-order-meta{display:flex;gap:5px;align-items:center;margin-top:2px;font-size:10px;color:var(--sg-text-muted)}.sg-customer-main{font-weight:650}.sg-customer-sub{font-size:10px;color:var(--sg-text-muted);margin-top:2px}.sg-line{display:flex;align-items:center;gap:6px}.sg-thumb{width:28px;height:28px;border:1px solid var(--sg-border);border-radius:3px;background:#f3f5f7;display:grid;place-items:center;color:#8391a0;font-size:10px;flex:none}.sg-lines{display:grid;gap:3px}.sg-line-more{font-size:10px;color:var(--sg-primary);font-weight:700}
/* Status / source */
.sg-badge{display:inline-flex;align-items:center;min-height:19px;padding:2px 6px;border-radius:3px;font-size:10px;font-weight:800;line-height:1.2;text-transform:none;white-space:nowrap}.sg-badge-success{background:var(--sg-success-bg);color:var(--sg-success)}.sg-badge-warning{background:var(--sg-warning-bg);color:var(--sg-warning)}.sg-badge-danger{background:var(--sg-danger-bg);color:var(--sg-danger)}.sg-badge-info{background:var(--sg-info-bg);color:var(--sg-info)}.sg-badge-neutral{background:#eef1f3;color:#5f6a75}.sg-dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:5px}.sg-dot-success{background:#198754}.sg-dot-warning{background:#b77a00}.sg-dot-danger{background:#c8332c}.sg-dot-neutral{background:#97a2ad}.sg-source-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 6px;border:1px solid var(--sg-border);border-radius:3px;background:#fff;color:#4f5b67;font-size:10px;font-weight:750}.sg-source-mark{width:14px;height:14px;border-radius:3px;display:grid;place-items:center;font-size:8px;font-weight:900;background:#dfe6ec;color:#30404f}.sg-source-amazon .sg-source-mark{background:#fff1d8;color:#9a5a00}.sg-source-ebay .sg-source-mark{background:#fce7e9;color:#a72a30}.sg-source-shopify .sg-source-mark{background:#eaf4e5;color:#3d6b28}.sg-source-veeqo .sg-source-mark{background:#e5f5fb;color:#0b6b91}
/* Drawer */
.sg-overlay[hidden],.sg-drawer[hidden]{display:none!important}.sg-overlay{position:fixed;inset:0;background:rgba(15,23,42,.24);z-index:40}.sg-drawer{position:fixed;right:0;top:0;height:100vh;width:min(520px,92vw);background:#fff;z-index:41;box-shadow:-8px 0 28px rgba(15,23,42,.18);display:flex;flex-direction:column}.sg-drawer-head{padding:14px 16px;border-bottom:1px solid var(--sg-border);display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.sg-drawer-title{font-size:16px;font-weight:800}.sg-drawer-body{flex:1;overflow:auto;padding:14px 16px}.sg-drawer-footer{padding:10px 16px;border-top:1px solid var(--sg-border);display:flex;justify-content:flex-end;gap:7px}.sg-detail-grid{display:grid;grid-template-columns:110px 1fr;gap:8px 12px;font-size:12px}.sg-detail-grid dt{color:var(--sg-text-muted)}.sg-detail-grid dd{margin:0;font-weight:650}.sg-drawer-section{padding:14px 0;border-bottom:1px solid #e9edf1}.sg-drawer-section:last-child{border-bottom:0}.sg-drawer-section h3{margin:0 0 9px;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--sg-text-secondary)}
/* Operational panels */
.sg-alert{display:flex;gap:9px;padding:10px 12px;border:1px solid var(--sg-border);background:#fff;border-radius:4px}.sg-alert.warn{background:#fffaf0;border-color:#f0d5a6}.sg-alert strong{display:block;font-size:12px}.sg-alert p{margin:2px 0 0;font-size:11px;color:var(--sg-text-secondary)}.sg-health-list{display:grid;gap:0}.sg-health-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #e9edf1}.sg-health-row:last-child{border-bottom:0}.sg-health-name{font-weight:700;font-size:12px}.sg-health-sub{font-size:10px;color:var(--sg-text-muted);margin-top:1px}.sg-progress{height:6px;border-radius:4px;background:#e7ebef;overflow:hidden}.sg-progress > span{display:block;height:100%;background:var(--sg-primary);width:0}
.sg-queue{display:grid;gap:7px}.sg-queue-row{display:flex;align-items:center;gap:10px;padding:8px 9px;border:1px solid var(--sg-border);border-radius:4px;background:#fff}.sg-queue-num{width:30px;text-align:center;font-size:15px;font-weight:800}.sg-queue-copy{flex:1}.sg-queue-title{font-weight:750;font-size:12px}.sg-queue-sub{font-size:10px;color:var(--sg-text-muted);margin-top:2px}.sg-queue-action{font-size:11px;font-weight:750;color:var(--sg-primary)}
/* Empty/loading */
.sg-empty{padding:44px 20px;text-align:center;color:var(--sg-text-secondary)}.sg-empty-title{font-weight:800;color:var(--sg-text);font-size:13px}.sg-empty p{font-size:11px;margin:5px 0 0}.sg-loading{padding:20px;color:var(--sg-text-secondary);font-size:12px}.sg-skeleton{background:linear-gradient(90deg,#eef1f3 25%,#f8f9fa 50%,#eef1f3 75%);background-size:200% 100%;animation:sg-shimmer 1.2s infinite}@keyframes sg-shimmer{to{background-position:-200% 0}}
/* Pagination / sticky bulk bar */
.sg-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;background:#fff;border:1px solid var(--sg-border);border-top:0}.sg-page-info{font-size:10px;color:var(--sg-text-muted)}.sg-page-actions{display:flex;gap:4px}.sg-bulkbar{position:sticky;bottom:8px;margin-top:10px;display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid #b9d3e6;background:#f1f8fd;box-shadow:var(--sg-shadow);border-radius:4px;z-index:10}.sg-bulk-spacer{flex:1}
/* Connection cards */
.sg-connection-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:10px}.sg-connection-card{padding:13px;border:1px solid var(--sg-border);border-radius:4px;background:#fff}.sg-connection-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.sg-connection-name{font-weight:800}.sg-connection-meta{font-size:10px;color:var(--sg-text-muted);margin-top:2px}.sg-connection-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.sg-connection-status{display:inline-flex;align-items:center;font-size:10px;font-weight:800}
/* Login */
.sg-login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:#172332}.sg-login-card{width:min(400px,100%);padding:28px;background:#fff;border-radius:6px;box-shadow:0 18px 50px rgba(0,0,0,.22)}.sg-login-logo{font-weight:900;font-size:22px}.sg-login-subtitle{font-size:12px;color:var(--sg-text-secondary);margin:4px 0 22px}
/* responsive */
@media (max-width:1100px){.sg-grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.sg-global-search{width:260px}.sg-sidebar{width:64px}.sg-shell{grid-template-columns:64px minmax(0,1fr)}.sg-brand{justify-content:center;padding:12px 8px}.sg-brand-copy,.sg-side-section,.sg-sidebar-nav a span:not(.sg-side-icon),.sg-side-footer{display:none}.sg-sidebar-nav a{justify-content:center;padding:10px}.sg-sidebar-nav a.active{box-shadow:inset 3px 0 0 var(--sg-accent)}}
@media (max-width:760px){.sg-shell{display:block}.sg-sidebar{position:relative;height:auto;min-height:0;border-right:0;border-bottom:1px solid #0e1722}.sg-brand{justify-content:flex-start;padding:10px 14px}.sg-brand-copy{display:block}.sg-sidebar-nav{display:flex;overflow:auto}.sg-sidebar-nav a{justify-content:flex-start}.sg-sidebar-nav a span:not(.sg-side-icon){display:inline}.sg-side-section,.sg-side-footer{display:none}.sg-header{position:sticky;top:0;z-index:20}.sg-main{padding:12px}.sg-page-head{align-items:stretch;flex-direction:column}.sg-grid-2,.sg-grid-3,.sg-grid-4{grid-template-columns:1fr}.sg-global-search{display:none}.sg-table{min-width:820px}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}

/* v0.9.6 shell refinement: persistent topbar + collapsible navigation */
:root {
  --sg-sidebar-width-expanded: 190px;
  --sg-sidebar-width-collapsed: 72px;
  --sg-header-height: 60px;
}
html, body { min-height: 100%; }
.sg-shell { grid-template-columns: var(--sg-sidebar-width-expanded) minmax(0,1fr); grid-template-rows: var(--sg-header-height) minmax(0,1fr); }
.sg-header { grid-column: 1 / -1; grid-row: 1; }
.sg-sidebar { grid-column: 1; grid-row: 2; position: sticky; top: var(--sg-header-height); height: calc(100vh - var(--sg-header-height)); min-height: 0; }
.sg-main { grid-column: 2; grid-row: 2; }
.sg-sidebar { transition: width .18s ease, transform .18s ease; width: var(--sg-sidebar-width-expanded); z-index: 50; overflow: visible; }
.sg-header { position: sticky; top: 0; z-index: 100; min-height: var(--sg-header-height); box-shadow: 0 1px 0 rgba(15,23,42,.04); }
.sg-sidebar-toggle { flex: 0 0 auto; }
.sg-icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--sg-border); border-radius: 6px; background:#fff; color: var(--sg-text-secondary); cursor:pointer; font-size:15px; }
.sg-icon-btn:hover { background: var(--sg-surface-2); color: var(--sg-text); }
.sg-icon-btn:focus-visible { outline:2px solid #a9cce8; outline-offset:1px; }
.sg-topbar-divider { width:1px; height:24px; background:var(--sg-border); margin:0 2px; }
.sg-header-title { font-size: 15px; letter-spacing:-.01em; }
.sg-header-context { padding-left: 10px; }
.sg-main { padding: 18px 20px 28px; }
.sg-page { width:100%; max-width:1480px; min-width:0; }
.sg-page-head h2 { font-size: 21px; letter-spacing:-.02em; }
.sg-card { border-radius: 7px; }
.sg-toolbar, .sg-table-wrap, .sg-pagination { border-color:#d9dfe5; }
.sg-table th { background:#f5f7f9; }
.sg-table tbody tr:hover td { background:#f9fbfc; }
.sg-btn { border-radius:5px; }
.sg-btn-primary { box-shadow: 0 1px 1px rgba(13,71,120,.12); }

html.sg-sidebar-collapsed .sg-shell { grid-template-columns: var(--sg-sidebar-width-collapsed) minmax(0,1fr); grid-template-rows: var(--sg-header-height) minmax(0,1fr); }
html.sg-sidebar-collapsed .sg-sidebar { width:var(--sg-sidebar-width-collapsed); }
html.sg-sidebar-collapsed .sg-brand { justify-content:center; padding-left:8px; padding-right:8px; }
html.sg-sidebar-collapsed .sg-brand-copy,
html.sg-sidebar-collapsed .sg-side-section,
html.sg-sidebar-collapsed .sg-sidebar-nav a span:not(.sg-side-icon),
html.sg-sidebar-collapsed .sg-side-footer { display:none; }
html.sg-sidebar-collapsed .sg-sidebar-nav a { justify-content:center; padding:10px 8px; }
html.sg-sidebar-collapsed .sg-sidebar-nav a.active { box-shadow:inset 3px 0 0 var(--sg-accent); }
html.sg-sidebar-collapsed .sg-side-icon { width:auto; font-size:14px; }

.sg-mobile-scrim { display:none; }

@media (max-width: 1100px) and (min-width: 761px) {
  .sg-shell { grid-template-columns: var(--sg-sidebar-width-collapsed) minmax(0,1fr); grid-template-rows: var(--sg-header-height) minmax(0,1fr); }
  .sg-sidebar { width:var(--sg-sidebar-width-collapsed); }
  .sg-brand { justify-content:center; padding-left:8px; padding-right:8px; }
  .sg-brand-copy, .sg-side-section, .sg-sidebar-nav a span:not(.sg-side-icon), .sg-side-footer { display:none; }
  .sg-sidebar-nav a { justify-content:center; padding:10px 8px; }
}

@media (max-width: 760px) {
  .sg-shell { display:block; min-height:100vh; }
  .sg-sidebar { grid-column:auto; grid-row:auto; position:fixed; left:0; top:var(--sg-header-height); bottom:0; height:calc(100vh - var(--sg-header-height)); width:min(280px, 88vw); transform:translateX(-102%); box-shadow: 10px 0 30px rgba(15,23,42,.18); }
  html.sg-sidebar-open .sg-sidebar { transform:translateX(0); }
  html.sg-sidebar-open .sg-mobile-scrim { display:block; position:fixed; inset:0; z-index:45; border:0; background:rgba(15,23,42,.34); }
  .sg-header { width:100%; padding:0 12px; }
  .sg-main { padding:14px 12px 24px; }
  .sg-header-context { display:none; }
  .sg-header-title { max-width:42vw; overflow:hidden; text-overflow:ellipsis; }
  .sg-global-search { width:34vw; min-width:120px; }
}

/* v0.9.6 authentication topbar */
.sg-auth-topbar{position:fixed;inset:0 0 auto 0;height:60px;display:flex;align-items:center;gap:10px;padding:0 22px;background:#fff;border-bottom:1px solid var(--sg-border);z-index:30;box-shadow:0 1px 0 rgba(15,23,42,.04)}
.sg-auth-topbar strong{display:block;font-size:14px}.sg-auth-topbar small{display:block;font-size:10px;color:var(--sg-text-muted);margin-top:1px}.sg-auth-topbar>span{flex:1}
.sg-auth-topbar+.login-wrap{padding-top:84px}

/* v0.9.7 account identity + security surfaces */
.sg-account-menu{position:relative;margin-left:8px}.sg-account-trigger{display:flex;align-items:center;gap:8px;border:1px solid var(--sg-border);background:#fff;padding:5px 8px 5px 6px;border-radius:6px;cursor:pointer;color:var(--sg-text)}.sg-account-trigger:hover{background:var(--sg-surface-2)}.sg-account-avatar{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#172332;color:#fff;font-size:10px;font-weight:900}.sg-account-copy{text-align:left;line-height:1.15}.sg-account-copy strong{display:block;font-size:11px}.sg-account-copy small{display:block;color:var(--sg-text-muted);font-size:9px;margin-top:2px}.sg-account-chevron{color:var(--sg-text-muted);font-size:11px}.sg-account-popover{position:absolute;right:0;top:calc(100% + 7px);width:240px;background:#fff;border:1px solid var(--sg-border);border-radius:7px;box-shadow:0 10px 30px rgba(15,23,42,.15);padding:6px;z-index:80}.sg-account-popover[hidden]{display:none}.sg-account-popover a{display:block;padding:8px 9px;border-radius:5px;color:var(--sg-text);font-size:12px}.sg-account-popover a:hover{background:var(--sg-surface-2);text-decoration:none}.sg-account-popover-head{padding:8px 9px 9px;border-bottom:1px solid var(--sg-border);margin-bottom:4px}.sg-account-popover-head strong{display:block;font-size:12px}.sg-account-popover-head span{display:block;font-size:10px;color:var(--sg-text-muted);margin-top:2px}.sg-account-trigger:focus-visible{outline:2px solid #9fc8e8;outline-offset:1px}
.sg-account-wrap{max-width:1180px;margin:84px auto 36px;padding:0 20px}.sg-account-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.sg-account-hero h1{margin:2px 0 2px;font-size:28px;letter-spacing:-.03em}.sg-eyebrow{font-size:10px;font-weight:800;letter-spacing:.08em;color:var(--sg-text-muted)}.sg-security-row{display:flex;justify-content:space-between;gap:16px;padding:11px 0;border-bottom:1px solid #e9edf1}.sg-security-row:last-of-type{margin-bottom:10px}.sg-security-row p{margin:3px 0 0;font-size:11px;color:var(--sg-text-muted)}.sg-chip-list{display:flex;gap:6px;flex-wrap:wrap}.sg-chip{padding:5px 8px;border:1px solid var(--sg-border);border-radius:999px;background:var(--sg-surface-2);font-family:var(--sg-font-mono);font-size:10px;color:var(--sg-text-secondary)}
@media (max-width:760px){.sg-account-copy,.sg-account-chevron{display:none}.sg-account-wrap{margin-top:76px;padding:0 12px}.sg-account-hero{align-items:center}.sg-account-hero h1{font-size:22px}}

/* v0.9.16 unified authentication flow frame */
.auth-flow-page{flex:1;min-height:0;display:grid;place-items:center;padding:16px 20px;overflow:hidden}
.auth-flow-frame{width:min(760px,calc(100vw - 40px));height:min(680px,calc(100vh - 92px));min-height:560px;background:var(--sg-surface);border:1px solid var(--sg-border);border-radius:10px;box-shadow:var(--sg-shadow);display:flex;flex-direction:column;overflow:hidden}
.auth-flow-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid var(--sg-border);flex:0 0 auto}
.auth-flow-head h1{margin:0;font-size:21px;letter-spacing:-.02em}.auth-flow-head p{margin:3px 0 0;font-size:11px;color:var(--sg-text-muted)}
.auth-flow-body{flex:1;min-height:0;padding:20px 22px;overflow:auto;display:flex;flex-direction:column}.auth-flow-center{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center}
.auth-flow-footer{flex:0 0 auto;padding:11px 22px;border-top:1px solid var(--sg-border);display:flex;justify-content:space-between;gap:12px;font-size:10px;color:var(--sg-text-muted)}
.auth-progress{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 18px}.auth-step{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:800;color:var(--sg-text-muted)}.auth-step-dot{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--sg-border-strong);background:#fff;font-size:11px}.auth-step.is-active{color:var(--sg-primary)}.auth-step.is-active .auth-step-dot{border-color:#86b9df;background:var(--sg-primary-subtle);color:var(--sg-primary)}
.auth-flow-email{text-align:center;font-size:16px;font-weight:800;margin:2px 0 8px}.auth-flow-sub{text-align:center;color:var(--sg-text-secondary);font-size:12px;margin:0 0 18px}
.auth-setup-grid{display:grid;grid-template-columns:280px minmax(0,1fr);gap:22px;align-items:center;flex:1;min-height:0}.auth-qr-side{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.auth-qr-wrap{width:220px;height:220px;padding:8px;background:#fff;border:1px solid var(--sg-border);border-radius:10px;display:grid;place-items:center}.auth-qr-wrap img{display:block;width:204px;height:204px}.auth-manual{width:100%;max-width:240px}.auth-manual code{display:block;word-break:break-all;padding:9px;background:var(--sg-surface-2);border:1px solid var(--sg-border);border-radius:6px;font-size:10px;line-height:1.4}.auth-steps{display:flex;flex-direction:column;gap:13px}.auth-instruction{display:flex;gap:10px}.auth-instruction-num{width:26px;height:26px;flex:0 0 26px;border-radius:50%;background:var(--sg-primary-subtle);color:var(--sg-primary);display:grid;place-items:center;font-weight:900;font-size:11px}.auth-instruction strong{display:block;font-size:12px}.auth-instruction p{margin:2px 0 0;font-size:11px;color:var(--sg-text-muted);line-height:1.45}
.auth-code-block{max-width:460px;margin:0 auto;width:100%}.auth-code-block .sg-input{height:52px;text-align:center;font-size:22px;letter-spacing:.24em}.auth-note{display:flex;gap:9px;align-items:flex-start;margin-top:14px;padding:10px 11px;background:var(--sg-info-bg);border:1px solid #c6deef;border-radius:7px;font-size:11px;line-height:1.45;color:#245a7f}.auth-note strong{flex:none}.auth-help{text-align:center;margin-top:18px;font-size:11px}.auth-warning{display:flex;gap:9px;padding:10px;margin:14px 0;border:1px solid #f0d995;background:var(--sg-warning-bg);border-radius:7px;font-size:11px;line-height:1.45;color:#6c4a00}.auth-ack{display:flex;gap:8px;align-items:flex-start;font-size:12px;line-height:1.4}.auth-ack input{margin-top:2px}.auth-recovery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:14px;background:var(--sg-surface-2);border:1px solid var(--sg-border);border-radius:8px}.auth-recovery-code{font-family:var(--sg-font-mono);font-size:16px;font-weight:800;letter-spacing:.07em;padding:10px;background:#fff;border:1px solid var(--sg-border);border-radius:6px;text-align:center}.auth-flow-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.auth-flow-actions .sg-btn{min-width:220px}.auth-form{width:100%;max-width:440px;margin:0 auto}.auth-form label{display:block;font-size:12px;font-weight:700;margin:12px 0 5px}.auth-form .sg-input{width:100%;height:46px}.auth-form .sg-btn{width:100%;margin-top:16px}
@media(max-width:760px){html,body{overflow:auto}.auth-flow-page{overflow:auto;align-items:flex-start;padding:12px}.auth-flow-frame{width:min(760px,calc(100vw - 24px));height:auto;min-height:0;max-height:none}.auth-flow-body{overflow:visible}.auth-setup-grid{grid-template-columns:1fr}.auth-qr-wrap{width:180px;height:180px}.auth-qr-wrap img{width:164px;height:164px}.auth-flow-actions{flex-direction:column}.auth-flow-actions .sg-btn{width:100%;min-width:0}.auth-recovery-grid{grid-template-columns:1fr}}
.auth-step.is-done{color:var(--sg-success)}.auth-step.is-done .auth-step-dot{border-color:#a5d7bb;background:var(--sg-success-bg);color:var(--sg-success)}


/* v0.9.17 auth flow viewport: no topbar, no page scrolling, one fixed frame size */
html.auth-flow-html, html.auth-flow-html body{width:100%;height:100%;overflow:hidden}
body.auth-flow-body-page{display:grid;place-items:center;min-height:100dvh;background:var(--sg-bg);overflow:hidden}
body.auth-flow-body-page .sg-auth-topbar{display:none!important}
body.auth-flow-body-page .auth-flow-page{width:100%;height:100dvh;min-height:0;display:grid;place-items:center;padding:16px 20px;overflow:hidden}
body.auth-flow-body-page .auth-flow-frame{width:min(690px,calc(100vw - 48px));height:min(650px,calc(100dvh - 48px));min-height:0;max-height:none;background:var(--sg-surface);border:1px solid var(--sg-border);border-radius:10px;box-shadow:var(--sg-shadow);display:flex;flex-direction:column;overflow:hidden}
body.auth-flow-body-page .auth-flow-head{padding:16px 20px 14px;flex:0 0 auto}
body.auth-flow-body-page .auth-flow-head h1{font-size:22px}
body.auth-flow-body-page .auth-flow-body{flex:1;min-height:0;overflow:hidden;padding:16px 20px}
body.auth-flow-body-page .auth-flow-center{min-height:0;overflow:hidden;justify-content:center}
body.auth-flow-body-page .auth-flow-footer{min-height:40px;padding:9px 20px}
body.auth-flow-body-page .auth-progress{margin-bottom:14px}
body.auth-flow-body-page .auth-flow-sub{margin-bottom:14px}
body.auth-flow-body-page .auth-flow-email{margin-bottom:6px}
body.auth-flow-body-page .auth-form{max-width:500px}
body.auth-flow-body-page .auth-form .sg-input{height:48px}
body.auth-flow-body-page .auth-setup-grid{grid-template-columns:228px minmax(0,1fr);gap:16px}
body.auth-flow-body-page .auth-qr-wrap{width:168px;height:168px;padding:6px}
body.auth-flow-body-page .auth-qr-wrap img{width:156px;height:156px}
body.auth-flow-body-page .auth-steps{gap:8px}
body.auth-flow-body-page .auth-instruction{gap:9px}
body.auth-flow-body-page .auth-instruction-num{width:24px;height:24px;flex-basis:24px}
body.auth-flow-body-page .auth-instruction p{line-height:1.35}
body.auth-flow-body-page .auth-code-block .sg-input{height:46px;font-size:19px}
body.auth-flow-body-page .auth-note{margin-top:10px}
body.auth-flow-body-page .auth-help{margin-top:12px}
body.auth-flow-body-page .auth-recovery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:12px}
body.auth-flow-body-page .auth-recovery-code{font-size:15px;padding:8px 9px}
body.auth-flow-body-page .auth-warning{margin:11px 0}
body.auth-flow-body-page .auth-flow-actions{margin-top:12px}
body.auth-flow-body-page .auth-alert-error{display:flex;gap:9px;align-items:flex-start;margin:10px 0;padding:10px 11px;border:1px solid #f0b7b0;background:var(--sg-danger-bg);color:var(--sg-danger);border-radius:7px;font-size:11px;line-height:1.4}
@media(max-height:760px) and (min-width:761px){
  body.auth-flow-body-page .auth-flow-page{padding:10px 14px}
  body.auth-flow-body-page .auth-flow-frame{height:calc(100dvh - 20px)}
  body.auth-flow-body-page .auth-flow-head{padding:12px 18px 10px}
  body.auth-flow-body-page .auth-flow-body{padding:12px 18px}
  body.auth-flow-body-page .auth-flow-footer{padding:8px 18px}
  body.auth-flow-body-page .auth-qr-wrap{width:168px;height:168px}
  body.auth-flow-body-page .auth-qr-wrap img{width:154px;height:154px}
}
@media(max-width:760px){
  html.auth-flow-html,html.auth-flow-html body{overflow:hidden}
  body.auth-flow-body-page{overflow:hidden}
  body.auth-flow-body-page .auth-flow-page{height:100dvh;min-height:0;padding:10px;overflow:hidden;align-items:center}
  body.auth-flow-body-page .auth-flow-frame{width:min(690px,calc(100vw - 20px));height:min(650px,calc(100dvh - 20px));min-height:0;border-radius:9px}
  body.auth-flow-body-page .auth-flow-body{overflow:hidden;padding:14px}
  body.auth-flow-body-page .auth-setup-grid{grid-template-columns:1fr;overflow:hidden}
  body.auth-flow-body-page .auth-qr-wrap{width:160px;height:160px}
  body.auth-flow-body-page .auth-qr-wrap img{width:146px;height:146px}
  body.auth-flow-body-page .auth-steps{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  body.auth-flow-body-page .auth-instruction{min-width:0}
  body.auth-flow-body-page .auth-flow-footer{font-size:9px}
  body.auth-flow-body-page .auth-recovery-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:440px){
  body.auth-flow-body-page .auth-flow-frame{width:calc(100vw - 12px);height:calc(100dvh - 12px)}
  body.auth-flow-body-page .auth-flow-head{padding:13px 15px 11px}
  body.auth-flow-body-page .auth-flow-body{padding:12px}
  body.auth-flow-body-page .auth-flow-head h1{font-size:19px}
  body.auth-flow-body-page .auth-progress{gap:4px}
  body.auth-flow-body-page .auth-step{font-size:9px}
  body.auth-flow-body-page .auth-step-dot{width:22px;height:22px}
  body.auth-flow-body-page .auth-steps{grid-template-columns:1fr}
  body.auth-flow-body-page .auth-recovery-grid{grid-template-columns:1fr 1fr}
}

/* v0.9.18 auth recovery */
.auth-link-row{display:flex;justify-content:space-between;gap:12px;margin-top:12px;font-size:11px}.auth-link-row a,.auth-link-stack a,.auth-help a,.auth-option-link,.auth-support-list a{color:var(--sg-primary);font-weight:700}.auth-link-stack{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:18px;font-size:11px}.auth-simple-wrap{width:100%;max-width:500px;margin:0 auto}.auth-icon-circle{width:52px;height:52px;border-radius:14px;background:#f3b23c;color:#13283f;display:grid;place-items:center;font-weight:900;font-size:20px;margin:0 auto 16px}.auth-success{margin-top:12px;padding:10px 11px;background:var(--sg-success-bg);border:1px solid #b7dfc6;border-radius:7px;color:#27633a;font-size:11px;line-height:1.45}.auth-recovery-options{display:flex;flex-direction:column;gap:10px}.auth-option{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:14px 15px;border:1px solid var(--sg-border);border-radius:9px;background:#fff;color:var(--sg-text)}.auth-option:hover{text-decoration:none;background:var(--sg-surface-2);border-color:var(--sg-border-strong)}.auth-option strong{font-size:13px}.auth-option span:not(.auth-option-link){grid-column:1;font-size:11px;color:var(--sg-text-muted);line-height:1.45}.auth-option-link{grid-column:2;grid-row:1 / span 2;align-self:center;font-size:10px}.auth-support-list{display:flex;flex-direction:column;gap:12px}.auth-support-list>div{padding:12px 13px;border:1px solid var(--sg-border);border-radius:8px;background:var(--sg-surface-2)}.auth-support-list strong{display:block;font-size:12px}.auth-support-list p{margin:3px 0 5px;font-size:11px;line-height:1.45;color:var(--sg-text-muted)}.auth-support-note code{font-family:var(--sg-font-mono);font-size:10px}.auth-help-sep{color:var(--sg-text-muted);margin:0 4px}
@media(max-width:560px){.auth-link-row{flex-direction:column;text-align:center;align-items:center}.auth-option{grid-template-columns:1fr}.auth-option-link{grid-column:1;grid-row:auto;justify-self:start}.auth-simple-wrap{max-width:100%}}

/* v0.9.28 modal foundation */
.sg-modal[hidden]{display:none!important}.sg-modal:not([hidden]){position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(15,23,42,.42);backdrop-filter:blur(1.5px)}.sg-modal-card{width:min(680px,calc(100vw - 40px));max-height:min(680px,calc(100vh - 40px));background:#fff;border:1px solid var(--sg-border);border-radius:12px;box-shadow:0 22px 70px rgba(15,23,42,.24);display:flex;flex-direction:column;overflow:hidden}.sg-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:17px 20px 14px;border-bottom:1px solid var(--sg-border)}.sg-modal-body{padding:18px 20px;overflow:auto}.sg-modal-actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px;border-top:1px solid var(--sg-border);background:#fbfcfd}
@media(max-width:760px){.sg-modal:not([hidden]){padding:10px}.sg-modal-card{width:100%;max-height:calc(100vh - 20px);border-radius:10px}.sg-modal-head,.sg-modal-body,.sg-modal-actions{padding-left:14px;padding-right:14px}}

/* v0.9.58 Hub company switcher */
.sg-company-switcher{position:relative;margin-right:2px}.sg-company-trigger{display:flex;align-items:center;gap:7px;border:1px solid var(--sg-border);background:#fff;padding:5px 8px 5px 6px;border-radius:6px;cursor:pointer;color:var(--sg-text);min-width:176px}.sg-company-trigger:hover{background:var(--sg-surface-2)}.sg-company-avatar{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;background:#f3b23c;color:#13283f;font-size:10px;font-weight:900}.sg-company-copy{text-align:left;line-height:1.1;min-width:0;flex:1}.sg-company-copy small{display:block;color:var(--sg-text-muted);font-size:8px}.sg-company-copy strong{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sg-company-chevron{color:var(--sg-text-muted);font-size:10px}.sg-company-popover{position:absolute;right:0;top:calc(100% + 7px);width:280px;background:#fff;border:1px solid var(--sg-border);border-radius:8px;box-shadow:0 12px 34px rgba(15,23,42,.16);padding:6px;z-index:90}.sg-company-popover[hidden]{display:none}.sg-company-popover-head{padding:8px 9px 9px;border-bottom:1px solid var(--sg-border);margin-bottom:4px}.sg-company-popover-head strong{display:block;font-size:11px}.sg-company-popover-head span{display:block;font-size:9px;color:var(--sg-text-muted);margin-top:2px}.sg-company-list{display:flex;flex-direction:column;gap:3px;max-height:300px;overflow:auto}.sg-company-option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;background:#fff;border-radius:6px;padding:8px 9px;text-align:left;color:var(--sg-text);cursor:pointer}.sg-company-option:hover{background:var(--sg-surface-2)}.sg-company-option.active{background:var(--sg-primary-subtle)}.sg-company-option-main{min-width:0}.sg-company-option-main strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sg-company-option-main small{display:block;font-size:9px;color:var(--sg-text-muted);margin-top:2px}.sg-company-check{font-weight:900;color:var(--sg-primary)}.sg-company-switcher.is-loading{opacity:.6;pointer-events:none}
@media(max-width:760px){.sg-company-trigger{min-width:0}.sg-company-copy{display:none}.sg-company-popover{right:-8px;width:min(280px,calc(100vw - 24px))}}


/* v0.9.68 Hub chrome: full-width brand topbar + bottom sidebar collapse control */
.sg-header-brand{display:flex;align-items:center;flex:0 0 auto}
.sg-header-brand-mark{width:34px;height:34px;border-radius:7px;background:var(--sg-accent);color:#13202c;display:grid;place-items:center;font-weight:900;font-size:15px;letter-spacing:-.03em}
.sg-sidebar{overflow:hidden}
.sg-sidebar .sg-brand{display:none!important}
.sg-side-footer{padding:10px;border-top:1px solid rgba(255,255,255,.08);font-size:11px;color:#9eabb9}
.sg-sidebar-footer-toggle{width:100%;height:34px;display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:0 10px;border-color:rgba(255,255,255,.12);background:rgba(255,255,255,.04);color:#c8d1db}
.sg-sidebar-footer-toggle:hover{background:rgba(255,255,255,.08);color:#fff}
.sg-sidebar-toggle-glyph{font-size:20px;line-height:1;width:16px;text-align:center}
.sg-sidebar-toggle-text{font-size:11px;font-weight:600;white-space:nowrap}
html.sg-sidebar-collapsed .sg-sidebar-footer-toggle{justify-content:center;padding:0 6px}
html.sg-sidebar-collapsed .sg-sidebar-toggle-text{display:none}
html.sg-sidebar-collapsed .sg-side-footer{padding:10px 8px}
@media(max-width:760px){
  .sg-header-brand-mark{width:32px;height:32px}
  .sg-side-footer{display:block}
}

/* v0.9.70 Hub chrome: fixed sidebar, full-width topbar, company + market context beside logo. */
.sg-header,.sg-header-left,.sg-header-brand,.sg-context-switchers,.sg-company-switcher,.sg-market-switcher{overflow:visible}
.sg-context-switchers{display:flex;align-items:center;gap:7px;margin-left:10px;flex:0 0 auto}
.sg-company-switcher,.sg-market-switcher{position:relative}
.sg-company-trigger,.sg-market-trigger{display:flex;align-items:center;gap:7px;height:38px;border:1px solid var(--sg-border);background:#fff;color:var(--sg-text);border-radius:6px;cursor:pointer;padding:4px 8px}
.sg-company-trigger{min-width:178px}
.sg-market-trigger{min-width:132px}
.sg-company-trigger:hover,.sg-market-trigger:hover{background:var(--sg-surface-2)}
.sg-company-avatar{width:28px;height:28px;display:grid;place-items:center;border-radius:6px;background:#f3b23c;color:#13283f;font-size:10px;font-weight:900}
.sg-company-copy,.sg-market-copy{text-align:left;line-height:1.1;min-width:0;flex:1}.sg-company-copy small,.sg-market-copy small{display:block;color:var(--sg-text-muted);font-size:8px}.sg-company-copy strong,.sg-market-copy strong{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sg-company-chevron,.sg-market-chevron{color:var(--sg-text-muted);font-size:10px}
.sg-market-copy strong{max-width:92px}
.sg-market-popover,.sg-company-popover{position:absolute;left:0;right:auto;top:calc(100% + 7px);width:280px;background:#fff;border:1px solid var(--sg-border);border-radius:8px;box-shadow:0 12px 34px rgba(15,23,42,.16);padding:6px;z-index:110}
.sg-market-popover{width:250px}
.sg-company-popover[hidden],.sg-market-popover[hidden]{display:none}
.sg-market-list{display:flex;flex-direction:column;gap:3px;max-height:300px;overflow:auto}.sg-market-option{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;background:#fff;border-radius:6px;padding:8px 9px;text-align:left;color:var(--sg-text);cursor:pointer}.sg-market-option:hover{background:var(--sg-surface-2)}.sg-market-option.active{background:var(--sg-primary-subtle)}.sg-market-option strong{display:block;font-size:11px}.sg-market-option small{display:block;font-size:9px;color:var(--sg-text-muted);margin-top:2px}
@media (max-width:760px){.sg-context-switchers{margin-left:6px;gap:5px}.sg-company-trigger{min-width:132px}.sg-market-trigger{min-width:112px}.sg-company-copy strong{max-width:72px}.sg-market-copy strong{max-width:70px}.sg-company-popover,.sg-market-popover{left:0;right:auto}.sg-header-brand-mark{width:32px;height:32px}}

/* v0.9.71 Hub topbar refinement: logo + grouped context only, no duplicate page title/context. */
@media (min-width:761px){
  .sg-header{grid-column:1 / -1 !important;}
}
.sg-market-groups{display:flex;flex-direction:column;gap:6px;max-height:360px;overflow:auto;padding-right:2px}
.sg-market-group{padding:0}
.sg-market-group-title{padding:7px 9px 4px;color:var(--sg-text-muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.07em}
.sg-market-list{display:flex;flex-direction:column;gap:2px}
.sg-market-option{min-height:40px}
.sg-market-option small{font-size:9px}

/* v0.9.76 Hub header simplification: remove global search, health/operator chrome, and company icon. */
.sg-header { display:flex; align-items:center; justify-content:space-between; }
.sg-global-search { display:none !important; }
.sg-header-left { display:none !important; }
.sg-header-right { margin-left:auto; display:flex; align-items:center; gap:8px; min-width:0; }
.sg-company-avatar { display:none !important; }
.sg-company-trigger { padding-left:10px; }
.sg-header-right > #health,
.sg-header-right > .sg-user-menu { display:none !important; }

/* refined account menu: visual polish only; topbar/sidebar geometry remains unchanged */
.sg-account-menu{position:relative;margin-left:8px}.sg-account-trigger{display:flex;align-items:center;gap:8px;min-width:164px;border:1px solid var(--sg-border);background:#fff;padding:6px 9px 6px 7px;border-radius:8px;cursor:pointer;color:var(--sg-text);box-shadow:0 1px 2px rgba(15,23,42,.03)}.sg-account-trigger:hover{background:var(--sg-surface-2);border-color:var(--sg-border-strong)}.sg-account-trigger:active{transform:translateY(1px)}.sg-account-avatar{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#172332;color:#fff;font-size:10px;font-weight:900;flex:none}.sg-account-avatar-lg{width:36px;height:36px;font-size:11px}.sg-account-copy{text-align:left;line-height:1.15;min-width:0}.sg-account-copy strong{display:block;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sg-account-copy small{display:block;color:var(--sg-text-muted);font-size:9px;margin-top:3px;white-space:nowrap}.sg-account-chevron{color:var(--sg-text-muted);font-size:11px;margin-left:auto}.sg-account-popover{position:absolute;right:0;top:calc(100% + 8px);width:278px;background:#fff;border:1px solid var(--sg-border);border-radius:10px;box-shadow:0 18px 40px rgba(15,23,42,.16),0 4px 10px rgba(15,23,42,.06);padding:6px;z-index:200;overflow:hidden}.sg-account-popover[hidden]{display:none}.sg-account-popover-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border-radius:7px;background:linear-gradient(180deg,#fbfcfd,#f5f7f9);border:1px solid #edf0f3}.sg-account-popover-identity{display:flex;align-items:center;gap:9px;min-width:0}.sg-account-popover-identity>span:last-child{min-width:0}.sg-account-popover-head strong{display:block;font-size:12px;line-height:1.2}.sg-account-popover-head span span{display:block;font-size:10px;color:var(--sg-text-muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:165px}.sg-account-role{flex:none;padding:5px 7px;border-radius:999px;background:var(--sg-primary-subtle);color:var(--sg-primary);font-size:9px;font-weight:800;text-transform:capitalize;white-space:nowrap}.sg-account-menu-section{padding-top:5px}.sg-account-item{display:flex!important;align-items:center;gap:9px;padding:9px 8px!important;border-radius:7px;color:var(--sg-text)!important;font-size:12px}.sg-account-item:hover{background:var(--sg-surface-2);text-decoration:none}.sg-account-item-icon{width:27px;height:27px;display:grid;place-items:center;border-radius:6px;background:#eef3f7;color:#35516d;font-size:10px;font-weight:800;flex:none}.sg-account-item strong{display:block;font-size:11px}.sg-account-item small{display:block;color:var(--sg-text-muted);font-size:9px;margin-top:2px}.sg-account-menu-divider{height:1px;background:var(--sg-border);margin:3px 4px}.sg-account-signout{width:100%;display:flex;align-items:center;gap:9px;padding:9px 8px;border:0;border-radius:7px;background:#fff;color:var(--sg-text);text-align:left;cursor:pointer}.sg-account-signout:hover{background:var(--sg-danger-bg);color:var(--sg-danger)}.sg-account-signout .sg-account-item-icon{background:#f5f6f7}.sg-account-trigger:focus-visible,.sg-account-signout:focus-visible,.sg-account-item:focus-visible{outline:2px solid #9fc8e8;outline-offset:1px}


/* v0.9.83 account menu cleanup: keep Hub chrome unchanged; simplify menu content. */
.sg-account-popover-head{display:grid!important;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:10px}
.sg-account-popover-avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:#172332;color:#fff;font-size:11px;font-weight:900;flex:0 0 36px}
.sg-account-popover-identity{min-width:0;display:block}
.sg-account-popover-identity strong{display:block;font-size:12px;line-height:1.2}
.sg-account-popover-identity span{display:block;font-size:10px;color:var(--sg-text-muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sg-account-role{align-self:center;justify-self:end}
.sg-account-item{min-height:40px}
.sg-account-item>span:last-child{display:block;min-width:0}
.sg-account-item small,.sg-account-signout small{display:none!important}
.sg-account-signout{min-height:40px}


/* v0.10.5 dispatch topbar consistency */
.sg-top-sync-link{text-decoration:none!important;display:inline-flex;align-items:center}
.sg-top-sync-link:hover{text-decoration:none!important}
.sg-sync-dot{width:7px;height:7px;border-radius:50%;background:#159447;display:inline-block;margin-right:6px;flex:none}
.sg-sync-next{color:#60758c;margin-left:4px}

/* v0.10.6 company identity in global topbar */
.sg-header-brand{gap:10px;min-width:0}
.sg-header-company-title{font-size:15px;font-weight:800;letter-spacing:-.015em;color:var(--sg-text);max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sg-company-logo-mark{overflow:hidden;background:#fff;border:1px solid var(--sg-border);padding:0}
.sg-company-logo-mark img{display:block;width:100%;height:100%;object-fit:cover;border-radius:6px}
@media(max-width:760px){.sg-header-company-title{max-width:120px;font-size:13px}}


/* v0.10.15 Dispatch horizontal application navigation.
   Dispatch uses the entire viewport width: topbar, app-nav bar, then content. */
.sg-dispatch-shell {
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: var(--sg-header-height) 46px minmax(0,1fr);
}
.sg-dispatch-shell > .sg-header {
  grid-column: 1;
  grid-row: 1;
}
.sg-dispatch-shell > .sg-sidebar {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: var(--sg-header-height);
  width: 100%;
  height: 46px;
  min-height: 46px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  border-right: 0;
  border-bottom: 1px solid #0e1722;
  z-index: 80;
}
.sg-dispatch-shell > .sg-sidebar .sg-brand,
.sg-dispatch-shell > .sg-sidebar .sg-side-spacer,
.sg-dispatch-shell > .sg-sidebar .sg-side-footer,
.sg-dispatch-shell > .sg-sidebar .sg-side-section {
  display: none !important;
}
.sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav {
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 0 12px;
  min-width: max-content;
}
.sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a {
  height: 46px;
  min-width: 108px;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 16px;
  border-radius: 0;
  font-size: 12px;
  color: #cfd8e2;
}
.sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a:hover {
  background: rgba(255,255,255,.06);
}
.sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a.active {
  background: #25374a;
  box-shadow: inset 0 -3px 0 var(--sg-accent);
}
.sg-dispatch-shell > .sg-main {
  grid-column: 1;
  grid-row: 3;
  width: 100%;
  max-width: none;
  padding: 12px 14px 22px;
}
.sg-dispatch-shell > .sg-main > .sg-page {
  width: 100%;
  max-width: none;
  margin: 0;
}
html.sg-sidebar-collapsed .sg-dispatch-shell {
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: var(--sg-header-height) 46px minmax(0,1fr);
}
html.sg-sidebar-collapsed .sg-dispatch-shell > .sg-sidebar {
  width: 100%;
}
html.sg-sidebar-collapsed .sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a span:not(.sg-side-icon) {
  display: inline;
}
html.sg-sidebar-collapsed .sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a {
  justify-content: center;
  padding: 0 16px;
  box-shadow: none;
}
html.sg-sidebar-collapsed .sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a.active {
  box-shadow: inset 0 -3px 0 var(--sg-accent);
}
@media (max-width:1100px) and (min-width:761px) {
  .sg-dispatch-shell {
    grid-template-columns: minmax(0,1fr);
    grid-template-rows: var(--sg-header-height) 46px minmax(0,1fr);
  }
  .sg-dispatch-shell > .sg-sidebar {
    width:100%;
  }
  .sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a span:not(.sg-side-icon) { display:inline; }
  .sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a { justify-content:center; padding:0 14px; }
}
@media (max-width:760px) {
  .sg-dispatch-shell { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:var(--sg-header-height) 44px minmax(0,1fr); }
  .sg-dispatch-shell > .sg-header { grid-row:1; }
  .sg-dispatch-shell > .sg-sidebar {
    grid-row:2;
    position:sticky;
    left:auto;
    right:auto;
    bottom:auto;
    top:var(--sg-header-height);
    width:100%;
    height:44px;
    min-height:44px;
    transform:none !important;
    box-shadow:none;
  }
  .sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav { padding:0 6px; }
  .sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a { height:44px; min-width:auto; padding:0 12px; }
  .sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a span:not(.sg-side-icon) { display:inline; }
  .sg-dispatch-shell > .sg-main { grid-row:3; padding:10px 8px 20px; }
}

/* v0.10.16 Dispatch table: fitted resizable columns with no horizontal scrollbar. */
.sg-dispatch-shell .sg-table-wrap{overflow-x:hidden!important;}
.sg-dispatch-shell .sg-table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed;}
.sg-dispatch-shell .sg-table th,.sg-dispatch-shell .sg-table td{min-width:0;max-width:none;}

/* v0.10.24 Dispatch nav: use page titles only; no repeated initials. */
.sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a .sg-side-icon { display:none !important; }
.sg-dispatch-shell > .sg-sidebar .sg-sidebar-nav a { gap:0; }
