/* Import Inter font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* CSS Variables */
:root {
  --primary-color: #2d3748;
  --primary-hover: #1a202c;
  --primary-light: #f7fafc;
  --secondary-color: #4a5568;
  --success-color: #38a169;
  --error-color: #e53e3e;
  --warning-color: #d69e2e;
  --info-color: #3182ce;

  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;

  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-tertiary: #edf2f7;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Update body background to match PAHA branding */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 50%, #718096 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main Layout */
.main-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.content-wrapper {
  width: 100%;
  max-width: 480px;
}

/* Header Section */
.header-section {
  text-align: center;
  margin-bottom: 3rem;
}

.logo-wrapper {
  margin-bottom: 2rem;
}

/* Update logo styling */
.logo {
  width: 300px;
  height: auto;
  max-height: 120px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background: var(--bg-primary);
  padding: 16px;
  object-fit: contain;
}

.main-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--bg-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.main-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

/* Form Container */
.form-container {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Security Badge */
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, #e0e7ff 100%);
  color: var(--primary-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid rgba(45, 55, 72, 0.2);
}

.success-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: var(--success-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
  border: 1px solid rgba(56, 161, 105, 0.2);
}

/* Remove old upload progress styles */
/* .upload-progress { ... } */

/* Add new inline upload progress styles */
.upload-progress-inline {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.progress-text-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}

.progress-percentage-inline {
  font-weight: 600;
  color: var(--primary-color);
  font-family: "Monaco", "Menlo", monospace;
}

.progress-bar-container-inline {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-inline {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--info-color) 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Mobile responsive for inline progress */
@media (max-width: 640px) {
  .upload-progress-inline {
    padding: 0.5rem;
    margin-top: 0.5rem;
  }

  .progress-text-inline {
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
  }

  .progress-bar-container-inline {
    height: 5px;
  }
}

@media (max-width: 480px) {
  .upload-progress-inline {
    padding: 0.375rem;
  }

  .progress-text-inline {
    font-size: 0.6875rem;
  }

  .progress-bar-container-inline {
    height: 4px;
  }
}

/* User Details Section */
.user-details-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.details-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.details-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.detail-item:hover {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.02);
}

.detail-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 100px;
  margin: 0;
}

.detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  flex: 1;
}

.detail-input {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-color);
  background: var(--bg-primary);
}

.detail-input:focus {
  box-shadow: 0 0 0 2px rgba(45, 55, 72, 0.1);
}

