/* Shop-shared advertising ledger; scoped to avoid changing the order sheet. */
/* Shared navigation must honor the role-based hidden attribute despite flex rules. */
#appView > .topbar #mainNav button[hidden]{display:none!important}
.ads-page,.ads-dialog{--ads-text:var(--ink,#172033);--ads-muted:#526176;--ads-border:#8291a8;--ads-line:#d8e1ee;--ads-blue:#304fc0;--ads-danger:#b42336;color:var(--ads-text);font-size:14px;line-height:1.5}
.ads-page{max-width:1440px;margin:0 auto}
.ads-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:4px 0 20px}
.ads-heading h1{font-size:23px;line-height:1.3;margin:0 0 6px;letter-spacing:0}
.ads-heading p,.ads-dialog-body>p{margin:0;color:var(--ads-muted);font-size:14px}
.ads-heading>div{min-width:0}
.ads-page .ads-button,.ads-dialog .ads-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 16px;border:1px solid var(--ads-border);border-radius:7px;background:#fff;color:var(--ads-text);font-size:14px;font-weight:600;line-height:1.4;white-space:nowrap;cursor:pointer;box-shadow:none;touch-action:manipulation}
.ads-page .ads-primary,.ads-dialog .ads-primary{color:#fff;background:var(--ads-blue);border-color:var(--ads-blue)}
.ads-page .ads-button:hover:not(:disabled),.ads-dialog .ads-button:hover:not(:disabled){background:#edf2ff;border-color:var(--ads-blue)}
.ads-page .ads-primary:hover:not(:disabled),.ads-dialog .ads-primary:hover:not(:disabled){background:#233c99;color:#fff}
.ads-page .ads-button:active:not(:disabled),.ads-dialog .ads-button:active:not(:disabled){background:#dce5ff}
.ads-page .ads-primary:active:not(:disabled),.ads-dialog .ads-primary:active:not(:disabled){background:#1d3180}
.ads-page .ads-button:disabled,.ads-dialog .ads-button:disabled{opacity:.55;cursor:not-allowed}
.ads-page :is(button,input,select,textarea,summary):focus-visible,.ads-dialog :is(button,input,select,textarea):focus-visible{outline:3px solid #304fc0;outline-offset:3px;box-shadow:none}
.ads-page h1:focus{outline:0}
.ads-filters{display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) minmax(220px,2fr) auto;gap:16px;align-items:start;background:#fff;border:1px solid var(--ads-line);border-radius:10px;padding:20px}
.ads-page label,.ads-dialog label{display:grid;gap:8px;min-width:0;font-size:14px;font-weight:600;color:var(--ads-text);margin:0}
.ads-page :is(input,select,textarea),.ads-dialog :is(input,select,textarea){width:100%;min-width:0;min-height:44px;border:1px solid var(--ads-border);border-radius:6px;padding:10px 12px;background:#fff;color:var(--ads-text);font-size:14px;line-height:1.5;box-shadow:none}
.ads-page select,.ads-dialog select{padding-right:34px}
.ads-page input[type=date],.ads-dialog input[type=date]{min-width:0}
.ads-page small,.ads-dialog small{font-size:12px;line-height:1.5;font-weight:400;color:var(--ads-muted);overflow-wrap:anywhere}
.ads-page input::placeholder,.ads-dialog :is(input,textarea)::placeholder{color:#64748b;opacity:1}
.ads-filter-actions{display:flex;flex-wrap:wrap;gap:10px;padding-top:29px}
.ads-summary{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px 24px;padding:20px 4px 12px}
.ads-summary strong{font-size:25px;margin-left:10px;color:var(--ads-blue);font-variant-numeric:tabular-nums}
.ads-summary small{margin-left:auto}
.ads-shop-summary{margin-bottom:16px;border-bottom:1px solid var(--ads-line)}
.ads-shop-summary summary{width:fit-content;min-height:44px;padding:10px 8px;cursor:pointer;font-weight:600}
#adsShopTotals{display:flex;flex-wrap:wrap;gap:12px 24px;padding:4px 8px 16px}
#adsShopTotals>div{display:flex;flex-wrap:wrap;gap:6px 12px;max-width:100%;overflow-wrap:anywhere}
#adsShopTotals b{font-variant-numeric:tabular-nums}
.ads-table-wrap{background:#fff;border:1px solid var(--ads-line);border-radius:10px;overflow:auto}
.ads-table{table-layout:fixed;border-collapse:collapse;width:100%;min-width:0;font-size:14px}
.ads-table th{background:#eef2f9;color:#304158;font-weight:600;text-align:left}
.ads-table :is(th,td){padding:14px 16px;border-bottom:1px solid var(--ads-line);vertical-align:middle;overflow-wrap:anywhere}
.ads-table th:nth-child(1){width:120px}.ads-table th:nth-child(2){width:19%}.ads-table th:nth-child(3){width:145px}.ads-table th:nth-child(5){width:120px}.ads-table th:nth-child(6){width:170px}
.ads-table .ads-money{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.ads-table tbody tr:hover{background:#f8faff}.ads-table tbody tr:last-child td{border-bottom:0}
.ads-record-actions{display:flex;gap:10px}.ads-record-actions .ads-button{padding:8px 12px}
.ads-record-actions .ads-delete{color:var(--ads-danger);border-color:#c98994}
.ads-record-actions .ads-delete:hover:not(:disabled){color:var(--ads-danger);background:#fff0f2;border-color:var(--ads-danger)}
.ads-note{white-space:pre-wrap;overflow-wrap:anywhere}.ads-empty{padding:40px 16px!important;text-align:center;color:var(--ads-muted)}
.ads-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 4px}
.ads-pagination>div{display:flex;gap:10px}
.ads-page .ads-error,.ads-dialog .ads-error{color:var(--ads-danger);font-size:13px;white-space:pre-wrap}
#adsFilterError{grid-column:1/-1;margin:0}
.ads-notice{padding:14px 16px;margin-bottom:12px;background:#fff4dc;border:1px solid #c9a14d;border-radius:8px;color:#65480c}
.ads-dialog{width:min(580px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--ads-line);border-radius:12px;background:#fff;box-shadow:0 20px 70px #17203340;overflow:auto}
.ads-dialog::backdrop{background:#17203380}
.ads-dialog #adsForm{display:block}
.ads-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-bottom:1px solid var(--ads-line)}
.ads-dialog-heading h2{font-size:20px;margin:0}
.ads-dialog .ads-icon-button{width:44px;padding:10px;flex-shrink:0}
.ads-dialog-body{display:grid;gap:20px;padding:20px 24px}
.ads-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.ads-dialog textarea{resize:vertical;min-height:104px}
.ads-dialog-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid var(--ads-line)}
.ads-dialog [aria-invalid=true]{border-color:var(--ads-danger)}
.ads-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}
.ads-page [hidden],.ads-dialog [hidden]{display:none!important}
@media(max-width:1050px){
 .ads-filters{grid-template-columns:1fr 1fr}
 .ads-filter-actions{align-self:end;padding-top:0;min-height:44px}
 .ads-table th:nth-child(1){width:110px}.ads-table th:nth-child(2){width:18%}.ads-table th:nth-child(3){width:120px}.ads-table th:nth-child(5){width:85px}.ads-table th:nth-child(6){width:160px}
 .ads-table :is(th,td){padding:12px 10px}
}
@media(max-width:900px){
 .ads-table,.ads-table tbody{display:block;width:100%}.ads-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
 .ads-table tr{display:grid;grid-template-columns:1fr 1fr;padding:16px;gap:12px;border-bottom:1px solid var(--ads-line)}
 .ads-table td{display:block;padding:0!important;border:0;min-width:0}
 .ads-table td[data-label]::before{content:attr(data-label);display:block;color:var(--ads-muted);font-size:12px;margin-bottom:4px}
 .ads-table .ads-money{text-align:left;white-space:normal;font-size:18px;font-weight:700}
 .ads-table td:nth-child(2),.ads-table td:nth-child(4),.ads-table td:nth-child(6){grid-column:1/-1}
 .ads-table td:nth-child(3){grid-row:1;grid-column:2}
 .ads-table td:nth-child(6)::before{display:none}.ads-record-actions .ads-button{flex:1}
 .ads-table .ads-empty{grid-column:1/-1;padding:20px 0!important}
}
@media(max-width:640px){
 .ads-heading{align-items:flex-start;flex-direction:column;gap:16px}.ads-heading .ads-button{width:100%}
 .ads-filters{padding:16px;gap:16px 12px}.ads-shop-filter,.ads-filter-actions{grid-column:1/-1}.ads-filter-actions .ads-button{flex:1}
 .ads-summary{gap:8px 16px}.ads-summary small{flex-basis:100%;margin:0}
 .ads-page :is(input,select,textarea),.ads-dialog :is(input,select,textarea){font-size:16px}
 .ads-pagination{align-items:flex-start;flex-direction:column}.ads-pagination>div{width:100%}.ads-pagination .ads-button{flex:1}
 .ads-dialog-heading,.ads-dialog-body,.ads-dialog-footer{padding:16px}
 .ads-form-grid{grid-template-columns:1fr;gap:20px}.ads-dialog-footer .ads-button{flex:1}
}

@media(max-width:420px){.ads-filters{grid-template-columns:1fr}}
