/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

body {
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --pop-auth-layout-max: min(82.5rem, 94vw);
}

/* Adding fade-in animation for page load */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Common Styles */
.page-container {
  min-height: 100vh;
  background: linear-gradient(90deg, rgba(235, 219, 164, 0.39) 0%, rgba(131, 190, 125, 0.39) 100%);
  display: flex;
  flex-direction: column;
  /* Add fade-in animation to page */
  animation: fadeIn 0.4s ease-out;
}

/* Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  /* Add slide-in animation */
  animation: slideInFromTop 0.3s ease-out;
}

/* URL Bar */
.url-bar {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  margin: 0.5rem 1rem 0;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  /* Add transition for smooth effects */
  transition: all 0.3s ease;
  animation: slideInFromTop 0.4s ease-out 0.1s both;
}

.url-bar.white {
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  margin: 0;
  border-radius: 0;
  padding: 0.75rem 1rem;
}

.url-bar svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Header */
.header {
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  /* Add slide-in animation */
  animation: slideInFromTop 0.3s ease-out;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

/* Add max-width for desktop */
@media (min-width: 768px) {
  .url-bar.white,
  .header-content {
    max-width: var(--pop-auth-layout-max);
    margin-left: auto;
    margin-right: auto;
  }
}

.header-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.btn-back,
.btn-cancel {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.25rem;
  /* Add smooth transition */
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-back:hover,
.btn-cancel:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.btn-back:active,
.btn-cancel:active {
  transform: scale(0.95);
}

.btn-back {
  color: #6b7280;
}

.btn-cancel {
  color: #3b82f6;
  font-weight: 500;
}

.btn-back svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Add fade-in animation */
  animation: fadeIn 0.5s ease-out 0.2s both;
}

/* Center content on desktop */
@media (min-width: 768px) {
  .main-content {
    max-width: var(--pop-auth-layout-max);
    margin: 0 auto;
    width: 100%;
  }
}

/* Page Title Section */
.page-title-section {
  text-align: center;
  margin-bottom: 1.5rem;
  /* Add scale-in animation */
  animation: scaleIn 0.4s ease-out 0.3s both;
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
  /* Add icon animation */
  animation: scaleIn 0.5s ease-out 0.4s both;
  transition: transform 0.3s ease;
}

.icon-circle:hover {
  transform: scale(1.05);
}

.icon-circle img {
  width: 5rem;
  height: 5rem;
}

.icon-circle svg {
  width: 2.5rem;
  height: 2.5rem;
  color: white;
  /* Add subtle rotation animation */
  animation: fadeIn 0.6s ease-out 0.5s both;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

/* アプリ認証ページ用（画像のダークティール） */
.page-title--app {
  color: #356D7D;
}

.page-description {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0 0.5rem;
}

.page-description--app {
  color: #4b5563;
}

/* Auth Method Cards */
.auth-methods {
  margin-bottom: 1.5rem;
  /* Add staggered animation */
  animation: slideInFromBottom 0.5s ease-out 0.4s both;
}

.auth-card {
  background-color: white;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
  margin-bottom: 1rem;
  /* Enhanced transition effects */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

@media (min-width: 768px) {
  .auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  }
}

.auth-card:active {
  transform: scale(0.98);
}

.auth-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.auth-icon {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, #4ade80 0%, #16a34a 100%);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  /* Add icon hover animation */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover .auth-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.2);
}

.auth-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: white;
}

.auth-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.auth-card-title h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.badge-default {
  background-color: #466C7B;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  /* Add badge animation */
  animation: scaleIn 0.4s ease-out 0.6s both;
  transition: transform 0.2s ease;
}

.badge-default:hover {
  transform: scale(1.05);
}

.auth-card-description {
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.5;
}

.authenticator-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 0.5rem;
}

.authenticator-item {
  text-align: center;
  /* Add staggered animation to logos */
  transition: transform 0.2s ease;
}

.authenticator-item:nth-child(1) {
  animation: scaleIn 0.4s ease-out 0.7s both;
}

.authenticator-item:nth-child(2) {
  animation: scaleIn 0.4s ease-out 0.8s both;
}

.authenticator-item:hover {
  transform: translateY(-2px);
}

