/* KYC Verification Page */

.kyc-main {
  padding: 28px 40px 80px;
  max-width: 800px;
  margin: 0 auto;
}

/* KYC Hero */
.kyc-hero {
  background: linear-gradient(135deg, #0f1724 0%, #152035 50%, #0a1628 100%);
  border: 1px solid rgba(92, 184, 230, 0.15);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.kyc-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -30px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(92, 184, 230, 0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.kyc-hero-content {
  margin-bottom: 24px;
}
.kyc-hero-title {
  font-size: 24px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 8px;
}
.kyc-hero-desc {
  font-size: 14px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}
.kyc-hero-levels {
  display: flex;
  align-items: center;
  gap: 16px;
}
.kyc-hero-level {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  background: rgba(17, 24, 39, 0.6);
  transition: all 0.2s;
}
.kyc-hero-level.current {
  opacity: 0.6;
  border-color: rgba(100, 116, 139, 0.3);
}
.kyc-hero-level.current .kyc-hero-level-icon {
  color: #64748b;
}
.kyc-hero-level.target {
  border-color: rgba(92, 184, 230, 0.3);
  background: rgba(92, 184, 230, 0.04);
  box-shadow: 0 0 24px rgba(92, 184, 230, 0.06);
}
.kyc-hero-level.target .kyc-hero-level-icon {
  color: #5cb8e6;
}
.kyc-hero-level-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
}
.kyc-hero-level-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kyc-hero-level-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}
.kyc-hero-level.target .kyc-hero-level-tag {
  color: #5cb8e6;
}
.kyc-hero-level-name {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}
.kyc-hero-level.target .kyc-hero-level-name {
  color: #5cb8e6;
}
.kyc-hero-level-detail {
  font-size: 12px;
  color: #64748b;
}
.kyc-hero-level.target .kyc-hero-level-detail {
  color: #94a3b8;
}
.kyc-hero-arrow {
  flex-shrink: 0;
  opacity: 0.6;
}

/* Legacy title (hidden, replaced by hero) */
.kyc-title { display: none; }

/* Verification Levels (legacy, hidden) */
.kyc-levels { display: none; }

.kyc-level {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s;
}

.kyc-level.active {
  border-color: #5cb8e6;
}

.level-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.level-badge.basic {
  background: rgba(92,184,230,0.15);
  color: #5cb8e6;
}

.level-badge.advanced {
  background: rgba(168,85,247,0.15);
  color: #a855f7;
}

.level-badge.institutional {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
}

.level-limit {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.level-status {
  font-size: 12px;
  color: #8a94a6;
}

/* Progress Steps */
.kyc-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  gap: 0;
}

.kyc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #8a94a6;
  transition: all 0.2s;
}

.kyc-step.active .step-circle {
  background: #5cb8e6;
  border-color: #5cb8e6;
  color: #0a0e17;
}

.kyc-step.completed .step-circle {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.step-label {
  font-size: 12px;
  color: #8a94a6;
  white-space: nowrap;
}

.kyc-step.active .step-label {
  color: #5cb8e6;
  font-weight: 600;
}

.kyc-step.completed .step-label {
  color: #22c55e;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: #374151;
  margin: 0 8px;
  margin-bottom: 24px;
  transition: background 0.2s;
}

.step-connector.filled {
  background: #22c55e;
}

/* KYC Card */
.kyc-card {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}

.kyc-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.kyc-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}

.kyc-card-body {
  padding: 20px;
}

/* Form elements */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Bug #393: row for the industry-standard First → Middle → Last name block
   (Step 2 Personal Information). auto-fit + minmax keeps each name input at a
   comfortable >=180px and wraps 3→2→1 columns automatically across desktop and
   tablet widths (no cramped intermediate state); the <=700px rule below pins it
   to a single stacked column on mobile (order preserved: First, Middle, Last). */
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #8a94a6;
  margin-bottom: 6px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  background: #0a0e17;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 14px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #5cb8e6;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Upload areas */
.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.upload-grid-single {
  grid-template-columns: 1fr;
  max-width: 50%;
}
@media (max-width: 600px) {
  .upload-grid { grid-template-columns: 1fr; }
  .upload-grid-single { max-width: 100%; }
}

.upload-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(240,246,252,.03);
  border: 1px solid rgba(240,246,252,.08);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-card:hover {
  border-color: rgba(92,184,230,.35);
  background: rgba(92,184,230,.04);
}
.upload-card.has-file {
  border-color: rgba(63,185,80,.3);
  background: rgba(63,185,80,.04);
}

