:root{--bg:#f6f8f7;--paper:#fff;--ink:#1c3029;--muted:#5d7167;--line:#e2eae5;--accent:#187650;--tint:#eaf5ee;--radius:18px;--shadow:0 4px 24px #1c302905}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.6 "Segoe UI",Arial,sans-serif}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{outline-offset:4px}
button{cursor:pointer}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(26px,3vw,36px);letter-spacing:-1.2px;line-height:1.2;margin-bottom:10px;font-weight:650}
h2{font-size:20px;font-weight:600;margin-bottom:0}
h3{font-size:17px;font-weight:600;margin-bottom:4px}
.app-shell{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100vh}
.app-main{min-width:0;display:flex;flex-direction:column}
.sidebar{position:sticky;top:0;height:100dvh;background:var(--paper);border-right:1px solid var(--line);padding:30px 20px 18px;display:flex;flex-direction:column}
.brand{display:flex;align-items:center;gap:12px;color:var(--ink);font-size:24px;font-weight:700;letter-spacing:-.8px;white-space:nowrap;padding:0 8px}
.brand:hover{text-decoration:none}
.brand-mark{background:var(--accent);color:#fff;border-radius:13px;width:42px;height:44px;display:grid;place-items:center;font-family:Georgia,serif;font-style:italic;flex-shrink:0;box-shadow:0 4px 12px #18765018}
.brand small{display:block;font-size:11px;font-weight:400;letter-spacing:0;color:var(--muted);line-height:1.4}
.nav-label{font-size:10px;font-weight:600;letter-spacing:.6px;color:var(--muted);margin:42px 12px 12px}
.sidenav{display:flex;flex-direction:column;gap:6px}
.sidenav a{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:11px;color:var(--muted);font-weight:500}
.sidenav a:hover{background:#f4f8f5;text-decoration:none}
.sidenav .nav-active{background:var(--tint);color:var(--accent);font-weight:650}
.icon{width:20px;height:20px;flex-shrink:0;vertical-align:middle}
.sidebar-note{margin-top:auto;padding:22px 12px;font-weight:600;font-size:12px}
.sidebar-note small{display:block;font-weight:400;font-size:10px;color:var(--muted);margin:4px 0 0 16px}
.workspace-dot{display:inline-block;width:7px;height:7px;background:var(--accent);border-radius:50%;margin-right:9px}
.account{display:flex;gap:10px;align-items:center;font-size:12px;border-top:1px solid var(--line);padding:18px 4px 0;min-width:0}
.account-avatar{display:grid;place-items:center;width:34px;height:34px;background:var(--tint);border-radius:50%;color:var(--accent);font-weight:650;flex-shrink:0}
.account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.account form{margin:0}
.icon-button{display:grid;place-items:center;width:36px;height:36px;padding:8px;border:0;border-radius:9px;background:transparent;color:var(--muted)}
.icon-button:hover{background:var(--tint);color:var(--accent)}
.workspace{width:100%;max-width:1440px;margin:0 auto;padding:32px 44px 60px;flex:1}
.skip-link{position:fixed;top:-80px;left:16px;z-index:10;background:var(--accent);color:#fff;padding:12px 20px;border-radius:10px}
.skip-link:focus{top:12px}
:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.breadcrumbs{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-bottom:24px}
.breadcrumbs a{color:var(--muted)}
.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:28px}
.page-heading p:last-child{margin-bottom:0}
.eyebrow{font-size:10px;font-weight:650;letter-spacing:1.4px;color:var(--accent);margin-bottom:10px}
.heading-icon{width:60px;height:60px;display:grid;place-items:center;background:var(--tint);border:1px solid #dbece1;border-radius:18px;color:var(--accent)}
.heading-icon .icon{width:28px;height:28px}
.muted{color:var(--muted)}
.filters{display:flex;gap:12px;align-items:flex-end;padding:18px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:32px;flex-wrap:wrap}
.filters label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted)}
.filters .search-label{flex:1;min-width:200px}
.filters input,.filters select{width:100%}
input:not([type=checkbox]):not([type=hidden]),select,textarea{border:1px solid #d4e0d9;border-radius:10px;padding:10px 12px;background:#fff;color:var(--ink);min-height:44px;max-width:100%}
input::placeholder,textarea::placeholder{color:#6b7e73;opacity:1}
input[type=checkbox]{accent-color:var(--accent);width:17px;height:17px;cursor:pointer}
input:focus,select:focus,textarea:focus{outline-color:var(--accent)}
.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid #d4e0d9;border-radius:10px;padding:10px 18px;background:#fff;color:var(--ink);font-weight:600;min-height:44px;font-size:13px;white-space:nowrap;transition:background .15s,box-shadow .15s}
.button:hover{background:var(--tint);text-decoration:none}
.button.primary{background:var(--accent);color:white;border-color:var(--accent)}
.button.primary:hover{background:#105e3e;box-shadow:0 4px 12px #18765020}
.filter-reset{font-size:12px;align-self:center;padding:10px 6px}
.button.danger{color:#983e36;border-color:#e2c9c4}
.block-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.section-block{margin-bottom:36px}
.section-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}
.section-card{display:flex;align-items:center;gap:14px;padding:22px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);color:var(--ink);transition:transform .15s,border-color .15s;min-width:0}
.section-card h3{overflow-wrap:anywhere}
.section-card:hover{transform:translateY(-2px);border-color:#94b4a3;text-decoration:none}
.section-card .muted{font-size:12px}
.folder-icon{width:42px;height:42px;display:grid;place-items:center;color:var(--accent);background:var(--tint);border-radius:12px;flex-shrink:0}
.folder-icon .icon{width:23px;height:23px}
.arrow{margin-left:auto;color:var(--muted)}
.arrow .icon{width:16px;height:16px}
.badge{display:inline-flex;align-items:center;padding:4px 12px;border-radius:20px;background:#e7ece8;color:#52655a;font-size:12px;white-space:nowrap}
.badge.success{background:#e0f0e5;color:#32694c}
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px}
.product-card{border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--paper);color:var(--ink);transition:transform .15s,box-shadow .15s}
.product-card:hover{text-decoration:none;transform:translateY(-3px);box-shadow:0 10px 24px #213c3010}
.product-image{height:240px;position:relative;background:#f0f4f1}
.product-image img{width:100%;height:100%;object-fit:contain}
.image-placeholder{display:flex;align-items:center;justify-content:center;flex-direction:column;height:100%;min-height:180px;color:#96a59a;gap:8px;background:linear-gradient(145deg,#edf2ec,#e1e9e1)}
.image-placeholder span{font-size:48px;line-height:1}
.image-placeholder small{font-size:12px}
.image-badge{position:absolute;top:12px;left:12px;background:#ffffffdf;border-radius:6px;padding:3px 8px;font-size:11px}
.product-info{padding:18px 20px}
.overline{font-size:11px;color:var(--muted)}
.product-info h3{margin:5px 0 16px;overflow-wrap:anywhere}
.product-meta{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted);align-items:center}
.unit-pill{background:var(--tint);color:var(--accent);border-radius:5px;padding:3px 8px}
.empty{border:1px dashed #c9d5cc;border-radius:var(--radius);padding:36px;text-align:center;width:100%;grid-column:1/-1}
.empty p{color:var(--muted);margin:6px 0 0}
.pagination{display:flex;gap:20px;justify-content:center;align-items:center;margin-top:28px}
.detail-grid{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:24px}
.detail-photo{aspect-ratio:4/5;border-radius:var(--radius);overflow:hidden;background:var(--tint)}
.detail-photo img{width:100%;height:100%;object-fit:contain}
.detail-photo .image-placeholder{height:100%}
.aside-note{padding:16px 8px;color:var(--muted);font-size:12px}
.detail-sections{display:flex;flex-direction:column;gap:20px}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow);min-width:0}
.panel>p:last-child{margin-bottom:0}
.facts{margin:0}
.facts>div{display:grid;grid-template-columns:minmax(110px,160px) minmax(0,1fr);gap:20px;padding:12px 0;border-bottom:1px solid #edf0ed}
.facts>div:last-child{border-bottom:0}
.facts dt{color:var(--muted)}
.facts dd{margin:0;overflow-wrap:anywhere}
.variant-list{display:flex;gap:10px;flex-wrap:wrap}
.variant{min-width:48px;text-align:center;padding:8px 14px;border:1px solid #c7d8ce;border-radius:8px;background:#f9fcf8}
.variant.disabled{background:#f5f5f3;color:#98a198;border-style:dashed}
.variant.selected{background:var(--accent);color:white;border-color:var(--accent)}
.data-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:15px 0;border-bottom:1px solid #edf0ed;overflow-wrap:anywhere}
.data-row:last-child{border:0}
.data-row span{font-size:13px}
.notice{padding:14px 18px;border-radius:10px;background:var(--tint);margin-bottom:20px}
.notice.warning{background:#fff1d9;color:#865e23}
.notice.error{background:#fff0ee;color:#a43d32}
.login-panel{max-width:440px;margin:65px auto}
.login-panel h1{font-size:28px}
.form-field{margin:18px 0}
.form-field label{display:block;font-size:13px;margin-bottom:6px}
.form-field input:not([type=checkbox]),.form-field select,.form-field textarea{width:100%}
.errorlist{color:#a33d35;font-size:13px;padding-left:20px}
.wide{width:100%}
.footer{width:calc(100% - 88px);max-width:1352px;margin:0 auto;padding:18px 0;border-top:1px solid var(--line);color:var(--muted);font-size:11px;display:flex;justify-content:space-between;gap:16px}
.actions{display:flex;gap:10px;flex-wrap:wrap}
.helptext{display:block;font-size:12px;color:var(--muted);margin-top:6px}
@media(max-width:1100px){.app-shell{grid-template-columns:208px minmax(0,1fr)}
.workspace{padding:26px 28px 48px}
.sidebar{padding:26px 14px 18px}
.detail-grid{grid-template-columns:220px minmax(0,1fr);gap:18px}
.facts>div{grid-template-columns:1fr;gap:4px}
.footer{width:calc(100% - 56px)}
}
@media(max-width:850px){.app-shell{grid-template-columns:1fr}
.sidebar{position:relative;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:16px 24px;display:grid;grid-template-columns:1fr auto;gap:14px}
.brand{font-size:22px;padding:0}
.brand-mark{width:36px;height:38px;border-radius:10px}
.nav-label,.sidebar-note{display:none}
.sidenav{grid-column:1/-1;grid-row:2;flex-direction:row;gap:8px}
.sidenav a{padding:9px 14px}
.account{border:0;padding:0;max-width:230px}
.detail-grid{grid-template-columns:220px minmax(0,1fr)}
}
@media(max-width:600px){.sidebar{padding:14px 16px;gap:12px}
.brand small{font-size:10px}
.account-name{max-width:95px}
.account-avatar{display:none}
.workspace{padding:20px 16px 40px}
.heading-icon{display:none}
.page-heading{align-items:flex-start;flex-wrap:wrap}
.filters{padding:16px;gap:12px}
.filters label{flex:1;min-width:125px}
.filters .search-label{flex-basis:100%}
.filters .button{flex:1}
.filters .filter-reset{text-align:center;padding:10px}
.detail-grid{grid-template-columns:1fr}
.detail-photo{max-height:300px;aspect-ratio:auto}
.detail-photo img{height:300px}
.aside-note{display:none}
.panel{padding:20px}
.facts>div{grid-template-columns:1fr;gap:4px}
.section-grid{grid-template-columns:1fr}
.section-card{padding:18px}
.data-row{align-items:flex-start;flex-wrap:wrap;gap:5px}
.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.product-image{height:170px}
.product-info{padding:14px}
.product-meta{align-items:flex-start;flex-direction:column}
.footer{width:calc(100% - 32px);font-size:10px}
}
@media(max-width:360px){.product-grid{grid-template-columns:1fr}
.account-name{max-width:65px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.guest .app-shell{display:block}
.guest .sidebar{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:22px 32px;display:block}
.guest .app-main{min-height:calc(100dvh - 89px)}


.edit-form{max-width:760px}
.edit-row{border:1px solid var(--line);background:#fbfdfb;border-radius:12px;margin:0 0 16px;padding:8px 18px 18px;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px 18px;min-width:0}
.edit-row legend{padding:0 8px;font-size:12px;color:var(--muted)}
.edit-row .form-field{margin:6px 0}
.edit-row .errorlist{grid-column:1/-1}
.form-actions{margin-top:24px}
.edit-link{font-size:13px}
.small{font-size:12px;margin:4px 0 0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.row-toolbar{grid-column:1/-1;display:flex;gap:6px;align-items:center;justify-content:flex-end}
.row-position{margin-right:auto;color:var(--muted);font-size:12px}
.icon-button.danger{color:#a33d35}
.icon-button:disabled{opacity:.35;cursor:default}
.undo-row{display:none}
.row-deleted{background:#fff5f3;border-style:dashed}
.row-deleted .form-field,.row-deleted .errorlist,.row-deleted [data-row-action]:not([data-row-action=undo]){display:none}
.row-deleted .undo-row{display:inline-flex}
.edit-row[hidden]{display:none}
.back-link{display:inline-flex;margin-bottom:20px;font-size:13px;gap:8px;align-items:center}
.setting-actions{align-items:center;font-size:12px}
.move-setting{gap:0;align-items:center}
.tree-title{min-width:0}
.indent-1{margin-inline-start:18px}.indent-2{margin-inline-start:36px}.indent-3{margin-inline-start:54px}
.indent-4{margin-inline-start:72px}.indent-5{margin-inline-start:90px}.indent-6{margin-inline-start:108px}
.data-row>.actions{align-items:center}
.primary-values{margin:0 0 16px;font-size:12px}
.primary-values>div{display:flex;gap:6px;padding:2px 0;flex-wrap:wrap}
.primary-values dt{color:var(--muted)}
.primary-values dd{margin:0;overflow-wrap:anywhere}
.view-switch{display:flex;gap:3px;padding:3px;background:#edf3ee;border-radius:10px;font-size:12px}
.view-switch a{padding:6px 10px;color:var(--muted);border-radius:7px}
.view-switch a[aria-current=true]{background:white;color:var(--accent);box-shadow:0 1px 3px #20363212}
.product-grid.list-view{display:flex;flex-direction:column;gap:12px}
.list-view .product-card{display:grid;grid-template-columns:120px minmax(0,1fr)}
.list-view .product-image{height:100%;min-height:120px}
.list-view .image-placeholder{min-height:120px}
.list-view .product-info h3{margin-bottom:8px}
.list-view .primary-values{margin-bottom:8px}
.list-view .product-meta{justify-content:flex-start;gap:20px}
@media(max-width:600px){.list-view .product-card{grid-template-columns:80px minmax(0,1fr)}
.list-view .product-image,.list-view .image-placeholder{min-height:100px}
.list-view .product-meta{flex-direction:row;gap:10px}
.block-title{flex-wrap:wrap}
.setting-actions{gap:8px}
}

.stock-number{font-size:22px;color:var(--accent);font-weight:700;overflow-wrap:anywhere}
.sidenav{flex-wrap:wrap}
.import-target{margin-top:24px}
.import-fields{display:flex;align-items:end;gap:18px;flex-wrap:wrap}
.import-fields .form-field{flex:1;min-width:200px;margin:0}
.wb-select{display:flex;align-items:center;gap:10px;padding:16px;background:var(--paper);border-bottom:1px solid var(--line);cursor:pointer}
.wb-select input{width:18px;height:18px;flex:none}
[data-load-status]{display:block;margin-top:12px;color:var(--muted);line-height:1.6}
.product-card>a{color:inherit;text-decoration:none}

.wb-filters{margin-top:24px}
.count-toolbar{display:flex;align-items:end;gap:16px;flex-wrap:wrap}
.count-toolbar label span{display:block;margin-bottom:6px}
.count-toolbar .small{flex-basis:100%}
.count-choice{cursor:pointer;display:block}
.count-choice:has(input:checked){outline:2px solid var(--accent);background:var(--tint)}
.count-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr));gap:18px;margin-bottom:24px}
.count-card-heading{display:flex;align-items:center;gap:16px;margin-bottom:12px}
.count-card-heading img{width:64px;height:80px;object-fit:contain;border-radius:8px;background:var(--tint)}
.count-line{display:grid;grid-template-columns:1fr minmax(100px,160px);gap:10px;padding:16px 0;border-top:1px solid var(--line)}
.count-line input{width:100%}
.count-line input[name^=quantity]{background:#f1f8f1;font-weight:600}
.count-note{grid-column:1/-1}

/* Two-factor sign-in */
.two-factor-panel{max-width:620px;margin:0 auto 20px}
.two-factor-panel h2{font-size:18px;margin-bottom:10px}
.two-factor-steps{padding-left:20px;line-height:1.55}
.two-factor-steps li{margin-bottom:12px}
.qr-box{margin:12px 0 8px}
.qr-code{display:block;width:240px;height:auto;max-width:100%;background:#fff;border:1px solid var(--line);border-radius:10px}
.secret-key{font-size:14px;word-break:break-all;background:var(--tint);padding:2px 6px;border-radius:6px}
.recovery-codes{list-style:none;padding:0;margin:18px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.recovery-codes code{display:block;font-size:17px;letter-spacing:1px;text-align:center;padding:10px;border:1px dashed #b9cbbf;border-radius:10px;background:#fff}
.checkbox-field{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.checkbox-field label{display:inline;margin:0}
.checkbox-field .helptext{flex-basis:100%;margin-top:0}
.two-factor-exit{margin-top:12px}