/* ==========================================================================
   STBE → Systrix Meridian · Login page (/login, body.loginbg.login_b2b)
   Session 1 · 29 Oct 2026 · v3.4 (7 Nov: SSO Workspace step, Type select, D-411) · v3.3 (2 Nov: keyboard focus ring on Next, Log in, Forgot password, D-201) · v3.2 (31 Oct: hero height, no white band under the trust strip, Next button, Admin login 12b) · Reviewed on sample2.gofiro.com and stbedev10.gofiro.com
   v3.1 (30 Oct): "Workspace" no longer uppercased by style.css
   Audience: B2B agents and corporate travellers signing in to STBE.

   SCOPE OF THIS EXERCISE
   - No label (wording) changes and no layout changes: same sections, same
     order, same positions. Only colour, type, shape, spacing and images.
   - Al Ghazi brand (logo, photos, blue) replaced by Systrix Meridian.

   PREREQUISITES (this file does nothing useful without them)
   1. meridian.css (+ its fonts/ folder) is loaded in the DEFAULT CSS group,
      before customize.css and before any client group.
   2. <html lang="en" dir="ltr" data-theme="day"> in the login layout.
      Without data-theme="day" Meridian renders its Night tokens.
   3. This file loads LAST in the default group (after customize.css).
   4. The new images replace the old files at the same paths (see
      images/README in the delivery folder).

   RULES FOLLOWED
   - Semantic tokens only (no hex). Literal px only where Meridian has no
     token: type sizes (copied from the type style named in each comment),
     the logo height and the label line in the icon offset.
   - Logical properties (margin-inline-*, inset-inline-*) so Arabic mirrors.
   - Selectors are prefixed with body.loginbg so they outrank the client
     <style> blocks inside .login_cnt without !important.
   - Every !important here beats an existing !important or an inline style:
     Bootstrap .shadow (D-02), customize.css .loginbg .large (D-03),
     .errormsg (D-04), invalid-input rules (D-28), .button/.gray-small
     (D-29), .ui-dialog border and content padding (D-30), the inline
     margin on "Or" (V-12) and jQuery UI's inline size on phones. Remove
     each one once the legacy rule is cleaned up (see stbe/review-log.md).
   ========================================================================== */


/* ---------- 1. Page type and colour ------------------------------------- */

body.loginbg {
  font-family: var(--font-sans);                 /* Archivo, was Plus Jakarta Sans (never loaded) */
  color: var(--ink);
  background: var(--bg);
}
body.loginbg .login_cnt :is(input, button, select, textarea) {
  font-family: inherit;
}


/* ---------- 2. Header: Systrix | STBE logo + 24/7 Support ---------------- */

body.loginbg .site-header {
  background: var(--bg);                         /* SiteHeader matches the Day band below it */
  border-bottom: 1px solid var(--line);
  z-index: var(--layer-sticky);
}
body.loginbg .site-header .header-inner { gap: var(--space-3); }
body.loginbg .site-header .Logo { flex: 0 1 auto; min-width: 0; }
/* logo.png is now the Systrix | STBE lockup (594 × 100, shown at 40px high) */
body.loginbg .site-header .Logo img {
  display: block;
  width: auto;
  height: 40px;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}
[dir="rtl"] body.loginbg .site-header .Logo img { object-position: right center; }

/* "24/7 Support" → Meridian secondary Button (capsule, outlined, ink text) */
body.loginbg .site-header .contact-btn {
  flex: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--control-md);
  padding-block: 0;
  padding-inline: var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink);
  font-size: 14px; line-height: 20px; font-weight: 550; letter-spacing: .005em;   /* label */
  cursor: pointer;
  transition: background-color var(--duration-instant) var(--ease-cruise),
              transform var(--duration-quick) var(--ease-glide);
}
body.loginbg .site-header .contact-btn:hover { background: var(--surface-sunken); }
body.loginbg .site-header .contact-btn:active { transform: scale(.97); }
body.loginbg .site-header .contact-btn svg {
  width: var(--icon-md);
  height: var(--icon-md);
  stroke-width: 1.75;                            /* Meridian icon stroke */
}


/* ---------- 3. Hero ------------------------------------------------------ */

/* loginbg.jpg is now the Day route map (sand + plus grid, routes from DXB) */
body.loginbg .login_cnt .hero { background-color: var(--bg); }

/* Hero height (D-179). The page sets the hero to 80vh inline, so on a
   1080px-tall screen it was ~860px with large empty bands above and below
   the card. loginbg.jpg (1920x1080, cover) scales with the window WIDTH, so
   the height follows the width instead: the route map is never cropped and
   the empty bands stay small. 440px floor fits the card (287px) with room. */
@media (min-width: 600px) {
  body.loginbg .login_cnt .hero .container { height: clamp(440px, 30vw, 720px); }
}

/* White band under the trust strip (D-180). The strip floats 46px into the
   hero; the rest of its row showed the page canvas, which was white because
   the page's inline style removes the body background with !important.
   The canvas takes the html background instead. */
html:has(> body.loginbg:not(.login_admin)) { background-color: var(--bg); }

/* Decorative blue corner (form_corner.svg) is not part of Meridian */
body.loginbg .login-box::before { display: none; }


