/* Opt-in to cross-document view transitions (Chrome 126+, Safari 18.2+) */
@view-transition {
  navigation: auto;
}

/* @property Fallback Declarations */

/* --- Colors: Surface --- */
@property --color-surface-50  { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --color-surface-100 { syntax: "<color>"; inherits: true; initial-value: #e6eefa; }
@property --color-surface-200 { syntax: "<color>"; inherits: true; initial-value: #d8e0ed; }
@property --color-surface-300 { syntax: "<color>"; inherits: true; initial-value: #c0c9d5; }
@property --color-surface-400 { syntax: "<color>"; inherits: true; initial-value: #a8b0bc; }
@property --color-surface-500 { syntax: "<color>"; inherits: true; initial-value: #677282; }
@property --color-surface-600 { syntax: "<color>"; inherits: true; initial-value: #5b6571; }
@property --color-surface-700 { syntax: "<color>"; inherits: true; initial-value: #3f464f; }
@property --color-surface-800 { syntax: "<color>"; inherits: true; initial-value: #2c3035; }
@property --color-surface-900 { syntax: "<color>"; inherits: true; initial-value: #1f2227; }

/* --- Colors: Primary --- */
@property --color-primary-50  { syntax: "<color>"; inherits: true; initial-value: #8bdee3; }
@property --color-primary-100 { syntax: "<color>"; inherits: true; initial-value: #27cfd9; }
@property --color-primary-200 { syntax: "<color>"; inherits: true; initial-value: #00adb8; }
@property --color-primary-300 { syntax: "<color>"; inherits: true; initial-value: #178e96; }
@property --color-primary-400 { syntax: "<color>"; inherits: true; initial-value: #2b787e; }

/* --- Colors: CMS --- */
@property --color-cms-50  { syntax: "<color>"; inherits: true; initial-value: #f8e5e0; }
@property --color-cms-100 { syntax: "<color>"; inherits: true; initial-value: #ea6f4e; }
@property --color-cms-200 { syntax: "<color>"; inherits: true; initial-value: #e94f26; }
@property --color-cms-300 { syntax: "<color>"; inherits: true; initial-value: #ba3713; }
@property --color-cms-400 { syntax: "<color>"; inherits: true; initial-value: #961f00; }

/* --- Semantic Status Colors --- */
@property --color-hover-bg       { syntax: "<color>"; inherits: true; initial-value: #F3F3F3; }

@property --color-success-50     { syntax: "<color>"; inherits: true; initial-value: #F0F9F1; }
@property --color-success-100    { syntax: "<color>"; inherits: true; initial-value: #E8F5E9; }
@property --color-success-200    { syntax: "<color>"; inherits: true; initial-value: #C8E6C9; }
@property --color-success-300    { syntax: "<color>"; inherits: true; initial-value: #2E7D32; }

@property --color-danger-50      { syntax: "<color>"; inherits: true; initial-value: #fef2f2; }
@property --color-danger-100     { syntax: "<color>"; inherits: true; initial-value: #ffcdd2; }
@property --color-danger-300     { syntax: "<color>"; inherits: true; initial-value: #d32f2f; }

@property --color-warning-50     { syntax: "<color>"; inherits: true; initial-value: #FFF8E1; }
@property --color-warning-100    { syntax: "<color>"; inherits: true; initial-value: #FFE082; }
@property --color-warning-300    { syntax: "<color>"; inherits: true; initial-value: #F57F17; }

/* --- Spacing --- */
@property --spacing-xxxs { syntax: "<length>"; inherits: true; initial-value: 4px; }
@property --spacing-xxs  { syntax: "<length>"; inherits: true; initial-value: 8px; }
@property --spacing-xs   { syntax: "<length>"; inherits: true; initial-value: 10px; }
@property --spacing-sm   { syntax: "<length>"; inherits: true; initial-value: 12px; }
@property --spacing-md   { syntax: "<length>"; inherits: true; initial-value: 16px; }
@property --spacing-lg   { syntax: "<length>"; inherits: true; initial-value: 20px; }
@property --spacing-xl   { syntax: "<length>"; inherits: true; initial-value: 24px; }
@property --spacing-xxl  { syntax: "<length>"; inherits: true; initial-value: 32px; }
@property --spacing-xxxl { syntax: "<length>"; inherits: true; initial-value: 48px; }

/* --- Font Weight --- */
@property --font-weight-light    { syntax: "<number>"; inherits: false; initial-value: 400; }
@property --font-weight-regular  { syntax: "<number>"; inherits: false; initial-value: 400; }
@property --font-weight-medium   { syntax: "<number>"; inherits: false; initial-value: 500; }
@property --font-weight-semibold { syntax: "<number>"; inherits: false; initial-value: 600; }
@property --font-weight-bold     { syntax: "<number>"; inherits: false; initial-value: 800; }

/* --- Font Size --- */
@property --font-size-xxxs { syntax: "<length>"; inherits: true; initial-value: 10px; }
@property --font-size-xxs  { syntax: "<length>"; inherits: true; initial-value: 12px; }
@property --font-size-xs   { syntax: "<length>"; inherits: true; initial-value: 14px; }
@property --font-size-sm   { syntax: "<length>"; inherits: true; initial-value: 16px; }
@property --font-size-md   { syntax: "<length>"; inherits: true; initial-value: 18px; }
@property --font-size-lg   { syntax: "<length>"; inherits: true; initial-value: 24px; }
@property --font-size-xl   { syntax: "<length>"; inherits: true; initial-value: 30px; }
@property --font-size-xxl  { syntax: "<length>"; inherits: true; initial-value: 48px; }
@property --font-size-xxxl { syntax: "<length>"; inherits: true; initial-value: 60px; }

/* --- Opacity --- */
@property --opacity-60 { syntax: "<number>"; inherits: false; initial-value: 0.6; }
@property --opacity-40 { syntax: "<number>"; inherits: false; initial-value: 0.4; }
@property --opacity-20 { syntax: "<number>"; inherits: false; initial-value: 0.2; }

/* --- Radius --- */
@property --radius-md { syntax: "<length>"; inherits: false; initial-value: 10px; }

/* Fonts */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Reset & Root Variables */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
html {
  margin: 0;
  padding: 0;
}

input,
button,
select,
textarea {
  font-family: inherit;
}

html {
  overflow: hidden;
}

body {
  overflow: hidden;
  overflow-y: auto;
  /* Right half matches aside background so POST-redirect navigations never flash white */
  background: linear-gradient(to right, #f7f8fa 50%, #00304a 50%);
}

html {
  font-size: 62.5%;
  font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;

  /* oklch values override the @property hex fallbacks in supporting browsers */
  --color-surface-50:  oklch(100% 0 89.88);
  --color-surface-100: oklch(94.66% 0.02 258.35);
  --color-surface-200: oklch(90.45% 0.02 260.17);
  --color-surface-300: oklch(83.26% 0.02 255.55);
  --color-surface-400: oklch(75.46% 0.02 258.36);
  --color-surface-500: oklch(54.86% 0.03 257.67);
  --color-surface-600: oklch(50.25% 0.02 253.03);
  --color-surface-700: oklch(39.12% 0.02 254.74);
  --color-surface-800: oklch(30.73% 0.01 253.99);
  --color-surface-900: oklch(25.1% 0.01 260.69);

  --color-primary-50:  oklch(84.94% 0.08 200.65);
  --color-primary-100: oklch(78.02% 0.13 201.35);
  --color-primary-200: oklch(68.1% 0.12 202.84);
  --color-primary-300: oklch(59.08% 0.1 202.2);
  --color-primary-400: oklch(52.85% 0.07 202.44);

  --color-cms-50:  oklch(93.58% 0.022 35.12);
  --color-cms-100: oklch(68.22% 0.16 36.02);
  --color-cms-200: oklch(63.52% 0.197 35.3);
  --color-cms-300: oklch(52.89% 0.173 35.06);
  --color-cms-400: oklch(43.93% 0.159 33.85);

  --spacing-xxxs: 0.4rem;
  --spacing-xxs:  0.8rem;
  --spacing-xs:   1rem;
  --spacing-sm:   1.2rem;
  --spacing-md:   1.6rem;
  --spacing-lg:   2rem;
  --spacing-xl:   2.4rem;
  --spacing-xxl:  3.2rem;
  --spacing-xxxl: 4.8rem;

  --font-size-xxxs: 1rem;
  --font-size-xxs:  1.2rem;
  --font-size-xs:   1.4rem;
  --font-size-sm:   1.6rem;
  --font-size-md:   1.8rem;
  --font-size-lg:   2.4rem;
  --font-size-xl:   3rem;
  --font-size-xxl:  4.8rem;
  --font-size-xxxl: 6rem;
}

@media (max-height: 600px) {
  html {
    --font-size-md: 1.2rem;
    --font-size-xl: 2.4rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.6rem;
  }
}

/* Layout */

.wrapper {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.main {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  flex: 0 0 clamp(768px, 40%, 1200px);
  padding: 6vh 6vw 4vh;
  z-index: 3;
  --color-page-bg: #f7f8fa;
  background-color: var(--color-page-bg);
  overflow-y: auto;
}

@media (max-width: 1200px) {
  .main {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .main {
    flex: 1 1 100%;
    min-width: 0;
    padding: 4vh 4vw;
  }
}

/* Logo + Card */

.logo-card-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  align-self: center;
}

.logo-card-wrapper .logo-container {
  position: relative;
  display: inline-block;
  overflow: visible;
  align-self: flex-start;
}

.logo-card-wrapper .logo-img {
  display: block;
  position: relative;
  z-index: 1;
  width: 230px;
  height: auto;
  margin-bottom: 3.4rem;
}

.card-container {
  max-width: 520px;
  width: 100%;
  align-self: stretch;
  margin: 0 auto;
  padding: 0;
  animation: card-enter 0.2s ease-out;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.card-container .form {
  padding: 0;
  max-width: none;
}

@media (max-width: 768px) {
  .card-container {
    max-width: none;
    padding: var(--spacing-lg) 0;
  }
}

.logo-card-wrapper .signal-wrapper {
  position: absolute;
  width: 200px;
  height: 200px;
  display: none;
  z-index: 0;
  pointer-events: none;
  top: 6px;
  left: 72px;
  transform: translate(-50%, -50%);
}

.signal-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 25px solid var(--color-primary-200);
  transform: translate(-50%, -50%) scale(0);
  animation: signal-pulse 3s infinite ease-out;
}

.signal-ring:nth-child(1) { animation-delay: 0s;    --pulse-scale: 0.9;  --pulse-opacity: 0.8;  }
.signal-ring:nth-child(2) { animation-delay: 0.2s;  --pulse-scale: 0.8;  --pulse-opacity: 0.6;  }
.signal-ring:nth-child(3) { animation-delay: 0.4s;  --pulse-scale: 0.75; --pulse-opacity: 0.75; }
.signal-ring:nth-child(4) { animation-delay: 0.6s;  --pulse-scale: 0.7;  --pulse-opacity: 0.58; }
.signal-ring:nth-child(5) { animation-delay: 0.8s;  --pulse-scale: 0.65; --pulse-opacity: 0.72; }
.signal-ring:nth-child(6) { animation-delay: 1s;    --pulse-scale: 0.6;  --pulse-opacity: 0.65; }

@keyframes signal-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: var(--pulse-opacity);
  }
  66.6% {
    transform: translate(-50%, -50%) scale(var(--pulse-scale));
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(var(--pulse-scale));
    opacity: 0;
  }
}

.aside .signal-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.aside {
  flex: 1 1 0;
  position: relative;
  min-height: 500px;
  overflow: hidden;
  height: 100%;
  contain: paint layout;
  background-color: #00304a;
  background-image: url('../img/background.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (max-width: 1200px) {
  .aside {
    display: none;
  }

  body {
    background: #f7f8fa;
  }
}

.aside .truck-wrapper {
  position: absolute;
  top: 54%;
  left: 50%;
}

.aside .image-truck {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-height: 60px;
  height: 12vh;
  width: 50vh;
  z-index: 2;
  background: url('../img/truck.webp') center / contain no-repeat;
}

.aside .logo {
  position: absolute;
  bottom: 17px;
  right: 45px;
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.aside .logo p {
  color: var(--color-surface-50);
  font-weight: var(--font-weight-light);
  font-size: var(--font-size-sm);
}

/* Form */

.form {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 640px;
}

.form .title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-top: 0;
  margin-bottom: var(--spacing-xxl);
  text-align: left;
}

/* Reset paragraph margin inside flex form to prevent UA margin compounding */
.form .text-muted,
.form .text-muted--sm {
  margin-top: 0;
}

.input-container {
  position: relative;
  margin-bottom: var(--spacing-lg);
  display: block;
  width: 100%;
}

.input-container input {
  width: 100%;
  height: 4.8rem;
  border: 1px solid var(--color-surface-200);
  border-radius: 8px;
  padding: 0 var(--spacing-sm);
  background: var(--color-surface-50);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  outline: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  color: var(--color-surface-900);
  transition: border-color 0.2s ease, border-width 0.2s ease, box-shadow 0.2s ease;
}

.input-container input:hover {
  border-color: var(--color-surface-300);
}

.input-container input:focus {
  border: 2px solid var(--color-primary-200);
  padding: 0 calc(var(--spacing-sm) - 1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.input--invalid {
  border-color: var(--color-cms-300) !important;
  animation: shake 0.4s ease;
}

.input--invalid ~ .label {
  color: var(--color-cms-300) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.input-container .password-toggle {
  position: absolute;
  right: var(--spacing-sm);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-surface-400);
  font-size: var(--font-size-sm);
  padding: var(--spacing-xxxs);
  transition: color 0.2s ease;
}

.input-container .password-toggle:hover {
  color: var(--color-surface-700);
}

.forgot-password-link {
  text-align: right;
  margin-top: calc(-1 * var(--spacing-sm));
  margin-bottom: var(--spacing-xl);
}

.forgot-password-link a {
  font-size: var(--font-size-xs);
  color: var(--color-primary-200);
  text-decoration: none;
}

.forgot-password-link a:hover {
  text-decoration: underline;
}

.input-container .label {
  position: absolute;
  left: var(--spacing-sm);
  top: 50%;
  transform: translateY(-50%);
  transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease, transform 0.2s ease, background 0.2s ease;
  color: var(--color-surface-500);
  pointer-events: none;
  padding: 0 var(--spacing-xxxs);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: normal;
  z-index: 1;
  background: transparent;
}

.input-container input:focus ~ .label,
.input-container input:not(:placeholder-shown) ~ .label {
  top: 0;
  transform: translateY(-50%);
  font-size: var(--font-size-xxs);
  background: linear-gradient(to bottom, var(--color-page-bg) 50%, var(--color-surface-50) 50%);
}

/* Focused: accent color */
.input-container input:focus ~ .label {
  color: var(--color-primary-200);
}

/* Filled but not focused: default label color */
.input-container input:not(:placeholder-shown):not(:focus) ~ .label {
  color: var(--color-surface-500);
}

.input-container .bar {
  display: none;
}

/* Error state */
.input-container.error input {
  border-color: var(--color-cms-400);
}

.input-container.error input:focus {
  border: 2px solid var(--color-cms-400);
  padding: calc(var(--spacing-md) - 1px) calc(var(--spacing-sm) - 1px);
}

.input-container.error .label,
.input-container.error input:focus ~ .label,
.input-container.error input:not(:placeholder-shown) ~ .label {
  color: var(--color-cms-400);
}

.input-container input:-webkit-autofill,
.input-container input:-webkit-autofill:hover,
.input-container input:-webkit-autofill:focus,
.input-container input:autofill,
.input-container input:autofill:hover,
.input-container input:autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1f2227 !important;
  transition: background-color 5000s ease-in-out 0s;
  background-color: #ffffff !important;
  caret-color: #1f2227;
}

@media (max-width: 768px) {
  .input-container input:-webkit-autofill,
  .input-container input:autofill {
    -webkit-box-shadow: 0 0 0 1000px #f7f8fa inset !important;
    box-shadow: 0 0 0 1000px #f7f8fa inset !important;
  }
}

/* Buttons */

.btn {
  display: flex;
  height: 4.5rem;
  gap: var(--spacing-xs);
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn--fullWidth {
  flex: 1 1 0;
}

.btn--filled {
  padding: 0 var(--spacing-lg);
  background-color: var(--color-primary-200);
  color: var(--color-surface-50);
}

.btn--filled:hover {
  background-color: var(--color-primary-400);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary-200);
  outline-offset: 2px;
}

.btn--text {
  background: transparent;
  color: var(--color-primary-200);
}

.btn--text:hover {
  color: var(--color-primary-400);
}

.btn--border {
  padding: var(--spacing-sm) var(--spacing-lg);
  border-color: var(--color-primary-200);
}

.btn--border:hover {
  background-color: var(--color-surface-100);
  color: var(--color-surface-50);
}

.btn--underline {
  text-decoration: underline;
}

.btn--danger {
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: var(--color-cms-300);
  color: var(--color-surface-50);
}

.btn--danger:hover {
  background-color: var(--color-cms-400);
}

.btn--microsoft {
  padding: 0 var(--spacing-lg);
  background-color: var(--color-surface-50);
  color: var(--color-surface-700);
  border: 1px solid var(--color-surface-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  width: 100%;
}

.btn--microsoft:hover {
  background-color: var(--color-hover-bg);
  border-color: var(--color-surface-400);
}

.btn--microsoft .btn-icon {
  height: 22px;
  width: 22px;
}

.divider-or {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0 var(--spacing-xl);
  padding: 0 12%;
  color: var(--color-surface-300);
  font-size: var(--font-size-xxs);
  font-weight: var(--font-weight-light);
  text-transform: lowercase;
}

.divider-or::before,
.divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-surface-200);
}

.btn--outline {
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: var(--color-surface-50);
  border-color: var(--color-surface-200);
  color: var(--color-surface-700);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn--outline:hover {
  background-color: var(--color-hover-bg);
  border-color: var(--color-surface-400);
  color: var(--color-surface-800);
}

.expandable-section {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.expandable-section > * {
  overflow: hidden;
}

.expandable-section.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: var(--spacing-sm);
}

.expandable-section.is-open > * {
  overflow: visible;
}

.btn-icon {
  height: 24px;
  width: 24px;
}

.btn-icon--sm {
  height: 18px;
  width: 18px;
}

.btn-icon--fa {
  font-size: var(--font-size-xs);
}

.back-link {
  text-align: left;
  margin-top: var(--spacing-xl);
}

.back-link a {
  font-size: var(--font-size-xs);
  color: var(--color-primary-200);
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

.buttons-wrapper {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xxs);
}

.buttons-wrapper .btn {
  flex: 1;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .buttons-wrapper {
    flex-direction: column;
  }

  .buttons-wrapper .btn {
    flex: 0 0 auto;
    width: 100%;
    min-height: 4.5rem;
  }
}

.lang-wrapper {
  z-index: 10;
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: center;
  align-self: end;
  display: flex;
  justify-content: flex-end;
}

.lang-button {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-xxs);
  padding: var(--spacing-xxs) var(--spacing-xs);
  font-size: var(--font-size-xxs);
  color: var(--color-surface-500);
  transition: all 0.2s ease;
}

.lang-button:hover {
  border-color: var(--color-surface-300);
  color: var(--color-surface-700);
}

.lang-list {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: var(--spacing-xxxs);
  width: 200px;
  background: var(--color-surface-50);
  border: 1px solid var(--color-surface-300);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 0;
  z-index: 10;
}

.lang-list li {
  padding: var(--spacing-sm);
  cursor: pointer;
  font-size: var(--font-size-xs);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.lang-list li a {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.lang-list li:hover {
  background: var(--color-hover-bg);
}

.lang-list.hidden {
  display: none;
}

.img {
  border: 1px solid var(--color-surface-300);
  border-radius: 2px;
  height: 15px;
  width: 20px;
  object-fit: cover;
  filter: saturate(0.8);
  transition: filter 0.2s ease;
}

.lang-button:hover .img {
  filter: saturate(1);
}

.lang-list .img {
  filter: saturate(1);
}

.img-arrow {
  position: relative;
  height: 14px;
}

.page-footer {
  text-align: center;
  margin-top: var(--spacing-xl);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-xxs);
}

.page-footer a,
.page-footer button {
  font-size: var(--font-size-xxs);
  color: var(--color-surface-500);
  text-decoration: none;
}

.page-footer a:hover,
.page-footer button:hover {
  text-decoration: underline;
}

.page-footer .footer-primary {
  color: var(--color-primary-200);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: var(--font-size-xxs);
}

.page-footer .footer-separator {
  display: inline-block;
  margin: 0 var(--spacing-xs);
  color: var(--color-surface-400);
  font-size: var(--font-size-xxs);
}

.recovery-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.recovery-links a,
.recovery-links button {
  font-size: var(--font-size-xxs);
  color: var(--color-primary-200);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.recovery-links a:hover,
.recovery-links button:hover {
  text-decoration: underline;
}

.link-with-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xxxs);
}

/* Legacy footer (powered-by in .main) */
.main > .footer {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  padding: 0 var(--spacing-md);
  margin: 0;
}

/* Section Labels */

.section-label {
  display: block;
  font-size: var(--font-size-xxxs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-surface-500);
  margin-bottom: var(--spacing-xxs);
}

/* Subsequent section-labels get consistent top spacing via adjacency */
.method-card + .section-label,
.method-card + form + .section-label,
.expandable-section + .section-label,
.recovery-codes-grid + .section-label,
.recovery-actions + .section-label {
  margin-top: var(--spacing-md);
}

/* MFA Method Cards */

.method-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 10px;
  cursor: default;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  border: 1px solid transparent;
  margin-bottom: var(--spacing-sm);
}

.method-card--active {
  background-color: var(--color-success-50);
  border-color: var(--color-success-200);
  border-style: solid;
}

.method-card--inactive {
  border-color: var(--color-surface-300);
  border-style: dashed;
}

.method-card--selectable {
  border-color: var(--color-surface-300);
  border-style: solid;
  background-color: var(--color-surface-50);
  cursor: pointer;
}

.method-card--selectable:hover {
  border-color: var(--color-surface-400);
  background-color: var(--color-hover-bg);
}

.method-card--selectable:hover .method-card__icon {
  background-color: var(--color-surface-200);
}

/* Double class for specificity to beat .method-card__icon base */
.method-card .method-card__icon--plain {
  background-color: transparent;
}

.method-card:hover .method-card__icon--plain {
  background-color: transparent;
}

.method-card--dashed {
  border: 1px dashed var(--color-surface-300);
  background-color: var(--color-surface-50);
  cursor: pointer;
}

.method-card--dashed:hover {
  border-color: var(--color-surface-400);
  background-color: var(--color-hover-bg);
}

.method-card__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  background-color: var(--color-surface-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  color: var(--color-primary-300);
  transition: background-color 0.2s ease;
}

.method-card--active .method-card__icon {
  background-color: var(--color-success-100);
  color: var(--color-success-300);
}

.method-card--active .method-card__icon--plain {
  background-color: transparent;
}

.method-card__icon--success {
  background-color: var(--color-success-100);
  color: var(--color-success-300);
}

.method-card__icon--danger {
  background-color: var(--color-danger-50);
  color: var(--color-danger-300);
}

.method-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.method-card__title {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-surface-800);
  line-height: 1.3;
  margin: 0;
}

/* Hide UTC timestamps until JS converts them to local time — prevents flash */
[data-utc]:not([data-converted]) {
  color: transparent;
}

.method-card__subtitle {
  font-size: var(--font-size-xxs);
  color: var(--color-surface-500);
  line-height: 1.3;
  margin: 0;
}

.method-card__badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--font-size-xxs);
  font-weight: var(--font-weight-semibold);
  padding: var(--spacing-xxxs) var(--spacing-xs);
  border-radius: 999px;
  background-color: var(--color-success-100);
  color: var(--color-success-300);
  white-space: nowrap;
}

.method-card__badge--recommended {
  background-color: var(--color-success-100);
  color: var(--color-success-300);
}

.method-card__badge--muted {
  opacity: 0.5;
}

.method-card__action {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  color: var(--color-surface-400);
}

.method-card__set-default {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--color-surface-300);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: var(--font-size-xxs);
  color: var(--color-surface-600);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.method-card__set-default:hover {
  border-color: var(--color-surface-400);
  background-color: var(--color-hover-bg);
  color: var(--color-surface-800);
}

/* Recovery Card + Codes Grid */

.recovery-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 10px;
  background-color: var(--color-surface-100);
  border: 1px solid var(--color-surface-200);
}

.recovery-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.recovery-card__meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
}

.recovery-card__count {
  display: inline-flex;
  align-items: center;
  font-size: var(--font-size-xxs);
  color: var(--color-surface-500);
  line-height: 1;
  white-space: nowrap;
}

.recovery-card__action {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--color-surface-500);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  margin-left: auto;
}

.recovery-card__action:hover {
  background-color: var(--color-surface-200);
  color: var(--color-surface-700);
}

.recovery-card__text-action {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary-200);
  font-size: var(--font-size-xxs);
  font-weight: var(--font-weight-medium);
  font-family: inherit;
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  gap: var(--spacing-xxxs);
  height: 2.8rem;
  padding: 0 var(--spacing-xxs);
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
  line-height: 1;
  margin-left: auto;
  white-space: nowrap;
}

.recovery-card__text-action:hover {
  background: var(--color-surface-100);
  color: var(--color-primary-300);
}

@media (max-width: 480px) {
  .recovery-card {
    align-items: flex-start;
  }

  .recovery-card__meta {
    flex-wrap: wrap;
  }

  .recovery-card__text-action {
    margin-left: 0;
  }
}

.recovery-codes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xxs);
  padding: var(--spacing-md);
  background: var(--color-surface-50);
  border: 1px solid var(--color-surface-200);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.recovery-code {
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  letter-spacing: 0.05em;
  padding: var(--spacing-xxs) var(--spacing-xs);
  color: var(--color-surface-800);
  text-align: center;
}

/* Recovery Section Title */

.recovery-section-title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-surface-800);
  margin-bottom: var(--spacing-sm);
  margin-top: 0;
}

/* Recovery Actions */

.recovery-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.recovery-action {
  display: flex;
  align-items: center;
  gap: var(--spacing-xxxs);
  background: none;
  border: 1px solid var(--color-surface-200);
  border-radius: 6px;
  padding: var(--spacing-xxs) var(--spacing-sm);
  font-size: var(--font-size-xxs);
  color: var(--color-surface-600);
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.recovery-action:hover {
  background: var(--color-surface-100);
  border-color: var(--color-surface-300);
  color: var(--color-surface-800);
}

/* Danger Zone */

.danger-zone {
  border-top: 1px solid var(--color-surface-200);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  text-align: center;
}

.danger-zone a,
.danger-zone button {
  font-size: var(--font-size-xs);
  color: var(--color-cms-300);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

.danger-zone a:hover,
.danger-zone button:hover {
  color: var(--color-cms-400);
  text-decoration: underline;
}

/* Method Switcher */

.method-switcher {
  border-top: 1px solid var(--color-surface-200);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
}

.method-switcher__option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 6px;
  background-color: var(--color-surface-100);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-surface-700);
  transition: background-color 0.2s ease;
  margin-bottom: var(--spacing-xxs);
}

.method-switcher__option:hover {
  background-color: var(--color-surface-200);
  color: var(--color-surface-900);
}

/* Utilities */

.validation-errors {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: var(--spacing-xs);
  row-gap: var(--spacing-xxxs);
  background: rgba(233, 79, 38, 0.06);
  border: 1px solid rgba(233, 79, 38, 0.12);
  border-radius: 8px;
  padding: var(--spacing-sm) var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-xxs);
  color: var(--color-cms-400);
  line-height: 1.5;
}

.validation-errors::before {
  content: '';
  display: inline-block;
  width: 1.4rem;
  height: 1.4rem;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  margin-top: 0.1rem;
}

.validation-errors p {
  margin: 0;
  grid-column: 2;
}

.text-muted {
  color: var(--color-surface-600);
  font-size: var(--font-size-xs);
  line-height: 1.5;
}

.text-muted--with-icon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: var(--spacing-xxs);
}

.text-muted--sm {
  color: var(--color-surface-600);
  font-size: var(--font-size-xxs);
  line-height: 1.5;
}

.mb-xs  { margin-bottom: var(--spacing-xs); }
.mb-sm  { margin-bottom: var(--spacing-sm); }
.mb-md  { margin-bottom: var(--spacing-md); }
.mb-lg  { margin-bottom: var(--spacing-lg); }
.mb-xl  { margin-bottom: var(--spacing-xl); }
.mt-xs  { margin-top: var(--spacing-xs); }
.mt-sm  { margin-top: var(--spacing-sm); }
.mt-md  { margin-top: var(--spacing-md); }
.mt-lg  { margin-top: var(--spacing-lg); }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.text-center .title {
  text-align: center;
}

.status-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.status-panel .title {
  margin-bottom: var(--spacing-sm);
  text-align: center;
}

.status-panel .text-muted,
.status-panel .text-muted--sm {
  margin-top: 0;
  max-width: 52ch;
}

.text-mono {
  font-family: monospace;
  font-size: var(--font-size-sm);
  color: var(--color-surface-600);
  word-break: break-all;
  user-select: all;
}

.icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-xxs);
  vertical-align: middle;
}

.text-muted--with-icon .icon-inline {
  margin-right: 0;
}

.qr-code {
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
}

.inline-form {
  display: inline;
}

.unstyled-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.unstyled-button.method-card {
  border: 1px solid transparent;
  padding: var(--spacing-sm) var(--spacing-md);
  width: 100%;
  text-align: left;
}

.unstyled-button.method-card--dashed {
  border: 1px dashed var(--color-surface-300);
  background-color: var(--color-surface-50);
}

.unstyled-button.method-card--dashed:hover {
  background-color: var(--color-hover-bg);
  border-color: var(--color-surface-400);
}

/* Miscellaneous */

.typo-wrapper {
  text-align: center;
  font-size: var(--font-size-lg);
}

.status-illustration,
.img-mail-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  margin-bottom: var(--spacing-xxxl);
}

.status-panel .status-illustration,
.status-panel .img-mail-wrapper {
  margin-bottom: var(--spacing-xl);
}

.status-illustration img,
.img-mail-wrapper img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* Error Details */

.error-details {
  margin-top: var(--spacing-md);
  padding: var(--spacing-md);
  background-color: var(--color-surface-100);
  border-radius: var(--radius-md);
  text-align: left;
}

.error-details__code {
  color: var(--color-cms-400);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  margin: 0;
}

.error-details__description {
  color: var(--color-surface-600);
  margin-top: var(--spacing-sm);
  font-size: var(--font-size-sm);
}

.error-details__request-id {
  color: var(--color-surface-500);
  margin-top: var(--spacing-md);
  font-size: var(--font-size-xs);
}

/* Form Instruction (Level 2 in hierarchy) */

.form-instruction {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-regular);
  color: #4b5563;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
}

/* Password Complexity Rules */

.password-rules {
  list-style: none;
  padding: 0;
  margin: calc(-1 * var(--spacing-md)) 0 var(--spacing-lg) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xxxs) var(--spacing-lg);
}

.password-rules li {
  font-size: var(--font-size-xxs);
  color: var(--color-surface-400);
  display: flex;
  align-items: center;
  gap: var(--spacing-xxs);
  transition: color 0.2s ease;
}

.password-rules li.is-valid {
  color: var(--color-success-300);
}

.password-rules li.is-invalid {
  color: var(--color-cms-300);
}

.password-rules .rule-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  background: transparent;
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z'/%3E%3C/svg%3E");
  transition: all 0.2s ease;
}

.password-rules li.is-valid .rule-icon {
  background-color: currentColor;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369.2 174.1L227.8 337c-4.6 5.5-11.3 8.6-18.4 8.6h-.5c-7.2 0-14-3.2-18.6-8.8l-48-58.5c-9.8-12-8.1-29.7 3.8-39.6s29.7-8.1 39.6 3.8l29 35.4 122.8-145.9c9.6-11.4 26.6-12.9 38-3.3s12.9 26.6 3.3 38z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369.2 174.1L227.8 337c-4.6 5.5-11.3 8.6-18.4 8.6h-.5c-7.2 0-14-3.2-18.6-8.8l-48-58.5c-9.8-12-8.1-29.7 3.8-39.6s29.7-8.1 39.6 3.8l29 35.4 122.8-145.9c9.6-11.4 26.6-12.9 38-3.3s12.9 26.6 3.3 38z'/%3E%3C/svg%3E");
}

@media (max-width: 480px) {
  .password-rules {
    grid-template-columns: 1fr;
  }
}

.method-card .password-rules {
  margin: 0;
  padding: 0;
}

/* Code Input Boxes */

.code-input-group {
  --code-box-size: 4.8rem;
  --code-box-gap: var(--spacing-xs);
  display: flex;
  gap: var(--code-box-gap);
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: var(--spacing-xxl);
  width: 100%;
  max-width: 100%;
}

.code-separator {
  color: var(--color-surface-300);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-light);
  flex: 0 0 auto;
  padding: 0;
}

.code-box {
  flex: 1 1 0;
  min-width: 0;
  width: calc((100% - (5 * var(--code-box-gap))) / 6);
  height: var(--code-box-size);
  text-align: center;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  font-family: 'Courier New', monospace;
  border: 1px solid var(--color-surface-200);
  border-radius: 8px;
  background: var(--color-surface-50);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  caret-color: var(--color-primary-200);
}

.code-box:focus {
  border: 2px solid var(--color-primary-200);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

@media (max-width: 480px) {
  .code-input-group {
    --code-box-size: 4rem;
    --code-box-gap: var(--spacing-xxs);
  }

  .code-separator {
    font-size: var(--font-size-md);
    padding: 0;
  }

  .code-box {
    font-size: var(--font-size-md);
  }
}

@media (max-width: 360px) {
  .code-input-group {
    --code-box-size: 3.6rem;
    --code-box-gap: 0.6rem;
  }
}

/* QR Panel */

.qr-panel {
  background: var(--color-surface-50);
  border: 1px solid var(--color-surface-200);
  border-radius: 8px;
  padding: var(--spacing-xl);
  display: flex;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Secret Key */

.secret-key {
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-sm);
  letter-spacing: 0.1em;
  background: var(--color-surface-50);
  border: 1px solid var(--color-surface-200);
  border-radius: 8px;
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  word-break: break-all;
}

.secret-key code {
  flex: 1;
  font-family: inherit;
}

.secret-key__copy {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-surface-400);
  font-size: var(--font-size-sm);
  padding: var(--spacing-xxxs);
  transition: color 0.2s;
  flex-shrink: 0;
}

.secret-key__copy:hover {
  color: var(--color-primary-200);
}

/* Inline field error */

.input-container.error {
  margin-bottom: 0;
}

.field-error {
  font-size: var(--font-size-xxs);
  color: var(--color-cms-400);
  margin: 4px 0 var(--spacing-lg);
  padding: 0;
}

/* Info box — left-aligned status messages */

.info-box {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-radius: 10px;
  border: 1px solid;
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-xs);
  line-height: 1.5;
  cursor: default;
}

.info-box i {
  flex-shrink: 0;
  font-size: var(--font-size-sm);
}

.info-box p {
  margin: 0;
}

.info-box--success {
  background-color: var(--color-success-50);
  border-color: var(--color-success-200);
  color: var(--color-surface-700);
}

.info-box--success i {
  color: var(--color-success-300);
}

.info-box--warning {
  background-color: var(--color-warning-50);
  border-color: var(--color-warning-100);
  color: var(--color-surface-700);
}

.info-box--warning i {
  color: var(--color-warning-300);
}

.info-box--info {
  background-color: var(--color-surface-100);
  border-color: var(--color-surface-300);
  color: var(--color-surface-700);
}

.info-box--info i {
  color: var(--color-primary-300);
}

/* Login History filter tabs */

.filter-tabs {
  display: flex;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid var(--color-surface-300);
  border-radius: 6px;
  background: var(--color-surface-50);
  color: var(--color-surface-600);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.filter-tab:hover {
  border-color: var(--color-surface-400);
  background-color: var(--color-hover-bg);
  text-decoration: none;
}

.filter-tab--active {
  border-color: var(--color-surface-700);
  background-color: var(--color-surface-800);
  color: #fff;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.filter-tab--active:hover {
  background-color: var(--color-surface-700);
  text-decoration: none;
}

.filter-tab--active i {
  color: #fff !important;
}

/* Login history list — no scroll initially, enable after load-more */

.login-history-list {
  padding-right: 2px;
  padding-bottom: var(--spacing-sm);
  transition: max-height 0.3s ease;
}

.login-history-list--scrollable {
  overflow-y: auto;
  /* max-height set dynamically by JS based on actual card height × 6.5 */
}

.login-history-list--scrollable::-webkit-scrollbar {
  width: 4px;
}

.login-history-list--scrollable::-webkit-scrollbar-thumb {
  background: var(--color-surface-300);
  border-radius: 4px;
}

/* Stagger animation for new items */
.login-history-item-enter {
  opacity: 0;
  transform: translateY(12px);
}

.login-history-item-enter.login-history-item-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

/* Success/danger badges for history items */

.method-card__badge--success {
  background-color: var(--color-success-100);
  color: var(--color-success-300);
}

.method-card__badge--danger {
  background-color: var(--color-danger-50);
  color: var(--color-danger-300);
  white-space: nowrap;
}

/* Utility classes for passkey status */

.text-success {
  color: var(--color-success-300);
}

.text-danger {
  color: var(--color-danger-300);
}

/* Card-as-link */

.unstyled-link {
  color: inherit;
  text-decoration: none;
}

.unstyled-link:hover {
  text-decoration: none;
}

/* Passkey register area (used on Verify page) */

.passkey-register-area {
  text-align: center;
  padding: var(--spacing-md);
  border: 1px dashed var(--color-surface-300);
  border-radius: 10px;
  background-color: var(--color-surface-50);
}

/* Inline status indicator with icon */

.status-inline {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  font-size: var(--font-size-xs);
}

.status-inline--loading {
  background-color: var(--color-surface-100);
  color: var(--color-surface-600);
}

.status-inline--success {
  background-color: var(--color-success-50);
  color: var(--color-success-300);
  border: 1px solid var(--color-success-200);
}

.status-inline--error {
  background-color: var(--color-danger-50);
  color: var(--color-danger-300);
  border: 1px solid var(--color-danger-100);
}

/* View Transitions */
/* Keeps aside, logo, and language selector stable across page navigations. */
/* Only the card content crossfades. Requires <meta name="view-transition"> in <head>. */

.aside {
  view-transition-name: aside-panel;
}

.logo-container {
  view-transition-name: logo;
}

.lang-wrapper {
  view-transition-name: lang-selector;
}

.card-container {
  view-transition-name: card-content;
}

/* Disable animation on stable elements — they stay put */
::view-transition-old(aside-panel),
::view-transition-new(aside-panel),
::view-transition-old(logo),
::view-transition-new(logo),
::view-transition-old(lang-selector),
::view-transition-new(lang-selector) {
  animation: none;
}

/* Card content: old hides instantly, new fades in (no overlap/ghosting) */
::view-transition-old(card-content) {
  animation: none;
  display: none;
}

::view-transition-new(card-content) {
  animation: card-enter 0.25s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .signal-ring,
    .fa-spin {
        animation: none;
    }

    .card-enter {
        animation: none;
    }
}

