/* ==========================================================================
   iBNSoft CMS - portal theme bridge (ibn-portal.css), 2026-10-29

   Loaded after portal.css (partner portal) or client-portal.css (client portal) by
   their four layouts. It only re-points their variables and flattens their gradients
   onto the ibn.css design system; the portal stylesheets themselves are unchanged,
   so every portal screen keeps its layout and behaviour.
   ========================================================================== */

/* v3 (2026-10-31, SN 4.8): the same colour family as ibn.css. The partner portal takes the
   accent's steps (a50 surface, a600 buttons, a700 hover, tinted lines); the client portal
   keeps its blue and gets cool neutrals and a deep blue login instead of warm grey and black. */
:root {
    --portal-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --brand-accent: #6d4aff;            /* logo colour, as ibn.css --a500 */
    --portal-primary: #5b36ee;          /* as ibn.css --btn (a600) */
    --portal-primary-dark: #4b28cc;     /* a700 */
    --portal-soft: #ebe6ff;             /* a100 */
    --portal-ink: #17113a;              /* a950, table heads */
    --portal-text: #2c2a36;
    --portal-text-dark: #14121c;
    --portal-text-muted: #575566;
    --portal-text-light: #6f6c80;
    --portal-bg: #f5f3ff;               /* a50 */
    --portal-border: #e4e0f2;
    --portal-border-light: #cbc5e3;

    --client-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --client-primary: #2563eb;          /* client portal keeps its blue, one step darker for AA */
    --client-primary-dark: #1d4ed8;
    --client-text: #2c2a36;
    --client-text-dark: #14121c;
    --client-text-muted: #575566;
    --client-text-light: #6f6c80;
    --client-bg: #f1f4ff;
    --client-border: #dfe4f3;
    --client-border-light: #c4cde8;
}
/* the other two accents of the back office setting (Site appearance > Accent colour, SN 4.6) */
:root[data-accent="emerald"] {
    --brand-accent: #0f8a63; --portal-primary: #0b7756; --portal-primary-dark: #095f45; --portal-soft: #d9f2e6; --portal-ink: #04211a;
    --portal-bg: #effaf5; --portal-border: #dbe9e2; --portal-border-light: #bfd6cb;
}
:root[data-accent="cobalt"] {
    --brand-accent: #3b5bdb; --portal-primary: #304dc8; --portal-primary-dark: #273ea3; --portal-soft: #e1e8ff; --portal-ink: #0d1636;
    --portal-bg: #f1f4ff; --portal-border: #dfe4f3; --portal-border-light: #c4cde8;
}


/* flat backgrounds: the system allows gradients on hero heading text only */
.portal-body--login { background: var(--portal-bg); }
.client-body--login { background: #0d1636; }
.portal-table__header, .portal-table__head { background: var(--portal-ink); }
.portal-contact-card { background: var(--portal-soft); }
/* on the dark client login the footer sits on the page, not in a white strip */
.client-body--login .client-footer { width: 100%; background: transparent; border-top: 1px solid #263563; color: #c1cffd; }

/* SN R12: the remember me box and the links beside it are 44px targets; the label row is
   the target and the box itself is drawn at 20px */
.portal-body .form-options, .client-body .form-options { align-items: center; }
.portal-body .form-options label, .client-body .form-options label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.portal-body .form-options input[type="checkbox"], .client-body .form-options input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--portal-primary); }
.client-body .form-options input[type="checkbox"] { accent-color: var(--client-primary); }
.portal-body .forgot-link, .client-body .forgot-link { display: inline-flex; align-items: center; min-height: 44px; }
.client-body .form-group input, .client-body .form-group select { min-height: 44px; font-size: 1rem; }

/* headings: no ultra bold, tighter tracking like the public site */
.portal-body h1, .portal-body h2, .portal-body h3,
.client-body h1, .client-body h2, .client-body h3 { font-weight: 700; letter-spacing: -0.02em; }

/* type sizes onto the site scale (closest step below; buttons at 16px). portal.css and
   client-portal.css set these in off-scale rems: 0.8rem, 0.8125rem, 0.9rem, 0.95rem. */
.portal-body .signup-hint, .portal-body .sf-contact-note, .portal-body .portal-footer, .portal-body .portal-footer__inner,
.client-body .signup-hint, .client-body .sf-contact-note, .client-body .client-footer, .client-body .client-footer__inner,
.client-body .form-options, .client-body .form-options label, .client-body .form-options input, .client-body .forgot-link,
.client-body .signup-hint a { font-size: 0.75rem; line-height: 1rem; }
.client-body .subtitle, .client-body .sf-contact-panel, .client-body .sf-contact-panel p, .client-body .sf-contact-label,
.client-body .form-group label { font-size: 0.875rem; line-height: 1.25rem; }   /* labels match the partner portal */
.client-body .btn-login { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }

/* a visible keyboard focus ring on every control */
.portal-body :focus-visible, .client-body :focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--portal-primary); }
.client-body :focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2563eb; }

/* five elements ring logo (2026-10-31): square at every width; portal.css shrinks the header
   mark to 32x24 below 768px, which would squash it */
.portal-header__logo svg, .client-header__logo svg { width: 28px; height: 28px; }