.details-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  gap: 0.375rem;
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #2f855a 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Mobile responsive for details section */
@media (max-width: 640px) {
  .user-details-section {
    padding: 1.25rem;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
  }

  .detail-label {
    min-width: auto;
    font-size: 0.8125rem;
  }

  .detail-value,
  .detail-input {
    text-align: left;
    font-size: 0.8125rem;
    width: 100%;
  }

  .details-actions {
    flex-direction: column;
  }

  .btn-small {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .user-details-section {
    padding: 1rem;
  }

  .details-header {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
  }

  .details-content {
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .detail-item {
    padding: 0.75rem;
  }
}

/* Modern Form Styles */
.modern-form {
  margin-bottom: 2rem;
}

.input-group-modern {
  margin-bottom: 1.5rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  z-index: 2;
  transition: var(--transition);
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(45, 55, 72, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Form Label Styles */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  position: static;
  background: transparent;
  padding: 0;
  z-index: auto;
  left: auto;
  top: auto;
  transform: none;
  transition: none;
  pointer-events: auto;
  white-space: normal;
}

/* Remove all floating label behavior */
.form-input:focus + .form-label,
.input-wrapper:focus-within .form-label,
.input-wrapper.has-value .form-label,
.form-select:focus + .form-label,
.form-select:not([value=""]) + .form-label,
.form-select:valid + .form-label,
.form-select:invalid + .form-label {
  position: static;
  transform: none;
  color: var(--text-primary);
  background: transparent;
  padding: 0;
  left: auto;
  top: auto;
  z-index: auto;
  font-size: 0.875rem;
}

/* Timer Display */
.timer-display {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(49, 130, 206, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.timer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--info-color);
}

.timer-icon {
  font-size: 1rem;
}

.timer-value {
  font-weight: 600;
  font-family: "Monaco", "Menlo", monospace;
}

.timer-display.expired {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border-color: rgba(229, 62, 62, 0.2);
}

.timer-display.expired .timer-content {
  color: var(--error-color);
}

/* OTP Styles */
.otp-section {
  margin-bottom: 2rem;
}

.otp-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.otp-inputs {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.otp-digit {
  width: 3.5rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
  font-family: "Monaco", "Menlo", monospace;

  /* Remove number input arrows/spinners */
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Remove number input arrows for WebKit browsers */
.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.otp-digit:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(45, 55, 72, 0.1);
}

.otp-digit.filled {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.05);
}

.otp-digit.focused {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(45, 55, 72, 0.1);
}

/* Modern Button Styles */
.btn-modern {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
  width: 100%;
  margin-bottom: 1rem;
}

.btn-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: var(--transition);
}

.btn-modern.loading .btn-content {
  opacity: 0;
}

.btn-modern.loading .btn-loader {
  opacity: 1;
}

.btn-icon {
  font-size: 0.875rem;
  transition: var(--transition);
}

.btn-icon-left {
  margin-right: 0.5rem;
}

.btn-modern:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Secondary Actions */
.secondary-actions {
  display: flex;
  gap: 0.75rem;
}

.secondary-actions .btn-modern {
  flex: 1;
  gap: 0.5rem;
}

/* QR Display */
.qr-display-section {
  margin: 2rem 0;
}

.qr-container {
  text-align: center;
}

.qr-wrapper {
  background: var(--bg-primary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.qr-wrapper:hover {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.02);
}

.qr-image {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.qr-info {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.qr-id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.id-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.id-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: "Monaco", "Menlo", monospace;
}

/* Instructions Card */
.instructions-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
}

.instructions-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.instructions-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.instructions-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.instructions-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.instructions-list li:last-child {
  margin-bottom: 0;
}

/* Resend Section */
.resend-section {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-light);
  margin-top: 1.5rem;
}

.resend-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* Links */
.link-primary {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  min-height: 44px; /* Touch target size */
}

.link-primary:hover {
  color: var(--primary-hover);
  text-decoration: none;
  background: rgba(45, 55, 72, 0.05);
}

.link-primary:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  text-decoration: none;
}

.link-primary i {
  flex-shrink: 0;
  font-size: 0.875rem;
}

.link-primary .resend-text {
  margin: 0;
  line-height: 1;
}

.link-secondary {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  min-height: 44px;
}

.link-secondary:hover {
  color: var(--text-primary);
  text-decoration: none;
  background: rgba(74, 85, 104, 0.05);
}

.link-secondary:focus {
  outline: 2px solid var(--text-secondary);
  outline-offset: 2px;
  text-decoration: none;
}

/* Form Footer */
.form-footer {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  margin-top: 2rem;
}

/* Alert Styles */
#alertContainer {
  min-height: 0;
  transition: var(--transition-slow);
}

.alert-modern {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(-10px);
  transition: var(--transition-slow);
  position: relative;
}

.alert-modern.show {
  opacity: 1;
  transform: translateY(0);
}

.alert-modern.hide {
  opacity: 0;
  transform: translateY(-10px);
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  max-height: 0;
  overflow: hidden;
}

.alert-success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: rgba(56, 161, 105, 0.2);
  color: #065f46;
}

.alert-error {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border-color: rgba(229, 62, 62, 0.2);
  color: #991b1b;
}

.alert-icon {
  flex-shrink: 0;
  font-size: 1.25rem;
}

.alert-content {
  flex: 1;
}

.alert-message {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
}

.toast-modern {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 0.5rem;
  min-width: 300px;
  transform: translateX(100%);
  opacity: 0;
  transition: var(--transition-slow);
}

.toast-modern.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  border-left: 4px solid var(--success-color);
}

.toast-info {
  border-left: 4px solid var(--info-color);
}

.toast-error {
  border-left: 4px solid var(--error-color);
}

.toast-icon {
  font-size: 1.25rem;
  color: var(--success-color);
}

.toast-info .toast-icon {
  color: var(--info-color);
}

.toast-error .toast-icon {
  color: var(--error-color);
}

.toast-message {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* User Selection Styles */
.info-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--info-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid rgba(49, 130, 206, 0.2);
}

.warning-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: var(--warning-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border: 1px solid rgba(214, 158, 46, 0.2);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border: 1px solid;
}

.status-pending {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.3);
}

.status-accepted {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  border-color: rgba(59, 130, 246, 0.3);
}

.status-rejected {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
}

.user-selection-section {
  margin-bottom: 2rem;
}

.user-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.user-option {
  position: relative;
}

.user-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.user-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition);
  margin: 0;
}

.user-label:hover {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.02);
}

.user-radio:checked + .user-label {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.05);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.25rem;
}

.user-radio:checked + .user-label .user-avatar {
  background: var(--primary-color);
  color: white;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.user-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.radio-indicator {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.radio-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  transition: var(--transition);
}

.user-radio:checked + .user-label .radio-indicator {
  border-color: var(--primary-color);
}

.user-radio:checked + .user-label .radio-dot {
  background: var(--primary-color);
}

/* Photo Upload Styles */
.upload-section {
  margin-bottom: 2rem;
}

.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-primary);
  position: relative;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.02);
}

