
/* Shared form controls and filter bars across every operations page. */
@media screen {
  .ops-admin-root { --ops-control-height: 36px; --ops-control-radius: 7px; }
  .ops-admin-root :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]), select, textarea) {
    box-sizing: border-box; min-width: 0; max-width: 100%; min-height: var(--ops-control-height);
    padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: var(--ops-control-radius);
    color: var(--text); background-color: var(--surface); font-family: inherit; font-size: 13px; line-height: 20px;
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  .ops-admin-root :where(input[type="date"], input[type="datetime-local"], input[type="time"]) { font-variant-numeric: tabular-nums; }
  .ops-admin-root :where(textarea) { min-height: 88px; resize: vertical; }
  .ops-admin-root select:not([multiple]):not([size]) {
    appearance: none; padding-right: 32px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2369747d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
  }
  .ops-admin-root :where(input, select, textarea):disabled { cursor: not-allowed; opacity: .65; }
  .ops-admin-root :where(input, select, textarea):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
  .ops-admin-root :where(button:not([class]), button[class=""]) {
    min-height: var(--ops-control-height); padding: 7px 12px; border: 1px solid var(--border-strong);
    border-radius: var(--ops-control-radius); color: var(--text); background: var(--surface);
    font-family: inherit; font-size: 13px; font-weight: 600; line-height: 20px; cursor: pointer;
  }
  .ops-admin-root :where(button:not([class]), button[class=""]):disabled { color: var(--muted); cursor: not-allowed; opacity: .6; }
  .ops-admin-root .button { font-size: 13px; line-height: 20px; font-weight: 600; }
  .ops-admin-root .button-small { min-height: 32px; }
  .ops-admin-root .field > :is(input, select, textarea) { border-radius: var(--ops-control-radius); font-size: 13px; }
  .ops-admin-root .store-analytics-toolbar { justify-content: flex-start; gap: 10px 12px; min-height: 64px; padding: 12px 16px; }
  .ops-admin-root .store-analytics-toolbar > label { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; white-space: nowrap; }
  .ops-admin-root .store-analytics-toolbar > label input { width: 154px; height: 36px; }
  .ops-admin-root .store-analytics-toolbar > select { min-width: 190px; max-width: 280px; height: 36px; }
  .ops-admin-root .store-analytics-toolbar > .button { margin-left: auto; min-height: 36px; }
  .ops-admin-root :is(.toolbar, .ranking-controls, .activity-toolbar, .report-controls, .portal-toolbar, .shipping-toolbar) { gap: 10px; }
  .ops-admin-root :is(.toolbar, .ranking-controls, .activity-toolbar) { padding: 10px 14px; }
  .ops-admin-root :is(.toolbar, .ranking-controls, .report-controls, .portal-toolbar, .shipping-toolbar) > select { min-height: 36px; }
  .ops-admin-root .business-metrics { padding: 16px; gap: 16px; }
  .ops-admin-root .business-metrics > div { gap: 7px; }
  .ops-admin-root .business-metrics strong { font-size: 24px; }
  .ops-admin-root .panel-header > a { font-size: 12px; font-weight: 600; white-space: nowrap; }
  .ops-admin-root .store-analytics-switch button { border-radius: 6px; font-size: 12px; }
  html[data-ops-theme="dark"] .ops-admin-root select:not([multiple]):not([size]) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%23a6b3ac' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8' d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  }
}
@media screen and (max-width: 600px) {
  .ops-admin-root { --ops-control-height: 40px; }
  .ops-admin-root .store-analytics-toolbar { align-items: stretch; gap: 10px; padding: 12px; }
  .ops-admin-root .store-analytics-toolbar > label { flex: 1 1 100%; justify-content: space-between; }
  .ops-admin-root .store-analytics-toolbar > label input { flex: 1; width: auto; max-width: 220px; height: 40px; }
  .ops-admin-root .store-analytics-toolbar > select { flex: 1 1 160px; width: 100%; max-width: none; height: 40px; }
  .ops-admin-root .store-analytics-toolbar > .button { flex: 0 0 auto; margin-left: 0; min-height: 40px; }
  .ops-admin-root .store-analytics-toolbar .store-analytics-switch { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ops-admin-root :where(input, select, textarea) { transition: none; }
}

@media screen {
  .ops-admin-root :is(.inventory-filter, .collector-plan-filter) select:not([multiple]):not([size]) { background-image: none; padding-right: 0; }
}

@media screen {
  html[data-ops-theme="dark"] .ops-admin-root .store-analytics-switch button.active { color: var(--brand-contrast); background: var(--brand); border-color: var(--brand); }
}
