/* =====================================================================
   AUTH SHARED STYLESHEET
   Used by: log-in.ejs, log-in-user-selection.ejs, reset-password.ejs,
            change-password.ejs

   Include once per page:
   <link rel="stylesheet" href="/frontend-dependencies/css/auth-shared.css">

   This replaces the duplicated <style> blocks that used to live inside
   each of the four auth .ejs files. If you spot a visual difference on
   a page that isn't covered here, it's a leftover page-specific rule —
   check the bottom of that page's own <style> block (kept intentionally
   minimal / page-only overrides).
   ===================================================================== */

:root {
  --navy-primary: #081e4f;
  --navy-dark: #051436;
  --blue-accent: #42a5f5;
  --blue-light: #eff6ff;
  --text-heading: #1e293b;
  --text-body: #475569;
  --text-muted: #94a3b8;
  --bg-body: #ffffff;
  --border-light: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --radius-input: 8px;
  --radius-card: 20px;
  --shadow-card: 0 24px 60px -24px rgba(8, 30, 79, 0.22);
  --z-modal: 2000;
}

* {
  box-sizing: border-box;
}
body {
  font-family: "Inter", sans-serif;
  color: var(--text-body);
  margin: 0;
  padding: 0;
}
h1,
h2,
h3 {
  font-family: "Outfit", sans-serif;
  color: var(--text-heading);
  margin: 0;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* =====================================================================
   CUSTOM UTILITY POLYFILLS
   Bootstrap 4 has no utility for these — added here instead of
   reinventing spacing/flex/typography Bootstrap 4 already covers.
   ===================================================================== */
.fw-semibold {
  font-weight: 600;
}
.gap-3 {
  gap: 1rem;
}
.btn-rounded-app {
  border-radius: 12px;
  padding: 12px 22px !important;
  min-width: 170px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.btn-rounded-app:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.btn-rounded-app .material-icons-round {
  font-size: 26px;
  margin-right: 10px !important;
}

/* =====================================================================
   PAGE LAYOUT — split screen (login / reset / change all share this)
   Structural display/flex/grid/visibility is handled by Bootstrap 4
   grid + utility classes in the markup (container-fluid > row > col-lg-5
   / col-lg-7, d-none d-lg-flex, etc). These rules hold only what
   Bootstrap 4 has no utility for: the exact custom look.
   ===================================================================== */
.auth-layout {
  background: #f4f7fb;
  opacity: 0;
  transform: translateY(10px);
  animation: fadePage 0.6s ease forwards;
}
@keyframes fadePage {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-visual-side {
  color: #fff;
  overflow: hidden;
  overflow-y: auto;
  background: linear-gradient(
    135deg,
    var(--navy-primary),
    var(--navy-dark),
    #0b2a6f
  );
  background-size: 200% 200%;
  animation: gradientShift 12s ease infinite;
}
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.visual-bg-circle {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(66, 165, 245, 0.2) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  animation: floatOrb 8s ease-in-out infinite alternate;
}
@keyframes floatOrb {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-20px, 40px);
  }
}
.visual-bg-blur {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, var(--navy-dark) 0%, transparent 100%);
  z-index: 1;
}

.brand-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  z-index: 10;
  width: 100%;
}
.logo-icon-bg {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  flex: none;
}
.brand-name {
  font-family: "Outfit";
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 1.1rem;
}
.brand-name-dark {
  font-family: "Outfit";
  font-weight: 700;
  color: var(--navy-primary);
  font-size: 1.2rem;
}

.visual-content {
  position: relative;
  z-index: 10;
  margin-top: auto;
  margin-bottom: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.visual-title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--blue-light);
}
.visual-desc {
  font-size: 1rem;
  opacity: 0.8;
  line-height: 1.6;
  margin: 0 auto 1.5rem;
  max-width: 340px;
}

.visual-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  transition: transform 0.3s ease;
  min-width: 360px;
}
.visual-card hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 12px 0 16px;
}
.visual-card .support-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.visual-card .support-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.visual-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}
.visual-footer {
  position: relative;
  z-index: 10;
  font-size: 0.8rem;
  opacity: 0.5;
  text-align: center;
}

.material-icons-round,
.material-icons-outlined {
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
a:hover .material-icons-round,
a:hover .material-icons-outlined {
  transform: scale(1.15);
  opacity: 0.8;
}

/* --- Right form side --- */
.auth-form-side {
  padding: 2.5rem 1.5rem;
}
.mobile-auth-header {
  gap: 10px;
  margin-bottom: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2.4rem 2.2rem 2rem;
  position: relative;
  overflow: hidden;
}
.form-container-limit {
  width: 100%;
  max-width: 440px;
}

.step-track {
  height: 3px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.6rem;
}
.step-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-accent), #2f6fd6);
  width: 33%;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-header {
  margin-bottom: 1.75rem;
}
.auth-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.auth-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.fade-step {
  animation: fadeStepIn 0.35s ease;
}
@keyframes fadeStepIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.back-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 16px;
  width: fit-content;
}
.back-row:hover {
  color: var(--navy-primary);
}
.back-row .material-icons-round {
  font-size: 18px;
}

