/*--------------------------------------------------------------
# style.css - the three shells of Ingage iPay
--------------------------------------------------------------
Merchant.master - the back office: a 260px navy navigation rail with the
                  topbar beside it. Light or dark.
Portal.master   - the customer Payment Portal: one full-width topbar carrying the
                  billing company's logo and the portal's sections. Light only.
Public.master   - the marketing, legal and account pages: a navbar and a
                  footer. Light only.

The rail, the topbar and the avatar menu are Sail Rewards' shapes (its
Content/style.css "Shell", "Topbar identity" and "Sidebar" blocks), value for
value, which are in turn the Ingage Dealer Portal's. Keep them in step by hand.
Colours come from brand.css tokens only; see the header there for the names.

Every <link> to this file carries ?v=<assembly version> (Shell.Bust), so bump the
version in any commit that changes it.
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Bootstrap overrides
--------------------------------------------------------------
Bootstrap ships #0d6efd. These point its variables at brand.css so .btn-primary
and friends come out brand blue. Component-level variables rather than blanket
overrides, so hover/active/disabled stay consistent without !important.
--------------------------------------------------------------*/
:root {
  --bs-primary: var(--brand-primary);
  --bs-primary-rgb: 16, 93, 137;
  --bs-link-color: var(--brand-primary);
  --bs-link-color-rgb: 16, 93, 137;
  --bs-link-hover-color: var(--brand-primary-dark);
}

.btn-primary {
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary-dark);
  --bs-btn-hover-border-color: var(--brand-primary-darker);
  --bs-btn-active-bg: var(--brand-primary-darker);
  --bs-btn-active-border-color: var(--brand-primary-darker);
  --bs-btn-disabled-bg: var(--brand-primary);
  --bs-btn-disabled-border-color: var(--brand-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary);
  --bs-btn-hover-border-color: var(--brand-primary);
  --bs-btn-active-bg: var(--brand-primary-dark);
  --bs-btn-active-border-color: var(--brand-primary-dark);
}

.bg-primary { background-color: var(--brand-primary) !important; }
.text-primary { color: var(--brand-primary) !important; }

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
:root {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-dark);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  color: var(--brand-accent);
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
}

/* The page ground. Painted on the wrapper that holds the content AND the footer, so
   the footer sits on the same ground as the page above it. */
#mastercontentwrapper {
  background: var(--surface);
}

/* The column pages render into. .sail pages add their own 20px on top of this. */
.shell-main {
  flex: 1 0 auto;
  padding: 10px;
}

/*--------------------------------------------------------------
# Back to top button
--------------------------------------------------------------*/
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 15px;
  bottom: 15px;
  z-index: 99999;
  background: var(--brand-primary);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  transition: all 0.4s;
}

.back-to-top i {
  font-size: 24px;
  color: #fff;
  line-height: 0;
}

.back-to-top:hover {
  background: var(--brand-accent);
  color: #fff;
}

.back-to-top.active {
  visibility: visible;
  opacity: 1;
}

/* A sticky .sail-pager or .sail-formbar is a ~60px band across the foot of the
   window; lift the button clear of its last page number or its Save button. */
body:has(.sail-pager) .back-to-top,
body:has(.sail-formbar) .back-to-top {
  bottom: 70px;
}

/*--------------------------------------------------------------
# Bootstrap dropdowns
--------------------------------------------------------------*/
.dropdown-menu {
  border-radius: 4px;
  padding: 0;
  animation-name: dropdown-animate;
  animation-duration: 0.2s;
  animation-fill-mode: both;
  border: 0;
  box-shadow: 0 5px 30px 0 rgba(82, 63, 105, 0.2);
}

.dropdown-menu .dropdown-item {
  font-size: 14px;
  padding: 10px 15px;
  transition: 0.3s;
}

.dropdown-menu .dropdown-item:hover {
  background-color: var(--surface);
}

