:root {
  --ink:#172e27;--ink-soft:#495e55;--green:#146547;--line:#d8e1d9;--wash:#f3f5f0;
  --rail:208px;--pad:clamp(18px,2.6vw,44px);--radius:12px;--m-ease:cubic-bezier(.2,.8,.2,1);
  font-family:"Segoe UI","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;
  font-size:14px;background:var(--wash);color:var(--ink);
}
*{box-sizing:border-box}
body{min-height:100vh;background:var(--wash)}
.skip-link{position:absolute;top:-70px;left:16px;z-index:20;background:#fff;padding:12px 20px}
.skip-link:focus{top:8px}
:focus-visible{outline:3px solid #518f73;outline-offset:3px}
#workspace-side{width:var(--rail);height:100dvh;inset:0 auto 0 0;position:fixed;display:flex;flex-direction:column;background:#112f28;color:#f1f6ef;padding:24px 14px 16px;z-index:8}
.brand-lockup{display:flex;align-items:center;gap:12px;padding:1px 9px 26px;border-bottom:1px solid #ffffff21}
.brand-lockup b{font-size:19px;letter-spacing:.02em;font-weight:670}
.brand-lockup small{display:block;margin:3px 0 0;color:#c6dbb7;font:600 9px/1.2 "Segoe UI",sans-serif;letter-spacing:.19em}
.brand-glyph{display:grid;position:relative;width:36px;height:40px;flex-shrink:0}
.brand-glyph i{position:absolute;left:4px;top:7px;width:25px;height:14px;background:#c7e5aa;border-radius:3px;transform:rotate(-25deg) skew(22deg);box-shadow:inset 0 -2px #213d242a}
.brand-glyph i:nth-child(2){top:14px;background:#77b88e}.brand-glyph i:nth-child(3){top:21px;background:#3d896d}.brand-glyph i:first-child{z-index:2}.brand-glyph i:nth-child(2){z-index:1}
#workspace-nav{display:block;overflow-y:auto;flex:1;margin:12px -4px 12px;padding:0 4px}
.nav-group{margin:14px 0 21px}.nav-group p{font-size:11px;letter-spacing:.06em;font-weight:600;color:#9ab8ac;margin:0 12px 8px}
.nav-group button{display:flex;align-items:center;gap:12px;width:100%;min-height:42px;border:1px solid transparent;background:transparent;color:#deebe3;padding:8px 12px;margin:2px 0;text-align:left;font-size:14px;border-radius:7px;font-weight:500}
.nav-group button:hover{background:#234438;color:#fff}.nav-group button.active{background:#dcf0c9;color:#153c2d;box-shadow:none;border-color:#cce4bd;font-weight:700}
.ui-glyph{width:18px;height:18px;display:inline-block;flex:none}
#workspace-side footer{position:static;display:flex;align-items:flex-start;gap:9px;border-top:1px solid #ffffff25;padding:16px 8px 0;color:#ebf4e9;font-size:12px;line-height:1.6}
#workspace-side footer small{display:block;font-size:10px;color:#a9c1b4;margin:3px 0 0;letter-spacing:0}.online-dot{width:7px;height:7px;border-radius:50%;background:#a7da94;margin-top:6px}
main{min-width:0;margin-left:var(--rail);width:calc(100% - var(--rail));padding:0 var(--pad) 40px}
.workspace-top{display:flex;align-items:center;gap:12px;min-height:54px;border-bottom:1px solid var(--line)}
.crumb,.environment{display:flex;align-items:center;gap:11px;color:#54685e;font-size:12px}.crumb b{color:#273f34;font-weight:600}.environment{margin-left:auto}.local-preview{border:1px solid #cbd9c4;border-radius:20px;padding:3px 10px;color:#496443;background:#eaf0df}.business{font-weight:600}
#nav-switch,#nav-scrim{display:none}
.workspace-header{margin:0;padding:25px 0 18px;gap:18px}
.workspace-header h1{font-size:clamp(26px,2.3vw,35px);line-height:1.18;color:#182b24;letter-spacing:-.045em;margin:0}
#page-note{color:var(--ink-soft);font-size:13px;margin:7px 0 0}
#identity{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
main>header #identity{max-width:59%}
#identity .badge{background:#fff;border:1px solid var(--line);color:var(--ink-soft);font-size:12px;border-radius:20px}
#identity>div{margin:0!important;order:-1}#identity label{display:flex;align-items:center;gap:8px;font-size:12px}
#identity select{width:auto;max-width:225px;height:34px;min-height:34px}
#identity .notice{margin:5px 0 0;line-height:1.45;max-width:420px}#logout{font-size:12px;min-height:32px;padding:5px 9px}
.system-line{display:flex;align-items:center;gap:9px;padding:7px 12px;border:1px solid #dfdfcd;background:#f6f5e9;color:#596242;margin:0 0 16px;line-height:1.45;border-radius:6px}
.system-line i{width:6px;height:6px;background:#948041;border-radius:50%;flex:none}
.card,main .card,.wb-inbox{border-radius:var(--radius);border-color:var(--line);box-shadow:none}
#app>.stats{gap:12px}
#app>.stats .card{padding:16px 19px;min-width:0;margin:0;background:#fff;position:relative;min-height:91px;border:1px solid var(--line);text-align:left}
#app>.stats .stat-shortcut:first-child{background:#183f32;border-color:#183f32;color:#fff}
.stat-label{display:flex;align-items:center;gap:8px}
.stat-label i{display:grid;place-items:center;width:27px;height:27px;border-radius:7px;background:#edf3e9;color:#416c4d}
.stat-label i svg{width:16px;height:16px}
.stats .stat-shortcut:first-child .stat-label i{background:#315642;color:#d6edbc}
.stats .stat-shortcut:first-child small{color:#e3edde}
.stats .card small{font-size:12px;color:#526158}
#app>.stats strong{display:block;font:630 33px/1 "Segoe UI",sans-serif;letter-spacing:-.05em;font-variant-numeric:tabular-nums;margin:10px 0 0}
.stats .stat-shortcut .stat-arrow{inset:auto 17px 16px auto;position:absolute;background:transparent;color:#547b66;font-size:18px;border:0}
.stats .stat-shortcut:first-child .stat-arrow{background:transparent;color:#d1e5c3}
button{background:var(--green);border-radius:7px;font-size:13px;line-height:1.4;padding:9px 14px}
button.secondary,.wb-controls button.secondary{background:#fff;color:#35493d;border:1px solid #d4ded6}
button.danger{background:#fbede8;color:#8b422a}
button:active:not(:disabled){transform:translateY(1px)}
.stats .stat-shortcut:hover{transform:translateY(-2px);box-shadow:0 4px 10px #183d2910}
input:not([type=checkbox]):not([type=radio]),select,textarea{border-radius:6px;border-color:#cfdbd2;font-family:inherit;font-size:13px}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select{min-height:36px;padding:7px 10px}
input[type=checkbox],input[type=radio]{accent-color:var(--green)}
.muted{color:#5b6d63}
.catalog-heading,.catalog-heading>div:first-child,.catalog-bulk{display:flex;align-items:center;gap:12px}
.catalog-heading{justify-content:space-between;margin-bottom:16px}
.catalog-heading h2{font-size:20px;line-height:1.3;margin:0;letter-spacing:-.025em}
.catalog-count{color:#52665b;background:#edf2eb;border-radius:5px;padding:3px 7px;font-size:11px}
.catalog-heading .actions{margin:0;gap:8px}
main .catalog-filters{margin:18px 0 0;padding:18px 18px 0;border-bottom:0;border-radius:12px 12px 0 0}
.catalog-filters .selection-tools.search-last{padding:0;display:grid;grid-template-columns:repeat(4,minmax(92px,1fr)) auto minmax(165px,1.55fr);gap:10px;align-items:end;background:none;border:0}
.catalog-filters .selection-tools.search-last>label{width:100%;min-width:0;margin:0;font-size:11px;font-weight:600;color:var(--ink-soft);gap:5px}
.catalog-filters .selection-tools.search-last select,.catalog-filters .selection-tools.search-last input{width:100%;max-width:none}
.catalog-filters .selection-tools.search-last label:last-child{grid-column:-2/-1}
.catalog-filters .selection-tools [data-reset]{margin:0;height:36px;align-self:end}
.catalog-bulk{margin:15px -18px 0;padding:9px 18px;border-top:1px solid #e4eae1;background:#f8faf6;gap:14px}
.catalog-bulk .proc-check{font-size:12px;gap:7px}.catalog-bulk button{padding:5px 11px;font-size:12px;background:#e6efdf;color:#335f43}
.catalog-bulk p{font-size:12px;margin:0}.catalog-filters [data-message]:empty{display:none}
.catalog-table{border-top:0;margin-top:0;border-radius:0 0 12px 12px!important;overflow:auto}
.catalog-table table{min-width:1120px}
.catalog-product{display:flex;gap:10px;align-items:center;min-width:180px;max-width:275px}
.catalog-product img,.catalog-fallback{width:42px;height:42px;object-fit:contain;border-radius:6px;border:1px solid #e0e7dd;background:white;flex:none}
.catalog-fallback{display:grid;place-items:center;color:#65776c;font-size:10px}
.catalog-product b{display:block;color:#243b2e;font-size:13px;line-height:1.45}
.catalog-product small{display:block;margin-top:3px;font-size:10px;color:#617267;line-height:1.4}
th{color:#53675a;background:#eff3ec;font-size:11px;letter-spacing:.012em;font-weight:650}
td{color:#253a2f;font-size:12px}
th,td{padding:10px 9px}
tbody tr:hover td{background:#f7faf5}
.catalog-table .muted{font-size:11px;margin:3px 0}.catalog-table td input[data-qty]{min-width:64px!important;max-width:82px;height:31px;min-height:31px!important}
.catalog-table .draft-row-actions{min-width:0;gap:4px;flex-wrap:wrap}
.catalog-table td:last-child button{padding:5px 7px;font-size:11px}
.mobile-fields,.filter-toggle{display:none}
html body :is(button,a,select,input,textarea,summary):focus-visible{outline:3px solid #225536!important;outline-offset:2px}
main #identity label{color:#354c3d}
#workspace-nav button:focus-visible{outline-color:#e1f7b3!important;outline-offset:-2px;box-shadow:inset 0 0 0 4px #244d39}
.row-pick,.row-quantity{display:flex;align-items:center;gap:5px;font-size:11px;color:#475c4f}
.row-quantity{margin-top:4px}.row-quantity input[data-qty]{margin-top:0!important}
.badge,.pd-pill{border-radius:5px;padding:4px 7px;line-height:1.45}
tr[data-grid-stage=draft] .badge{background:#edf0ec;color:#506055}
tr:is([data-grid-stage=approval],[data-grid-stage=duplicate],[data-grid-stage=quantity],[data-grid-stage=ceo]) .badge{background:#faf0db;color:#80581c}
tr:is([data-grid-stage=sampling],[data-grid-stage=shipping],[data-grid-stage=ordered]) .badge{background:#e5eff5;color:#315c73}
tr[data-grid-stage=ended] .badge{background:#f5e8e4;color:#874431}
.task-time{font-size:11px;line-height:1.4}
.card:has(>.stock-heading),.card:has(.sea-table),.procurement,.wb-inbox,.pd-summary,.pd-task,.pd-fold{border-color:var(--line)}
.stock-heading h2,.proc-head h2,.wb-intro h2{font-size:20px;letter-spacing:-.025em}
.sea-table,.stock-table-wrap,[data-table],.catalog-table{scrollbar-width:thin;scrollbar-color:#afc4b5 transparent}
.card{min-width:0}
@media(min-width:901px){main{display:block}#app>.card:has(>table){overflow-x:auto}}
@media(min-width:761px) and (max-width:1150px){:root{--rail:170px;--pad:18px}main>header #identity{max-width:60%}#identity label{display:grid;gap:3px}.catalog-filters .selection-tools.search-last{grid-template-columns:repeat(4,minmax(80px,1fr))}.catalog-filters .selection-tools.search-last label:last-child{grid-column:2/-1}}
@media(max-width:760px){
 .catalog-heading>div:first-child{width:100%}.catalog-heading .filter-toggle{display:inline-flex;align-items:center;margin-left:auto}
 .catalog-filters:not(.filters-open) .selection-tools{display:none}
 :root{--pad:14px}body{display:block}main{margin:0;width:100%;padding:0 var(--pad) 28px}
 #workspace-side{width:235px;visibility:hidden;transform:translateX(-102%);transition:transform 160ms ease;z-index:15}
 body.nav-open #workspace-side{visibility:visible;transform:none}#workspace-nav{display:block;width:auto}
 #nav-switch{display:grid;place-items:center;background:#fff;color:var(--ink);border:1px solid var(--line);width:44px;height:44px;padding:0}
 body.nav-open #nav-scrim{display:block;position:fixed;inset:0;background:#122a2090;border:0;border-radius:0;z-index:14;width:100%;height:100%;padding:0}
 .workspace-top{min-height:60px}.crumb{gap:6px;font-size:11px}.environment{gap:6px}.business{font-size:11px}
 .workspace-header{display:grid;grid-template-columns:1fr;padding:18px 0 12px;gap:10px}
 main>header #identity{max-width:100%;justify-content:flex-start}#identity label{font-size:11px}#identity select{height:38px;max-width:185px}
 #identity .notice{max-width:none}.system-line{font-size:11px;margin-bottom:12px}
 #app>.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#app>.stats .card{min-height:80px;padding:10px 13px}#app>.stats strong{font-size:26px;margin-top:7px}
 .catalog-heading{align-items:flex-start;flex-direction:column;gap:10px}.catalog-heading .actions{flex-wrap:wrap}.catalog-heading button{min-height:40px}
 main .catalog-filters{padding:14px 12px 0}.catalog-filters .selection-tools.search-last{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .catalog-filters .selection-tools.search-last label:last-child{grid-column:auto}
 .catalog-bulk{margin:12px -12px 0;padding:8px 12px;flex-wrap:wrap;gap:8px}.catalog-bulk p{display:none}
 #app>.card{max-width:100%;overflow-x:auto}.catalog-table table{display:table}.card table{min-width:0}
 #app>.catalog-table table{min-width:1080px}.card:not(.catalog-table) table{max-width:100%;overflow:auto}
 .stock-tools,.proc-filters{gap:10px}.pd-content{padding:10px}.pd-summary,.pd-task{padding:14px}
}
@media(max-width:420px){.workspace-top .business{display:none}.catalog-bulk button{min-height:40px}#identity label{flex-direction:column;align-items:flex-start;gap:2px}.catalog-heading .actions button{font-size:12px;padding-inline:8px}}
@media(max-width:760px){
 #app>.catalog-table table,#app>.catalog-table tbody{display:block;min-width:0;width:100%}
 .catalog-table thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
 .catalog-table tr:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;padding:14px 12px;border-bottom:1px solid var(--line)}
 .catalog-table td{display:none;padding:0;border:0;min-width:0;font-size:13px}
 .catalog-table td[data-column="产品 / SKU"]{display:block;grid-column:1/-1;grid-row:1}
 .catalog-product{max-width:100%;min-width:0}.catalog-product b{font-size:14px}
 .catalog-table td[data-column^="流程状态"]:not([hidden]){display:block;grid-column:1/-1;grid-row:2}
 .catalog-table td[data-column^="流程状态"]>div{display:inline-block;margin-inline-start:8px}
 .catalog-table td:is([data-column="售价 R$"],[data-column="预估利润率"],[data-column^="批量选择"]){display:block}
 .catalog-table td:is([data-column="售价 R$"],[data-column="预估利润率"],[data-column^="批量选择"])::before,
 .catalog-table .show-fields td:not([data-column="产品 / SKU"],[data-column^="流程状态"],[data-column="操作"])::before{content:attr(data-column);display:block;color:var(--ink-soft);font-size:11px;margin-bottom:2px}
 .catalog-table td[data-column^="批量选择"]{grid-column:1/-1}
 .catalog-table td[data-column^="批量选择"] input{margin:0 6px 0 0!important;vertical-align:middle}
 .catalog-table td[data-column="操作"]{display:flex;gap:8px;align-items:center;flex-wrap:wrap;grid-column:1/-1;order:5}
 .catalog-table td[data-column="操作"] button,.nav-group button,#identity select,#identity button,.catalog-filters select,.catalog-filters input{min-height:44px}
 .catalog-table .show-fields td:not([hidden]){display:block}.catalog-table .show-fields td[data-column="操作"]{display:flex}
 .catalog-table .mobile-fields{display:inline-block}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;transition-duration:.001ms!important}}
@media(max-width:760px){
 #app .catalog-table td[data-column^="批量选择"] input[data-pick]{width:26px;height:26px;margin-right:14px!important}
 #app .catalog-table td[data-column^="批量选择"] input[data-qty]{height:44px;min-height:44px!important}
 .catalog-filters .catalog-bulk .proc-check,.catalog-filters .catalog-bulk button,.catalog-heading button{min-height:44px}
}

/* Overdue records: related dropdowns stay together; free text remains last. */
.toolbar.overdue-tools {justify-content:flex-start;}
.toolbar.overdue-tools > [data-owner] {width:min(140px,100%);}
.toolbar.overdue-tools > [data-product] {width:min(240px,100%);text-overflow:ellipsis;}
