/* MOBILE BASE V1: shared floor for font sizes and tap targets (phones only).
   Loaded last on every cabinet page. !important is intentional here: this
   layer must win over the many layered page stylesheets. */
/* Cleanup: the service source label (SERVICE_CATALOG) is technical noise for owners. */
.service-main small {
  display: none !important;
}

@media (max-width: 760px) {
  /* 12px: labels, eyebrows, badges, statuses, short captions */
  body .page-label,
  body .section-eyebrow,
  body .hero-eyebrow,
  body .card-kicker,
  body .profile-label,
  body .provider-category,
  body .mini-title,
  body .badge,
  body .history-status,
  body .conversation-status,
  body .account-state,
  body .connection-badge,
  body .readiness-check,
  body .status-label,
  body .message-meta,
  body .profile-ai-status,
  body .kpi-caption,
  body .hero-score small,
  body .profile-kpi span,
  body .team-kpi span,
  body .team-kpi small,
  body .report-kpi span,
  body .report-kpi small,
  body .analytics-kpi small,
  body .kpi-top span,
  body .case-type-row span,
  body .auditor-summary-item span,
  body .message-metric div,
  body .status-box span,
  body .outcome-box span,
  body .problem-row span,
  body .financial-value span,
  body .financial-value small,
  body .integration-kpi small,
  body .account-info small,
  body .number-field small,
  body .readiness-score span,
  body .service-main small,
  body .client-meta span,
  body .profile-instagram,
  body .history-meta,
  body .result-money small {
    font-size: 12px !important;
  }

  /* 11px: dense chart labels and the small estimate badge */
  body .chart-label,
  body .estimate-badge {
    font-size: 11px !important;
  }

  /* 13px: sentences and descriptions */
  body .case-main p,
  body .action-recommendation,
  body .recommendation,
  body .history-preview,
  body .report-note,
  body .analytics-disclaimer,
  body .risk-empty span,
  body .risk-empty strong,
  body .coming-soon-box span,
  body .result-money span,
  body .auditor-list-header small,
  body label.field > span,
  body .service-main strong {
    font-size: 13px !important;
  }

  /* 13px: button and link text */
  body .case-dialogue-link,
  body .open-dialogue,
  body .period-button,
  body .filter-button,
  body .status-tab,
  body .team-heading .primary-button,
  body .team-empty .secondary-button,
  body .service-form .primary-button,
  body .add-service-button,
  body .remove-service,
  body .cp-toggle,
  body .toggle-password,
  body .action-open,
  body .card-link,
  body .primary-link {
    font-size: 13px !important;
  }

  /* Tap targets: 44px for main actions */
  body .period-button,
  body .filter-button,
  body .case-dialogue-link,
  body .open-dialogue,
  body .integration-action-button,
  body .team-heading .primary-button,
  body .team-empty .secondary-button,
  body .service-form .primary-button,
  body .priority-filter select {
    min-height: 44px !important;
  }

  /* Tap targets: 40px for secondary controls */
  body .salon-selector,
  body .remove-service,
  body .cp-toggle,
  body .toggle-password {
    min-height: 40px !important;
  }

  /* Text links get a comfortable hit area */
  body .action-open,
  body .card-link,
  body .primary-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }

  /* Auditor: status tabs stay one scrollable row. This overrides the
     wrapping rule that auditor-visual-v1.css applies at 640px. */
  body .auditor-toolbar .status-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body .auditor-toolbar .status-tabs::-webkit-scrollbar {
    display: none;
  }

  body .auditor-toolbar .status-tab {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 44px;
  }

  /* Density: KPI grids are two columns; an odd last card spans the row */
  body .analytics-kpis,
  body .report-kpis,
  body .team-kpis,
  body .integration-kpis {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body .analytics-kpis > :last-child:nth-child(odd),
  body .report-kpis > :last-child:nth-child(odd),
  body .team-kpis > :last-child:nth-child(odd),
  body .integration-kpis > :last-child:nth-child(odd),
  body .auditor-stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  body .analytics-kpi,
  body .report-kpi,
  body .team-kpi,
  body .integration-kpi {
    min-height: 0 !important;
    padding: 12px 14px !important;
  }

  /* Dashboard action queue: flatter nesting, more room for text */
  body .panel:has(#action-list) {
    padding: 14px !important;
  }

  body #action-list .action-card {
    padding: 12px !important;
    box-shadow: none !important;
  }

  body #action-list .recommendation {
    margin-top: 8px !important;
    padding: 10px 12px !important;
  }

  /* Dialogs and clients overlay: one header only (the overlay has its own) */
  body .conversation-sidebar-header,
  body .clients-list-header {
    display: none !important;
  }

  /* Cleanup: the list opens by default and picking an item closes it,
     so the overlay needs no Close button. */
  body .mobile-list-close {
    display: none !important;
  }
}
