/*
 * Design 4 ("Community board") — the intranet's look from September 2026.
 *
 * Linked LAST from the layouts, after the ported legacy stylesheets, so it wins wherever both declare something.
 * Two kinds of rules live here:
 *   1. the new shell (`.d4-*`): header, sidebar, main, footer — markup of our own in layouts/default.vue;
 *   2. overrides for the legacy component classes the inner pages still carry (`.invite-team`, `.sales_leadtable`,
 *      `.light_bluebtn`, `.banner_textbox` …): same markup, design 4 skin.
 * Every rule is scoped under `body.d4`. The layout variant is a second body class — `d4-a` (board), `d4-b` (wide),
 * `d4-c` (top nav) — and only the LAYOUT differs between the three; the skin is one.
 *
 * Tokens come from the extranet's main.css (navy, ink, blue, yellow, line, soft) as the design canvas lifted them.
 */

body.d4 {
  --d4-navy: #12385f;
  --d4-navy-deep: #0c243d;
  --d4-ink: #111827;
  --d4-text: #25364a;
  --d4-muted: #667085;
  --d4-blue: #2287c9;
  --d4-blue-soft: #e4f0fa;
  --d4-yellow: #f6b739;
  --d4-yellow-soft: #fff3d6;
  --d4-line: #dce5ee;
  --d4-line-soft: #eef3f8;
  --d4-soft: #f3f8fc;
  --d4-green: #1b7f4b;
  --d4-green-soft: #e6f6ee;
  --d4-red: #c62828;
  --d4-red-soft: #fde8e8;
  --d4-shadow: 0 12px 30px rgba(18, 56, 95, .07);
  --d4-radius: 16px;
  --d4-radius-sm: 10px;
  --d4-header-h: 82px;
  --d4-sidebar-w: 232px;
  --d4-rail-w: 76px;
  font-family: Roboto, system-ui, sans-serif;
  color: var(--d4-ink);
  background: linear-gradient(180deg, #fff8e8 0%, #fff 18%, var(--d4-soft) 100%) fixed;
  font-size: 14px;
  line-height: 1.5;
}
body.d4 a { color: inherit; text-decoration: none; }
body.d4 a:hover { color: inherit; }
body.d4 h1, body.d4 h2, body.d4 h3, body.d4 h4, body.d4 h5 { font-family: Roboto, system-ui, sans-serif; color: var(--d4-navy); font-weight: 900; letter-spacing: 0; }

/* Shared primitives */
body.d4 .d4-eyebrow { color: var(--d4-blue); font-size: 11px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
body.d4 .d4-card { background: #fff; border: 1px solid var(--d4-line); border-radius: var(--d4-radius); box-shadow: var(--d4-shadow); }
body.d4 .d4-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 900; font-size: 13.5px; line-height: 1; white-space: nowrap;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
body.d4 .d4-pill--navy { background: var(--d4-navy); color: #fff; }
body.d4 .d4-pill--navy:hover { background: #0e2d4c; color: #fff; }
body.d4 .d4-pill--blue { background: var(--d4-blue); color: #fff; }
body.d4 .d4-pill--blue:hover { background: #1b74ad; color: #fff; }
body.d4 .d4-pill--yellow { background: var(--d4-yellow); color: var(--d4-ink); }
body.d4 .d4-pill--yellow:hover { background: #f0aa1f; color: var(--d4-ink); }
body.d4 .d4-pill--outline { background: #fff; color: var(--d4-navy); border-color: var(--d4-line); }
body.d4 .d4-pill--outline:hover { border-color: var(--d4-navy); color: var(--d4-navy); }
body.d4 .d4-pill--ghost { background: transparent; color: var(--d4-navy); border-color: var(--d4-navy); }
body.d4 .d4-pill--ghost:hover { background: var(--d4-navy); color: #fff; }
body.d4 .d4-pill .iconify, body.d4 .d4-pill svg { width: 16px; height: 16px; }

/* ── Shell ───────────────────────────────────────────────────────────────────────────────────────── */
body.d4 .d4-shell { min-height: 100vh; display: flex; flex-direction: column; }

body.d4 .d4-header {
  position: sticky; top: 0; z-index: 1200; height: var(--d4-header-h);
  display: flex; align-items: center; gap: 20px; padding: 0 40px;
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--d4-line); backdrop-filter: blur(8px);
}
body.d4 .d4-header__inner { width: 100%; display: flex; align-items: center; gap: 20px; min-width: 0; }
body.d4 .d4-header__logo { display: flex; align-items: center; flex: 0 0 auto; }
body.d4 .d4-header__logo img { width: 142px; height: auto; display: block; }
body.d4 .d4-header__nav { margin-left: auto; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; color: var(--d4-text); }
body.d4 .d4-header__wa svg { color: #25d366; width: 18px; height: 18px; }
body.d4 .d4-account { position: relative; }
body.d4 .d4-account__btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px 0 4px !important; width: auto !important;
  border: 1px solid var(--d4-line); border-radius: 999px; background: #fff; font-weight: 800; color: var(--d4-navy); cursor: pointer;
}
body.d4 .d4-account__btn img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
body.d4 .d4-account__btn .iconify { width: 16px; height: 16px; opacity: .6; }
body.d4 .d4-account__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px;
  background: #fff; border: 1px solid var(--d4-line); border-radius: 14px; box-shadow: 0 18px 45px rgba(18, 56, 95, .14); z-index: 5;
}
body.d4 .d4-account__menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: var(--d4-text); }
body.d4 .d4-account__menu a:hover { background: var(--d4-soft); color: var(--d4-navy); }
body.d4 .d4-account__menu a .iconify { width: 17px; height: 17px; color: var(--d4-blue); }
body.d4 .d4-account__menu .d4-account__logout { margin-top: 6px; border-top: 1px solid var(--d4-line-soft); padding-top: 8px; }
body.d4 .d4-account__menu .d4-account__logout a { color: var(--d4-red); }
body.d4 .d4-account__menu .d4-account__logout a .iconify { color: var(--d4-red); }
body.d4 .d4-burger { display: none; width: 42px !important; height: 42px !important; padding: 0 !important; border-radius: 50%; border: 1px solid var(--d4-line); background: #fff; align-items: center; justify-content: center; color: var(--d4-navy); cursor: pointer; }
body.d4 .d4-burger .iconify { width: 20px; height: 20px; }

/* "Acting as" strip (administrators) */
body.d4 .d4-acting { background: var(--d4-yellow-soft); color: #7a4f00; border-bottom: 1px solid #f6dfa8; font-size: 13.5px; padding: 8px 32px; display: flex; align-items: center; gap: 10px; }
body.d4 .d4-acting a { color: var(--d4-navy); font-weight: 800; text-decoration: underline; }
body.d4 .d4-acting .d4-acting__sep { opacity: .5; }

body.d4 .d4-body { display: flex; align-items: stretch; flex: 1; }

/* Sidebar — a floating white card (variant a), a rail (variant b), a horizontal band (variant c) */
body.d4 .d4-side { width: var(--d4-sidebar-w); flex: 0 0 auto; padding: 16px 12px 40px 24px; transition: width .25s ease; }
body.d4 .d4-side__card { position: sticky; top: calc(var(--d4-header-h) + 16px); background: #fff; border: 1px solid var(--d4-line); border-radius: 20px; padding: 14px 10px 16px; box-shadow: var(--d4-shadow); }
body.d4 .d4-side__top { display: flex; justify-content: flex-end; padding: 0 4px 12px; }
body.d4 .d4-side__toggle, body.d4 .d4-burger, body.d4 .d4-account__btn { font: inherit; letter-spacing: 0; text-transform: none; line-height: 1; min-width: 0; height: auto; box-shadow: none; margin: 0; }
body.d4 .d4-side__toggle { width: 30px !important; height: 30px !important; padding: 0 !important; border-radius: 999px; background: var(--d4-soft); border: 0; display: flex; align-items: center; justify-content: center; color: var(--d4-navy); cursor: pointer; }
body.d4 .d4-side__toggle .iconify { width: 16px; height: 16px; transition: transform .25s; }
body.d4 .d4-side__label { padding: 0 12px 10px; }
body.d4 .d4-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
body.d4 .d4-side li a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 999px;
  color: var(--d4-text); font-weight: 800; font-size: 14px; white-space: nowrap; transition: background .15s;
}
body.d4 .d4-side li a:hover { background: var(--d4-soft); color: var(--d4-navy); }
body.d4 .d4-side li a.is-active { background: var(--d4-yellow); color: var(--d4-ink); }
body.d4 .d4-side li a .iconify { width: 18px; height: 18px; flex: 0 0 auto; color: var(--d4-navy); }
body.d4 .d4-side li a.is-active .iconify { color: var(--d4-ink); }
body.d4 .d4-side li.d4-side__skeleton { padding: 11px 12px; }
body.d4 .d4-side li.d4-side__skeleton span { display: block; height: 12px; width: 70%; border-radius: 6px; background: var(--d4-line-soft); }

/* Collapsed sidebar: icons only, labels as tooltips */
body.d4 .d4-side.is-closed { width: calc(var(--d4-rail-w) + 24px); }
body.d4 .d4-side.is-closed .d4-side__card { padding: 14px 8px 16px; }
body.d4 .d4-side.is-closed .d4-side__top { justify-content: center; padding-right: 0; }
body.d4 .d4-side.is-closed .d4-side__toggle .iconify { transform: rotate(180deg); }
body.d4 .d4-side.is-closed .d4-side__label { display: none; }
body.d4 .d4-side.is-closed li a { justify-content: center; padding: 11px 0; }
body.d4 .d4-side.is-closed li a .d4-side__text { display: none; }

body.d4 .d4-main { flex: 1 1 0%; min-width: 0; padding: 20px 32px 48px 12px; }
body.d4 .d4-main > div { min-height: 60vh; }

/* Footer */
body.d4 .d4-footer { background: var(--d4-navy-deep); color: #fff; padding: 32px 32px 22px; margin-top: auto; }
body.d4 .d4-footer__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
body.d4 .d4-footer__brand img { width: 120px; height: auto; display: block; }
body.d4 .d4-footer__brand p { margin: 14px 0 0; font-size: 13px; color: rgba(255, 255, 255, .65); }
body.d4 .d4-footer__legal { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 22px; padding-top: 14px; font-size: 13px; color: rgba(255, 255, 255, .65); }
body.d4 .d4-footer__brand p a { color: #fff; text-decoration: underline; }
body.d4 .d4-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13.5px; font-weight: 800; justify-content: flex-end; }
body.d4 .d4-footer__links a { color: #fff; }
body.d4 .d4-footer__links a:hover { color: var(--d4-yellow); }

/* Mobile drawer */
body.d4 .d4-drawer { position: fixed; inset: 0; z-index: 2000; display: none; }
body.d4 .d4-drawer.is-open { display: block; }
body.d4 .d4-drawer__overlay { position: absolute; inset: 0; background: rgba(12, 36, 61, .5); }
body.d4 .d4-drawer__panel { position: absolute; top: 0; left: 0; bottom: 0; width: 290px; background: #fff; padding: 18px 16px; overflow-y: auto; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
body.d4 .d4-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
body.d4 .d4-drawer__head img { width: 120px; }
body.d4 .d4-drawer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
body.d4 .d4-drawer li a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 999px; font-weight: 800; color: var(--d4-text); }
body.d4 .d4-drawer li a.is-active { background: var(--d4-yellow); color: var(--d4-ink); }
body.d4 .d4-drawer li a .iconify { width: 18px; height: 18px; color: var(--d4-navy); }

@media (max-width: 1199px) {
  body.d4 .d4-side { display: none; }
  body.d4 .d4-burger { display: inline-flex; }
  body.d4 .d4-header { padding: 0 16px; gap: 12px; }
  body.d4 .d4-header__nav .d4-header__text { display: none; }
  body.d4 .d4-main { padding: 16px 16px 40px; }
}

/* ── Variant b: wide — icon rail, content edge to edge, sticky page bars ─────────────────────────── */
body.d4.d4-b .d4-side { width: calc(var(--d4-rail-w) + 16px); padding: 16px 8px 40px 16px; }
body.d4.d4-b .d4-side .d4-side__card { padding: 12px 8px 14px; border-radius: 18px; }
body.d4.d4-b .d4-side .d4-side__label, body.d4.d4-b .d4-side li a .d4-side__text { display: none; }
body.d4.d4-b .d4-side li a { justify-content: center; padding: 12px 0; }
body.d4.d4-b .d4-side .d4-side__top { justify-content: center; }
body.d4.d4-b .d4-side.is-open-b { width: var(--d4-sidebar-w); padding: 16px 12px 40px 24px; }
body.d4.d4-b .d4-side.is-open-b .d4-side__label, body.d4.d4-b .d4-side.is-open-b li a .d4-side__text { display: block; }
body.d4.d4-b .d4-side.is-open-b li a { justify-content: flex-start; padding: 11px 12px; }
body.d4.d4-b .d4-side.is-open-b .d4-side__top { justify-content: flex-end; }
body.d4.d4-b .d4-side.is-open-b .d4-side__toggle .iconify { transform: none; }
body.d4.d4-b .d4-side .d4-side__toggle .iconify { transform: rotate(180deg); }
body.d4.d4-b .d4-main { padding: 20px 28px 48px 8px; }

/* ── Variant c: top navigation — no sidebar, a navy band of pills, centred content ───────────────── */
body.d4.d4-c .d4-body { display: block; }
body.d4.d4-c .d4-side { width: auto; padding: 0; position: sticky; top: var(--d4-header-h); z-index: 1100; }
body.d4.d4-c .d4-side .d4-side__card { position: static; border-radius: 0; border: 0; box-shadow: none; background: var(--d4-navy); padding: 0 32px; }
body.d4.d4-c .d4-side .d4-side__top, body.d4.d4-c .d4-side .d4-side__label { display: none; }
body.d4.d4-c .d4-side ul { display: flex; gap: 4px; max-width: 1440px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
body.d4.d4-c .d4-side li a { color: rgba(255, 255, 255, .85); border-radius: 0; padding: 14px 16px; border-bottom: 3px solid transparent; }
body.d4.d4-c .d4-side li a .iconify { color: rgba(255, 255, 255, .85); }
body.d4.d4-c .d4-side li a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
body.d4.d4-c .d4-side li a.is-active { background: transparent; color: #fff; border-bottom-color: var(--d4-yellow); }
body.d4.d4-c .d4-side li a.is-active .iconify { color: var(--d4-yellow); }
body.d4.d4-c .d4-main { max-width: 1440px; margin: 0 auto; padding: 24px 32px 56px; width: 100%; }
body.d4.d4-c .d4-header { padding: 0 32px; }
body.d4.d4-c .d4-header__inner { max-width: 1440px; margin: 0 auto; }
body.d4.d4-c .d4-footer__row { max-width: 1440px; margin: 0 auto; }
body.d4.d4-c .d4-footer__news { max-width: 1440px; margin-left: auto; margin-right: auto; }
@media (max-width: 1199px) {
  body.d4.d4-c .d4-side { display: block; }
  body.d4.d4-c .d4-side .d4-side__card { padding: 0 8px; }
  body.d4.d4-c .d4-side li a .d4-side__text { display: none; }
}

/* ── Home ────────────────────────────────────────────────────────────────────────────────────────── */
body.d4 .d4-home { display: grid; gap: 22px; min-width: 0; }
body.d4 .d4-home > *, body.d4 .d4-col, body.d4 .d4-col > * { min-width: 0; }
body.d4 .d4-home__hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
body.d4 .d4-home__hero h1 { margin: 8px 0 0; font-size: 38px; line-height: 1; }
body.d4 .d4-home__hero h1 .d4-accent { color: var(--d4-blue); }
body.d4 .d4-home__hero h1 .d4-outline { color: transparent; -webkit-text-stroke: 2px var(--d4-navy); }
body.d4 .d4-stats { display: flex; gap: 1px; background: var(--d4-line); border: 1px solid var(--d4-line); border-radius: 14px; overflow: hidden; box-shadow: var(--d4-shadow); }
body.d4 .d4-stats > div { background: #fff; padding: 12px 18px; min-width: 132px; }
body.d4 .d4-stats b { display: block; font-size: 24px; font-weight: 900; color: var(--d4-navy); line-height: 1; }
body.d4 .d4-stats b.is-yellow { color: #d89311; }
body.d4 .d4-stats span { display: block; font-size: 12px; font-weight: 850; color: #475467; margin-top: 4px; }

body.d4 .d4-home__top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
body.d4 .d4-home__tiles { display: grid; gap: 20px; align-content: stretch; }
body.d4 .d4-banner { display: block; border-radius: var(--d4-radius); overflow: hidden; position: relative; aspect-ratio: 1071 / 436; min-height: 260px; background: var(--d4-navy); box-shadow: var(--d4-shadow); }
body.d4 .d4-banner img { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
body.d4 .d4-banner--empty { display: flex; align-items: flex-end; padding: 24px; color: #fff; background: linear-gradient(135deg, var(--d4-navy) 0%, var(--d4-blue) 100%); }
body.d4 .d4-tile { border-radius: var(--d4-radius); padding: 18px; display: flex; flex-direction: column; }
body.d4 .d4-tile--white { background: #fff; border: 1px solid var(--d4-line); box-shadow: var(--d4-shadow); }
body.d4 .d4-tile--navy { background: var(--d4-navy); color: #fff; }
body.d4 .d4-tile--navy .d4-eyebrow { color: var(--d4-yellow); }
body.d4 .d4-tile--navy h4 { color: #fff; }
body.d4 .d4-tile h4 { margin: 14px 0 4px; font-size: 17px; line-height: 1.1; }
body.d4 .d4-tile p { margin: 0 0 14px; font-size: 13px; color: var(--d4-muted); flex: 1; }
body.d4 .d4-tile--navy p { color: rgba(255, 255, 255, .8); }
body.d4 .d4-tile .d4-tile__icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--d4-green-soft); color: var(--d4-green); }
body.d4 .d4-tile .d4-tile__icon.is-off { background: var(--d4-red-soft); color: var(--d4-red); }
body.d4 .d4-tile .d4-tile__icon .iconify { width: 18px; height: 18px; }
body.d4 .d4-tile .d4-pill { align-self: flex-start; }

body.d4 .d4-home__mid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; align-items: start; }
body.d4 .d4-section { padding: 20px 22px 22px; }
body.d4 .d4-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
body.d4 .d4-section__head h4 { margin: 0; font-size: 17px; line-height: 1.1; }
body.d4 .d4-section__head h2 { margin: 4px 0 0; font-size: 24px; line-height: 1.1; }
body.d4 .d4-open { display: grid; gap: 16px; }
body.d4 .d4-open .d4-section__head { margin-bottom: 0; }
body.d4 .d4-section__head .d4-section__meta { font-size: 12.5px; font-weight: 900; color: var(--d4-muted); }

/* Holiday calendar (the vanilla-calendar the legacy home used, re-skinned) */
body.d4 .d4-calendar #holidays-calendar-vanilla { font-family: Roboto, sans-serif; }
body.d4 .d4-calendar .vc { border: 0; padding: 0; background: transparent; box-shadow: none; width: 100%; }
body.d4 .d4-calendar .vc-header { padding: 0 0 10px; }
body.d4 .d4-calendar .vc-month, body.d4 .d4-calendar .vc-year { font: 900 14px Roboto, sans-serif !important; color: var(--d4-navy) !important; }
body.d4 .d4-calendar .vc-arrow { width: 24px; height: 24px; border-radius: 999px; background-color: transparent; opacity: .7; }
body.d4 .d4-calendar .vc-week__day { font: 900 11px Roboto, sans-serif; color: var(--d4-muted); text-transform: uppercase; letter-spacing: .04em; }
body.d4 .d4-calendar .vc-week__day[data-vc-week-day-off], body.d4 .d4-calendar .vc-week__day_off { color: var(--d4-muted) !important; }
body.d4 .d4-calendar .vc-dates__row { gap: 3px; }
body.d4 .d4-calendar .vc-date__btn { font: 500 12.5px Roboto, sans-serif; color: var(--d4-ink) !important; height: 30px; border-radius: 999px; background: transparent; }
body.d4 .d4-calendar .vc-date[data-vc-date-month="prev"] .vc-date__btn, body.d4 .d4-calendar .vc-date[data-vc-date-month="next"] .vc-date__btn { color: #b8c3cf !important; }
body.d4 .d4-calendar .vc-date[data-vc-date-weekend] .vc-date__btn { color: var(--d4-muted) !important; }
body.d4 .d4-calendar .vc-date[data-vc-date-today] .vc-date__btn { background: var(--d4-blue-soft) !important; color: var(--d4-blue) !important; font-weight: 700; }
body.d4 .d4-calendar .vc-date[data-vc-date-holiday] .vc-date__btn { background: var(--d4-yellow) !important; color: #fff !important; font-weight: 700; }
body.d4 .d4-calendar .vc-date[data-vc-date-selected] .vc-date__btn { box-shadow: 0 0 0 2px var(--d4-navy) inset; }
body.d4 .d4-calendar .d4-pill { width: 100%; margin-top: 14px; }

/* Payment monitor on the home */
body.d4 .d4-table { width: 100%; border-collapse: collapse; }
body.d4 .d4-table th { color: var(--d4-muted); font-size: 11px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--d4-line); background: transparent; }
body.d4 .d4-table td { padding: 11px 10px; border-bottom: 1px solid var(--d4-line-soft); color: var(--d4-text); font-size: 14px; }
body.d4 .d4-table td.is-strong { font-weight: 900; color: var(--d4-navy); white-space: nowrap; }
body.d4 .d4-table tr:last-child td { border-bottom: 0; }
body.d4 .d4-status { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; background: var(--d4-line-soft); color: var(--d4-text); }
body.d4 .d4-status.is-paid { background: var(--d4-green-soft); color: var(--d4-green); }
body.d4 .d4-status.is-pending { background: var(--d4-yellow-soft); color: #9a6200; }
body.d4 .d4-status.is-overdue, body.d4 .d4-status.is-reported { background: var(--d4-red-soft); color: var(--d4-red); }

/* News as the site's story grid */
body.d4 .d4-news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.d4 .d4-news a { display: grid; grid-template-columns: 104px 1fr; gap: 14px; background: #fff; border: 1px solid var(--d4-line); border-radius: 12px; padding: 12px; box-shadow: var(--d4-shadow); transition: transform .15s, box-shadow .15s; }
body.d4 .d4-news a:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(18, 56, 95, .12); }
body.d4 .d4-news img, body.d4 .d4-news .d4-news__ph { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; background: var(--d4-soft); display: block; }
body.d4 .d4-news h5 { margin: 6px 0 6px; font-size: 14px; line-height: 1.35; font-weight: 900; color: var(--d4-navy); }
body.d4 .d4-news .d4-news__more { display: inline-block; margin-top: 6px; color: var(--d4-blue); font-weight: 800; font-size: 12.5px; }
body.d4 .d4-news .d4-news__company { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--d4-muted); font-weight: 700; }
body.d4 .d4-news .d4-news__company img { width: 18px; height: 18px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--d4-line-soft); }

/* Top routing partners */
body.d4 .d4-partners { display: grid; grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr)); gap: 16px; }
body.d4 .d4-partner { border-radius: 14px; border: 1px solid var(--d4-line); background: #fff; padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; }
body.d4 .d4-partner--lead { grid-row: span 2; background: linear-gradient(160deg, var(--d4-blue) 0%, var(--d4-navy) 100%); color: #fff; border-color: transparent; padding: 22px; }
body.d4 .d4-partner__rank { position: absolute; top: 14px; right: 14px; font: 700 11px/1 'Roboto Mono', ui-monospace, monospace; background: var(--d4-yellow-soft); color: #9a6200; border-radius: 999px; padding: 6px 9px; }
body.d4 .d4-partner--lead .d4-partner__rank { position: static; align-self: flex-start; background: var(--d4-yellow); color: var(--d4-ink); font: 900 11px/1 Roboto, sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 7px 12px; }
body.d4 .d4-partner__logo { width: 56px; height: 56px; border-radius: 12px; background: var(--d4-blue-soft); color: var(--d4-navy); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; overflow: hidden; }
body.d4 .d4-partner__logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
body.d4 .d4-partner--lead .d4-partner__logo { width: 92px; height: 92px; background: #fff; border-radius: 16px; font-size: 30px; margin-top: 12px; }
body.d4 .d4-partner h4 { margin: 4px 0 0; font-size: 16px; line-height: 1.2; }
body.d4 .d4-partner--lead h4 { color: #fff; font-size: 26px; margin-top: 10px; }
body.d4 .d4-partner__place { font-size: 13px; color: var(--d4-muted); }
body.d4 .d4-partner--lead .d4-partner__place { color: rgba(255, 255, 255, .85); }
body.d4 .d4-partner__spec { background: var(--d4-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 800; color: var(--d4-navy); }
body.d4 .d4-partner__spec small { display: block; font-size: 10.5px; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; color: var(--d4-muted); margin-bottom: 2px; }
body.d4 .d4-partner--lead .d4-partner__spec { background: rgba(255, 255, 255, .14); color: #fff; }
body.d4 .d4-partner--lead .d4-partner__spec small { color: rgba(255, 255, 255, .75); }
body.d4 .d4-partner__count { font-size: 12.5px; color: var(--d4-muted); font-weight: 700; }
body.d4 .d4-partner--lead .d4-partner__count { color: rgba(255, 255, 255, .85); }
body.d4 .d4-partner__actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
body.d4 .d4-partner__actions .d4-pill { min-height: 36px; padding: 0 14px; font-size: 12.5px; }
body.d4 .d4-partner--lead .d4-partner__actions .d4-pill--outline { background: #fff; }
body.d4 .d4-empty { color: var(--d4-muted); font-size: 13.5px; padding: 6px 0; }

/* Upcoming FreightCamp events */
body.d4 .d4-events { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body.d4 .d4-event { border-radius: 14px; overflow: hidden; border: 1px solid var(--d4-line); background: #fff; display: flex; flex-direction: column; }
body.d4 .d4-event__art { position: relative; min-height: 150px; background: linear-gradient(135deg, #0f4f8a 0%, var(--d4-navy) 100%); }
body.d4 .d4-event:nth-child(2) .d4-event__art { background: linear-gradient(135deg, var(--d4-blue) 0%, #0f4f8a 100%); }
body.d4 .d4-event:nth-child(3) .d4-event__art { background: linear-gradient(135deg, #f29b1d 0%, #d35400 100%); }
body.d4 .d4-event__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.d4 .d4-event__days { position: absolute; left: 14px; top: 14px; background: var(--d4-yellow-soft); color: #9a6200; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 13px; }
body.d4 .d4-event__days b { font-size: 18px; color: #b8620a; margin-right: 4px; }
body.d4 .d4-event__body { padding: 16px 18px 18px; display: grid; gap: 4px; }
body.d4 .d4-event__body h4 { margin: 2px 0; font-size: 17px; line-height: 1.2; }
body.d4 .d4-event__body .d4-event__when { color: var(--d4-muted); font-size: 13.5px; }
body.d4 .d4-event__body a { color: var(--d4-blue); font-weight: 800; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }

/* Downloads row */
body.d4 .d4-downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
body.d4 .d4-downloads .d4-section { display: flex; align-items: center; gap: 20px; }
body.d4 .d4-downloads h4 { margin: 0 0 10px; font-size: 16px; }
body.d4 .d4-downloads .d4-stores { display: flex; gap: 8px; flex-wrap: wrap; }
body.d4 .d4-downloads .d4-stores img { height: 40px; width: auto; display: block; }
body.d4 .d4-downloads .d4-qr { width: 84px; height: 84px; flex: 0 0 auto; }
body.d4 .d4-downloads .d4-logos { display: flex; gap: 12px; flex-wrap: wrap; }
body.d4 .d4-downloads .d4-logos a { background: var(--d4-soft); border: 1px solid var(--d4-line); border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; }
body.d4 .d4-downloads .d4-logos img { height: 28px; width: auto; display: block; }

/* Variants a and c: the column wrapper is transparent to the grid; variant b turns it into two columns */
body.d4 .d4-home__cols, body.d4 .d4-home__cols > .d4-col--main { display: contents; }

/* Home — variant b: two columns, rail on the right, news as a scroller */
body.d4.d4-b .d4-home__cols { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
body.d4.d4-b .d4-home__cols > .d4-col, body.d4.d4-b .d4-home__cols > .d4-col--main { display: grid; gap: 20px; }
body.d4.d4-b .d4-home__top { grid-template-columns: minmax(0, 1fr); }
body.d4.d4-b .d4-home__tiles { display: none; }
body.d4.d4-b .d4-banner { aspect-ratio: 1071 / 436; height: auto; max-height: 360px; min-height: 0; }
body.d4.d4-b .d4-home__mid { grid-template-columns: minmax(0, 1fr); }
body.d4.d4-b .d4-news { grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); grid-template-columns: none; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
body.d4.d4-b .d4-partners { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.d4.d4-b .d4-partner--lead { grid-row: auto; grid-column: span 1; }
body.d4.d4-b .d4-partner--lead .d4-partner__logo { width: 56px; height: 56px; font-size: 18px; margin-top: 0; }
body.d4.d4-b .d4-partner--lead h4 { font-size: 16px; }

/* Home — variant c: hero row with the calendar beside the greeting, everything else full width */
body.d4.d4-c .d4-home__hero { align-items: stretch; }
body.d4.d4-c .d4-home__hero > .d4-home__greeting { display: flex; flex-direction: column; justify-content: flex-end; }
body.d4.d4-c .d4-home__top { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
body.d4.d4-c .d4-home__mid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
body.d4.d4-c .d4-home__mid > .d4-calendar { order: 2; }

@media (max-width: 1100px) {
  body.d4 .d4-home__top, body.d4 .d4-home__mid, body.d4 .d4-news, body.d4 .d4-partners, body.d4 .d4-events, body.d4 .d4-downloads,
  body.d4.d4-b .d4-home__cols, body.d4.d4-c .d4-home__mid { grid-template-columns: minmax(0, 1fr); }
  body.d4 .d4-banner, body.d4 .d4-partner--lead { grid-row: auto; }
  body.d4 .d4-stats { width: 100%; flex-wrap: wrap; }
}

/* ── Inner pages: the legacy component classes, re-skinned ───────────────────────────────────────── */
body.d4 .intranet_content, body.d4 #intranet-app, body.d4 .content-section { background: transparent; }
body.d4 .d4-main .container { max-width: none; width: 100%; padding-left: 0; padding-right: 0; }
body.d4 .d4-main .container-fluid { padding-left: 0; padding-right: 0; }

/* Page header (LegacyPageHeader and the inline copies): eyebrow breadcrumb + heavy title */
body.d4 .page-header { background: transparent !important; min-height: 0 !important; margin: 0 0 18px !important; padding: 6px 0 0 !important; }
body.d4 .page-header_content { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
body.d4 .page-header_title { color: var(--d4-navy) !important; font-size: 30px !important; line-height: 1.1 !important; font-weight: 900 !important; letter-spacing: 0; }
body.d4 .page-header_breadcrumbs .breadcrumbs, body.d4 .breadcrumbs a, body.d4 .breadcrumbs .current { color: var(--d4-blue) !important; font-size: 11px !important; font-weight: 950 !important; letter-spacing: .12em !important; text-transform: uppercase !important; }
body.d4 .breadcrumbs .divider { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--d4-blue); margin: 0 10px; vertical-align: middle; }
body.d4 .breadcrumbs .divider::before, body.d4 .breadcrumbs .divider::after { content: none !important; }
body.d4 .page-header p, body.d4 .page-header .subtitle { color: var(--d4-muted); font-size: 14.5px; margin: 6px 0 0; }
body.d4 .page-title h3, body.d4 .about_desp h3, body.d4 .shipment-form-box .shipment-title, body.d4 .shipment-title { color: var(--d4-navy); font-size: 30px; font-weight: 900; line-height: 1.1; margin: 0 0 18px; }
body.d4 .title-card, body.d4 .invite-team h4, body.d4 .payment-monitor h4, body.d4 .download-app h4, body.d4 .payment-protection h4, body.d4 .latest-news-title, body.d4 h4.title { color: var(--d4-navy); font-size: 18px; font-weight: 900; line-height: 1.2; text-align: left; margin: 0 0 14px; }

/* Cards */
body.d4 .invite-team, body.d4 .payment-monitor, body.d4 .download-app, body.d4 .payment-protection, body.d4 .member-list-main, body.d4 .account-card,
body.d4 .shipment_popupcontent, body.d4 .latest-news-fix, body.d4 .country-notice, body.d4 .dataTables_wrapper, body.d4 .shipment-form-box > .row > div > .box-shadow,
body.d4 .box-shadow, body.d4 .profile-card, body.d4 .company-card, body.d4 .vendor-card, body.d4 .download-tile, body.d4 .news-card, body.d4 .story-card, body.d4 .contact-card {
  background: #fff; border: 1px solid var(--d4-line); border-radius: var(--d4-radius); box-shadow: var(--d4-shadow);
}
body.d4 .invite-team, body.d4 .payment-monitor, body.d4 .download-app, body.d4 .payment-protection, body.d4 .account-card { padding: 22px; margin-bottom: 20px; }
body.d4 .member-list-main { padding: 20px 22px !important; margin-bottom: 14px; }
body.d4 .country-notice { background: var(--d4-yellow-soft); border-color: #f6dfa8; padding: 18px 22px; gap: 22px; margin-bottom: 22px; }

/* Buttons → pills */
body.d4 .light_bluebtn, body.d4 .bluebtn_outline, body.d4 .btn-sky, body.d4 .btn-primary, body.d4 .btn.btn-lg, body.d4 .save-btn, body.d4 .form-btn,
body.d4 .shipment_tablebtn, body.d4 .btn-contact, body.d4 button.swal2-confirm, body.d4 .sweet-alert button.confirm, body.d4 .btn-right a, body.d4 .btn-right button, body.d4 .in-button a, body.d4 .invi-btn a, body.d4 .ln-cta a {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 40px; height: auto !important; width: auto !important;
  padding: 0 18px !important; border-radius: 999px !important; border: 1px solid transparent !important;
  font-family: Roboto, sans-serif !important; font-weight: 900 !important; font-size: 13.5px !important; letter-spacing: 0 !important; line-height: 1 !important; text-transform: none !important;
  background: var(--d4-navy) !important; color: #fff !important; box-shadow: none !important; transition: background .15s, color .15s, border-color .15s;
}
body.d4 .light_bluebtn { background: var(--d4-blue) !important; }
body.d4 .light_bluebtn:hover, body.d4 .btn-primary:hover, body.d4 .save-btn:hover { background: #0e2d4c !important; color: #fff !important; }
body.d4 .bluebtn_outline, body.d4 .btn-sky, body.d4 .shipment_tablebtn { background: #fff !important; color: var(--d4-navy) !important; border-color: var(--d4-line) !important; }
body.d4 .bluebtn_outline:hover, body.d4 .btn-sky:hover, body.d4 .shipment_tablebtn:hover { border-color: var(--d4-navy) !important; color: var(--d4-navy) !important; background: #fff !important; }
body.d4 .btn-danger, body.d4 button.swal2-cancel, body.d4 .sweet-alert button.cancel { border-radius: 999px !important; font-weight: 900 !important; }
body.d4 .btn-right { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Tables */
body.d4 .sales_leadtablemain, body.d4 .table-responsive { background: transparent; }
body.d4 .sales_leadtable { border-collapse: collapse; width: 100%; }
body.d4 .sales_leadtable th { background: transparent !important; color: var(--d4-muted) !important; font-size: 11px !important; font-weight: 950 !important; letter-spacing: .12em !important; text-transform: uppercase !important; padding: 10px 12px !important; border: 0 !important; border-bottom: 1px solid var(--d4-line) !important; border-radius: 0 !important; }
body.d4 .sales_leadtable th:first-child { padding-left: 12px !important; }
body.d4 .sales_leadtable td { color: var(--d4-text) !important; font-size: 14px !important; padding: 12px 12px !important; border: 0 !important; border-bottom: 1px solid var(--d4-line-soft) !important; }
body.d4 .sales_leadtable td:first-child { font-weight: 900; color: var(--d4-navy) !important; }
body.d4 .sales_leadtable tr.tr_red td { color: var(--d4-red) !important; }
body.d4 .sales_leadtable tbody tr:hover td { background: var(--d4-soft); }
body.d4 .in-status, body.d4 .invo-tag { border-radius: 999px !important; height: auto !important; width: auto !important; padding: 4px 10px !important; font-size: 11px !important; font-weight: 900 !important; letter-spacing: .06em !important; line-height: 1.4 !important; background: var(--d4-line-soft) !important; color: var(--d4-text) !important; border: 0 !important; }
body.d4 .in-status.paid { background: var(--d4-green-soft) !important; color: var(--d4-green) !important; }
body.d4 .in-status.pending { background: var(--d4-yellow-soft) !important; color: #9a6200 !important; }
body.d4 .in-status.overdue, body.d4 .in-status.reported, body.d4 .payment-monitor .in-status.pending { background: var(--d4-red-soft) !important; color: var(--d4-red) !important; }

/* DataTables shell */
body.d4 .dataTables_wrapper { padding: 16px 18px 18px; }
body.d4 .dataTables_length label, body.d4 .dataTables_filter label, body.d4 .dataTables_info { color: var(--d4-muted); font-size: 13px; font-weight: 700; }
body.d4 .dataTables_wrapper .pagination { display: flex; gap: 6px; justify-content: flex-end; }
body.d4 .dataTables_wrapper .paginate_button a, body.d4 .dataTables_wrapper .paginate_button span, body.d4 .new-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--d4-line); background: #fff; color: var(--d4-navy) !important; font-weight: 800; font-size: 13px; }
body.d4 .dataTables_wrapper .paginate_button.active a, body.d4 .dataTables_wrapper .paginate_button.active span, body.d4 .new-pagination .page-numbers.current { background: var(--d4-navy); border-color: var(--d4-navy); color: #fff !important; }
body.d4 .new-pagination { gap: 6px; }
body.d4 .new-pagination .page-numbers::after, body.d4 .new-pagination .page-numbers::before { content: none !important; }
body.d4 .my-pagination p { color: var(--d4-muted); font-weight: 700; }

/* Forms — every text control, whatever legacy class it carries */
body.d4 input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not(.d4-pill), body.d4 select, body.d4 textarea {
  min-height: 42px; border: 1px solid var(--d4-line) !important; border-radius: var(--d4-radius-sm) !important; background: #fff !important; color: var(--d4-ink) !important;
  font-family: Roboto, sans-serif !important; font-size: 14px !important; padding: 8px 14px !important; box-shadow: none !important;
}
body.d4 input:not([type="checkbox"]):not([type="radio"]):focus, body.d4 select:focus, body.d4 textarea:focus { border-color: var(--d4-blue) !important; box-shadow: 0 0 0 3px var(--d4-blue-soft) !important; outline: 0; }
body.d4 input::placeholder, body.d4 textarea::placeholder { color: #98a2b3; }
body.d4 input[type="search"] { padding-left: 38px !important; }
/* A search box with an icon laid over its left edge (directory, vendors, payment monitor, act-as) */
body.d4 .banner_textbox:has(> svg) input, body.d4 .banner_textbox:has(> img) input, body.d4 .dt-input, body.d4 .dataTables_filter input, body.d4 .vuetable-filter input, body.d4 .act-as-box input.form-control { padding-left: 40px !important; }
body.d4 .banner_textbox > svg { left: 14px; }
body.d4 .search-input { position: relative; }
body.d4 .search-input input { padding-left: 40px !important; }
body.d4 .search-input > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--d4-muted); }
body.d4 .form-control, body.d4 .banner_textbox input, body.d4 .banner_textbox textarea, body.d4 .banner_select select, body.d4 .banner_textbox select, body.d4 select.form-select, body.d4 input.form-control, body.d4 textarea.form-control {
  min-height: 42px; border: 1px solid var(--d4-line) !important; border-radius: var(--d4-radius-sm) !important; background: #fff !important; color: var(--d4-ink) !important;
  font-family: Roboto, sans-serif !important; font-size: 14px !important; padding: 8px 14px !important; box-shadow: none !important; transition: border-color .15s, box-shadow .15s;
}
body.d4 .form-control:focus, body.d4 .banner_textbox input:focus, body.d4 .banner_textbox textarea:focus, body.d4 .banner_select select:focus { border-color: var(--d4-blue) !important; box-shadow: 0 0 0 3px var(--d4-blue-soft) !important; outline: 0; }
body.d4 .form-control.is-invalid, body.d4 .banner_textbox input.is-invalid { border-color: var(--d4-red) !important; }
body.d4 .form-label, body.d4 .shipment-lable, body.d4 .account_label, body.d4 .label_css, body.d4 label.css-label, body.d4 .banner_textbox label, body.d4 .banner_select label { color: var(--d4-navy) !important; font-size: 12.5px !important; font-weight: 800 !important; letter-spacing: 0; text-transform: none; }
body.d4 .field-error, body.d4 .errormsg, body.d4 .error_msg, body.d4 .form-error { color: var(--d4-red); font-size: 12.5px; font-weight: 700; }
body.d4 .alert { border-radius: 12px; border: 1px solid var(--d4-line); font-weight: 600; }
body.d4 .alert-danger { background: var(--d4-red-soft); color: var(--d4-red); border-color: #f3c2c2; }

/* Latest news rail on inner pages */
body.d4 .latest-news-fix { padding: 18px 18px 20px !important; position: sticky; top: calc(var(--d4-header-h) + 16px); }
body.d4 .latest-news-item { padding: 12px 0; border-bottom: 1px solid var(--d4-line-soft); }
body.d4 .latest-news-item > a { font-weight: 900; color: var(--d4-navy); font-size: 14px; line-height: 1.35; display: block; }
body.d4 .latest-news-item .ln-footer { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
body.d4 .latest-news-item .ln-footer img { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; border: 1px solid var(--d4-line-soft); }
body.d4 .latest-news-item .ln-footer p { margin: 0; font-size: 12px; color: var(--d4-muted); font-weight: 700; }
body.d4 .latest-news-item .ln-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
body.d4 .ln-cta { margin-top: 14px; }

/* Variant b: on inner pages the news column leaves the side and becomes a strip under the content */
body.d4.d4-b .latest-news-row { display: block !important; }
body.d4.d4-b .latest-news-row > .latest-news-row__page, body.d4.d4-b .latest-news-row > .latest-news-row__news { width: 100% !important; max-width: none !important; flex: none !important; }
body.d4.d4-b .latest-news-row__news .latest-news-fix { position: static; height: auto !important; overflow: visible; margin-top: 12px; }
body.d4.d4-b .latest-news-row__news .latest-all-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
body.d4.d4-b .latest-news-row__news .latest-news-item { border: 1px solid var(--d4-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column-reverse; }
body.d4.d4-b .latest-news-row__news .ln-cta { grid-column: 1 / -1; }

/* Variant c: content is centred; inner pages keep the side rail but narrower */
body.d4.d4-c .latest-news-row__news .latest-news-fix { top: calc(var(--d4-header-h) + 70px); }

/* Members / vendors directory cards */
body.d4 .member-list-main .me-content .title-with-badge a, body.d4 .member-list-main .me-content h4, body.d4 .member-list-main .me-content h5 { color: var(--d4-navy) !important; font-weight: 900; }
body.d4 .network-badge { border-radius: 999px; font-weight: 900; font-size: 11px; letter-spacing: .05em; }
body.d4 .office-filter-menu, body.d4 .filters, body.d4 .member-filters { background: #fff; border: 1px solid var(--d4-line); border-radius: var(--d4-radius); box-shadow: var(--d4-shadow); padding: 16px 18px; }

/* Modals, SweetAlerts, tabs */
body.d4 .modal-content { border-radius: var(--d4-radius); border: 1px solid var(--d4-line); box-shadow: 0 30px 80px rgba(12, 36, 61, .25); }
body.d4 .modal-header { border-bottom: 1px solid var(--d4-line-soft); }
body.d4 .modal-header .m-title, body.d4 .modal-title { color: var(--d4-navy); font-weight: 900; }
body.d4 .swal2-popup, body.d4 .sweet-alert { border-radius: var(--d4-radius) !important; font-family: Roboto, sans-serif !important; }
body.d4 .nav-tabs .nav-link, body.d4 .tab { border-radius: 999px; font-weight: 800; color: var(--d4-text); }
body.d4 .nav-tabs .nav-link.active, body.d4 .tab.active { background: var(--d4-navy); color: #fff; border-color: var(--d4-navy); }

/* Skeletons stay in the family */
body.d4 .skeleton-box { border-radius: 12px; }

/* Login pages (layouts/auth.vue keeps its markup) */
body.d4 .login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.d4 .login .auth-content { max-width: 440px; margin: 0 auto; padding: 56px 24px; }
body.d4 .login .auth-banner { background: linear-gradient(160deg, var(--d4-navy) 0%, var(--d4-blue) 100%); color: #fff; display: flex; align-items: center; justify-content: center; }
body.d4 .login .auth-banner .auth-content { background: transparent; }
body.d4 .login .auth-banner .subtitle2, body.d4 .login .auth-banner p { color: #fff; }
body.d4 .login .network-box img { width: 150px; background: #fff; border-radius: 12px; padding: 10px; }
body.d4 .login h1, body.d4 .login h2, body.d4 .login h3 { color: var(--d4-navy); font-weight: 900; }
body.d4 .login .copyright { color: var(--d4-muted); font-size: 12.5px; margin-top: 32px; }
body.d4 .login .copyright a { color: var(--d4-blue); font-weight: 700; }
body.d4 .login input.form-control { min-height: 46px; }
body.d4 .login button[type="submit"], body.d4 .login .light_bluebtn, body.d4 .login .btn-primary { width: 100% !important; min-height: 46px; }
@media (max-width: 900px) { body.d4 .login { grid-template-columns: minmax(0, 1fr); } body.d4 .login .auth-banner { display: none; } }

/* ── Inner pages, second pass (compared against design 4's system, 2026-09-14) ─────────────────────
   The ported theme colours everything from its own variables; pointing them at design 4's tokens recolours the
   legacy buttons, links and accents in one go. The blocks below are the ones that hard-code the old navy or the
   old light blue. */
body.d4 {
  --ureg-primary-color: #12385f; --ureg-primary-rgb: 18, 56, 95;
  --ureg-secondary-color: #2287c9; --ureg-secondary-rgb: 34, 135, 201;
  --ureg-button-bg-idle: #12385f; --ureg-button-bg-rgb-idle: 18, 56, 95;
  --ureg-button-border-idle: #12385f; --ureg-button-border-rgb-idle: 18, 56, 95;
  --ureg-button-border-hover: #12385f; --ureg-button-border-rgb-hover: 18, 56, 95;
  --ureg-button-color-hover: #12385f; --ureg-button-color-rgb-hover: 18, 56, 95;
  --ureg-header-font-color: #12385f; --ureg-header-rgb: 18, 56, 95;
  --ureg-content-color: #25364a; --ureg-content-rgb: 37, 54, 74;
  --ureg-quaternary-color: #667085; --ureg-quaternary-rgb: 102, 112, 133;
}

/* Page header: the breadcrumb is the eyebrow ABOVE the title, as every design 4 section is headed */
body.d4 .page-header_content { display: flex !important; flex-direction: column-reverse !important; align-items: flex-start !important; justify-content: flex-start !important; gap: 6px; }
body.d4 .page-header_breadcrumbs { margin: 0 !important; }

/* Cards that kept the theme's 5px corner */
body.d4 .download-item, body.d4 .news-main, body.d4 .contact-box, body.d4 .find-offices, body.d4 .calendar-stage, body.d4 .fc-scrollgrid, body.d4 .account-card, body.d4 .shipment_popupcontent, body.d4 .act-as-box {
  border-radius: var(--d4-radius) !important; border: 1px solid var(--d4-line); box-shadow: var(--d4-shadow) !important;
}
body.d4 .news-main { overflow: hidden; }
body.d4 .news-main .card-title, body.d4 .news-main .title { color: var(--d4-navy); font-weight: 900; }
body.d4 .download-item { background: #fff; }

/* Contact cards on a company profile: the header band takes the design's navy */
body.d4 .cb-header { background: var(--d4-navy) !important; border-radius: var(--d4-radius) var(--d4-radius) 0 0; }
body.d4 .add-contact-box { background: var(--d4-soft) !important; border: 1px dashed var(--d4-line) !important; box-shadow: none !important; display: flex; align-items: center; justify-content: center; }

/* Light-blue strips → the design's soft blue */
body.d4 .attended-meetings, body.d4 .next-meeting-banner, body.d4 .member-branches, body.d4 .country-notice { background: var(--d4-blue-soft) !important; border-radius: 12px !important; box-shadow: none !important; }
body.d4 .attended-meetings h4 { color: var(--d4-navy); }
body.d4 .departed-members-link a { border-radius: 999px !important; border: 1px solid var(--d4-line); background: #fff !important; color: var(--d4-navy) !important; font-weight: 900; overflow: hidden; }
body.d4 .departed-members-link a span { background: transparent !important; }

/* "Follow us" box → the design's navy tile */
body.d4 .social-box { background: var(--d4-navy) !important; color: #fff; border-radius: var(--d4-radius) !important; box-shadow: var(--d4-shadow) !important; }
body.d4 .social-box p, body.d4 .social-box h3, body.d4 .social-box h4, body.d4 .social-box span { color: #fff !important; }
body.d4 .social-box a { background: rgba(255, 255, 255, .12) !important; border-color: rgba(255, 255, 255, .3) !important; color: #fff !important; }
body.d4 .social-box a svg, body.d4 .social-box a i { color: #fff !important; fill: #fff !important; }

/* Network badges and member links on the directory */
body.d4 .network-badge.pangea { background: var(--d4-blue) !important; border-color: var(--d4-blue) !important; color: #fff !important; }
body.d4 .network-badge.connecta { background: var(--d4-yellow) !important; border-color: var(--d4-yellow) !important; color: var(--d4-ink) !important; }
body.d4 .member-website { color: var(--d4-muted) !important; }

/* Holiday Calendar page (FullCalendar): the navy toolbar band becomes a white card header, the day names an eyebrow row */
body.d4 .calendar-stage { background: #fff; padding: 8px 18px 18px; overflow: hidden; }
body.d4 .fc-header-toolbar { background: transparent !important; height: auto !important; padding: 14px 4px !important; margin-bottom: 8px !important; border-bottom: 1px solid var(--d4-line); border-radius: 0 !important; }
body.d4 .fc .fc-toolbar-title { color: var(--d4-navy) !important; font: 900 20px Roboto, sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; }
body.d4 .fc .fc-button { background: var(--d4-soft) !important; border: 0 !important; color: var(--d4-navy) !important; width: 34px; height: 34px; border-radius: 999px !important; padding: 0 !important; box-shadow: none !important; }
body.d4 .fc .fc-button:hover { background: var(--d4-blue-soft) !important; }
body.d4 .fc .fc-col-header-cell { background: transparent !important; }
body.d4 .fc .fc-col-header-cell-cushion { color: var(--d4-muted) !important; font: 950 11px Roboto, sans-serif !important; letter-spacing: .12em !important; text-transform: uppercase !important; padding: 10px 0 !important; }
body.d4 .fc-theme-standard td, body.d4 .fc-theme-standard th, body.d4 .fc-theme-standard .fc-scrollgrid { border-color: var(--d4-line-soft) !important; }
body.d4 .fc-scrollgrid { border-radius: 12px !important; overflow: hidden; box-shadow: none !important; border: 1px solid var(--d4-line-soft) !important; }
body.d4 .fc .fc-daygrid-day-number { color: var(--d4-navy) !important; font-weight: 800 !important; font-size: 13px !important; }
body.d4 .fc .fc-day-today { background: var(--d4-blue-soft) !important; }
body.d4 .fc .fc-daygrid-day.fc-day-other .fc-daygrid-day-number { color: #b8c3cf !important; }

/* Forms: the shipment form's wide submit and the theme's remaining square buttons */
body.d4 .light_blue.btn, body.d4 .btn.btn-wide, body.d4 input[type="submit"].btn, body.d4 button.btn:not(.btn-link) {
  display: inline-flex !important; align-items: center; justify-content: center; min-height: 42px; height: auto !important; padding: 0 22px !important;
  border-radius: 999px !important; border: 1px solid transparent !important; background: var(--d4-navy) !important; color: #fff !important;
  font: 900 13.5px Roboto, sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; box-shadow: none !important;
}
body.d4 .btn.btn-danger, body.d4 button.btn.btn-danger { background: var(--d4-red) !important; }
body.d4 .btn-link { color: var(--d4-blue) !important; font-weight: 800; }

/* Checkboxes and radios in the theme's forms */
body.d4 .css-checkbox + .css-label::before, body.d4 .cb1 + label::before { border-radius: 6px; border-color: var(--d4-line); }
body.d4 .fc .fc-col-header, body.d4 .fc-col-header th, body.d4 .fc .fc-scrollgrid-section-header > *, body.d4 .fc .fc-scrollgrid-section-header table { background: transparent !important; border-radius: 0 !important; }
body.d4 .fc .fc-col-header-cell { border-bottom: 1px solid var(--d4-line) !important; }
body.d4 .social-box a { background: rgba(255, 255, 255, .18) !important; }
body.d4 .fc thead, body.d4 .fc-scrollgrid-section-header, body.d4 .fc-scrollgrid-section-header > th { background: transparent !important; }
body.d4 .dataTables_wrapper .paginate_button.active a, body.d4 .dataTables_wrapper .paginate_button.active span { background: var(--d4-navy) !important; border-color: var(--d4-navy) !important; color: #fff !important; }
