/* ---------------------------------------------------------------------------
 * Partner Portal — light theme
 *
 * The portal at /partner ships one palette, defined on `.pp` with hard-coded
 * dark values (--pp-bg:#070c16, --pp-ink:#e6ecf7, …) and no light variant, so
 * it stayed dark no matter what the client portal's theme was set to. The app
 * toggles `dark` on <html>, so light mode is `html:not(.dark)`.
 *
 * Every selector below is scoped to html:not(.dark) .pp — strictly more
 * specific than the base rule it overrides, so dark mode is untouched.
 * The greys deliberately reuse the client portal's own light tokens
 * (ink #091526, faint #949cac, line #e6e8f0) so the two match.
 * ------------------------------------------------------------------------- */

html:not(.dark) .pp {
  --pp-bg:    #f6f7fb;
  --pp-card:  #ffffff;
  --pp-card2: #f3f5fa;
  --pp-line:  #e6e8f0;
  --pp-ink:   #091526;
  --pp-sub:   #51607a;
  --pp-faint: #8792a6;
  /* Accents darkened for contrast on white (the dark-mode tints fail on it). */
  --pp-blue:  #2563eb;
  --pp-green: #0f8a6a;
  --pp-red:   #dc2626;
}

/* Surfaces that used white-alpha fills — invisible on a white background. */
html:not(.dark) .pp-inset        { background: #0915260a; }
html:not(.dark) .pp-input        { background: #ffffff; }
html:not(.dark) .pp-btn-ghost    { background: #0915260a; }
html:not(.dark) .pp-btn-ghost:hover { background: #09152614; }
html:not(.dark) .pp-side-item:hover { background: #0915260a; }
html:not(.dark) .pp tbody tr:hover  { background: #09152605; }
html:not(.dark) .pp-menu button:hover { background: #0915260a; }

/* Active nav item: white-on-blue-tint is unreadable on white. */
html:not(.dark) .pp-side-item.active {
  color: var(--pp-blue);
  background: #2563eb14;
}

/* Hard-coded dark surfaces. */
html:not(.dark) .pp-menu {
  background: #ffffff;
  box-shadow: 0 20px 48px -12px #0915262e;
}
html:not(.dark) .pp tbody td { border-bottom: 1px solid #e6e8f0; }
html:not(.dark) .pp ::selection      { background: #2563eb24; }
html:not(.dark) .pp ::-moz-selection { background: #2563eb24; }

/* Status chips: the dark-mode pairs (pale text on a dark tint) drop to roughly
 * 1.7:1 on white, so the text colour is darkened and the tint lightened. */
html:not(.dark) .pp-chip-green { background: #16a34a1f; color: #15803d; }
html:not(.dark) .pp-chip-red   { background: #dc26261f; color: #b91c1c; }
html:not(.dark) .pp-chip-blue  { background: #2563eb1f; color: #1d4ed8; }
html:not(.dark) .pp-chip-grey  { background: #6b72801f; color: #4b5563; }
html:not(.dark) .pp-chip-amber { background: #d977061f; color: #b45309; }