/* ---------- 4. Sign-in card (compact density) ---------------------------- */

/* The card is .login-box (its size and position are unchanged). Its inner
   Bootstrap column (.col-md-4.login) was squeezing the form to 33% (149px). */
body.loginbg .login_cnt .login-box {
  --sx-field-h: var(--control-md);               /* 40px fields and buttons: web-app compact density */
  padding: var(--space-6);
  box-sizing: border-box;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg) !important;       /* beats Bootstrap .shadow (!important) — D-02 */
}

body.loginbg .login_cnt #login,
body.loginbg .login_cnt #login .login {
  width: 100%;
  max-width: none;
  flex: none;
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  color: var(--ink);
  backdrop-filter: none;
}

/* "Workspace" → card title, heading-md */
body.loginbg .login_cnt .workspace-text {
  margin: 0 0 var(--space-4);
  text-align: start;
  text-transform: none;                          /* style.css .workspace-text { uppercase } */
  color: var(--ink);
  font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.005em;   /* heading-md */
}

/* Fields: floating label → Meridian TextField (label above the box) */
body.loginbg .login_cnt .login-input {
  position: relative;
  float: none;
  width: 100%;
  margin: 0 0 var(--space-4);
  padding: 0;
}
body.loginbg .login_cnt .login-input .form-floating {
  display: grid;
  gap: var(--space-1);
}
body.loginbg .login_cnt .login-input .login-label {
  order: -1;                                     /* label sits above the input */
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  transform: none;
  opacity: 1;
  color: var(--ink);
  font-size: 14px; line-height: 20px; font-weight: 550; letter-spacing: .005em;   /* label */
  pointer-events: auto;
}
body.loginbg .login_cnt .login-input .login-label::after { display: none; }   /* Bootstrap 5 floating-label backdrop */

body.loginbg .login_cnt .login-box .login-input input.form-control {
  height: var(--sx-field-h);
  min-height: 0;
  margin: 0;
  padding-block: 0;
  padding-inline: calc(var(--space-3) + var(--icon-md) + var(--space-2)) var(--space-3);
  box-sizing: border-box;
  background: var(--surface) !important;        /* beats customize.css ".loginbg .large { background: #f1f1f1 !important }" — D-03 */
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: none;
  font-size: 16px; line-height: 24px; font-weight: 400;      /* body; 16px also stops iOS zoom-on-focus */
  transition: border-color var(--duration-instant) var(--ease-cruise),
              box-shadow var(--duration-instant) var(--ease-cruise);
}
body.loginbg .login_cnt .login-box .login-input input.form-control::placeholder { color: transparent; }  /* label already says it */
body.loginbg .login_cnt .login-box .login-input input.form-control:focus {
  outline: 0;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 1px var(--focus-ring);
}
/* Browser autofill keeps the surface colour instead of yellow/blue */
body.loginbg .login_cnt .login-box .login-input input.form-control:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 100px var(--surface) inset;
}

/* Field icons: PNGs → Meridian line icons (user, lock), coloured by token.
   customize.css paints the PNG on ::after with background !important, so the
   PNG pseudo is switched off and the Meridian icon is drawn on ::before. */
body.loginbg .login_cnt .login-input::after { display: none; }
body.loginbg .login_cnt .login-input::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(20px + var(--space-1) + (var(--sx-field-h) - var(--icon-md)) / 2);    /* label line + gap + centre of box */
  inset-inline-start: var(--space-3);
  width: var(--icon-md);
  height: var(--icon-md);
  margin: 0;
  background: var(--ink-muted);
  pointer-events: none;
  -webkit-mask: var(--sx-login-icon) center / contain no-repeat;
          mask: var(--sx-login-icon) center / contain no-repeat;
}
body.loginbg .login_cnt .username_l {
  --sx-login-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.5' r='4'/%3E%3Cpath d='M4.5 20.5c1.2-3.6 4.2-5.5 7.5-5.5s6.3 1.9 7.5 5.5'/%3E%3C/svg%3E");
}
body.loginbg .login_cnt .password_l {
  --sx-login-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
}
body.loginbg .login_cnt .login-input:focus-within::before { background: var(--ink); }

/* D-411 (Session 8, stbedev10): the SSO step ("Workspace", Type select
   #SSORedirectType). The field icon rule above drew a solid dark square
   (no --sx-login-icon on this field, so the mask was empty); the field is
   itself .form-floating, so the label-above grid missed it and "Type" sat
   under the select; the select kept customize.css's #F1F1F1 fill (.large
   !important), 46px, no chevron → no icon on fields without one; label
   above (14px 550, 4px gap) as on User name / Password; the select a
   Meridian Select at the field height with the Meridian chevron. */