/* =====================================================================
   FORM ELEMENTS
   ===================================================================== */
.form-group {
  position: relative;
}
.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.input-with-icon {
  position: relative;
}
.input-with-icon .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
  transition: 0.2s;
}
.styled-input {
  width: 100%;
  padding: 12px 12px 12px 42px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-input);
  font-size: 0.95rem;
  color: var(--text-heading);
  background: #fff;
  transition: all 0.2s ease;
  outline: none;
}
.styled-input:focus {
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 4px rgba(66, 165, 245, 0.15);
}
.styled-input:focus ~ .icon {
  color: var(--blue-accent);
}
.styled-input::placeholder {
  color: #cbd5e1;
}

.btn-toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  display: flex;
  transition: 0.2s;
  border-radius: 10px;
}
.btn-toggle-pass:hover {
  color: var(--navy-primary);
}

.btn-submit-block {
  width: 100%;
  background: var(--navy-primary);
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: var(--radius-input);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px -6px rgba(8, 30, 79, 0.4);
  position: relative;
  overflow: hidden;
}
.btn-submit-block:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(8, 30, 79, 0.45);
}
.btn-submit-block:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-submit-block::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-25deg);
}
.btn-submit-block:hover::after {
  animation: shine 0.8s forwards;
}
@keyframes shine {
  100% {
    left: 150%;
  }
}

.btn-outline-block {
  flex: 1;
  background: #fff;
  border: 1.5px solid var(--border-light);
  color: var(--text-body);
  padding: 11px;
  border-radius: var(--radius-input);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}
.btn-outline-block:hover {
  border-color: var(--text-muted);
}

.link-bold {
  color: var(--navy-primary);
  font-weight: 700;
  text-decoration: none;
}
.link-bold:hover {
  text-decoration: underline;
}
.btn-link-forgot {
  background: none;
  border: none;
  padding: 0;
  color: var(--blue-accent);
  font-size: 0.85rem;
  font-weight: 500;
  transition: 0.2s;
}
.btn-link-forgot:hover {
  color: var(--navy-dark);
  text-decoration: underline;
}

.custom-checkbox {
  padding-left: 0;
  display: flex;
  align-items: center;
}
.custom-checkbox .form-check-input {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  margin-top: 0;
  margin-right: 8px;
  cursor: pointer;
  float: none;
}
.custom-checkbox .form-check-input:checked {
  background-color: var(--navy-primary);
  border-color: var(--navy-primary);
}
.custom-checkbox .form-check-label {
  cursor: pointer;
  user-select: none;
}

/* =====================================================================
   OPTION CARDS — method choice (Password/OTP, Link/OTP) & send-via
   ===================================================================== */
.option-group {
  display: flex;
  gap: 12px;
  margin-bottom: 1.4rem;
}
.option-card {
  flex: 1;
  border: 1.5px solid var(--border-light);
  border-radius: 14px;
  padding: 16px 12px;
  cursor: pointer;
  position: relative;
  text-align: center;
  background: #fff;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.option-card input {
  display: none;
}
.option-card:hover {
  border-color: var(--blue-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(8, 30, 79, 0.22);
}
.option-card.active {
  border-color: var(--blue-accent);
  background: var(--blue-light);
  box-shadow: 0 10px 24px -10px rgba(66, 165, 245, 0.4);
}
.option-card .tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  transition: 0.25s;
}
.option-card.active .tile-icon {
  background: linear-gradient(135deg, var(--navy-primary), #1b3a7a);
  color: #fff;
  transform: scale(1.08);
}
.option-card .tile-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-heading);
}
.option-card .tile-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}
.option-card .tile-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--blue-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.4);
  transition: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.option-card.active .tile-check {
  opacity: 1;
  transform: scale(1);
}
.option-card .tile-check .material-icons-round {
  font-size: 12px;
  color: #fff;
}

