/* Main content grows between navbar & footer */
.main-content {
  flex: 1;
  padding: 1rem;
  transition: margin-left 0.3s ease;
}

/* Main content background - Light mode */
[data-bs-theme="light"] .main-content {
  background-color: #f8f9fa; /* light gray background */
  color: #212529;            /* dark text */
  border-left: 1px solid rgba(0,0,0,0.05); /* subtle dividers */
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 1.5rem;           /* breathing space */
}

/* Main content background - Dark mode */
[data-bs-theme="dark"] .main-content {
  background-color: #1e1e1e; /* dark gray */
  color: #f8f9fa;            /* light text */
  border-left: 1px solid rgba(255,255,255,0.05);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem;
}

body.auth .main-content {
  margin-left: 0 !important; /* no sidebar here */
}

/* Admin role: dark background, light text */
.custom-body[data-role="admin"]:not(.dark-mode) .nav-tabs .nav-link {
  color: #f0f0f0;
}
.custom-body[data-role="admin"]:not(.dark-mode) .nav-tabs .nav-link.active {
  background-color: var(--theme-platform);
  color: #ffffff;
}

.custom-body[data-role="customer"]:not(.dark-mode) .nav-tabs .nav-link {
  color: #2c3e50;
}
.custom-body[data-role="customer"]:not(.dark-mode) .nav-tabs .nav-link.active {
  background-color: var(--theme-customer);
  color: #fff;
}

.custom-body[data-role="guest"]:not(.dark-mode) .nav-tabs .nav-link {
  color: #3c4a4e;
}
.custom-body[data-role="guest"]:not(.dark-mode) .nav-tabs .nav-link.active {
  background-color: var(--theme-brand-soft);
  color: #1c2b2f;
}

/* Auth navbar container */
.modern-auth-navbar {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 0.8rem 1.2rem;

  margin-top: 2rem;     /* 👈 space from top */
  margin-bottom: 2rem;  /* 👈 space from bottom */
  margin-left: auto;
  margin-right: auto;
  
  max-width: 95%;        /* keep centered horizontally */
  transition: background 0.3s ease, color 0.3s ease;
}

/* Make navbar contents vertically centered */
.modern-auth-navbar .container-fluid {
  display: flex;
  align-items: center;      /* vertical centering */
  justify-content: center;  /* 👈 centers items horizontally */
  gap: 2rem;                /* 👈 add spacing between brand & links */
  min-height: 70px;
}

/* Ensure brand stays aligned nicely */
.modern-auth-navbar .navbar-brand {
  display: flex;
  align-items: center;
  font-size: 1.8rem;      /* slightly bigger for emphasis */
}

/* Brand */
.modern-auth-navbar .navbar-brand {
  font-size: 1.6rem;
  color: var(--app-context-accent);
  transition: color 0.3s ease;
}