body.loginbg .login_cnt .login-input:not(.username_l, .password_l)::before { content: none; display: none; }
body.loginbg .login_cnt .login-input.form-floating { display: grid; gap: var(--space-1); }
body.loginbg .login_cnt .login-input.form-floating > .login-label { grid-row: 1; }
body.loginbg .login_cnt .login-box .login-input select.form-select {
  height: var(--sx-field-h, var(--control-lg));
  min-height: 0;
  margin: 0;
  padding: 0 calc(var(--space-3) + var(--icon-sm) + var(--space-2)) 0 var(--space-3);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23595E66' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right var(--space-3) center / var(--icon-sm) !important;   /* customize.css .large: #F1F1F1 !important; chevron stroke = ink-muted */
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  font-size: 16px; line-height: 24px; font-weight: 400;
  transition: border-color var(--duration-instant) var(--ease-cruise), box-shadow var(--duration-instant) var(--ease-cruise);
}
[dir="rtl"] body.loginbg .login_cnt .login-box .login-input select.form-select { background-position: left var(--space-3) center !important; padding: 0 var(--space-3) 0 calc(var(--space-3) + var(--icon-sm) + var(--space-2)); }
body.loginbg .login_cnt .login-box .login-input select.form-select:hover { border-color: var(--ink-muted); }
body.loginbg .login_cnt .login-box .login-input select.form-select:focus { outline: 0; border-color: var(--focus-ring); box-shadow: 0 0 0 1px var(--focus-ring); }

/* Validation (jQuery unobtrusive classes) → Meridian field error */
body.loginbg .login_cnt .login-input .field-validation-valid { display: none; }   /* empty message slot takes no row */
body.loginbg .login_cnt .login-box .login-input input.input-validation-error { border-color: var(--danger); }
body.loginbg .login_cnt .login-box .login-input input.input-validation-error:focus { box-shadow: 0 0 0 1px var(--danger); }
body.loginbg .login_cnt .login-input .field-validation-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--danger);
  font-size: 14px; line-height: 20px; font-weight: 400;      /* body-sm */
}
body.loginbg .login_cnt .login-input .field-validation-error::before {
  content: "";
  flex: none;
  width: var(--icon-sm);
  height: var(--icon-sm);
  background: currentColor;
  -webkit-mask: var(--sx-icon-danger) center / contain no-repeat;
          mask: var(--sx-icon-danger) center / contain no-repeat;
}
body.loginbg .login_cnt {
  --sx-icon-danger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.75'/%3E%3Cpath d='M9.25 9.25l5.5 5.5M14.75 9.25l-5.5 5.5'/%3E%3C/svg%3E");
}

/* Server error box (#dvError) → Meridian Alert, danger tone (stays where it is in the markup) */
body.loginbg .login_cnt #dvError.errormsg {
  position: relative;
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  padding-inline-start: calc(var(--space-4) + var(--icon-md) + var(--space-3));
  background-color: var(--danger-soft) !important;   /* customize.css ".errormsg" uses !important on both — D-04 */
  color: var(--ink) !important;
  border: 0;
  border-radius: var(--radius-md);
  text-align: start;
  font-size: 14px; line-height: 20px; font-weight: 400;      /* body-sm */
}
body.loginbg .login_cnt #dvError.errormsg::before {
  content: "";
  position: absolute;
  top: var(--space-3);
  inset-inline-start: var(--space-4);
  width: var(--icon-md);
  height: var(--icon-md);
  background: var(--danger);
  -webkit-mask: var(--sx-icon-danger) center / contain no-repeat;
          mask: var(--sx-icon-danger) center / contain no-repeat;
}

/* "Forgot your password?" → text link in brand-text, end-aligned */
body.loginbg .login_cnt #dvforgotpasswordbtn {
  display: flex;
  justify-content: flex-end;
  float: none;
  width: 100%;
  margin: calc(var(--space-1) - var(--space-4)) 0 var(--space-4);   /* tucked under the password field */
  padding: 0;
}
body.loginbg .login_cnt #dvforgotpasswordbtn a {
  display: inline-flex;
  align-items: center;
  float: none;
  width: auto;
  height: auto;
  min-height: 24px;                              /* WCAG 2.2 target minimum */
  color: var(--brand-text);
  text-decoration: none;
  font-size: 14px; line-height: 20px; font-weight: 550; letter-spacing: .005em;   /* label */
  border-radius: var(--radius-xs);
}
body.loginbg .login_cnt #dvforgotpasswordbtn a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Primary action: "Log in" → Meridian primary Button, full width */
body.loginbg .login_cnt #dvloginbtn {
  float: none;
  width: 100%;
  margin: 0 0 var(--space-2);
  padding: 0;
}
body.loginbg .login_cnt .login-box #loginSubmit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--sx-field-h);
  margin: 0;
  padding-block: 0;
  padding-inline: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--on-brand);
  font-size: 14px; line-height: 20px; font-weight: 550; letter-spacing: .005em;   /* label */
  cursor: pointer;
  transition: background-color var(--duration-instant) var(--ease-cruise),
              transform var(--duration-quick) var(--ease-glide);
}
body.loginbg .login_cnt .login-box #loginSubmit:hover { background: var(--brand-hover); }
body.loginbg .login_cnt .login-box #loginSubmit:active { background: var(--brand-pressed); transform: scale(.97); }

/* Two-step login (stbedev10): step 1 "Next" (#VerifyUserName) is the step's
   one primary action → same Meridian primary as Sign in. It was the legacy
   navy (--main-bg-color), 50px tall, 10px corners, with a 15px gap from the
   page's inline ".login-box input" rule. D-181 */