@keyframes dropdown-animate {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/*--------------------------------------------------------------
# Merchant shell - the topbar
--------------------------------------------------------------
Starts where the rail ends rather than spanning the window, which is what makes
the rail the frame of the application. Read with the Sidebar block below. The
1000px breakpoint cannot be a custom property (a media query cannot read one),
so it is written out where it is needed.
--------------------------------------------------------------*/
:root {
  --rail-w: 260px;
  --topbar-h: 64px;
}

.header {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--topbar-h);
  z-index: 997;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* THE PAGE NAME IN THE BAR, opt-in per page. A page fills the TopbarTitle
   placeholder with <div class="header-title"><h1>…</h1></div> and leaves the h1
   out of its own .sail-head, so the name is stated once. The type is written out
   rather than read from --t-display: that token is declared on .sail, and this bar
   is not inside .sail, so var() would resolve to nothing. */
.header-title {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 10px;
}

.header-title h1 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1.625rem, 2.2vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  color: var(--brand-primary-darker);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --brand-primary-darker does not brighten for dark mode, so swap to the accent. */
[data-bs-theme="dark"] .header-title h1 {
  color: var(--brand-accent);
}

@media (max-width: 999px) {
  .header-title {
    padding-left: 0;
  }
}

@media (max-width: 600px) {
  .header-title h1 {
    font-size: 20px;
  }
}

/* Hidden until the rail becomes a drawer, below 1000px. */
.toggle-sidebar-btn {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  background: none;
  border-radius: var(--radius);
  color: var(--text-dark);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-sidebar-btn:hover {
  background: var(--surface);
}

/*--------------------------------------------------------------
# Topbar identity - the account avatar and its menu
--------------------------------------------------------------
Shared by the Merchant and Portal topbars. The toggle carries
data-bs-display="static" so Popper stays out: bootstrap positions the panel with
plain CSS, and the panel's open animation does not fight an inline transform.
No dark-mode rules here - the --tint-* tokens carry both themes.
--------------------------------------------------------------*/
.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-panel {
  max-width: calc(100vw - 24px);
  margin-top: 8px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: topbar-panel-in .16s ease both;
}

@keyframes topbar-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.topbar-avatar-wrap {
  position: relative;
}

.topbar-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brand-primary);
  border-radius: 50%;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.topbar-avatar:hover {
  background: var(--brand-primary);
  color: var(--white);
}

.topbar-avatar:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.topbar-avatar[aria-expanded="true"] {
  background: var(--brand-primary);
  color: var(--white);
  box-shadow: 0 0 0 3px var(--tint-info);
}

.topbar-menu {
  width: 256px;
}

.topbar-menu__head {
  padding: 8px 10px 10px;
}

.topbar-menu__name,
.topbar-menu__email,
.topbar-menu__org {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar-menu__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
}

.topbar-menu__email {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.topbar-menu__org {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-primary);
}

.topbar-menu__rule {
  height: 1px;
  margin: 4px 6px 6px;
  border: 0;
  background: var(--border-color);
  opacity: 1;
}

.topbar-menu__item,
.topbar-menu__item:link,
.topbar-menu__item:visited {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .14s ease, color .14s ease;
}

.topbar-menu__item i {
  flex-shrink: 0;
  width: 17px;
  text-align: center;
  font-size: 16px;
  line-height: 1;
  color: inherit;
  opacity: .62;
  transition: opacity .14s ease;
}

.topbar-menu__item:hover {
  background: var(--tint-gray);
  color: var(--brand-primary);
}

.topbar-menu__item:hover i {
  opacity: 1;
}

.topbar-menu__item:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}

.topbar-menu__item--signout,
.topbar-menu__item--signout:link,
.topbar-menu__item--signout:visited {
  color: var(--text-muted);
}

.topbar-menu__item--signout:hover {
  background: var(--tint-danger);
  color: var(--tint-danger-ink);
}

