body {
  background-color: var(--color-page-bg);
  font-family: "Raleway", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  background: var(--color-shape-soft);
}

body::before {            /* large circle, top-left */
  top: -260px;
  left: -260px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
}

body::after {             /* tilted rounded square, bottom-left */
  left: 6%;
  bottom: -60px;
  width: 260px;
  height: 260px;
  border-radius: 56px;
  transform: rotate(-20deg);
}


.mar-0 { margin: 0; }
.pad-0 { padding: 0; }

img { max-width: 100%; }

/* =========================================================
   LAYOUT
   ========================================================= */
.login-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}


.login-list {
  max-width: 100%;
  box-sizing: border-box;
  list-style: none;
  padding: 0;
}



.login-list-top {
  font-size: 14px;
  letter-spacing: 1px;
  padding-bottom: 20px;
}

.login-list li {
  display: inline-flex;
  align-items: center;
}

.login-list li { gap: 10px; padding-right: 10px; }

.login-list li::before {
  content: "";
  display: inline-block;
  background-color: currentColor;
  border-radius: 50%;
  padding-right: 3px;
}

.login-list li::before {
  width: 6px;
  height: 6px;
}

.login-page {
  position: relative;
  width: 100%;
  max-width: calc(var(--card-max-width) + 48px);
  margin: 50px auto;
}

.login-page--single {
  max-width: 560px;
}


.login-page::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: -80px;
  top: 30px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 32px solid var(--color-shape-soft);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  background: var(--color-white);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 24px 60px var(--color-shadow-md);
}

.login-layout {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  min-height: min(var(--card-min-height), calc(100vh - 48px));
  min-height: min(var(--card-min-height), calc(100dvh - 48px));
}

.login-layout--single {
  grid-template-columns: 1fr;
  min-height: 0;
}

/* =========================================================
   HERO / LEFT PANEL
   ========================================================= */
.hero-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  padding: var(--panel-pad-y) var(--panel-pad-x);
  border-radius: var(--card-radius) 0 0 var(--card-radius);
  background-color: var(--color-primary);
  background-image:
    radial-gradient(circle at 100% 60%, var(--color-shape-hero) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, var(--color-shape-hero) 0%, transparent 35%);
  color: var(--color-white);
}

.hero-banner > * {
  position: relative;
  z-index: 1;
}

.hero-banner::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: -100px;
  top: 12%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 48px solid var(--color-shape-hero);
  pointer-events: none;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.brand-logo .logo-img {
  width: 70px;
  height: auto;
  margin-bottom: 10px;
}

.brand-logo .tagline {
  font-size: 12px;
  opacity: 0.85;
  margin: 0;
}

.hero-banner .brand-logo img {
  filter: drop-shadow(0 2px 8px var(--color-logo-glow));
}

.img-responsive,
.img-logo-left {
  max-width: 100%;
}

.img-responsive { height: 40px; }
.img-logo-left { height: 38px; }

.hero-text {
  margin-top: auto;
}


.hero-text::after {
  content: "";
  position: absolute;
  width: 175px;
  height: 175px;
  left: -110px;
  top: -150px;
  border-radius: 44px;
  border: 1px solid var(--color-shape-hero);
  transform: rotate(24deg);
}

.hero-text h2 {
  font-size: clamp(26px, 3vw + 12px, 40px);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--color-white);
}

.hero-text p {
  margin: 0;
  color: var(--color-white);
}

.hero-text .hero-desc {
  font-size: clamp(15px, 1vw + 11px, 17px);
  line-height: 1.6;
  max-width: 400px;
  opacity: 0.92;
}

.hero-footer {
  margin: 40px 0 0;
  font-size: 14px;
  opacity: 0.85;
}

/* LOGIN / RIGHT PANEL */
.loginSection {
  flex-direction: column;
  align-self: center;
  background: var(--color-white);
  padding: var(--panel-pad-y) var(--panel-pad-x);
}

.loginContent,
.login-formContainer,
.loginBox,
.login-form,
.btn-container {
  width: 100%;
}

.login-formContainer { padding: 0; }

.form-brand { margin-bottom: 28px; }
.form-brand h3 { color: var(--color-heading) !important; }

.top-nav {
  text-align: right;
  margin-bottom: 25px;
}