body.loginbg .login_cnt #dvVerifyUserName {
  float: none;
  width: 100%;
  margin: 0 0 var(--space-2);
  padding: 0;
}
body.loginbg .login_cnt .login-box input#VerifyUserName {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--sx-field-h);
  margin: 0;
  padding-block: 0;
  padding-inline: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: none;
  font-family: var(--font-sans);
  font-size: 14px; line-height: 20px; font-weight: 550; letter-spacing: .005em;   /* label */
  cursor: pointer;
  transition: background-color var(--duration-instant) var(--ease-cruise),
              transform var(--duration-quick) var(--ease-glide);
}
body.loginbg .login_cnt .login-box input#VerifyUserName:hover { background: var(--brand-hover); }
body.loginbg .login_cnt .login-box input#VerifyUserName:active { background: var(--brand-pressed); transform: scale(.97); }
body.loginbg .login_cnt .login-box :is(input#VerifyUserName, #loginSubmit):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
/* customize.css sets every input and .form-control to 15px / --common-font with !important */
body.loginbg .login_cnt .login-box :is(input#VerifyUserName, #loginSubmit) { font-family: var(--font-sans) !important; font-size: 14px !important; }
body.loginbg .login_cnt .login-box input#VerifyUserName:disabled { background: var(--surface-sunken); color: var(--ink-muted); cursor: not-allowed; transform: none; }

/* "Register" → Meridian secondary Button, full width (one magenta action per view) */
body.loginbg .login_cnt #dvRegister {
  float: none;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
body.loginbg .login_cnt #dvRegister .b2bregister-button-orange {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--sx-field-h);
  padding-inline: var(--space-4);
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px; line-height: 20px; font-weight: 550; letter-spacing: .005em;   /* label */
  transition: background-color var(--duration-instant) var(--ease-cruise),
              transform var(--duration-quick) var(--ease-glide);
}
body.loginbg .login_cnt #dvRegister .b2bregister-button-orange:hover { background: var(--surface-sunken); }
body.loginbg .login_cnt #dvRegister .b2bregister-button-orange:active { transform: scale(.97); }


/* ---------- 5. Focus: one visible 2px Aero ring everywhere --------------- */

body.loginbg .site-header .contact-btn:focus-visible,
body.loginbg .login_cnt #loginSubmit:focus-visible,
body.loginbg .login_cnt #dvRegister a:focus-visible,
body.loginbg .login_cnt #dvforgotpasswordbtn a:focus-visible,
body.loginbg .site-footer a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: none;
}


/* ---------- 6. Trust strip (Since 2007 · IATA · 4 locations · …) -------- */

body.loginbg .trust-strip-card {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);                  /* raised over the hero */
  padding: var(--space-6);
}
body.loginbg .trust-metric-icon {
  width: var(--control-lg);
  height: var(--control-lg);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);             /* neutral: magenta stays on the one primary action */
  color: var(--ink);
  font-family: var(--font-mono);                 /* "IATA" is a code → data-sm */
  font-size: 12px; line-height: 16px; font-weight: 450; letter-spacing: .01em;
}
body.loginbg .trust-metric-icon svg {
  width: var(--icon-lg);
  height: var(--icon-lg);
  stroke-width: 1.75;
}
body.loginbg .trust-metric-title {
  color: var(--ink);
  font-size: 16px; line-height: 22px; font-weight: 600;     /* heading-sm */
}
body.loginbg .trust-metric-desc {
  color: var(--ink-muted);
  font-size: 14px; line-height: 20px; font-weight: 400;     /* body-sm */
}


/* ---------- 7. Section headers (services, testimonials, locations) ------- */

/* Pages sit on bg; the middle band takes the sand tone */
body.loginbg .services-section,
body.loginbg .locations-section { background: var(--bg); }
body.loginbg .testimonials-section { background: var(--surface-sunken); }

/* Kicker "OUR SERVICES" → eyebrow in ink-muted (was blue) */
body.loginbg .login_cnt .section-kicker {
  color: var(--ink-muted);
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em;   /* eyebrow */
  text-transform: uppercase;
}
/* Kicker bar → a short route: line-strong line landing on a magenta node */
body.loginbg .login_cnt .section-kicker-bar {
  position: relative;
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}
body.loginbg .login_cnt .section-kicker-bar::after {
  content: "";
  position: absolute;
  top: -3px;
  inset-inline-end: -4px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--brand);
}
/* Section titles: heading-xl in ink; the blue highlighted words become ink */
body.loginbg .login_cnt .section-title {
  color: var(--ink);
  font-size: 32px; line-height: 38px; font-weight: 650; letter-spacing: -.015em;   /* heading-xl */
}
body.loginbg .login_cnt .section-title .text-blue { color: inherit; }
body.loginbg .login_cnt .section-subtitle {
  color: var(--ink-muted);
  font-size: 16px; line-height: 24px; font-weight: 400;     /* body */
}


/* ---------- 8. Services cards --------------------------------------------- */

