
      :root{
        --paper:#F3F1EA;
        --surface:#FFFFFF;
        --surface-2:#FAF8F3;
        --ink:#17150F;
        --ink-2:#3D3A31;
        --muted:#7C7666;
        --faint:#A79E8B;
        --line:#E4DFD1;
        --line-strong:#CFC8B4;
        --brass:#A87F2D;
        --brass-strong:#8A6719;
        --brass-soft:#F1E7CE;
        --side:#161510;
        --side-2:#201E17;
        --side-line:#2E2B21;
        --side-text:#CFC9B8;
        --side-dim:#8B8574;
        --green:#1E7A4C; --green-bg:#E3F1E8;
        --amber:#A96E0B; --amber-bg:#F7ECD4;
        --red:#B3372B;   --red-bg:#F9E6E2;
        --blue:#3E5F8A;  --blue-bg:#E5EBF3;
        --shadow:0 1px 2px rgba(23,21,15,.05),0 10px 30px -14px rgba(23,21,15,.16);
        --shadow-lg:0 24px 70px -18px rgba(23,21,15,.35);
        --r-card:12px; --r-sm:8px;
      }
      @media (prefers-color-scheme: dark){
        :root{
          --paper:#12110D;
          --surface:#1D1C16;
          --surface-2:#23221B;
          --ink:#EFEAD9;
          --ink-2:#CFC9B8;
          --muted:#9A937E;
          --faint:#6E6858;
          --line:#33301F;
          --line-strong:#454126;
          --brass:#C9A24B;
          --brass-strong:#DDBB63;
          --brass-soft:#33301E;
          --green:#4FBF85; --green-bg:#1C2E24;
          --amber:#E0A83E; --amber-bg:#33290F;
          --red:#E07A6C;   --red-bg:#37201C;
          --blue:#8FA9CC;  --blue-bg:#1F2938;
          --shadow:0 1px 2px rgba(0,0,0,.4),0 10px 30px -14px rgba(0,0,0,.5);
          --shadow-lg:0 24px 70px -18px rgba(0,0,0,.7);
        }
      }
      *{box-sizing:border-box}
      html,body{height:100%}
      body{
        margin:0;background:var(--paper);color:var(--ink);
        font-family:"Manrope","PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
        font-size:14px;line-height:1.55;-webkit-font-smoothing:antialiased;
      }
      .serif{font-family:"Fraunces","Songti SC","STSong",serif}
      .num{font-variant-numeric:tabular-nums lining-nums}
      button{font:inherit;cursor:pointer}
      input,select{font:inherit;color:inherit}
      a{color:var(--brass-strong)}
      ::selection{background:var(--brass-soft)}

      /* ============ LOGIN ============ */
      #loginView{display:none;min-height:100dvh;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}
      body[data-view="login"] #loginView{display:grid}
      body[data-view="login"] #appView{display:none}
      .login-brand{
        background:var(--side);color:#EFEAD9;position:relative;overflow:hidden;
        padding:56px 60px;display:flex;flex-direction:column;justify-content:space-between;gap:40px;
      }
      .login-brand::after{
        content:"";position:absolute;inset:0;pointer-events:none;opacity:.5;
        background:
          radial-gradient(560px 380px at 85% -10%,rgba(201,162,75,.20),transparent 60%),
          radial-gradient(700px 500px at -20% 110%,rgba(201,162,75,.10),transparent 60%);
      }
      .brand-top{position:relative;z-index:1;display:flex;align-items:center;gap:12px}
      .brand-mark{
        width:38px;height:38px;border:1px solid rgba(201,162,75,.65);border-radius:9px;
        display:grid;place-items:center;color:#C9A24B;font-weight:800;letter-spacing:.06em;font-size:13px;
      }
      .brand-name{font-weight:800;letter-spacing:.14em;font-size:15px}
      .brand-sub{color:var(--side-dim);font-size:12px;letter-spacing:.08em}
      .login-hero{position:relative;z-index:1;max-width:520px}
      .login-hero h1{
        font-family:"Fraunces","Songti SC","STSong",serif;font-weight:600;
        font-size:clamp(38px,4.4vw,58px);line-height:1.16;margin:0 0 20px;letter-spacing:.01em;
      }
      .login-hero h1 em{font-style:normal;color:#C9A24B}
      .login-hero p{color:#B9B29E;font-size:15px;margin:0;max-width:420px}
      .login-points{position:relative;z-index:1;display:grid;gap:14px;margin-top:38px}
      .login-points li{
        list-style:none;display:flex;gap:12px;align-items:flex-start;color:#D8D2BF;font-size:14px;
      }
      .login-points ul{margin:0;padding:0;display:grid;gap:14px}
      .lp-ico{
        flex:none;width:22px;height:22px;border-radius:50%;border:1px solid rgba(201,162,75,.55);
        display:grid;place-items:center;color:#C9A24B;margin-top:1px;
      }
      .login-stats{
        position:relative;z-index:1;display:flex;gap:44px;border-top:1px solid var(--side-line);padding-top:26px;flex-wrap:wrap;
      }
      .login-stats .n{font-family:"Fraunces",serif;font-size:30px;font-weight:600;color:#EFEAD9}
      .login-stats .l{color:var(--side-dim);font-size:12px;letter-spacing:.1em;margin-top:2px}
      .login-form-wrap{display:flex;align-items:center;justify-content:center;padding:48px 32px}
      .login-card{width:100%;max-width:400px}
      .login-card h2{font-size:24px;margin:0 0 6px;font-weight:800;letter-spacing:.01em}
      .login-card .sub{color:var(--muted);margin:0 0 30px;font-size:13.5px}
      .field{margin-bottom:18px}
      .field label{display:block;font-size:12.5px;font-weight:700;letter-spacing:.06em;color:var(--ink-2);margin-bottom:7px}
      .field .ctl{
        display:flex;align-items:center;gap:10px;background:var(--surface);
        border:1px solid var(--line-strong);border-radius:10px;padding:0 14px;height:48px;
        transition:border-color .15s, box-shadow .15s;
      }
      .field .ctl:focus-within{border-color:var(--brass);box-shadow:0 0 0 3px var(--brass-soft)}
      .field .ctl svg{color:var(--faint);flex:none}
      .field input{border:0;outline:0;background:transparent;flex:1;height:100%;font-size:15px;min-width:0}
      .field .eye{border:0;background:none;color:var(--faint);padding:4px;display:grid;place-items:center}
      .login-row{display:flex;justify-content:space-between;align-items:center;margin:4px 0 22px;font-size:13px}
      .login-row a{text-decoration:none;font-weight:600}
      .seg-plat{display:flex;background:var(--surface-2);border:1px solid var(--line);border-radius:10px;padding:3px;gap:3px}
      .seg-plat button{
        border:0;background:transparent;border-radius:7px;padding:6px 14px;font-size:13px;font-weight:700;color:var(--muted);
      }
      .seg-plat button.on{background:var(--ink);color:var(--paper)}
      .btn{
        border:1px solid transparent;border-radius:10px;padding:0 18px;height:42px;
        display:inline-flex;align-items:center;justify-content:center;gap:8px;
        font-weight:700;font-size:14px;background:var(--surface);color:var(--ink);
        border-color:var(--line-strong);transition:transform .08s, background .15s, border-color .15s;
        white-space:nowrap;
      }
      .btn:active{transform:translateY(1px)}
      .btn.primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
      .btn.primary:hover{background:#000}
      @media (prefers-color-scheme: dark){.btn.primary{background:var(--brass);border-color:var(--brass);color:#17150F}.btn.primary:hover{background:var(--brass-strong)}}
      .btn.brass{background:var(--brass);border-color:var(--brass);color:#fff}
      .btn.brass:hover{background:var(--brass-strong)}
      .btn.ghost{border-color:transparent;background:transparent;color:var(--ink-2)}
      .btn.ghost:hover{background:var(--surface-2)}
      .btn.danger-ghost{border-color:transparent;background:transparent;color:var(--red)}
      .btn.sm{height:34px;padding:0 13px;font-size:13px;border-radius:8px}
      .btn.big{height:50px;width:100%;font-size:15px;border-radius:11px}
      .btn[disabled]{opacity:.5;cursor:not-allowed}
      .login-foot{margin-top:26px;text-align:center;color:var(--faint);font-size:12px;letter-spacing:.05em}

      /* ============ APP SHELL ============ */
      #appView{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100dvh}
      .sidebar{
        background:var(--side);color:var(--side-text);position:sticky;top:0;height:100dvh;
        display:flex;flex-direction:column;padding:20px 14px 16px;overflow-y:auto;
      }
      .side-brand{display:flex;align-items:center;gap:11px;padding:2px 8px 18px;border-bottom:1px solid var(--side-line)}
      .side-brand .brand-mark{width:34px;height:34px;font-size:12px}
      .side-brand .brand-name{color:#EFEAD9;font-size:14px}
      .nav{padding:14px 0 6px;display:grid;gap:2px}
      .nav-group{font-size:11px;letter-spacing:.18em;color:var(--side-dim);padding:14px 10px 6px;font-weight:700}
      .nav-item{
        display:flex;align-items:center;gap:11px;padding:9px 10px;border-radius:8px;border:0;width:100%;
        background:transparent;color:var(--side-text);font-size:13.5px;font-weight:600;text-align:left;position:relative;
      }
      .nav-item svg{color:var(--side-dim);flex:none}
      .nav-item:hover{background:var(--side-2);color:#EFEAD9}
      .nav-item.on{background:var(--side-2);color:#EFEAD9}
      .nav-item.on::before{
        content:"";position:absolute;left:-14px;top:8px;bottom:8px;width:3px;border-radius:2px;background:#C9A24B;
      }
      .nav-item.on svg{color:#C9A24B}
      .nav-item .cnt{
        margin-left:auto;font-size:11px;font-weight:800;background:#33301E;color:#C9A24B;
        border-radius:99px;padding:1px 7px;font-variant-numeric:tabular-nums;
      }
      .nav-item .cnt.red{background:#3A201B;color:#EE9A8E}
      .side-foot{margin-top:auto;display:grid;gap:12px}
      .sync-card{
        background:var(--side-2);border:1px solid var(--side-line);border-radius:10px;padding:12px 13px;font-size:12px;
      }
      .sync-card .row{display:flex;align-items:center;gap:8px;color:#D8D2BF;font-weight:700;font-size:12.5px}
      .dot{width:8px;height:8px;border-radius:50%;flex:none}
      .dot.g{background:#4FBF85}.dot.a{background:#E0A83E}.dot.r{background:#E07A6C}.dot.b{background:#8FA9CC}
      .sync-card p{margin:6px 0 0;color:var(--side-dim);line-height:1.5}
      .user-card{display:flex;align-items:center;gap:10px;padding:8px;border-top:1px solid var(--side-line)}
      .avatar{
        width:34px;height:34px;border-radius:50%;background:var(--brass);color:#17150F;
        display:grid;place-items:center;font-weight:800;font-size:13px;flex:none;
      }
      .user-card .nm{color:#EFEAD9;font-weight:700;font-size:13px;line-height:1.3}
      .user-card .rl{color:var(--side-dim);font-size:11.5px}
      .user-card button{margin-left:auto;background:none;border:0;color:var(--side-dim);display:grid;place-items:center;padding:6px}

      .main-col{min-width:0;display:flex;flex-direction:column}
      .topbar{
        position:sticky;top:0;z-index:30;background:color-mix(in srgb,var(--paper) 88%,transparent);
        backdrop-filter:blur(10px);border-bottom:1px solid var(--line);
        display:flex;align-items:center;gap:16px;padding:14px 28px;
      }
      .topbar h1{font-size:19px;margin:0;font-weight:800;letter-spacing:.01em;white-space:nowrap}
      .topbar .crumb{color:var(--faint);font-size:12.5px;white-space:nowrap}
      .search{
        margin-left:auto;display:flex;align-items:center;gap:9px;background:var(--surface);
        border:1px solid var(--line);border-radius:10px;height:40px;padding:0 13px;width:min(320px,34vw);
      }
      .search svg{color:var(--faint);flex:none}
      .search input{border:0;outline:0;background:transparent;flex:1;font-size:13.5px;min-width:0}
      .icon-btn{
        width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:var(--surface);
        display:grid;place-items:center;color:var(--ink-2);position:relative;flex:none;
      }
      .icon-btn .bdg{
        position:absolute;top:-5px;right:-5px;background:var(--red);color:#fff;font-size:10px;font-weight:800;
        border-radius:99px;padding:0 5px;height:16px;display:grid;place-items:center;
      }
      .content{padding:26px 28px 90px;display:grid;gap:22px;max-width:1460px;width:100%;margin:0 auto}
      .page{display:none;gap:22px}
      .page.on{display:grid}

      /* ============ CARDS / PANELS ============ */
      .panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow)}
      .panel-h{
        display:flex;align-items:center;gap:12px;padding:16px 20px 0;flex-wrap:wrap;
      }
      .panel-h h3{margin:0;font-size:15px;font-weight:800}
      .panel-h .hint{color:var(--muted);font-size:12.5px}
      .panel-h .sp{margin-left:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
      .panel-b{padding:16px 20px 20px}

      .kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
      .kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow);padding:18px 20px 16px;position:relative;overflow:hidden}
      .kpi::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--line-strong)}
      .kpi.gold::before{background:var(--brass)}
      .kpi.red::before{background:var(--red)}
      .kpi .lb{font-size:12px;letter-spacing:.12em;color:var(--muted);font-weight:700}
      .kpi .v{font-family:"Fraunces",serif;font-size:34px;font-weight:600;line-height:1.15;margin-top:4px}
      .kpi .v small{font-size:16px;color:var(--muted);font-family:"Manrope",sans-serif;font-weight:700}
      .kpi .d{font-size:12.5px;margin-top:5px;color:var(--muted)}
      .up{color:var(--green);font-weight:800}.down{color:var(--red);font-weight:800}
      button.kpi{text-align:left;font:inherit;width:100%;cursor:pointer;transition:border-color .15s, transform .12s}
      button.kpi:hover{border-color:var(--brass);transform:translateY(-1px)}
      button.kpi .go-hint{position:absolute;top:14px;right:16px;color:var(--faint);font-size:12px;font-weight:700}
      button.shop-row{background:none;border:0;border-bottom:1px dashed var(--line);width:100%;font:inherit;cursor:pointer;text-align:left}
      button.shop-row:hover{background:var(--surface-2)}
      button.todo{background:none;border:0;border-bottom:1px dashed var(--line);width:100%;font:inherit;cursor:pointer;text-align:left}
      button.todo:hover{background:var(--surface-2)}
      /* order image hover preview */
      #imgPreview{position:fixed;z-index:80;width:220px;height:220px;border-radius:12px;overflow:hidden;border:1px solid var(--line-strong);box-shadow:var(--shadow-lg);background:var(--surface);display:none;pointer-events:none}
      #imgPreview img{width:100%;height:100%;object-fit:cover;display:block}
      #imgPreview .cap{position:absolute;left:0;right:0;bottom:0;background:rgba(18,16,10,.72);color:#fff;font-size:11.5px;padding:5px 9px}
      .thumb{cursor:zoom-in}
      /* order detail drawer */
      .drawer-back{position:fixed;inset:0;background:rgba(18,16,10,.55);backdrop-filter:blur(3px);display:none;z-index:70}
      .drawer-back.open{display:block}
      .drawer{position:absolute;top:0;right:0;bottom:0;width:min(520px,100vw);background:var(--paper);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;overflow:hidden}
      .drawer-h{display:flex;align-items:center;gap:12px;padding:16px 20px;background:var(--surface);border-bottom:1px solid var(--line);flex-wrap:wrap}
      .drawer-h h3{margin:0;font-size:16px;font-weight:800}
      .drawer-b{overflow-y:auto;padding:18px 20px;display:grid;gap:18px;align-content:start}
      .detail-media{border-radius:12px;overflow:hidden;border:1px solid var(--line);aspect-ratio:16/9;background:var(--surface-2);cursor:zoom-in;position:relative}
      .detail-media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
      .detail-media:hover img{transform:scale(1.75)}
      .detail-media .zoom-hint{position:absolute;right:10px;bottom:10px;background:rgba(18,16,10,.72);color:#fff;font-size:11.5px;border-radius:99px;padding:3px 9px;pointer-events:none}
      .spec-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
      .spec{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:11px 13px}
      .spec .l{font-size:11px;letter-spacing:.09em;color:var(--muted);font-weight:700}
      .spec .v{font-weight:800;font-size:14.5px;margin-top:2px}
      .edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
      .edit-grid .bt-field .in{width:100%}
      .drawer-f{border-top:1px solid var(--line);background:var(--surface);padding:14px 20px;display:flex;gap:10px;flex-wrap:wrap;align-items:center}
      .timeline{display:grid;gap:0}
      .timeline .tl{display:flex;gap:11px;padding:8px 2px;border-bottom:1px dashed var(--line);font-size:13px;align-items:flex-start}
      .timeline .tl:last-child{border-bottom:0}
      .timeline .tl .tm{margin-left:auto;color:var(--faint);font-size:12px;white-space:nowrap}

      .alert-row{
        display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:var(--surface-2);
        border:1px solid var(--line);border-radius:10px;padding:13px 16px;
      }
      .alert-row:hover{border-color:var(--line-strong)}
      .alert-row .t{font-weight:700}
      .alert-row .s{color:var(--muted);font-size:12.5px}
      .alert-row .n{margin-left:auto;font-family:"Fraunces",serif;font-size:24px;font-weight:600}
      .alert-row .go{color:var(--faint)}
      .alerts{display:grid;gap:10px}

      .shop-row{display:flex;align-items:center;gap:11px;padding:10px 2px;border-bottom:1px dashed var(--line)}
      .shop-row:last-child{border-bottom:0}
      .plat{
        font-size:10.5px;font-weight:800;letter-spacing:.05em;border-radius:5px;padding:2px 6px;flex:none;
      }
      .plat.oz{background:var(--blue-bg);color:var(--blue)}
      .plat.wb{background:#F3E2EE;color:#9C3B7E}
      @media (prefers-color-scheme: dark){.plat.wb{background:#33202C;color:#D48FC0}}
      .shop-row .nm{font-weight:700;font-size:13.5px}
      .shop-row .mt{margin-left:auto;text-align:right;font-size:12px;color:var(--muted)}
      .shop-row .mt b{color:var(--ink);font-size:13px}

      .todo{display:flex;gap:11px;padding:10px 2px;border-bottom:1px dashed var(--line);align-items:flex-start}
      .todo:last-child{border-bottom:0}
      .todo .tx{font-size:13.5px}
      .todo .tx b{font-weight:700}
      .todo .tm{color:var(--faint);font-size:12px;white-space:nowrap;margin-left:auto;padding-top:2px}

      /* ============ TABLES ============ */
      .tabs{display:flex;gap:4px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:0 12px}
      .tab{
        border:0;background:transparent;padding:11px 13px;font-size:13.5px;font-weight:700;color:var(--muted);
        border-bottom:2px solid transparent;margin-bottom:-1px;display:inline-flex;gap:7px;align-items:center;
      }
      .tab:hover{color:var(--ink)}
      .tab.on{color:var(--ink);border-bottom-color:var(--brass)}
      .tab .c{font-size:11.5px;background:var(--surface-2);border:1px solid var(--line);border-radius:99px;padding:0 7px;font-weight:800}
      .tab.on .c{background:var(--brass-soft);border-color:transparent;color:var(--brass-strong)}
      .toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;padding:14px 20px 4px}
      .toolbar .search{margin-left:0;width:250px;height:38px}
      .sel{
        height:38px;border:1px solid var(--line-strong);background:var(--surface);border-radius:9px;
        padding:0 10px;font-size:13px;font-weight:600;
      }
      .tbl-wrap{overflow-x:hidden;padding:6px 8px 0}
      table{width:100%;border-collapse:collapse;font-size:13.5px}
      th{
        text-align:left;font-size:11.5px;letter-spacing:.09em;color:var(--muted);font-weight:700;
        padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;
      }
      td{padding:12px;border-bottom:1px solid var(--line);vertical-align:middle}
      tbody tr{transition:background .1s}
      tbody tr:hover{background:var(--surface-2)}
      tbody tr:last-child td{border-bottom:0}
      .cell-main{font-weight:700}
      .cell-sub{color:var(--muted);font-size:12px;margin-top:1px}
      .thumb{
        width:44px;height:44px;border-radius:8px;object-fit:cover;border:1px solid var(--line);flex:none;background:var(--surface-2);
      }
      .prod-cell{display:flex;gap:12px;align-items:center;min-width:0}
      .prod-cell .tx{min-width:0}
      .prod-cell .nm{font-weight:700;white-space:normal;line-height:1.35}
      .pill{
        display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800;border-radius:99px;padding:3px 10px;white-space:nowrap;
      }
      .pill::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
      .pill.g{background:var(--green-bg);color:var(--green)}
      .pill.a{background:var(--amber-bg);color:var(--amber)}
      .pill.r{background:var(--red-bg);color:var(--red)}
      .pill.b{background:var(--blue-bg);color:var(--blue)}
      .pill.n{background:var(--surface-2);color:var(--muted);border:1px solid var(--line)}
      .money{font-weight:800}
      .profit-pos{color:var(--green);font-weight:800}
      .profit-neg{color:var(--red);font-weight:800}
      .mini-bar{height:6px;border-radius:99px;background:var(--surface-2);border:1px solid var(--line);overflow:hidden;width:110px}
      .mini-bar i{display:block;height:100%;background:var(--brass);border-radius:99px}
      .row-actions{display:flex;gap:2px;justify-content:flex-end}
      .pager{
        display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:14px 20px 18px;color:var(--muted);font-size:13px;
      }
      .pager .sp{flex:1}
      .pager .pg-btn{
        width:32px;height:32px;border-radius:8px;border:1px solid var(--line-strong);background:var(--surface);
        display:grid;place-items:center;color:var(--ink-2);
      }
      .pager .pg-btn[disabled]{opacity:.4;cursor:not-allowed}
      .pager input.jump{
        width:52px;height:32px;border:1px solid var(--line-strong);border-radius:8px;text-align:center;background:var(--surface);
      }
      .pager select{height:32px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);padding:0 6px}

      /* ============ SYNC (style only · logic by Codex) ============ */
      .sync-bar{
        display:flex;align-items:center;gap:12px;flex-wrap:wrap;
        padding:12px 20px;margin:14px 20px 0;background:var(--surface-2);
        border:1px solid var(--line);border-radius:10px;
      }
      .sync-bar .grp{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
      .sync-bar .sp{flex:1}
      .sync-updated{font-size:12.5px;color:var(--muted);white-space:nowrap}
      .sync-updated b{color:var(--ink-2);font-weight:800}
      .switch{
        display:inline-flex;align-items:center;gap:8px;border:0;background:transparent;padding:2px 0;
        font-size:13px;font-weight:700;color:var(--ink-2);
      }
      .switch .tk{
        width:38px;height:22px;border-radius:99px;background:var(--line-strong);position:relative;flex:none;transition:background .15s;
      }
      .switch .tk::after{
        content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:var(--surface);
        box-shadow:0 1px 3px rgba(23,21,15,.28);transition:left .15s;
      }
      .switch.on .tk{background:var(--brass)}
      .switch.on .tk::after{left:19px}
      .switch .st{color:var(--muted);font-size:12px;font-weight:800;min-width:14px}
      .switch.on .st{color:var(--brass-strong)}
      /* auto-sync lives in the sticky top bar — visible on every page */
      .top-auto{
        display:inline-flex;align-items:center;gap:10px;height:40px;padding:0 12px;flex:none;
        background:var(--surface);border:1px solid var(--line);border-radius:10px;
      }
      .top-auto .switch{white-space:nowrap}
      .top-auto .top-updated{border-left:1px solid var(--line);padding-left:10px}
      @media (max-width:1420px){
        .topbar .crumb{display:none}
        .top-auto .top-updated{display:none}
      }
      @media (max-width:1180px){
        .topbar{gap:10px;padding:12px 18px}
        .topbar .search{width:min(220px,24vw)}
      }
      .menu-wrap{position:relative}
      .menu{
        position:absolute;top:calc(100% + 6px);right:0;z-index:45;min-width:236px;display:none;
        background:var(--surface);border:1px solid var(--line-strong);border-radius:11px;box-shadow:var(--shadow-lg);padding:6px;
      }
      .menu.open{display:block}
      .menu button{
        display:flex;align-items:center;gap:10px;width:100%;border:0;background:transparent;border-radius:8px;
        padding:9px 10px;font-size:13.5px;font-weight:600;color:var(--ink);text-align:left;
      }
      .menu button:hover{background:var(--surface-2)}
      .menu button svg{color:var(--faint);flex:none}
      .menu button .d{display:block;font-size:12px;color:var(--muted);font-weight:500;margin-top:1px}
      .menu button[disabled]{opacity:.45;cursor:not-allowed}
      .menu .sep{height:1px;background:var(--line);margin:5px 4px}
      .spin{animation:spin 0.9s linear infinite}
      @keyframes spin{to{transform:rotate(360deg)}}
      table input[type="checkbox"].row-ck{accent-color:var(--brass);width:15px;height:15px;cursor:pointer}
      /* task monitor panel */
      .task-back{position:fixed;inset:0;background:rgba(18,16,10,.55);backdrop-filter:blur(3px);display:none;z-index:75}
      .task-back.open{display:block}
      .task-panel{position:absolute;top:0;right:0;bottom:0;width:min(440px,100vw);background:var(--paper);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;overflow:hidden}
      .task-h{display:flex;align-items:center;gap:12px;padding:16px 20px;background:var(--surface);border-bottom:1px solid var(--line);flex-wrap:wrap}
      .task-h h3{margin:0;font-size:16px;font-weight:800}
      .task-b{overflow-y:auto;padding:16px 20px;display:grid;gap:12px;align-content:start}
      .task-item{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:13px 15px;display:grid;gap:8px}
      .task-item .r1{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
      .task-item .nm{font-weight:800;font-size:13.5px}
      .task-item .tm{margin-left:auto;color:var(--faint);font-size:12px;white-space:nowrap}
      .task-item .dt{color:var(--muted);font-size:12.5px}
      .task-track{height:7px;border-radius:99px;background:var(--surface-2);border:1px solid var(--line);overflow:hidden}
      .task-track i{display:block;height:100%;width:0;background:var(--brass);border-radius:99px;transition:width .3s}
      .task-f{border-top:1px solid var(--line);background:var(--surface);padding:13px 20px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:12.5px}
      .dash-sync{
        display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:var(--surface);
        border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow);padding:14px 20px;
      }
      .dash-sync .t{font-weight:800;font-size:14.5px}
      .dash-sync .s{color:var(--muted);font-size:12.5px}

      /* ============ PRODUCT POOL ============ */
      .pool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
      .p-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column}
      .p-card.sel{border-color:var(--brass);box-shadow:0 0 0 1px var(--brass),var(--shadow)}
      .p-media{position:relative;aspect-ratio:4/3;background:var(--surface-2)}
      .p-media img{width:100%;height:100%;object-fit:cover;display:block}
      .p-check{
        position:absolute;top:10px;left:10px;width:26px;height:26px;border-radius:8px;border:1px solid var(--line-strong);
        background:var(--surface);display:grid;place-items:center;color:transparent;padding:0;
      }
      .p-card.sel .p-check{background:var(--brass);border-color:var(--brass);color:#fff}
      .p-src{position:absolute;top:10px;right:10px;display:flex;gap:6px}
      .p-body{padding:14px 16px 16px;display:grid;gap:10px;flex:1}
      .p-title{font-weight:700;line-height:1.4;font-size:14px}
      .p-stats{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;text-align:left}
      .p-stats .v{font-weight:800;font-size:15px}
      .p-stats .l{font-size:11px;color:var(--muted);letter-spacing:.05em}
      .p-profit{
        display:flex;align-items:center;gap:8px;background:var(--surface-2);border:1px solid var(--line);
        border-radius:9px;padding:9px 12px;font-size:12.5px;
      }
      .p-profit .big{margin-left:auto;font-weight:800;font-size:14px}
      .p-actions{display:flex;gap:8px;margin-top:auto}
      .p-actions .btn{flex:1}
      .batch-bar{
        display:none;align-items:center;gap:14px;flex-wrap:wrap;background:var(--ink);color:var(--paper);
        border-radius:var(--r-card);padding:13px 18px;
      }
      .batch-bar.show{display:flex}
      .batch-bar .track{flex:1;min-width:140px;height:8px;border-radius:99px;background:rgba(255,255,255,.18);overflow:hidden}
      .batch-bar .track i{display:block;height:100%;width:0;background:#C9A24B;border-radius:99px;transition:width .25s}
      @media (prefers-color-scheme: dark){.batch-bar{background:var(--surface-2);color:var(--ink);border:1px solid var(--line)}}

      /* ============ LISTING LONG PAGE ============ */
      .listing-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
      .listing-top .crumb-path{color:var(--muted);font-size:13px}
      .listing-top .crumb-path b{color:var(--ink)}
      .listing-prod{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
      .listing-prod .thumb{width:52px;height:52px}
      .listing-prod h3{margin:0;font-size:16.5px;font-weight:800}
      .listing-prod .sub{color:var(--muted);font-size:12.5px}
      .listing-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}
      .listing-main{display:grid;gap:22px;min-width:0}
      .lst-sec{scroll-margin-top:96px}
      .lst-form{display:grid;grid-template-columns:1fr 1fr;gap:16px 18px}
      .lst-form .full{grid-column:1 / -1}
      .ms-group h4{margin:0 0 9px;font-size:11.5px;letter-spacing:.14em;color:var(--muted);font-weight:800}
      .ms-group .sel{width:100%}
      .ms-group .in{
        height:38px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface);
        padding:0 10px;font-size:13px;width:100%;font-weight:600;
      }
      .ms-group textarea.in{height:auto;min-height:76px;padding:9px 10px;resize:vertical;font:inherit}
      .shop-pick{display:grid;gap:7px}
      .shop-pick label{
        display:flex;align-items:center;gap:9px;background:var(--surface);border:1px solid var(--line);
        border-radius:9px;padding:8px 10px;font-size:13px;font-weight:600;cursor:pointer;
      }
      .shop-pick label:has(input:checked){border-color:var(--brass);background:var(--brass-soft)}
      .shop-pick input{accent-color:var(--brass);width:15px;height:15px}
      .listing-side{position:sticky;top:96px;display:grid;gap:16px;min-width:0}
      .ready-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
      .ready-head .pct{font-family:"Fraunces",serif;font-size:30px;font-weight:600;line-height:1}
      .ready-track{height:8px;border-radius:99px;background:var(--surface-2);border:1px solid var(--line);overflow:hidden;margin-top:10px}
      .ready-track i{display:block;height:100%;background:var(--brass);border-radius:99px;transition:width .3s}
      .check-list{display:grid;gap:2px;margin-top:6px}
      .check-item{display:flex;align-items:center;gap:9px;padding:9px 2px;border-bottom:1px dashed var(--line);font-size:13px}
      .check-item:last-child{border-bottom:0}
      .check-item .tx{min-width:0}
      .check-item .tx .d{color:var(--muted);font-size:12px}
      .check-item .btn{margin-left:auto;flex:none}
      .anchor-nav{display:grid;gap:2px}
      .anchor-nav button{
        display:flex;align-items:center;gap:9px;border:0;background:transparent;border-radius:8px;
        padding:9px 10px;font-size:13.5px;font-weight:700;color:var(--ink-2);text-align:left;width:100%;
      }
      .anchor-nav button:hover{background:var(--surface-2);color:var(--ink)}
      .anchor-nav button .no{
        width:20px;height:20px;border-radius:50%;border:1px solid var(--line-strong);flex:none;
        display:grid;place-items:center;font-size:11px;font-weight:800;color:var(--muted);
      }
      .listing-bottom{
        position:sticky;bottom:14px;z-index:25;background:var(--surface);border:1px solid var(--line-strong);
        border-radius:var(--r-card);box-shadow:var(--shadow-lg);padding:13px 18px;
        display:flex;align-items:center;gap:12px;flex-wrap:wrap;
      }
      .batch-tools{
        display:flex;gap:10px;flex-wrap:wrap;align-items:end;padding:14px 18px;border-bottom:1px solid var(--line);background:var(--surface-2);
      }
      .bt-field{display:grid;gap:5px}
      .bt-field label{font-size:11px;font-weight:800;letter-spacing:.08em;color:var(--muted)}
      .bt-field .in{
        height:36px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);
        padding:0 10px;font-size:13px;width:104px;font-weight:600;
      }
      .bt-field .in.wide{width:150px}
      .sku-scroll{overflow:visible}
      .sku-scroll table{font-size:13px}
      .sku-scroll td{padding:8px 12px}
      .sku-scroll .in{
        width:86px;height:32px;border:1px solid var(--line);border-radius:7px;padding:0 8px;background:var(--surface);font-weight:600;
      }
      .sku-scroll .in:focus{border-color:var(--brass);outline:2px solid var(--brass-soft)}
      .sku-scroll input[type="checkbox"]{accent-color:var(--brass);width:15px;height:15px}
      /* product management: price / stock are values — click opens a small popup */
      .val-btn{
        border:1px solid transparent;background:transparent;border-radius:8px;padding:6px 9px;margin:-6px -9px;
        font-weight:800;font-size:13.5px;color:var(--ink);display:inline-flex;align-items:center;gap:7px;cursor:pointer;
      }
      .val-btn:hover{border-color:var(--brass);background:var(--brass-soft)}
      .val-btn .edit-ico{color:var(--brass-strong);opacity:0;transition:opacity .12s}
      .val-btn:hover .edit-ico{opacity:1}
      .val-btn .hint-under{display:block;font-size:11px;font-weight:700;color:var(--faint);letter-spacing:.02em}
      /* small edit popup (price / stock) */
      .mini-back{position:fixed;inset:0;background:rgba(18,16,10,.45);backdrop-filter:blur(2px);display:none;place-items:center;z-index:85;padding:16px}
      .mini-back.open{display:grid}
      .mini-modal{background:var(--surface);border:1px solid var(--line-strong);border-radius:14px;box-shadow:var(--shadow-lg);width:min(380px,100%);overflow:hidden}
      .mini-h{padding:16px 18px 0;display:flex;align-items:flex-start;gap:10px}
      .mini-h h3{margin:0;font-size:15.5px;font-weight:800}
      .mini-h .sub{color:var(--muted);font-size:12.5px;margin-top:2px}
      .mini-b{padding:14px 18px 18px;display:grid;gap:12px}
      .mini-b .bt-field .in{width:100%;height:40px;font-size:14px}
      .mini-f{display:flex;gap:8px;justify-content:flex-end;padding:0 18px 16px}
      .order-act{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
      .save-bar{
        display:none;align-items:center;gap:14px;flex-wrap:wrap;background:var(--ink);color:var(--paper);
        border-radius:var(--r-card);padding:13px 18px;font-size:13.5px;
      }
      .save-bar.show{display:flex}
      @media (prefers-color-scheme: dark){.save-bar{background:var(--surface-2);color:var(--ink);border:1px solid var(--line)}}
      .submit-prog{display:none;align-items:center;gap:12px;flex:1;min-width:200px}
      .submit-prog.show{display:flex}
      .submit-prog .track{flex:1;height:8px;border-radius:99px;background:var(--surface-2);border:1px solid var(--line);overflow:hidden}
      .submit-prog .track i{display:block;height:100%;width:0;background:var(--brass);transition:width .3s}

      .toast{
        position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);opacity:0;pointer-events:none;
        background:var(--ink);color:var(--paper);border-radius:10px;padding:11px 18px;font-size:13.5px;font-weight:600;
        transition:.25s;z-index:90;box-shadow:var(--shadow-lg);max-width:min(92vw,560px);text-align:center;
      }
      .toast.show{transform:translate(-50%,0);opacity:1}

      .tabbar{display:none}
      body[data-view="login"] .tabbar{display:none !important}

      /* ============ ONE FUNCTION PER TAB ============ */
      .ship-pane{display:none}
      .ship-pane.on{display:grid}
      .ship-row{display:flex;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px dashed var(--line);flex-wrap:wrap}
      .ship-row:last-child{border-bottom:0}
      .ship-row .tx{min-width:0}
      .ship-row .act{margin-left:auto;display:flex;gap:8px}
      /* listing long page: SKU packaging cells */
      .pack-cell{display:flex;align-items:center;gap:4px;white-space:nowrap}
      .pack-cell .in{width:46px;padding:0 6px;text-align:center}
      .pack-cell .sep{color:var(--faint);font-size:12px}
      .sku-scroll .in.wgt{width:64px}
      .batch-tools .bt-sep{width:1px;align-self:stretch;background:var(--line);margin:2px}
      /* product management: price & stock side by side, each opens the small popup */
      /* Ozon follows MY: price index + margin columns · WB follows BCS: per-variant price/stock groups */
      .idx-note{display:block;font-size:11px;color:var(--faint);font-weight:700;margin-top:2px;white-space:nowrap}
      .wb-group{border-top:1px solid var(--line);padding:4px 20px 16px}
      .wb-group:first-child{border-top:0}
      .wb-head{display:flex;gap:12px;align-items:center;padding:12px 0 8px;flex-wrap:wrap}
      .wb-head .tx{min-width:0}
      .wb-head .nm{font-weight:800;line-height:1.35}
      .wb-head .sub{color:var(--muted);font-size:12px;margin-top:1px}
      .wb-head .acts{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
      .wb-vars{width:100%;border-collapse:collapse;font-size:13px}
      .wb-vars th{text-align:left;font-size:11.5px;letter-spacing:.09em;color:var(--muted);font-weight:700;padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
      .wb-vars td{padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
      .wb-vars tbody tr:last-child td{border-bottom:0}
      .wb-vars tbody tr:hover{background:var(--surface-2)}
      .wb-batch{
        display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 20px 0;
        padding:11px 14px;background:var(--surface-2);border:1px solid var(--line);border-radius:10px;font-size:13px;
      }
      .wb-batch .lb{font-weight:800}
      .wb-batch .hint2{color:var(--muted);font-size:12.5px}
      .retention-strip{
        display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 20px 0;
        padding:11px 14px;background:var(--surface-2);border:1px solid var(--line);border-radius:10px;font-size:13px;
      }
      .retention-strip b{font-weight:800}
      .retention-strip .hint2{color:var(--muted);font-size:12.5px}
      .decided-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 22px}
      .decided-grid .di{display:flex;gap:10px;align-items:flex-start;font-size:13.5px;padding:7px 0;border-bottom:1px dashed var(--line)}
      .decided-grid .di .dot{margin-top:7px}
      .decided-grid .di b{font-weight:800}
      .decided-grid .di span{color:var(--muted)}
      @media (max-width:900px){.decided-grid{grid-template-columns:1fr}.wb-head .acts{margin-left:0}}
      /* style guide (Muse's scope: look & feel only) */
      .sw-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
      .sw{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface)}
      .sw i{display:block;height:46px;border-bottom:1px solid var(--line)}
      .sw .tx{padding:9px 11px;font-size:12px;color:var(--muted)}
      .sw .tx b{display:block;color:var(--ink);font-size:13px}
      .type-row{display:flex;align-items:baseline;gap:16px;padding:10px 0;border-bottom:1px dashed var(--line);flex-wrap:wrap}
      .type-row:last-child{border-bottom:0}
      .type-row .tag{width:118px;flex:none;font-size:11.5px;color:var(--muted);letter-spacing:.08em;font-weight:700}
      .duty-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
      .duty{border:1px solid var(--line);border-radius:10px;padding:14px 16px;background:var(--surface-2)}
      .duty h4{margin:0 0 8px;font-size:13.5px}
      .duty ul{margin:0;padding-left:18px;color:var(--muted);font-size:13px;display:grid;gap:4px}
      @media (max-width:900px){.sw-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.duty-grid{grid-template-columns:1fr}}

      /* ============ RESPONSIVE ============ */
      @media (max-width:1180px){
        .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
        .pool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
        .dash-2col{grid-template-columns:1fr !important}
      }
      @media (max-width:900px){
        #loginView{grid-template-columns:1fr}
        .login-brand{padding:30px 26px 26px;gap:20px}
        .login-hero h1{font-size:32px;margin-bottom:12px}
        .login-points{display:none}
        .login-stats{display:none}
        .login-form-wrap{padding:30px 22px 44px}
        #appView{grid-template-columns:1fr}
        .sidebar{display:none}
        .content{padding:18px 14px 96px}
        .topbar{padding:12px 14px;flex-wrap:wrap}
        .topbar .crumb{display:none}
        .top-auto{height:38px;padding:0 10px}
        .search{order:3;width:100%;margin-left:0}
        .col-opt{display:none}
        .listing-layout{grid-template-columns:1fr}
        .listing-side{position:static;order:-1}
        .lst-form{grid-template-columns:1fr}
        .listing-bottom{bottom:76px}
        .tabbar{
          display:grid;grid-template-columns:repeat(6,1fr);position:fixed;left:0;right:0;bottom:0;z-index:50;
          background:var(--surface);border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));
        }
        .tabbar button{
          border:0;background:transparent;display:grid;justify-items:center;gap:2px;font-size:11px;font-weight:700;color:var(--muted);padding:4px 0;
        }
        .tabbar button.on{color:var(--brass-strong)}
      }
      @media (max-width:560px){
        .kpis{grid-template-columns:1fr 1fr;gap:10px}
        .kpi .v{font-size:26px}
        .pool-grid{grid-template-columns:1fr}
        .login-stats{gap:26px}
      }
      @media (prefers-reduced-motion: reduce){
        *{transition:none !important}
      }
    
.topbar{height:auto;min-height:72px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}.topbar .seg-plat,.topbar .top-auto,.topbar [data-open-tasks]{flex-shrink:0}.seg-plat button{white-space:nowrap}@media(max-width:1500px){.topbar .crumb{display:none}}.topbar .search{min-width:120px;flex:1 1 180px}
html body .pv-style-0{background:var(--brass-soft);color:var(--brass-strong);border-radius:99px;padding:0 7px;font-size:11.5px;font-weight:800}
html body .pv-style-1{color:var(--brass-strong)}
html body .pv-style-2{flex:1}
html body .pv-style-3{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:22px}
html body .pv-style-4{display:grid;gap:22px;align-content:start}
html body .pv-style-5{font-weight:800}
html body .pv-style-6{display:grid;gap:22px;align-content:start}
html body .pv-style-7{padding-top:8px}
html body .pv-style-8{padding-top:8px}
html body .pv-style-9{margin-top:6px}
html body .pv-style-10{margin-top:6px}
html body .pv-style-11{margin-top:6px}
html body .pv-style-12{margin-top:6px}
html body .pv-style-13{padding-bottom:2px}
html body .pv-style-14{width:100%;color:var(--muted);font-size:12.5px}
html body .pv-style-15{width:34px}
html body .pv-style-16{text-align:right}
html body .pv-style-17{color:var(--ink)}
html body .pv-style-18{padding:16px 20px}
html body .pv-style-19{margin-left:auto;color:var(--muted);font-size:13px}
html body .pv-style-20{color:var(--ink)}
html body .pv-style-21{font-weight:700}
html body .pv-style-22{background:transparent;color:inherit;border-color:currentColor}
html body .pv-style-23{padding-bottom:2px}
html body .pv-style-24{width:100%;color:var(--muted);font-size:12.5px}
html body .pv-style-25{text-align:right}
html body .pv-style-26{display:none}
html body .pv-style-27{color:var(--ink)}
html body .pv-style-28{padding-bottom:2px}
html body .pv-style-29{text-align:right}
html body .pv-style-30{color:var(--ink)}
html body .pv-style-31{flex:1}
html body .pv-style-32{text-align:right}
html body .pv-style-33{color:var(--ink)}
html body .pv-style-34{color:var(--muted)}
html body .pv-style-35{color:var(--muted)}
html body .pv-style-36{color:var(--muted)}
html body .pv-style-37{color:var(--muted)}
html body .pv-style-38{color:var(--muted)}
html body .pv-style-39{color:var(--muted)}
html body .pv-style-40{color:var(--muted)}
html body .pv-style-41{color:var(--muted)}
html body .pv-style-42{color:var(--muted)}
html body .pv-style-43{background:#F3F1EA}
html body .pv-style-44{background:#FFFFFF}
html body .pv-style-45{background:#17150F}
html body .pv-style-46{background:#161510}
html body .pv-style-47{background:#A87F2D}
html body .pv-style-48{background:#1E7A4C}
html body .pv-style-49{background:#A96E0B}
html body .pv-style-50{background:#B3372B}
html body .pv-style-51{padding-top:6px}
html body .pv-style-52{font-size:19px;font-weight:800}
html body .pv-style-53{color:var(--muted);font-size:12.5px}
html body .pv-style-54{font-size:30px;font-weight:600}
html body .pv-style-55{color:var(--muted);font-size:12.5px}
html body .pv-style-56{color:var(--muted);font-size:12.5px}
html body .pv-style-57{color:var(--muted);font-size:12.5px}
html body .pv-style-58{color:var(--muted);font-size:12.5px}
html body .pv-style-59{font-size:11.5px;letter-spacing:.09em;color:var(--muted);font-weight:700}
html body .pv-style-60{color:var(--muted);font-size:12.5px}
html body .pv-style-61{display:grid;gap:18px}
html body .pv-style-62{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
html body .pv-style-63{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
html body .pv-style-64{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
html body .pv-style-65{margin-left:0;width:250px;height:38px}
html body .pv-style-66{color:var(--muted);font-size:12px;font-weight:700}
html body .pv-style-67{color:var(--muted);font-size:12.5px}
html body .pv-style-68{display:flex;gap:10px;flex-wrap:wrap;align-items:center;border-top:1px dashed var(--line);padding-top:16px}
html body .pv-style-69{color:var(--muted);font-size:12.5px}
html body .pv-style-70{padding-bottom:2px}
html body .pv-style-71{min-width:0}
html body .pv-style-72{font-size:12px;padding:4px 9px}
html body .pv-style-73{margin-left:auto}
html body .pv-style-74{margin-left:auto}
html body .pv-style-75{margin-left:auto}
html body .pv-style-76{margin-top:14px;border-top:1px solid var(--line);border-radius:0}
html body .pv-style-77{display:inline-flex;align-items:center;gap:4px}
html body .pv-style-78{width:58px}
html body .pv-style-79{color:var(--faint)}
html body .pv-style-80{width:58px}
html body .pv-style-81{color:var(--faint)}
html body .pv-style-82{width:58px}
html body .pv-style-83{width:84px}
html body .pv-style-84{width:34px}
html body .pv-style-85{padding-top:16px}
html body .pv-style-86{margin:0;font-size:15px;font-weight:800}
html body .pv-style-87{margin-left:auto}
html body .pv-style-88{color:var(--muted);font-size:12.5px;margin-top:2px}
html body .pv-style-89{width:83%}
html body .pv-style-90{padding-top:16px}
html body .pv-style-91{margin:0 0 10px;font-size:15px;font-weight:800}
html body .pv-style-92{color:var(--muted);font-size:13px}
html body .pv-style-93{color:var(--ink)}
html body .pv-style-94{flex:1}
html body .pv-style-95{color:var(--muted);font-size:12.5px}
html body .pv-style-96{margin-left:auto}
html body .pv-style-97{font-weight:800;font-size:15.5px;margin-top:12px}
html body .pv-style-98{color:var(--muted);font-size:12.5px}
html body .pv-style-99{font-size:11.5px;letter-spacing:.12em;color:var(--muted);font-weight:800;margin-bottom:9px}
html body .pv-style-100{font-size:11.5px;letter-spacing:.12em;color:var(--muted);font-weight:800;margin-bottom:9px}
html body .pv-style-101{font-size:13.5px}
html body .pv-style-102{font-size:13.5px}
html body .pv-style-103{font-size:13.5px}
html body .pv-style-104{font-size:13.5px}
html body .pv-style-105{font-size:11.5px;letter-spacing:.12em;color:var(--muted);font-weight:800;margin-bottom:9px}
html body .pv-style-106{display:flex;gap:9px;margin-top:12px;flex-wrap:wrap;align-items:center}
html body .pv-style-107{color:var(--muted);font-size:12.5px}
html body .pv-style-108{font-size:11.5px;letter-spacing:.12em;color:var(--muted);font-weight:800;margin-bottom:4px}
html body .pv-style-109{flex:1}
html body .pv-style-110{color:var(--muted);font-size:12.5px}
html body .pv-style-111{display:none}
html body .pv-style-112{min-width:0}
html body .pv-style-113{margin-left:auto;width:34px;height:34px}
html body .pv-style-114{display:grid;gap:12px}
html body .pv-style-115{display:none;gap:12px}
html body .pv-style-116{width:100%}
html body .pv-style-117{color:var(--muted);font-size:12.5px}
html body .pv-style-118{color:var(--muted);font-size:12.5px}
html body .pv-style-119{margin-left:auto}
html body .pv-style-120{width:62%}
html body .pv-style-121{flex:1}
.pv-banner{position:relative;z-index:100;display:flex;align-items:center;gap:14px;min-height:48px;padding:8px 16px;background:#faf8f3;color:#17150f;border-bottom:1px solid #cfc8b4;font:13px "Microsoft YaHei",sans-serif}.pv-banner span{flex:1;color:#635c4e}.pv-banner a,.pv-banner button{border:1px solid #cfc8b4;border-radius:6px;padding:7px 12px;color:#8a6719;background:#faf8f3;white-space:nowrap}.pv-banner~#appView .sidebar{top:48px}.pv-banner~#appView{min-height:calc(100dvh - 48px)}@media(max-width:700px){.pv-banner{flex-wrap:wrap;gap:8px}.pv-banner span{order:3;flex-basis:100%}}
/* Approved design layout; production behavior and bounded media. */
[hidden]{display:none!important}#nativeBridge{display:none}#appView{min-height:100vh}body{padding-top:0!important}
.topbar{gap:10px;position:sticky;top:0;z-index:40}.topbar .search{flex:1;min-width:140px}.topbar .seg-plat{flex:none}.top-auto{white-space:nowrap}.content{min-width:0}
.panel-h{gap:12px;flex-wrap:wrap}.panel-h h3{margin:0}.modern-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:14px 18px;border-bottom:1px solid var(--line)}
.modern-controls .search{min-width:180px;flex:1}.modern-controls input[type=search]{width:100%}.modern-actions{display:flex;gap:8px;align-items:center}.modern-controls label{display:flex;align-items:center;gap:6px}
.modern-platforms{margin-left:auto;display:flex;align-items:center;gap:10px;min-height:36px}.modern-platforms .seg-plat{flex:none}.modern-platforms select{max-width:230px}
.modern-status{font-size:12px;color:var(--muted);min-height:18px;padding:0 18px}.modern-status.error{color:#b32929}.modern-status:empty{display:none}
.modern-table{table-layout:auto;width:100%}.modern-table th,.modern-table td{vertical-align:middle!important;padding:12px 14px}.modern-table th{white-space:nowrap}.modern-table th button{background:none;border:0;color:inherit;font:inherit;cursor:pointer;padding:0}.modern-table tbody tr:hover{background:#f0f5f8!important}
.modern-table td.status-cell{min-width:90px;white-space:nowrap}.modern-table .amount{font-size:18px;font-weight:750;white-space:nowrap}.modern-table small{display:block;font-size:12px;color:var(--muted);margin-top:4px;max-width:330px;overflow-wrap:anywhere}
.product-cell{display:flex;align-items:center;gap:12px;min-width:230px;max-width:420px}.product-cell .name{font-weight:650;line-height:1.45}.product-cell a{color:inherit;text-decoration:none}.product-cell a:hover{text-decoration:underline}.product-cell img,.pool-image{object-fit:contain;background:white;border:1px solid #e4e0d7;border-radius:7px}.product-cell img{width:56px;height:64px;flex:none}.image-empty{width:56px;height:64px;background:#f1eee7;display:grid;place-items:center;font-size:11px;color:#888;flex:none}
.row-actions{display:flex;gap:8px;flex-wrap:wrap;min-width:100px}.row-actions button{white-space:nowrap}.spec{max-width:260px;line-height:1.5}.pool-image{width:100%;height:190px}.p-card{min-width:0}.p-card .p-info{padding:12px}.pool-grid{padding:18px}.p-card .modern-actions{padding:12px;border-top:1px solid var(--line)}
.modern-empty{padding:40px;text-align:center;color:var(--muted)}.modern-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:18px 0}.modern-metric{background:white;border:1px solid #ded8ca;border-radius:10px;padding:20px;text-align:left;cursor:pointer}.modern-metric .value{display:block;font-size:30px;font-weight:700;margin:12px 0;overflow-wrap:anywhere}.modern-metric .label{font-size:13px;color:#7a7466}
#modernNotice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#17150f;color:#fff;border-radius:10px;padding:12px 18px;z-index:100000;max-width:85vw}#modernNotice:empty{display:none}
#modernDrawer .drawer{width:min(680px,95vw)}#modernDrawer .drawer-b{overflow:auto;padding:20px}#modernDrawer .drawer-h{padding:18px;display:flex;justify-content:space-between;border-bottom:1px solid #ddd8cc}.detail-image{width:100%;height:270px;object-fit:contain;background:white;border:1px solid #e3ded1;border-radius:10px}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.detail-field{border:1px solid #ddd8cc;border-radius:8px;padding:12px;background:white}.detail-field small{display:block;color:#847c6b}.detail-field b{display:block;margin-top:5px}.event{padding:12px 0;border-bottom:1px solid #ded8cc}.event small{display:block;color:#827968}
#modernImage{position:fixed;z-index:100000;max-width:min(520px,85vw);max-height:80vh;left:50%;top:50%;transform:translate(-50%,-50%);padding:8px;background:white;border:1px solid #ddd;box-shadow:0 10px 45px #0004;border-radius:9px}#modernImage img{display:block;max-width:100%;max-height:72vh;object-fit:contain}#modernImage button{position:absolute;right:8px;top:8px}
#editor{width:min(1100px,94vw);max-height:90vh;border:1px solid #ded8cc;border-radius:12px;background:#f7f5ef;padding:0;color:#17150f}#editor::backdrop{background:#17150f66}#editorContent{padding:20px}.dialogCloseBar{display:flex;justify-content:flex-end;padding:10px 18px;border-bottom:1px solid #ded8cc}.dialogCloseBar button{border:1px solid #d4ccba;background:white;border-radius:7px;padding:8px 12px}#nativeContent{min-width:0}
.modern-login{max-width:400px;margin:12vh auto;padding:30px;background:white;border:1px solid #d6cdb9;border-radius:12px}.modern-login label{display:block;margin:16px 0}.modern-login input{display:block;width:100%;margin-top:6px}.modern-login .error{color:#b32929}.pluginUpdateDialog{width:min(440px,92vw);border:1px solid #d6cdb9;border-radius:12px;padding:24px;background:#fff}.pluginUpdateDialog::backdrop{background:#17150f55}.pluginUpdateDialog .toolbar{display:flex;gap:8px;flex-wrap:wrap}.pluginUpdateDialog button,.pluginUpdateDialog a{padding:9px 12px;border:1px solid #d6cdb9;border-radius:7px;background:white;color:#17150f;text-decoration:none}
@media(max-width:1000px){.modern-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar{position:relative}.topbar .search{max-width:none}.modern-platforms{width:100%;justify-content:flex-end}.tbl-wrap{overflow:auto}}
@media(max-width:640px){.modern-controls{padding:10px}.modern-metrics{gap:8px}.modern-metric{padding:12px}.modern-metric .value{font-size:23px}.modern-platforms select{max-width:170px}.topbar .top-auto{display:none}.detail-grid{grid-template-columns:1fr}}

#editor button,#nativeContent button{font-size:13px;border:1px solid #d1c6af;border-radius:7px;padding:8px 12px;background:#fff;color:#17150f;box-shadow:none}#editor button.primary,#nativeContent button.primary{background:#a87f2d;color:white;border-color:#a87f2d}#editor input,#editor select,#editor textarea,#nativeContent input,#nativeContent select{border:1px solid #d6cdbb;border-radius:7px;min-height:34px;font-size:13px;background:white;color:#17150f}#editor .card,#nativeContent .card{border-color:#ddd6c8;background:white;border-radius:10px}#modernProfit label,#modernTransfer label{display:block;margin:14px 0}#modernProfit input{width:100%;margin-top:6px}.modern-gallery .mediaThumb{max-width:160px}.modern-gallery{padding:16px}

#page-editor #editor{display:block;position:static;width:100%;max-width:none;max-height:none;margin:0;border:0;background:transparent;box-shadow:none;overflow:visible}#page-editor #editorContent{padding:0}#page-editor .dialogCloseBar{justify-content:space-between;position:sticky;top:74px;z-index:5;background:#f3f1ea}#page-editor #editor .draftEditorNav{position:sticky;top:125px;background:#f3f1ea;z-index:4}#page-editor #editor .editorLayout{display:block}#page-editor #editor .sourcePanel{max-width:none}#page-editor #editor .bottomBar{position:sticky;bottom:0;background:white;border:1px solid #d8d0c0;padding:12px;z-index:5}#page-editor #editor .structuredDraftForm{overflow:visible;max-height:none}

body[data-view=loading] #appView{visibility:hidden}.login-card .error{color:#b32929}.login-card .sub,.login-hero p{max-width:38em}.login-hero h1{font-size:clamp(30px,4vw,58px)}

#appView .ozonActivityHead{display:flex;align-items:center;justify-content:space-between;gap:8px}#appView .ozonExitAction{border:1px solid #ded5c2;border-radius:6px;background:white;color:#6d521c;padding:3px 8px;white-space:nowrap}#appView .ozonOrderPromotion{padding:6px 0;border-bottom:1px solid #ece6d9}#appView .ozonOrderPromotion:last-child{border-bottom:0}#appView .ozonOrderPromotion small{font-size:11px;color:#8b8270}

#editor th button,#nativeContent th button{border:0;background:transparent;padding:0;color:inherit;font:inherit;border-radius:0}#page-editor .editorHead{display:none}#page-editor #editor .familySetup{margin:12px 0;padding:12px 0}#page-editor #editor .familyBulk{margin:12px 0;padding:12px 0}#page-editor #editor .familyTableWrap{max-height:none;overflow:visible}

@media(max-width:900px){#page-editor #editor .familyTableWrap{overflow:auto}}

/* Equal field tracks keep row contents centered without staggered input baselines. */
#page-editor #editor .familySkuTable td{vertical-align:middle!important;padding:12px 8px}
#page-editor #editor .familySkuTable label{display:flex;flex-direction:column;gap:4px;margin:0;font-size:11px;line-height:16px;min-width:0}
#page-editor #editor .familySkuTable input:not([type=checkbox]),#page-editor #editor .familySkuTable select{height:36px;min-height:36px;margin:0;width:100%}
#page-editor #editor .familyIdentity{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:10px;min-height:120px}
#page-editor #editor .familyIdentity .tableProductThumb,#page-editor #editor .familyIdentity .tableNoPhoto{float:none;margin:0;width:52px;height:64px;object-fit:contain}
#page-editor #editor .familyIdentityFields{display:grid;grid-template-rows:56px 56px;position:relative;min-height:120px;align-content:start}
#page-editor #editor .familySourceSku{position:absolute;bottom:-8px;left:0;font-size:10px;line-height:12px;color:#847c6b}
#page-editor #editor .familyPriceFields,#page-editor #editor .familyDimensions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:56px;gap:0 6px;min-height:120px;align-content:start}
#page-editor #editor .familyPriceFields>label:last-child{grid-column:1/-1}
#page-editor #editor .familyStockFields{display:grid;grid-template-rows:56px auto;align-content:start;min-height:120px;gap:0}
#page-editor #editor .familyBulk{align-items:flex-end;gap:10px}
#page-editor #editor .familyBulk>label{display:flex;flex-direction:column;gap:4px;margin:0}
#page-editor #editor .familyBulk>input,#page-editor #editor .familyBulk select,#page-editor #editor .familyBulk>button{height:36px;min-height:36px;margin:0}
#page-editor #editor .familyBulk>[data-family-count]{line-height:36px}

/* Page bodies use the approved dashboard/card/table structure, not the legacy view. */
.dash-period{display:flex;align-items:center;gap:6px;margin:14px 0}
.dash-sync>.sp,.dash-period>.sp{flex:1}
.dash-2col{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:22px;margin-top:22px}
.dash-main,.dash-side{display:grid;gap:22px;align-content:start;min-width:0}
.dash-shops{max-height:365px;overflow:auto}
.signed-card{display:grid;gap:8px;padding:18px 20px;text-align:left;cursor:pointer}
.signed-card strong{font-size:24px;color:var(--brass)}
.sales-chart{display:block;width:100%;height:auto;max-height:200px}
.sales-bar{fill:var(--brass)}.sales-bar:hover{fill:#c8a34e}
.sales-chart text{font-size:11px;fill:var(--muted)}.chart-axis{fill:none;stroke:var(--line-strong)}
.chart-currency{font-size:12px;color:var(--muted)}.chart-empty{display:grid;place-items:center;min-height:170px;color:var(--muted);font-size:13px}
.modern-head-switches{display:flex;justify-content:flex-end;align-items:center;gap:10px}
#appView .panel-h{min-height:64px;flex-wrap:nowrap}
#appView .toolbar{padding:14px 20px 10px;gap:10px}#appView .toolbar .search{flex:1;max-width:360px;min-width:180px}
#appView .toolbar input{min-width:0;width:100%}#appView .toolbar select{max-width:230px}
#appView .modern-controls{padding:8px 20px;border-bottom:0;gap:8px}
#appView .pager{padding:10px 20px;gap:8px;flex-wrap:wrap}
#appView .pager label{display:flex;align-items:center;gap:6px;white-space:nowrap}
#appView .pager select{height:32px;min-width:64px}
#appView .pager .pg-btn{white-space:nowrap;min-width:32px;font-size:20px;line-height:24px}
#appView .tbl-wrap{overflow:auto;padding:0 8px}
#appView .modern-table{width:100%;table-layout:auto;font-size:13px}
#appView .modern-table th,#appView .modern-table td{padding:12px 10px;vertical-align:middle!important;background:transparent;border-left:0;border-right:0}
#appView .modern-table th{font-size:12px;font-weight:700;background:var(--surface-2);text-align:center}
#appView .modern-table td:first-child,#appView .modern-table th:first-child{width:36px}
#appView .modern-table .product-cell{min-width:240px;max-width:390px;gap:10px}
#appView .modern-table .product-cell .name{font-size:13.5px;line-height:1.45;word-break:normal;overflow-wrap:anywhere}
#appView .modern-table small{font-size:11.5px;line-height:1.5;color:var(--muted)}
#appView .modern-table .amount{font-size:16px;font-weight:750}
#appView .modern-table .modern-actions>img{width:42px;height:50px;object-fit:contain;border:1px solid var(--line);border-radius:5px;background:var(--surface)}
#appView .modern-table .status-cell{min-width:78px;white-space:nowrap}
#appView .modern-table .row-actions{min-width:max-content;width:max-content;gap:6px;justify-content:center;flex-wrap:nowrap;margin-inline:auto}
#appView .modern-table .row-actions button{padding:6px 9px;font-size:12px}
#appView .order-time{min-width:135px;max-width:180px;overflow-wrap:anywhere}
#appView .modern-spec{min-width:150px;max-width:260px;background:none;border-radius:0;padding:12px 10px;line-height:1.5}
#appView .products-panel .product-cell{min-width:280px}
#appView .price-link,#appView .stock-link{border:0;background:transparent;color:var(--ink);font:inherit;font-weight:750;text-align:left;cursor:pointer;padding:4px 0;border-bottom:1px dashed var(--line-strong)}
#appView .pool-grid{padding:0;margin:18px 0;gap:16px}
#appView .p-media{aspect-ratio:4/3;overflow:hidden}#appView .p-media .pool-image{height:100%;width:100%;object-fit:contain;border:0;border-radius:0}
#appView .p-check{color:inherit;cursor:pointer}#appView .p-check input{margin:0;width:16px;height:16px}
#appView .p-title a{color:inherit;text-decoration:none}#appView .p-title a:hover{text-decoration:underline}
#appView .p-actions{flex-wrap:wrap}#appView .p-actions .btn{white-space:nowrap;padding:7px 8px;font-size:12px}
@media(max-width:1000px){.dash-2col{grid-template-columns:1fr}.modern-head-switches{flex-wrap:wrap}#appView .pool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){#appView .panel-h{flex-wrap:wrap}.dash-sync .sel{max-width:100%;width:100%}#appView .pool-grid{grid-template-columns:1fr}.dash-2col{gap:14px;margin-top:14px}.kpi .go-hint{display:none}#appView .toolbar{padding:10px}#appView .toolbar select{max-width:100%}.signed-card strong{font-size:21px}}

/* Counts belong to status tabs; list navigation shares the filter baseline. */
#appView .tab{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
#appView .tab-count{font-size:10px;line-height:1;align-self:flex-start;position:relative;top:-2px;color:#17150f;font-weight:700}
#appView .list-toolbar{display:flex;align-items:center;flex-wrap:wrap}
#appView .list-toolbar .inline-pager{margin-left:auto;padding:0;display:flex;align-items:center;flex:none;gap:8px}
#appView .inline-pager .sp{display:none}
#appView .list-toolbar .inline-pager select{height:36px}
#appView .list-toolbar .inline-pager label{margin:0}
#modernImage{width:min(600px,85vw);height:min(760px,80vh);box-sizing:border-box;display:flex;align-items:center;justify-content:center;max-width:85vw}
#modernImage img{width:100%;height:100%;max-height:100%;object-fit:contain}
@media(max-width:900px){#appView .list-toolbar .inline-pager{width:100%;justify-content:flex-end}}

#appView .orders-panel .product-cell .name{font-weight:400}
#appView .orders-panel .ordered-variant{font-weight:700;color:#17150f}
/* Fit the preview frame to the image rather than a white fixed-size canvas. */
#modernImage{width:max-content;height:max-content;max-width:85vw;max-height:80vh;padding:0;border:0;background:transparent;border-radius:0}
#modernImage img{width:auto;height:auto;max-width:min(600px,85vw);max-height:80vh;display:block}

#appView .orders-panel>.tabs{align-items:center;min-height:52px;padding-right:20px}
#appView .tab-actions{margin-left:auto;display:flex;align-items:center;padding:6px 0}
#appView .tab-actions .btn{white-space:nowrap}

#nativeContent .workspaceSyncStatus:empty{display:none}

/* Separate field names from their captured values without another line. */
#appView .ordered-variant .variant-field{display:inline}
#appView .ordered-variant .variant-label,.order-variant-detail small{font-weight:700;color:#17150f}
#appView .ordered-variant .variant-value,.order-variant-detail>b{font-weight:700;color:#245d88}
#appView .ordered-variant .variant-separator{font-weight:400;color:#827968;padding:0 2px}

#appView .image-retry{cursor:pointer;border:1px solid #e4e0d7;border-radius:7px;font-size:22px;color:#827968;padding:0}#appView .p-media>.image-retry{width:100%;height:100%}

/* Shared status controls use the same compact outlined shape as action buttons. */
#appView .tabs{gap:8px;padding-top:8px;padding-bottom:8px;align-items:center}
#appView .tab{border:1px solid var(--line-strong);border-radius:7px;background:var(--surface);padding:7px 12px;min-height:34px;margin-bottom:0;line-height:18px}
#appView .tab:hover{background:var(--surface-2)}
#appView .tab.on{border-color:var(--brass);background:var(--brass-soft);color:var(--ink)}
#appView .tab:focus-visible{outline:2px solid var(--brass);outline-offset:2px}

#editor.modern-small-dialog{width:min(560px,calc(100vw - 32px));max-height:85vh;border-radius:12px}
#editor.modern-small-dialog #editorContent{padding:18px 20px}
#editor.modern-small-dialog .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#editor.modern-small-dialog form>label{display:block;margin:10px 0}
#editor.modern-small-dialog input:not([type=checkbox]),#editor.modern-small-dialog select{width:100%;min-width:0}
#editor.modern-small-dialog h3{font-size:14px;margin:0 0 12px;font-weight:500}
#appView .retention-note{font-size:11px;color:var(--muted);margin:6px 20px 10px}
@media(max-width:600px){#editor.modern-small-dialog .grid{grid-template-columns:1fr}}

#appView .margin-filter{display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}#appView .margin-filter input{width:74px;height:36px}

#page-editor #editorContent:has(.listing-checklist){display:grid;grid-template-columns:minmax(0,1fr) 190px;column-gap:20px;align-items:start}
#page-editor #editorContent>.editorHead,#page-editor #editorContent>.draftEditorNav{grid-column:1/-1}
#page-editor #editorContent>form{grid-column:1;grid-row:2;min-width:0}
#page-editor .listing-checklist{grid-column:2;grid-row:2;position:sticky;top:96px;border:1px solid #d8d0c0;background:#fff;border-radius:10px;padding:14px}
#page-editor .listing-checklist h3{font-size:14px;margin:0 0 12px}
#page-editor .listing-checklist strong{display:block;font-size:28px;color:#856317}
#page-editor .listing-checklist small{display:block;color:#82775f;font-size:11px;margin-bottom:12px}
#page-editor .listing-checklist button{display:block;text-align:left;width:100%;margin-top:5px;white-space:normal}
#page-editor #editor .draftEditorSection{display:block;scroll-margin-top:145px}
#page-editor #editor .familyDetails[open]{min-width:0}
@media(max-width:1100px){#page-editor #editorContent:has(.listing-checklist){display:block}#page-editor .listing-checklist{position:static;margin:12px 0}#page-editor .listing-checklist [data-ready-links]{display:flex;flex-wrap:wrap;gap:6px}#page-editor .listing-checklist button{width:auto}}

#page-editor .familyLongSection{padding:12px 0;border-bottom:1px solid var(--line);scroll-margin-top:125px}
#page-editor .familyLongSection>h3{font-size:15px;margin:4px 0 12px}
#page-editor .familyOwnedFields{padding:10px 0;border-top:1px solid var(--line)}
#page-editor .familyOwnedFields h4{font-size:12px;margin:0 0 8px;font-weight:600}
#page-editor .familyOwnedFields>label{display:block;margin:8px 0;font-size:12px}
#page-editor .familyAttributeGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#page-editor #editor .familyTableWrap{max-height:none;overflow:visible}
#page-editor #editor .familySetup{padding:0 0 10px;margin-bottom:0}
#page-editor #editor .familyBulk{margin:0;padding:6px 0}
#page-editor .draftEditorNav{grid-row:2;grid-column:1/-1;position:sticky;top:72px;z-index:4;background:var(--paper)}
#page-editor #editorContent:has(.draftEditorNav)>form,#page-editor #editorContent:has(.draftEditorNav)>.listing-checklist{grid-row:3}
#page-editor .familyEditor>.bottomBar{position:sticky;bottom:0;background:var(--paper);z-index:3;padding:10px 0;border-top:1px solid var(--line)}
@media(max-width:1000px){#page-editor .familyAttributeGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){#page-editor .familyAttributeGrid{grid-template-columns:1fr}}

#appView .wb-family-heading td{background:var(--surface-2);font-size:12px;font-weight:600;padding:7px 10px}
#appView .wb-size-line{font-size:12px;margin:5px 0 0 68px;border-top:1px solid var(--line);padding-top:4px}
#appView .wb-size-line small{margin-top:2px;font-size:11px}

#page-editor .listing-checklist{width:auto;height:auto;min-height:0;left:auto;right:auto;bottom:auto;display:block;align-self:start;max-height:calc(100vh - 112px);overflow:auto;box-sizing:border-box}
#page-editor .listing-checklist h3{margin-top:0}

/* Shared table boundaries: explanatory text cannot escape into adjacent cells. */
#appView .modern-table td{overflow-wrap:anywhere;text-align:center}
#appView .modern-table .product-cell,#appView .modern-table .modern-spec{text-align:left}
#appView .modern-table .row-actions .btn.ghost{border-color:var(--line-strong);background:var(--surface);color:var(--ink)}
#appView .modern-table .order-weight-cell{min-width:70px}
#appView .order-weight{display:inline-block;white-space:nowrap;overflow-wrap:normal;word-break:normal}
#appView .modern-table td small{max-width:100%;white-space:normal;overflow-wrap:anywhere}
#appView .records-panel .record-status{white-space:normal;max-width:250px;width:20%}
#appView .record-summary{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#appView .retention-note{display:inline-block;margin:0 12px 8px;font-size:11px;color:var(--muted)}
#appView .ozonPriceIndex{display:inline-block;max-width:190px;white-space:normal;border-radius:5px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1.4}
#appView .ozonPriceIndex.indexGREEN,#appView .ozonPriceIndex.indexSUPER{color:#12834e;background:#e8f7ef}
#appView .ozonPriceIndex.indexYELLOW{color:#946600;background:#fff5d8}
#appView .ozonPriceIndex.indexRED{color:#d64444;background:#fff0f0}
#appView .ozonPriceIndex.indexNONE{color:#667085;background:#f1f3f7}

#appView #modernShop{width:210px;min-width:210px;max-width:210px;flex:0 0 210px}
#modernDrawer .modern-table{min-width:0;width:100%;table-layout:fixed}
#modernDrawer .modern-table td,#modernDrawer .modern-table th{overflow-wrap:anywhere;white-space:normal;padding:10px 6px;vertical-align:middle}
#modernDrawer .modern-table th:first-child{width:30px}
#modernDrawer .modern-table .product-cell{min-width:0;max-width:100%;gap:8px}
#modernDrawer .modern-table .product-cell>div{min-width:0}
#modernDrawer .modern-table .product-cell img{width:52px;height:64px;flex:0 0 52px;object-fit:contain}
#modernDrawer .modern-table .name{font-size:13px;overflow-wrap:anywhere}
#modernDrawer .sku-tools{display:flex;gap:8px;align-items:center;margin-bottom:10px}
#modernDrawer .sku-tools input{min-width:0;flex:1}
#modernDrawer .task-row{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid var(--line);align-items:center}
#modernDrawer .task-row>div{flex:1;min-width:0}
#modernDrawer .task-row small{display:block;margin-top:4px;overflow-wrap:anywhere}
#modernDrawer .task-history{margin-top:12px}

#nativeContent .auditFields{display:grid;grid-template-columns:80px minmax(0,1fr);gap:6px;font-size:12px}#nativeContent .auditFields dd{margin:0;overflow-wrap:anywhere}

#modernDrawer .sku-tools .in{height:36px;padding:7px 10px;border:1px solid var(--line);border-radius:7px;background:white;font-size:13px}

#modernImage{flex-direction:column}
#modernImage .preview-caption{align-self:stretch;text-align:center;background:var(--surface);color:var(--ink);font-size:14px;font-weight:700;line-height:1.5;padding:7px 10px;white-space:normal;max-width:600px;box-sizing:border-box}
#modernImage:has(.preview-caption:not([hidden])) img{max-height:calc(80vh - 48px)}
#appView .modern-table .order-weight-cell{white-space:nowrap;overflow-wrap:normal;word-break:normal}

#orderOglPanel .card{margin-bottom:10px;padding:12px}#orderOglPanel table{width:100%}

.parcel-scan{display:block;color:#166534;font-weight:700;margin-top:5px}.scan-controls{display:flex;flex-wrap:wrap;gap:8px}.scan-entry{padding:12px 0;border-bottom:1px solid #ddd8cc}.scan-entry p{margin:5px 0}

.orders-panel .status-cell .parcel-scan{white-space:nowrap;font-size:12px}

/* Scan filters share the shop selector's size, border and focus treatment. */
#appView .toolbar .parcel-scan-filter{width:140px;min-width:140px;max-width:140px;flex:0 0 140px;height:38px;font-weight:600}
#appView .toolbar .parcel-scan-day{width:150px;min-width:150px;max-width:150px;flex:0 0 150px;height:38px}

/* Product cards stay compact; size-level prices and stock remain available. */
#appView .products-panel .modern-product{align-items:center}
#appView .wb-product-sizes{margin:6px 0 0 68px;text-align:left;font-size:12px}
#appView .wb-product-sizes summary{cursor:pointer;color:var(--muted);width:max-content;max-width:100%}
#appView .wb-product-sizes .wb-size-list{max-height:240px;overflow:auto;margin-top:6px}
#appView .wb-product-sizes .wb-size-line{display:grid;grid-template-columns:minmax(70px,1fr) minmax(90px,1fr) minmax(100px,1fr);gap:10px;align-items:center;margin:0;padding:6px 0;text-align:left;font-size:12px}
#appView .wb-product-sizes .wb-size-line span{white-space:normal;overflow-wrap:anywhere}

#appView .draft-errors{white-space:normal;overflow-wrap:anywhere;color:#b42318;max-width:520px}
#appView .draft-errors p{margin:3px 0;font-size:12px}

/* Retain current-view geometry while a different scope is loading. */
.page.scope-pending{position:relative}
.scope-loading{position:absolute;z-index:5;top:0;left:50%;transform:translateX(-50%);pointer-events:none;padding:8px 12px;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:6px;margin-bottom:8px;font-size:12px}
.scope-pending .tbl-wrap,.scope-pending .pool-grid{opacity:.45;transition:opacity .12s}

/* Unified platform and delivery-mode selection. */
#appView .seg-plat button{border:1px solid transparent;padding:5px 13px}
#appView .seg-plat button.on{background:var(--brass-soft);border-color:var(--brass);color:var(--ink)}
#appView .seg-plat button:focus-visible{outline:2px solid var(--brass);outline-offset:2px}

/* Old counts belong to the previous scope until the fresh response arrives. */
.scope-pending .tab-count,.scope-pending .list-total{visibility:hidden}
.scope-pending .pager{opacity:.45}

/* WB price editor uses the approved page slots without replacing its commit flow. */
#appView #nativeContent .modern-wb-prices{display:block;padding:0;margin:0;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:visible;box-shadow:0 2px 4px #17150f08,0 10px 24px #17150f06}
#appView #nativeContent .modern-wb-prices .panel-h{display:flex;align-items:center;justify-content:space-between;padding:20px;min-height:68px;margin:0;border:0}
#appView #nativeContent .modern-wb-prices .seg-plat{display:flex;gap:2px;background:var(--bg);padding:3px;border:1px solid var(--line);border-radius:10px}
#appView #nativeContent .modern-wb-prices .seg-plat button{padding:5px 13px;min-height:32px;border:1px solid transparent;background:transparent;color:var(--muted);font-weight:700}
#appView #nativeContent .modern-wb-prices .seg-plat button.on{background:var(--brass-soft);border-color:var(--brass);color:var(--ink)}
#appView #nativeContent .modern-wb-prices .modern-price-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0;padding:0 20px 8px}
#appView #nativeContent .modern-wb-prices #opSearch{width:clamp(220px,25vw,360px);height:38px;max-width:100%}
#appView #nativeContent .modern-wb-prices .workspaceToolbarFields{display:flex;align-items:center;margin:0}
#appView #nativeContent .modern-wb-prices .globalShop{font-size:0;gap:0;margin:0}
#appView #nativeContent .modern-wb-prices #opShop{width:210px;min-width:210px;height:38px;font-size:13px;margin:0}
#appView #nativeContent .modern-wb-prices .workspaceToolbarActions{display:flex;align-items:center;margin:0;gap:8px}
#appView #nativeContent .modern-wb-prices .modern-price-pager{display:flex;align-items:center;gap:8px;margin:0 0 0 auto;padding:0;flex-wrap:nowrap;white-space:nowrap;font-size:12px}
#appView #nativeContent .modern-wb-prices .pagination button{min-height:32px;height:32px;padding:4px 9px;font-size:12px}
#appView #nativeContent .modern-wb-prices .pagination select{width:68px;height:34px;min-height:34px;font-size:12px;padding:4px 8px}
#appView #nativeContent .modern-wb-prices .pagination label{display:flex;align-items:center;gap:6px;margin:0}
#appView #nativeContent .modern-wb-prices .workspaceJump,#appView #nativeContent .modern-wb-prices [data-jump-go]{display:none}
#appView #nativeContent .modern-wb-prices .priceBatch{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0;padding:8px 20px 12px}
#appView #nativeContent .modern-wb-prices .priceBatch>button,#appView #nativeContent .modern-wb-prices .pricePopover>summary{height:34px;min-height:34px;padding:6px 12px;font-size:12px;border:1px solid var(--line);border-radius:7px;color:var(--ink);background:white;font-weight:600}
#appView #nativeContent .modern-wb-prices #opSavePrices{margin-left:auto;background:var(--brass);border-color:var(--brass);color:white}
#appView #nativeContent .modern-wb-prices #opFilterSummary{margin:0;padding:0 20px 6px;font-size:12px;color:var(--muted)}
#appView #nativeContent .modern-wb-prices .tbl-wrap{margin:0 8px;overflow:auto}
#appView #nativeContent .modern-wb-prices table{table-layout:fixed;min-width:1180px;width:100%;border-collapse:collapse}
#appView #nativeContent .modern-wb-prices table th{height:44px;background:#faf8f4;color:var(--muted);font-size:12px;font-weight:600;white-space:nowrap;text-align:center;border-bottom:1px solid var(--line);padding:10px 8px}
#appView #nativeContent .modern-wb-prices table td{padding:12px 8px;vertical-align:middle;overflow-wrap:normal;text-align:center;border-bottom:1px solid var(--line);font-size:13px}
#appView #nativeContent .modern-wb-prices .opProduct{display:flex;gap:10px;align-items:center;min-width:0;max-width:none;text-align:left}
#appView #nativeContent .modern-wb-prices .opProduct>div:last-child{min-width:0;flex:1}
#appView #nativeContent .modern-wb-prices .opProduct b{display:block;font-weight:500}
#appView #nativeContent .modern-wb-prices .opProduct a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--ink);word-break:normal;overflow-wrap:break-word;line-height:1.5}
#appView #nativeContent .modern-wb-prices .opProduct small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;margin-top:4px}
#appView #nativeContent .modern-wb-prices .opThumb>img:first-child{width:56px;height:64px;object-fit:contain;border:1px solid var(--line);border-radius:7px}
#appView #nativeContent .modern-wb-prices .priceCell input{width:100%;min-width:0;max-width:104px;height:34px;font-size:13px;text-align:center}
#appView #nativeContent .modern-wb-prices .priceCell small{font-size:11px;color:var(--muted);margin-top:4px}
#appView #nativeContent .modern-wb-prices .opProfitCell input{width:100%;min-width:0;max-width:140px;height:34px}
#appView #nativeContent .modern-wb-prices .opProfitNote{display:none}
#appView #nativeContent .modern-wb-prices [data-pager=bottom]{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:12px 20px;margin:0}
#appView #nativeContent .modern-wb-prices .pricePopoverBody{color:var(--ink);border-color:var(--line);box-shadow:0 6px 24px #17150f18}

.order-mark-filter{position:relative;flex:0 0 210px}.order-mark-filter summary{cursor:pointer;box-sizing:border-box;list-style:none;height:38px;display:flex;align-items:center;padding:0 12px;white-space:nowrap}.order-mark-menu{position:absolute;z-index:30;top:42px;left:0;right:0;padding:8px 12px;background:#fff;border:1px solid #d6c8ae;border-radius:8px;box-shadow:0 8px 24px #0002}.order-mark-menu label{display:flex;align-items:center;gap:8px;padding:6px 0}.order-print-mark,.order-tracking{display:block;color:#6a5733;font-size:11px;margin-top:5px;white-space:normal;overflow-wrap:anywhere}

#appView #nativeContent .modern-wb-prices .workspaceToolbarActions{flex:0 0 auto;min-width:0}#appView #nativeContent .modern-wb-prices .pagination .workspaceJump{display:none}#appView #nativeContent .modern-wb-prices #opSearch{width:clamp(220px,19vw,300px)}#appView #nativeContent .modern-wb-prices .panel-h{box-sizing:border-box;height:68px;padding:16px 20px}

#appView #nativeContent .modern-wb-prices .opPrice[hidden],#appView #nativeContent .modern-wb-prices #opFormulaPrice[hidden]{display:none!important}#appView #nativeContent .modern-wb-prices .price-edit-value{font-weight:700;height:34px;border:1px solid var(--line);background:#fff}#appView #nativeContent .modern-wb-prices .price-readonly{display:inline-block;font-variant-numeric:tabular-nums;color:var(--ink)}

#editor #combinedLabelFrame.combined-label-frame{display:block;width:100%;height:65vh;min-height:360px;border:0;box-sizing:border-box}#editor:has(#combinedLabelFrame){width:min(1160px,94vw);max-height:94vh}#editor:has(#combinedLabelFrame) #editorContent{padding:16px 24px}

/* Keep checkbox menus independent from full-width form control rules. */
.order-mark-menu label{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;width:100%;min-height:30px;white-space:nowrap;box-sizing:border-box;font-size:12px;gap:9px}
.order-mark-menu input[type=checkbox]{appearance:auto!important;display:inline-block!important;flex:0 0 14px!important;width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;padding:0!important;margin:0!important;border-radius:2px;box-shadow:none!important}
.order-mark-menu{min-width:180px;width:max-content;box-sizing:border-box}.manual-order-marks{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}.manual-order-marks label{display:flex;flex-direction:column;gap:6px}.manual-order-marks select{min-width:150px}

.manual-order-marks>label{margin:0!important;padding:0!important}.manual-order-marks>button{margin:0!important;align-self:flex-end}.manual-order-marks select{height:40px;box-sizing:border-box}.manual-order-marks>button{height:40px}

/* Stable fee fields and value editors; focus never changes form geometry. */
#editor .profitSettingsFields{grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}
#editor .profitSettingsFields input:not([type=checkbox]),#editor .profitSettingsFields select{box-sizing:border-box;min-width:0;max-width:100%;width:100%;height:40px}
#editor .profitSettingsFields .profitIncluded{align-self:end;min-height:40px;align-items:center}
#editor .profitSettingsFields input[type=checkbox]{width:16px;height:16px;flex:0 0 16px}
#appView #nativeContent .modern-wb-prices .opPurchaseCost[hidden]{display:none!important}
#appView #nativeContent .modern-wb-prices .price-edit-value{border:0;border-bottom:1px dashed var(--line);border-radius:0;background:transparent;height:auto;min-height:0;padding:3px 0;box-shadow:none;font:inherit;font-weight:700;color:var(--ink);cursor:pointer}
#appView #nativeContent .modern-wb-prices .priceCell{white-space:nowrap}
#appView #nativeContent .modern-wb-prices .priceCell small{display:inline;margin:0 0 0 4px}
#appView #nativeContent .modern-wb-prices .opProfitValue{display:block;margin-top:6px;white-space:nowrap}
/* Exactly one reading line per visible page, including the legacy price bridge. */
#appView .listReading:before,#appView #view:before{display:none!important}
#appView .page{position:relative}
#appView .page[aria-busy=true]:before,#appView .page:has(.listReading,table[aria-busy=true],#ozonBody[aria-busy=true]):before{content:"";position:absolute;top:0;left:0;right:0;height:3px;z-index:10;pointer-events:none;background:linear-gradient(90deg,var(--brass-soft),var(--brass),var(--brass-soft));background-size:200% 100%;animation:modern-reading 1.2s linear infinite}
.sync-feedback{font-size:12px;padding:8px 12px;margin-bottom:8px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink)}
.sync-feedback.active:before{content:"";display:inline-block;width:10px;height:10px;border:2px solid var(--line);border-top-color:var(--brass);border-radius:50%;margin-right:8px;vertical-align:-2px;animation:sync-spin .8s linear infinite}
@keyframes modern-reading{to{background-position:-200% 0}}@keyframes sync-spin{to{transform:rotate(360deg)}}
@media(max-width:800px){#editor .profitSettingsFields{grid-template-columns:repeat(2,minmax(0,1fr))}}

#appView .workspaceLoadStatus:after{display:none!important}

/* Product-to-label verification uses the exact PDF page manifest. */
#editor .combinedLabelLayout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}
#editor .combinedLabelOrders{height:65vh;min-height:360px;overflow-y:auto;overflow-x:hidden}
#editor .combinedLabelOrder{display:block;box-sizing:border-box;width:100%;height:auto;white-space:normal;text-align:left;padding:12px;margin:0 0 8px;border:1px solid var(--line,#ddd);background:var(--paper,#fff);color:var(--ink,#222)}
#editor .combinedLabelOrder.active{border-color:var(--brass,#a88229);background:var(--brass-soft,#f4ecd8)}
#editor .combinedLabelOrder>b,#editor .combinedLabelOrder>small{display:block;overflow-wrap:anywhere}
#editor .combinedLabelProduct{display:flex;gap:8px;align-items:center;margin-top:8px}
#editor .combinedLabelProduct img{width:52px;height:64px;object-fit:contain;flex:0 0 52px;background:white}
#editor .combinedLabelProduct div{min-width:0;overflow-wrap:anywhere}
#editor .combinedLabelProduct small{display:block;margin-top:4px}
#editor .combinedLabelLayout iframe{width:100%;min-width:0;height:65vh;min-height:360px;border:0}
@media(max-width:700px){#editor .combinedLabelLayout{grid-template-columns:180px minmax(0,1fr)}}

/* Expiry reminders must sit outside the hidden legacy bridge. */
body[data-ui="modern"] #tokenExpiryBanner{width:calc(100% - 56px);max-width:1404px;box-sizing:border-box;margin:8px auto;padding:10px 14px;border:1px solid #b08026;border-radius:8px;background:#fff4d6;color:#603f06;font-size:12px;max-height:180px;overflow:auto}body[data-ui="modern"] #tokenExpiryBanner button{margin:3px 8px;padding:4px 9px;border:1px solid #b08026;background:white;border-radius:6px;color:#603f06}@media(max-width:900px){body[data-ui="modern"] #tokenExpiryBanner{width:calc(100% - 32px);margin-left:auto;margin-right:auto}}

.authorizationAlertGroup{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:24px;max-height:24px;font-weight:600}.authorizationAlertGroup:hover,.authorizationAlertGroup:focus-within{white-space:normal;overflow:auto;max-height:180px;overflow-wrap:anywhere}.authorizationAlertMessage{display:inline-flex;max-width:100%;vertical-align:top}.authorizationAlertNames{min-width:0;overflow:hidden;text-overflow:ellipsis}.authorizationAlertReason{flex:none}.authorizationAlertGroup:hover .authorizationAlertMessage,.authorizationAlertGroup:focus-within .authorizationAlertMessage{display:inline}.authorizationAlertGroup:hover .authorizationAlertNames,.authorizationAlertGroup:focus-within .authorizationAlertNames{overflow:visible}#tokenExpiryBanner .authorizationAlertGroup .authorizationAlertShop{display:inline;width:auto;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;line-height:inherit;vertical-align:baseline;cursor:pointer}#tokenExpiryBanner .authorizationAlertGroup .authorizationAlertShop:hover{text-decoration:underline}#tokenExpiryBanner .authorizationAlertGroup .authorizationAlertShop:focus-visible{outline:2px solid #b08026;outline-offset:1px}

/* Shared preview is itself a native CSS scope root. */
body[data-ui="modern"] #opImagePreview{position:fixed;inset:0;display:grid;place-items:center;z-index:980;pointer-events:none}body[data-ui="modern"] #opImagePreview.pinned{z-index:2147483001}

#ozonCampaignDialog{width:min(820px,94vw);max-width:94vw;max-height:88vh;margin:auto;padding:0;border:1px solid #d8cfbd;border-radius:10px;background:#fff;color:#17150f;box-sizing:border-box;overflow:auto}#ozonCampaignDialog::backdrop{background:#17150f66}#ozonCampaignDialog .campaignDialogHead{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #e6dfd1}#ozonCampaignDialog h2{font-size:16px;margin:0}#ozonCampaignDialog .campaignDialogBody{padding:12px 16px}#ozonCampaignDialog button,.campaignPriceForm button{font:inherit;padding:7px 13px;border:1px solid #d8cfbd;border-radius:6px;background:#fff;color:inherit;cursor:pointer}.campaignPriceForm{font:13px/1.5 Arial,"Microsoft YaHei",sans-serif;margin:0;max-width:none}.campaignPriceItems{display:grid;gap:12px;max-height:62vh;overflow:auto}.campaignPriceItem{padding:10px;border:1px solid #e8e1d5;border-radius:7px;background:#fff}.campaignPriceProduct{display:flex;align-items:center;gap:10px;margin-bottom:10px}.campaignPriceProduct img,.campaignPriceNoImage{width:38px;height:46px;object-fit:contain;flex:none}.campaignPriceNoImage{display:grid;place-items:center;font-size:10px;color:#837d70;background:#f5f3ee}.campaignPriceProduct>div{min-width:0}.campaignPriceProduct b{display:block;overflow-wrap:anywhere}.campaignPriceProduct small{display:block;color:#837d70;font-size:11px}.campaignPriceFacts{display:grid;grid-template-columns:1fr 1fr .9fr 1.65fr;gap:10px;padding:10px;background:#faf9f6;border-radius:5px}.campaignPriceFacts small{display:block;min-height:34px;color:#718095;font-size:11px;line-height:16px}.campaignPriceFacts small span{display:block;font-weight:400}.campaignPriceFacts b{display:block;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}.campaignBoost progress{display:block;width:100%;max-width:120px;height:5px;margin:4px 0 5px;accent-color:#198a43}.campaignBoost b{color:#718095;font-size:11px}.campaignBoostPrices{display:grid;grid-template-columns:1fr 1fr;column-gap:10px}.campaignBoostPrices>small{grid-column:1/-1;min-height:16px}.campaignBoostPrices span{display:block;color:#718095;font-size:11px;margin-bottom:2px}.campaignNewPrice{display:flex!important;align-items:center;gap:12px;margin:12px 0 0!important;font-size:13px}.campaignNewPrice>span{display:inline-flex;align-items:center;gap:7px}.campaignNewPrice input{width:130px!important;min-width:0!important;height:34px!important;min-height:34px!important;margin:0!important;padding:5px 8px!important;border:1px solid #d8cfbd!important;border-radius:5px!important;background:#fff;font:inherit!important}.campaignNewPrice b{font-size:12px}.campaignPriceHint{font-size:11px;color:#837d70;margin:10px 0}.campaignPriceError{font-size:12px;color:#b33131;margin:6px 0}.campaignPriceFooter{display:flex;justify-content:flex-end;gap:8px;padding-top:10px;border-top:1px solid #e8e1d5}.campaignPriceForm button.primary{background:#a87f2d;color:#fff;border-color:#a87f2d}.campaignPriceForm button:disabled{opacity:.5;cursor:default}@media(max-width:600px){.campaignPriceFacts{grid-template-columns:1fr 1fr;gap:14px}.campaignPriceFacts small{min-height:32px}.campaignBoostPrices{grid-column:1/-1}.campaignBoostPrices>small{min-height:16px}.campaignBoost{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;align-items:center}.campaignBoost small{min-height:0;grid-column:1/-1}.campaignBoost progress{max-width:none}.campaignBoost b{text-align:right}.campaignPriceItems{max-height:60vh}.campaignPriceFooter{position:sticky;bottom:0;background:#fff}}

#ozonCampaignDialog .campaignPriceForm button.primary{background:#a87f2d;color:white;border-color:#a87f2d}

.campaignPriceNotice{padding:8px 10px;background:#fff5da;border:1px solid #ead19b;border-radius:5px;font-size:11px;color:#785014}
.orders-panel .order-shipping-line{display:block;margin:0 0 3px;color:#6c665b;font-size:11px;line-height:1.25;overflow-wrap:anywhere}
/* Desktop OGL dialogs share one fixed title bar and control scale. */
:is(#orderOglPanel, #editor:has(.oglModal))[open] {
  display: flex;
  flex-direction: column;
  width: min(460px, calc(100vw - 24px));
  max-height: min(82vh, 700px);
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  border: 1px solid #ded8cc;
  border-radius: 12px;
  color: #17150f;
  overflow: clip;
  background: #fff;
  font-size: 13px;
}
#editor[open]:has(.oglModalWide) { width: min(780px, calc(100vw - 24px)); }
#orderOglPanel[open]:has(.oglDialogBody) { width: min(880px, calc(100vw - 24px)); }
#orderOglPanel::backdrop { background: #17150f66; }
#orderOglPanel > .oglDialogHead,
.oglLabelPreview > header,
#editor:has(.oglModal) > .dialogCloseBar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  margin: 0;
  background: #fff;
  inset: auto;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #ded8cc;
}
#editor:has(.oglModal) > .dialogCloseBar::before {
  content: attr(data-ogl-title);
  font-size: 15px;
  font-weight: 700;
}
#editor:has(.oglModal) > .dialogCloseBar button { flex: none; }
#orderOglPanel > .oglDialogBody,
.oglLabelPreview > section,
#editor:has(.oglModal) > #editorContent {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 14px 14px;
}
#editor .oglModal > .editorHead {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
#editor .oglModal :is(h3,p) { margin: 0 0 8px; }
#editor .oglModal h3 { font-size: 13px; }
#editor .oglModal .oglModalMeta { color: #6f685b; }
#editor .oglModal form { width: auto; max-width: none; margin: 0; }
#editor .oglModal label { display: block; margin: 0 0 8px; font-size: 12px; }
#orderOglPanel .tableFilterBar :is(input,select),
#editor .oglModal :is(input:not([type=checkbox]),select,textarea) {
  box-sizing: border-box;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  margin: 0;
  padding: 4px 8px;
  font-size: 12px;
}
#editor .oglModal label :is(input,textarea) { display: block; width: 100%; margin-top: 4px; }
#editor .oglModal input[type=datetime-local] { width: min(225px,100%); }
#editor .oglModal textarea { height: auto; min-height: 50px; resize: vertical; }
#editor .oglModal .oglContactFields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 10px; }
#editor .oglModal .oglContactComment { grid-column: 1 / -1; }
#orderOglPanel #oglOrderClose,
#orderOglPanel .oglActions > button,
.oglLabelPreview button,
#orderOglPanel :is(.toolbar,.tableFilterBar) > button,
#editor:has(.oglModal) > .dialogCloseBar button,
#editor .oglModal :is(.toolbar,.oglModalActions) > button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-height: 30px;
  padding: 0 9px;
  margin: 0;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
#editor .oglModal :is(.toolbar,.oglModalActions) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
  padding: 0;
}
#editor .oglModal .oglModalActions { justify-content: flex-end; margin: 10px 0 0; padding-top: 9px; border-top: 1px solid #ebe7de; }
#editor .oglModal [role=alert]:empty { display: none; }
#editor .oglModal .tableWrap { max-width: 100%; overflow: auto; }
#editor .oglModal .tableWrap table { min-width: 0; width: 100%; font-size: 12px; }
#editor .oglModal .tableWrap :is(th,td) { padding: 5px 7px; vertical-align: middle; }
#orderOglPanel input[type=checkbox],
#editor .oglModal input[type=checkbox] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  box-shadow: none;
}
#editor .oglModal input[type=checkbox]:focus:not(:focus-visible) { outline: none; }
#editor .oglModalWide .tableWrap th:first-child:has(input[type=checkbox]) { width: 32px; }
@media(max-width: 420px) {
  #editor .oglModal .oglContactFields { grid-template-columns: minmax(0,1fr); }
}

#orderOglPanel > .oglDialogHead { justify-content: flex-start; gap: 8px; }
#orderOglPanel > .oglDialogHead h3 { margin: 0; font-size: 15px; }
#orderOglPanel #oglSyncStatus { color: #6f685b; font-size: 11px; white-space: nowrap; }
#orderOglPanel #oglSyncStatus:empty { display: none; }
#orderOglPanel #oglOrderClose { flex: none; margin-left: auto; }
#orderOglPanel #oglOrderClose,
#orderOglPanel :is(.toolbar,.tableFilterBar) > button {
  border: 1px solid #d1c6af;
  border-radius: 7px;
  background: #fff;
  color: #17150f;
  box-shadow: none;
}
#orderOglPanel .toolbar > button.primary {
  background: #a87f2d;
  color: #fff;
  border-color: #a87f2d;
}
#orderOglPanel .oglDialogBody .card { margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
#orderOglPanel .oglDialogBody .card h3 { font-size: 13px; margin: 0 0 8px; }
#orderOglPanel #oglRows { margin-top: 10px; padding-top: 10px; border-top: 1px solid #ebe7de; }
#orderOglPanel .oglDialogBody :is(.toolbar,.tableFilterBar) { gap: 6px; margin: 0 0 6px; padding: 0; align-items: center; }
#orderOglPanel .oglDialogBody :is(.toolbar,.tableFilterBar):last-child { margin-bottom: 0; }
#orderOglPanel .tableFilterBar :is(select,input) { width: auto; max-width: 100%; border: 1px solid #d6cdbb; border-radius: 7px; }
#orderOglPanel .tableFilterBar input { width: min(205px, 100%); }
#orderOglPanel .tableFilterBar > [role=status] { min-height: 30px; }
#orderOglPanel .tableWrap { overflow: auto; max-width: 100%; }
#orderOglPanel .tableWrap table { min-width: 0; font-size: 12px; }
#orderOglPanel #oglPickedOrders th:first-child { width: 32px; }
#orderOglPanel :is(button,input,select):focus-visible { outline: 2px solid #a1782a; outline-offset: 2px; }
@media(max-width: 570px) {
  #orderOglPanel > .oglDialogHead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; }
  #orderOglPanel #oglSyncStatus { grid-column: 1; grid-row: 2; white-space: normal; }
  #orderOglPanel #oglOrderClose { grid-column: 2; grid-row: 1 / span 2; }
}

/* Give order tabs a common grid; product text takes the remaining width. */
#appView .orders-panel .modern-table {
  table-layout: fixed;
  min-width: 1000px;
}
#appView .orders-panel .modern-table:has(th > [data-sort="当前商品活动"]) { min-width: 1210px; }
#appView .orders-panel .modern-table th:has(> [data-sort="所属店铺"]) { width: 108px; }
#appView .orders-panel .modern-table th:has(> :is([data-sort="下单 / 发货时间"],[data-sort="更新时间"])) { width: 145px; }
#appView .orders-panel .modern-table th:has(> :is([data-sort="数量 / 金额"],[data-sort="金额 / 数量"])) { width: 98px; }
#appView .orders-panel .modern-table th:nth-child(6) { width: 74px; }
#appView .orders-panel .modern-table th:has(> [data-sort="状态"]) { width: 140px; }
#appView .orders-panel .modern-table th:has(> [data-sort="当前商品活动"]) { width: 212px; }
#appView .orders-panel .modern-table th:last-child { width: 170px; }
#appView .orders-panel .modern-table .status-cell .order-shipping-line {
  white-space: nowrap;
  overflow-wrap: normal;
  overflow-x: auto;
}

.oglLabelPreview[open] {
  width: min(780px, calc(100vw - 24px));
  max-height: min(88dvh, calc(100dvh - 24px));
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ded8cc;
  border-radius: 12px;
  color: #17150f;
  font-size: 13px;
}
.oglLabelPreview::backdrop { background: #17150f66; }
.oglLabelPreview > header h3 { margin: 0; font-size: 15px; }
.oglLabelPreview iframe { width: 100%; height: 65vh; margin-top: 8px; border: 1px solid #ded9ca; }
#orderOglPanel #oglPickedOrders th:last-child { width: 126px; }
#orderOglPanel [data-ogl-shipment] { font-size: 12px; color: #635b4c; }
#orderOglPanel .oglShipmentResult { justify-content: space-between; }
#orderOglPanel .oglShipmentResult > a {
  padding: 6px 9px;
  border: 1px solid #d1c6af;
  border-radius: 7px;
  white-space: nowrap;
}
@media(max-width: 520px) {
  #orderOglPanel #oglPickedOrders th:last-child { width: 86px; }
}
.stock-zero-label{display:block;color:#a02720;font-size:12px;font-weight:750;white-space:nowrap}
#tokenExpiryBanner .stockAlertLink{color:inherit;text-decoration:underline;text-underline-offset:2px}