/*--------------------------------------------------------------
# Sidebar - the navigation rail
--------------------------------------------------------------
THE RAIL IS THE DEEP BRAND NAVY IN BOTH THEMES. A surface changes colour with the
theme; chrome does not, and this is chrome. Every text and hover colour inside it
is an rgba white over the navy rather than a token: --brand-primary-darker is the
one token brand.css deliberately does not flip, so the ground is constant and an
overlay on it is predictable. The one piece of real colour is the active row's
--brand-primary fill.

>= 1000px the rail is a column beside the page and cannot be hidden.
<  1000px it is a drawer slid over the page by body.toggle-sidebar, with
          #navbackdrop behind it. Every rule for that state lives in the one media
          query at the end of this block.
--------------------------------------------------------------*/
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  /* Bootstrap's offcanvas layer: above anything the page raises (sticky-bottom is
     1020), below .modal-backdrop's 1050 so a real modal still covers it. */
  z-index: 1045;
  display: flex;
  flex-direction: column;
  background: var(--brand-primary-darker);
}

.sidebar-logo {
  flex-shrink: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-lockup {
  display: flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.sidebar-lockup:hover {
  opacity: .8;
}

/* THE WORDMARK GOES WHITE ON THE NAVY. Unlike Sail's mark, which Rewards leaves
   untreated, the Ingage iPay logo IS the product name - and its blue letters are
   within a shade of the rail, so untreated it reads "GAGE". brightness(0) then
   invert(1) takes every opaque pixel to white and leaves the transparency alone. */
.sidebar-lockup img {
  height: 26px;
  width: auto;
  filter: brightness(0) invert(1);
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}

.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 4px;
}

.sidebar-section {
  margin: 0;
  padding: 11px 20px 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0 12px;
}

.sidebar-nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-link,
.sidebar-link:link,
.sidebar-link:visited {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 13px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.72);
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition: var(--transition);
}

.sidebar-link i {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: .95rem;
  line-height: 1;
}

.sidebar-link:hover {
  background: rgba(255,255,255,.1);
  color: var(--white);
}

.sidebar-link.active {
  background: var(--brand-primary);
  color: var(--white);
  font-weight: 600;
}

.sidebar-foot {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar-me {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-me__avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: var(--white);
}

.sidebar-me__id {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-me__name,
.sidebar-me__org {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-me__name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--white);
}

.sidebar-me__org {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
}

.sidebar-signout,
.sidebar-signout:link,
.sidebar-signout:visited {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: rgba(255,255,255,.45);
  font-size: 1rem;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.sidebar-signout:hover {
  background: rgba(255,255,255,.1);
  color: var(--white);
}

.sidebar-version {
  margin: 5px 0 0;
  font-size: .65rem;
  letter-spacing: .02em;
  text-align: right;
  color: rgba(255,255,255,.32);
}

/* The page, clear of both the rail and the topbar. On the wrapper, not on the page,
   because the wrapper holds the footer too. */
.shell-content {
  margin-left: var(--rail-w);
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

.nav-backdrop {
  display: none;
}

@media (max-width: 999px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .header {
    left: 0;
  }

  .shell-content {
    margin-left: 0;
  }

  .toggle-sidebar-btn {
    display: inline-flex;
  }

  /* The shadow belongs to the open rail only: on the closed one it reaches 40px
     past the rail's edge and shades the left of every page on a phone. */
  body.toggle-sidebar .sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(15,23,42,.25);
  }

  body.toggle-sidebar .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15,23,42,.45);
  }
}

/*--------------------------------------------------------------
# Portal shell - the customer Payment Portal
--------------------------------------------------------------
One full-width bar: the billing company's logo, the portal's sections and the
account avatar. The logo is the COMPANY'S, not ours - a customer should see who is
billing them - so it sits on --card rather than on navy chrome, where an arbitrary
uploaded logo would be unreadable. Light only.
--------------------------------------------------------------*/
.portal-bar {
  position: sticky;
  top: 0;
  z-index: 997;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--topbar-h);
  padding: 0 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.portal-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.portal-logo img {
  max-height: 40px;
  max-width: 200px;
  width: auto;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

/* The <nav> round the list is the bar's flex item, so it is the one that has to be
   allowed to shrink (and, narrow, to take its own row); the list scrolls inside it. */
.portal-sections {
  min-width: 0;
}

.portal-nav::-webkit-scrollbar { display: none; }

.portal-link,
.portal-link:link,
.portal-link:visited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--transition);
}

