body {
  color: #1f2937;
}

.app-shell {
  max-width: 640px;
  margin: 0 auto;
}

.hero-panel {
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 55%, #f6f9fc 100%);
  border: 1px solid rgba(13, 110, 253, 0.08);
  border-radius: 20px;
}

.hero-topbar {
  display: flex;
  justify-content: flex-end;
}

.lang-toggle {
  border-radius: 999px;
  min-width: 96px;
  font-weight: 600;
}

.hero-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
  font-size: 2rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0.75rem 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
}

.hero-subtitle {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
}

.hero-note {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 16px;
  background: #fff;
}

.hero-note-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.step-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.step-card {
  padding: 0.9rem 0.8rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-number {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 auto;
}

.step-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
}

.step-subtitle {
  color: #64748b;
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

.app-alert {
  border-radius: 16px;
  border: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.section-card {
  border: none;
  border-radius: 18px;
  overflow: hidden;
}

.section-header {
  background: linear-gradient(135deg, #0d6efd 0%, #3b82f6 100%);
  color: #fff;
  padding: 1rem 1.1rem;
  border-bottom: none;
}

.optional-header {
  background: linear-gradient(135deg, #64748b 0%, #94a3b8 100%);
}

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.3rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.section-subtitle {
  font-size: 0.82rem;
  opacity: 0.82;
  margin-top: 0.2rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.required {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.status-pill.ocr {
  background: #ffe08a;
  color: #664d03;
}

.status-pill.optional {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.field-hint {
  color: #6b7280;
  font-size: 0.78rem;
  margin-top: 0.4rem;
  line-height: 1.5;
}

.instruction-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.instruction-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.84rem;
  line-height: 1.5;
}

.instruction-list li i {
  color: #0d6efd;
  font-size: 1rem;
  margin-top: 0.05rem;
  flex: 0 0 auto;
}

.optional-list li i {
  color: #64748b;
}

.id-card-frame-wrap {
  width: 100%;
}

.id-card-frame {
  position: relative;
  width: 100%;
  padding-top: 63.06%;
  background: #1a1a2e;
  border-radius: 16px;
  overflow: hidden;
  border: 2px dashed #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.id-card-frame video,
.id-card-frame canvas,
.id-card-frame img.d-none { display: none !important; }

.id-card-frame video,
.id-card-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-card-frame img:not(.d-none) {
  border: 2px solid rgba(25, 135, 84, 0.38);
  border-radius: 16px;
}

.id-card-frame.is-complete {
  border-color: rgba(25, 135, 84, 0.55);
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.08);
}

.id-card-frame.is-missing {
  border-color: rgba(220, 53, 69, 0.55);
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.08);
}

.id-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  text-align: center;
  padding: 1rem;
}

.placeholder-icon {
  font-size: 2rem;
}

.placeholder-title {
  margin-top: 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #334155;
}

.placeholder-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  pointer-events: none;
}

.camera-guide-box {
  width: 88%;
  aspect-ratio: 1.585 / 1;
  border: 2.5px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
  position: relative;
}

.camera-guide-box::before,
.camera-guide-box::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: #4fc3f7;
  border-style: solid;
}

.camera-guide-box::before {
  top: -2px;
  left: -2px;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}

.camera-guide-box::after {
  bottom: -2px;
  right: -2px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

.camera-tip {
  color: #fff;
  font-size: 0.78rem;
  margin-top: 10px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  letter-spacing: 0.02em;
  padding: 0 1rem;
  text-align: center;
}

.capture-actions .btn {
  min-height: 46px;
  font-weight: 600;
}

.ocr-status {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.ocr-status-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ocr-status.is-done {
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.ocr-status.is-done .ocr-status-label,
.ocr-status.is-done #ocrStatusIcon,
.ocr-status.is-done #ocrStatusText {
  color: #15803d;
}

.optional-section {
  opacity: 0.98;
}

.other-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
}

.other-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.other-thumb .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(220,53,69,0.9);
  color: #fff;
  border: none;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
}

.consent-box i {
  color: #0d6efd;
  font-size: 1.1rem;
  margin-top: 0.1rem;
}

.submit-btn {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(25, 135, 84, 0.18);
}

.success-card {
  border-radius: 22px;
}

.success-icon-wrap i {
  font-size: 4rem;
}

.success-title {
  font-size: 1.5rem;
}

.notice-modal-content {
  white-space: pre-line;
  max-height: min(60vh, 420px);
  overflow-y: auto;
  line-height: 1.7;
}

.font-monospace {
  font-family: 'Courier New', monospace;
}

@media (max-width: 575.98px) {
  .hero-panel .card-body,
  .section-card .card-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .step-overview {
    grid-template-columns: 1fr;
  }

  .step-card {
    padding: 0.8rem;
  }

  .section-header {
    padding: 0.95rem 1rem;
  }

  .section-title {
    font-size: 0.95rem;
  }

  .hero-subtitle,
  .instruction-list li,
  .field-hint {
    font-size: 0.8rem;
  }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
