:root{
  color-scheme:light;
  --bg:#f3f5f1;
  --paper:#fff;
  --ink:#26382f;
  --muted:#7b8980;
  --line:#e5eae3;
  --green:#1f654c;
  --green-dark:#174d3b;
  --mint:#edf5ef;
  --orange:#b4773f;
  --red:#b95c51;
  --radius:13px;
  --shadow:0 8px 24px rgba(36,57,43,.055);
  background:#f3f5f1;
  color:var(--ink);
  font-family:"Microsoft YaHei UI","PingFang SC","Segoe UI",sans-serif;
}

*{scrollbar-color:#c5d2c7 #eef1ec}
body{min-height:100vh;color:var(--ink);background:radial-gradient(ellipse at 78% 0,rgba(219,229,214,.3),transparent 38rem),#f3f5f1}
::selection{background:rgba(43,112,80,.17);color:#173d2d}
a{color:var(--green)}
.shell{--sidebar-width:244px;position:relative;isolation:isolate;grid-template-columns:var(--sidebar-width) minmax(0,1fr);min-height:100vh;background:transparent}
.sidebar{width:var(--sidebar-width);padding:25px 14px 17px;overflow:hidden;background-color:#153d30;background-image:repeating-linear-gradient(0deg,rgba(239,245,233,.023) 0 1px,transparent 1px 5px),repeating-linear-gradient(90deg,rgba(7,27,20,.055) 0 1px,transparent 1px 5px),linear-gradient(154deg,#194a39 0%,#153e31 55%,#10362b 100%);background-blend-mode:soft-light,soft-light,normal;border-right:1px solid rgba(197,164,103,.28);box-shadow:10px 0 32px rgba(30,54,40,.09)}
.sidebar:before{content:"";position:absolute;z-index:0;top:0;left:0;right:0;height:145px;background-color:#f0ede2;background-image:repeating-linear-gradient(0deg,rgba(97,114,81,.035) 0 1px,transparent 1px 5px),repeating-linear-gradient(90deg,rgba(97,114,81,.025) 0 1px,transparent 1px 5px);clip-path:polygon(0 0,100% 0,100% 65%,78% 75%,52% 90%,26% 100%,0 91%)}
.sidebar:after{content:"";position:absolute;z-index:0;left:-5%;top:126px;width:115%;height:22px;border-top:1px solid rgba(185,144,73,.72);border-radius:50%;transform:rotate(-4deg);pointer-events:none}
.sidebar>*{position:relative;z-index:1}
.sidebar .brand{min-height:78px;padding:1px 11px 0;margin:0 1px 39px;align-items:center}
.brand-tanghuang{gap:0}
.brand-tanghuang>div{min-width:0}
.brand-tanghuang strong{color:#173f31;font-family:"STSong","SimSun",serif;font-size:34px;font-weight:700;letter-spacing:5px;line-height:1.08}
.brand-tanghuang strong span{display:block}
.brand-tanghuang small{margin-top:8px;color:#607867;font-size:9px;letter-spacing:1.55px}
.sidebar nav{flex-shrink:0}
.nav-label{padding:14px 14px 7px;color:rgba(227,237,224,.54);font-size:9px;letter-spacing:1.15px}
.nav-item{position:relative;min-height:43px;margin:3px 0;padding:10px 13px;gap:12px;border-radius:8px;color:#d0ddd2;font-size:12px;transition:background .18s,color .18s,transform .18s}
.nav-item .icon{width:17px;height:17px;opacity:.92}
.nav-item:hover{background:rgba(255,255,255,.08);color:#fff;transform:translateX(2px)}
.nav-item.active{color:#1e5942;background:linear-gradient(100deg,#f5f1e7,#e9eddf);box-shadow:0 5px 16px rgba(8,29,21,.14);font-weight:650}
.nav-item.active:before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:3px;border-radius:0 3px 3px 0;background:#c89b4f;box-shadow:0 0 9px rgba(208,170,97,.42)}
.nav-item.active:after{width:5px;height:5px;background:#c89b4f;box-shadow:0 0 7px rgba(226,189,115,.45)}
.nav-item.active .icon{color:#286247}
.sidebar-footer{padding-top:10px}
.pilot{margin:17px 4px 13px;padding:12px;border:1px solid rgba(229,218,183,.18);border-radius:10px;background:rgba(255,255,255,.045);color:#d4dfd3;font-size:10px;line-height:1.8}
.pilot strong{color:#e4ca8e;font-size:10px}
.pilot .dot{background:#76c8a0;box-shadow:0 0 8px rgba(118,200,160,.5)}
.footer-note{color:rgba(215,228,215,.42);font-size:8px;letter-spacing:.8px}
.workspace{position:relative;z-index:1;min-width:0;grid-column:2}
.topbar{height:72px;padding:0 30px;background:rgba(255,255,255,.94);border-bottom:1px solid #e6ebe5;backdrop-filter:blur(14px)}
.store-picker{gap:9px;color:#53685b}
.store-picker>.icon{color:#28694f}
.store-picker select{color:#263c30}
.store-picker select option{background:#fff;color:#26382f}
.top-actions{gap:10px}
.preview-role-switch{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid #e6ebe5;border-radius:8px;background:#f7f8f5}
.preview-role-switch>span{padding:0 7px;color:#859188;font-size:9px;white-space:nowrap}
.preview-role-switch button{min-height:27px;padding:4px 8px;border:0;border-radius:6px;background:transparent;color:#758379;font-size:9px}
.preview-role-switch button:hover{background:#eef4ee;color:#276448}
.preview-role-switch button.active{background:#1e5a43;color:#fff;box-shadow:0 2px 6px rgba(25,77,54,.14)}
.top-actions .tag{background:#edf5ef;color:#47705a}
.top-actions .tag .dot{background:#4b9a72;box-shadow:0 0 7px rgba(75,154,114,.3)}
.tag{background:#eff4ec;color:#617b60;border:1px solid #e7ede3}
.tag.amber{background:#f8f1e5;color:#956e36;border-color:#eee2cb}
.tag.red{background:#fbefed;color:#a9574c;border-color:#f2ded9}
.tag.gray{background:#f1f3ef;color:#758178;border-color:#e8ebe5}
.tag.green{background:#edf6ef;color:#367351;border-color:#e3efe6}
.user{color:#31443a}
.user small{color:#859188}
.avatar{background:linear-gradient(145deg,#dbe8d8,#b8cbb5);border:2px solid #fff;color:#315a41}
.icon-btn{background:#fff;border-color:#e5eae3;color:#53685b;border-radius:8px}
.icon-btn:hover{background:#eef5ef;border-color:#d0dfd2;color:#21583e}
.content{max-width:1820px;padding:29px 31px 32px}
.page-title{margin-bottom:19px}
.page-title h1{color:#25382e;font-size:27px;font-weight:680;letter-spacing:.2px}
.page-title p{margin-top:7px;color:#78867c;font-size:11px}
.eyebrow{color:#738474;font-size:9px;letter-spacing:1.6px}
.btn{min-height:38px;border:1px solid #dde6dc;background:#fff;color:#405b49;border-radius:8px;padding:8px 12px;font-size:11px;transition:background .16s,border-color .16s,color .16s,transform .16s}
.btn:hover{background:#f1f6f0;border-color:#cbdaca;color:#205840;transform:translateY(-1px)}
.btn.primary{color:#fff;background:linear-gradient(135deg,#23654c,#174c3a);border-color:#1c5b43;box-shadow:0 6px 16px rgba(28,91,67,.16);font-weight:650}
.btn.primary:hover{color:#fff;background:#174c3a;box-shadow:0 8px 20px rgba(28,91,67,.2)}
.btn.danger{border-color:#efd9d3;color:#ad5b50;background:#fff8f6}
.btn.link{color:#28674d}
.btn.link:hover{background:#eef5ef}
button:focus-visible,a:focus-visible{outline:2px solid #719d7b;outline-offset:3px}
input,select,textarea{color:#34493b;background:#fff;border-color:#dce5db;border-radius:8px}
input::placeholder,textarea::placeholder{color:#a0aaa1}
input:focus,select:focus,textarea:focus{border-color:#6e9c79;box-shadow:0 0 0 3px rgba(86,139,99,.12)}
input[type=checkbox]{accent-color:#2d7455}
.date-filter{gap:7px;padding:5px 9px;background:#fff;border-color:#e1e7df;color:#859187}
.date-filter input{color:#596c5d;background:transparent}
.date-filter input::-webkit-calendar-picker-indicator{filter:none;opacity:.65}
.stats{gap:14px;margin:18px 0 19px}
.stat,.overview-kpi,.overview-filter,.panel,.toolbar,.cart,.product-card{color:#2e4135;background:#fff;border:1px solid #e7ebe5;box-shadow:0 7px 22px rgba(35,58,41,.045),inset 0 1px rgba(255,255,255,.8)}
.stat{position:relative;overflow:hidden;padding:17px 19px 14px;border-radius:12px}
.stat:before{background:radial-gradient(circle,rgba(207,172,105,.1),transparent 70%)}
.stat-top{color:#78867b;font-size:11px}
.stat-icon{width:31px;height:31px;color:#3b7658;background:#edf5ee;border:1px solid #e8f0e7;border-radius:50%}
.stat-icon.orange{color:#a87843;background:#f8f2e7;border-color:#f1e7d7}
.stat-value{margin:12px 0 9px;color:#ad6c36;font-size:28px;font-weight:620;letter-spacing:-.5px}
.stat-value small{color:#9d724a;font-size:15px}
.stat-foot{border-top:1px solid #eef1ed;padding-top:9px;color:#879188;font-size:9px}
.stat-foot b{color:#347856}
.stat-spark{position:absolute;right:16px;bottom:38px;display:flex;align-items:flex-end;gap:3px;width:58px;height:23px;opacity:.32;pointer-events:none}
.stat-spark i{flex:1;height:var(--h,45%);min-height:4px;border-radius:2px 2px 0 0;background:linear-gradient(180deg,#8db99a,#dbe9dd)}
.stat-spark i:nth-child(1){--h:31%}.stat-spark i:nth-child(2){--h:52%}.stat-spark i:nth-child(3){--h:39%}.stat-spark i:nth-child(4){--h:71%}.stat-spark i:nth-child(5){--h:48%}.stat-spark i:nth-child(6){--h:88%}.stat-spark i:nth-child(7){--h:61%}.stat-spark i:nth-child(8){--h:77%}.stat-spark i:nth-child(9){--h:56%}
.stat-link{background:#fff;color:inherit}
.stat-link:hover{border-color:#cdddcf;box-shadow:0 11px 25px rgba(43,83,53,.1)}
.stat-detail{color:#3b7658}
.grid-main{grid-template-columns:minmax(0,1.72fr) minmax(300px,1fr);gap:16px;margin:17px 0}
.panel{border-radius:12px}
.panel-head{padding:17px 19px 13px}
.panel-head h2{color:#2c4034;font-size:13px}
.panel-head p{color:#89958b;font-size:10px}
.panel-body{padding:0 19px 17px}
.chart{height:225px;margin-top:5px;border-radius:8px;background:linear-gradient(180deg,rgba(245,248,244,.46),rgba(255,255,255,0))}
.chart svg{overflow:visible}
.dashboard-chart-panel .chart svg .chart-grid{stroke:#e6ece6!important;stroke-dasharray:2 4}
.dashboard-chart-panel .chart svg .chart-label{fill:#87948a!important;font-size:9px}
.dashboard-chart-panel .chart svg .chart-count-label{fill:#93a699!important}
.dashboard-chart-panel .chart svg .chart-area{filter:none!important}
.dashboard-chart-panel .chart svg .chart-bar{fill:url(#chart-bar-fill)!important;opacity:.86;filter:none!important;animation:none!important}
.dashboard-chart-panel .chart svg path.chart-line{stroke:#277452!important;stroke-width:2.6!important;stroke-dasharray:none!important;filter:none!important;animation:none!important}
.dashboard-chart-panel .chart svg path.chart-line-trace,.dashboard-chart-panel .chart svg .chart-spark,.dashboard-chart-panel .chart svg .chart-comet{display:none!important;animation:none!important}
.dashboard-chart-panel .chart svg .chart-point{fill:#fff!important;stroke:#286c4d!important;stroke-width:1.7!important;filter:drop-shadow(0 1px 2px rgba(37,91,60,.12))!important;animation:none!important}
.dashboard-chart-panel .chart svg .chart-tooltip rect{fill:#fff!important;stroke:#dce8dd!important;filter:drop-shadow(0 6px 12px rgba(36,67,46,.12))!important}
.dashboard-chart-panel .chart svg .chart-tooltip path{stroke:#bdd1c1!important}
.dashboard-chart-panel .chart svg .chart-tooltip-date{fill:#75857a!important}
.dashboard-chart-panel .chart svg .chart-tooltip-value{fill:#28684c!important}
.dashboard-chart-panel .chart svg .chart-tooltip-count{fill:#a8793c!important}
.chart-footer{border-color:#edf0ec;color:#879188;font-size:9px}
.legend{color:#718177}
.legend .dot{background:#277452;box-shadow:none}
.legend .chart-bar-legend{background:#a8cfb4;box-shadow:none}
.rank-list{padding-bottom:9px!important}
.rank-row{display:flex;align-items:center;min-height:49px;border-bottom:1px solid #edf0ec;gap:10px}
.rank-medal{display:grid;place-items:center;flex:none;width:25px;height:25px;border:1px solid #e1e8e0;background:#f2f5f0;color:#718275;font-size:9px}
.rank-row:first-child .rank-medal{background:linear-gradient(145deg,#d9b764,#bd8b42);color:#fff;border-color:#d5ae5c;box-shadow:0 3px 8px rgba(180,138,63,.18)}
.rank-row:nth-child(2) .rank-medal{background:#e6ebe7;color:#687a6d}
.rank-row:nth-child(3) .rank-medal{background:#f3e7d7;color:#9b7347}
.rank-info{min-width:0;flex:1}
.rank-name{overflow:hidden;color:#34483b;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.rank-meta{display:flex;align-items:center;gap:7px;min-width:0;margin-top:5px;color:#8a968c;font-size:8px;white-space:nowrap}
.rank-total{flex:none;color:#a77139;font-size:10px;white-space:nowrap}
.rank-row .mini-bar{display:block;flex:none;width:42px;height:4px;margin:0;background:#edf2ed}
.rank-row .mini-bar i{display:block;height:100%;border-radius:4px}
.rank-row .mini-bar i{background:linear-gradient(90deg,#66a77d,#b6d3b8);box-shadow:none}
.dashboard-recent{margin:0 0 14px}
.dashboard-recent .panel-head{padding:15px 18px 11px}
.dashboard-recent .panel-head>.tag{font-size:9px}
.recent-orders-table{color:#34463b;font-size:10px}
.recent-orders-table th{padding:9px 11px;color:#718075;background:#f6f8f5;border-color:#e9eee8;font-size:9px}
.recent-orders-table td{padding:9px 11px;border-color:#edf0ec;color:#425247;white-space:nowrap}
.recent-orders-table tbody tr:hover{background:#f8faf7}
.recent-orders-table .table-sub{display:block;margin-top:3px;color:#8d9990;font-size:8px}
.recent-orders-table .tag{font-size:8px;padding:2px 6px}
.recent-orders-table th:nth-child(4),.recent-orders-table td:nth-child(4){width:78px;text-align:center}
.payment-method{display:inline-grid;place-items:center;width:28px;height:28px;border:1px solid transparent;border-radius:9px;vertical-align:middle}
.payment-method img{display:block;width:18px;height:18px;object-fit:contain}
.payment-wechat{background:#edf7ef;border-color:#e2efe4}
.payment-alipay{background:#eff5fb;border-color:#e5eef8}
.payment-cash{background:#f9f3e8;border-color:#f1e7d4}
.payment-card{background:#eef3f4;border-color:#e5ecec}
.payment-balance{background:#f2f1e8;border-color:#ece9dc}
.payment-method-fallback{color:#6f7f73;font-size:10px}
.dashboard-recent .table-foot{padding:9px 17px;border-top:1px solid #edf0ec;color:#879188;font-size:9px}
.dashboard-recent .table-foot .btn{min-height:0;padding:3px 5px;font-size:9px}
.dashboard-stock{margin-top:0}
.dashboard-stock .panel-head{padding:14px 17px 10px}
.dashboard-stock .table-foot{font-size:9px}
.dashboard-product-cell strong{display:block;color:#3e5144;font-size:10px;font-weight:600}
.dashboard-product-cell small{display:block;margin-top:3px;color:#87938a;font-size:8px}
table{color:#3c4d41}
th{color:#68796d;background:#f6f8f5;border-color:#e9eee8;font-size:10px}
td{border-color:#edf0ec;color:#405046}
tbody tr:hover{background:#f8faf7}
.table-scroll{scrollbar-color:#c5d2c7 #eef1ec}
.table-foot{border-color:#edf0ec;color:#839087}
.positive{color:#34805a!important}
.negative{color:#bd5c50!important}
.badge-count{background:#f7f0e2;color:#9b723e}
.mini-bar{background:#edf2ed}
.mini-bar span,.bar-row .bar i{background:linear-gradient(90deg,#72ad84,#b4d3b9);box-shadow:none}
.bar-row>span:first-child{color:#647469}
.bar-row .bar{background:#edf2ed}
.bottom-note{color:#8c978d}
.empty{color:#859188}
.product-card{transition:transform .18s,border-color .18s,box-shadow .18s}
.product-card:hover{border-color:#c9dccd;box-shadow:0 13px 28px rgba(37,76,48,.1)}
.product-info h3{color:#34493b}
.product-info .spec{color:#849087}
.product-price strong{color:#a97039}
.product-price button{background:#edf5ee;border-color:#d8e8da;color:#367351}
.cart-header,.cart-bottom{border-color:#e9eee8}
.cart-member{background:#f8faf7;border-color:#e8eee7}
.cart-total strong{color:#a97039}
.pay-channel{background:#fff;border-color:#dfe8df;color:#718075}
.pay-channel.active{background:#edf6ef;border-color:#7eaa87;color:#276448}
.selected-member{background:#edf6ef;color:#397651}
.quantity{border-color:#e0e7df}
.toolbar{padding:11px;border-radius:10px}
.tabs .tab{color:#748278}
.tab.active{background:#edf5ee;color:#276448}
.notice{background:#f8f3e8;border-color:#eee3cd;color:#8a704b}
.notice.green,.bookkeeping-banner{background:#eef6ef;border-color:#dcebdd;color:#4e7557}
.bookkeeping-banner strong{color:#315f3f}
.bookkeeping-banner span{color:#66816a}
.form-hint{background:#f7f9f6;color:#68776c}
.form-hint strong{color:#a16f3d}
.form-error:not(:empty){background:#fbefed;color:#a9554b}
.form-actions{border-color:#e9eee8}
.summary-line{border-color:#edf0ec;color:#66756a}
.summary-line strong{color:#99703f}
.summary-line.total{background:#f7f3e9;color:#876d46}
.summary-line.total strong{color:#936b38}
.setting-row{border-color:#e9eee8;color:#3f5145}
.setting-row p{color:#7d8a80}
.lookup-menu{background:#fff;border-color:#e1e9df;box-shadow:0 14px 35px rgba(37,58,41,.16)}
.lookup-menu button{background:#fff;color:#34483b;border-color:#edf0ec}
.lookup-menu button:hover,.lookup-menu button:focus{background:#f2f7f2}
.lookup-menu button small,.lookup-empty{color:#849188}
.overview-filter{padding:15px 17px}
.filter-status{border-color:#e8eee7;color:#66776a}
.overview-kpi{min-height:127px}
.overview-kpi::after{background:linear-gradient(180deg,#d7b765,#b77d3e);box-shadow:0 0 12px rgba(190,151,76,.15)}
.overview-kpi.k1::after{background:#5d9b75}.overview-kpi.k2::after{background:#729d8a}.overview-kpi.k3::after{background:#c49353}
.overview-kpi span,.overview-kpi small{color:#849187}
.overview-kpi strong{color:#34483a;font-size:24px}
.overview-trend text{fill:#7e8b81!important;font-size:10px}
.chart-axis{stroke:#e7ece7}
.chart-line{stroke:#277452;filter:none}
.chart-point{fill:#fff;stroke:#277452}
.cost-ring{box-shadow:inset 0 0 0 34px #fff;background:conic-gradient(#68a781 0 calc(var(--cost)*1%),#d2ad68 calc(var(--cost)*1%) calc((var(--cost) + var(--expense))*1%),#96b0a0 calc((var(--cost) + var(--expense))*1%) 100%)}
.cost-swatch{background:#68a781}.cost-swatch.c1{background:#d2ad68}.cost-swatch.c2{background:#96b0a0}
.store-bar-row{border-color:#edf0ec}
.store-bar-label span{color:#839087}
.store-bar-track{background:#edf2ed}
.store-bar-track i{background:linear-gradient(90deg,#438660,#91bd99)}
.store-bar-track.profit i{background:linear-gradient(90deg,#ac8248,#d2b36e)}
.store-bar-track.profit.negative i{background:#bd6a5f}
.overview-empty{color:#839087}
.overview-empty.prominent{background:#faf6eb;border-color:#eee4cd;color:#856f4c}
.overview-empty.prominent strong{color:#795f39}
.inventory-detail{background:#fff;border-color:#e5eae3}
.inventory-low td{background:#fffdf8}
.inventory-out td{background:#fff9f7}
.inventory-low:hover td,.inventory-out:hover td{background:#f8faf7}
input[readonly]{background:#f4f6f3;color:#819087}
.greeting{background:linear-gradient(110deg,#f0f3e9,#f8f8f1 58%,#e9f2e9);border-color:#e4e9dc;box-shadow:inset 0 1px #ffffff,0 12px 28px rgba(48,71,48,.055)}
.greeting h2{color:#315440}
.greeting p{color:#788979}
.greeting-stamp{border-color:#d5dccb;color:#819276}
.greeting .btn{background:#fff;border-color:#e0e7da;color:#35634a}
.greeting-art{opacity:.48;filter:saturate(.75)}
.login{background:#f3f5f1}
.login-story{background:radial-gradient(ellipse at 80% 50%,rgba(112,151,112,.2),transparent 56%),linear-gradient(145deg,#e8eee4,#f4f1e6);color:#294537}
.login-story h1{color:#315a41}
.login-story p,.login-story footer{color:#718477}
.login-story .greeting-art{filter:saturate(.7);opacity:.58}
.login-form-area{background:linear-gradient(145deg,#f7f8f4,#eff3ed)}
.login-box h2{color:#304438}
.login-box>p,.demo-help{color:#7e8b81}
.role-picks button{background:#fff;border-color:#e2e9e1;color:#607367}
.role-picks button.active,.role-picks button:hover{background:#edf5ee;border-color:#c8dccb;color:#286448}
.particle-layer{position:fixed;z-index:0;inset:0;width:100vw;height:100vh;pointer-events:none;opacity:.17;mix-blend-mode:multiply}
body.is-scrolling .dashboard-chart-panel .chart *{animation-play-state:paused!important}

@media(max-width:1200px){
  .shell{--sidebar-width:208px;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
  .sidebar{width:var(--sidebar-width);padding-left:11px;padding-right:11px}
  .content{padding:24px}
  .topbar{padding:0 23px}
  .grid-main{grid-template-columns:minmax(0,1.45fr) minmax(270px,1fr)}
}
@media(max-width:980px){
  .dashboard-grid{grid-template-columns:1fr}
  .dashboard-rank .rank-row{min-height:45px}
  .dashboard-chart-panel .chart{height:218px}
  .dashboard-stats{gap:12px}
}
@media(max-width:720px){
  .shell{display:block}
  .sidebar{width:240px;padding:23px 13px 16px;box-shadow:12px 0 30px rgba(17,48,34,.2)}
  .sidebar:before{height:139px}
  .sidebar .brand{margin-bottom:34px}
  .workspace{width:100%;margin:0}
  .topbar{height:66px;padding:0 11px}
  .top-actions{gap:5px}
  .preview-role-switch{display:none}
  .content{padding:21px 14px 24px}
  .dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .dashboard-stats .stat{min-height:105px;padding:12px 12px 10px}
  .dashboard-stats .stat-value{font-size:20px}
  .stat-spark{right:12px;bottom:38px;width:49px;height:20px;opacity:.32}
  .dashboard-grid{gap:10px}
  .dashboard-grid .panel-head{padding:13px 12px 9px}
  .dashboard-grid .panel-body{padding:0 10px 11px}
  .dashboard-chart-panel .chart{height:195px;margin:0 -1px}
  .dashboard-chart-panel .legend{font-size:8px}
  .dashboard-chart-panel .chart-footer{font-size:7px}
  .rank-row{min-height:42px}
  .dashboard-recent .table-scroll{overflow-x:auto}
  .recent-orders-table{min-width:650px}
}
@media(prefers-reduced-motion:reduce){.particle-layer{display:none}}

/* Match the selected Tanghuang textile navigation reference. */
.shell{--sidebar-width:248px}
.sidebar{width:var(--sidebar-width);padding:0 13px 17px;background-color:#0d3a31;background-image:linear-gradient(150deg,#123f35 0%,#0d392f 54%,#0b332d 100%);border-right:1px solid rgba(197,164,103,.34);box-shadow:12px 0 34px rgba(20,47,37,.11)}
.sidebar:before,.sidebar:after{display:none}
.sidebar>*{position:relative;z-index:1}
.sidebar-brand{position:relative;isolation:isolate;flex:none;height:139px;margin:0 -13px 3px;padding:28px 10px 0 48px;overflow:hidden}
.sidebar-brand-art{position:absolute;inset:0;width:100%;height:100%;z-index:0}
.sidebar-brand .brand{position:relative;z-index:1;display:block;min-height:0;margin:0;padding:0}
.brand-tanghuang{display:block;gap:0}
.brand-tanghuang .brand-wordmark{display:flex;align-items:baseline;gap:8px;white-space:nowrap}
.brand-tanghuang strong{display:inline;color:#143e33;font-family:"STSong","SimSun",serif;font-size:37px;font-weight:700;letter-spacing:4px;line-height:1.08}
.brand-tanghuang .brand-wordmark>span{color:#294a3d;font-family:"STSong","SimSun",serif;font-size:22px;font-weight:500;letter-spacing:1px}
.sidebar nav{flex:1;min-height:0;margin:0 -13px;overflow-y:auto;padding:10px 0 12px;scrollbar-width:none}
.sidebar nav::-webkit-scrollbar{display:none}
.nav-label{display:flex;align-items:center;gap:8px;min-height:25px;margin:8px 0 2px;padding:9px 12px 4px 22px;color:rgba(222,207,163,.88);font-size:10px;font-weight:650;letter-spacing:.7px;line-height:1.4;white-space:nowrap}
.nav-label:before{content:"";width:9px;height:1px;flex:none;background:#c8a65f;opacity:.8}
.nav-label:not(:first-child){margin-top:10px;border-top:1px solid rgba(235,239,226,.07);padding-top:13px}
.nav-item{min-height:46px;margin:2px 0;padding:11px 15px 11px 30px;gap:15px;border-radius:0 6px 6px 0;color:#d5e0d9;font-size:14px;letter-spacing:.15px}
.nav-item .icon{width:21px;height:21px;stroke-width:2;opacity:.97}
.nav-item.active{color:#185943;background:linear-gradient(100deg,#f4f1e7 0%,#ececdf 100%);box-shadow:none;font-weight:650}
.nav-item.active:before{left:0;top:0;bottom:0;width:4px;border-radius:0;background:#c6a35c;box-shadow:0 0 10px rgba(214,184,120,.34)}
.nav-item.active:after{display:none}
.nav-item.active .icon{color:#24664d}
.sidebar-weave{position:absolute!important;z-index:0!important;left:10px;right:8px;bottom:107px;height:min(31vh,285px);min-height:150px;pointer-events:none;opacity:.42;background-image:repeating-linear-gradient(45deg,transparent 0 15px,rgba(204,190,148,.14) 15px 16px,transparent 16px 30px),repeating-linear-gradient(-45deg,transparent 0 15px,rgba(220,207,166,.1) 15px 16px,transparent 16px 30px),repeating-linear-gradient(0deg,transparent 0 31px,rgba(221,209,170,.055) 31px 32px);mask-image:linear-gradient(to bottom,transparent 0%,#000 23%,#000 84%,transparent 100%)}
.sidebar-footer{position:relative;margin-top:auto;padding:10px 13px 0}
.sidebar-footer:before{content:"";position:absolute;top:0;left:6px;right:6px;height:1px;background:linear-gradient(90deg,transparent,rgba(204,178,113,.58) 12%,rgba(204,178,113,.58) 88%,transparent)}
.sidebar-store-switcher{display:flex;align-items:center;gap:12px;min-width:0;padding:11px 3px 8px;color:#f0ead8;cursor:pointer}
.sidebar-store-switcher strong{display:block;overflow:hidden;color:#f1ecdc;font-size:13px;font-weight:550;line-height:1.5;text-overflow:ellipsis;white-space:nowrap}
.store-switcher-icon{display:grid;place-items:center;width:34px;height:34px;flex:none;color:#d6c48e}
.store-switcher-icon .icon{width:27px;height:27px;stroke-width:1.8}
.store-switcher-copy{display:grid;gap:3px;min-width:0;flex:1}
.store-switcher-copy small{color:rgba(225,231,220,.69);font-size:10px;letter-spacing:.7px}
.store-switcher-copy select{width:100%;min-width:0;padding:0;border:0;border-radius:0;background:transparent;color:#f1ecdc;font-size:13px;font-weight:550;line-height:1.5;outline:none;box-shadow:none;appearance:none;white-space:nowrap;text-overflow:ellipsis}
.store-switcher-copy select:focus{box-shadow:none}
.store-switcher-copy option{background:#f7f5ed;color:#26382f}
.store-switcher-chevron{color:rgba(240,234,216,.82)}
.store-switcher-chevron .icon{width:15px;height:15px;transform:rotate(0deg)}
.login-story .brand-tanghuang .brand-wordmark{align-items:baseline}
.login-story .brand-tanghuang strong{font-size:34px}
@media(max-width:1200px){.shell{--sidebar-width:224px}.sidebar-brand{padding-left:37px;padding-right:8px}.brand-tanghuang strong{font-size:33px}.nav-label{padding-left:18px;font-size:9px}.nav-item{padding-left:26px}}
@media(max-width:720px){.shell{--sidebar-width:248px}.sidebar{width:248px;padding:0 13px 16px}.sidebar-brand{height:134px;margin-bottom:3px;padding:25px 8px 0 43px}.nav-label{min-height:23px;padding-left:18px;font-size:9px}.nav-item{min-height:44px;margin:2px 0;padding:10px 13px 10px 28px}.sidebar-weave{bottom:102px;height:220px}.sidebar-store-switcher{padding-top:9px}.brand-tanghuang strong{font-size:35px}}
.sidebar-weave{left:0;right:0;bottom:84px;height:min(39vh,390px);min-height:240px;opacity:.72;background:none;mask-image:linear-gradient(to bottom,transparent 0%,#000 17%,#000 87%,transparent 100%)}
.sidebar-weave-art{display:block;width:100%;height:100%;overflow:visible}
.sidebar-weave-art .weave-line{fill:none;stroke:#cdbd91;stroke-width:.72;stroke-opacity:.46}
.sidebar-weave-art .weave-accent{stroke:#d9c89b;stroke-width:.8;stroke-opacity:.38}
.sidebar-weave-art .weave-dot{fill:#d9c89b;fill-opacity:.38}
@media(max-width:720px){.sidebar-weave{bottom:88px;height:min(39vh,340px);min-height:220px}}

/* Match the reference revenue chart: net sales line and gross-profit columns. */
.dashboard-chart-head{align-items:flex-start}
.dashboard-chart-tools{display:flex;flex-direction:column;align-items:flex-end;gap:7px;flex:none}
.chart-period-controls{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid #e6ebe6;border-radius:7px;background:#f8faf8}
.chart-period{min-width:27px;padding:4px 7px;border:0;border-radius:4px;background:transparent;color:#78867c;font:inherit;font-size:9px;line-height:1.2;cursor:pointer}
.chart-period:hover{color:#276448;background:#eef5ef}
.chart-period.active{background:#256a4b;color:#fff;box-shadow:0 1px 3px rgba(35,91,62,.16)}
.dashboard-chart-tools .legend{display:flex;align-items:center;gap:6px;white-space:nowrap}
.dashboard-chart-panel .chart{height:225px;margin-top:2px;background:linear-gradient(180deg,rgba(249,251,249,.3),rgba(255,255,255,0))}
.dashboard-chart-panel .chart svg .chart-grid{stroke:#e8ede9!important;stroke-dasharray:none!important;stroke-width:.8!important}
.dashboard-chart-panel .chart svg .chart-grid.zero{stroke:#d6e1d8!important;stroke-width:1!important}
.dashboard-chart-panel .chart svg .chart-label{fill:#89958c!important;font-size:8.7px}
.dashboard-chart-panel .chart svg .chart-date-label{fill:#79867d!important;font-size:9px}
.dashboard-chart-panel .chart svg .chart-bar{fill:url(#chart-bar-fill)!important;opacity:.9}
.dashboard-chart-panel .chart svg path.chart-line{stroke:#176344!important;stroke-width:2.35!important;stroke-linecap:round;stroke-linejoin:round}
.dashboard-chart-panel .chart svg .chart-point{fill:#fff!important;stroke:#176344!important;stroke-width:1.45!important;filter:none!important}
.dashboard-chart-panel .chart svg .chart-crosshair{stroke:#bdc9bf;stroke-width:.9;stroke-dasharray:3 3}
.dashboard-chart-panel .chart svg .chart-tooltip rect{fill:#fff!important;stroke:#e0e8e1!important;stroke-width:.9;filter:drop-shadow(0 3px 8px rgba(41,66,48,.08))!important}
.dashboard-chart-panel .chart svg .chart-tooltip-date{fill:#829087!important;font-size:8px}
.dashboard-chart-panel .chart svg .chart-tooltip-label{fill:#78867d;font-size:7.2px}
.dashboard-chart-panel .chart svg .chart-tooltip-value,.dashboard-chart-panel .chart svg .chart-tooltip-gross{fill:#43554a!important;font-size:8px;font-weight:650;font-variant-numeric:tabular-nums}
.dashboard-chart-panel .chart svg .tooltip-net-dot{fill:#176344}
.dashboard-chart-panel .chart svg .tooltip-gross-swatch{fill:#a8cfb4}
.dashboard-chart-panel .chart-footer{justify-content:flex-start;padding-top:6px}
.payment-methods{display:inline-flex;align-items:center;gap:5px;vertical-align:middle}
.payment-method{width:27px;height:27px;border-radius:8px}
.payment-method img{width:19px;height:19px}
.payment-transaction{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;min-height:29px}
.payment-transaction small{flex-basis:100%;color:#869189;font-size:9px;white-space:nowrap}
.pay-channels{gap:7px}
.pay-channel{display:grid;place-items:center;min-height:43px;padding:5px;border-radius:9px}
.pay-channel .payment-method{width:29px;height:29px;border-radius:8px}
.pay-channel .payment-method img{width:20px;height:20px}
.pay-channel.active{box-shadow:0 2px 6px rgba(39,100,72,.08)}
.payment-choice-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.payment-choice{position:relative;display:flex;min-height:75px;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px solid #e3eae3;border-radius:9px;background:#fff;color:#6f7d73;font-size:10px;cursor:pointer;transition:border-color .16s,background .16s,color .16s}
.payment-choice input{position:absolute;width:1px;height:1px;opacity:0}
.field .payment-choice{font-size:10px;color:#6f7d73}
.payment-choice:has(input:checked){border-color:#7eaa87;background:#f0f7f1;color:#286448;box-shadow:0 2px 7px rgba(39,100,72,.08)}
.payment-choice:focus-within{outline:2px solid #92b998;outline-offset:2px}
.receipt-payment{display:inline-flex;align-items:center;gap:5px}
.receipt-payment>span:last-child{font-size:11px}
@media(max-width:720px){
  .dashboard-chart-head{gap:10px;flex-wrap:wrap}
  .dashboard-chart-tools{align-items:flex-start;flex-direction:row-reverse;justify-content:space-between;flex:1 1 100%;width:100%}
  .dashboard-chart-tools .legend{font-size:8px}
  .dashboard-chart-panel .chart{height:205px}
  .payment-choice-grid{gap:5px}
  .payment-choice{min-height:66px;font-size:9px}
}

/* Clear, labeled charts for the headquarters and regional overview. */
.overview-trend{display:block;width:100%;height:auto;min-height:0;margin:6px 0 0;overflow:visible}
.overview-trend text{fill:#63736a!important;font-size:11px!important;font-weight:500}
.chart-grid{stroke:#e4ebe5;stroke-width:1;stroke-dasharray:3 5}
.chart-grid.zero{stroke:#b7c9b9;stroke-width:1.4;stroke-dasharray:none}
.chart-area{fill:url(#overview-trend-fill)}
.chart-line{fill:none;stroke:#357b57;stroke-width:3.25;stroke-linecap:round;stroke-linejoin:round}
.chart-point{fill:#fff;stroke:#357b57;stroke-width:3}
.cost-ring{position:relative;display:grid;place-items:center;flex:none;box-shadow:none!important}
.cost-ring-center{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:76px;height:76px;border-radius:50%;background:#fff;text-align:center}
.cost-ring-center small{color:#859188;font-size:9px;line-height:1.3;white-space:nowrap}
.cost-ring-center strong{color:#354b40;font-size:10px;font-weight:650;line-height:1.25;white-space:nowrap;font-variant-numeric:tabular-nums}
.store-chart-head,.store-bar-row{display:grid;grid-template-columns:minmax(170px,250px) minmax(0,1fr) minmax(0,1fr);gap:12px 24px;align-items:center}
.store-chart-head{padding:0 0 10px;border-bottom:1px solid #e8eee8;color:#64766a;font-size:11px;font-weight:650}
.store-chart-head>span:not(:first-child){display:flex;align-items:center;gap:7px;min-width:0}
.store-chart-head small{margin-left:auto;color:#89968c;font-size:10px;font-weight:400;white-space:nowrap}
.store-chart-dot{width:8px;height:8px;flex:none;border-radius:50%;background:#438660}
.store-chart-dot.profit{background:#c9a25b}
.store-bar-row{padding:16px 0;border-bottom:1px solid #edf1ed}
.store-bar-row:last-of-type{border-bottom:0}
.store-bar-name{overflow:hidden;color:#34483c;font-size:12px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.store-metric{min-width:0}
.store-metric-value{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:7px;color:#8a968d;font-size:10px}
.store-metric-value strong{overflow:hidden;color:#35483d;font-size:12px;font-weight:650;text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums}
.store-bar-track{height:9px;overflow:hidden;border-radius:999px;background:#edf2ed}
.store-bar-track i{display:block;height:100%;min-width:0;border-radius:999px;background:linear-gradient(90deg,#438660,#91bd99)}
.store-metric.profit .store-bar-track i{background:linear-gradient(90deg,#ac8248,#d2b36e)}
.store-metric.negative .store-bar-track i{background:#bd6a5f}
.store-chart-note{margin:10px 0 0;color:#89968c;font-size:10px;line-height:1.6}
@media(max-width:720px){
  .overview-trend{min-height:0}
  .cost-ring-center{width:63px;height:63px}
  .cost-ring-center strong{font-size:9px}
  .store-chart-head{display:none}
  .store-bar-row{grid-template-columns:1fr;gap:12px}
  .store-bar-name{font-size:13px}
  .store-metric-value span{color:#64766a;font-size:10px}
  .store-chart-note{margin-top:4px}
}

/* Shared chart interactions: curved series plus a date tooltip for every plotted day. */
.dashboard-chart-panel .chart .chart-area{fill:url(#chart-fill)!important}
.overview-revenue-chart{min-width:0}
.overview-revenue-chart .chart{height:auto;margin:5px 0 0;background:linear-gradient(180deg,rgba(249,251,249,.28),rgba(255,255,255,0))}
.overview-revenue-chart .chart svg{display:block;width:100%;height:auto;overflow:visible}
.overview-trend text{fill:#63736a!important;font-size:11px!important;font-weight:500}
.overview-trend .chart-area{fill:url(#overview-trend-fill)!important}
.overview-trend .chart-grid{stroke:#e4ebe5;stroke-width:1;stroke-dasharray:3 5}
.overview-trend .chart-grid.zero{stroke:#b7c9b9;stroke-width:1.2;stroke-dasharray:none}
.overview-trend .chart-bar{fill:url(#chart-bar-fill);opacity:.86}
.overview-trend .chart-line{fill:none;stroke:#287451;stroke-width:3.1;stroke-linecap:round;stroke-linejoin:round}
.overview-trend .chart-point{fill:#fff;stroke:#287451;stroke-width:2}
.overview-trend .chart-label{fill:#738178!important;font-size:10px!important}
.overview-trend .chart-date-label{fill:#748178!important;font-size:10px!important}
.chart-hover-target{cursor:crosshair;outline:none}
.chart-hit-zone{fill:transparent;pointer-events:all}
.chart-hover-target .chart-point,.chart-hover-target .chart-crosshair,.chart-tooltip{pointer-events:none}
.chart-crosshair{opacity:0;stroke:#bdc9bf;stroke-width:.9;stroke-dasharray:3 3}
.chart-tooltip{opacity:0;transition:opacity .12s ease}
.chart-hover-target:hover .chart-tooltip,.chart-hover-target:focus .chart-tooltip,.chart-hover-target:active .chart-tooltip{opacity:1}
.chart-hover-target:hover .chart-crosshair,.chart-hover-target:focus .chart-crosshair,.chart-hover-target:active .chart-crosshair{opacity:1}
.chart-tooltip rect{fill:#fff;stroke:#dce8dd;stroke-width:.9;filter:drop-shadow(0 3px 8px rgba(36,67,46,.12))}
.chart-tooltip-date{fill:#829087;font-size:8px}
.chart-tooltip-label{fill:#78867d;font-size:7.2px}
.chart-tooltip-value,.chart-tooltip-gross{fill:#43554a;font-size:8px;font-weight:650;font-variant-numeric:tabular-nums}
.tooltip-net-dot{fill:#176344}
.tooltip-gross-swatch{fill:#a8cfb4}
.overview-chart-legend{display:flex;align-items:center;gap:7px;color:#78867d;font-size:10px;white-space:nowrap}
.overview-legend-line{width:13px;height:0;border-top:2px solid #287451}
.overview-legend-bar{width:8px;height:9px;margin-left:4px;border-radius:2px;background:#a8cfb4}
@media(max-width:720px){.overview-chart-legend{font-size:9px}}
.dashboard-chart-panel .chart svg{display:block;width:100%;height:100%}

/* Inventory advice: four complete category tiles and clear action urgency. */
.inventory-rule-groups{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.inventory-rule-card{min-width:0;padding:17px 16px}
.inventory-rule-card h3{font-size:13px}
.inventory-advice-legend{display:flex;flex-wrap:wrap;gap:10px 20px;margin-top:13px;color:#65736a;font-size:12px}
.inventory-advice-legend span{display:inline-flex;align-items:center;gap:7px}
.severity-dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.severity-dot.red{background:#bd5149}.severity-dot.yellow{background:#d5a33e}.severity-dot.green{background:#579471}
.severity-badge{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:650;white-space:nowrap}
.severity-badge.red{background:#fff0ee;color:#a83f38;border:1px solid #f2cbc6}
.severity-badge.yellow{background:#fff7e7;color:#946416;border:1px solid #f1dfb6}
.severity-badge.green{background:#edf7f0;color:#347352;border:1px solid #d1e8d8}
.severity-row-red td:first-child{box-shadow:inset 3px 0 #bd5149}
.severity-row-yellow td:first-child{box-shadow:inset 3px 0 #d5a33e}
.severity-row-green td:first-child{box-shadow:inset 3px 0 #579471}
.advice-text{margin-top:6px;color:#34463b;font-weight:600}
.inventory-restock{min-height:36px;padding:7px 11px;font-size:12px;white-space:nowrap}
.inventory-product-meta{display:none}
.inventory-table{min-width:980px}
.inventory-toolbar{align-items:center}
@media (min-width:721px) and (max-width:1440px){
 .shell{--sidebar-width:216px;grid-template-columns:var(--sidebar-width) minmax(0,1fr)}
 .sidebar{width:var(--sidebar-width)}
 .content{width:100%;max-width:none;padding:22px 24px 28px}
 .topbar{height:66px;padding:0 20px}
 .page-title h1{font-size:27px}.page-title p{font-size:12px;line-height:1.65}
 .panel-head h2{font-size:15px}.panel-head p{font-size:12px}
 .content .small{font-size:12px}
 .content table{font-size:13px}
 .content th{font-size:11px;padding:11px 12px}
 .content td{padding:12px}
 .content .btn{font-size:12px;min-height:38px}
 .inventory-table{min-width:900px}
 .inventory-product-meta{display:block;margin-top:4px;color:#78867d;font-size:11px;line-height:1.45}
 .inventory-table th:nth-child(2),.inventory-table td:nth-child(2){display:none}
 .inventory-table th:nth-child(6),.inventory-table td:nth-child(6){display:none}
 .inventory-table th:nth-child(5):last-child,.inventory-table td:nth-child(5):last-child{display:none}
}
@media (min-width:721px) and (max-width:1100px){
 .content{padding:18px 16px 24px}
 .inventory-rule-groups{grid-template-columns:repeat(2,minmax(0,1fr))}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .inventory-toolbar{flex-wrap:wrap}
 .inventory-toolbar .search{flex:1 1 100%;min-width:0}
 .inventory-toolbar .tabs{flex:1 1 auto;overflow-x:auto}
 .inventory-table{min-width:680px;table-layout:fixed}
 .inventory-table th:nth-child(3),.inventory-table td:nth-child(3),.inventory-table th:nth-child(4),.inventory-table td:nth-child(4){display:none}
 .inventory-table th:nth-child(8),.inventory-table td:nth-child(8){display:none}
 .inventory-table th:nth-child(7),.inventory-table td:nth-child(7){display:none}
 .inventory-table th:nth-child(6),.inventory-table td:nth-child(6){display:table-cell}
 .inventory-table td:last-child .actions{flex-wrap:wrap;gap:3px}
 .inventory-table td:last-child .btn.link{padding:5px 6px;font-size:11px}
}
@media(max-width:720px){
 .inventory-rule-groups{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .inventory-rule-card{padding:13px 12px}
 .inventory-advice-legend{gap:8px 12px;font-size:11px}
}
/* Correct responsive column positions for the storekeeper view, which omits cost. */
@media (min-width:721px) and (max-width:1440px){.inventory-table.inventory-guide th:nth-child(5),.inventory-table.inventory-guide td:nth-child(5){display:none}}
@media (min-width:721px) and (max-width:1100px){
 .inventory-table:not(.inventory-guide) th:nth-child(6),.inventory-table:not(.inventory-guide) td:nth-child(6),.inventory-table:not(.inventory-guide) th:nth-child(8),.inventory-table:not(.inventory-guide) td:nth-child(8),.inventory-table.inventory-guide th:nth-child(7),.inventory-table.inventory-guide td:nth-child(7){display:none}
 .inventory-table:not(.inventory-guide) th:nth-child(7),.inventory-table:not(.inventory-guide) td:nth-child(7),.inventory-table.inventory-guide th:nth-child(6),.inventory-table.inventory-guide td:nth-child(6){display:table-cell}
}@media (min-width:721px) and (max-width:1100px){.inventory-table.inventory-guide th:nth-child(4),.inventory-table.inventory-guide td:nth-child(4){display:table-cell}}@media (min-width:721px) and (max-width:1100px){.inventory-table.inventory-guide th:nth-child(4),.inventory-table.inventory-guide td:nth-child(4){display:table-cell}}@media (min-width:1101px) and (max-width:1440px){.inventory-table.inventory-guide th:nth-child(6),.inventory-table.inventory-guide td:nth-child(6){display:table-cell}}
@media (min-width:721px) and (max-width:1100px){.inventory-table.inventory-guide th:nth-child(8),.inventory-table.inventory-guide td:nth-child(8){display:table-cell}}

/* Small text corrections only; preserve the original layout and control sizes. */
@media screen {
  :root{--muted:#6b7c70}
  :is(.shell,#modal,.login) :is(input,select,textarea){font-size:14px}
  :is(.shell,#modal,.login) :is(.btn,.tab,.filter-select,.message-filter,.pay-channel){font-size:13px}
  :is(.shell,#modal,.login) :is(.btn.sm,.btn.link){font-size:12px}
  :is(.shell,#modal,.login) :is(.small,.tag,.table-foot,.chart-footer,.bottom-note,.form-hint,.field label,.check-row,.form-error,.filter-status,.rule-source,.severity-badge){font-size:12px}
  :is(.shell,#modal,.login) :is(.page-title p,.panel-head p,.greeting p,.product-cell small,.table-sub,.product-info .spec,.dashboard-product-cell small,.inventory-product-meta,.payment-transaction small){font-size:12px;color:#6b7c70}
  :is(.shell,#modal) table{font-size:14px}
  :is(.shell,#modal) th{font-size:12px}
  .shell .panel-head h2{font-size:15px}
  .shell .stat-top{font-size:13px;color:#63766a}
  .shell .stat-foot{font-size:11px;color:#6b7c70}
  .shell .overview-kpi>span{font-size:13px}
  .shell .nav-label{font-size:11px;letter-spacing:.25px}
  .shell .store-switcher-copy small{font-size:11px}
  .shell .store-switcher-copy select{font-size:13px}
  .shell .rank-name,.shell .rank-total{font-size:13px}
  .shell .rank-meta{font-size:11px;color:#6b7c70}
  .shell .rank-medal{font-size:11px}
  .shell :is(.dashboard-chart-tools .legend,.overview-chart-legend){font-size:11px;color:#63766a}
  .shell .chart-period{font-size:11px}
  .shell .dashboard-chart-panel .chart-footer{font-size:11px;color:#6b7c70}
  .shell .dashboard-product-cell strong{font-size:13px}
  .shell :is(.dashboard-recent .panel-head>.tag,.recent-orders-table .tag){font-size:11px}
  .shell :is(.dashboard-recent .table-foot,.dashboard-stock .table-foot){font-size:11px}
  .shell .dashboard-recent .table-foot .btn{font-size:11px}
  .shell .inventory-table td:last-child .btn.link{font-size:12px}
  .shell .inventory-rule-card h3{font-size:14px}
  .shell :is(.inventory-advice-legend,.store-chart-head,.store-chart-note,.store-metric-value,.store-metric-value span){font-size:12px}
  .shell :is(.store-bar-name,.store-metric-value strong){font-size:13px}
  .shell .cost-legend>div{font-size:12px}
  .shell .cost-ring-center small{font-size:11px}
  .shell .cost-ring-center strong{font-size:11px}
  :is(.shell,#modal) :is(.payment-method-fallback,.payment-choice,.receipt-payment>span:last-child){font-size:12px}
  :is(.shell,#modal) :is(.message-meta,.message-card-time,.message-detail-meta,.message-detail-stores,.replenishment-card-content p,.replenishment-product p,.replenishment-note,.replenishment-sort-note,.replenishment-facts dt){font-size:12px}
  /* Keep axis labels at their screen size inside the original chart height. */
  .shell [data-revenue-chart] svg text{font-size:11px!important;fill:#63766a!important}
  .shell [data-revenue-chart] svg :is(.chart-tooltip-date,.chart-tooltip-label,.chart-tooltip-value,.chart-tooltip-gross){font-size:12px!important}
  .shell [data-revenue-chart] svg :is(.chart-tooltip-value,.chart-tooltip-gross){fill:#344f3e!important}
  .shell [data-revenue-chart] .chart-tooltip .tooltip-gross-swatch{fill:#a8cfb4!important;stroke:none!important;filter:none!important}
}

/* Benefits management: separate tasks, compact cards, wrapping mobile records. */
@media screen {
  #modal.benefits-modal{width:min(860px,calc(100vw - 30px))}
  #modal.benefits-modal .modal-content{padding-bottom:22px;scroll-padding-bottom:20px}
  #modal .benefits-manager{font-size:13px;line-height:1.55;min-width:0}
  #modal .benefit-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 20px;border-bottom:1px solid #e5ebe4}
  #modal .benefit-tab{position:relative;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:#6b7c70;padding:10px 8px;font-size:13px;line-height:1.5}
  #modal .benefit-tab:hover{color:#215b43;background:#f6f9f5}
  #modal .benefit-tab.active{border-bottom-color:#24634b;color:#20583f;font-weight:650}
  #modal .benefit-section-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:14px}
  #modal .benefit-section-head h3{margin:0;font-size:14px;line-height:1.5}
  #modal .benefit-section-head p{margin:4px 0 0;color:#718076;font-size:12px}
  #modal .benefit-section-head>.btn{flex-shrink:0}
  #modal .benefit-offer-list{display:grid;gap:12px}
  #modal .benefit-offer-card{min-width:0;border:1px solid #e3eae3;border-radius:10px;background:#fff;padding:16px}
  #modal .benefit-offer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
  #modal .benefit-offer-title{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
  #modal .benefit-offer-title h4{margin:0;font-size:14px;font-weight:650;overflow-wrap:anywhere}
  #modal .benefit-offer-discount{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:flex-end;gap:4px 8px;flex-shrink:0}
  #modal .benefit-offer-discount span{color:#718076;font-size:12px}
  #modal .benefit-offer-discount strong{color:#256047;font-size:16px;font-weight:650;white-space:nowrap;font-variant-numeric:tabular-nums}
  #modal .benefit-offer-meta{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr);gap:12px;margin:14px 0}
  #modal .benefit-offer-meta>div{min-width:0}
  #modal .benefit-offer-meta dt{margin:0 0 4px;color:#718076;font-size:12px}
  #modal .benefit-offer-meta dd{margin:0;color:#354c3e;font-size:13px;overflow-wrap:anywhere}
  #modal .benefit-offer-meta dd span{color:#718076}
  #modal .benefit-offer-foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding-top:12px;border-top:1px solid #eef1ec;color:#718076;font-size:12px}
  #modal .benefit-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
  #modal .benefit-actions .btn{white-space:nowrap;flex-shrink:0}
  #modal .benefit-help{margin:0 0 14px;border:1px solid #e8ede6;border-radius:8px;background:#f8faf7;padding:10px 12px;color:#66776c;font-size:12px}
  #modal .benefit-help summary{cursor:pointer;color:#4b6656}
  #modal .benefit-help summary:focus-visible{outline:2px solid #719d7b;outline-offset:3px}
  #modal .benefit-help p{margin:8px 0 0;line-height:1.7}
  #modal .benefit-coupon-table{width:100%;min-width:0;table-layout:fixed;font-size:13px}
  #modal .benefit-coupon-table :is(th,td){padding:12px 8px;text-align:left;white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
  #modal .benefit-coupon-table strong{display:block;font-size:13px;font-weight:500}
  #modal .benefit-coupon-table small{display:block;margin-top:4px;font-size:12px;color:#718076}
  #modal .benefit-coupon-code{font-family:Consolas,monospace;letter-spacing:.1px}
  #modal .benefit-coupon-action .btn{white-space:nowrap}
  #modal .benefit-birthday-card{border:1px solid #e0e9df;border-radius:10px;background:#f8faf7;padding:16px;margin-bottom:14px}
  #modal .benefit-birthday-card .benefit-section-head{margin-bottom:12px}
  #modal .benefit-birthday-card .benefit-offer-meta{margin-bottom:0}
  #modal .benefit-rule-name{margin:0;color:#45604e;font-size:13px;font-weight:500}
  #modal .benefit-rule-empty{margin:0;color:#718076;font-size:12px}
  #modal .benefit-record-heading{margin-top:22px}
  #modal .benefit-award-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #eaf0e8}
  #modal .benefit-award-row strong{font-weight:500;overflow-wrap:anywhere}
  #modal .benefit-award-row>span:not(.tag){color:#718076;font-size:12px}
  #modal .benefit-empty{padding:28px 16px;border:1px dashed #e1e8df;border-radius:8px;text-align:center;color:#718076;font-size:12px}
  #modal .benefit-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding-top:16px;color:#718076;font-size:12px}
  @media(max-width:620px){
    #modal .benefit-offer-head{flex-direction:column;gap:8px}
    #modal .benefit-offer-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
    #modal .benefit-offer-meta>div:last-child{grid-column:1/-1}
    #modal .benefit-offer-foot>.benefit-actions{margin-left:auto}
    #modal .benefit-coupon-table :is(colgroup,thead){display:none}
    #modal .benefit-coupon-table,#modal .benefit-coupon-table tbody{display:block}
    #modal .benefit-coupon-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px;border:1px solid #e3eae3;border-radius:9px;margin-bottom:10px}
    #modal .benefit-coupon-table td{display:block;padding:0;border:0}
    #modal .benefit-coupon-table td:before{content:attr(data-label);display:block;margin-bottom:4px;color:#718076;font-size:11px}
    #modal .benefit-coupon-table .benefit-coupon-action{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-end;gap:12px;border-top:1px solid #eef1ec;padding-top:10px}
    #modal .benefit-coupon-table .benefit-coupon-action:before{margin:0}
    #modal .benefit-award-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}
    #modal .benefit-award-row>.tag{grid-column:1/-1;justify-self:start}
  }
}
/* Shared interaction sizing. Keep controls flexible for narrow screens and large text. */
@media screen {
  :root{--control-min-height:42px;--content-line-height:1.65;--feedback-background:#f3f6f0;--feedback-text:#365744}
  .topbar-store-name{max-width:280px;min-width:0;overflow-wrap:anywhere;line-height:1.4;font-size:14px}
  .store-picker{min-width:0;gap:10px}
  .form-store-context{padding:10px 12px;margin:0 0 16px;border-radius:8px;background:var(--feedback-background);color:var(--feedback-text);line-height:var(--content-line-height);overflow-wrap:anywhere}
  .btn[aria-busy="true"]{cursor:progress;opacity:.75}
  .page-title h1,.modal-head h2,.notice,.form-hint,.form-error{overflow-wrap:anywhere}
  .table-foot,.panel-head{flex-wrap:wrap;gap:12px}
  .delivery-panel{margin-top:24px}
  .delivery-panel>.form-hint{padding:0 20px}
  .delivery-filters{display:flex;align-items:end;flex-wrap:wrap;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line)}
  .delivery-filters>label{flex:1 1 155px;min-width:0;font-size:13px;line-height:1.8}
  .delivery-filters input,.delivery-filters select{width:100%;min-width:0;min-height:var(--control-min-height)}
  .delivery-filters .btn{min-height:var(--control-min-height)}
  .delivery-result{white-space:normal!important;overflow-wrap:anywhere;min-width:220px;max-width:460px;line-height:var(--content-line-height)}
  #modal .campaign-poster-preview{width:min(100%,420px);height:auto;max-height:65dvh;object-fit:contain;background:#f7f8f4}
}
@media screen and (max-width:620px){
  .topbar{height:auto;min-height:68px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
  .topbar-store-name{max-width:calc(100vw - 86px);font-size:13px}
  .topbar .store-picker{flex:1 1 100%}
  .topbar .top-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}
  .topbar .user{min-width:0;overflow-wrap:anywhere}
  .page-actions .btn,.form-actions .btn{height:auto;min-height:44px;white-space:normal;line-height:1.5;overflow-wrap:anywhere}
  .modal-head h2{min-width:0;font-size:18px}
  .modal-head .icon-btn{flex:none}
  .delivery-filters{padding:14px;gap:10px}
  .delivery-filters>label{flex:1 1 130px}
  .delivery-filters>label:first-child{flex-basis:100%}
  .delivery-filters>.btn{flex:1}
  .table-foot .actions{flex-wrap:wrap}
  .date-filter input{min-width:0;width:42%;font-size:13px}
}

/* Keep long organization names and compact date/amount controls inside their cards. */
@media screen {
  #content .panel-body>.btn[data-action="org-edit"]{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:left}
  .permission-page{overflow-wrap:anywhere}
  .permission-page .actions>.btn{max-width:100%;white-space:normal;overflow-wrap:anywhere;height:auto;line-height:1.6}
}
@media screen and (max-width:620px){
  .page-actions .date-filter{display:grid;grid-template-columns:19px minmax(0,1fr) auto minmax(0,1fr);gap:6px;width:100%;max-width:100%;min-width:0}
  .page-actions .date-filter input{width:100%;max-width:100%;min-width:0;font-size:12px}
  .topbar .top-actions{gap:3px}
  .topbar #replenishment-pending-button{padding:6px 4px;font-size:11px;gap:4px;white-space:nowrap;min-width:0;max-width:80px}
  .stats .stat-value{line-height:1.3}
}
@media screen and (max-width:420px){
  .stats:not(.inventory-rule-groups){grid-template-columns:minmax(0,1fr)}
  .stats:not(.inventory-rule-groups) .stat-value{font-size:24px}
  .stats .stat-value small{font-size:13px}
}
