/* Shared theme entry for login and all application pages.
 * Preserve the established visual system; add future shared refinements here.
 * Update the import version together with VERSION when base styles change.
 */
@import url("app.css?v=2026.10.03.9");

/* One compact rhythm for the existing gradient page banners. */
:root {
  --page-banner-min-height: 120px;
  --page-banner-padding-y: 16px;
}
:is(
  body.business-page, body.settings-page,
  body.page-dashboard, body.page-projects, body.page-ai_analysis,
  body.page-customers, body.page-channels, body.page-resource_requests,
  body.page-weekly_overview, body.page-team_reports,
  body.page-report, body.page-sales_report,
  body.page-report_history, body.page-sales_report_history,
  body.page-specials, body.page-special_detail, body.page-special_new,
  body.page-sales_performance, body.page-sales_performance_overview,
  body.page-ai_people_analysis, body.page-ai_marketing, body.page-ai_search,
  body.page-todo_center, body.page-entity_merge
) .content > .title {
  min-height: var(--page-banner-min-height);
  padding-top: var(--page-banner-padding-y);
  padding-bottom: var(--page-banner-padding-y);
}
/* Let stacked titles and navigation grow naturally on narrow screens. */
@media (max-width: 760px) {
  :root { --page-banner-min-height: 0px; }
}

/* Keep the people-analysis summary readable without a desktop width cap. */
body.page-ai_people_analysis .content > .title .muted { max-width: none; }

/* Shared work/plan switch and filters: one desktop row, natural narrow-screen flow. */
body .content .report-center-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
}
body .report-center-toolbar .weekly-overview-switch {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
body .report-center-toolbar .segmented { flex: 0 0 auto; margin: 0; }
body .report-center-toolbar .form-inline {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}
body .report-center-toolbar .form-inline .field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  flex: 0 0 190px;
}
body .report-center-toolbar .form-inline .field.grow { flex: 1 1 0; }
body .report-center-toolbar .field label { flex: 0 0 auto; margin: 0; white-space: nowrap; }
body .report-center-toolbar .field select { flex: 1 1 0; min-width: 0; width: 100%; }
body .report-center-toolbar .form-inline > button { flex: 0 0 auto; margin: 0; }
@media (max-width: 1100px) {
  body .content .report-center-toolbar { flex-direction: column; align-items: stretch; gap: 14px; }
  body .report-center-toolbar .form-inline { flex: 0 1 auto; width: 100%; }
}
@media (max-width: 640px) {
  body .report-center-toolbar .form-inline { flex-wrap: wrap; }
  body .report-center-toolbar .form-inline .field.grow { flex: 1 1 100%; }
  body .report-center-toolbar .form-inline .field:not(.grow) { flex: 1 1 190px; }
  body .report-center-toolbar .segmented { display: flex; width: 100%; }
  body .report-center-toolbar .segmented a { flex: 1; text-align: center; white-space: nowrap; }
}
/* Project changes keep each save together and adapt to narrow screens. */
.project-change-record { margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.project-change-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 14px 18px; background: var(--surface-soft, #f5f8fc); }
.project-change-heading time { font-size: 13px; color: var(--muted, #64748b); }
.project-change-field { padding: 14px 18px; border-top: 1px solid var(--line); }
.project-change-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 10px; }
.project-change-values span { font-size: 12px; color: var(--muted, #64748b); }
.project-change-values p { margin: 4px 0 0; overflow-wrap: anywhere; }
.project-change-field summary { cursor: pointer; margin-top: 8px; font-size: 13px; color: var(--muted, #64748b); }
@media (max-width: 640px) { .project-change-values { grid-template-columns: 1fr; gap: 10px; } }
