/* Shared VI treatment for the existing platform and partner workspaces. */
:root {
  --brand-navy:#102d40;
  --brand-blue:#1675e8;
  --brand-teal:#16b9bd;
  --brand-lime:#98d83e;
  --ink:#102d40;
  --muted:#64788f;
  --line:#dfe7ef;
  --line-strong:#cbd8e6;
  --bg:#f4f7fb;
  --surface:#fff;
  --panel:#f8fafc;
  --content-canvas:#f4f7fb;
  --nav-canvas:#102d40;
  --nav-border:#163e56;
  --nav:#102d40;
  --nav-soft:#42617a;
  --teal:#1675e8;
  --teal-soft:#eaf3ff;
  --blue:#1675e8;
  --blue-soft:#edf5ff;
  --green:#2d8545;
  --green-soft:#edf7ed;
  --amber:#9b651d;
  --amber-soft:#fff5e5;
  --red:#bc4747;
  --red-soft:#fff0ef;
  --radius:8px;
  --shadow:0 3px 14px rgba(16,45,64,.035);
  font-family:"Noto Sans CJK SC","PingFang SC","Microsoft YaHei",Arial,sans-serif;
}
.shell { color:var(--ink); background:var(--bg); }
.shell .topbar { min-height:72px; padding:12px 22px; gap:16px; border-color:var(--line); background:#fff; box-shadow:0 2px 9px rgba(16,45,64,.035); }
.shell .brand { gap:12px; }
.shell .brand-logo-icon { width:44px; height:44px; filter:none; }
.shell .brand strong { font-size:18px; font-weight:700; }
.shell .brand span { font-size:11px; color:var(--muted); }
.shell .portal-identity { border-left:3px solid var(--brand-blue); }
.shell .portal-identity span,.shell .top-context span { font-size:10px; font-weight:500; }
.shell .portal-identity strong,.shell .top-context strong { font-size:13px; font-weight:650; }
.shell .top-actions { flex-wrap:wrap; gap:8px; }
.shell .account-chip { padding:6px 10px; color:#46647c; background:#f8fafc; border-color:var(--line); font-size:11px; font-weight:500; }
.shell .sync-status { font-size:11px; font-weight:500; }
.shell .app-body { grid-template-columns:218px minmax(0,1fr); gap:0; padding:0; }
.shell .sidebar { position:sticky; top:var(--shell-header-height,72px); height:calc(100svh - var(--shell-header-height,72px)); min-height:360px; overflow-y:auto; overscroll-behavior:contain; border:0; border-radius:0; padding:30px 10px 150px; background:var(--brand-navy); box-shadow:none; color:#fff; }
.shell .sidebar > .scope-card { display:none; }
.shell .sidebar::before { position:absolute; content:""; z-index:-1; left:-175px; bottom:-35px; width:400px; aspect-ratio:640/585; opacity:.4; background:url('./assets/brand/vi-embrace-arc-v380.svg') center/contain no-repeat; transform:rotate(-64deg) scale(1.05,.68); pointer-events:none; }
.shell .sidebar::after { left:-75px; right:auto; bottom:15px; width:360px; opacity:.38; background:url('./assets/brand/vi-embrace-arc-v380.svg') center/contain no-repeat; transform:rotate(-20deg) scale(1.12,.82); }
.shell .nav-group { position:relative; z-index:1; gap:6px; }
.shell .nav-item { display:flex; align-items:center; gap:14px; min-height:54px; padding:14px 17px; color:#e7f0f8; border:1px solid transparent; border-radius:7px; box-shadow:none; }
.shell .nav-item span { font-size:14px; font-weight:550; line-height:1.5; }
.nav-icon { flex:0 0 20px; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.shell .nav-item:hover { color:#fff; background:rgba(255,255,255,.07); }
.shell .nav-item.active { color:#fff; border-color:transparent; background:var(--brand-blue); box-shadow:none; }
.shell .nav-item.active::before { display:none; }
.shell .nav-item:focus-visible { outline:2px solid #97d9ef; outline-offset:2px; }
.shell .main,.shell.cockpit-focus .main { min-height:calc(100svh - var(--shell-header-height,72px)); padding:22px 24px 28px; border:0; border-radius:0; background:var(--bg); }
.shell .subnav { position:relative; isolation:isolate; overflow:hidden; padding:16px 18px; margin-bottom:18px; border-color:var(--line); box-shadow:none; }
.shell .subnav::after { position:absolute; content:""; right:-100px; top:-115px; z-index:-1; width:300px; aspect-ratio:640/585; background:url('./assets/brand/vi-embrace-arc-v380.svg') center/contain no-repeat; opacity:.055; transform:rotate(28deg) scale(1.25,.85); pointer-events:none; }
.shell .subnav > div:first-child strong { font-size:15px; font-weight:650; }
.shell .subnav-tabs button,.shell .subnav-groups button { padding:10px 16px; border-color:var(--line-strong); border-radius:6px; color:var(--ink); background:#fff; transform:none; box-shadow:none; }
.shell .subnav-tabs button strong { font-size:13px; font-weight:650; }
.shell .subnav-tabs button em { font-size:11px; font-weight:400; line-height:1.5; }
.shell .subnav-tabs button.active,.shell .subnav-groups button.active { border-color:#66cbd5; background:#e9f9fa; color:#087d92; }
.shell .subnav-tabs button.active em { color:#497f8c; }
.shell .subnav-tabs button:hover,.shell .subnav-groups button:hover { border-color:var(--brand-blue); }
.shell .page-head { margin:0 0 14px; gap:16px; }
.shell .page-head h1 { font-size:24px; line-height:1.4; font-weight:700; letter-spacing:0; }
.shell .page-head p { font-size:13px; line-height:1.7; color:var(--muted); }
.shell .role-summary { margin-bottom:14px; padding:14px 18px; box-shadow:none; }
.shell .role-identity { gap:6px; }
.shell .role-identity .badge { justify-self:start; width:max-content; }
.shell .role-identity strong { font-size:15px; font-weight:650; }
.shell .role-identity > span:not(.badge) { font-size:12px; }
.shell .panel,.shell .board,.shell .detail,.shell .role-summary { border-color:var(--line); border-radius:8px; box-shadow:none; background:#fff; }
.shell .panel-head { padding:15px 18px; }
.shell .panel-head h2 { font-size:16px; font-weight:650; }
.shell .panel-body { padding:16px 18px; }
.shell .workspace { gap:14px; grid-template-columns:minmax(0,1fr) clamp(320px,26vw,370px); }
.shell .filter-panel { padding:14px 16px; gap:10px; background:#fbfcfe; }
.shell .field-label,.shell .filter-panel .field-label { font-size:12px; font-weight:550; color:#60758a; }
.shell .action-bar { gap:8px; padding:12px 16px; background:#fff; }
.shell .action-bar .record-count { font-size:12px; }
.shell button.ghost,.shell button.primary,.shell button.danger { min-height:36px; border-radius:5px; padding:8px 12px; font-size:13px; font-weight:550; line-height:1.4; box-shadow:none; }
.shell .primary { color:#fff; background:var(--brand-blue); }
.shell .primary:hover { background:#0d63cc; }
.shell .primary[data-supplier-product-import],.shell .primary[data-supplier-product-listing],.shell .primary[data-supplier-product-batch-action=publish] { background:#007f8d; color:#fff; }
.shell .primary[data-supplier-product-import]:hover,.shell .primary[data-supplier-product-listing]:hover { background:#006c78; }
.shell .ghost { border-color:var(--line-strong); color:#24465e; background:#fff; }
.shell .ghost:hover { border-color:#93b6e0; background:#f4f8ff; }
.shell .danger { border:1px solid #efc6c5; background:#fff5f4; color:var(--red); }
.shell .mini { min-height:30px; padding:5px 9px; border-radius:5px; border-color:var(--line-strong); color:#284e68; background:#fff; font-size:12px; font-weight:550; line-height:1.4; box-shadow:none; }
.shell .mini:hover { border-color:#91b8ec; background:#f2f7ff; }
.shell .mini.danger-mini { color:var(--red); border-color:#efd5d3; }
.shell input,.shell select,.shell textarea { min-height:38px; border-color:var(--line-strong); border-radius:5px; padding:8px 10px; font-size:13px; line-height:1.5; color:var(--ink); background:#fff; }
.shell input:focus,.shell select:focus,.shell textarea:focus { border-color:var(--brand-blue); box-shadow:0 0 0 3px rgba(22,117,232,.12); }
.shell input[type=checkbox] { width:16px; height:16px; min-height:16px; padding:0; accent-color:var(--brand-blue); }
.shell th { padding:12px 10px; background:#f8fafd; color:#667c91; font-size:12px; font-weight:600; }
.shell td { padding:12px 10px; font-size:13px; font-weight:400; line-height:1.6; color:#254459; }
.shell tbody tr:hover { background:#f7faff; }
.shell tbody tr.selected,.shell tbody tr.multi-selected { background:#edf5ff; }
.shell .badge { padding:4px 8px; font-size:11px; font-weight:550; line-height:1.5; }
.shell .detail { top:calc(var(--shell-header-height,72px) + 20px); }
.shell .detail-head { padding:16px 18px; }
.shell .detail-head h2 { font-size:18px; line-height:1.5; font-weight:650; }
.shell .detail-body { padding:14px 16px; max-height:calc(100svh - var(--shell-header-height,72px) - 210px); }
.shell .detail .tabs { padding:0 14px; gap:12px; }
.shell .detail .tabs button { min-height:42px; padding:10px 0; border-bottom:2px solid transparent; border-radius:0; color:var(--muted); background:transparent; font-size:13px; font-weight:550; }
.shell .detail .tabs button.active { color:var(--brand-blue); border-bottom-color:var(--brand-blue); background:transparent; }
.shell .next-step-card,.shell .product-entry-rules { border-color:#c5ddfb; background:#f3f8ff; color:var(--ink); }
.shell .next-step-card strong,.shell .product-entry-rules strong { color:#155c9f; }
.shell .next-step-card p { color:var(--muted); font-size:12px; }
.shell .product-price-links,.shell .product-profile-card { border-color:var(--line); background:#fafcfe; }
.shell .product-price-links { padding:12px; }
.shell .product-profile-fields { gap:8px; }
.shell .product-profile-fields span,.shell .product-image-slot span { font-size:11px; }
.shell .field-row { border-color:var(--line); }
.shell .field-row span { font-size:12px; }
.shell .field-row strong { font-size:13px; font-weight:550; }
.shell .association-link[data-association-state=linked] { border-color:#bdd8f8; background:#f1f7ff; color:#1566c0; }
/* One control contains both the operator and its editable value(s). */
.shell .column-condition-filter { width:144px; min-width:144px; gap:7px; }
.shell .column-condition-filter[data-column-filter-group=name] { width:180px; min-width:180px; }
.shell .column-condition-filter > span { font-size:12px; font-weight:550; }
.shell .column-filter-search { display:flex; align-items:stretch; width:100%; min-width:0; height:36px; overflow:hidden; border:1px solid var(--line-strong); border-radius:5px; background:#fff; }
.shell .column-filter-search:focus-within { border-color:var(--brand-blue); box-shadow:0 0 0 2px rgba(22,117,232,.12); }
.shell .column-condition-filter .column-filter-search > select { flex:0 0 70px; width:70px; min-width:70px; max-width:70px; min-height:0; height:34px; margin:0; padding:4px 4px 4px 9px; border:0; border-right:1px solid var(--line); border-radius:0; background-color:#fff; color:#365a78; font-size:12px; font-weight:500; outline:0; box-shadow:none; }
.shell .column-filter-values { flex:1 1 0; min-width:0; display:flex; }
.shell .column-condition-filter .column-filter-values input { flex:1 1 0; width:100%; min-width:0; max-width:none; height:34px; min-height:0; margin:0; padding:6px 8px; border:0; border-radius:0; background:#fff; font-size:12px; font-weight:400; line-height:1.5; outline:0; box-shadow:none; }
.shell .column-condition-filter.numeric-filter { width:230px; min-width:230px; }
.shell .column-filter-range { flex:1 1 0; display:flex; align-items:center; width:100%; min-width:0; gap:0; }
.shell .column-filter-range > span { flex:0 0 14px; text-align:center; font-size:11px; font-weight:400; color:#7b8fa3; }
.shell .column-condition-filter .column-filter-range input { width:0; min-width:0; text-align:left; padding-inline:7px; }
.shell .column-condition-filter input:disabled { color:#91a0ae; background:#f7f9fc; opacity:1; }
.shell .column-filter-search:has([aria-invalid=true]) { border-color:#cc7470; }
.shell .column-filter-error { max-width:230px; font-size:11px; line-height:1.5; }
.shell .column-filter-label:focus-within { background:transparent; }
/* Shared form and overlay surfaces. Wide import dialogs keep their own widths. */
.shell .modal-backdrop { background:rgba(16,45,64,.38); backdrop-filter:blur(2px); }
.shell .modal { border-color:var(--line); border-radius:10px; padding:20px; background:#fff; box-shadow:0 18px 70px rgba(16,45,64,.18); scroll-padding-block:50px 100px; }
.shell form.modal[data-form] { width:min(820px,calc(100vw - 40px)); max-height:calc(100svh - 78px); }
.shell .modal-close { position:sticky; top:0; float:right; z-index:5; margin:0 0 0 12px; padding:4px 0 4px 10px; min-height:28px; color:#5d7489; background:#fff; font-size:13px; }
.shell .modal h2 { color:var(--ink); font-size:20px; line-height:1.5; font-weight:650; }
.shell .modal > p { margin:8px 0 16px; color:var(--muted); font-size:13px; line-height:1.65; }
.shell .modal fieldset { padding:18px; border-color:var(--line); border-radius:8px; }
.shell .modal legend { padding:0 7px; color:var(--ink); font-size:16px; font-weight:650; }
.shell .modal label { gap:7px; font-size:13px; }
.shell .modal .form-grid { gap:16px; }
.shell .modal-actions { position:sticky; bottom:-20px; z-index:4; margin:20px -20px -20px; padding:14px 20px; border-color:var(--line); background:#fff; box-shadow:0 -8px 16px rgba(255,255,255,.94); }
.shell .modal input,.shell .modal textarea,.shell .modal select { scroll-margin-block:50px 100px; }
.shell .product-gallery-editor,.shell .product-gallery-uploader,.shell .product-entry-rules { border-color:var(--line); border-radius:8px; }
.shell .product-entry-rules { border-color:#c5ddfb; background:#f3f8ff; }
.shell .searchable-select-trigger { min-height:38px; border-color:var(--line-strong); border-radius:5px; padding:8px 10px; font-size:13px; font-weight:400; }
.searchable-select-trigger[aria-expanded=true] { border-color:var(--brand-blue); outline-color:rgba(22,117,232,.15); }
.searchable-select-popup { border-color:#cbdcf0; box-shadow:0 12px 36px rgba(16,45,64,.15); }
.searchable-select-option:hover,.searchable-select-option.active { background:#edf5ff; }
.searchable-select-option[aria-selected=true] { color:var(--brand-blue); }
.operation-feedback { border-color:var(--line); border-radius:10px; color:var(--ink); box-shadow:0 18px 60px rgba(16,45,64,.2); }
.operation-feedback::backdrop { background:rgba(16,45,64,.35); }
.operation-feedback button { border-color:var(--brand-blue); background:var(--brand-blue); }
.operation-feedback button:focus-visible { outline-color:#a4cafa; }
.operation-feedback progress { accent-color:var(--brand-blue); }
.shell .decision-cockpit { --dc-bg:#f4f7fb; --dc-bg-raised:#fff; --dc-line:#dfe7ef; --dc-text:#102d40; --dc-muted:#64788f; --dc-teal:#1675e8; --dc-blue:#16b9bd; --dc-amber:#9b651d; --dc-coral:#bc4747; background:#f4f7fb; color:#102d40; }
.shell .dc-commandbar,.shell .dc-insights,.shell .dc-river-zone,.shell .dc-forecast,.shell .dc-health-zone,.shell .dc-action-desk { border-color:var(--line); border-radius:8px; background:#fff; }
.shell .dc-command-actions button { border-color:var(--line-strong); color:var(--ink); background:#fff; }
.shell .dc-command-actions .return-system { background:var(--brand-blue); border-color:var(--brand-blue); color:#fff; }
.shell .dc-action-list button:hover,.shell .dc-scenes button.active { background:#edf5ff; }
.shell .metric,.shell .cockpit-metric { background:#fff; border-color:var(--line); box-shadow:none; }
.shell .metric strong { color:var(--ink); font-size:26px; font-weight:650; }
.shell .metric span,.shell .metric em { font-size:12px; }
.shell .chart-bar-track { background:#edf2f8; }
.shell .member-home-hero,.shell .cockpit-hero { border-color:#cbdcf0; }
/* User-requested compact, top-aligned login form. */
.platform-login-screen,.platform-login-screen .login-visual { min-height:100svh; }
.platform-login-panel { flex-direction:column; justify-content:flex-start; align-items:center; gap:clamp(24px,4vh,48px); min-height:100svh; padding:26px clamp(30px,3.4vw,64px); }
body:has(.platform-login-screen) > .icp-footer { display:none; }
.login-values { position:relative; width:100%; max-width:350px; margin:0 auto; padding:0; border:0; }
.login-values-image { display:block; width:100%; height:auto; object-fit:contain; }
.login-panel-bottom { width:100%; max-width:350px; margin-top:auto; display:flex; flex-direction:column; align-items:center; gap:14px; }
.login-legal-footer { margin-top:0; display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; justify-content:center; flex-shrink:0; gap:10px 18px; width:calc(100% + 28px); max-width:calc(100% + 28px); background:transparent; color:#64788f; font-size:11px; line-height:1.6; }
.login-legal-footer a { display:inline-flex; align-items:center; justify-content:center; gap:7px; max-width:100%; color:inherit; text-decoration:none; }
.login-legal-footer a:hover { color:#1675e8; text-decoration:underline; }
.login-legal-footer a:focus-visible { outline:2px solid #1675e8; outline-offset:5px; }
.login-legal-footer svg,.login-legal-footer img { flex-shrink:0; object-fit:contain; }
.login-legal-footer span { white-space:nowrap; }
.login-logo { width:144px; margin:0 auto 44px; }
.platform-login-panel h1 { margin-bottom:22px; }
.platform-login-panel .login-method-tabs { margin-bottom:24px; }
@media(max-width:1260px){
  .shell .topbar { grid-template-columns:minmax(190px,1fr) max-content minmax(150px,1fr); gap:10px 18px; padding:10px 18px; }
  .shell .top-actions { grid-column:1/-1; justify-content:flex-end; }
  .shell .app-body { grid-template-columns:196px minmax(0,1fr); }
  .shell .main { padding:18px; }
  .shell .workspace { grid-template-columns:minmax(0,1fr) 300px; }
  .shell .nav-item { gap:10px; padding-inline:13px; }
}
@media(max-width:1180px){
  .shell .workspace { grid-template-columns:minmax(0,1fr); }
  .shell .detail { position:static; }
  .shell .detail-body { max-height:none; }
}
@media(max-width:760px){
  .platform-login-screen { display:block; min-height:100svh; background:#fff; }
  .platform-login-screen .login-visual { display:none; }
  .platform-login-panel { min-height:100svh; padding:20px 26px 24px; gap:28px; }
  .login-legal-footer { column-gap:12px; font-size:10px; }
  .login-legal-footer svg { width:15px; height:15px; }
  .login-legal-footer img { width:15px; height:17px; }
  .login-logo { width:144px; margin-bottom:36px; }
  .login-values { max-width:310px; }
  .platform-login-panel h1 { margin-bottom:18px; }
  .shell .topbar { grid-template-columns:minmax(0,1fr) max-content; padding:10px 14px; gap:9px 12px; }
  .shell .brand-logo-icon { width:36px; height:36px; }
  .shell .brand strong { font-size:16px; }
  .shell .brand span { font-size:9px; }
  .shell .top-context,.shell .top-control { grid-column:1/-1; }
  .shell .top-actions { justify-content:flex-start; gap:7px; }
  .shell .account-chip { max-width:100%; overflow:hidden; text-overflow:ellipsis; }
  .shell .app-body { display:block; }
  .shell .sidebar { position:static; height:auto; min-height:0; padding:9px 10px; border-radius:0; }
  .shell .sidebar::before,.shell .sidebar::after { display:none; }
  .shell .nav-group { display:flex; gap:6px; overflow-x:auto; }
  .shell .nav-item { flex:0 0 auto; width:auto; min-height:40px; padding:9px 12px; gap:7px; }
  .shell .nav-item span { font-size:12px; white-space:nowrap; }
  .nav-icon { flex-basis:16px; width:16px; height:16px; }
  .shell .main,.shell.cockpit-focus .main { min-height:0; padding:14px; }
  .shell .subnav { padding:12px; margin-bottom:14px; }
  .shell .subnav > div:first-child { flex-wrap:wrap; }
  .shell .subnav-tabs button { padding:9px 12px; }
  .shell .page-head h1 { font-size:22px; }
  .shell .role-summary { grid-template-columns:minmax(0,1fr); padding:14px; }
  .shell .filter-panel { grid-template-columns:minmax(0,1fr); padding:12px; }
  .shell .filter-panel button { justify-self:start; }
  .shell .action-bar { padding:12px; }
  .shell .action-bar .record-count { width:100%; margin-left:0; }
  .shell .modal { padding:18px; }
  .shell form.modal[data-form] { width:calc(100vw - 24px); max-height:calc(100svh - 54px); }
  .shell .modal fieldset { padding:14px; }
  .shell .modal .form-grid { grid-template-columns:minmax(0,1fr); }
  .shell .modal-actions { bottom:-18px; margin:18px -18px -18px; padding:12px 18px; }
}
@media(prefers-reduced-motion:reduce){
  .shell * { scroll-behavior:auto; transition:none!important; }
}

@media(max-height:800px) and (min-width:761px) {
  .platform-login-panel { gap:22px; }
  .platform-login-panel { padding-top:18px; padding-bottom:18px; gap:18px; }
  .login-logo { width:130px; margin-bottom:28px; }
  .login-values { max-width:280px; }
  .platform-login-panel h1 { margin-bottom:16px; }
  .platform-login-panel .login-method-tabs { margin-bottom:18px; }
  .platform-login-panel .login-form { gap:16px; }
}