/* Nav links */
.modern-nav-list .nav-link {
  color: #6c757d;
  padding: 0.4rem 0.9rem;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modern-nav-list .nav-link:hover {
  background: color-mix(in srgb, var(--app-context-accent) 8%, transparent);
  color: var(--app-context-accent);
}

.modern-nav-list .nav-link.active {
  background: var(--app-context-accent);
  color: #fff !important;
  font-weight: 600;
}

/* Dark mode */
.dark-mode .modern-auth-navbar,
[data-bs-theme="dark"] .modern-auth-navbar {
  background: #1e1e1e;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.dark-mode .modern-auth-navbar .navbar-brand,
[data-bs-theme="dark"] .modern-auth-navbar .navbar-brand {
  color: #0dcaf0;
}

.dark-mode .modern-nav-list .nav-link,
[data-bs-theme="dark"] .modern-nav-list .nav-link {
  color: #bbb;
}

.dark-mode .modern-nav-list .nav-link:hover,
[data-bs-theme="dark"] .modern-nav-list .nav-link:hover {
  background: rgba(255,255,255,0.1);
  color: #0dcaf0;
}

.dark-mode .modern-nav-list .nav-link.active,
[data-bs-theme="dark"] .modern-nav-list .nav-link.active {
  background: #0dcaf0;
  color: #212529 !important;
}

/* Light mode login card */
[data-bs-theme="light"] .login-card {
  background-color: #ffffff !important;
  color: #212529 !important;
  /* border-radius: 1rem; */
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
  max-width: 500px;   /* was 400px */
  width: 100%;
  padding: 2.5rem;    /* more breathing room */
}

/* Dark mode login card */
[data-bs-theme="dark"] .login-card {
  background-color: #1e1e1e !important;
  color: #f8f9fa !important;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.5);
  max-width: 500px;   /* was 400px */
  width: 100%;
  padding: 2.5rem;    /* more breathing room */
}


/* Form labels */
[data-bs-theme="dark"] .form-label {
  color: #f8f9fa !important;
}
[data-bs-theme="light"] .form-label {
  color: #212529 !important;
}

/* Form controls */
[data-bs-theme="dark"] .form-control {
  background-color: #2c2c2c;
  color: #f8f9fa;
  border: 1px solid rgba(255,255,255,0.2);
}
[data-bs-theme="dark"] .form-control:focus {
  background-color: #333;
  border-color: #0dcaf0;
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(13,202,240,0.25);
}

[data-bs-theme="light"] .form-control {
  background-color: #fff;
  color: #212529;
  border: 1px solid #ced4da;
}
[data-bs-theme="light"] .form-control:focus {
  border-color: var(--app-context-accent);
  box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.25);
}

/* Remember me checkbox */
[data-bs-theme="dark"] .form-check-label {
  color: #f8f9fa;
}


/* Light mode */
.login-background {
  min-height: 100vh;
  /* display: flex;
  align-items: center;
  justify-content: center; */
  background: linear-gradient(to bottom right, #f0f4f8, #d9e2ec);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Dark mode — kill the gradient image */
[data-bs-theme="dark"] .login-background {
  background: linear-gradient(135deg, #0f1115, #111827) !important;
  color: #f8f9fa;
}

.unified-login-shell {
  width: 100%;
  min-height: calc(100vh - 130px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.unified-login-panel {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.unified-login-media {
  position: relative;
  min-height: 620px;
  color: #ffffff;
  background: #18212f;
}

.unified-login-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.unified-login-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 17, 31, 0.18), rgba(9, 17, 31, 0.78));
}

.unified-login-media-copy {
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 2rem;
  z-index: 1;
}

.auth-kicker {
  display: block;
  margin-bottom: 0.45rem;
  color: #3b82f6;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.unified-login-media-copy .auth-kicker {
  color: #93c5fd;
}

.unified-login-media-copy h1 {
  max-width: 520px;
  margin: 0 0 0.8rem;
  font-size: 2.65rem;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: 0;
}

.unified-login-media-copy p {
  max-width: 470px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.unified-login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding: 3rem;
}

.auth-brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-brand-lockup img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.auth-brand-lockup h2 {
  margin: 0;
  color: #111827;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-form .form-label {
  font-weight: 700;
}

.auth-form .form-control {
  min-height: 52px;
  border-radius: 8px;
}

.auth-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 1.25rem;
}

.auth-link,
.auth-register-links a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover,
.auth-register-links a:hover {
  text-decoration: underline;
}

.auth-submit {
  min-height: 52px;
  border-radius: 8px;
  font-weight: 800;
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.auth-submit:hover,
.auth-submit:focus {
  background: #1e40af;
  border-color: #1e40af;
}

.auth-register-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #475569;
}

.auth-register-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

[data-bs-theme="dark"] .unified-login-panel {
  background: #171b22;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .auth-brand-lockup h2 {
  color: #f8fafc;
}

[data-bs-theme="dark"] .auth-register-panel {
  background: #202631;
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

@media (max-width: 900px) {
  .unified-login-panel {
    grid-template-columns: 1fr;
  }

  .unified-login-media {
    min-height: 280px;
  }

  .unified-login-media-copy h1 {
    font-size: 2rem;
  }
}

@media (max-width: 560px) {
  .unified-login-shell {
    padding: 1rem 0.75rem 2rem;
  }

  .unified-login-card {
    padding: 1.35rem;
  }

  .auth-brand-lockup {
    align-items: flex-start;
  }

  .auth-brand-lockup img {
    width: 58px;
    height: 58px;
  }

  .auth-brand-lockup h2 {
    font-size: 1.65rem;
  }

  .auth-form-row,
  .auth-register-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Split panel wrapper: only OUTER corners rounded */
.login-wrapper {
  max-width: 1000px;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;             /* critical: keeps inner seam square */
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
  background: transparent;      /* the main-content handles page bg */
}

/* Remove any child radii so the seam stays square */
.side-image,
.login-card {
  border-radius: 0 !important;
}

/* Make the image fill nicely */
.side-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Light/Dark card surfaces (no radius here) */
[data-bs-theme="light"] .login-card {
  background-color: #ffffff;
  color: #212529;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: none; /* optional; wrapper already has shadow */
}
[data-bs-theme="dark"] .login-card {
  background-color: #1e1e1e;
  color: #f8f9fa;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: none; /* optional */
}

/* Mobile: image hidden by Bootstrap class, keep wrapper radius;
   login card fills full width (col-12 already handles width) */
@media (max-width: 767.98px) {
  /* keep your existing rule */
  .login-wrapper { border-radius: 16px; }

  /* Make the navbar split into two rows */
  .modern-auth-navbar .container-fluid,
  .navbar.modern-auth-navbar .container-fluid {
    display: flex;
    flex-wrap: wrap;            /* allow multiple rows */
    align-items: center;
    justify-content: center;    /* center contents horizontally */
    row-gap: .5rem;             /* space between rows */
    padding-left: 1rem;
    padding-right: 1rem;
    min-height: auto;
  }

  /* Row 1: brand centered and full width */
  .modern-auth-navbar .navbar-brand,
  .navbar.modern-auth-navbar .navbar-brand {
    order: 1;
    flex: 0 0 100%;             /* take full first row */
    text-align: center;
    margin: 0 auto;
    justify-content: center;
    /* kill any previous absolute-centering rules */
    position: static !important;
    left: auto !important;
    transform: none !important;
  }

  /* Row 2: everything else (nav lists, action groups) */
  .modern-auth-navbar .navbar-collapse,
  .modern-auth-navbar .navbar-nav,
  .modern-auth-navbar .modern-nav-list {
    order: 2;
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    /* flex-wrap: wrap; */
    gap: .5rem;
    position: static !important; /* ensure normal flow */
    padding: .25rem 0;
    box-shadow: none;
    background: transparent;
  }

  /* Neutralize Bootstrap auto-margins that push items left/right */
  .modern-auth-navbar .navbar-nav.ms-auto,
  .modern-auth-navbar .navbar-nav.me-auto {
    margin: 0 !important;
    justify-content: center;
  }

  /* Optional: slightly tighter link padding on small screens */
  .modern-auth-navbar .navbar-nav .nav-link {
    padding: .35rem .75rem;
  }
}

/* Unified authentication experience */
body.auth {
  background: #edf1f5;
}

body.auth .main-content {
  padding: 0;
  border: 0;
}

.login-background,
[data-bs-theme="light"] .login-background {
  background: #edf1f5;
}

.modern-auth-navbar {
  width: min(1280px, calc(100% - 48px));
  max-width: none;
  min-height: 76px;
  margin: 20px auto 0;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 8px;
  box-shadow: 0 12px 38px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.modern-auth-navbar .container-fluid {
  min-height: 54px;
  justify-content: space-between;
  gap: 24px;
  padding: 0;
}

.modern-auth-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0;
  padding: 0;
  color: #132238;
  text-decoration: none;
}

.auth-nav-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  background: #f5f8fb;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
}

.auth-nav-logo img {
  width: 39px;
  height: 39px;
  object-fit: contain;
}

.auth-nav-brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.auth-nav-brand-copy strong {
  color: #132238;
  font-size: 1rem;
  font-weight: 800;
}

.auth-nav-brand-copy small {
  margin-top: 4px;
  color: #6b7b8f;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

.auth-nav-actions {
  gap: 8px;
}

.modern-nav-list .nav-link,
.auth-theme-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-theme-toggle {
  color: #526174;
  background: transparent;
  border: 1px solid #dce3ea;
}

.auth-theme-toggle:hover {
  color: #132238;
  background: #f2f5f8;
  border-color: #cbd5df;
}

.modern-nav-list .auth-nav-login,
.modern-nav-list .auth-nav-login.active {
  color: #27384d !important;
  background: transparent;
}

.modern-nav-list .auth-nav-login:hover {
  color: #0d675d !important;
  background: #edf8f5;
}

.modern-nav-list .auth-nav-register {
  color: #fff;
  background: #0d675d;
  border: 1px solid #0d675d;
}

.modern-nav-list .auth-nav-register:hover {
  color: #fff;
  background: #09544c;
}

.auth-register-label-short {
  display: none;
}

.unified-login-shell {
  min-height: calc(100vh - 96px);
  padding: 26px 24px 44px;
}

.unified-login-panel {
  width: min(1180px, 100%);
  min-height: 650px;
  grid-template-columns: minmax(0, 1.16fr) minmax(390px, 0.84fr);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 30px 80px rgba(20, 35, 55, 0.16);
}

.unified-login-media {
  min-height: 650px;
  overflow: hidden;
}

.unified-login-media img {
  object-position: center center;
  transition: transform 700ms ease;
}

.unified-login-panel:hover .unified-login-media img {
  transform: scale(1.015);
}

.unified-login-media::after {
  background: linear-gradient(180deg, rgba(7, 21, 31, 0.08) 20%, rgba(7, 24, 32, 0.88) 100%);
}

.unified-login-media-copy {
  left: clamp(28px, 4vw, 56px);
  right: clamp(28px, 4vw, 56px);
  bottom: 48px;
}

.auth-kicker {
  color: #0d766b;
  font-size: 0.73rem;
}

.unified-login-media-copy .auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d6fff8;
}

.unified-login-media-copy h1 {
  max-width: 570px;
  margin: 12px 0 14px;
  font-size: clamp(2.25rem, 4vw, 3.45rem);
  line-height: 1.02;
}

.unified-login-media-copy p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.06rem;
  line-height: 1.65;
}

.unified-login-card {
  gap: 0;
  padding: clamp(36px, 5vw, 68px);
  background: #fff;
}

.auth-brand-lockup {
  gap: 14px;
  margin-bottom: 12px;
}

.auth-brand-lockup img {
  width: 64px;
  height: 64px;
}

.auth-brand-lockup .auth-kicker {
  margin-bottom: 4px;
}

.auth-brand-lockup h2 {
  font-size: clamp(1.65rem, 2.5vw, 2.1rem);
  line-height: 1.15;
}

.auth-intro {
  margin: 0 0 28px;
  color: #6a788a;
  font-size: 0.94rem;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-form .form-label {
  margin-bottom: 8px;
  color: #29394d !important;
  font-size: 0.84rem;
  font-weight: 750;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap > i {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 2;
  color: #7c8998;
  font-size: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-form .auth-input-wrap .form-control {
  min-height: 54px;
  padding: 12px 16px 12px 46px;
  color: #172638;
  background: #f8fafb;
  border: 1px solid #d9e1e8;
  font-size: 0.96rem;
}

.auth-form .auth-input-wrap .form-control::placeholder {
  color: #94a0ad;
}

.auth-form .auth-input-wrap .form-control:focus {
  background: #fff;
  border-color: #148175;
  box-shadow: 0 0 0 4px rgba(20, 129, 117, 0.11);
}

.auth-input-wrap:focus-within > i {
  color: #0d766b;
}

.auth-form-row {
  margin: 4px 0 24px;
  color: #637185;
  font-size: 0.87rem;
}

.auth-form .form-check-input:checked {
  background-color: #0d766b;
  border-color: #0d766b;
}

.auth-link,
.auth-register-links a {
  color: #0d675d;
}

.auth-submit {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #0d675d;
  border-color: #0d675d;
  box-shadow: 0 13px 28px rgba(13, 103, 93, 0.22);
  font-size: 0.96rem;
}

.auth-submit:hover,
.auth-submit:focus {
  background: #09544c;
  border-color: #09544c;
  box-shadow: 0 15px 32px rgba(13, 103, 93, 0.28);
  transform: translateY(-1px);
}

.auth-register-panel {
  align-items: flex-start;
  margin-top: 30px;
  padding: 18px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid #e5eaf0;
  border-radius: 0;
  color: #6a788a;
  font-size: 0.84rem;
}

.auth-register-links {
  justify-content: flex-end;
  gap: 6px 16px;
  text-align: right;
}

.auth-register-links a {
  font-size: 0.84rem;
}

[data-bs-theme="dark"] body.auth,
[data-bs-theme="dark"] .login-background {
  background: #11171d !important;
}

[data-bs-theme="dark"] .modern-auth-navbar {
  background: rgba(24, 32, 40, 0.94);
  border-color: rgba(255, 255, 255, 0.09);
}

[data-bs-theme="dark"] .auth-nav-logo,
[data-bs-theme="dark"] .auth-theme-toggle {
  background: #202a34;
  border-color: #34414e;
}

[data-bs-theme="dark"] .auth-nav-brand-copy strong,
[data-bs-theme="dark"] .auth-brand-lockup h2 {
  color: #f3f7fa;
}

[data-bs-theme="dark"] .auth-nav-brand-copy small,
[data-bs-theme="dark"] .auth-theme-toggle,
[data-bs-theme="dark"] .auth-intro {
  color: #aab6c3;
}

[data-bs-theme="dark"] .unified-login-card {
  background: #181f27;
}

[data-bs-theme="dark"] .auth-form .form-label {
  color: #dbe4ec !important;
}

[data-bs-theme="dark"] .auth-form .auth-input-wrap .form-control {
  color: #f0f4f7;
  background: #202932;
  border-color: #35414d;
}

[data-bs-theme="dark"] .auth-form .auth-input-wrap .form-control:focus {
  background: #222d37;
  border-color: #4db7aa;
}

[data-bs-theme="dark"] .auth-register-panel {
  background: transparent;
  border-color: #303b46;
  color: #aab6c3;
}

@media (max-width: 900px) {
  .modern-auth-navbar {
    width: calc(100% - 28px);
    margin-top: 14px;
  }

  .unified-login-shell {
    min-height: auto;
    padding: 18px 14px 32px;
  }

  .unified-login-panel {
    min-height: 0;
  }

  .unified-login-media {
    min-height: 340px;
  }

  .unified-login-media img {
    object-position: center 38%;
  }

  .unified-login-media-copy {
    bottom: 28px;
  }

  .unified-login-card {
    padding: 40px;
  }
}

@media (max-width: 640px) {
  .modern-auth-navbar {
    width: calc(100% - 20px);
    min-height: 64px;
    margin-top: 10px;
    padding: 8px 10px;
  }

  .modern-auth-navbar .container-fluid,
  .navbar.modern-auth-navbar .container-fluid {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
  }

  .modern-auth-navbar .navbar-brand,
  .navbar.modern-auth-navbar .navbar-brand {
    flex: 0 1 auto;
    width: auto;
    justify-content: flex-start;
  }

  .auth-nav-logo {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .auth-nav-logo img {
    width: 34px;
    height: 34px;
  }

  .auth-nav-brand-copy small,
  .theme-toggle-label,
  .auth-nav-login {
    display: none !important;
  }

  .modern-auth-navbar .navbar-nav,
  .modern-auth-navbar .modern-nav-list {
    width: auto;
    flex: 0 0 auto;
    padding: 0;
  }

  .auth-theme-toggle {
    width: 40px;
    padding: 8px;
  }

  .modern-nav-list .auth-nav-register {
    padding: 8px 11px;
    font-size: 0.8rem;
  }

  .auth-register-label-full {
    display: none;
  }

  .auth-register-label-short {
    display: inline;
  }

  .unified-login-shell {
    padding: 12px 10px 24px;
  }

  .unified-login-media {
    min-height: 270px;
  }

  .unified-login-media-copy {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

  .unified-login-media-copy h1 {
    font-size: 2rem;
  }

  .unified-login-media-copy p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .unified-login-card {
    padding: 30px 22px;
  }

  .auth-brand-lockup {
    align-items: center;
  }

  .auth-brand-lockup img {
    width: 52px;
    height: 52px;
  }

  .auth-form-row {
    align-items: center;
    flex-direction: row;
  }

  .auth-register-panel {
    flex-direction: column;
    gap: 10px;
  }

  .auth-register-links {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 380px) {
  .auth-nav-brand-copy strong {
    font-size: 0.88rem;
  }

  .auth-form-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Registration hierarchy: customer/site onboarding is the primary path. */
.auth-register-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 20px;
}

.auth-register-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.auth-register-heading > span {
  color: #7a8796;
  font-size: 0.76rem;
}

.auth-register-heading > strong {
  color: #26374a;
  font-size: 0.9rem;
  line-height: 1.35;
}

.auth-registration-primary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  color: #0d675d;
  background: #eaf6f3;
  border: 1px solid #c9e7e1;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.auth-registration-primary:hover {
  color: #fff;
  background: #0d675d;
  border-color: #0d675d;
}

.platform-registration-link {
  grid-column: 1 / -1;
  margin: 0;
  color: #8b96a4;
  font-size: 0.72rem;
}

.platform-registration-link a {
  color: #6e7a89;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #c5ccd4;
  text-underline-offset: 2px;
}

.platform-registration-link a:hover {
  color: #0d675d;
  text-decoration-color: currentColor;
}

[data-bs-theme="dark"] .auth-register-heading > strong {
  color: #e5edf3;
}

[data-bs-theme="dark"] .auth-register-heading > span,
[data-bs-theme="dark"] .platform-registration-link {
  color: #8f9caa;
}

[data-bs-theme="dark"] .auth-registration-primary {
  color: #8de0d5;
  background: #1b3836;
  border-color: #28514c;
}

[data-bs-theme="dark"] .platform-registration-link a {
  color: #a7b2be;
  text-decoration-color: #53606d;
}

@media (max-width: 480px) {
  .auth-register-panel {
    grid-template-columns: 1fr;
  }

  .auth-registration-primary {
    width: 100%;
  }

  .platform-registration-link {
    grid-column: auto;
  }
}

/* Platform registration */
.platform-register-panel {
  min-height: 720px;
  grid-template-columns: minmax(0, 1.04fr) minmax(430px, 0.96fr);
}

.platform-register-media {
  min-height: 720px;
}

.platform-register-media img {
  object-position: center 42%;
}

.platform-register-card {
  padding-top: 44px;
  padding-bottom: 44px;
}

.platform-register-form .auth-field {
  margin-bottom: 15px;
}

.platform-password-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.platform-password-grid .form-control {
  min-width: 0;
  font-size: 0.9rem;
}

.platform-register-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  padding-top: 20px;
  color: #788697;
  border-top: 1px solid #e5eaf0;
  font-size: 0.84rem;
}

.platform-register-footer a {
  color: #0d675d;
  font-weight: 750;
  text-decoration: none;
}

.platform-register-footer a:hover {
  text-decoration: underline;
}

[data-bs-theme="dark"] .platform-register-footer {
  color: #9ca8b5;
  border-color: #303b46;
}

[data-bs-theme="dark"] .platform-register-footer a {
  color: #75d2c7;
}

@media (max-width: 1040px) {
  .platform-register-panel {
    grid-template-columns: minmax(0, 0.95fr) minmax(410px, 1.05fr);
  }

  .platform-password-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 900px) {
  .platform-register-panel {
    grid-template-columns: 1fr;
  }

  .platform-register-media {
    min-height: 340px;
  }
}

@media (max-width: 480px) {
  .platform-register-media {
    min-height: 275px;
  }

  .platform-register-card {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .platform-register-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Customer onboarding */
.customer-register-shell {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 26px 24px 44px;
}

.customer-register-panel {
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: minmax(350px, 0.82fr) minmax(560px, 1.18fr);
  align-items: stretch;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(20, 35, 55, 0.16);
}

.customer-register-media {
  position: relative;
  min-height: 920px;
  overflow: hidden;
  color: #fff;
  background: #16342f;
}

.customer-register-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 36%;
}

.customer-register-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 24, 29, 0.06) 22%, rgba(7, 36, 34, 0.9) 100%);
}

.customer-register-media-copy {
  position: absolute;
  right: clamp(28px, 4vw, 52px);
  bottom: 50px;
  left: clamp(28px, 4vw, 52px);
  z-index: 1;
}

.customer-register-media-copy .auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d6fff8;
}

.customer-register-media-copy h1 {
  max-width: 500px;
  margin: 12px 0 14px;
  color: #fff;
  font-size: clamp(2.25rem, 3.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.03;
}

.customer-register-media-copy p {
  max-width: 440px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.6;
}

.customer-register-workspace {
  min-width: 0;
  padding: clamp(36px, 4.5vw, 64px);
}

.customer-register-header {
  margin-bottom: 34px;
}

.customer-register-header > p {
  margin: 12px 0 0;
  color: #6a788a;
  font-size: 0.94rem;
}

.customer-search-section,
.customer-form-section {
  padding: 26px 0;
  border-top: 1px solid #e5eaf0;
}

.customer-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.customer-section-heading h3 {
  margin: 0 0 4px;
  color: #203247;
  font-size: 1.08rem;
  font-weight: 800;
}

.customer-section-heading p {
  margin: 0;
  color: #748295;
  font-size: 0.84rem;
  line-height: 1.45;
}

.customer-step {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  color: #0d675d;
  background: #eaf6f3;
  border: 1px solid #c9e7e1;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
}

.customer-step-complete {
  color: #fff;
  background: #0d675d;
  border-color: #0d675d;
}

.customer-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.customer-search-form .form-control {
  min-height: 50px;
  padding-left: 46px;
  background: #f8fafb;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  font-size: 0.94rem;
}

.customer-search-form .form-control:focus {
  background: #fff;
  border-color: #148175;
  box-shadow: 0 0 0 4px rgba(20, 129, 117, 0.11);
}

.customer-search-button,
.customer-primary-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  color: #fff;
  background: #0d675d;
  border: 1px solid #0d675d;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 800;
}

.customer-search-button:hover,
.customer-primary-action:hover {
  background: #09544c;
  border-color: #09544c;
}

.customer-results {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.customer-results-count {
  color: #667487;
  font-size: 0.78rem;
  font-weight: 700;
}

.customer-result-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafb;
  border: 1px solid #e1e7ed;
  border-radius: 8px;
}

.customer-result-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #0d675d;
  background: #eaf6f3;
  border-radius: 6px;
}

.customer-result-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-result-copy strong {
  overflow: hidden;
  color: #26374a;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-result-copy span {
  color: #7a8796;
  font-size: 0.74rem;
}

.customer-result-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: #0d675d;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.customer-result-action:hover {
  color: #084b44;
}

.customer-state-message {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 8px;
  font-size: 0.84rem;
}

.customer-state-message > i {
  font-size: 1.1rem;
}

.customer-state-message div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-state-error {
  color: #9f2f37;
  background: #fff3f3;
  border: 1px solid #f3d0d3;
}

.customer-state-empty {
  color: #245b56;
  background: #f0f8f6;
  border: 1px solid #d3e9e4;
}

.customer-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.customer-form-grid .auth-field {
  min-width: 0;
  margin-bottom: 16px;
}

.customer-field-wide {
  grid-column: 1 / -1;
}

.customer-onboarding-form .form-label {
  margin-bottom: 7px;
  color: #34455a !important;
  font-size: 0.8rem;
  font-weight: 750;
}

.customer-onboarding-form .form-control,
.customer-onboarding-form .form-select {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  color: #172638;
  background-color: #f8fafb;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  font-size: 0.9rem;
}

.customer-onboarding-form .form-control:focus,
.customer-onboarding-form .form-select:focus {
  background-color: #fff;
  border-color: #148175;
  box-shadow: 0 0 0 4px rgba(20, 129, 117, 0.11);
}

.customer-form-check {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.customer-primary-action {
  width: 100%;
  margin-top: 6px;
  box-shadow: 0 13px 28px rgba(13, 103, 93, 0.2);
}

.selected-customer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: -8px 0 20px 46px;
  color: #68778a;
  font-size: 0.78rem;
}

.selected-customer-summary span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.selected-registration-heading {
  align-items: center;
}

.selected-registration-heading > div {
  min-width: 0;
  flex: 1;
}

.registration-start-over {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px 10px;
  color: #0d675d;
  background: #f4f8f7;
  border: 1px solid #d7e6e2;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 750;
  text-decoration: none;
}

.registration-start-over:hover {
  color: #fff;
  background: #0d675d;
  border-color: #0d675d;
}

.customer-register-footer {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 20px;
  color: #7a8796;
  border-top: 1px solid #e5eaf0;
  font-size: 0.82rem;
}

.customer-register-footer a {
  color: #0d675d;
  font-weight: 750;
  text-decoration: none;
}

[data-bs-theme="dark"] .customer-register-panel,
[data-bs-theme="dark"] .customer-register-workspace {
  background: #181f27;
}

[data-bs-theme="dark"] .customer-register-header > p,
[data-bs-theme="dark"] .customer-section-heading p,
[data-bs-theme="dark"] .customer-results-count,
[data-bs-theme="dark"] .selected-customer-summary,
[data-bs-theme="dark"] .customer-register-footer {
  color: #9ca8b5;
}

[data-bs-theme="dark"] .customer-search-section,
[data-bs-theme="dark"] .customer-form-section,
[data-bs-theme="dark"] .customer-register-footer {
  border-color: #303b46;
}

[data-bs-theme="dark"] .customer-section-heading h3,
[data-bs-theme="dark"] .customer-result-copy strong {
  color: #e5edf3;
}

[data-bs-theme="dark"] .customer-search-form .form-control,
[data-bs-theme="dark"] .customer-onboarding-form .form-control,
[data-bs-theme="dark"] .customer-onboarding-form .form-select,
[data-bs-theme="dark"] .customer-result-item {
  color: #eef3f6;
  background-color: #202932;
  border-color: #35414d;
}

[data-bs-theme="dark"] .customer-onboarding-form .form-label {
  color: #dbe4ec !important;
}

[data-bs-theme="dark"] .customer-state-empty {
  color: #a9ded7;
  background: #1b3433;
  border-color: #2b4b48;
}

@media (max-width: 980px) {
  .customer-register-panel {
    grid-template-columns: 1fr;
  }

  .customer-register-media {
    min-height: 360px;
  }

  .customer-register-media img {
    object-position: center 36%;
  }

  .customer-register-media-copy {
    bottom: 30px;
  }
}

@media (max-width: 640px) {
  .customer-register-shell {
    padding: 12px 10px 24px;
  }

  .customer-register-media {
    min-height: 290px;
  }

  .customer-register-media-copy {
    right: 22px;
    bottom: 22px;
    left: 22px;
  }

  .customer-register-media-copy h1 {
    font-size: 2rem;
  }

  .customer-register-media-copy p {
    font-size: 0.9rem;
  }

  .customer-register-workspace {
    padding: 30px 22px;
  }

  .customer-search-form,
  .customer-form-grid {
    grid-template-columns: 1fr;
  }

  .customer-field-wide {
    grid-column: auto;
  }

  .customer-search-button {
    width: 100%;
  }

  .customer-result-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .customer-result-action {
    grid-column: 2;
    justify-self: start;
    padding-left: 0;
  }

  .selected-customer-summary {
    margin-left: 0;
  }

  .selected-registration-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .registration-start-over {
    margin-left: 46px;
  }
}

/* Registration role gateway */
.registration-choice-panel {
  min-height: 640px;
}

.registration-choice-media {
  min-height: 640px;
}

.registration-choice-card {
  padding-top: 48px;
  padding-bottom: 48px;
}

.registration-role-form {
  display: grid;
  gap: 12px;
}

.registration-role-option {
  width: 100%;
  min-height: 86px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: 15px;
  color: #26374a;
  text-align: left;
  background: #f8fafb;
  border: 1px solid #dfe6ec;
  border-radius: 8px;
}

.registration-role-option:hover,
.registration-role-option:focus-visible {
  background: #fff;
  border-color: #9bcfc7;
  box-shadow: 0 8px 22px rgba(25, 55, 70, 0.1);
  transform: translateY(-1px);
}

.registration-role-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #0d675d;
  background: #e7f5f2;
  border-radius: 7px;
  font-size: 1.2rem;
}

.site-role-option .registration-role-icon {
  color: #4859a8;
  background: #edf0fc;
}

.registration-role-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.registration-role-copy strong {
  font-size: 0.94rem;
  font-weight: 800;
}

.registration-role-copy small {
  color: #748295;
  font-size: 0.78rem;
}

.registration-role-arrow {
  color: #8591a0;
}

[data-bs-theme="dark"] .registration-role-option {
  color: #e5edf3;
  background: #202932;
  border-color: #35414d;
}

[data-bs-theme="dark"] .registration-role-copy small {
  color: #a5b0bc;
}

/* Site employee onboarding: cool indigo distinguishes this path. */
.site-register-shell {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 26px 24px 44px;
}

.site-register-panel {
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: minmax(350px, 0.82fr) minmax(560px, 1.18fr);
  align-items: stretch;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(20, 35, 55, 0.16);
}

.site-register-media {
  position: relative;
  min-height: 900px;
  overflow: hidden;
  color: #fff;
  background: #172448;
}

.site-register-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
}