.channel-group {
  display: flex;
  gap: 10px;
  margin-bottom: 1.2rem;
}
.channel-card {
  flex: 1;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.2s;
  background: #fff;
}
.channel-card input {
  display: none;
}
.channel-card:hover {
  border-color: var(--blue-accent);
}
.channel-card.active {
  border-color: var(--blue-accent);
  background: var(--blue-light);
  box-shadow: 0 8px 18px -10px rgba(66, 165, 245, 0.4);
}
.channel-card .ct-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--blue-light);
  color: var(--navy-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: 0.2s;
}
.channel-card.active .ct-icon {
  background: var(--navy-primary);
  color: #fff;
}
.channel-card .ct-text {
  text-align: left;
}
.channel-card .ct-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  display: block;
}
.channel-card .ct-check {
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  flex: none;
}
.channel-card.active .ct-check {
  background: var(--blue-accent);
  border-color: var(--blue-accent);
}
.channel-card .ct-check .material-icons-round {
  font-size: 10px;
  color: #fff;
  opacity: 0;
  transition: 0.2s;
}
.channel-card.active .ct-check .material-icons-round {
  opacity: 1;
}

/* =====================================================================
   OTP INPUT
   ===================================================================== */
.otp-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}
.otp-box {
  width: 46px;
  height: 54px;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-heading);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}
.otp-box:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(66, 165, 245, 0.15);
}
.otp-box.filled {
  border-color: var(--blue-accent);
}
.otp-row.shake {
  animation: shake 0.4s;
}
.otp-row.pulse .otp-box {
  animation: pulseok 0.5s;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}
@keyframes pulseok {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
    border-color: var(--success);
  }
  100% {
    transform: scale(1);
  }
}
.resend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* =====================================================================
   PASSWORD STRENGTH + REQUIREMENTS CHECKLIST
   ===================================================================== */
.strength-track {
  height: 5px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}
.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--danger);
  transition:
    width 0.35s ease,
    background 0.35s ease;
}
.pw-checklist {
  list-style: none;
  padding: 0;
  margin: 10px 0 1.1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.pw-checklist li {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.pw-checklist li .material-icons-round {
  font-size: 15px;
  color: #cbd5e1;
  transition:
    color 0.2s,
    transform 0.2s;
}
.pw-checklist li.met {
  color: var(--success);
}
.pw-checklist li.met .material-icons-round {
  color: var(--success);
  transform: scale(1.1);
}

/* =====================================================================
   SUCCESS STATE
   ===================================================================== */
.success-state {
  text-align: center;
  padding: 14px 0 6px;
}
.success-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: popin 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.success-check .material-icons-round {
  font-size: 34px;
  color: var(--success);
}
@keyframes popin {
  0% {
    transform: scale(0);
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
.success-state h3 {
  font-size: 18px;
  margin-bottom: 6px;
}
.success-state p {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* =====================================================================
   PROFILE SUMMARY CARD (change-password.ejs)
   ===================================================================== */
.profile-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.6rem;
}
.profile-avatar-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--blue-accent), var(--navy-primary));
  flex: none;
}
.profile-avatar-ring .inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--navy-primary);
  font-size: 17px;
  overflow: hidden;
}
.profile-avatar-ring .inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
}
.profile-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* =====================================================================
   ACCOUNT SELECTION MODAL (#accountModal)
   ===================================================================== */
.modal-backdrop.show {
  opacity: 1;
  background: rgba(5, 20, 54, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#accountModal .modal-dialog {
  max-width: 560px;
}
#accountModal.fade .modal-dialog {
  transform: scale(0.92) translateY(14px);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s;
}
#accountModal.show .modal-dialog {
  transform: scale(1) translateY(0);
}
#accountModal .modal-content {
  border-radius: 24px;
  border: none;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(5, 20, 54, 0.55);
}

.acct-modal-header {
  background: linear-gradient(
    135deg,
    var(--navy-primary) 0%,
    #123a7a 60%,
    #1c4a94 100%
  );
  padding: 28px 26px 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.acct-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  opacity: 0.55;
  pointer-events: none;
}
.acct-orb.o1 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--blue-accent), transparent 70%);
  top: -60px;
  right: -30px;
  animation: orbFloat1 7s ease-in-out infinite;
}
.acct-orb.o2 {
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, #7dd3fc, transparent 70%);
  bottom: -50px;
  left: 20px;
  animation: orbFloat2 9s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-14px, 10px) scale(1.12);
  }
}
@keyframes orbFloat2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(12px, -8px) scale(1.08);
  }
}

.acct-modal-header .icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}
.acct-modal-header .modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: 0.2s;
}
.acct-modal-header .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}
.acct-modal-header h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}
.acct-modal-header p {
  color: #c3d3f5;
  font-size: 12.5px;
  margin: 0;
  position: relative;
  z-index: 2;
}

.acct-search {
  position: relative;
  margin: 18px 24px 6px;
}
.acct-search input {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: 999px;
  padding: 10px 14px 10px 38px;
  font-size: 13px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.acct-search input:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 4px rgba(66, 165, 245, 0.15);
}
.acct-search .material-icons-round {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-muted);
}