body.loginbg .service-card,
body.loginbg .location-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
/* Icon badge on the image edge: blue disc → neutral raised tile */
body.loginbg .service-badge-icon,
body.loginbg .location-badge-icon {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
body.loginbg .service-badge-icon svg,
body.loginbg .location-badge-icon svg {
  width: var(--icon-md);
  height: var(--icon-md);
  stroke-width: 1.75;
}
body.loginbg .service-title,
body.loginbg .location-name {
  color: var(--ink);
  font-size: 16px; line-height: 22px; font-weight: 600;     /* heading-sm */
}
body.loginbg .service-desc,
body.loginbg .location-address {
  color: var(--ink-muted);
  font-size: 14px; line-height: 20px; font-weight: 400;     /* body-sm */
}


/* ---------- 9. Testimonials ----------------------------------------------- */

/* Trusted_banner.png is now Meridian poster art on Night */
body.loginbg .memories-card {
  background: var(--surface-inverse);
  border-radius: var(--radius-xl);
}
body.loginbg .memories-gradient { display: none; }          /* no colour wash on Meridian art */
body.loginbg .memories-overlay-text,
body.loginbg .memories-overlay-text .indent {
  color: var(--ink-inverse);
  font-family: var(--font-display);
  font-size: 40px; line-height: 42px; font-weight: 700; letter-spacing: -.02em;   /* display-md, was Dancing Script */
  font-stretch: 118%;
  font-style: normal;
}
body.loginbg .testimonial-quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: none;
}
body.loginbg .quote-icon-blue {
  color: var(--ink-muted);
  font-family: var(--font-display);
}
body.loginbg .testimonial-title {
  color: var(--ink);
  font-size: 16px; line-height: 22px; font-weight: 600;     /* heading-sm */
}
body.loginbg .testimonial-body {
  color: var(--ink-muted);
  font-size: 14px; line-height: 20px; font-weight: 400;     /* body-sm */
}


/* ---------- 10. Footer: navy → Day, like Meridian's SiteFooter ----------- */

body.loginbg .site-footer {
  background: var(--bg);
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
}
body.loginbg .site-footer .footer-brand-title img {
  filter: none;                                  /* was brightness/invert to fake a white logo */
  width: auto;
  height: 40px;
  max-width: 100%;
}
body.loginbg .site-footer .footer-bio-text,
body.loginbg .site-footer .footer-contact-item {
  color: var(--ink-muted);
  font-size: 14px; line-height: 20px; font-weight: 400;     /* body-sm */
}
body.loginbg .site-footer .footer-heading {
  color: var(--ink);
  font-size: 16px; line-height: 22px; font-weight: 600;     /* heading-sm */
}
body.loginbg .site-footer a {
  color: var(--ink);
  text-decoration: none;
}
body.loginbg .site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.loginbg .site-footer svg {
  color: var(--ink-muted);
  stroke: currentColor;
  stroke-width: 1.75;
}
body.loginbg .site-footer .footer-main-grid { border-bottom-color: var(--line); }   /* was navy */
body.loginbg .site-footer .footer-bottom-bar {
  color: var(--ink-muted);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .01em;   /* caption */
}
body.loginbg .site-footer .footer-bottom-locations { color: var(--ink-muted); }
body.loginbg .site-footer .dot-sep { color: var(--line-strong); }


/* ---------- 11. Small screens (below bp-md 600px) ------------------------ */

@media (max-width: 599px) {
  /* Fix only: the card is absolutely positioned inside an 80vh box, which
     breaks on phones. It now flows in the hero; order is unchanged. */
  body.loginbg .login_cnt .hero .container { height: auto; }
  body.loginbg .login_cnt .login_hero_row.row { height: auto; padding-block: var(--space-6); margin: 0; }
  body.loginbg .login_cnt .login-box {
    --sx-field-h: var(--control-lg);             /* 48px on phones (touch) */
    position: static;
    transform: none;
    width: 100%;
    margin-inline: auto;
    padding: var(--space-5);
  }
  /* The strip floats 46px up into the hero on wide screens; on phones it
     would cover the card, so it starts below the hero instead */
  body.loginbg .trust-strip-wrapper { margin-top: var(--space-6); }
  body.loginbg .site-header .Logo img { height: 32px; }
  body.loginbg .site-header .contact-btn { height: var(--touch-min); padding-inline: var(--space-3); }   /* 44px touch target */
  body.loginbg .login_cnt .section-title { font-size: 24px; line-height: 30px; letter-spacing: -.01em; }  /* heading-lg */
  body.loginbg .memories-overlay-text,
  body.loginbg .memories-overlay-text .indent { font-size: 32px; line-height: 38px; }
}


/* ---------- 12. Forgot password dialog (jQuery UI 1.8) → Meridian Dialog --
   Markup: .ui-dialog > .ui-dialog-titlebar + #forgot-password (loaded from
   /Home/ForgotPassword). Size, position and wording unchanged; the dialog is
   appended to <body>, so these rules sit outside .login_cnt. */

/* Scrim behind the dialog */
body.loginbg .ui-widget-overlay {
  background: var(--scrim);
  opacity: 1;
}

/* The dialog: surface-raised, radius-xl, shadow-lg (was 5px navy border, square) */
body.loginbg .ui-dialog {
  padding: 0;
  overflow: hidden;
  background: var(--surface-raised);
  color: var(--ink);
  border: 1px solid var(--line) !important;     /* customize.css "body .ui-dialog { border: 5px … !important }" — D-30 */
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-sans);
}
body.loginbg .ui-dialog:focus { outline: none; }
body.loginbg .ui-dialog .ui-resizable-handle { display: none; }   /* Meridian dialogs don't resize */

