/* Seller pages use the shared portal palette and theme preference. */
.market-workspace main:has(.seller-dashboard){max-width:none}
.seller-dashboard{width:100%;min-width:0;display:flex;flex-direction:column;gap:18px;--seller-blue:#226ac2;--seller-green:#287747;--seller-purple:#7953b4;--seller-red:#b34251}
[data-site-theme=dark] .seller-dashboard{--seller-blue:#72b7ff;--seller-green:#93d7aa;--seller-purple:#bea6fa;--seller-red:#ee9cb9}
.seller-dashboard [hidden]{display:none!important}
.seller-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.seller-heading h1{font-size:30px;overflow-wrap:anywhere}.seller-eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);margin-bottom:5px}.seller-muted{color:var(--muted);font-size:14px;margin-top:6px}
.seller-section-tabs{display:flex;gap:4px;padding:4px;border:1px solid var(--border);border-radius:10px;background:var(--raised)}.seller-section-tabs a{padding:8px 18px;border-radius:7px;font-size:14px}.seller-section-tabs a[aria-current=page]{background:var(--surface);color:var(--accent);font-weight:700;box-shadow:0 1px 5px #0001}.seller-section-tabs a:hover{background:var(--hover)}
.seller-source-line{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-top:-8px}.seller-card{padding:18px;border:1px solid var(--border);border-radius:12px;background:var(--surface);min-width:0}.seller-card h2{font-size:18px;letter-spacing:-.2px}.seller-card h3{font-size:16px}.seller-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}.seller-note{font-size:12px;color:var(--muted);line-height:1.5;margin-top:5px;overflow-wrap:anywhere}
.seller-message{padding:12px 15px;border:1px solid var(--border);border-radius:9px;background:var(--subtle);color:var(--muted);font-size:13px;overflow-wrap:anywhere}.seller-message[data-error=true]{background:var(--danger-bg);border-color:var(--danger-border);color:var(--danger-text)}.seller-message[data-success=true]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}.seller-warnings{margin:0;padding:12px 18px 12px 32px;border:1px solid var(--warning-border);border-radius:9px;background:var(--warning-bg);color:var(--warning-text);font-size:13px}.seller-warnings li+li{margin-top:4px}
.seller-dashboard button,.seller-dashboard select,.seller-dashboard input{font:inherit}.seller-dashboard button{cursor:pointer}.seller-dashboard button:disabled,.seller-dashboard input:disabled,.seller-dashboard select:disabled{cursor:default;opacity:.55}.seller-dashboard :is(button,select,input,summary):focus-visible{outline:3px solid var(--accent);outline-offset:3px}.seller-dashboard input:not([type=checkbox]),.seller-dashboard select{min-height:38px;padding:7px 10px;border:1px solid var(--input-border);border-radius:7px;background:var(--subtle);color:var(--text);min-width:0;max-width:100%;font-size:13px}.seller-dashboard input[type=checkbox]{accent-color:var(--action);width:16px;height:16px;flex-shrink:0}.seller-button{padding:8px 14px;min-height:38px;background:var(--raised);border:1px solid var(--input-border);border-radius:7px;color:var(--text);font-size:13px!important;white-space:nowrap}.seller-button:hover{background:var(--hover)}.seller-primary{background:var(--action);border-color:var(--action);color:var(--on-action);font-weight:700}.seller-primary:hover{background:var(--action-hover)}
.seller-filters{position:relative;z-index:5}.seller-filter-top{display:flex;align-items:flex-end;gap:14px;flex-wrap:wrap}.seller-filters fieldset{border:0;margin:0;padding:0;min-width:0}.seller-filters legend{font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}.seller-date-range{display:flex;gap:10px}.seller-date-range label,.seller-field{display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:12px}.seller-date-range input{width:158px}.seller-currency{min-width:100px}.seller-filter-actions{display:flex;gap:8px;margin-left:auto}.seller-dimensions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}.seller-dimension-label{display:block;font-size:12px;color:var(--muted);margin-bottom:5px}.seller-select-details{position:relative;min-width:0;max-width:100%;font-size:13px}.seller-select-details>summary{list-style:none;cursor:pointer;display:flex;gap:6px;align-items:center;justify-content:space-between;padding:8px 10px;min-height:38px;border:1px solid var(--input-border);border-radius:7px;background:var(--subtle)}.seller-select-details>summary::-webkit-details-marker{display:none}.seller-select-details>summary:after{content:'⌄';margin-left:8px;color:var(--muted)}.seller-select-details>summary span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.seller-select-details[data-active=true]>summary{border-color:var(--accent)}.seller-select-details[open]{z-index:15}.seller-checkbox-options{position:absolute;top:calc(100% + 5px);left:0;width:max(100%,240px);max-width:min(340px,85vw);max-height:320px;overflow:auto;padding:10px;border:1px solid var(--input-border);background:var(--surface);border-radius:8px;box-shadow:0 8px 24px #0003;display:flex;flex-direction:column;gap:4px}.seller-checkbox-options label{display:flex;align-items:center;gap:8px;padding:5px;cursor:pointer;overflow-wrap:anywhere}.seller-checkbox-options label:hover{background:var(--hover)}.seller-checkbox-options input[type=search]{width:100%;margin-bottom:5px}.seller-clear{border:0;background:none;color:var(--accent);padding:5px;text-align:left;font-size:12px!important}.seller-group-empty{padding:6px;color:var(--muted);font-size:12px}.seller-products .seller-checkbox-options{left:auto;right:0}.seller-month-field{flex:1}.seller-months{display:flex;flex-wrap:wrap;gap:7px;max-height:180px;overflow:auto}.seller-month-choice{display:flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid var(--border);border-radius:7px;font-size:12px;cursor:pointer;background:var(--subtle)}.seller-month-choice:has(input:checked){background:var(--accent-bg);border-color:var(--accent-border);color:var(--accent-text)}
.seller-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.seller-kpi{padding:15px 17px;border:1px solid var(--border);background:var(--surface);border-radius:10px;min-width:0}.seller-kpi-label{color:var(--muted);font-size:12px}.seller-kpi-value{display:block;font-size:27px;font-weight:700;letter-spacing:-.5px;margin:7px 0 4px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.seller-kpi-note{display:block;font-size:11px;color:var(--muted);line-height:1.4}.seller-kpi[data-incomplete=true]{border-color:var(--warning-border)}.seller-kpi[data-incomplete=true] .seller-kpi-note{color:var(--warning-text)}
.seller-chart-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(290px,1fr);gap:18px}.seller-shares{grid-column:1/-1}.seller-chart{width:100%;height:240px;min-width:0}.seller-chart-small{height:190px}.seller-chart-share{height:250px}.seller-chart-finance{height:260px}.seller-chart-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.seller-inline-field{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;min-width:0}.seller-inline-field select{max-width:210px}.seller-segmented{display:flex;gap:3px;padding:3px;background:var(--raised);border:1px solid var(--border);border-radius:8px;max-width:100%;flex-wrap:wrap}.seller-segmented button{border:0;border-radius:5px;background:none;color:var(--muted);padding:6px 10px;font-size:12px;white-space:nowrap}.seller-segmented button[aria-pressed=true]{background:var(--surface);color:var(--accent);font-weight:700;box-shadow:0 1px 4px #0001}.seller-segmented button:hover{color:var(--text)}
.seller-table-scroll{overflow:auto;max-height:600px;margin:0 -1px 10px;border:1px solid var(--border);border-radius:7px}.seller-table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap}.seller-table th{position:sticky;top:0;z-index:1;background:var(--raised);font-size:11px;color:var(--muted);font-weight:700;white-space:normal}.seller-table th,.seller-table td{padding:11px 12px;text-align:right;border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums;vertical-align:top}.seller-table th:first-child,.seller-table td:first-child{text-align:left;min-width:200px;max-width:320px;white-space:normal;overflow-wrap:anywhere}.seller-table tbody tr:last-child td{border-bottom:0}.seller-table tbody tr:hover{background:var(--subtle)}.seller-cell-note{display:block;color:var(--warning-text);font-size:10px;white-space:normal}.seller-table-empty{text-align:center!important;padding:25px!important;color:var(--muted)}
.seller-upload-form{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}.seller-upload-form .seller-field{flex:1;min-width:220px}.seller-upload-form input[type=file]{width:100%;min-height:42px}.seller-upload-form input::file-selector-button{border:1px solid var(--border);border-radius:4px;background:var(--raised);color:var(--text);padding:4px 8px;margin-right:10px;cursor:pointer}.seller-import>.seller-message{margin-top:12px}.seller-import-preview{margin-top:15px;border:1px solid var(--accent-border);border-radius:9px;background:var(--subtle);padding:16px}.seller-import-preview h3{margin-bottom:10px}.seller-import-preview dl{display:grid;grid-template-columns:minmax(120px,1fr) minmax(120px,2fr);gap:7px 15px;margin:0;font-size:13px}.seller-import-preview dt{color:var(--muted)}.seller-import-preview dd{margin:0;overflow-wrap:anywhere}.seller-import-preview ul{font-size:13px;padding-left:20px}.seller-import-preview .seller-table-scroll{margin-top:12px}.seller-import-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.seller-import-notice{margin-top:10px;font-size:13px;color:var(--warning-text)}
/* Finance charts share one row equally; filters, KPI cards and imports retain the full width. */
@media(min-width:1151px){
    .seller-dashboard[data-kind=finance]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
    .seller-dashboard[data-kind=finance]> *{grid-column:1/-1}
    .seller-dashboard[data-kind=finance]>.seller-finance-trend{grid-column:1}
    .seller-dashboard[data-kind=finance]>.seller-expense-structure{grid-column:2}
    .seller-dashboard[data-kind=finance] :is(.seller-finance-trend,.seller-expense-structure)>.seller-card-heading{min-height:80px;flex-direction:column;align-items:flex-start;justify-content:space-between}
    .seller-dashboard[data-kind=finance] :is(.seller-chart-finance,.seller-chart-share){height:260px}
}
/* Stale results remain visible only with an explicit error message above them. */
.seller-dashboard[data-stale=true] :is(.seller-kpis,.seller-chart-grid,.seller-products,.seller-finance-trend,.seller-expense-structure){opacity:.7}.seller-dashboard[data-loading=true] #seller-kpis{opacity:.65}
@media(min-width:1650px){.seller-dimensions{grid-template-columns:repeat(7,minmax(0,1fr))}}
@media(max-width:1150px){.seller-chart-grid{grid-template-columns:1fr}.seller-shares{grid-column:auto}.seller-current-statuses .seller-chart{height:190px}.seller-dimensions{grid-template-columns:repeat(3,minmax(0,1fr))}.seller-kpi-value{font-size:24px}}
@media(max-width:760px){.seller-dashboard{gap:12px}.seller-heading h1{font-size:25px}.seller-card{padding:13px}.seller-card h2{font-size:17px}.seller-dimensions{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.seller-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.seller-kpi{padding:12px}.seller-kpi-value{font-size:23px}.seller-filter-actions{margin-left:0}.seller-date-range{width:100%}.seller-date-range label{flex:1;min-width:0}.seller-date-range input{width:100%}.seller-filters .seller-currency{flex:1}.seller-chart{height:230px}.seller-chart-finance{height:250px}.seller-chart-share{height:250px}.seller-card-heading{align-items:flex-start}.seller-chart-controls{width:100%;gap:8px}.seller-chart-controls .seller-inline-field{flex:1}.seller-chart-controls select{width:100%;max-width:none}.seller-select-details>summary{font-size:12px}.seller-dimension:nth-child(even) .seller-checkbox-options{left:auto;right:0}.seller-month-field{flex-basis:100%}.seller-upload-form .seller-field{min-width:0;flex-basis:100%}.seller-upload-form>.seller-button{width:100%}.seller-import-preview dl{grid-template-columns:1fr;gap:3px}.seller-import-preview dd{margin-bottom:6px}.seller-table th,.seller-table td{padding:9px}.seller-products #seller-group-control{width:100%}}

/* Compact chart cards save page height without shrinking the numeric labels. */
.seller-dashboard :is(.seller-sales-trend,.seller-current-statuses,.seller-shares,.seller-finance-trend,.seller-expense-structure){padding:12px 14px}
.seller-dashboard :is(.seller-sales-trend,.seller-current-statuses,.seller-shares,.seller-finance-trend,.seller-expense-structure)>.seller-card-heading{gap:8px;margin-bottom:8px}
.seller-chart-grid{gap:12px}
/* Native overflow keeps all categories and numerical labels at a stable readable size. */
.seller-chart-viewport{height:250px;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;overscroll-behavior-y:contain;min-width:0}
.seller-dashboard[data-kind=finance] .seller-chart-viewport{height:260px}
.seller-chart-viewport:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.seller-chart-data{background:none;border:0;color:var(--muted);padding:5px;font-size:12px;white-space:nowrap;cursor:pointer}
.seller-chart-data:hover{color:var(--text);text-decoration:underline}
.seller-data-dialog{width:min(1000px,94vw);max-height:85dvh;margin:auto;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:12px;padding:16px}
.seller-data-dialog::backdrop{background:#050e19bb}
.seller-data-dialog h2{font-size:18px}
.seller-data-dialog .seller-table-scroll{max-height:60dvh;margin-top:12px}
.seller-dialog-actions{display:flex;gap:8px;flex-wrap:wrap}
.seller-data-dialog .seller-note:empty{display:none}
@media(max-width:650px){.seller-data-dialog .seller-card-heading{align-items:flex-start;flex-direction:column}.seller-data-dialog{padding:12px}}

/* Column headers remain keyboard accessible and indicate the active sort direction. */
.seller-sort-button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;text-align:left}.seller-sort-button:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* Keep the longer period choice inside the filter card on mobile screens. */
.seller-period-choice{width:min(100%,330px);min-width:0}.seller-period-choice select{width:100%;min-width:0}