.upload-card-preview {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: rgba(240,246,252,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.upload-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.upload-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.upload-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.upload-card-status {
  font-size: 11px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-card.has-file .upload-card-status {
  color: #3fb950;
}

.upload-card-action {
  flex-shrink: 0;
  color: #5cb8e6;
  opacity: .6;
  transition: opacity .2s;
}
.upload-card:hover .upload-card-action {
  opacity: 1;
}
.upload-card.has-file .upload-card-action {
  color: #3fb950;
}

/* Info box */
.kyc-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(92,184,230,0.08);
  border: 1px solid rgba(92,184,230,0.2);
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}

.kyc-info-box svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Step actions */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* btn-primary / btn-outline: now inherited from style.css .app-body scope */

/* Review step */
.review-body {
  text-align: center;
}

.review-icon {
  margin-bottom: 16px;
}

.review-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px 0;
}

.review-desc {
  font-size: 14px;
  color: #8a94a6;
  margin: 0 0 24px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.review-summary {
  background: #0a0e17;
  border-radius: 10px;
  padding: 20px;
  text-align: left;
  max-width: 500px;
  margin: 0 auto 24px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.review-row:last-child { border-bottom: none; }

.review-label {
  font-size: 13px;
  color: #8a94a6;
}

.review-value {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.review-value.status-pending { color: #fbbf24; }
.review-value.status-ok { color: #5cb8e6; }
.review-value.status-ng { color: #ef4444; }
.review-value.status-unsure { color: #fbbf24; }

/* KYC Loading Spinner */
.kyc-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #1e293b;
  border-top-color: #5cb8e6;
  border-right-color: #5cb8e6;
  border-radius: 50%;
  animation: kycSpin 1s linear infinite;
  margin: 0 auto 20px;
}
@keyframes kycSpin {
  to { transform: rotate(360deg); }
}
.kyc-loading-warning {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(224, 160, 80, 0.08);
  border: 1px solid rgba(224, 160, 80, 0.2);
  border-radius: 8px;
  padding: 12px 20px;
  color: #e0a050;
  font-size: 13px;
  line-height: 1.4;
  max-width: 420px;
}

/* Terms & Conditions */
.terms-scroll {
  background: #0d1117;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: #1e293b transparent;
}
.terms-scroll::-webkit-scrollbar { width: 6px; }
.terms-scroll::-webkit-scrollbar-track { background: transparent; }
.terms-scroll::-webkit-scrollbar-thumb { background: rgba(92,184,230,0.3); border-radius: 3px; }
.terms-heading {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 16px;
}
.terms-subheading {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 20px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.terms-scroll p {
  margin: 0 0 10px;
}
.terms-list {
  margin: 0 0 12px;
  padding-left: 20px;
}
.terms-list li {
  margin-bottom: 8px;
}
.terms-agree {
  margin-top: 16px;
  padding: 16px;
  background: rgba(92, 184, 230, 0.04);
  border: 1px solid #1e293b;
  border-radius: 8px;
}
.checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.5;
}
.checkbox-option input[type="checkbox"] {
  accent-color: #5cb8e6;
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Form section title */
.form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #5cb8e6;
  margin: 24px 0 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(30, 41, 59, 0.5);
}

/* Required mark */
.form-required {
  color: #ef4444;
  font-size: 12px;
}

/* Form hint */
.form-hint {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.4;
}

/* Card subtitle */
.kyc-card-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 4px 0 0;
  line-height: 1.5;
}

/* Radio group */
.radio-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0d1117;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  justify-content: center;
}
.radio-option:hover { border-color: #5cb8e6; color: #e2e8f0; }
.radio-option.active,
.radio-option:has(input:checked) {
  background: rgba(92, 184, 230, 0.08);
  border-color: #5cb8e6;
  color: #e2e8f0;
}
.radio-option input[type="radio"] {
  accent-color: #5cb8e6;
}

/* Responsive */
@media (max-width: 1024px) {
  .kyc-main { padding: 24px 20px 60px; }
}
@media (max-width: 700px) {
  .kyc-main { padding: 20px 16px 60px; }
  .kyc-levels { grid-template-columns: 1fr; }
  .kyc-hero { padding: 20px; }
  .kyc-hero-levels { flex-direction: column; }
  .kyc-hero-arrow { transform: rotate(90deg); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; } /* Bug #393: stack name fields on mobile */
  .upload-grid { grid-template-columns: 1fr; }
  .step-connector { width: 30px; }
  .step-label { font-size: 10px; }
  .radio-group { flex-direction: column; }
}