.site-register-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 26, 66, 0.04) 24%, rgba(13, 25, 65, 0.9) 100%);
}

.site-register-media-copy {
  position: absolute;
  right: clamp(28px, 4vw, 52px);
  bottom: 50px;
  left: clamp(28px, 4vw, 52px);
  z-index: 1;
}

.site-register-media-copy .auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #dce5ff;
}

.site-register-media-copy h1 {
  max-width: 500px;
  margin: 12px 0 14px;
  color: #fff;
  font-size: clamp(2.25rem, 3.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.03;
}

.site-register-media-copy p {
  max-width: 440px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.6;
}

.site-register-workspace {
  min-width: 0;
  padding: clamp(36px, 4.5vw, 64px);
}

.site-auth-kicker {
  color: #4859a8;
}

.site-search-section,
.site-form-section {
  padding: 26px 0;
  border-top: 1px solid #e5eaf0;
}

.site-step {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  color: #4859a8;
  background: #edf0fc;
  border: 1px solid #d6dcf7;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 800;
}

.site-step-complete {
  color: #fff;
  background: #4859a8;
  border-color: #4859a8;
}

.site-search-form .form-control:focus,
.site-onboarding-form .form-control:focus {
  border-color: #6575c3;
  box-shadow: 0 0 0 4px rgba(72, 89, 168, 0.12);
}

.site-primary-action {
  background: #4859a8;
  border-color: #4859a8;
  box-shadow: 0 13px 28px rgba(72, 89, 168, 0.2);
}

.site-primary-action:hover,
.site-primary-action:focus {
  background: #39488c;
  border-color: #39488c;
}

.site-result-icon {
  color: #4859a8;
  background: #edf0fc;
}

.site-result-action,
.site-register-footer a {
  color: #4859a8;
}

.site-result-action:hover,
.site-register-footer a:hover {
  color: #33417f;
}

.site-state-empty {
  color: #3f4d86;
  background: #f2f4fc;
  border: 1px solid #dce1f5;
}

.site-assignment-summary {
  color: #626f9e;
}

.site-start-over {
  color: #4859a8;
  background: #f3f4fb;
  border-color: #dce1f5;
}

.site-start-over:hover {
  color: #fff;
  background: #4859a8;
  border-color: #4859a8;
}

[data-bs-theme="dark"] .site-register-panel,
[data-bs-theme="dark"] .site-register-workspace {
  background: #181f27;
}

[data-bs-theme="dark"] .site-search-section,
[data-bs-theme="dark"] .site-form-section {
  border-color: #303b46;
}

[data-bs-theme="dark"] .site-state-empty {
  color: #c8d0fa;
  background: #252c48;
  border-color: #3a456d;
}

[data-bs-theme="dark"] .site-register-footer a,
[data-bs-theme="dark"] .site-result-action {
  color: #aebaff;
}

@media (max-width: 980px) {
  .site-register-panel {
    grid-template-columns: 1fr;
  }

  .site-register-media {
    min-height: 360px;
  }

  .site-register-media-copy {
    bottom: 30px;
  }
}

@media (max-width: 640px) {
  .registration-choice-panel {
    min-height: 0;
  }

  .registration-choice-media {
    min-height: 285px;
  }

  .registration-choice-card {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  .site-register-shell {
    padding: 12px 10px 24px;
  }

  .site-register-media {
    min-height: 290px;
  }

  .site-register-media-copy {
    right: 22px;
    bottom: 22px;
    left: 22px;
  }

  .site-register-media-copy h1 {
    font-size: 2rem;
  }

  .site-register-media-copy p {
    font-size: 0.9rem;
  }

  .site-register-workspace {
    padding: 30px 22px;
  }
}