.create-account-link {
  color: var(--color-link-muted) !important;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.create-account-link:hover,
.subAnchor:hover {
  color: var(--color-primary) !important;
}

.topHeader {
  margin: 0 0 6px;
  padding: 0;
  text-align: center;
  color: var(--color-heading) !important;
  font-size: clamp(20px, 1.5vw + 12px, 24px);
  font-weight: 700;
}

.topSubtitle {
  margin: 0 0 28px;
  font-size: 16px;
  color: var(--color-text-muted);
  text-align: center;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-heading);
}


.input-group {
  border: 1px solid var(--color-border);
  border-radius: var(--field-radius);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: 0 1px 3px var(--color-shadow-sm), 0 1px 2px var(--color-shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group:focus-within {
  border-color: var(--color-primary);
}

.login-form .input-group {
  height: var(--field-height);
  margin-bottom: 18px;
}

.input-group-text {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  padding: 0 10px 0 16px;
  font-size: 16px;
}

.input-group .form-control {
  border: none;
  box-shadow: none;
  font-size: 15px;
  padding: 10px 14px 10px 0;
  min-width: 0;
}

.login-form .input-group .form-control {
  height: 100%;
  padding-top: 0;
  padding-bottom: 0;
  line-height: normal;
}

.toggle-password-btn {
  padding: 0 16px;
  font-size: 16px;
  color: var(--color-text-muted);
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

.toggle-password-btn:hover {
  transform: translateY(-1px);
}


.form-check {
  display: flex;
  align-items: center;
}

.form-check-input {
  margin: 0 6px 0 0;
}

.form-check-label {
  font-size: 13px;
  color: var(--color-text-muted);
}

.subAnchor {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted) !important;
  text-decoration: none;
}

.welcome-page {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ---------- Button ---------- */
.loginBtn {
  width: 100%;
  min-width: 140px;
  height: var(--field-height);
  padding: 0 24px;
  background: var(--color-primary) !important;
  border: none !important;
  border-radius: var(--field-radius);
  color: var(--color-white) !important;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 10px var(--color-primary-shadow);
  transition: all 0.3s ease;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.loginBtn::before,
.loginBtn::after {
  content: none !important;
}

.loginBtn:hover {
  background-color: var(--color-primary-hover) !important;
  transform: translateY(-1px);
}

/* ---------- Error message ---------- */
.alert-danger > strong {
  display: none !important;
}

.alert-danger {
  background-color: var(--color-danger-bg) !important;
  border: none !important;
  border-left: 4px solid var(--color-danger) !important;
  border-radius: 6px !important;
  padding: 10px 14px !important;
  margin-bottom: 16px !important;
  color: var(--color-danger) !important;
  font-size: 0.85rem !important;
  box-shadow: 0 2px 6px var(--color-danger-shadow) !important;
  overflow-wrap: anywhere;
}

.validation-summary-errors ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin-bottom: 0 !important;
}

.validation-summary-errors li {
  font-weight: 500;
}

/* ---------- Password Requirements Box ---------- */
.password-rules-box {
  background-color: var(--color-shape-soft);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.rule-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 25px;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  font-size: 0.825rem;
  color: var(--color-text-muted);
}

.rule-list li {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 16px;
  transition: color 0.2s ease;
}

.rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: var(--color-link-muted);
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.rule-list li.valid {
  color: #28a745 !important;
  font-weight: 600;
}

.rule-list li.valid::before {
  background-color: #28a745 !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  :root {
    --panel-pad-x: 36px;
    --panel-pad-y: 36px;
  }

  .hero-banner::before {
    width: 260px;
    height: 260px;
    border-width: 40px;
  }
}

@media (max-width: 900px) {
  body::before { width: 420px; height: 420px; top: -200px; left: -200px; }
  body::after  { width: 200px; height: 200px; }

  .login-page {
    max-width: 640px;
  }

  .login-page::before {
    display: none;
  }

  .login-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-banner {
    padding: 32px 28px;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
  }

  .hero-banner::before {
    top: -60px;
    right: -80px;
    width: 220px;
    height: 220px;
    border-width: 32px;
  }

  .hero-text {
    margin-top: 40px;
  }

  .hero-text::after {
    display: none;
  }

  .hero-text h2 {
    margin-bottom: 12px;
  }

  .hero-text .hero-desc {
    max-width: 100%;
  }

  .hero-footer {
    margin-top: 24px;
  }

  .loginSection {
    padding: 36px 28px;
  }
}

@media (max-width: 600px) {
  .login-page {
    padding: 16px;
  }

  .topSubtitle {
    margin-bottom: 22px;
  }

  .hero-banner {
    padding: 28px 22px;
  }

  .loginSection {
    padding: 30px 22px;
  }

 
  .login-list,
  .login-list-top {
    padding-left: 16px;
    padding-right: 16px;
  }

  .login-list {
    gap: 10px 16px;
  }

  .login-list-top {
    gap: 6px 10px;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding-bottom: 16px;
  }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start;
  }

  .login-page {
    padding: 12px;
  }

  .hero-banner {
    padding: 24px 20px;
  }

  .hero-banner::before {
    display: none;
  }

  .hero-text {
    margin-top: 28px;
  }

  .hero-footer {
    margin-top: 16px;
    font-size: 13px;
  }

  .loginSection {
    padding: 28px 20px;
  }

  .topSubtitle {
    font-size: 15px;
  }

  .top-nav {
    margin-bottom: 18px;
  }

  .input-group .form-control,
  .input-group-text {
    font-size: 16px;
  }

  .loginBtn {
    min-width: 0;
  }

  .rule-list {
    grid-template-columns: 1fr;
  }

  .login-list {
    gap: 8px 14px;
    font-size: 13px;
  }

  .login-list li { gap: 6px; }

  .login-list-top {
    gap: 4px 8px;
    font-size: 12px;
    letter-spacing: 0.3px;
    padding-bottom: 12px;
  }

  .login-list-top li { gap: 8px; }
}

 /* SetupPassword page scrollable styles */

@media (min-width: 992px) {
    .setup-password-card {
        max-height: 85vh;
        height: 85vh;
        display: flex;
        overflow: hidden;
    }

    .SetupPassword {
        height: 100%;
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow: hidden;
    }

    .SetupPassword .loginSection {
        height: 100%;
        overflow-y: auto;
        
        /* Modern Thin Hover-Reveal Scrollbar */
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
        transition: scrollbar-color 0.3s ease;
    }

    .SetupPassword .loginSection::-webkit-scrollbar {
        width: 6px;
    }

    .SetupPassword .loginSection::-webkit-scrollbar-track {
        background: transparent;
    }

    .SetupPassword .loginSection::-webkit-scrollbar-thumb {
        background-color: transparent; /* Hidden by default */
        border-radius: 10px;
        transition: background-color 0.3s ease;
    }

    /* Reveal scrollbar on hover or focus */
    .SetupPassword .loginSection:hover,
    .SetupPassword .loginSection:focus-within {
        scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    }

    .SetupPassword .loginSection:hover::-webkit-scrollbar-thumb,
    .SetupPassword .loginSection:focus-within::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
    }
}