.portal-link:hover {
  background: var(--tint-gray);
  color: var(--text-dark);
}

.portal-link.active {
  background: var(--tint-info);
  color: var(--tint-info-ink);
  font-weight: 600;
}

.portal-bar .header-nav {
  margin-left: auto;
}

.portal-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px;
}

/* Narrow: the sections drop to a second row of their own, scrolling sideways if
   they must, so the logo and the avatar keep the bar. */
@media (max-width: 767px) {
  .portal-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px 0;
    gap: 8px 12px;
  }

  .portal-sections {
    order: 3;
    flex: 1 0 100%;
    padding-bottom: 6px;
  }

  .portal-logo img {
    max-height: 32px;
  }
}

/*--------------------------------------------------------------
# Public shell - marketing, legal and account pages
--------------------------------------------------------------*/
.public-bar {
  position: sticky;
  top: 0;
  z-index: 997;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--topbar-h);
  padding: 0 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border-color);
}

.public-logo img {
  max-height: 34px;
  max-width: 220px;
  width: auto;
}

.public-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.public-link,
.public-link:link,
.public-link:visited {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--transition);
}

.public-link:hover {
  background: var(--tint-gray);
  color: var(--brand-primary);
}

.public-link.active {
  color: var(--brand-primary);
  font-weight: 600;
}

/* The one filled action in the bar. */
.public-cta,
.public-cta:link,
.public-cta:visited {
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--brand-primary);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--transition);
}

.public-cta:hover {
  background: var(--brand-primary-dark);
  color: var(--white);
}

/* Home, Schedule Demo, Contact Us. On wide screens the wrapper lays its links out as if
   they were the bar's own; below 768px it is a drop-down under the bar, opened by the
   menu button (main.js sets .open and aria-expanded). */
.public-menu {
  display: contents;
}

/* Solutions: the drop-down of product pages. */
.public-solutions .dropdown-toggle {
  border: 0;
  background: none;
}

.public-solutions .dropdown-menu {
  min-width: 240px;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.public-solutions .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-dark);
  font-size: 14px;
  font-weight: 500;
}

.public-solutions .dropdown-item i {
  color: var(--brand-primary);
  font-size: 16px;
}

.public-solutions .dropdown-item:hover,
.public-solutions .dropdown-item:focus {
  background: var(--tint-gray);
  color: var(--brand-primary);
}

.public-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text-dark);
  font-size: 22px;
  line-height: 1;
}

.public-menu-btn:hover {
  background: var(--tint-gray);
  color: var(--brand-primary);
}

.public-main {
  flex: 1 0 auto;
}

/* THE ACCOUNT BAND - sign in, register, reset password, and the new-customer wizard.
   The brand gradient from Sail Rewards' sign-in page behind one centred card. The card
   IS the .sail element (class="sail auth-card"), so the SailUI field, button and banner
   shapes resolve inside it; the two overrides below take back .sail's page-column
   width and padding. */
.auth-band {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-h) - 48px);
  padding: 8vh 16px 48px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 50%, var(--brand-primary-darker) 100%);
}

/* A faint 40px grid over the gradient. */
.auth-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.sail.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.3);
  animation: auth-card-in .5s ease-out both;
}

.sail.auth-card--wide {
  max-width: 640px;
}

@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .sail.auth-card { animation: none; }
}

.auth-card__head {
  padding: 32px 32px 22px;
  text-align: center;
  background: linear-gradient(135deg, var(--tint-info) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-soft);
}