/* Title bar: cyan band → plain title, heading-lg, with a close IconButton at the end */
body.loginbg .ui-dialog .ui-dialog-titlebar {
  position: relative;
  padding: var(--space-5) calc(var(--space-5) + var(--control-md)) 0 var(--space-5);   /* compact */
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  cursor: default;
}
[dir="rtl"] body.loginbg .ui-dialog .ui-dialog-titlebar { padding: var(--space-5) var(--space-5) 0 calc(var(--space-5) + var(--control-md)); }
body.loginbg .ui-dialog .ui-dialog-title {
  float: none;
  margin: 0;
  color: var(--ink);
  font-size: 24px; line-height: 30px; font-weight: 650; letter-spacing: -.01em;   /* heading-lg */
}
body.loginbg .ui-dialog .ui-dialog-titlebar-close {
  position: absolute;
  top: var(--space-3);
  inset-inline-end: var(--space-3);
  inset-inline-start: auto;
  display: grid;
  place-items: center;
  width: var(--control-md);
  height: var(--control-md);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--ink);
  transition: background-color var(--duration-instant) var(--ease-cruise);
}
body.loginbg .ui-dialog .ui-dialog-titlebar-close:hover { background: var(--surface-sunken); }
body.loginbg .ui-dialog .ui-dialog-titlebar-close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
body.loginbg .ui-dialog .ui-dialog-titlebar-close .ui-icon { display: none; }   /* jQuery UI sprite */
body.loginbg .ui-dialog .ui-dialog-titlebar-close::before {
  content: "";
  width: var(--icon-md);
  height: var(--icon-md);
  background: currentColor;
  -webkit-mask: var(--sx-icon-close) center / contain no-repeat;
          mask: var(--sx-icon-close) center / contain no-repeat;
}
body.loginbg {
  --sx-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
  --sx-icon-danger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.75'/%3E%3Cpath d='M9.25 9.25l5.5 5.5M14.75 9.25l-5.5 5.5'/%3E%3C/svg%3E");
}

/* Body */
body.loginbg #forgot-password.ui-dialog-content {
  padding: var(--space-2) var(--space-5) var(--space-5) !important;   /* common.css ".ui-dialog .ui-dialog-content { padding: .5em !important }" — D-30 */
  overflow: visible;                            /* the dialog scrolls as a whole when it is taller than the screen */
  background: transparent;
  color: var(--ink);
}
body.loginbg #forgot-password .c > br { display: none; }       /* empty spacer lines */
body.loginbg #forgot-password .form-row p {
  margin: 0 0 var(--space-3);
  color: var(--ink-muted);
  font-size: 14px; line-height: 20px; font-weight: 400;     /* body-sm, Dialog body */
}
/* "* indicates required field." was red: it is a note, not an error */
body.loginbg #forgot-password .red.error {
  color: var(--ink-muted);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .01em;   /* caption */
}

/* Fields: floating label → label above a 40px TextField (as on the sign-in card) */
body.loginbg #forgot-password .form-floating {
  display: grid;
  gap: var(--space-1);
  margin-block-end: var(--space-1);
}
body.loginbg #forgot-password .form-floating > .form-label {
  order: -1;
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  transform: none;
  opacity: 1;
  color: var(--ink);
  font-size: 14px; line-height: 20px; font-weight: 550; letter-spacing: .005em;   /* label */
}
body.loginbg #forgot-password .form-floating > .form-label::after { display: none; }
body.loginbg #forgot-password .form-floating > input.form-control {
  height: var(--control-md);
  min-height: 0;
  margin: 0;
  padding: 0 var(--space-3);
  box-sizing: border-box;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: none;
  font-size: 16px; line-height: 24px; font-weight: 400;      /* body */
  transition: border-color var(--duration-instant) var(--ease-cruise), box-shadow var(--duration-instant) var(--ease-cruise);
}
body.loginbg #forgot-password .form-floating > input.form-control::placeholder { color: transparent; }
body.loginbg #forgot-password .form-floating > input.form-control:focus {
  outline: 0;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 1px var(--focus-ring);
}
body.loginbg #forgot-password .form-floating > input.input-validation-error { border-color: var(--danger); }
/* Legacy rules style invalid inputs (.error / .input-validation-error) with
   !important: red border, pink fill (common.css, style.css, customize.css — D-28).
   This covers the sign-in card and this dialog until those are cleaned up. */
body.loginbg :is(.login_cnt .login-box, #forgot-password) :is(input.error, input.input-validation-error) {
  border-color: var(--danger) !important;
  background-color: var(--surface) !important;
}
body.loginbg #forgot-password .field-validation-valid { display: none; }
body.loginbg #forgot-password .field-validation-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--danger);
  font-size: 14px; line-height: 20px; font-weight: 400;     /* body-sm */
}
body.loginbg #forgot-password .field-validation-error::before {
  content: "";
  flex: none;
  width: var(--icon-sm);
  height: var(--icon-sm);
  background: currentColor;
  -webkit-mask: var(--sx-icon-danger) center / contain no-repeat;
          mask: var(--sx-icon-danger) center / contain no-repeat;
}

