/* =========================================================================
   RenoPilot — Unified Style Pass (2026-09-20)
   Additive, visual-only override on top of the existing CSS layers.
   Does not remove or edit anything in renopilot-core.css or
   mobile-integration-r97.css — it only re-declares the same selectors
   with the approved values, loaded last so it wins the cascade.

   Source of truth: project doc
   "style-direction-approved-2026-09-19.md" (approved after ~24 rounds
   of mockup review). If this file and that doc ever disagree, the doc
   wins and this file should be corrected to match it.

   To undo this whole pass: delete the <link> to this file in index.html
   (see change log entry 2026-09-20) — nothing else needs to change.
   ========================================================================= */

:root{
  /* Shift the app's single accent from the R40 layer's blue to the
     approved accent. Everything that already reads var(--r40-blue)
     (links, .kpi-link, .billing-close, etc.) picks this up automatically. */
  --r40-blue:#0a66ff;

  /* Bring card/panel rounding and shadow in line with the approved
     tokens. These variables are read by many existing rules
     (cards, buttons, inputs, modals) so this one change is what makes
     corners feel consistent app-wide instead of touching each rule. */
  --radius:16px;
  --radius-lg:22px;
  --radius-sm:12px;
  --r40-shadow:0 1px 2px rgba(0,0,0,.03),0 4px 16px rgba(0,0,0,.06);
  --r40-shadow-hover:0 2px 4px rgba(0,0,0,.04),0 8px 24px rgba(0,0,0,.08);
}

/* -------------------------------------------------------------------------
   Sidebar: flat near-black (CommBank-style) instead of the R40 layer's
   blue-tinted graphite gradient.
   ------------------------------------------------------------------------- */
body .sidenav,body #rp4Sidebar{
  background:#0c0c0e!important;
  border-color:rgba(255,255,255,.08)!important;
  box-shadow:14px 0 44px rgba(0,0,0,.18)!important;
}

/* -------------------------------------------------------------------------
   Active nav item: flat left-edge accent stripe instead of a filled
   gradient pill + inset ring. Turn off the old dot indicator so there
   isn't a double marker.
   ------------------------------------------------------------------------- */
.rp4-nav button.active:after{
  display:none!important;
}
body .nav-link.active,body #rp4Sidebar .rp4-nav button.active{
  background:rgba(255,255,255,.045)!important;
  color:#fff!important;
  box-shadow:none!important;
  border-left:3px solid #0a66ff!important;
  border-top-left-radius:0!important;
  border-bottom-left-radius:0!important;
  padding-left:7px!important;
}
body .nav-link.active .rp26-ico,body #rp4Sidebar .rp4-nav button.active i{
  background:rgba(10,102,255,.14)!important;
  color:#0a66ff!important;
}

/* -------------------------------------------------------------------------
   Primary buttons: flat solid fill, fully pill-shaped, instead of a
   dark gradient with soft corners.
   ------------------------------------------------------------------------- */
body button.primary,body .primary,body .btn-primary,body #rp4Topbar .rp4-new,body .deck-nav-primary{
  background:#0a0a0c!important;
  border-color:#0a0a0c!important;
  color:#fff!important;
  border-radius:999px!important;
  box-shadow:none!important;
}
body button.primary:hover,body .primary:hover,body .btn-primary:hover,body .deck-nav-primary:hover{
  background:#28282c!important;
  box-shadow:none!important;
}
/* 2026-09-20 (Part 22, per your "pergola design has green buttons" note): .deck-nav-primary
   (the active tab in Pergola's and Deck's own module nav bars, e.g. Pergola's "Design" tab
   and Deck's Drawings/Estimate "← Design" back button) was never added to this list, so it
   fell through to an old, untouched brand-colour system in renopilot-core.css
   (--rp-ui-brand:#158674, a teal, applied with !important at ".primary,.btn-primary,
   .rp-primary,.deck-nav-primary") that Part 18's --pine sweep never caught because it's a
   different variable entirely. Adding it here, with the same !important + later file-load
   order, brings it in line with every other primary button/tab app-wide. */