@media (max-width: 991.98px) {
    .setup-password-card {
        height: auto;
        max-height: none;
        overflow: visible;
    }
    
    .SetupPassword {
        height: auto;
        overflow: visible;
    }

    .SetupPassword .loginSection {
        height: auto;
        overflow-y: visible;
    }
}

@media (max-width: 360px) {
  .login-page {
    padding: 8px;
  }

  .hero-banner,
  .loginSection {
    padding-left: 16px;
    padding-right: 16px;
  }

  .input-group-text {
    padding-left: 12px;
  }

  .toggle-password-btn {
    padding: 0 12px;
  }

  
  .login-list,
  .login-list-top {
    padding-left: 8px;
    padding-right: 8px;
  }

  .login-list {
    gap: 6px 12px;
    font-size: 12px;
  }

  .login-list-top {
    font-size: 11px;
    letter-spacing: 0;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  body {
    align-items: flex-start;
  }

  .login-content {
    min-height: 0;
  }

  .login-layout {
    min-height: 0;
  }

  .hero-text {
    margin-top: 24px;
  }

  .login-list-top {
    padding-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .loginBtn:hover,
  .toggle-password-btn:hover {
    transform: none;
  }
}

/* ==========================================================================
   Setup Password – password requirements checklist
   Ported from the Angular input.component.scss
   ========================================================================== */

/* ---- Input group states (icon, input and eye button share one border) ---- */
.input-group.pw-focus {
    border-radius: var(--bs-border-radius, 0.375rem);
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12);
}

.input-group.pw-focus .input-group-text,
.input-group.pw-focus .form-control,
.input-group.pw-focus .toggle-password-btn {
    border-color: #F26522;
}

.input-group.pw-focus .form-control:focus {
    box-shadow: none;
}

.input-group.pw-error .input-group-text,
.input-group.pw-error .form-control,
.input-group.pw-error .toggle-password-btn {
    border-color: #dc2626;
}

/* ---- Checklist box ---- */
.password-checklist {
    margin-top: 8px;
    padding: 10px 12px 12px;
    border: 1px solid #fde3d4;
    border-radius: 8px;
    background-color: #fff8f4;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.password-checklist-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #657489;
}

.password-checklist-title .fa {
    font-size: 15px;
    color: #F26522;
}

/* Password checklist container layout */
.password-checklist-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* Force 2 equal columns on screens wide enough to fit them, fall back to 1 column */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
}

