:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #059669;
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 480px;
  margin: 2rem auto;
  padding: 20px;
}

.verification-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

.header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control,
.form-select,
.form-control-lg,
.form-select-lg {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.form-control:focus,
.form-select:focus,
.form-control-lg:focus,
.form-select-lg:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* DigiLocker Button */
.btn-digilocker {
  background-color: #fff;
  border: 2px solid #e5e7eb;
  color: #374151;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-digilocker:hover {
  background-color: #f9fafb;
  border-color: var(--primary);
  color: var(--primary);
}

/* Camera & Preview Styling */
#video-wrapper,
#preview-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1rem;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

video,
#photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

video {
  transform: scaleX(-1);
}

.capture-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.btn-capture {
  background: #ffffff;
  border: 5px solid rgba(37, 99, 235, 0.3);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-capture:active {
  transform: translateX(-50%) scale(0.9);
}

/* Buttons Styling */
.btn-submit {
  background-color: var(--primary);
  color: white;
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 2rem;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-submit:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-success:disabled {
  background-color: #198754;
  border-color: #198754;
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
  color: white;
}

/* Badges & Utilities */
.badge-verified {
  background: #d1fae5;
  color: var(--success);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.d-none {
  display: none !important;
}

.btn-link {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  display: block;
  margin: 0.5rem auto 0;
}

/* Consolidated Professional Upload Box */
.upload-box {
  cursor: pointer;
  background-color: #f7fafc;
  border: 2px dashed #cbd5e0;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
}

.upload-box:hover {
  border-color: var(--primary);
  background-color: #f8f9fa;
}

.upload-box:active {
  transform: scale(0.98);
}

/* Dynamic Preview and Upload Containers */
.preview-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.preview-container img,
.preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 14px;
}

/* Form Elements Checklist adjustments */
.form-check-input {
  margin-top: 0.1rem;
}

.form-check-input:checked {
  background-color: #198754;
  border-color: #198754;
}

/* Responsive Mobile Tweaks */
@media (max-width: 768px) {
  .container {
    margin: 0.5rem auto;
    padding: 10px;
  }

  .verification-card {
    padding: 1.5rem;
    margin: 5px;
    border-radius: 18px;
  }

  h1 {
    font-size: 1.3rem;
  }

  .id-row {
    display: flex;
    flex-direction: column;
  }

  .id-col {
    width: 100% !important;
    margin-bottom: 15px;
  }

  .form-control-lg,
  .form-select-lg,
  .form-control,
  .form-select {
    font-size: 16px !important;
    padding: 12px;
  }
}

/* Processing State Spinners */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #ffffff;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn-content-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Custom High-Visibility Consent Card Container */
.consent-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: #f4f7ff; /* Soft blue tint */
  border: 1.5px solid #c7d8fe;  /* Visible blue border */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08); /* Soft blue elevation shadow */
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.consent-card:hover {
  background-color: #ebf2ff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.consent-card-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e40af; /* High-contrast blue text */
  line-height: 1.4;
  user-select: none;
}

/* Standalone High-Contrast Checkbox Adjustments */
.form-check-input.consent-checkbox {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 1px;
  border: 2px solid var(--primary) !important;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  transition: all 0.2s ease;
}

.form-check-input.consent-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25) !important;
}

.form-check-input.consent-checkbox:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3) !important;
}