/* -------------------------------------------------------------------------
   KPI / metric cards: one plain surface everywhere instead of four
   different cycling pastel-gradient hues (explicitly rejected during
   mockup review as "multiple accent hues per category").
   ------------------------------------------------------------------------- */
body .kpi-card:nth-child(4n+1),body .metric:nth-child(4n+1),
body .kpi-card:nth-child(4n+2),body .metric:nth-child(4n+2),
body .kpi-card:nth-child(4n+3),body .metric:nth-child(4n+3),
body .kpi-card:nth-child(4n+4),body .metric:nth-child(4n+4){
  background:#ffffff!important;
}
body .kpi-icon{
  background:#eaf1ff!important;
  color:#0a66ff!important;
  border-color:#d8e7ff!important;
}

/* The real Home dashboard's stat row uses its own markup
   (#page-portfolio .rp26-metric / .rp26-metric-icon), not the generic
   .kpi-card/.kpi-icon selectors above — it has its own cycling
   4-colour icon set and per-card gradient tint from an earlier layer.
   Flatten both to the single accent, matching selector specificity so
   this (loaded last) wins over that layer. */
body #page-portfolio .rp26-metric:nth-child(1),
body #page-portfolio .rp26-metric:nth-child(2),
body #page-portfolio .rp26-metric:nth-child(3),
body #page-portfolio .rp26-metric:nth-child(4){
  background:#ffffff!important;
}
body #page-portfolio .rp26-metric-icon,
body #page-portfolio .rp26-metric:nth-child(1) .rp26-metric-icon,
body #page-portfolio .rp26-metric:nth-child(2) .rp26-metric-icon,
body #page-portfolio .rp26-metric:nth-child(3) .rp26-metric-icon,
body #page-portfolio .rp26-metric:nth-child(4) .rp26-metric-icon{
  background:#eaf1ff!important;
  color:#0a66ff!important;
  border-color:#d8e7ff!important;
}

/* Same story for the Quick Add tile icons: the real markup has no
   .rp26-ico class (that selector in the R40+ layer never matches
   anything) — the actual cycling 6-colour rule is
   #page-portfolio .rp26-quick:nth-child(n) i. Flatten to one tint,
   copying that exact selector shape so specificity matches. */
body #page-portfolio .rp26-quick i,
body #page-portfolio .rp26-quick:nth-child(2) i,
body #page-portfolio .rp26-quick:nth-child(3) i,
body #page-portfolio .rp26-quick:nth-child(4) i,
body #page-portfolio .rp26-quick:nth-child(5) i,
body #page-portfolio .rp26-quick:nth-child(6) i{
  background:#eaf1ff!important;
  color:#0a66ff!important;
  border-color:#d8e7ff!important;
}

/* -------------------------------------------------------------------------
   Tabs / chips and input focus ring: align the remaining hard-coded
   blue accents to the same single accent colour.
   ------------------------------------------------------------------------- */
body [role="tab"].active,body .tab.active,body .tabs button.active,
body .rp-billing-subnav button.active,body .form-chip.active,body .form-chip.selected{
  background:#eaf1ff!important;
  color:#0a66ff!important;
  border-color:#cfe1ff!important;
}
body input:focus,body select:focus,body textarea:focus{
  border-color:#7aa9ff!important;
  box-shadow:0 0 0 4px rgba(10,102,255,.10)!important;
}

/* -------------------------------------------------------------------------
   Mobile drawer sidebar (<=760px): same flat treatment as desktop.
   Selectors copied from mobile-integration-r97.css so specificity
   matches; this file loads after it, so these win.
   ------------------------------------------------------------------------- */