.acct-list {
  max-height: 410px;
  overflow-y: auto;
  padding: 8px 24px 4px;
  min-height: 350px;
}
.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 18px;
  padding: 13px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  position: relative;
  background: #fff;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
  opacity: 0;
  animation: cardIn 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.account-card:hover {
  border-color: var(--blue-accent);
  box-shadow: 0 16px 32px -16px rgba(8, 30, 79, 0.3);
}
.account-card.selected {
  border-color: transparent;
  background: var(--blue-light);
  box-shadow: 0 16px 34px -14px rgba(66, 165, 245, 0.45);
}
.account-card.selected::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1.5px;
  background: linear-gradient(
    120deg,
    var(--blue-accent),
    var(--navy-primary),
    var(--blue-accent)
  );
  background-size: 220% 220%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderFlow 2.5s linear infinite;
  pointer-events: none;
}
@keyframes borderFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.used-badge {
  position: absolute;
  top: -8px;
  left: 52px;
  background: var(--navy-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 10px -3px rgba(8, 30, 79, 0.5);
}

.account-avatar {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--blue-accent), var(--navy-primary));
  transition: transform 0.3s;
  overflow: visible;
  font-size: 0;
}
.account-card.selected .account-avatar {
  background: conic-gradient(
    from 0deg,
    var(--blue-accent),
    var(--navy-primary),
    #7dd3fc,
    var(--blue-accent)
  );
  /* animation: spinRing 3s linear infinite; */
}
/* @keyframes spinRing {
  to {
    transform: rotate(360deg);
  }
} */
.account-avatar .avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--navy-primary);
  font-size: 14.5px;
  overflow: hidden;
}
.account-avatar .avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-check {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0);
  transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
.account-card.selected .avatar-check {
  transform: scale(1);
}
.avatar-check .material-icons-round {
  font-size: 10px;
  color: #fff;
}
.avatar-ripple {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--blue-accent);
  opacity: 0;
  pointer-events: none;
}
.account-card.selected .avatar-ripple {
  animation: rippleOut 0.6s ease-out;
}
@keyframes rippleOut {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

.acct-info {
  flex: 1;
  min-width: 0;
}
.acct-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.account-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-heading);
  margin: 0;
}
.plan-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.plan-badge.admin {
  background: #fef3c7;
  color: #92400e;
}
.plan-badge.member {
  background: var(--blue-light);
  color: var(--navy-primary);
}
.plan-badge.free {
  background: #f1f5f9;
  color: #64748b;
}
.account-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.acct-modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border-light);
}
.acct-modal-footer .btn-submit-block {
  flex: 1.4;
  padding: 11px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 992px) {
  .auth-form-side {
    padding: 24px 12px;
    padding-top: 3rem;
  }
  .mobile-auth-header {
    margin-bottom: 30px;
  }
}

@media (max-width: 575px) {
  .auth-card {
    padding: 24px 18px 22px;
    border-radius: 16px;
  }
  .form-container-limit {
    max-width: 100%;
  }
  .auth-header h2 {
    font-size: 19px;
  }
  .auth-header p {
    font-size: 12.5px;
  }

  /* iOS zooms in on inputs under 16px on focus */
  .styled-input,
  .acct-search input {
    font-size: 16px;
  }
  .otp-box {
    font-size: 16px;
  }

  .otp-row {
    gap: 6px;
  }
  .otp-box {
    width: 44px;
    flex: 1 1 44px;
    height: 48px;
  }

  .option-group {
    gap: 8px;
  }
  .option-card {
    padding: 13px 6px;
  }
  .option-card .tile-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
  }
  .option-card .tile-title {
    font-size: 13px;
  }
  .option-card .tile-sub {
    font-size: 10px;
  }

  .channel-group {
    flex-direction: column;
    gap: 8px;
  }
  .channel-card {
    padding: 10px 12px;
  }

  .pw-checklist {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .pw-checklist li {
    font-size: 10.5px;
  }

  #accountModal .modal-dialog {
    max-width: 96vw;
    margin: 8px auto;
  }
  .acct-modal-header {
    padding: 22px 18px 18px;
  }
  .acct-search {
    margin: 14px 18px 6px;
  }
  .acct-list {
    padding: 6px 18px 4px;
    max-height: min(50vh, 320px);
  }
  .account-card {
    padding: 11px 12px;
    gap: 11px;
  }
  .account-avatar {
    width: 42px;
    height: 42px;
  }
  .used-badge {
    left: 46px;
    font-size: 8.5px;
  }
  .acct-modal-footer {
    padding: 14px 18px 18px;
    flex-direction: column-reverse;
    gap: 8px;
  }
}

@media (max-width: 360px) {
  .otp-box {
    width: 38px;
    flex: 1 1 38px;
    height: 44px;
    font-size: 15px;
  }
  .otp-row {
    gap: 4px;
  }
}