.authenticator-logo {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.authenticator-logo svg {
  width: 2.5rem;
  height: 2.5rem;
}

.authenticator-logo-img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  object-fit: contain;
  margin-bottom: 0.25rem;
}

.authenticator-name {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  margin: 1rem 0;
  /* Add fade-in animation */
  animation: fadeIn 0.5s ease-out 0.5s both;
}

.divider-line {
  flex: 1;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.4);
}

.divider-text {
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0 0.5rem;
}

/* Divider for light background (inside .setup-step, .verification-form, etc.) */
.setup-step .divider-line,
.verification-form .divider-line,
.qr-code-container .divider-line {
  background-color: #d1d5db;
}

.setup-step .divider-text,
.verification-form .divider-text,
.qr-code-container .divider-text {
  color: #6b7280;
  font-weight: 500;
}

/* Alternative Methods */
.alternative-methods {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  /* Add slide-in animation */
  animation: slideInFromBottom 0.5s ease-out 0.6s both;
}

.alternative-methods-title {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 500;
  margin-bottom: 0.75rem;
  text-align: center;
}

.alternative-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.alternative-btn {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid #93c5fd;
  cursor: pointer;
  /* Enhanced transition */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.alternative-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.alternative-btn:hover::before {
  left: 100%;
}

@media (min-width: 768px) {
  .alternative-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.15);
  }
}

.alternative-btn:active {
  transform: scale(0.95);
}

.alternative-btn.email {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  border-color: #d8b4fe;
}

.alternative-btn-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  /* Add icon animation */
  transition: transform 0.3s ease;
}

.alternative-btn:hover .alternative-btn-icon {
  transform: scale(1.15);
}

.alternative-btn-icon.sms {
  background-color: #3b82f6;
}

.alternative-btn-icon.email {
  background-color: #a855f7;
}

.alternative-btn-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.alternative-btn h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
}

.alternative-btn p {
  font-size: 0.75rem;
  color: #4b5563;
  text-align: center;
  line-height: 1.2;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.form-inputs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  /* Add staggered animation to form groups */
  animation: slideInFromBottom 0.4s ease-out both;
}

.form-group:nth-child(1) {
  animation-delay: 0.5s;
}

.form-group:nth-child(2) {
  animation-delay: 0.6s;
}

.form-label {
  display: block;
  color: white;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  /* Add icon transition */
  transition: color 0.3s ease, transform 0.3s ease;
}

.form-input:focus + .input-icon,
.input-wrapper:has(.form-input:focus) .input-icon {
  color: #466C7B;
  transform: translateY(-50%) scale(1.1);
}

.input-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border-radius: 0.375rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.95);
  color: #111827;
  font-size: 1rem;
  /* Enhanced transition */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
  outline: none;
  border-color: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4), 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: #64748b;
  opacity: 1;
}

.form-input.otp {
  font-size: 1.125rem;
  letter-spacing: 0.1em;
}

/* OTP 6-Digit Input Styles */
.otp-input-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 0 auto;
  animation: slideInFromBottom 0.4s ease-out 0.6s both;
}

.otp-digit {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid #66A899;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.95);
  color: #111827;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.otp-digit:focus {
  outline: none;
  border-color: #66A899;
  background-color: white;
  box-shadow: 0 0 0 4px rgba(102, 168, 153, 0.25), 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px) scale(1.05);
}

.otp-digit::placeholder {
  color: #d1d5db;
}

/* Animation for filled digits */
.otp-digit.filled {
  border-color: #66A899;
  background-color: rgba(102, 168, 153, 0.08);
  animation: digitFilled 0.3s ease-out;
}

