:root{--ink:#18212f;--muted:#687386;--line:#dfe5ec;--bg:#f4f6f9;--panel:#fff;--primary:#155eef;--primary-dark:#124ec4;--danger:#c9362b;--success:#087f5b;--warn:#9a6700;--radius:12px;--shadow:0 1px 3px rgba(16,24,40,.08)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.55 system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif}a{color:var(--primary);text-decoration:none}h1{font-size:26px;margin:0 0 4px}h2{font-size:17px;margin:0 0 18px}.muted,.help,small{color:var(--muted)}.help{font-size:13px;margin-bottom:0}.topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 max(24px,calc((100% - 1280px)/2));gap:30px;position:sticky;top:0;z-index:5}.brand{display:flex;align-items:center;gap:9px;min-width:0;color:var(--ink);font-size:17px;font-weight:750;white-space:nowrap}.brand-title{max-width:260px;overflow:hidden;text-overflow:ellipsis}.brand-mark{display:inline-grid;place-items:center;width:34px;height:34px;flex:0 0 auto;border-radius:9px;background:linear-gradient(145deg,#155eef,#7849d6);color:#fff;font-weight:800}.brand-mark.large{width:52px;height:52px;border-radius:14px;margin:auto;font-size:22px}.topbar nav{display:flex;gap:4px;flex:1}.topbar nav a{padding:9px 10px;color:#3c4658;border-radius:7px}.topbar nav a:hover{background:#f1f4f8;color:var(--primary)}.account{display:flex;gap:12px;align-items:center}.account form{margin:0}.container{max-width:1280px;margin:0 auto;padding:28px 24px 60px}.auth-container{min-height:100vh;display:grid;place-items:center}.auth-card{width:min(400px,100%);padding:38px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 14px 40px rgba(30,42,70,.1);text-align:center}.auth-card h1{margin-top:16px}.stack{display:grid;gap:15px;text-align:left;margin-top:26px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;margin-bottom:18px}.panel.narrow{max-width:540px;margin:30px auto}.center{text-align:center}.page-heading{display:flex;align-items:flex-start;justify-content:space-between;margin:2px 0 22px}.page-heading p{margin:2px 0}.filter-grid,.form-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:16px;align-items:end}.mapping-grid{grid-template-columns:repeat(3,minmax(160px,1fr))}.full-row{grid-column:1/-1}label{display:grid;gap:6px;font-weight:650;color:#384354}input,select{width:100%;border:1px solid #cfd7e3;border-radius:8px;background:#fff;padding:9px 11px;min-height:40px;color:var(--ink);font:inherit}input:focus,select:focus{outline:2px solid rgba(21,94,239,.16);border-color:var(--primary)}input.short{width:110px}.checkbox{display:flex;align-items:center;gap:8px}.checkbox input{width:auto;min-height:auto}.actions,.inline-form,.row-actions{display:flex;align-items:center;gap:9px}.inline-form input{max-width:360px}.button,button{border:0;border-radius:8px;padding:9px 15px;min-height:38px;font:600 14px inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.primary{background:var(--primary);color:#fff}.primary:hover{background:var(--primary-dark)}.secondary{background:#eaf0ff;color:#174ea6}.ghost{border:1px solid var(--line);background:#fff;color:#455166}.full{width:100%}.link-button,.danger-link{background:none;padding:2px;color:var(--primary);min-height:auto}.danger-link{color:var(--danger)}.notice{background:#fff5d9;color:#7a5200;padding:11px;border-radius:8px}.flash{padding:12px 15px;border-radius:9px;margin-bottom:16px;border:1px solid}.flash.success{background:#eafaf4;color:#066b4b;border-color:#bdebd9}.flash.error{background:#fff0ef;color:#9e261e;border-color:#f0c5c1}.table-panel{padding:0;overflow:hidden}.table-panel h2,.table-meta{padding:18px 20px 0}.table-meta{color:var(--muted);padding-bottom:11px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th{text-align:left;color:#5b6575;font-size:12px;text-transform:uppercase;letter-spacing:.02em;background:#f8fafc}th,td{padding:12px 16px;border-bottom:1px solid #e8ecf1;vertical-align:middle}tr:last-child td{border-bottom:0}.code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:700}.empty{text-align:center;color:var(--muted);padding:36px!important}.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{background:#edf2f8;border-radius:99px;padding:3px 9px}.chip b{color:var(--primary);margin-left:3px}.low-stock{background:#fffcf2}.badge{display:inline-block;font-size:11px;padding:2px 7px;border-radius:99px;margin-left:7px}.badge.warning{background:#fff0c2;color:#805600}.badge.success{background:#dff8ed;color:#087452}.badge.neutral{background:#e9edf3;color:#566173}.threshold-form{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin:-10px 0 10px}.threshold-form label{display:flex;align-items:center}.threshold-form input{width:82px;min-height:32px;padding:4px 8px}.steps{display:flex;gap:8px;margin-bottom:18px}.steps span{flex:1;background:#e6eaf0;color:#7a8493;padding:9px;text-align:center;border-radius:8px;font-weight:650}.steps .active{background:#dfe9ff;color:#174ea6}.accent-panel{border-top:3px solid var(--primary)}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.stat{background:#fff;padding:18px;border:1px solid var(--line);border-radius:10px}.stat span{display:block;color:var(--muted)}.stat strong{display:block;font-size:25px;margin-top:4px}.stat.success strong{color:var(--success)}.stat.danger strong{color:var(--danger)}.report-list{margin:0;padding-left:22px}.warning-list li{margin:7px 0;color:#7a5200}
@media(max-width:900px){.topbar{height:auto;flex-wrap:wrap;padding:12px 16px;gap:8px}.topbar nav{order:3;width:100%;overflow:auto}.container{padding:20px 14px}.filter-grid,.form-grid,.mapping-grid{grid-template-columns:repeat(2,1fr)}.stat-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.filter-grid,.form-grid,.mapping-grid{grid-template-columns:1fr}.page-heading{gap:12px;align-items:stretch;flex-direction:column}.stat-grid{grid-template-columns:1fr 1fr}.account{margin-left:auto}.brand{font-size:0}.topbar nav a{padding:7px}.panel{padding:16px}}

body.login-page{min-height:100vh;background-color:#41657d;background-image:var(--login-background-image);background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed;isolation:isolate}
body.login-page::before{content:"";position:fixed;inset:0;background:rgba(13,31,45,.12);z-index:-1}
body.login-page .auth-container{position:relative;z-index:1;padding:28px 18px}
.auth-stage{width:min(400px,100%)}
body.login-page .auth-card{width:100%;padding:36px;background:rgba(235,244,250,.34);border:1px solid rgba(255,255,255,.78);border-radius:8px;box-shadow:0 24px 70px rgba(8,24,38,.34),inset 0 1px 0 rgba(255,255,255,.88),inset 0 0 28px rgba(255,255,255,.12);backdrop-filter:blur(14px) saturate(170%) brightness(1.08);-webkit-backdrop-filter:blur(14px) saturate(170%) brightness(1.08)}
body.login-page .auth-card h1{color:#112739;font-size:25px;margin-top:0;overflow-wrap:anywhere;text-shadow:0 1px 1px rgba(255,255,255,.55)}
body.login-page .auth-subtitle{color:#354f62;margin:4px 0 0;text-shadow:0 1px 1px rgba(255,255,255,.42)}
body.login-page .auth-card label{color:#25394a}
body.login-page .auth-card input{background:rgba(255,255,255,.58);border-color:rgba(255,255,255,.72);box-shadow:inset 0 1px 2px rgba(24,50,70,.1),0 0 0 1px rgba(68,96,118,.18)}
body.login-page .auth-card input:focus{background:#fff;border-color:#0f6cbd;outline:2px solid rgba(15,108,189,.2)}
body.login-page .auth-card .primary{background:#0f6cbd}
body.login-page .auth-card .primary:hover{background:#0c5799}
.login-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.login-actions button{width:100%}
.register-button{background:rgba(255,255,255,.68);color:#17384f;border:1px solid rgba(255,255,255,.86);box-shadow:0 1px 2px rgba(24,50,70,.12)}
.register-button:hover{background:rgba(255,255,255,.9)}
.register-dialog{width:min(440px,calc(100% - 28px));padding:28px;border:1px solid rgba(255,255,255,.82);border-radius:8px;background:rgba(238,246,251,.82);box-shadow:0 28px 80px rgba(8,24,38,.42),inset 0 1px 0 rgba(255,255,255,.9);backdrop-filter:blur(24px) saturate(160%);-webkit-backdrop-filter:blur(24px) saturate(160%);color:var(--ink)}
.register-dialog::backdrop{background:rgba(10,25,36,.42);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.dialog-heading h2{margin:0}.dialog-heading p{margin:3px 0 0;color:#506273}.dialog-close{width:36px;height:36px;min-height:36px;padding:0;border-radius:50%;background:rgba(255,255,255,.62);color:#344a5a;font-size:25px;line-height:1}.dialog-close:hover{background:#fff}.register-form{margin-top:20px}
.account-settings-heading{width:min(900px,100%);margin-left:auto;margin-right:auto}.account-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;width:min(900px,100%);margin:0 auto}.account-settings-grid .panel.narrow{width:100%;max-width:none;margin:0}.compact-stack{margin-top:0}
.user-create-form{grid-template-columns:repeat(5,minmax(140px,1fr)) auto}.user-list{display:grid;grid-template-columns:1fr;gap:18px}.user-item{padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.user-item-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}.user-item-heading h2{margin:0}.user-item-heading p{margin:3px 0 0;color:var(--muted)}.user-item-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:end}.user-edit-form{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr)) auto;gap:16px;align-items:end}.user-edit-form>button{white-space:nowrap}.user-delete-form{margin:0 0 7px}.super-admin-actions{display:flex;justify-content:flex-end}.profile-button{white-space:nowrap}
.nav-count{display:inline-grid;place-items:center;min-width:19px;height:19px;margin-left:5px;padding:0 5px;border-radius:10px;background:#d92d20;color:#fff;font-size:11px;font-weight:750}.review-actions{display:flex;align-items:center;gap:12px}.review-actions form{margin:0}.review-actions button{min-height:32px;padding:6px 12px}
.login-settings-heading,.login-settings-panel{width:min(1140px,100%);margin-left:auto;margin-right:auto}
.login-settings-panel{max-width:none}
.login-settings-form{display:grid;gap:22px}
.background-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;border:0;padding:0;margin:0}
.background-options legend{font-weight:650;color:#384354;margin-bottom:8px}
.choice{display:flex;align-items:center;gap:9px;min-height:48px;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer}
.choice:has(input:checked){border-color:var(--primary);background:#eef4ff;box-shadow:0 0 0 1px var(--primary)}
.choice input{width:18px;min-height:18px;margin:0;accent-color:var(--primary)}
.preview-heading{margin-bottom:10px}
.login-preview-scene{position:relative;display:grid;place-items:center;width:100%;aspect-ratio:16/8;min-height:330px;overflow:hidden;background-color:#41657d;background-position:center;background-size:cover;border:1px solid var(--line);border-radius:8px;isolation:isolate}
.login-preview-scene::before{content:"";position:absolute;inset:0;background:rgba(13,31,45,.12);z-index:-1}
.preview-auth-card{width:min(310px,calc(100% - 32px));padding:24px;background:rgba(235,244,250,.34);border:1px solid rgba(255,255,255,.78);border-radius:8px;box-shadow:0 18px 48px rgba(8,24,38,.32),inset 0 1px 0 rgba(255,255,255,.88);backdrop-filter:blur(12px) saturate(170%) brightness(1.08);-webkit-backdrop-filter:blur(12px) saturate(170%) brightness(1.08);color:#112739}
.preview-auth-card h3{margin:0;text-align:center;font-size:19px;overflow-wrap:anywhere;text-shadow:0 1px 1px rgba(255,255,255,.55)}
.preview-auth-card>p{margin:2px 0 16px;text-align:center;color:#354f62;font-size:12px}
.preview-field{display:grid;gap:3px;margin-top:9px;font-size:11px;font-weight:650}
.preview-field i{display:block;height:31px;background:rgba(255,255,255,.58);border:1px solid rgba(255,255,255,.72);border-radius:6px;box-shadow:inset 0 1px 2px rgba(24,50,70,.1),0 0 0 1px rgba(68,96,118,.18)}
.preview-login-button{display:grid;place-items:center;height:31px;margin-top:13px;border-radius:6px;background:#0f6cbd;color:#fff;font-size:12px;font-weight:650}
@media(max-width:900px){.user-create-form{grid-template-columns:repeat(2,1fr)}.user-list,.account-settings-grid{grid-template-columns:1fr}.user-item-controls{grid-template-columns:1fr}.user-edit-form{grid-template-columns:repeat(2,1fr)}.user-delete-form{margin:0}.profile-button{width:max-content}}
@media(max-width:560px){body.login-page .auth-card{padding:30px 22px}.background-options{grid-template-columns:1fr}.login-preview-scene{aspect-ratio:4/3;min-height:300px}.register-dialog{padding:22px}.user-create-form,.user-edit-form{grid-template-columns:1fr}.login-actions{grid-template-columns:1fr 1fr}}

.flash-stack{position:fixed;z-index:100;top:50%;left:50%;display:grid;gap:10px;width:min(560px,calc(100% - 32px));transform:translate(-50%,-50%);pointer-events:none}
.flash{padding:14px 18px;margin:0;border:1px solid;border-radius:8px;box-shadow:0 16px 48px rgba(16,24,40,.22);text-align:center;font-weight:650;animation:flash-pop 3.2s ease forwards}
.flash.success{background:#eafaf4;color:#066b4b;border-color:#bdebd9}
.flash.error{background:#fff0ef;color:#9e261e;border-color:#f0c5c1}
.flash.warning{background:#fff5d9;color:#7a5200;border-color:#f1d58a}
@keyframes flash-pop{0%{opacity:0;transform:translateY(8px) scale(.98)}10%,72%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-6px) scale(.99)}}

.inventory-heading-actions{display:flex;align-items:center;gap:18px}
.inventory-source-name{margin-left:8px;color:var(--danger);font-size:.5em;font-weight:400}
.dashboard-stats .stat small{display:block;color:var(--muted);margin-top:4px}.low-stock-value{color:var(--danger)}
.dashboard-store-panel{margin-bottom:18px}
.backup-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch;margin-bottom:18px}
.backup-panel{max-width:none;margin:0;min-width:0}
.backup-restore-form{align-items:center;flex-wrap:wrap}
.backup-restore-form input[type=file]{min-width:0;flex:1 1 240px}
.backup-buttons{justify-content:center;flex-wrap:wrap;gap:18px;margin-top:18px;padding-top:2px}
.backup-buttons form{display:flex;margin:0}
.backup-buttons .button,.backup-buttons button{min-width:96px}
.backup-download{background:#e7f7ef;color:#087452}
.backup-download:hover{background:#d3f0e1}
.backup-delete,.danger{background:var(--danger);color:#fff}
.backup-delete:hover,.danger:hover{background:#a92d25}
.database-cleanup-panel{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 22px;border-color:#efd0cd;background:#fffafa}
.database-cleanup-copy{display:flex;align-items:flex-start;gap:13px;min-width:0}
.database-cleanup-copy h2{margin:0 0 3px}
.database-cleanup-copy p{margin:0}
.database-cleanup-copy b{color:#8f2f28}
.database-cleanup-mark{display:grid;width:30px;height:30px;flex:0 0 auto;place-items:center;border-radius:50%;background:#fde8e6;color:var(--danger);font-weight:800}
.database-cleanup-panel form{flex:none;margin:0}
.database-recovery-help{margin-top:5px!important;color:#667085;font-size:13px}
.database-recovery-help time{color:#344054;font-weight:700}
.database-history-actions{display:flex;flex:none;align-items:center;gap:12px}
.database-clear-orders{border:1px solid #e6a9a4;background:#fff;color:var(--danger)}
.database-clear-orders:hover:not(:disabled){background:#fff0ef;border-color:#d96f67}
.database-restore-orders{border:1px solid #9ab9de;background:#eef5ff;color:#285f9e}
.database-restore-orders:hover:not(:disabled){border-color:#6894c7;background:#dfeeff}
.database-restore-confirm{background:#2f6fad;color:#fff}
.database-restore-confirm:hover{background:#265d91}
.database-clear-orders:disabled,.database-restore-orders:disabled{cursor:not-allowed;opacity:.45}

.permission-heading,.permission-form{width:min(1120px,100%);margin-left:auto;margin-right:auto}
.permission-panel{padding:0;overflow:hidden}
.permission-table-wrap{overflow:auto}
.permission-table{min-width:640px;table-layout:fixed;border-collapse:collapse}
.permission-table thead th:first-child,.permission-table tbody th{width:46%}
.permission-table thead th:not(:first-child),.permission-table td{width:18%;text-align:center}
.permission-table thead th{height:46px;padding:10px 16px;border-bottom:1px solid var(--line);background:#f8fafc}
.permission-table tbody tr{height:59px}
.permission-table tbody th,.permission-table tbody td{height:59px;padding:8px 16px;border-bottom:1px solid var(--line);vertical-align:middle}
.permission-table tbody tr:last-child th,.permission-table tbody tr:last-child td{border-bottom:1px solid var(--line)}
.permission-table tbody th{font-weight:600;text-transform:none;letter-spacing:0;background:#f8fafc}
.permission-feature{display:block;color:var(--ink);font-size:14px;line-height:20px}
.permission-table tbody th small{display:block;margin-top:2px;color:var(--muted);font-size:12px;font-weight:400;line-height:16px}
.permission-check{display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;cursor:pointer}
.permission-check input{position:absolute;width:1px;height:1px;opacity:0}
.permission-check span{display:grid;place-items:center;width:20px;height:20px;border:1px solid #b7c0cd;border-radius:5px;background:#fff;transition:background .15s,border-color .15s,box-shadow .15s}
.permission-check input:checked+span{border-color:#087452;background:#087452}
.permission-check input:checked+span::after{content:"";width:9px;height:5px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translate(1px,-1px)}
.permission-check input:focus-visible+span{outline:3px solid rgba(15,108,189,.25);outline-offset:2px}
.permission-check input:disabled+span{border-color:#087452;background:#087452;cursor:not-allowed}
.permission-locked{display:inline-block;padding:4px 9px;border-radius:5px;background:#f0f2f5;color:#667085;font-size:12px}
.permission-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:72px;padding:14px 20px;border-top:1px solid #e8ecf1}
.permission-footer p{margin:0;font-size:13px}
@media(max-width:640px){.permission-footer{align-items:stretch;flex-direction:column}.permission-footer button{width:100%}}
.restore-warning{background:#fff0ef;color:#9e261e;border:1px solid #f0c5c1}
.database-operation-table td:first-child{white-space:normal;overflow-wrap:anywhere;min-width:220px}
.operation-label{display:inline-block;min-width:42px;text-align:center;padding:3px 9px;border-radius:6px;background:#eef4ff;color:#174ea6;font-weight:650}
.badge.failure{background:#fff0ef;color:#9e261e}
.operation-details{display:block;max-width:280px;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inventory-heading-actions .threshold-form{display:flex;align-items:center;justify-content:flex-start;gap:8px;margin:0}
.inventory-heading-actions .threshold-form label{display:flex;align-items:center;white-space:nowrap}
.inventory-heading-actions .threshold-form input{width:82px;min-height:38px;padding:4px 8px}
.inventory-result-meta{margin:4px 0 12px;color:var(--muted)}
.inventory-card-list{display:grid;gap:16px}
.inventory-result-card{overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow)}
.inventory-group-table{table-layout:fixed;min-width:1120px}
.inventory-group-table .inventory-col-image{width:226px}
.inventory-group-table .inventory-col-style{width:15ch}
.inventory-group-table .inventory-col-name{width:230px}
.inventory-group-table .inventory-col-price{width:110px}
.inventory-group-table .inventory-col-size{width:85px}
.inventory-group-table .inventory-col-total{width:120px}
.inventory-group-table .inventory-col-stores{width:auto}
.inventory-group-table th,.inventory-group-table td{white-space:normal}
.inventory-group-table td.code,.inventory-group-table th{white-space:nowrap}
.inventory-group-table td.code{width:15ch;max-width:15ch;overflow:hidden;text-overflow:ellipsis}
.inventory-group-table td:nth-child(3){overflow-wrap:anywhere}
.inventory-group-table .group-column{width:226px;text-align:center}
.inventory-group-cell{width:226px;padding:12px;text-align:center;vertical-align:middle;border-right:1px solid var(--line);background:#f8fafc}
.style-image-button{display:grid;place-items:center;width:200px;height:200px;min-height:200px;margin:auto;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--muted)}
.style-image-button:hover{border-color:var(--primary);box-shadow:0 0 0 2px rgba(21,94,239,.12)}
.style-image-button img{display:block;width:200px;height:200px;object-fit:contain;background:#fff}
.style-image-button img[hidden]{display:none}
.style-image-fallback{font-size:13px}
.style-image-dialog{max-width:calc(100vw - 40px);max-height:calc(100vh - 40px);padding:18px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 28px 90px rgba(15,23,42,.38)}
.style-image-dialog::backdrop{background:rgba(15,23,42,.58);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.style-image-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:14px}.style-image-dialog-heading h2{margin:0}.style-image-original-wrap{display:grid;place-items:center;min-width:280px;min-height:180px}.style-image-original-wrap img{display:block;width:auto;height:auto;max-width:calc(100vw - 76px);max-height:calc(100vh - 120px);object-fit:contain}.style-image-original-wrap p{color:var(--muted)}
.style-image-original-wrap img[hidden]{display:none}
.inventory-edit-button{min-height:24px;padding:2px 7px;margin-left:6px;border:1px solid #cfd7e3;border-radius:5px;background:#fff;color:#455166;font-size:12px;font-weight:600}
.inventory-edit-button:hover{border-color:var(--primary);color:var(--primary);background:#f5f8ff}
.inventory-edit-dialog{width:min(390px,calc(100vw - 32px));padding:22px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.28)}
.inventory-edit-dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.inventory-edit-form{display:grid;gap:14px}.inventory-edit-form label{gap:6px}.inventory-edit-actions{justify-content:flex-end;margin-top:4px}
.image-settings-heading,.image-settings-panel{width:min(900px,100%);margin-left:auto;margin-right:auto}.image-url-example{display:grid;gap:6px;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:#f8fafc}.image-url-example span{color:var(--muted);font-size:12px}.image-url-example code{overflow-wrap:anywhere;color:#174ea6}
.inventory-result-card tr:last-child td{border-bottom:0}
.inventory-result-card tbody tr,.inventory-result-card tbody tr.low-stock{background:#fff}
.inventory-empty{margin:0}
.pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:20px}
.pagination span{color:var(--muted)}
.audit-log-card{padding:0;overflow:hidden;border-radius:14px}
.audit-import-card{padding:0;overflow:hidden;border-radius:14px}
.audit-log-card-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px 16px;background:linear-gradient(180deg,#fff,#fbfcfe);border-bottom:1px solid #edf0f4}
.audit-log-card-heading h2{margin:0 0 3px;font-size:18px}
.audit-log-card-heading p{margin:0;font-size:13px}
.audit-log-count{padding:5px 10px;border-radius:99px;background:#eef4ff;color:#174ea6;font-size:12px;white-space:nowrap}
.audit-log-table{table-layout:fixed}
.audit-log-table th,.audit-log-table td{padding:13px 22px}
.audit-log-table th:nth-child(1),.audit-log-table td:nth-child(1){width:22%}
.audit-log-table th:nth-child(2),.audit-log-table td:nth-child(2){width:18%}
.audit-log-table th:nth-child(3),.audit-log-table td:nth-child(3){width:60%}
.audit-log-table td:nth-child(3){white-space:normal;overflow-wrap:anywhere}
.audit-log-table tbody tr{transition:background .15s ease}
.audit-log-table tbody tr.audit-log-row:hover{background:#f7faff}
.audit-import-table tbody tr:hover{background:#f7faff}
.audit-import-table th,.audit-import-table td{padding:13px 16px}
.audit-import-table td:nth-child(4){white-space:normal;overflow-wrap:anywhere;min-width:150px}
.audit-log-pagination{padding:14px 20px 18px;margin-top:0;border-top:1px solid #edf0f4}
.audit-log-card.is-loading{opacity:.62;pointer-events:none}
@media(max-width:900px){.inventory-heading-actions{align-items:flex-end;flex-direction:column;gap:8px}}
@media(max-width:560px){.inventory-heading-actions{align-items:stretch}.inventory-heading-actions .threshold-form{justify-content:space-between}.pagination{justify-content:space-between}}
.main-nav{align-items:center}
.nav-group{position:relative;display:flex;align-items:center}
.nav-group-trigger{padding:9px 10px;min-height:38px;background:transparent;color:#3c4658;font-weight:500}
.nav-group-trigger:hover,.nav-group:focus-within .nav-group-trigger{background:#f1f4f8;color:var(--primary)}
.nav-submenu{position:absolute;top:calc(100% + 7px);left:0;z-index:20;display:none;min-width:142px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:9px;box-shadow:0 12px 28px rgba(16,24,40,.14)}
.nav-submenu::before{content:"";position:absolute;top:-8px;left:0;right:0;height:8px}
.nav-group:hover .nav-submenu,.nav-group:focus-within .nav-submenu{display:grid}
.nav-submenu a{display:block;padding:9px 12px;white-space:nowrap}
.nav-submenu a:hover{background:#f1f4f8;color:var(--primary)}
@media(max-width:760px){.backup-actions-grid{grid-template-columns:1fr}.database-cleanup-panel{align-items:stretch;flex-direction:column}.database-history-actions{width:100%;align-items:stretch;flex-direction:column}.database-cleanup-panel form,.database-clear-orders,.database-restore-orders{width:100%}}
.product-archive-panel{padding:0;overflow:hidden}
.container.product-archive-container{max-width:1680px}
.product-archive-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 22px 16px;border-bottom:1px solid #edf0f4;background:#fff}
.product-archive-heading h1{font-size:21px;margin:0}
.product-archive-heading p{margin:3px 0 0}
.product-archive-heading form{margin:0}
.product-archive-heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px}
.product-archive-heading #archive-export-form{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.archive-normal-button{background:#059669;color:#fff;border-color:#059669}
.archive-normal-button:hover{background:#047857;border-color:#047857}
.archive-multi-code-button{background:#7c3aed;color:#fff;border-color:#7c3aed}
.archive-multi-code-button:hover{background:#6d28d9;border-color:#6d28d9}
.product-archive-import{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:16px 22px;border-bottom:1px solid #edf0f4;background:#f8fafc}
.product-archive-file{display:flex;align-items:center;gap:12px;min-width:min(380px,100%)}
.product-archive-file input{max-width:340px;padding:5px 8px;min-height:38px}
.product-archive-search{padding:16px 22px 12px}
.product-archive-search input{max-width:400px}
.product-archive-table{table-layout:auto;width:max-content;min-width:100%}
.product-archive-table th,.product-archive-table td{width:auto;padding-left:clamp(10px,1.1vw,18px);padding-right:clamp(10px,1.1vw,18px);white-space:nowrap}
.product-archive-table th:first-child,.product-archive-table td:first-child{width:1%;min-width:48px;text-align:center}
.product-archive-table :is(.archive-field-brand,.archive-field-category,.archive-field-series,.archive-field-gender,.archive-field-season,.archive-field-product_season,.archive-field-size,.archive-field-tag_price){width:1%}
.product-archive-table input[type=checkbox]{width:17px;height:17px;min-height:17px;margin:0;accent-color:var(--primary);vertical-align:middle}
.product-archive-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:58px;padding:8px 22px;border-top:1px solid #edf0f4}
.product-archive-footer .pagination{margin:0}
.archive-mapping-section{padding:18px 22px;border-bottom:1px solid #edf0f4;background:#fff}
.archive-mapping-heading{margin-bottom:14px}
.archive-mapping-heading h2{margin:0 0 3px}
.archive-mapping-heading p{margin:0}
.archive-mapping-form{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px;align-items:end}
.archive-mapping-select.archive-skip-selected{color:var(--danger);font-weight:650}
.archive-mapping-select option{color:var(--ink);font-weight:400}
.archive-mapping-select option.archive-skip-option{color:var(--danger);font-weight:650}
.archive-mapping-actions{grid-column:1/-1;margin-top:4px}
.archive-header-preview{display:grid;gap:8px;margin-top:16px;padding-top:14px;border-top:1px solid #edf0f4}
.archive-header-preview>div{display:flex;flex-wrap:wrap;gap:7px}
.archive-header-preview span{padding:4px 8px;border:1px solid var(--line);border-radius:6px;background:#f8fafc;color:#465367;font-size:12px}
.archive-key-hint{color:var(--primary);font-size:11px;font-weight:500}
.archive-clear-dialog{width:min(440px,calc(100vw - 32px));padding:0;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);box-shadow:0 24px 72px rgba(15,23,42,.3)}
.archive-clear-dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.archive-clear-dialog-form{display:grid;gap:14px;padding:24px}
.archive-clear-dialog-form h2{margin:0}
.archive-clear-dialog-form p{margin:0;color:var(--muted)}
.archive-clear-dialog-form label{font-size:13px}
.archive-clear-dialog-form input{width:100%}
.archive-clear-phrase{font-weight:750;color:var(--danger);user-select:none;-webkit-user-select:none}
.archive-clear-input-warning{margin:-5px 0 0!important;color:var(--danger)!important;font-size:12px}
.archive-clear-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:4px}
.archive-clear-actions button:disabled{cursor:not-allowed;opacity:.48}
@media(max-width:900px){.archive-mapping-form{grid-template-columns:repeat(2,minmax(140px,1fr))}}
@media(max-width:600px){.product-archive-heading{align-items:flex-start;padding:16px;flex-direction:column}.product-archive-heading-actions{width:100%;justify-content:space-between}.product-archive-import,.product-archive-search{padding-left:16px;padding-right:16px}.product-archive-file{align-items:stretch;flex-direction:column;gap:5px}.product-archive-footer{align-items:flex-start;flex-direction:column;padding:12px 16px}.product-archive-footer .pagination{width:100%}.archive-mapping-section{padding:16px}.archive-mapping-form{grid-template-columns:1fr}}
.order-return-import-row{display:flex;align-items:flex-end;justify-content:space-between;gap:32px}
.order-return-import-row>.page-heading{flex:1 1 auto;min-width:0;margin:0}
.order-return-import-form{display:flex;flex:0 0 auto;align-items:flex-end;gap:16px;margin:0}
.order-return-file-field{position:relative;display:flex;align-items:center;width:285px;min-height:40px;gap:10px;padding:4px 10px;border:1px solid #cfd7e3;border-radius:8px;background:#fff;overflow:hidden;cursor:pointer}
.order-return-file-field>input[type=file]{position:absolute;inset:0;z-index:2;width:100%;height:100%;min-height:0;padding:0;border:0;opacity:0;cursor:pointer}
.order-return-file-button{flex:0 0 auto;padding:3px 9px;border:1px solid #aeb8c5;border-radius:4px;background:#f8fafc;color:#263244;font-weight:600}
.order-return-file-name{min-width:0;overflow:hidden;color:#384354;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.order-return-file-field:focus-within{border-color:var(--primary);outline:2px solid rgba(21,94,239,.16)}
.order-return-import-form>.actions{padding-bottom:1px}
@media(max-width:900px){.order-return-import-row{align-items:stretch;flex-direction:column;gap:18px}.order-return-import-form{width:100%}.order-return-file-field{width:auto;flex:1 1 auto}}
@media(max-width:560px){.order-return-import-form{align-items:stretch;flex-direction:column}.order-return-import-form>.actions,.order-return-import-form>.actions button{width:100%}}
.return-sort-toolbar{position:sticky;top:64px;z-index:4;display:flex;align-items:flex-end;justify-content:space-between;gap:18px;box-shadow:0 4px 14px rgba(16,24,40,.12)}
.container.return-order-container{max-width:1680px}
.return-search-form,.return-task-actions,.return-box-create-form,.return-sheet-form{display:flex;align-items:flex-end;gap:8px;margin:0}
.return-search-form{flex:0 1 340px}.return-search-form label{flex:1}.return-task-actions{flex-wrap:wrap;justify-content:flex-end}
.return-box-create-form input,.return-sheet-form input{width:170px}
.return-sort-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:18px;align-items:start}
.return-order-list{min-width:0;padding:0;overflow:hidden}
.return-panel-heading{padding:16px 18px;border-bottom:1px solid #edf0f4;background:#fff}
.return-panel-heading h2,.return-box-area-heading h2{margin:0 0 3px;font-size:17px}
.return-panel-heading p,.return-box-area-heading p{margin:0;font-size:12px}
.return-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-top:1px solid #edf0f4;color:var(--muted);font-size:12px}.return-pagination>div{display:flex;gap:8px}.return-pagination .button{min-height:32px;padding:6px 11px}
.return-order-table{width:max-content;min-width:100%;font-size:12px;table-layout:auto}
.return-order-table th,.return-order-table td{width:auto;padding:9px 10px;white-space:nowrap}
.return-order-row{cursor:grab}.return-order-row:active{cursor:grabbing}.return-order-index{width:56px;color:var(--muted);font-weight:700;text-align:center;white-space:nowrap}
.return-box-area{position:relative;min-height:620px;padding:0 12px 24px;overflow:visible}
.return-box-area-heading{position:sticky;top:0;z-index:3;display:flex;align-items:baseline;gap:12px;padding:14px 8px;background:rgba(244,246,249,.94);backdrop-filter:blur(6px)}
.return-box-area-heading h2{margin:0;white-space:nowrap}.return-box-area.is-empty{display:flex;min-height:620px;flex-direction:column}.return-box-area.is-empty .return-box-empty-state{display:grid;flex:1;min-height:520px;place-items:center;padding:24px;text-align:center;font-size:22px;color:#5e6b7d}
.return-box-area-heading .return-box-area-help{position:static;margin:0;padding:0;border:0;font-size:12px}
.return-box{position:absolute;z-index:2;width:fit-content;min-width:0;max-width:calc(100% - 24px);min-height:190px;background:var(--box-tint,#fff);border:2px solid var(--box-accent,#cfd7e3);border-radius:8px;box-shadow:0 8px 24px rgba(16,24,40,.14);overflow:hidden;transition:box-shadow .15s ease,transform .15s ease}
.return-box-resize{position:absolute;right:2px;bottom:2px;width:16px;height:16px;cursor:nwse-resize;touch-action:none;z-index:2;background:linear-gradient(135deg,transparent 0 42%,var(--box-accent,#667085) 43% 50%,transparent 51% 62%,var(--box-accent,#667085) 63% 70%,transparent 71%)}
.return-box:hover{box-shadow:0 12px 30px rgba(16,24,40,.2);transform:translateY(-1px)}
.return-box-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;background:#f8fafc;border-bottom:1px solid var(--line)}
.return-box-color-0{--box-accent:#ff4d6d;--box-tint:#fff1f3}.return-box-color-0 .return-box-header{background:#ff4d6d;color:#fff}
.return-box-color-1{--box-accent:#ff9f1c;--box-tint:#fff7e8}.return-box-color-1 .return-box-header{background:#ff9f1c;color:#4a2700}
.return-box-color-2{--box-accent:#2ec4b6;--box-tint:#eafff9}.return-box-color-2 .return-box-header{background:#2ec4b6;color:#063d39}
.return-box-color-3{--box-accent:#3a86ff;--box-tint:#edf5ff}.return-box-color-3 .return-box-header{background:#3a86ff;color:#fff}
.return-box-color-4{--box-accent:#8338ec;--box-tint:#f5efff}.return-box-color-4 .return-box-header{background:#8338ec;color:#fff}
.return-box-color-5{--box-accent:#06d6a0;--box-tint:#eafff7}.return-box-color-5 .return-box-header{background:#06d6a0;color:#063d2e}
.return-box-color-6{--box-accent:#ef476f;--box-tint:#fff0f4}.return-box-color-6 .return-box-header{background:#ef476f;color:#fff}
.return-box-color-7{--box-accent:#118ab2;--box-tint:#eafaff}.return-box-color-7 .return-box-header{background:#118ab2;color:#fff}
.return-box-header .return-box-drag{color:inherit}.return-box-header .return-box-delete{color:inherit}.return-box-header .return-box-delete:hover{background:rgba(255,255,255,.72);color:var(--danger)}
.return-box-header form,.return-box-item form{margin:0}
.return-box-drag{flex:1;min-width:0;cursor:move;touch-action:none;font-weight:750;color:#263244}
.return-box-piece-count{margin-left:5px;font-weight:600;opacity:.9}
.return-box-delete,.return-box-item-remove{width:28px;height:28px;min-height:28px;padding:0;background:transparent;color:#667085;font-size:20px;line-height:1}
.return-box-delete:hover,.return-box-item-remove:hover{background:#fff0ef;color:var(--danger)}
.return-box-body{display:grid;gap:7px;min-height:124px;padding:10px;align-content:start}
.return-box-body.is-drag-over{outline:2px dashed var(--primary);outline-offset:-4px;background:#eef4ff}
.return-box-item{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:8px;border:1px solid #e4e8ee;border-radius:6px;background:#fff;cursor:grab}
.return-box-body{display:block;overflow:hidden;min-height:124px;padding:0}
.return-box-table{width:max-content;min-width:100%;table-layout:auto;font-size:13px;white-space:nowrap}
.return-box-table th,.return-box-table td{width:auto;padding:9px 8px;white-space:nowrap;vertical-align:top}
.return-box-table th{background:rgba(255,255,255,.62);color:#475467;font-size:12px}
.return-box-table .return-box-item{display:table-row;cursor:grab;background:transparent;border:0;padding:0}
.return-box-table .return-box-item:active{cursor:grabbing}
.return-box-table .return-box-item td{background:transparent}
.return-box-table .return-box-item-index{text-align:center;color:var(--muted);font-weight:700}
.return-box-table .return-box-item-action{width:30px;padding:3px}
.return-box-table .return-box-action-heading{width:30px}
.return-box-table .return-box-empty{text-align:center;color:var(--muted);padding:28px 14px!important}
.return-box-table tr:last-child td{border-bottom:0}
.return-box-empty,.return-box-empty-state{margin:0;padding:24px 12px;color:var(--muted);text-align:center}
.return-task-modal{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:18px;background:rgba(15,23,42,.48)}
.return-task-modal-card{width:min(440px,100%);padding:24px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 24px 72px rgba(15,23,42,.3)}
.return-task-modal-card h2{margin:0 0 8px;font-size:19px}.return-task-modal-card p{color:var(--muted)}
.return-task-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.return-task-modal-actions form{margin:0}
.return-delete-modal[hidden]{display:none}
.return-delete-modal{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.48)}
.return-delete-modal-card{width:min(440px,100%);padding:24px;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 24px 72px rgba(15,23,42,.3)}
.return-delete-modal-card h2{margin:0 0 8px;font-size:19px}.return-delete-modal-card p{margin:0;color:var(--muted);line-height:1.6}
@media(max-width:1000px){.return-sort-toolbar{align-items:stretch;flex-direction:column}.return-task-actions{justify-content:flex-start}.return-sort-layout{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}}
@media(max-width:700px){.return-sort-layout{grid-template-columns:1fr}.return-box-area{min-height:480px}.return-box{width:min(100%,560px);min-width:0;max-width:calc(100% - 24px)}.return-search-form{flex-basis:auto}}
@media(max-width:560px){.return-task-actions,.return-box-create-form,.return-sheet-form{width:100%;align-items:stretch;flex-direction:column}.return-box-create-form input,.return-sheet-form input{width:100%}.return-task-actions>.button,.return-task-actions form button{width:100%}.return-task-modal-actions{align-items:stretch;flex-direction:column}.return-task-modal-actions>*{width:100%}.return-task-modal-actions button{width:100%}}

/* Order history and period-scoped inventory matching */
.return-filter-panel{position:sticky;top:64px;z-index:4;padding:16px 18px 14px;box-shadow:0 4px 14px rgba(16,24,40,.12)}
.return-filter-form{display:grid;grid-template-columns:190px 190px minmax(260px,1fr) auto auto;gap:12px;align-items:center}
.return-date-field{min-width:0}
.return-date-label{font-weight:650;color:#384354}
.return-date-trigger{width:100%;min-height:44px;display:flex;gap:9px;justify-content:flex-start;padding:10px 12px;border:1px solid #d7dfed;border-radius:10px;background:#fff;color:#8792a3;box-shadow:0 1px 2px rgba(16,24,40,.03);font:inherit;text-align:left;transition:border-color .16s,box-shadow .16s,background .16s}
.return-date-trigger .return-date-icon{color:#4776dc;flex:none}
.return-date-trigger[data-date-field=end_date] .return-date-icon{color:#8261cc}
.return-date-trigger>svg:last-child{margin-left:auto;flex:none;color:#8e9aaf}
.return-date-trigger.has-value{color:#243750;font-weight:650;background:#fbfcff}
.return-date-trigger:not(:disabled):hover,.return-date-trigger[aria-expanded=true]{border-color:#759cf3;background:#f7faff;box-shadow:0 0 0 3px rgba(21,94,239,.08)}
.return-date-trigger:disabled{cursor:not-allowed;background:#f7f8fa;color:#9aa4b3;box-shadow:none}
.return-date-trigger:disabled .return-date-icon{color:#a1acbd}
.return-date-value{white-space:nowrap;font-variant-numeric:tabular-nums}
.return-date-summary{display:flex;align-items:baseline;gap:7px;margin-top:12px;color:#68768d;font-size:12px;line-height:1.7}
.return-date-summary b{font-weight:600;color:#52647f}
.return-date-summary-dot{width:6px;height:6px;flex:none;border-radius:50%;background:#4776dc;align-self:center}
.return-date-source{color:#8995a7}
.return-date-popover[hidden]{display:none}
.return-date-popover{position:fixed;z-index:30;width:min(376px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:18px;border:1px solid #e1e8f3;border-radius:16px;background:#fff;box-shadow:0 18px 55px rgba(28,50,90,.19),0 3px 10px rgba(28,50,90,.06);font-size:14px}
.return-calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.return-calendar-eyebrow{color:#8b97aa;font-size:11px;letter-spacing:.08em}
.return-calendar-heading h3{margin:2px 0 0;color:#263852;font-size:17px;font-weight:700}
.return-calendar-close{width:30px;min-height:30px;padding:0;border-radius:8px;background:#f3f5f9;color:#8b97aa;font-size:22px;font-weight:400}
.return-calendar-close:hover{background:#e9eef7;color:#384d70}
.return-calendar-navigation{display:flex;align-items:center;gap:9px;margin-bottom:14px;padding:7px;border-radius:11px;background:#f4f7fc}
.return-calendar-navigation>button{width:30px;min-height:30px;flex:none;padding:0;border:1px solid #e1e7f1;border-radius:7px;background:#fff;color:#526787;font-size:23px;font-weight:400;line-height:1}
.return-calendar-navigation>button:disabled{opacity:.3;cursor:not-allowed}
.return-calendar-selects{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;flex:1}
.return-calendar-selects select{width:auto;max-width:60%;min-height:32px;padding:5px 6px;border:0;background:transparent;color:#324a70;font-size:14px;font-weight:650;cursor:pointer}
.return-calendar-weekdays,.return-calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.return-calendar-weekdays{margin-bottom:7px;text-align:center;color:#8d99ab;font-size:12px}
.return-calendar-weekdays span:nth-last-child(-n+2){color:#b08a97}
.return-calendar-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:46px;min-width:0;padding:3px 0;border:1px solid transparent;border-radius:9px;background:#eff5ff;color:#2959ae;font:650 14px/1.4 system-ui,"Microsoft YaHei",sans-serif;transition:background .12s,box-shadow .12s}
.return-calendar-day small{max-width:100%;color:#6b88bd;font-size:9px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.return-calendar-day:disabled{background:transparent;color:#c4ccd8;cursor:default;font-weight:400}
.return-calendar-day:not(:disabled):hover{border-color:#a7c4ff;background:#dfeaff}
.return-calendar-day.in-range:not(:disabled){background:#dfebff}
.return-calendar-day.range-boundary:not(:disabled){border-color:#7ca7f4;background:#e6efff}
.return-calendar-day.is-selected:not(:disabled){background:#155eef;border-color:#155eef;color:#fff;box-shadow:0 3px 7px rgba(21,94,239,.2)}
.return-calendar-day.is-selected small{color:#dbe8ff}
.return-date-trigger:focus-visible,.return-date-popover button:focus-visible{outline:2px solid #155eef;outline-offset:2px}
.return-calendar-month-summary{margin:13px 0 0;padding:9px 8px;border-radius:8px;background:#f8faff;text-align:center;color:#72829c;font-size:12px}
.return-calendar-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:13px;padding-top:11px;border-top:1px solid #edf0f6}
.return-calendar-footer>span{display:flex;align-items:center;gap:5px;font-size:11px;color:#8a96a9}
.return-calendar-footer i{display:inline-block;width:6px;height:6px;background:#8aadee;border-radius:50%;flex:none}
.return-calendar-clear{min-height:28px;padding:3px 7px;background:transparent;color:#4776dc;font-size:12px;white-space:nowrap}
.return-calendar-clear:hover{background:#eff5ff}
.return-query-field{display:block;min-width:0}
.return-query-field input{height:44px;min-height:44px;padding:10px 13px;border-color:#d7dfed;border-radius:10px}
.return-query-field input::placeholder{color:#687386;opacity:1}
.return-filter-form>.button,.return-filter-form>button{min-height:44px;padding:10px 15px;white-space:nowrap}
.return-match-layout{display:grid;grid-template-columns:minmax(420px,calc(42% - 130px)) minmax(590px,1fr);gap:18px;align-items:start}
.return-match-column{min-width:0}
.return-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.return-page-heading{margin-bottom:18px}
.return-history-heading{display:grid;gap:14px;padding:16px 18px 13px}
.return-history-actions-row{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:nowrap}
.return-history-summary-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
.return-history-title{display:flex;align-items:baseline;gap:14px;min-width:0;flex:1 1 auto}
.return-history-title h2{flex:none;margin:0;font-size:22px}
.return-history-title p{min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.return-history-import{display:flex;width:auto;min-width:0;flex:1 1 auto;gap:10px;justify-content:flex-start}
.return-history-import .order-return-file-field{width:auto;min-width:150px;flex:1 1 auto}
.return-history-import .actions{flex:none}
.return-page-indicator{flex:none;color:#7b8798;font-size:12px;font-weight:650;white-space:nowrap}
.return-order-template-download{flex:none;min-height:40px;padding:9px 14px;background:#119c69;color:#fff;box-shadow:0 3px 9px rgba(17,156,105,.2);white-space:nowrap}
.return-order-template-download:hover{background:#0c8258;color:#fff;box-shadow:0 4px 12px rgba(12,130,88,.26)}
.return-order-status-tabs{display:flex;align-items:center;gap:6px;padding:10px 14px;border-bottom:1px solid #e8ecf1;background:#f8fafc;overflow-x:auto;scrollbar-width:thin}
.return-order-status-tab{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:6px 10px;border:1px solid transparent;border-radius:7px;color:#617086;font-size:12px;font-weight:650;white-space:nowrap;transition:background .15s,border-color .15s,color .15s}
.return-order-status-tab:hover{border-color:#d8e0eb;background:#fff;color:#24324a}
.return-order-status-tab b{display:grid;min-width:20px;height:20px;place-items:center;padding:0 5px;border-radius:99px;background:#e8edf4;color:#53627a;font-size:11px;font-variant-numeric:tabular-nums}
.return-order-status-tab.is-active{border-color:#bdd0f6;background:#eaf1ff;color:#174ea6}
.return-order-status-tab.is-active b{background:#155eef;color:#fff}
.return-order-cards{background:#fff}
.return-order-card{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;min-height:100px;padding:14px 16px 14px 18px;border-bottom:1px solid #e8ecf1;background:#fff;transition:background .15s ease}
.return-order-card::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#c7ced8}
.return-order-status-matched::before{background:#18a566}
.return-order-status-partial::before{background:#e7a009}
.return-order-status-unmatched::before{background:#e24a42}
.return-order-status-removed::before{background:#8b95a5}
.return-order-status-pending::before{background:#aeb7c4}
.return-order-card:last-child{border-bottom:0}
.return-order-card:hover{background:#f8faff}
.return-order-card .return-order-index{display:grid;width:30px;height:30px;place-items:center;align-self:start;border-radius:7px;background:#eef3fb;color:#53627a;font-size:12px}
.return-order-card-main{min-width:0}
.return-order-card-topline{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
.return-order-number{min-width:0;overflow:hidden;color:#24324a;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.return-order-date{flex:none;color:#68778d;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.return-order-card-bodyline{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0;margin-top:7px}
.return-order-card-meta{display:flex;align-items:center;gap:7px 14px;min-width:0;color:#637085;font-size:12px;flex-wrap:wrap}
.return-order-card-meta b{color:#39485f;font-weight:650}
.return-order-code{max-width:100%;overflow:hidden;padding:2px 7px;border-radius:5px;background:#edf3ff;color:#174ea6;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.return-order-status-badge{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:24px;padding:3px 8px;border-radius:99px;background:#eef1f5;color:#657184;font-size:11px;font-weight:750;line-height:1.2;white-space:nowrap}
.return-order-status-badge>span{display:grid;width:15px;height:15px;place-items:center;border:1px solid currentColor;border-radius:50%;font-size:10px;line-height:1}
.return-order-status-matched .return-order-status-badge{background:#e5f7ee;color:#087a4d}
.return-order-status-partial .return-order-status-badge{background:#fff4d6;color:#956400}
.return-order-status-unmatched .return-order-status-badge{background:#ffeded;color:#b6322b}
.return-order-status-removed .return-order-status-badge{background:#edf0f4;color:#616d7d}
.return-order-status-pending .return-order-status-badge{background:#f1f3f6;color:#6d7888}
.return-order-note{min-width:0;margin:7px 0 0;overflow:hidden;color:#7a8595;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.inventory-match-import{padding:0;overflow:hidden}
.inventory-ready-state{flex:none;padding:4px 9px;border-radius:99px;background:#f1f3f6;color:#7a8595;font-size:11px;font-weight:700;white-space:nowrap}
.inventory-ready-state.is-ready{background:#e8f7f0;color:#087f5b}
.inventory-ready-state.is-complete{background:#eef2f6;color:#526173}
.inventory-match-top-row{display:flex;align-items:center;gap:18px;padding:16px 18px 14px;border-bottom:1px solid #edf0f4}
.inventory-match-title{min-width:150px;flex:0 0 auto}
.inventory-match-title-line{display:flex;align-items:center;gap:10px}
.inventory-match-title-line h2{margin:0}
.inventory-match-title p{margin:2px 0 0;font-size:12px}
.inventory-match-actions{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.inventory-match-form{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 520px;padding:0}
.inventory-match-form .order-return-file-field{min-width:0;flex:1}
.inventory-import-button,.inventory-clear-button,.inventory-template-download{min-height:40px;padding:9px 14px;white-space:nowrap}
.inventory-import-button{background:#356ee8;color:#fff;box-shadow:0 3px 9px rgba(53,110,232,.18)}
.inventory-import-button:hover{background:#285dcc}
.inventory-clear-button{background:#fff0ef;color:#b23a32;border:1px solid #efc4c0}
.inventory-clear-button:hover{background:#ffe4e1;border-color:#e7aaa4}
.inventory-clear-button:disabled{cursor:not-allowed;opacity:.48}
.inventory-template-download{margin-left:clamp(28px,4vw,68px);background:#119c69;color:#fff;box-shadow:0 3px 9px rgba(17,156,105,.2)}
.inventory-template-download:hover{background:#0c8258;color:#fff;box-shadow:0 4px 12px rgba(12,130,88,.26)}
.return-match-export-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.return-match-redownload{background:#eaf6ee;color:#167545;border:1px solid #b9dfc8;white-space:nowrap}.return-match-redownload:hover{background:#d9efdf;color:#0f6138}.return-removed-order-line{display:inline-flex;align-items:center;gap:4px}.return-match-include-form{display:inline-flex;margin:0}.return-match-include-button{width:24px;height:24px;min-height:24px;padding:0;border-radius:50%;background:transparent;color:#16a05d;font-size:19px;font-weight:900;line-height:1}.return-match-include-button:hover{background:#e3f7eb;color:#087b43}.match-export-status{position:fixed;left:50%;top:50%;z-index:80;width:min(560px,calc(100vw - 32px));padding:18px 22px;transform:translate(-50%,-50%) scale(.96);border:1px solid #efaaa5;border-radius:10px;background:#fff0ef;color:#9e261e;box-shadow:0 24px 70px rgba(89,22,17,.28);font-size:16px;font-weight:750;line-height:1.6;text-align:center;opacity:0;transition:opacity .18s ease,transform .18s ease}.match-export-status.is-visible{opacity:1;transform:translate(-50%,-50%) scale(1)}
.inventory-match-relation-form{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:16px 18px 17px}
.inventory-match-relation-label{display:flex;align-items:center;gap:7px;color:#687386;font-size:12px;white-space:nowrap}
.inventory-match-relation-form label{min-width:180px;flex:1}
.inventory-match-relation-arrow{color:#687386;font-size:17px}
.inventory-match-relation-form select{min-height:34px;padding:6px 9px;font-size:12px}
@media(max-width:900px){.inventory-match-top-row{align-items:stretch;flex-direction:column}.inventory-match-title{width:100%}.inventory-match-actions{width:100%}.inventory-match-form{width:auto}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.return-match-results{padding:0;overflow:hidden}
.return-match-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid #edf0f4}
.return-match-heading h2{margin:0 0 3px}
.return-match-heading p{margin:0;font-size:12px}
.return-match-stats{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:7px}
.return-match-stats span{padding:4px 8px;border-radius:6px;background:#f1f5fb;color:#66758b;font-size:12px;white-space:nowrap}
.return-match-stats b{color:#155eef;font-weight:750}
.return-match-period{margin-top:7px!important}
.return-match-heading button[disabled]{cursor:not-allowed;opacity:.55}
.match-export-dialog .match-export-warning{padding:11px 12px;border:1px solid #f0c5c1;border-radius:8px;background:#fff4f2;color:#8f2f28}
.inventory-clear-dialog .match-export-warning{padding:11px 12px;border:1px solid #f0c5c1;border-radius:8px;background:#fff4f2;color:#8f2f28}
.match-export-warning b{font-weight:750}
.return-match-warning{margin:0;padding:10px 18px;border-bottom:1px solid #f4dfad;background:#fff9e9;color:#815d14;font-size:12px}
.return-match-warning{margin:0;padding:10px 18px;border-bottom:1px solid #f4dfad;background:#fff9e9;color:#815d14;font-size:12px}
.inventory-match-table{width:max-content;min-width:100%;font-family:inherit;font-size:13px}
.inventory-match-table th,.inventory-match-table td{padding:9px 10px;white-space:nowrap;font-family:inherit;font-size:13px}
.inventory-match-table th{font-weight:650}
.inventory-match-table td{font-weight:400}
.inventory-match-table .code{font-family:inherit;font-weight:400}
.inventory-match-table tbody td{vertical-align:middle}
.inventory-match-table .match-metric-column{min-width:68px;padding-right:7px;padding-left:7px;text-align:center}
.inventory-match-table .match-stock-column{background:#f3faf6;color:#315c49}
.inventory-match-table thead .match-stock-column{background:#e5f5ec;color:#315c49}
.inventory-match-table .match-order-column{background:#fffaf0;color:#6f5523}
.inventory-match-table thead .match-order-column{background:#fff1d8;color:#6f5523}
.inventory-match-table .match-group-start{border-left:1px solid #d8e4de}
.inventory-match-table .match-order-column.match-group-start{border-left-color:#eadfc9}
.inventory-match-table .match-group-end{border-right:1px solid #e2e9e5}
.return-order-number-stack{display:grid;gap:3px;line-height:1.55}
.return-order-number-stack span{display:block;white-space:nowrap}
.return-match-order-line{display:inline-flex;width:max-content;min-height:24px;align-items:center;justify-self:start;gap:3px}
.return-match-exclude-form{display:flex;flex:0 0 20px;margin:0}
.return-match-exclude-button{width:20px;height:20px;min-height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:#dc2626;font-size:18px;font-weight:700;line-height:1;opacity:0;visibility:hidden;pointer-events:none;transform:scale(.85);transition:opacity .12s ease,transform .12s ease,background-color .12s ease}
.return-match-order-line:hover .return-match-exclude-button,.return-match-exclude-button:focus-visible{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1)}
.return-match-exclude-button:hover,.return-match-exclude-button:focus-visible{background:#fee2e2;color:#b91c1c;outline:none}
.return-match-exclude-button span{display:block;line-height:18px}
.return-order-date-stack{font-variant-numeric:tabular-nums;color:#52647f}
.return-order-date-stack>span{display:flex;min-height:24px;align-items:center}
.inventory-match-index{width:52px;text-align:center;color:var(--muted);font-weight:700}
.return-unmatched-panel{padding:18px}
.return-unmatched-panel h2{margin:0 0 12px}
.return-unmatched-summary{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.return-unmatched-summary span{padding:7px 10px;border:1px solid #f1c7c3;border-radius:6px;background:#fff4f2;color:#8d2d25}
.return-unmatched-panel details{margin-top:10px;border:1px solid var(--line);border-radius:7px;background:#fff}
.return-unmatched-panel summary{padding:11px 13px;cursor:pointer;font-weight:700;color:#384354}
.return-unmatched-panel details .table-wrap{max-height:360px;border-top:1px solid var(--line)}
.return-unmatched-panel table{font-size:12px}
.return-unmatched-panel .return-manually-removed-orders{border-color:#f1c7c3;background:#fffafa}
.return-unmatched-panel .return-manually-removed-orders summary{color:#9b3028}
@media(max-width:1180px){.return-match-layout{grid-template-columns:1fr}.return-filter-form{grid-template-columns:repeat(2,minmax(150px,1fr))}.return-query-field{grid-column:1/-1}}
@media(max-width:640px){.return-filter-panel{position:static}.return-filter-form{grid-template-columns:1fr}.return-query-field{grid-column:auto}.return-filter-form>.button,.return-filter-form>button{width:100%}.inventory-match-actions,.inventory-match-form{align-items:stretch;flex-direction:column}.inventory-match-actions,.inventory-match-form,.inventory-match-form .order-return-file-field,.inventory-match-form button,.inventory-clear-button,.inventory-template-download{width:100%}.inventory-match-form{flex:none}.inventory-match-form .order-return-file-field{min-height:40px;flex:none}.inventory-template-download{margin-left:0}.inventory-match-relation-form{align-items:stretch;flex-direction:column}.inventory-match-relation-form label{width:100%}.inventory-match-relation-arrow{align-self:center;transform:rotate(90deg)}.return-match-heading{align-items:stretch;flex-direction:column}.return-match-heading button{width:100%}.return-order-card{grid-template-columns:34px minmax(0,1fr);gap:8px;padding:12px 12px 12px 15px}.return-order-card-topline{align-items:baseline;flex-direction:row;gap:8px}.return-order-card-bodyline{grid-template-columns:minmax(0,1fr) auto;gap:7px}.return-order-card-meta{gap:5px 9px}.return-order-status-badge{padding:3px 7px}.return-match-stats{gap:6px}.return-history-actions-row,.return-history-import{align-items:stretch;flex-direction:column}.return-history-import{width:100%;flex:none}.return-history-import .order-return-file-field{width:100%;min-width:0;min-height:40px;flex:none}.return-history-import .actions,.return-history-import .actions button,.return-order-template-download{width:100%}.return-history-summary-row{align-items:flex-start;flex-direction:column}.return-history-title{align-items:flex-start;flex-direction:column;gap:2px}}