/* "Or" between the two fields: kept centred, but by text-align instead of the
   inline margin-left:250px (which drifts on phones and in Arabic) */
body.loginbg #forgot-password .grid_5 {
  display: block;                               /* fluid_grid.css makes grid_* inline */
  float: none;
  width: 100%;
  margin: 0 0 var(--space-1) !important;        /* beats the inline style — V-12 */
  text-align: center;
  color: var(--ink-muted);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .01em;   /* caption */
}

/* Server message (#dvForgot.errormsg) → danger Alert */
body.loginbg #forgot-password #dvForgot.errormsg {
  position: relative;
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  padding-inline-start: calc(var(--space-4) + var(--icon-md) + var(--space-3));
  background-color: var(--danger-soft) !important;   /* customize.css .errormsg !important — D-04 */
  color: var(--ink) !important;
  border: 0;
  border-radius: var(--radius-md);
  text-align: start;
  font-size: 14px; line-height: 20px; font-weight: 400;      /* body-sm */
}
body.loginbg #forgot-password #dvForgot.errormsg::before {
  content: "";
  position: absolute;
  top: var(--space-3);
  inset-inline-start: var(--space-4);
  width: var(--icon-md);
  height: var(--icon-md);
  background: var(--danger);
  -webkit-mask: var(--sx-icon-danger) center / contain no-repeat;
          mask: var(--sx-icon-danger) center / contain no-repeat;
}

/* "Reset Password" → primary Button (the dialog's one magenta action), still centred */
body.loginbg #forgot-password .form-check.login-button {
  margin: var(--space-3) 0 0;
  padding: 0;
  text-align: center;
}
body.loginbg #forgot-password #ResetuserPassword {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-md);
  margin: 0;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  /* The button carries legacy classes "button gray-small", which customize.css and
     responsive.css style with !important (blue / red fill, padding, 13px) — D-29 */
  background: var(--brand) !important;
  padding: 0 var(--space-5) !important;
  color: var(--on-brand);
  font-size: 14px !important; line-height: 20px; font-weight: 550; letter-spacing: .005em;   /* label */
  cursor: pointer;
  transition: background-color var(--duration-instant) var(--ease-cruise), transform var(--duration-quick) var(--ease-glide);
}
body.loginbg #forgot-password #ResetuserPassword:hover { background: var(--brand-hover) !important; }
body.loginbg #forgot-password #ResetuserPassword:active { background: var(--brand-pressed) !important; transform: scale(.97); }
body.loginbg #forgot-password #ResetuserPassword:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Phones: the 525px dialog is wider than the screen; fit it with a 16px gutter */
@media (max-width: 599px) {
  body.loginbg .ui-dialog {
    width: calc(100% - 2 * var(--space-4)) !important;    /* jQuery UI writes width/left inline */
    left: var(--space-4) !important;
    top: 50% !important;                                    /* style.css centres with translateY(-50%) */
    max-height: calc(100% - 2 * var(--space-6));
    overflow: auto;
  }
  body.loginbg #forgot-password .form-floating > input.form-control,
  body.loginbg #forgot-password #ResetuserPassword { height: var(--control-lg); }   /* 48px touch */
  body.loginbg .ui-dialog .ui-dialog-titlebar-close { width: var(--touch-min); height: var(--touch-min); top: var(--space-2); inset-inline-end: var(--space-2); }
}


/* ---------- 12b. Admin login (/Admin/Login, body.loginbg.login_admin) ------
   Same stylesheet, but none of the agent-login rules apply here: they are
   scoped to .login_cnt, which the Admin view does not have. Layout unchanged
   (full-height panel over the route map). D-182–D-186 */

/* Page: sand behind the route map (loginbg.jpg stays on <body>, which paints
   the whole window; <html> must stay transparent or the map would shrink to
   the 0px-tall body box) */
body.loginbg.login_admin { background-color: var(--bg) !important; }

/* Panel: 59% white with a grey 5px glow → solid Meridian surface, line edges, raised */
body.loginbg.login_admin #login .login {
  --sx-field-h: var(--control-md);               /* 40px fields and button, as on the agent login */
  background: var(--surface) !important;        /* customize.css ".loginbg .login { background: rgba(255,255,255,.59) !important }" */
  color: var(--ink);
  border-inline: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  backdrop-filter: none;
}
body.loginbg.login_admin #login .login-form { margin: 0; padding: 0; }

/* "ADMIN" (navy, uppercase, 20px / 400) → card title, heading-md */
body.loginbg.login_admin .admin-text {
  margin: 0 0 var(--space-4);
  text-align: start;
  text-transform: none;
  color: var(--ink);
  font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.005em;
}