/* Fallback for smaller screens / narrow containers */
@media (max-width: 480px) {
    .password-checklist-items {
        grid-template-columns: 1fr;
    }
}

/* ---- Pill: grey ring -> green tick when met -> red cross when broken ---- */
.password-checklist-item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background-color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: #4b5563;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.password-checklist-item.met {
    border-color: #86efac;
    background-color: #f0fdf4;
    color: #15803d;
}

/* Spaces / max length only appear once broken, so they are always an error */
.password-checklist-item.is-error:not(.met) {
    border-color: #fca5a5;
    color: #b91c1c;
}

/* ---- Icons: same 12px slot so labels start at the same x ---- */
.password-checklist-item > .password-checklist-check,
.password-checklist-item > .password-checklist-cross,
.password-checklist-item > .password-checklist-ring {
    display: none;
    flex-shrink: 0;
}

.password-checklist-item > .password-checklist-check,
.password-checklist-item > .password-checklist-cross {
    width: 12px;
    font-size: 12px;
    text-align: center;
}

.password-checklist-item > .password-checklist-check {
    color: #16a34a;
}

.password-checklist-item > .password-checklist-cross {
    color: #dc2626;
}

.password-checklist-item > .password-checklist-ring {
    width: 8px;
    height: 8px;
    margin: 0 2px;
    box-sizing: border-box;
    border: 1.5px solid #9ca3af;
    border-radius: 50%;
}

/* Exactly one icon per state */
.password-checklist-item:not(.met):not(.is-error) > .password-checklist-ring {
    display: inline-block;
}

.password-checklist-item.met > .password-checklist-check {
    display: inline-block;
}

.password-checklist-item.is-error:not(.met) > .password-checklist-cross {
    display: inline-block;
}

/* ---- Field left with unmet rules: red box, crosses replace the rings ---- */
.password-checklist.has-error {
    border-color: #fecaca;
    background-color: #fef2f2;
}

.password-checklist.has-error .password-checklist-title .fa {
    color: #dc2626;
}

.password-checklist.has-error .password-checklist-item:not(.met) {
    border-color: #fca5a5;
    color: #b91c1c;
}

.password-checklist.has-error .password-checklist-item:not(.met) > .password-checklist-ring {
    display: none;
}

.password-checklist.has-error .password-checklist-item:not(.met) > .password-checklist-cross {
    display: inline-block;
}

/* ---- "Passwords do not match." pill ---- */
.validation-requirement {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 2px 6px;
    line-height: 1.4;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background-color: #ffe2e2;
    border: 1px solid #ffc5c5;
    border-radius: 4px;
}

.validation-requirement-icon {
    flex-shrink: 0;
    font-size: 12px;
    color: #ef4444;
}

.validation-requirement-label {
    color: #6b7280;
}

/* ---- Show / hide animation ---- */
.validation-requirement-enter {
    animation: validationRequirementEnter 200ms ease-out;
}

.validation-requirement-leave {
    animation: validationRequirementLeave 180ms ease-in forwards;
}

@keyframes validationRequirementEnter {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes validationRequirementLeave {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); }
}

/* Toast Notifications */
/* Success */
#toast-container > .toast-success {
    background-color: var(--color-success);
}

/* Error */
#toast-container > .toast-error {
    background-color: var(--color-danger);
}