.upload-area.drag-over {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.05);
  transform: scale(1.02);
}

.upload-area.has-file {
  border-style: solid;
  border-color: var(--success-color);
  background: rgba(56, 161, 105, 0.02);
  padding: 1.5rem;
  cursor: default;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.upload-area:hover .upload-icon {
  color: var(--primary-color);
  transform: scale(1.1);
}

.upload-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.upload-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.preview-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  position: relative;
  padding: 0.5rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
}

.preview-image {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}

.preview-info {
  flex: 1;
  min-width: 0; /* Allow text truncation */
  padding-right: 2rem; /* Space for remove button */
}

.file-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  word-break: break-all;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.remove-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--error-color);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.upload-requirements {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.requirements-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.requirements-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.requirements-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.requirements-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--info-color);
  font-weight: bold;
}

.requirements-list li:last-child {
  margin-bottom: 0;
}

/* Mobile-specific photo upload improvements */
@media (max-width: 640px) {
  .upload-area {
    padding: 1.5rem 1rem;
    min-height: 160px;
  }

  .upload-area.has-file {
    padding: 1rem;
  }

  .upload-icon {
    font-size: 2rem;
  }

  .upload-title {
    font-size: 1rem;
  }

  .upload-subtitle {
    font-size: 0.8125rem;
  }

  .preview-content {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .preview-image {
    width: 56px;
    height: 56px;
  }

  .file-name {
    font-size: 0.8125rem;
    -webkit-line-clamp: 2;
  }

  .file-size {
    font-size: 0.6875rem;
  }

  .remove-btn {
    width: 24px;
    height: 24px;
    font-size: 0.6875rem;
    top: -2px;
    right: -2px;
  }

  .upload-requirements {
    padding: 1rem;
    margin-top: 1rem;
  }

  .requirements-title {
    font-size: 0.8125rem;
  }

  .requirements-list li {
    font-size: 0.8125rem;
    padding-left: 1rem;
  }
}

@media (max-width: 480px) {
  .upload-area {
    padding: 1.25rem 0.75rem;
    min-height: 140px;
  }

  .upload-area.has-file {
    padding: 0.75rem;
  }

  .preview-content {
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .preview-image {
    width: 48px;
    height: 48px;
  }

  .preview-info {
    padding-right: 1.5rem;
  }

  .file-name {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .file-size {
    font-size: 0.625rem;
  }

  .remove-btn {
    width: 22px;
    height: 22px;
    font-size: 0.625rem;
  }
}

/* Responsive Design */
@media (max-width: 640px) {
  .main-container {
    padding: 1rem;
  }

  .content-wrapper {
    max-width: 100%;
  }

  .form-container {
    padding: 2rem 1.5rem;
  }

  .logo {
    width: 300px;
    max-height: 110px;
    padding: 15px;
  }

  .main-title {
    font-size: 1.75rem;
  }

  .main-subtitle {
    font-size: 1rem;
  }

  .otp-inputs {
    gap: 0.5rem;
  }

  .otp-digit {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
  }

  .secondary-actions {
    flex-direction: column;
  }

  /* Improved resend button for mobile */
  .link-primary {
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    gap: 0.75rem;
  }

  .link-primary i {
    font-size: 1rem;
  }

  .link-secondary {
    min-height: 48px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    gap: 0.75rem;
  }

  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast-modern {
    min-width: auto;
    transform: translateY(-100%);
  }

  .toast-modern.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 1.5rem 1rem;
  }

  .logo {
    width: 300px;
    max-height: 100px;
    padding: 14px;
  }

  .main-title {
    font-size: 1.5rem;
  }

  .otp-digit {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }

  /* Extra small mobile improvements */
  .link-primary,
  .link-secondary {
    min-height: 52px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
  }

  .main-container {
    background: white;
  }

  .form-container {
    box-shadow: none;
    border: 1px solid #000;
  }

  .btn-modern,
  .form-footer,
  .resend-section,
  .secondary-actions {
    display: none;
  }

  .instructions-card {
    border: 1px solid #000;
  }
}

/* Animation Classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-container {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus Visible */
.btn-modern:focus-visible,
.form-input:focus-visible,
.otp-digit:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Upload Overlay */
.upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.upload-overlay-content {
  text-align: center;
  padding: 1rem;
}

.upload-spinner {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.upload-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 200px;
}

.upload-percentage {
  font-weight: 600;
  color: var(--primary-color);
  font-family: "Monaco", "Menlo", monospace;
}

.upload-progress-bar {
  width: 200px;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--info-color) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

@media (max-width: 640px) {
  .upload-progress-text {
    min-width: 180px;
    font-size: 0.8125rem;
  }

  .upload-progress-bar {
    width: 180px;
    height: 6px;
  }

  .upload-spinner {
    font-size: 1.75rem;
  }
}

/* Registration Page Styles */
.registration-wrapper {
  max-width: 600px;
}

.registration-step {
  width: 100%;
}

.name-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(45, 55, 72, 0.1);
}

/* Ensure floating labels work with selects */
.form-select:focus + .form-label,
.input-wrapper:focus-within .form-label,
.input-wrapper.has-value .form-label {
  color: var(--primary-color);
}

/* Fix select option styling */
.form-select option {
  padding: 0.5rem;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-select option:checked {
  background: var(--primary-color);
  color: white;
}

/* Select element specific styles */
.input-wrapper.has-value .form-select,
.input-wrapper:focus-within .form-select {
  border-color: var(--primary-color);
}

.input-wrapper.has-value .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--primary-color);
}