.auth-card__head .auth-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-primary) 60%, var(--brand-primary-dark) 100%);
  box-shadow: 0 8px 22px rgba(16,93,137,.35), 0 0 0 6px var(--tint-info);
  color: var(--white);
  font-size: 1.6rem;
}

.auth-card__head h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand-primary-darker);
}

.auth-card__head p {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--text-muted);
}

/* The invoice a new customer arrived to pay (NewCustomerWizard.aspx), above the sign-up
   form: who it is from, how much, when. */
.auth-invoice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 14px auto 4px;
  padding: 12px 18px;
  max-width: 340px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--card);
}

.auth-invoice__from {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-invoice__amount {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand-primary-darker);
}

.auth-invoice__due {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-card__body {
  padding: 24px 32px 28px;
}

.auth-card__body .sail-fields {
  grid-template-columns: 1fr;
}

.auth-card__foot {
  padding: 16px 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
}

/* Sign In | Register, as a segmented control at the top of the body. They are links
   between two pages, not client-side tabs. */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: var(--tint-gray);
}

.auth-tabs a,
.auth-tabs a:link,
.auth-tabs a:visited {
  padding: 8px 10px;
  border-radius: 7px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.auth-tabs a:hover {
  color: var(--text-dark);
}

.auth-tabs a[aria-current="page"] {
  background: var(--card);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

/* A password input with its show/hide button inside the right edge. */
.auth-password {
  position: relative;
}

.auth-password .sail-input {
  padding-right: 42px;
}

.auth-password__reveal {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-password__reveal:hover {
  background: var(--tint-gray);
  color: var(--text-dark);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.auth-actions .sail-btn {
  width: 100%;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 15px;
}

.auth-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-primary);
  cursor: pointer;
}

.auth-link:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-band {
    padding-top: 24px;
  }

  .auth-card__head,
  .auth-card__body,
  .auth-card__foot {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 767px) {
  .public-bar {
    padding: 0 16px;
    gap: 12px;
  }

  .public-logo img {
    max-height: 28px;
    max-width: 150px;
  }

  .public-menu-btn {
    display: inline-flex;
  }

  .public-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px 12px;
    background: var(--card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .public-menu.open {
    display: flex;
  }

  .public-menu .public-link {
    padding: 12px;
    font-size: 15px;
  }

  /* In the phone menu the Solutions group is always open: its name a small heading,
     its pages listed under it. */
  .public-solutions .dropdown-toggle {
    width: 100%;
    padding-bottom: 4px;
    text-align: left;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    pointer-events: none;
  }

  .public-solutions .dropdown-toggle::after {
    display: none;
  }

  .public-solutions .dropdown-menu {
    position: static !important;
    display: block;
    min-width: 0;
    margin: 0 !important;
    padding: 0 0 4px;
    border: 0;
    box-shadow: none;
    transform: none !important;
  }

  .public-solutions .dropdown-item {
    padding: 12px;
    font-size: 15px;
  }
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------
Merchant: the copyright, centred, and nothing else - the build number is at the
foot of the rail. Portal and Public: the copyright plus the two legal links.
An inline style="color: …" is invisible to the theme; use a token.
--------------------------------------------------------------*/
.footer {
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.footer .copyright {
  margin: 0;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-left: 14px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.shell-content .footer .copyright {
  color: var(--brand-primary);
}

@media (max-width: 575px) {
  /* Clear the back-to-top button, which sits on the centred line at phone width. */
  .footer {
    padding-bottom: 68px;
  }

  .footer-links {
    display: flex;
    justify-content: center;
    margin: 6px 0 0;
  }
}

/*--------------------------------------------------------------
# DevExpress, until the page around it is rebuilt
--------------------------------------------------------------
The skin itself takes the brand colour and Inter from the theme settings
(Shell.ApplyDevExpressTheme and Web.config <themes>). These only round the
buttons to match .sail-btn.
--------------------------------------------------------------*/
.dxbButton_Office365.dxbTSys,
.dxbButton_Office365Dark.dxbTSys {
  border-radius: 6px !important;
}
