:root{--nav:#0d2d50;--blue:#1769e0;--blue-soft:#eaf2ff;--bg:#f3f6fa;--paper:#fff;--ink:#10243f;--muted:#718097;--line:#dce4ee;--green:#07936a;--green-soft:#e8f8f2;--amber:#c26b00;--amber-soft:#fff4df;--red:#d3483e;--red-soft:#fff0ee;--violet:#7656c5;--violet-soft:#f2edff;--radius:10px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.45 "Segoe UI Variable","Segoe UI",Arial,sans-serif;font-variant-numeric:tabular-nums}button,input,select{font:inherit;color:inherit}.app-shell{min-height:100vh;display:grid;grid-template-columns:232px minmax(0,1fr)}
.sidebar{position:sticky;top:0;height:100vh;background:var(--nav);color:#fff;padding:25px 16px;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none;padding:0 9px 24px}.brand-mark{width:34px;height:34px;border-radius:9px;background:#fff;color:var(--nav);display:grid;place-items:center;font-size:19px;font-weight:900}.brand strong,.brand small{display:block}.brand strong{font-size:18px;letter-spacing:.7px}.brand small{color:#9db2cb;font-size:9px;text-transform:uppercase;letter-spacing:1px}.workspace-card{border:1px solid rgba(255,255,255,.17);border-radius:9px;padding:13px 14px;margin:0 5px 24px}.workspace-card span,.workspace-card small{display:block;color:#9db2cb;font-size:9px;letter-spacing:.7px}.workspace-card strong{display:block;margin:5px 0;font-size:13px}.sidebar nav{display:grid;gap:4px}.sidebar nav a{height:42px;border-radius:7px;padding:0 12px;display:flex;align-items:center;gap:11px;color:#cbd7e5;text-decoration:none;font-weight:650}.sidebar nav a:hover{background:rgba(255,255,255,.07);color:#fff}.sidebar nav a.active{background:#fff;color:var(--nav)}.sidebar nav i{width:21px;text-align:center;font-style:normal;font-size:17px;color:#9db4ce}.sidebar nav a.active i{color:var(--blue)}.demo-note{margin-top:auto;padding:16px 10px 0;border-top:1px solid rgba(255,255,255,.12);display:flex;align-items:center;gap:10px}.demo-note>span{width:8px;height:8px;border-radius:50%;background:#26c48a;box-shadow:0 0 0 4px rgba(38,196,138,.14)}.demo-note b,.demo-note small{display:block}.demo-note b{font-size:10px}.demo-note small{font-size:9px;color:#9db2cb}.main{min-width:0}.mobile-header{display:none}.page{max-width:1840px;margin:auto;padding:25px 28px 48px}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:13px}.page-head h1{font-size:26px;line-height:1.2;margin:0 0 4px;letter-spacing:-.45px}.page-head p{margin:0;color:var(--muted);font-size:12px}.demo-badge{font-size:10px;color:#53708f;letter-spacing:.8px;text-transform:uppercase;padding-top:5px}.panel,.kpi{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius)}
.filters{padding:14px 16px;display:flex;align-items:flex-end;gap:11px;margin-bottom:12px;flex-wrap:wrap}.field{display:grid;gap:6px;min-width:170px}.field.grow{flex:1}.field label{font-size:9px;color:#5e6d82;font-weight:800;text-transform:uppercase;letter-spacing:.45px}.field select,.field input{height:40px;border:1px solid #ccd7e4;border-radius:7px;background:#fff;padding:0 11px;min-width:0}.date-pair{display:flex;align-items:center;gap:7px}.date-pair input{width:145px}.actions{display:flex;gap:7px;margin-left:auto}.btn{height:40px;border:1px solid #cbd6e3;border-radius:7px;background:#fff;padding:0 15px;font-weight:700;cursor:pointer}.btn:hover{border-color:#9eb0c6}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}.scope{margin-bottom:13px;padding:10px 13px;background:#eaf2ff;border-left:3px solid var(--blue);color:#506782;font-size:11px}.section-head{display:flex;justify-content:space-between;align-items:center;margin:14px 1px 8px}.section-head h2{margin:0;font-size:14px}.section-head span{font-size:10px;color:var(--muted)}.kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.kpi{padding:15px;min-height:118px}.kpi-label{font-size:11px;color:#617087;font-weight:700}.kpi-value{font-size:22px;font-weight:800;margin:10px 0 5px;letter-spacing:-.3px}.kpi-meta{font-size:10px;color:var(--muted)}.delta{font-size:10px;font-weight:700;margin-bottom:4px}.success{color:var(--green)}.danger{color:var(--red)}.warning{color:var(--amber)}.violet{color:var(--violet)}
.content-grid{display:grid;grid-template-columns:1.7fr 1fr;gap:10px;margin-top:10px}.card{padding:15px 17px}.card-title{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:12px}.card-title b{font-size:13px}.card-title span{color:var(--muted);font-size:9px}.bars{display:grid;gap:12px}.bar-row{display:grid;grid-template-columns:120px 1fr 72px;align-items:center;gap:10px;font-size:11px}.bar-track{height:8px;background:#edf1f5;border-radius:8px;overflow:hidden}.bar-fill{height:100%;border-radius:8px}.bar-row strong{text-align:right}.channel-row{display:grid;grid-template-columns:140px 1fr 85px;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #edf0f4}.channel-row:last-child{border:0}.channel{display:flex;align-items:center;gap:9px;font-weight:700;font-size:11px}.platform-logo{width:22px;height:22px;object-fit:contain;border-radius:5px}.platform-logo.web{display:grid;place-items:center;background:#eaf2ff;color:var(--blue);font-size:13px}.chart{height:195px;display:flex;align-items:flex-end;gap:7px;padding:18px 4px 6px;border-bottom:1px solid var(--line)}.chart-group{flex:1;height:100%;display:flex;align-items:flex-end;justify-content:center;gap:3px;position:relative}.chart-group i{width:10px;border-radius:3px 3px 0 0;background:var(--blue)}.chart-group i:last-of-type{background:var(--green)}.chart-group span{position:absolute;bottom:-23px;font-size:9px;color:var(--muted)}
.trend-wrap{min-height:205px}.chart-legend{display:flex;gap:16px;color:var(--muted);font-size:9px;margin-bottom:2px}.chart-legend span{display:flex;align-items:center;gap:6px}.chart-legend i{width:8px;height:8px;border-radius:2px}.legend-blue{background:var(--blue)}.legend-green{background:var(--green)}.line-chart{display:block;width:100%;height:185px;overflow:visible}.line-chart text{fill:#8390a3;font-size:10px}.grid-line{stroke:#e1e7ef;stroke-width:1}.series{fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.revenue-line{stroke:var(--blue)}.payout-line{stroke:var(--green)}.status-chart{display:grid;gap:13px;padding:8px 1px}.status-row{display:grid;grid-template-columns:105px 1fr 38px;align-items:center;gap:10px;font-size:10px}.status-row strong{text-align:right}.health-strip{display:grid;grid-template-columns:230px repeat(3,minmax(0,1fr));margin-top:10px;overflow:hidden}.health-intro,.health-metric{padding:15px 16px;border-right:1px solid var(--line)}.health-metric:last-child{border-right:0}.health-intro b,.health-intro span,.health-metric span,.health-metric small{display:block}.health-intro span,.health-metric small{color:var(--muted);font-size:9px;margin-top:5px}.health-metric{position:relative}.health-metric span{font-size:10px;font-weight:700}.health-metric strong{position:absolute;right:16px;top:19px;font-size:20px}.overview-lower{grid-template-columns:1.35fr 1fr}.shop-mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.shop-mini-grid div{display:flex;justify-content:space-between;gap:8px;background:#f5f8fc;border-radius:6px;padding:7px 9px;font-size:9px}.return-insights{grid-template-columns:1.35fr 1fr}.return-flow.compact{margin:0}.return-flow.compact .flow-step{padding:15px 12px}
.table-panel{margin-top:10px;overflow:hidden}.table-toolbar{min-height:55px;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line)}.table-title b{font-size:14px}.table-title span{margin-left:8px;color:var(--muted);font-size:10px}.table-tools{display:flex;gap:8px}.search{width:250px;height:36px;border:1px solid #d0dae7;border-radius:7px;padding:0 11px}.table-scroll{overflow:auto;max-height:560px}table{width:100%;border-collapse:collapse;min-width:1180px}th{position:sticky;top:0;z-index:2;background:#f4f7fa;color:#5d6d82;text-transform:uppercase;letter-spacing:.3px;font-size:9px;text-align:left;padding:11px 10px;border-bottom:1px solid var(--line);white-space:nowrap}th.sortable{cursor:pointer;user-select:none}th.sortable:hover{color:var(--blue)}td{padding:11px 10px;border-bottom:1px solid #e8edf3;font-size:10.5px;white-space:nowrap}tbody tr:hover{background:#fbfcfe}.num{text-align:right}.primary{font-weight:700;color:#203450}.sub{font-size:9px;color:#8491a3;margin-top:3px}.status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 8px;font-size:9px;font-weight:750}.status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.status.green{background:var(--green-soft);color:var(--green)}.status.red{background:var(--red-soft);color:var(--red)}.status.amber{background:var(--amber-soft);color:var(--amber)}.status.purple{background:var(--violet-soft);color:var(--violet)}.status.blue{background:var(--blue-soft);color:var(--blue)}.money-link{color:var(--blue);text-decoration:underline;text-underline-offset:2px;cursor:pointer}.fee-detail{display:none;position:fixed;z-index:50;width:310px;background:#fff;border:1px solid #cbd6e3;border-radius:9px;padding:12px;box-shadow:0 18px 46px rgba(16,36,63,.2)}.fee-detail.open{display:block}.fee-line{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid #edf0f4}.fee-line:last-child{border:0;font-weight:800}.empty{text-align:center;color:var(--muted);padding:38px!important}
.return-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.return-flow{display:grid;grid-template-columns:repeat(4,1fr);margin-top:10px;overflow:hidden}.flow-step{padding:18px;border-right:1px solid var(--line)}.flow-step:last-child{border:0}.flow-step strong{display:block;font-size:22px;margin-bottom:5px}.flow-step span{font-size:10px;color:var(--muted)}.role-layout{display:grid;grid-template-columns:330px minmax(0,1fr);gap:10px}.role-layout>*{min-width:0}.member-list{padding:8px}.member{display:flex;gap:10px;padding:11px;border-radius:8px;cursor:pointer}.member:hover,.member.active{background:var(--blue-soft)}.avatar{width:34px;height:34px;border-radius:50%;background:#dce9ff;color:var(--blue);display:grid;place-items:center;font-weight:800}.member b,.member small{display:block}.member b{font-size:11px}.member small{font-size:9px;color:var(--muted)}.role-card{min-width:0;padding:17px}.role-head{display:flex;justify-content:space-between;align-items:start;margin-bottom:15px}.role-head h2{margin:0 0 4px;font-size:17px}.role-head p{margin:0;color:var(--muted);font-size:10px}.matrix{max-width:100%;overflow:auto}.matrix table{min-width:600px}.permission{width:19px;height:19px;border-radius:5px;border:1px solid #bdcad9;background:#fff;display:inline-grid;place-items:center;color:#fff;cursor:pointer}.permission.on{background:var(--blue);border-color:var(--blue)}.permission.on:after{content:"✓";font-size:12px;font-weight:800}.permission.disabled{opacity:.35;cursor:not-allowed}.platform-cell{display:flex;align-items:center;gap:8px}.indent{padding-left:34px}.role-tabs{display:flex;gap:5px;margin-bottom:12px}.role-tabs button{height:32px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 11px;font-size:10px;font-weight:700}.role-tabs button.active{background:var(--nav);color:#fff;border-color:var(--nav)}
#toast{position:fixed;right:24px;bottom:24px;z-index:80;background:var(--nav);color:#fff;border-radius:8px;padding:11px 15px;font-size:11px;opacity:0;transform:translateY(8px);transition:.18s;pointer-events:none}#toast.show{opacity:1;transform:none}:focus-visible{outline:3px solid rgba(23,105,224,.25);outline-offset:2px}
@media(max-width:1360px){.app-shell{grid-template-columns:76px minmax(0,1fr)}.sidebar{padding-inline:10px}.brand{justify-content:center}.brand>span:last-child,.workspace-card,.sidebar nav span,.demo-note div{display:none}.sidebar nav a{justify-content:center}.demo-note{justify-content:center}.money-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.money-filters .field{min-width:0}.money-filters .field.grow{grid-column:span 2}.money-filters .date-pair input{width:100%}.money-filters .actions{margin-left:0;justify-content:flex-end}.kpi-grid{grid-template-columns:repeat(3,1fr)}.return-summary{grid-template-columns:repeat(2,1fr)}.role-layout{grid-template-columns:280px 1fr}.health-strip{grid-template-columns:180px repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.app-shell{display:block}.sidebar{position:fixed;left:-250px;width:232px;transition:left .2s}.sidebar.open{left:0}.main{padding-top:48px}.mobile-header{position:fixed;top:0;z-index:15;width:100%;height:48px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 13px}.mobile-header button{border:0;background:transparent;font-size:20px}.mobile-header span{font-size:9px;color:var(--blue)}.page{padding:16px 12px 38px}.page-head h1{font-size:22px}.demo-badge{display:none}.filters{display:grid;grid-template-columns:1fr 1fr}.field{min-width:0}.field.grow,.actions{grid-column:1/-1}.date-pair input{width:100%}.kpi-grid{grid-template-columns:1fr 1fr}.kpi:last-child{grid-column:1/-1}.content-grid,.role-layout{grid-template-columns:1fr}.health-strip{grid-template-columns:1fr 1fr}.health-intro{grid-column:1/-1}.health-intro,.health-metric{border-bottom:1px solid var(--line)}.return-flow{grid-template-columns:1fr 1fr}.flow-step:nth-child(2){border-right:0}.flow-step:nth-child(-n+2){border-bottom:1px solid var(--line)}.table-toolbar{align-items:flex-start;flex-direction:column}.table-tools{width:100%}.search{width:100%}.shop-mini-grid{grid-template-columns:1fr}.line-chart{height:160px}}

/* Clone fidelity: keep the demo's visual density and hierarchy aligned with OPSCORE. */
.btn{font-weight:600}
.field label{font-weight:650}
.kpi-label{font-weight:600}
.kpi-value{font-weight:700}
.delta{font-weight:600}
.card-title b,.table-title b,.section-head h2{font-weight:650}
th{font-weight:600}
.primary{font-weight:600}
.status{font-weight:600}
.channel{font-weight:500}
.role-tabs button{font-weight:600}

.platform-sub{display:flex;align-items:center;gap:7px;margin-top:5px;color:#7b899d;font-size:10px;font-weight:400;line-height:1.25}
.platform-sub .platform-logo{width:17px;height:17px;flex:0 0 17px;border-radius:4px}
.shop-sub{padding-left:24px;margin-top:2px}

.money-table{min-width:1600px}
.money-table th{padding:12px 11px;font-size:9.5px}
.money-table td{padding:12px 11px;font-size:11px;line-height:1.35}
.money-link{border:0;background:transparent;padding:0;font:inherit;font-weight:500;color:var(--blue)}
.fee-detail{width:330px;padding:13px 16px;font-size:12px}
.fee-title{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:1px 0 9px;border-bottom:1px solid #e7ecf2;font-weight:650}
.fee-title button{width:27px;height:27px;border:0;border-radius:6px;background:#f1f4f8;color:#718097;cursor:pointer;font-size:16px;line-height:1}
.fee-line{padding:8px 0;color:#4c5f77}
.fee-line strong{font-weight:600;color:var(--ink)}
.fee-line.fee-total{padding-top:10px;font-weight:650;color:var(--ink)}
.fee-line.fee-total strong{font-weight:700}

.return-filter-panel{padding:15px 16px;margin-bottom:13px}
.return-filter-grid{display:grid;grid-template-columns:1.05fr .92fr .92fr 1.1fr 1.7fr auto;gap:11px;align-items:end}
.return-filter-grid .field{min-width:0}
.return-filter-grid .field select,.return-filter-grid .field input{width:100%}
.return-filter-grid .return-date .date-pair input{width:100%}
.return-filter-grid .actions{margin-left:0}
.return-summary .kpi{min-height:118px}
.return-analytics{display:grid;grid-template-columns:1.65fr 1fr;gap:10px;margin-top:10px}
.return-chart{padding:16px 18px}
.card-title p{margin:4px 0 0;color:var(--muted);font-size:10px;font-weight:400}
.return-funnel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:18px}
.return-step{min-height:108px;padding:13px 12px;background:#f6f8fb;border-top:4px solid var(--blue)}
.return-step.step-2{border-top-color:#dc8a12}.return-step.step-3{border-top-color:var(--violet)}.return-step.step-4{border-top-color:var(--green)}
.return-step b,.return-step span,.return-step small{display:block}
.return-step b{font-size:21px;font-weight:700;margin-bottom:4px}
.return-step span{font-size:10px;font-weight:600}
.return-step small{margin-top:5px;color:var(--muted);font-size:9px;font-weight:400}
.wait-chart{margin-top:21px}
.chart-note{margin:16px 0 0;padding-top:12px;border-top:1px solid #e7ecf2;color:var(--muted);font-size:9px}
.return-table{min-width:1500px}
.return-table th{font-size:9.2px;padding:11px 10px}
.return-table td{font-size:10.5px;padding:12px 10px;vertical-align:middle}
.row-link{border:0;background:transparent;padding:4px 0;color:var(--blue);font:inherit;font-weight:600;cursor:pointer}
.status.neutral{background:#f1f4f7;color:#7e8b9d}
.brand-word{font-size:19px;font-weight:700;letter-spacing:.7px}
.brand-mini{display:none;width:34px;height:34px;border-radius:9px;background:#fff;color:var(--nav);place-items:center;font-size:18px;font-weight:700}

@media(max-width:1360px){
  .brand-word{display:none}
  .brand-mini{display:grid!important}
  .return-filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .return-filter-grid .return-date{grid-column:span 2}
  .return-filter-grid .actions{grid-column:span 2;justify-content:flex-end}
  .return-analytics{grid-template-columns:1.4fr 1fr}
}
@media(max-width:760px){
  .return-filter-grid{grid-template-columns:1fr 1fr}
  .return-filter-grid .return-date,.return-filter-grid .actions{grid-column:1/-1}
  .return-analytics{grid-template-columns:1fr}
  .return-funnel{grid-template-columns:1fr 1fr}
  .money-table{min-width:1450px}
}