@keyframes digitFilled {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Reset nested container styles inside setup-step (remove double nesting) */
.setup-step .verification-form,
.setup-step .manual-key-container,
.setup-step .qr-code-container {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  margin-bottom: 1rem;
  box-shadow: none;
}

.setup-step .verification-form:hover {
  box-shadow: none;
}

.setup-step .qr-code-container img {
  max-width: 180px;
}

/* Authenticator logos layout inside setup-step */
.setup-step .authenticator-logos {
  justify-content: flex-start;
  gap: 2rem;
  padding: 0.5rem 0;
}

/* Form group spacing inside setup-step */
.setup-step .form-group {
  margin-bottom: 1.5rem;
}

/* Smaller key display inside setup-step */
.setup-step .key-display {
  font-size: 0.85rem;
  letter-spacing: 1px;
  padding: 0.75rem;
  text-align: center;
}

/* OTP input inside setup-step (smaller to fit) */
.setup-step .otp-input-container {
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.setup-step .otp-digit {
  width: 2.75rem;
  height: 3.25rem;
  font-size: 1.25rem;
}

/* Responsive OTP input for mobile */
@media (max-width: 400px) {
  .otp-digit {
    width: 2.25rem;
    height: 2.75rem;
    font-size: 1.125rem;
  }

  .otp-input-container {
    gap: 0.25rem;
  }
  
  .setup-step .otp-digit {
    width: 2rem;
    height: 2.5rem;
    font-size: 1rem;
  }
  
  .authenticator-item {
    font-size: 0.7rem;
    padding: 0.5rem 0.75rem;
  }
  
  .authenticator-logos {
    gap: 0.375rem;
  }
}

/* Responsive authenticator buttons for narrow screens */
@media (max-width: 360px) {
  .authenticator-logos {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  .authenticator-item {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }
}

/* Form Actions */
.form-actions {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* Add animation */
  animation: slideInFromBottom 0.5s ease-out 0.7s both;
}

.alternative-auth-link {
  text-align: center;
}

.alternative-auth-link a {
  display: inline-flex;
  align-items: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding-bottom: 1px;
  /* Add smooth transition */
  transition: all 0.3s ease;
}

.alternative-auth-link a:hover {
  border-bottom-color: white;
  color: white;
  transform: translateY(-1px);
}

.btn-submit {
  width: 100%;
  background-color: white;
  color: #466C7B;
  font-weight: 700;
  padding: 1rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  font-size: 1.125rem;
  /* Enhanced transition with spring effect */
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: rgba(125, 179, 125, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-submit:hover::before {
  width: 300px;
  height: 300px;
}

@media (min-width: 768px) {
  .btn-submit:hover {
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.2);
  }
}

.btn-submit:active {
  transform: scale(0.97);
}

/* 白カード上の主CTA（アプリ認証・MFAテスト等で統一） */
.btn-submit.btn-submit--filled {
  background-color: #537682;
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

.btn-submit.btn-submit--filled::before {
  background-color: rgba(255, 255, 255, 0.12);
}

@media (min-width: 768px) {
  .btn-submit.btn-submit--filled:hover {
    background-color: #466c7b;
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.2);
  }
}

.btn-submit.btn-submit--filled:disabled {
  background-color: #9ca3af;
  color: rgba(255, 255, 255, 0.95);
  cursor: not-allowed;
  transform: none;
  opacity: 0.85;
}

.btn-submit.btn-submit--filled:disabled::before {
  display: none;
}

/* Biometric Options (Passkey Page) */
.biometric-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.biometric-card {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  /* Add staggered animation */
  transition: all 0.3s ease;
}

.biometric-card:nth-child(1) {
  animation: slideInFromBottom 0.4s ease-out 0.4s both;
}

.biometric-card:nth-child(2) {
  animation: slideInFromBottom 0.4s ease-out 0.5s both;
}

.biometric-card:nth-child(3) {
  animation: slideInFromBottom 0.4s ease-out 0.6s both;
}

.biometric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.15);
}

.biometric-title {
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  color: black;
  margin-bottom: 1rem;
}

.biometric-visual {
  background-color: #f9fafb;
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 1rem;
}

.biometric-icon-wrapper {
  position: relative;
  width: 8rem;
  height: 8rem;
  margin: 0 auto;
}

/* Fingerprint Animation */
.fingerprint-pulse {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #f87171 0%, #ec4899 50%, #ef4444 100%);
  border-radius: 9999px;
  opacity: 0.2;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.fingerprint-icon {
  width: 100%;
  height: 100%;
  color: #f87171;
  /* Add subtle rotation animation */
  animation: fadeIn 1s ease-out;
}

/* Face Icon */
.face-icon-wrapper {
  position: relative;
  width: 8rem;
  height: 8rem;
  margin: 0 auto;
}

.face-border {
  position: absolute;
  inset: 0;
  border: 4px solid #60a5fa;
  border-radius: 9999px;
  opacity: 0.3;
  /* Add border pulse animation */
  animation: pulse 2s ease-in-out infinite;
}

.face-icon {
  width: 100%;
  height: 100%;
  color: #9ca3af;
}

/* PIN Code Visual */
.pin-visual {
  position: relative;
  width: 8rem;
  height: 8rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-bg-circle {
  position: absolute;
  inset: 0;
  background-color: #bbf7d0;
  border-radius: 9999px;
  opacity: 0.4;
  /* Add subtle scale animation */
  animation: pulse 3s ease-in-out infinite;
}

.pin-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.pin-display {
  background-color: white;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pin-display span {
  font-size: 1.5rem;
  letter-spacing: 0.1em;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4b5563;
}

.pin-key {
  width: 2rem;
  height: 2rem;
  background-color: white;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  /* Add hover animation */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pin-key:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.biometric-instruction {
  text-align: center;
  color: #4b5563;
  font-size: 0.875rem;
}

/* LDAP Specific Styles */
.ldap-form-card {
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  /* Add animation */
  animation: slideInFromBottom 0.5s ease-out 0.4s both;
  transition: all 0.3s ease;
}

.ldap-form-card:hover {
  box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.15);
}

.ldap-form-group {
  margin-bottom: 1rem;
}

.ldap-form-group:last-of-type {
  margin-bottom: 0;
}

.ldap-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.ldap-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  outline: none;
  font-size: 1rem;
  color: #111827;
  /* Enhanced transition */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ldap-input:focus {
  border-color: #466C7B;
  box-shadow: 0 0 0 3px rgba(125, 179, 125, 0.2);
  transform: translateY(-1px);
}

.ldap-input::placeholder {
  color: #64748b;
  opacity: 1;
}

.btn-ldap-submit {
  width: 100%;
  background-color: #466C7B;
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  /* Enhanced transition */
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 768px) {
  .btn-ldap-submit:hover {
    background-color: #6da36d;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.2);
  }
}

.btn-ldap-submit:active {
  transform: scale(0.97);
}

/* Azure AD Card */
.azure-card {
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  text-align: center;
  /* Add animation */
  animation: slideInFromBottom 0.5s ease-out 0.6s both;
  transition: all 0.3s ease;
}

.azure-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.15);
}

.azure-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  border-radius: 1rem;
  margin-bottom: 0.75rem;
  /* Add icon animation */
  transition: transform 0.3s ease;
}

.azure-card:hover .azure-icon {
  transform: scale(1.1) rotate(-5deg);
}

.azure-icon svg {
  width: 2.5rem;
  height: 2.5rem;
  color: white;
}

.azure-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: black;
  margin-bottom: 0.5rem;
}

.azure-description {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.btn-azure {
  width: 100%;
  background-color: #2563eb;
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  /* Enhanced transition */
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (min-width: 768px) {
  .btn-azure:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.2);
  }
}

.btn-azure:active {
  transform: scale(0.97);
}

/* Add new styles for SMS and Email verification pages */

/* Info Message */
.info-message {
  background-color: #A75A90;
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  /* Add slide-in animation */
  animation: slideInFromTop 0.4s ease-out 0.3s both;
}

.info-message img {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

.info-message svg {
  width: 1.25rem;
  height: 1.25rem;
  color: white;
  flex-shrink: 0;
}

.info-message p {
  color: white;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

.error-message {
  background-color: #A75A90;
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  animation: slideInFromTop 0.4s ease-out 0.3s both;
}

.error-message img {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.error-message div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.error-message p {
  color: white;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

/* Verification Form */
.verification-form {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  /* Add staggered animation */
  transition: all 0.3s ease;
}

.verification-form:nth-of-type(1) {
  animation: slideInFromBottom 0.4s ease-out 0.4s both;
}

.verification-form:nth-of-type(2) {
  animation: slideInFromBottom 0.4s ease-out 0.5s both;
}

.verification-form:hover {
  box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.15);
}

/* Resend Button */
.btn-resend {
  width: 100%;
  background-color: #64A386;
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  margin-top: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  /* Enhanced transition */
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.875rem;
}

.btn-resend:not(:disabled):hover {
  background-color: #559275;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 10px -2px rgba(0, 0, 0, 0.15);
}

.btn-resend:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-resend:active:not(:disabled) {
  transform: scale(0.97);
}

.resend-timer {
  text-align: center;
  color: white;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  /* Add fade animation */
  animation: fadeIn 0.3s ease-out;
}

/* Loading Indicator */
.loading-indicator {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  /* Add scale animation */
  animation: scaleIn 0.3s ease-out;
}

.spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid rgba(125, 179, 125, 0.2);
  border-top-color: #466C7B;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.loading-indicator p {
  color: #4b5563;
  font-size: 0.875rem;
  margin: 0;
}

/* Result Message */
.result-message {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-top: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  font-size: 0.875rem;
  line-height: 1.5;
  /* Add scale animation */
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.result-message.success {
  background-color: #D8EED8;
  color: #166534;
  border: 1px solid #22c55e;
}

.result-message.success strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #166534;
}

.result-message.error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 2px solid #ef4444;
}

/* Footer */
.footer {
  background-color: white;
  padding: 1rem 1.5rem;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  /* Add slide-in animation */
  animation: slideInFromBottom 0.3s ease-out 0.8s both;
}

/* Center footer on desktop */
@media (min-width: 768px) {
  .footer {
    max-width: var(--pop-auth-layout-max);
    margin: 0 auto;
    width: 100%;
  }
}

.footer.transparent {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.footer-brand {
  color: #4b5563;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.footer.transparent .footer-brand {
  color: white;
  font-weight: 600;
}

.footer-link {
  color: #3b82f6;
  font-size: 0.875rem;
  text-decoration: none;
  /* Add transition */
  transition: all 0.2s ease;
}

.footer-link:hover {
  text-decoration: underline;
  transform: translateY(-1px);
}

.footer.transparent .footer-link {
  color: #bfdbfe;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: inline-block;
}

/* Mobile Specific */
@media (max-width: 640px) {
  .main-content {
    padding: 1.5rem 1rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .auth-card {
    padding: 1rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn-submit,
  .btn-azure,
  .btn-ldap-submit,
  .alternative-btn {
    min-height: 48px;
  }

  .form-input {
    min-height: 48px;
    font-size: 16px;
  }
}

/* OTP Setup Page Styles */
.qr-code-container {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: slideInFromBottom 0.4s ease-out 0.4s both;
}

.qr-code-container img {
  max-width: 200px;
  height: auto;
  border-radius: 0.5rem;
}

.manual-key-container {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: slideInFromBottom 0.4s ease-out 0.5s both;
}

.key-display {
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 2px;
  background-color: #E0E0E0;
  padding: 0.75rem;
  min-height: 2.75rem;
  border-radius: 0.375rem;
  word-break: break-all;
  margin-bottom: 1rem;
  text-align: center;
  color: transparent;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy {
  width: 100%;
  background-color: #64A386;
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.75rem;
  min-height: 2.75rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-copy:hover {
  background-color: #559275;
  transform: translateY(-2px);
}

.btn-deeplink {
  width: 100%;
  background-color: #8b5cf6;
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.btn-deeplink:hover {
  background-color: #7c3aed;
  transform: translateY(-2px);
}

.device-input-container {
  background-color: white;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: slideInFromBottom 0.4s ease-out 0.3s both;
}

.device-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  background-color: #f3f4f6;
  color: #111827;
  font-size: 1rem;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.device-input:focus {
  outline: none;
  border-color: #466C7B;
  box-shadow: 0 0 0 3px rgba(125, 179, 125, 0.2);
}

.device-input::placeholder {
  color: #64748b;
  opacity: 1;
}

.section-title {
  color: black;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.completed-section {
  background-color: white;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  animation: scaleIn 0.4s ease-out;
}

.completed-section h2 {
  color: #059669;
  margin-bottom: 1rem;
}

.completed-section p {
  color: #4b5563;
}

.hidden {
  display: none;
}

/* Deeplink Section */
.deeplink-section {
  margin-top: 1rem;
}

.deeplink-hint {
  color: #6b7280;
  font-size: 0.75rem;
  margin: 0.5rem 0 0 0;
  line-height: 1.4;
}

.deeplink-divider {
  display: flex;
  align-items: center;
  margin: 1rem 0;
}

.deeplink-divider::before,
.deeplink-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #e5e7eb;
}

.deeplink-divider span {
  padding: 0 0.75rem;
  color: #9ca3af;
  font-size: 0.75rem;
}

.mobile-link-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.mobile-link-hint {
  color: #6b7280;
  font-size: 0.8rem;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
  text-align: center;
}

.link-copy-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.link-input {
  flex: 1;
  font-size: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  color: #374151;
  outline: none;
}

.link-input:focus {
  border-color: #a855f7;
}

.link-input::placeholder {
  color: #64748b;
  opacity: 1;
}

.btn-copy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background-color: #a855f7;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-copy-icon:hover {
  background-color: #9333ea;
}

.btn-copy-icon.copied {
  background-color: #059669;
}

.btn-copy-icon svg {
  pointer-events: none;
}

/* OTP Setup Step Styles */
.setup-step {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.step-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.step-number {
  font-size: 1rem;
  font-weight: 600;
  color: black;
  flex-shrink: 0;
}

.step-title {
  font-size: 1rem;
  color: black;
  font-weight: 500;
  line-height: 1.5;
}

.key-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
  margin-left: 1.2rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 1.25rem;
  }

  .key-label {
    font-size: 1rem;
    line-height: 1.55;
    color: #454040;
  }

  .device-input {
    font-size: 1.0625rem;
    padding: 1rem 1.125rem;
  }

  .device-input::placeholder {
    color: #454040;
    opacity: 1;
  }

  .ldap-label {
    font-size: 1rem;
  }

  .ldap-input {
    font-size: 1.0625rem;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
  }

  .ldap-input::placeholder {
    color: #454040;
    opacity: 1;
  }

  .link-input {
    font-size: 0.875rem;
  }

  .link-input::placeholder {
    color: #454040;
    opacity: 1;
  }

  .mfa-brand-hero__pill {
    font-size: 1.0625rem;
  }

  .mfa-brand-hero__text {
    font-size: 1rem;
  }

  .form-label {
    font-size: 1rem;
  }

  .form-input {
    font-size: 1.0625rem;
    padding: 0.9375rem 1rem 0.9375rem 3rem;
  }

  .form-input::placeholder {
    color: #454040;
    opacity: 1;
  }

  .form-input.otp {
    font-size: 1.25rem;
  }

  .form-optional-section__headline {
    font-size: 1.0625rem;
  }

  .form-optional-section__hint {
    font-size: 0.9375rem;
    color: #4b5563;
  }
}

.form-optional-section {
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.125rem;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
}

.form-optional-section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

.form-optional-section__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.125rem 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #374151;
  background-color: #e5e7eb;
  border-radius: 0.375rem;
  flex-shrink: 0;
}

.form-optional-section__headline {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.form-optional-section__hint {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.55;
}

.mfa-brand-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.mfa-brand-hero__logo {
  flex: 0 1 auto;
  max-width: 260px;
}

.mfa-brand-hero__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.mfa-brand-hero__intro {
  flex: 1;
  min-width: 0;
}

.mfa-brand-hero__pill {
  display: inline-block;
  background-color: #5b8a9a;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.45rem 1rem;
  border-radius: 1.25rem;
  margin-bottom: 0.625rem;
}

.mfa-brand-hero__text {
  margin: 0;
  color: #111827;
  font-size: 0.9375rem;
  line-height: 1.65;
  font-weight: 400;
}

@media (min-width: 768px) {
  .mfa-brand-hero {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(2rem, 4.5vw, 3.25rem);
  }

  .mfa-brand-hero__logo {
    max-width: min(38%, 320px);
    flex-shrink: 0;
  }

  .mfa-brand-hero__intro {
    padding-left: 0.75rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 1rem;
  max-width: min(500px, 90vw);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: scaleIn 0.3s ease-out;
  position: relative;
}

.close {
  color: #9ca3af;
  float: right;
  font-size: 1.75rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 1rem;
  transition: all 0.2s ease;
}

.close:hover,
.close:focus {
  color: #4b5563;
  transform: scale(1.1);
}

.modal-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-content p {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-content .form-group {
  margin-bottom: 1rem;
}

.modal-content label {
  display: block;
  color: #374151;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.device-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: #f9fafb;
  color: #111827;
  font-size: 1rem;
  transition: all 0.3s ease;
}