@media (max-width:760px){
  body.rp4.rp-commercial #rp4Sidebar{
    background:#0c0c0e!important;
    border-right:1px solid rgba(255,255,255,.08)!important;
    box-shadow:18px 0 60px rgba(0,0,0,.28)!important;
  }
  body.rp4 #rp4Sidebar .rp4-nav button.active{
    background:rgba(255,255,255,.045)!important;
    color:#fff!important;
    box-shadow:none!important;
    border-left:3px solid #0a66ff!important;
    border-top-left-radius:0!important;
    border-bottom-left-radius:0!important;
    padding-left:7px!important;
  }
  body.rp4 #rp4Sidebar .rp4-nav button.active i{
    background:rgba(10,102,255,.14)!important;
    color:#0a66ff!important;
  }
  body.rp4 :where(.primary,.btn-primary,.programme-action-add,.rp-home-job-nav button.primary,.rp-job-workspace-nav button.primary){
    background:#0a0a0c!important;
    border-color:#0a0a0c!important;
    color:#fff!important;
    border-radius:999px!important;
    box-shadow:none!important;
  }
}

/* =========================================================================
   PART 2 — app-wide sweep (2026-09-20, same day, added after seeing the
   Home dashboard pass and being asked to cover every page).
   Everything below follows the same rule as Part 1: additive only, same
   selectors the app's own layers already use, !important + loaded last.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Status/type pills used across Estimates, Quotes, Invoices, Billing,
   Communications: flatten every pill system in the app to the approved
   "plain coloured text + small dot, no filled background" treatment.
   Colour meaning (green=ok/paid, orange=warn, red=overdue/danger) is kept —
   only the filled-pill VISUAL is removed, so status is still readable.
   ------------------------------------------------------------------------- */
body .status.ok,body .paid,body .complete,body .completed,body [data-status="paid"],body [data-status="complete"],
body .billing-status.ok,
body .status-closed{
  background:transparent!important;border-color:transparent!important;color:#1b7f3a!important;
}
body .status.warn,body .billing-status.warn,body .status-waiting{
  background:transparent!important;border-color:transparent!important;color:#b45309!important;
}
body .status.danger,body .status.overdue,body .billing-status.danger{
  background:transparent!important;border-color:transparent!important;color:#dc2626!important;
}
body .billing-status.info,body .status-open{
  background:transparent!important;border-color:transparent!important;color:#0a66ff!important;
}
body .billing-status.muted{
  background:transparent!important;border-color:transparent!important;color:#6e6e73!important;
}
body .status.ok:before,body .paid:before,body .complete:before,body .completed:before,
body .billing-status.ok:before,body .status-closed:before,
body .status.warn:before,body .billing-status.warn:before,body .status-waiting:before,
body .status.danger:before,body .status.overdue:before,body .billing-status.danger:before,
body .billing-status.info:before,body .status-open:before,
body .billing-status.muted:before{
  content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-right:2px;
}

/* -------------------------------------------------------------------------
   Decorative icon-badges and avatars scattered across older pages
   (Billing, Communications, Renovation Center, Estimate, Design, Trades) —
   each currently a different leftover colour (purple/teal/orange/indigo).
   Flatten every one that's purely decorative (the label text already says
   what it is) to the single accent tile. Client/user initials avatars are
   flattened to plain grey, per the approved "plain grey avatar" rule.
   ------------------------------------------------------------------------- */
