/* Shared screen typography. Chart text and printed documents keep their own styles. */
@media screen {
  body {
    font-size: 17px;
    color: #111;
  }

  :is(.main, .sidebar, dialog, .login-form-panel)
  :is(p, span, small, label, dt, dd, td, th, li, a, button, input, select, textarea, option, summary, legend, caption):not(:where(svg *, .dash-chart-scroll *, .dash-chart-tooltip, .dash-chart-tooltip *, .dash-chart-legend, .dash-chart-legend *, .dash-kpi strong *, .warehouse-document *, h1 *, h2 *, h3 *, h4 *)) {
    font-size: 17px !important;
    color: #111 !important;
  }

  :is(.main, .sidebar, dialog, .login-form-panel)
  :is(h1, h2, h3, h4, h5, h6, strong, .table-footer, .domain-note, .form-field, .filter-field, .wc-muted, .addon-muted, .wf-order-reference, .wf-reference-card):not(:where(.dash-chart-scroll *, .dash-chart-tooltip *, .warehouse-document *)) {
    color: #111 !important;
  }

  :is(.table-footer, .domain-note, .form-field, .filter-field, .wc-muted, .addon-muted) {
    font-size: 17px;
  }

  :is(.main, .sidebar, dialog, .login-form-panel)
  :is(input, textarea)::placeholder {
    color: #111;
    opacity: 1;
  }

  :is(.main, dialog, .login-form-panel)
  :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
    min-width: 0;
  }

  :is(.main, dialog, .login-form-panel) :is(input, select, button) {
    line-height: 1.5;
  }

  :is(.main, dialog, .login-form-panel) :is(p, label, dt, dd, td, th, textarea) {
    line-height: 1.65;
  }

  .sidebar .nav-item {
    height: auto;
    min-height: 48px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .sidebar .nav-text {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.6;
  }

  .menu-label,
  .nav-section-title,
  .sidebar-footer {
    color: #111;
    font-size: 16px;
  }

  .date-range-button {
    white-space: normal;
  }

  table :is(td, tbody th),
  table :is(td, tbody th) * {
    font-weight: 400 !important;
  }

  :is(.main, dialog) :is(.role-badge, .status-badge) {
    --chip-ink: #48515f;
    --chip-bg: #eef0f3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--chip-bg) !important;
    color: var(--chip-ink) !important;
    line-height: 1.4;
    white-space: nowrap;
  }
  :is(.main, dialog) :is(.role-badge, .status-badge) * {
    color: var(--chip-ink) !important;
  }
  :is(.role-badge, .status-badge):is(.status-green, .status-active) { --chip-ink: #167345; --chip-bg: #e7f5ed; }
  :is(.role-badge, .status-badge).status-amber { --chip-ink: #925509; --chip-bg: #fff3d9; }
  :is(.role-badge, .status-badge).status-red { --chip-ink: #b52c3b; --chip-bg: #fdebed; }
  :is(.role-badge, .status-badge).status-blue { --chip-ink: #2255aa; --chip-bg: #eaf1fd; }
  :is(.role-badge, .status-badge).status-purple { --chip-ink: #6841a4; --chip-bg: #f0eafb; }
  :is(.role-badge, .status-badge).status-cyan { --chip-ink: #0c6b83; --chip-bg: #e3f5f8; }
  :is(.role-badge, .status-badge).status-indigo { --chip-ink: #4942a1; --chip-bg: #edebfc; }
  :is(.role-badge, .status-badge).status-teal { --chip-ink: #0b756c; --chip-bg: #e3f5f0; }
  :is(.role-badge, .status-badge).status-orange { --chip-ink: #a34a12; --chip-bg: #fff0e3; }

  /* Keep light text on filled controls and completed workflow markers. */
  :is(.main, .sidebar, dialog, .login-form-panel)
  :is(.primary-button, .primary-button *, .login-submit, .login-submit *, .page-button.active, .wf-stepper .current .wf-step-dot, .wf-stepper .done .wf-step-dot, .wf-form-section-number, .domain-steps .current, .dash-overview-controls .dash-segment button[aria-pressed="true"]) {
    color: #fff !important;
  }
}
