/* Daily Revenue system readability overlay - 2026-08-09.
   Visual-only: financial values, table columns, and actions remain available. */

/* Typography only outside the phone breakpoint; spacing and behavior stay intact. */
body.page-revenue {
  font-size: 17px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

.page-revenue :is(
  button,
  a.ghost,
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  font-size: 16px !important;
  line-height: 1.4;
}

.page-revenue label,
.page-revenue :is(.type-picker legend, .entry-type-picker legend) {
  font-size: 15px !important;
  line-height: 1.5;
}

.page-revenue :is(small, .muted, .eyebrow, .form-message, .record-count, .revenue-legend) {
  font-size: 14px !important;
  line-height: 1.5;
}

.page-revenue .kpi-grid > article > span {
  font-size: 15px !important;
  line-height: 1.4;
}

.page-revenue .kpi-grid > article > strong {
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.15;
}

.page-revenue :is(.panel-head, .report-head) h2 {
  font-size: 26px;
  line-height: 1.25;
}

.page-revenue .report-summary span {
  font-size: 14px;
  line-height: 1.45;
}

.page-revenue .report-summary strong {
  font-size: 24px;
  line-height: 1.25;
}

.page-revenue :is(th, td) {
  font-size: 14px;
  line-height: 1.5;
}

.page-revenue th,
.page-revenue :is(.status, .proof, .entry-type-badge, .partner-audit-identifiers > .partner-audit-identifier) {
  font-size: 13px !important;
  line-height: 1.35;
}

.page-revenue .partner-audit-title > b {
  font-size: 15px;
  line-height: 1.4;
}

.page-revenue :is(.partner-audit-title > span, .partner-audit-cell > small) {
  font-size: 13px;
  line-height: 1.45;
}

.page-revenue .operational-alert-head h2 {
  font-size: 20px;
  line-height: 1.3;
}

.page-revenue :is(
  .operational-alert-head p,
  .operational-alert-list b,
  .operational-alert-list p,
  .operational-alert-list small,
  .revenue-chart-guide,
  .bar-label
) {
  font-size: 14px;
  line-height: 1.45;
}

.page-revenue .revenue-chart-tooltip {
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  body.page-revenue {
    max-width: 100%;
  }

  .page-revenue .revenue-login-shell {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .page-revenue .revenue-shell {
    width: 100%;
    max-width: 100%;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(36px, env(safe-area-inset-bottom));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .page-revenue .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
  }

  .page-revenue .brand {
    min-width: 0;
  }

  .page-revenue .top-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .page-revenue .top-actions > * {
    width: 100%;
    max-width: 100%;
    margin: 0;
    justify-content: center;
  }

  .page-revenue .top-actions .as-link {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
  }

  .page-revenue button,
  .page-revenue a.ghost,
  .page-revenue input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  .page-revenue select,
  .page-revenue textarea,
  .page-revenue .entry-type-picker span,
  .page-revenue .type-picker span,
  .page-revenue .evidence-select-button,
  .page-revenue .evidence-history-button,
  .page-revenue .row-action,
  .page-revenue .operational-alert-list a {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }

  .page-revenue input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  .page-revenue select,
  .page-revenue textarea {
    font-size: 16px;
  }

  .page-revenue .work-grid,
  .page-revenue .panel,
  .page-revenue .report-panel,
  .page-revenue .recent-panel,
  .page-revenue .goal-panel,
  .page-revenue .report-head,
  .page-revenue .report-tools {
    min-width: 0;
    max-width: 100%;
  }

  .page-revenue .table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
  }

  .page-revenue .table-wrap table {
    max-width: none;
  }

  .page-revenue .action-dialog {
    width: calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding-top: max(18px, env(safe-area-inset-top));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    padding-left: max(18px, env(safe-area-inset-left));
    overflow: auto;
    overscroll-behavior: contain;
  }

  .page-revenue .evidence-lightbox {
    height: 100dvh;
    max-height: 100dvh;
  }

  .page-revenue .lightbox-close {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }

  .page-revenue .evidence-lightbox p {
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .page-revenue .revenue-toast {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
  }
}