body .billing-doc-icon,
body .billing-doc-icon.quote,body .billing-doc-icon.invoice,body .billing-doc-icon.payment,
body .billing-doc-icon.credit,body .billing-doc-icon.recurring{
  background:#0a66ff!important;color:#fff!important;box-shadow:none!important;
}
body .billing-empty>span{background:#eaf1ff!important;color:#0a66ff!important;}
body .comm-entry-icon{background:#eaf1ff!important;color:#0a66ff!important;}
body .comm-empty>span{background:#eaf1ff!important;color:#0a66ff!important;}
body .rp5040-billing-icon{background:#eaf1ff!important;color:#0a66ff!important;}
body .rp-module-icon{background:#eaf1ff!important;color:#0a66ff!important;}
body .pdfq-drop-icon{background:#eaf1ff!important;color:#0a66ff!important;}
body .rp-designhub-icon{background:#eaf1ff!important;color:#0a66ff!important;}
body .rp-designhub-card i{color:#0a66ff!important;}
body .programme-action-icon{background:#eaf1ff!important;color:#0a66ff!important;}
body .hub-command>span{color:#0a66ff!important;}
body .hub-phase>span{background:#eaf1ff!important;color:#0a66ff!important;}
body .hub-phase em{background:#0a66ff!important;}
body .hub-item-module{color:#0a66ff!important;}
body .hub-eyebrow,body .pro-eyebrow{color:#0a66ff!important;}
body #page-estimates .rp55-estimate-method-icon,
body #page-estimates .rp55-estimate-method.quick .rp55-estimate-method-icon{
  background:#eaf1ff!important;color:#0a66ff!important;border-color:#d8e7ff!important;
}
body #page-estimates .rp53-estimate-empty-icon{background:#eaf1ff!important;color:#0a66ff!important;}
body #page-estimates .rp55-estimate-method-cta,
body #page-estimates .rp55-estimate-method.quick .rp55-estimate-method-cta{color:#0a66ff!important;}
body .billing-kpi::before{background:#0a66ff!important;}
body .billing-kpi.success::before{background:#1fae5e!important;}
body .billing-kpi.warning::before{background:#c98a12!important;}
/* Client / user initials avatars: plain grey, not a colour accent */
body .comm-client-avatar,body .rp-client-avatar{
  background:#e4e4e7!important;color:#3a3a3c!important;box-shadow:none!important;
}

/* -------------------------------------------------------------------------
   Decorative gradient "hero" panels — Estimate method chooser, Scheduler —
   flattened to plain white, no gradient wash or decorative ring/blob.
   ------------------------------------------------------------------------- */
body #page-estimates .rp55-estimate-launch{background:#ffffff!important;}
body #page-estimates .rp55-estimate-method.walkthrough,
body #page-estimates .rp55-estimate-method.quick{background:#ffffff!important;}
body #page-reno-scheduler .rp-scheduler-hero{
  background:#ffffff!important;border:1px solid #eeeeef!important;box-shadow:none!important;
}
body #page-reno-scheduler .rp-scheduler-hero:after{display:none!important;}
body #page-reno-scheduler .rp-scheduler-hero h1{color:#0a0a0c!important;}
body #page-reno-scheduler .rp-scheduler-hero p{color:#6e6e73!important;}
body #page-reno-scheduler .rp-scheduler-actions button.primary{
  background:#0a0a0c!important;border-color:#0a0a0c!important;color:#fff!important;
  border-radius:999px!important;box-shadow:none!important;
}
body #page-reno-scheduler .rp-scheduler-actions button.primary:hover{background:#28282c!important;}
body #page-reno-scheduler .rp-scheduler-kpis article:after{background:#eaf1ff!important;}
body #page-reno-scheduler .rp-scheduler-eyebrow{color:#0a66ff!important;}
body .rp-scheduler-period-tabs button.active{color:#0a66ff!important;}
body .rp-scheduler-period-nav button.secondary{color:#0a66ff!important;}

/* -------------------------------------------------------------------------
   In-page sub-navigation tab systems (Renovation Center, Contract,
   Billing sub-tabs): flatten the active-tab highlight to the one accent
   instead of the old teal/purple theme leftovers.
   ------------------------------------------------------------------------- */
body .hub-nav button.active,body .ctr-tabs button.active,body .billing-tabs button.active{
  background:#eaf1ff!important;color:#0a66ff!important;border-color:#d8e7ff!important;
}
body .ctr-tabs button.active b{background:#dbe9ff!important;color:#0a66ff!important;}

/* -------------------------------------------------------------------------
   Typography: extend the existing page-heading rule (which only forced
   h1) so h2–h4 share the same approved weight/letter-spacing, and remove
   table zebra-striping in favour of the approved plain hairline rows.
   ------------------------------------------------------------------------- */
body .page h2,body .page h3,body .page h4{font-weight:700!important;}
body tbody tr:nth-child(even) td{background:transparent!important;}

/* -------------------------------------------------------------------------
   Bug fix, not a style preference: the "New quote" button on the Jobs
   page (and any similar bare inline-SVG icon button) renders its plus
   icon at native/unconstrained size because nothing sets a width/height
   on it, producing an oversized icon and a misshapen button. This exists
   with or without this stylesheet — confirmed by testing with this file
   disabled. Constrained to a normal 16px icon.
   ------------------------------------------------------------------------- */
body .job-toolbar button svg,
body button.primary>svg:not([width]),body .primary>svg:not([width]),body .btn-primary>svg:not([width]){
  width:16px!important;height:16px!important;flex:0 0 auto!important;
}

/* =========================================================================
   PART 3 — app-wide sweep, continued (2026-09-20, same day)
   Found while auditing Jobs / Reports / Job Detail / Contract / composer
   areas not yet covered by Part 1/2. Same additive method: copy the exact
   winning selector shape, add the approved value, !important, loaded last.
   ========================================================================= */

/* Bug fix, not a style preference: renopilot-core.css's generic `label`
   rule (line ~80) uppercases every <label>, which is correct for form
   field labels but also unintentionally hits the one place in the app
   (Jobs page, "Restore from backup file") where a <label> is reused as a
   button trigger for a hidden file input. That made it render in ALL
   CAPS next to a normal-case "Download full backup" button right beside
   it. Confirmed only one such element in the app (grepped index.html).
   ------------------------------------------------------------------------- */
body label.secondary{text-transform:none!important;letter-spacing:0!important;}

/* -------------------------------------------------------------------------
   Job Detail overview ("Job workspace" tile grid: Overview / Renovation
   Centre / Progress / Billing / Expenses / Inbox / Documents) — same
   decorative-per-tile gradient/rainbow icon pattern already flattened on
   the Home dashboard's Quick Add tiles and KPI icons. Flattened to the one
   accent, matching the sub-nav tab colours used elsewhere in this file.
   The dark gradient "Contract" button on the same page is flattened to
   match every other primary button in the app.
   ------------------------------------------------------------------------- */
body[data-rf-page="jobhome"] .rf-workspace-icon,
body[data-rf-page="jobhome"] .rf-job-workspace-grid>button:nth-child(2) .rf-workspace-icon,
body[data-rf-page="jobhome"] .rf-job-workspace-grid>button:nth-child(3) .rf-workspace-icon,
body[data-rf-page="jobhome"] .rf-job-workspace-grid>button:nth-child(4) .rf-workspace-icon,
body[data-rf-page="jobhome"] .rf-job-workspace-grid>button:nth-child(5) .rf-workspace-icon,
body[data-rf-page="jobhome"] .rf-job-workspace-grid>button:nth-child(6) .rf-workspace-icon,
body[data-rf-page="jobhome"] .rf-job-workspace-grid>button:nth-child(7) .rf-workspace-icon{
  background:#eaf1ff!important;border-color:#d8e7ff!important;color:#0a66ff!important;box-shadow:none!important;
}
body[data-rf-page="jobhome"] .rf-job-workspace-grid>button.active .rf-workspace-icon{
  background:#0a66ff!important;border-color:#0a66ff!important;color:#fff!important;box-shadow:none!important;
}
body[data-rf-page="jobhome"] .rf-job-workspace-grid>button.active{
  background:#eaf1ff!important;border-color:#bad1fb!important;box-shadow:none!important;
}
body[data-rf-page="jobhome"] .rf-contract-main-button{
  background:#0a0a0c!important;border-color:#0a0a0c!important;box-shadow:none!important;border-radius:12px!important;
}
body .rf-contract-main-button{background:#0a0a0c!important;box-shadow:none!important;}

/* Job Billing tab ("Client billing details" summary row) — the "Edit
   details" pill used the old teal/pine theme colour instead of the
   approved accent blue used for every other pale pill in the app. */
body .billing-summary-action{color:#0a66ff!important;background:#eaf1ff!important;}

/* =========================================================================
   Part 7 (2026-09-20) — actually applying the approved spec, not just
   colour/shape tweaks on top of what already existed.

   You said the app "looks exactly the same, nothing has changed" after
   clicking through the Part 1-6 preview. Checking the approved spec
   (style-direction-approved-2026-09-19.md) against what Parts 1-6 actually
   did turned up a real gap: those parts recoloured and reshaped things
   that were already there (icons, buttons, pills, sidebar) but never
   applied two of the most visually dominant items in the approved spec:
   the typeface, and the dashboard's KPI-card layout. This section does
   both. Still additive-only — nothing in the existing CSS/JS files is
   edited, this file is only extended, same one <link> in index.html.
   ========================================================================= */

/* --- 1. Typeface. The approved spec calls for the Apple system-font
   stack everywhere. Headings already used it (an existing rule already
   matched the spec closely). Body text did not: a more specific existing
   rule, `body.rp-commercial{font-family:Inter,...}` in renopilot-core.css,
   was winning over the less-specific plain `body{font-family:...}` rule
   that already had the right stack — so almost all body copy, table text,
   labels and nav items were rendering in Inter, not the system font, which
   is a big part of why the app didn't read as "the approved direction" at
   a glance. Fixed by copying that exact winning selector here (same
   specificity, loaded after it, so this wins) with the approved stack. */
body.rp-commercial{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI",Helvetica,Arial,sans-serif!important;
}

/* --- 2. Home dashboard KPI stat row (#page-portfolio .rp26-metrics). The
   approved spec is explicit that the "icon in a tinted circle next to a
   number" pattern is "the single biggest looks-AI-generated tell" and
   should not exist at all — replaced with one bordered/shadowed bar split
   by hairlines into columns, each just a bold number + label + trend
   text, no icon. Part 1 only recoloured these icons to the one accent;
   this replaces the whole layout with the actual approved one. Still
   scoped only to #page-portfolio .rp26-metric* — nothing outside the
   Home dashboard's stat row is touched, and the underlying HTML/JS that
   builds this section (app-5.2.31.js) is not edited, only restyled. */
body #page-portfolio .rp26-metrics{
  display:flex!important;
  background:#ffffff!important;
  border:1px solid #eeeeef!important;
  border-radius:16px!important;
  box-shadow:0 1px 2px rgba(0,0,0,.03),0 4px 16px rgba(0,0,0,.06)!important;
  overflow:hidden!important;
  gap:0!important;
}
body #page-portfolio .rp26-metric,
body #page-portfolio .rp26-metric:nth-child(1),
body #page-portfolio .rp26-metric:nth-child(2),
body #page-portfolio .rp26-metric:nth-child(3),
body #page-portfolio .rp26-metric:nth-child(4){
  background:#ffffff!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  flex:1 1 0!important;
  padding:18px 20px!important;
  min-height:0!important;
  transform:none!important;
}
body #page-portfolio .rp26-metric:hover,
body #page-portfolio .rp26-metric:nth-child(1):hover,
body #page-portfolio .rp26-metric:nth-child(2):hover,
body #page-portfolio .rp26-metric:nth-child(3):hover,
body #page-portfolio .rp26-metric:nth-child(4):hover{
  transform:none!important;
  box-shadow:none!important;
}
body #page-portfolio .rp26-metric:nth-child(2),
body #page-portfolio .rp26-metric:nth-child(3),
body #page-portfolio .rp26-metric:nth-child(4){
  border-left:1px solid #eeeeef!important;
}
body #page-portfolio .rp26-metric-icon,
body #page-portfolio .rp26-metric:nth-child(1) .rp26-metric-icon,
body #page-portfolio .rp26-metric:nth-child(2) .rp26-metric-icon,
body #page-portfolio .rp26-metric:nth-child(3) .rp26-metric-icon,
body #page-portfolio .rp26-metric:nth-child(4) .rp26-metric-icon{
  display:none!important;
}
body #page-portfolio .rp26-metric small{
  font-size:12px!important;
  color:#6e6e73!important;
  font-weight:500!important;
  margin:0 0 4px!important;
}
body #page-portfolio .rp26-metric b{
  font-size:23px!important;
  font-weight:700!important;
  letter-spacing:-.02em!important;
  color:#0a0a0c!important;
  font-family:ui-monospace,"SFMono-Regular",Consolas,monospace!important;
}
body #page-portfolio .rp26-metric em{
  font-size:11.5px!important;
  font-style:normal!important;
  color:#8e8e93!important;
}
body #page-portfolio .rp26-metric em.bad{
  color:#e0453a!important;
}

/* =========================================================================
   Part 8 (2026-09-20) — the mobile "Quick Add" sheet had its own separate
   rainbow icon colours that no earlier part ever touched.

   You tested on your phone and it still looked the same — turns out mobile
   has an entirely separate, mobile-only implementation of "Quick Add"
   (mobile-integration-r97.js opens a bottom-sheet with its own
   `.rp93-quick-grid` markup and classed icons: i.blue / i.violet / i.cyan /
   i.purple), completely different from the desktop `.rp26-quick` grid
   fixed back in Part 1. Every earlier part only tested at desktop widths
   (1440px), so this mobile-only rainbow pattern was never caught. This is
   the same "icon-badge, multiple accent hues" pattern rejected in the
   approved spec, just in a part of the app nobody had actually looked at
   on a phone yet. Flattened to the one accent, copying the exact selectors
   from mobile-integration-r97.css (same @media (max-width:760px) scope, so
   this has zero effect above that width) so specificity matches and this
   (loaded later) wins. Nothing in mobile-integration-r97.css was edited.
   ========================================================================= */
@media (max-width:760px){
  body.rp4 .rp93-quick-grid>button i,
  body.rp4 .rp93-quick-grid>button i.violet,
  body.rp4 .rp93-quick-grid>button i.purple,
  body.rp4 .rp93-quick-grid>button i.cyan{
    border-color:#d8e7ff!important;
    background:#eaf1ff!important;
    color:#0a66ff!important;
  }
}

/* =========================================================================
   Part 9 (2026-09-20) — styling for the two new Home dashboard sections
   added by assets/dashboard-restyle-2026-09-20.js (the "today" row and the
   bar-chart-plus-ring insights row), plus the approved spec's mobile note
   for the KPI strip ("the numbers strip -> 2x2 grid instead of 4-across")
   which Part 7 didn't yet apply. Purely new selectors — nothing here
   overrides an existing rule from another layer.
   ========================================================================= */
body #page-portfolio .rp-today-row{
  display:flex;
  gap:12px;
  margin:14px 0 18px;
  overflow-x:auto;
}
body #page-portfolio .rp-today-card{
  flex:1 1 0;
  min-width:190px;
  display:flex;
  align-items:center;
  gap:12px;
  background:#ffffff;
  border:1px solid #eeeeef;
  border-radius:16px;
  box-shadow:0 1px 2px rgba(0,0,0,.03),0 4px 16px rgba(0,0,0,.06);
  padding:14px 16px;
  cursor:pointer;
  text-align:left;
}
body #page-portfolio .rp-today-avatar{
  flex:0 0 36px;
  width:36px;height:36px;
  border-radius:50%;
  background:#f2f2f4;
  color:#48484a;
  display:grid;place-items:center;
  font-size:12px;font-weight:700;
}
body #page-portfolio .rp-today-card b{
  display:block;font-size:10.5px;color:#0a66ff;font-weight:700;
  text-transform:uppercase;letter-spacing:.04em;margin-bottom:2px;
}
body #page-portfolio .rp-today-card strong{
  display:block;font-size:14px;color:#0a0a0c;font-weight:650;
}
body #page-portfolio .rp-today-card small{
  display:block;font-size:12px;color:#8e8e93;margin-top:2px;
}

body #page-portfolio .rp-insights{
  display:grid;
  grid-template-columns:1.4fr 1fr;
  gap:14px;
  margin-top:14px;
}
/* mobile-integration-r97.css has an !important mobile rule
   (`body.rp4 .page h2{font-size:clamp(19px,5.5vw,24px)!important}`) that
   beats any non-!important rule regardless of specificity — the existing
   card headings on this page (Active jobs, Quick Add) stay correctly
   sized on mobile only because their own rule also carries !important
   (see body #page-portfolio .rp26-section-head h2 in renopilot-core.css).
   Matching that here so these two new headings aren't left oversized on
   phones the way they were before this fix. */
body #page-portfolio .rp-insight-chart h2,
body #page-portfolio .rp-insight-ring h2{
  margin:0 0 14px!important;
  font-size:16px!important;
  font-weight:650!important;
  color:var(--ink,#0a0a0c)!important;
  line-height:1.2!important;
  /* 2026-09-20 (Part 16): .rp-insight-ring below sets text-align:center
     so the ring/percentage/caption sit centered under it — that also
     centered this h2, making "Jobs on track" the only card title on the
     whole page that isn't left-aligned like "Active jobs"/"Quick Add"/
     everything else. Pin it back to left explicitly so only the ring
     content below it is centered, not the title. */
  text-align:left!important;
  align-self:flex-start!important;
  width:100%!important;
}
body #page-portfolio .rp-insight-ring{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
body #page-portfolio .rp-ring{
  width:120px;height:120px;
  border-radius:50%;
  display:grid;place-items:center;
  margin:4px auto 10px;
}
body #page-portfolio .rp-ring-inner{
  width:92px;height:92px;
  border-radius:50%;
  background:#ffffff;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
}
body #page-portfolio .rp-ring-inner b{
  font-size:22px;font-weight:700;color:#0a0a0c;letter-spacing:-.02em;
  font-family:ui-monospace,"SFMono-Regular",Consolas,monospace;
}
body #page-portfolio .rp-ring-inner small{font-size:11px;color:#8e8e93;}
body #page-portfolio .rp-ring-caption{font-size:12px;color:var(--ink2,#6e6e73);margin:0;text-align:center;}
body #page-portfolio .rp-ring-empty{padding:30px 0;color:var(--ink2,#6e6e73);font-size:13px;text-align:center;}
body #page-portfolio .rp-scheduler-collapsed{margin:2px 0 0;font-size:12.5px;color:#8e8e93;line-height:1.4;}

/* Approved-spec mobile note: numbers strip becomes a 2x2 grid, not 4-across.
   mobile-integration-r97.css already forces a single-column grid here via
   `body.rp27 #page-portfolio .rp26-metrics` (grouped with two other
   selectors) — that extra `.rp27` class makes it more specific than a
   plain `body #page-portfolio .rp26-metrics`, so it was winning even
   though this file loads later. Copying the exact selector (same
   specificity, later in the cascade) so this wins instead. */
@media (max-width:760px){
  body.rp27 #page-portfolio .rp26-metrics,
  body #page-portfolio .rp26-metrics{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:0!important;
  }
  body #page-portfolio .rp26-metric:nth-child(2),
  body #page-portfolio .rp26-metric:nth-child(4){
    border-left:1px solid #eeeeef!important;
  }
  body #page-portfolio .rp26-metric:nth-child(3),
  body #page-portfolio .rp26-metric:nth-child(4){
    border-top:1px solid #eeeeef!important;
  }
  body #page-portfolio .rp-today-row{
    flex-wrap:wrap;
  }
  body #page-portfolio .rp-today-card{
    min-width:0;
    flex:1 1 100%;
  }
  body #page-portfolio .rp-insights{
    grid-template-columns:1fr;
  }
}
