/* gr-food-programme-erp-cloud-light.css — cloud-light adoption for the food-programme ERP
   pages (School Board ERP / funder portal, both mirrors).

   Role: the explicit cloud-light activation for GR-funder-portal.html, following the
   Light Engine pattern (gr-farm-inventory-cloud-light.css). The foundation block
   body.gr-theme[data-gr-profile="cloud-light"] already rebinds the shared aliases; this
   sheet adds only what these pages own:

     1. The page's private palette (--green, --green2, --ink, --muted, --line, --bg, --card,
        --accent, --warn*) rebound onto the canonical cloud tokens, so every existing rule and
        inline style that reads them now reads the GreenReach palette. No new literal colour.
     2. The page header as the cloud application bar: light surface, brand-primary title.
     3. The page's own filled buttons keep their primary role. The foundation styles every
        unclassed button as secondary on this profile; here the page's plain buttons are
        primary actions, .ghost stays secondary and .link stays a text link.
     4. Width: the workspace uses the cloud content width instead of an 860px column.
     5. Type: page-local 11–13px text is raised to the cloud label floor (16px).

   Presentation only: no data, route or control behaviour changes. */

body.gr-theme[data-gr-profile="cloud-light"] {
  --green: var(--gr-cloud-primary);
  --green2: var(--gr-cloud-primary);
  --ink: var(--gr-cloud-text);
  --muted: var(--gr-cloud-muted);
  --line: var(--gr-cloud-border);
  --bg: var(--gr-cloud-bg);
  --card: var(--gr-cloud-surface);
  --accent: var(--gr-cloud-info);
  --warn: var(--gr-cloud-warning);
  --warnbg: var(--gr-cloud-warning-soft);
  --warnln: var(--gr-cloud-control-border);
  color-scheme: light;
  font-size: var(--gr-cloud-label-size);
}

/* ── 2. Application bar ── */
body.gr-theme[data-gr-profile="cloud-light"] > header {
  background: var(--gr-cloud-surface);
  color: var(--gr-cloud-text);
  border-bottom: 3px solid var(--gr-brand-accent);
  padding: var(--gr-cloud-space-4) var(--gr-cloud-space-6);
}
body.gr-theme[data-gr-profile="cloud-light"] > header h1 {
  color: var(--gr-cloud-primary);
  font-size: var(--gr-cloud-card-size);
}
body.gr-theme[data-gr-profile="cloud-light"] > header p {
  color: var(--gr-cloud-muted);
  font-size: var(--gr-cloud-label-size);
  opacity: 1;
}

/* ── 3. Button roles ── */
body.gr-theme[data-gr-profile="cloud-light"] main button:not(.ghost):not(.link):not(.danger):not([class*="po-"]):not([class*="gr-"]):not([role="tab"]) {
  background: var(--gr-cloud-primary);
  color: var(--gr-cloud-on-primary);
  border: 1px solid var(--gr-cloud-primary);
}
body.gr-theme[data-gr-profile="cloud-light"] main button:not(.ghost):not(.link):not(.danger):not([class*="po-"]):not([class*="gr-"]):not([role="tab"]):hover:not(:disabled) {
  background: var(--gr-cloud-primary-hover);
}
body.gr-theme[data-gr-profile="cloud-light"] main button.ghost {
  background: var(--gr-cloud-success-soft);
  color: var(--gr-cloud-primary);
  border: 1px solid var(--gr-cloud-control-border);
}
body.gr-theme[data-gr-profile="cloud-light"] main button.link {
  background: none;
  border: 0;
  color: var(--gr-cloud-info);
  padding: 0;
}

/* ── 4. Width ── */
body.gr-theme[data-gr-profile="cloud-light"] main.wrap {
  max-width: var(--gr-cloud-content-width);
  padding-left: max(16px, var(--gr-cloud-space-6));
  padding-right: max(16px, var(--gr-cloud-space-6));
}

/* ── 5. Type floor for the page's own small text ── */
body.gr-theme[data-gr-profile="cloud-light"] :is(label, .msg, .banner, .sub, .foot, .defnote, .impact-empty, .suppressed,
  .kpi .label, .bigkpi .label, .bigkpi .note, .impact-card .period, .bar-row, .link, table, th) {
  font-size: max(var(--gr-cloud-label-size), 1em);
}
body.gr-theme[data-gr-profile="cloud-light"] th { text-transform: none; letter-spacing: 0; }
body.gr-theme[data-gr-profile="cloud-light"] input,
body.gr-theme[data-gr-profile="cloud-light"] select,
body.gr-theme[data-gr-profile="cloud-light"] textarea {
  font-size: var(--gr-cloud-label-size);
  border-color: var(--gr-cloud-control-border);
}