/* Fields: floating label inside a grey box → Meridian TextField (label above the box) */
body.loginbg.login_admin .login-input {
  position: relative;
  float: none;
  width: 100%;
  margin: 0 0 var(--space-4);
  padding: 0;
}
body.loginbg.login_admin .login-input .form-floating { display: grid; gap: var(--space-1); }
body.loginbg.login_admin .login-input .form-floating > label {
  order: -1;
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  transform: none;
  opacity: 1;
  color: var(--ink);
  font-size: 14px !important; line-height: 20px; font-weight: 550; letter-spacing: .005em;
  pointer-events: auto;
}
body.loginbg.login_admin .login-input .form-floating > label::after { display: none; }
body.loginbg.login_admin .login-input input.form-control {
  height: var(--sx-field-h);
  min-height: 0;
  margin: 0;
  padding-block: 0;
  padding-inline: calc(var(--space-3) + var(--icon-md) + var(--space-2)) var(--space-3);
  box-sizing: border-box;
  background: var(--surface) !important;        /* customize.css ".loginbg .large { background: #f1f1f1 !important }" */
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: none;
  font-family: var(--font-sans) !important;
  font-size: 16px !important; line-height: 24px; font-weight: 400;   /* 16px also stops iOS zoom-on-focus */
  transition: border-color var(--duration-instant) var(--ease-cruise), box-shadow var(--duration-instant) var(--ease-cruise);
}
body.loginbg.login_admin .login-input input.form-control::placeholder { color: transparent; }
body.loginbg.login_admin .login-input input.form-control:hover { border-color: var(--ink-muted); }
body.loginbg.login_admin .login-input input.form-control:focus { outline: 0; border-color: var(--focus-ring); box-shadow: 0 0 0 1px var(--focus-ring); }
body.loginbg.login_admin .login-input input.form-control:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 100px var(--surface) inset; }
/* Field icons: user-icon.png / key PNG on ::after → Meridian user / lock on ::before */
body.loginbg.login_admin .login-input::after { display: none !important; }
body.loginbg.login_admin .login-input::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(20px + var(--space-1) + (var(--sx-field-h) - var(--icon-md)) / 2);
  inset-inline-start: var(--space-3);
  width: var(--icon-md);
  height: var(--icon-md);
  margin: 0;
  background: var(--ink-muted);
  pointer-events: none;
  -webkit-mask: var(--sx-login-icon) center / contain no-repeat;
          mask: var(--sx-login-icon) center / contain no-repeat;
}
body.loginbg.login_admin .username_l {
  --sx-login-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.5' r='4'/%3E%3Cpath d='M4.5 20.5c1.2-3.6 4.2-5.5 7.5-5.5s6.3 1.9 7.5 5.5'/%3E%3C/svg%3E");
}
body.loginbg.login_admin .password_l {
  --sx-login-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
}
body.loginbg.login_admin .login-input:focus-within::before { background: var(--ink); }
/* Validation messages (inline ".error { color: Red }" and jQuery unobtrusive) → danger text */
body.loginbg.login_admin :is(.error, .field-validation-error) { color: var(--danger) !important; font-size: 14px; line-height: 20px; }
body.loginbg.login_admin .login-input input.input-validation-error { border-color: var(--danger); }

/* "Forgot your password?" (cyan, 15px) → brand-text link, end-aligned under the password field */
body.loginbg.login_admin .forgotpassword-btn {
  display: flex;
  justify-content: flex-end;
  float: none;
  width: 100%;
  margin: calc(var(--space-1) - var(--space-4)) 0 var(--space-4);
  padding: 0;
}
body.loginbg.login_admin .forgotpassword-btn a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--brand-text);
  text-decoration: none;
  font-size: 14px !important; line-height: 20px; font-weight: 550; letter-spacing: .005em;
  border-radius: var(--radius-xs);
}
body.loginbg.login_admin .forgotpassword-btn a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.loginbg.login_admin .forgotpassword-btn a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* "Log in" (navy, 53px, 10px corners) → Meridian primary, full width */
body.loginbg.login_admin .login-button:not(.forgotpassword-btn) { float: none; width: 100%; margin: 0; padding: 0; }
body.loginbg.login_admin .login-button input.logininput {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--sx-field-h);
  margin: 0;
  padding-block: 0;
  padding-inline: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: none;
  font-family: var(--font-sans) !important;
  font-size: 14px !important; line-height: 20px; font-weight: 550; letter-spacing: .005em;
  cursor: pointer;
  transition: background-color var(--duration-instant) var(--ease-cruise), transform var(--duration-quick) var(--ease-glide);
}
body.loginbg.login_admin .login-button input.logininput:hover { background: var(--brand-hover); }
body.loginbg.login_admin .login-button input.logininput:active { background: var(--brand-pressed); transform: scale(.97); }
body.loginbg.login_admin .login-button input.logininput:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Phones: the panel fills the width, 48px touch fields */
@media (max-width: 599px) {
  body.loginbg.login_admin #login .login {
    --sx-field-h: var(--control-lg);
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--space-8) var(--space-5);
    border-inline: 0;
  }
  /* the logo image was 254px inside a 230px box: its right edge was cut */
  body.loginbg.login_admin .login-logo { margin-inline: auto; max-width: 100%; }
  body.loginbg.login_admin .login-logo img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
}

/* ---------- 13. Reduced motion ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  body.loginbg .site-header .contact-btn,
  body.loginbg .login_cnt #loginSubmit,
  body.loginbg .login_cnt #dvRegister .b2bregister-button-orange,
  body.loginbg.login_admin .login-button input.logininput { transition-duration: 1ms; }
}