/* Ensure proper z-index for floating labels over selects */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.membership-section {
  width: 100%;
}

.section-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition);
  margin: 0;
}

.radio-label:hover {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.02);
}

.radio-option input[type="radio"]:checked + .radio-label {
  border-color: var(--primary-color);
  background: rgba(45, 55, 72, 0.05);
}

.radio-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: var(--transition);
}

.radio-option input[type="radio"]:checked + .radio-label .radio-indicator {
  border-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + .radio-label .radio-dot {
  background: var(--primary-color);
}

/* Preview Styles */
.preview-container {
  margin-bottom: 2rem;
}

.preview-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.preview-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.preview-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0;
}

.preview-item label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 140px;
  margin: 0;
}

.preview-item span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  flex: 1;
  word-break: break-word;
}

.preview-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .registration-wrapper {
    max-width: 100%;
  }

  .name-fields-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .radio-group {
    gap: 0.5rem;
  }

  .radio-label {
    padding: 1rem 0.75rem;
  }

  .preview-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .preview-item label {
    min-width: auto;
    font-size: 0.8125rem;
  }

  .preview-item span {
    text-align: left;
    font-size: 0.8125rem;
  }

  .preview-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .preview-section {
    padding: 1rem;
  }

  .preview-title {
    font-size: 1rem;
  }
}

/* Checkbox Styles */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  position: relative;
}

.form-checkbox:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.form-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.form-checkbox:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Branding Section */
.branding-section {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.branding-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.branding-text {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.branding-logo {
  color: rgba(255, 255, 255, 1);
  font-weight: 700;
  letter-spacing: 0.025em;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Mobile responsive for branding */
@media (max-width: 640px) {
  .branding-section {
    padding: 1.25rem 0;
    margin-top: 1.5rem;
  }

  .branding-content {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .branding-section {
    padding: 1rem 0;
  }

  .branding-content {
    font-size: 0.75rem;
  }
}

/* Adding red warning border styles for required field validation */
.form-input.error,
.form-select.error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
}

.form-input.error:focus,
.form-select.error:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2) !important;
}

.input-wrapper.error .input-icon {
  color: #dc2626 !important;
}

/* Custom Popup Modal Styles for Email Validation Alerts */
.email-validation-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.email-validation-popup.show {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.email-validation-popup.show .popup-content {
  transform: scale(1);
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.popup-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.popup-icon.error {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  color: #dc2626;
}

.popup-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.popup-message {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.popup-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.popup-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.popup-btn-primary {
  background: var(--primary-color);
  color: white;
}

.popup-btn-primary:hover {
  background: var(--primary-hover);
}

.popup-btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.popup-btn-secondary:hover {
  background: var(--bg-tertiary);
}

/* Email Validation Loading Indicator Styles */
.email-validation-loading {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.email-validation-loading.show {
  opacity: 1;
}

.email-validation-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Status Display States */
.status-display {
  background: var(--bg-primary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  margin-bottom: 1rem;
  text-align: center;
  transition: var(--transition);
}

.status-pending-display {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: rgba(217, 119, 6, 0.4);
  color: #92400e;
}

.status-rejected-display {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border-color: rgba(239, 68, 68, 0.4);
  color: #dc2626;
}

.status-display .status-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.status-display .status-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.status-display .status-message {
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 400px;
  margin: 0 auto;
}

.qr-accepted-display {
  text-align: center;
}

/* Responsive adjustments for status displays */
@media (max-width: 768px) {
  .status-display {
    padding: 2rem 1.5rem;
  }

  .status-display .status-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .status-display .status-title {
    font-size: 1.25rem;
  }

  .status-display .status-message {
    font-size: 0.9rem;
  }
}
