/* AutoReply.cc Face Verification System - Main Styles */
/* Premium Binance-inspired design */

:root {
  --primary: #1a3c5e;
  --primary-light: #2c5282;
  --primary-dark: #0f2840;
  --accent: #c9a227;
  --accent-dark: #8a6d1a;
  --success: #10b981;
  --success-dark: #059669;
  --warning: #f0a500;
  --danger: #ef4444;
  --info: #3b82f6;
  --bg: #f4f4f6;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Progress Bar */
.progress-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 16px 16px;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transition: width 0.5s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.progress-step .step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.progress-step .step-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
  text-align: center;
}

.progress-step.active .step-number {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 60, 94, 0.12);
}

.progress-step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.progress-step.completed .step-number {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.progress-step.completed .step-number::after {
  content: '✓';
}

.progress-step.completed .step-number {
  font-size: 0;
}

.progress-step.completed .step-label {
  color: var(--success);
}

.progress-fill {
  display: none;
}

/* Header */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.header-status .status-badge {
  background: rgba(26, 60, 94, 0.08);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.header-status .status-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 28px 16px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 32px 28px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.verification-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
}

.card-body {
  padding: 28px;
}

/* Info Panel */
.info-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
}

.info-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

.info-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.info-value {
  display: block;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

/* Steps Overview */
.steps-overview {
  margin-bottom: 28px;
}

.steps-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.step-cards {
  display: grid;
  gap: 10px;
}

.step-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.step-card.active {
  background: linear-gradient(135deg, rgba(26, 60, 94, 0.05) 0%, rgba(201, 162, 39, 0.08) 100%);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.step-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.step-card-icon svg {
  width: 22px;
  height: 22px;
}

.step-card-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.step-card-number {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  text-align: center;
  line-height: 18px;
  margin-right: 6px;
}

.step-card-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 60, 94, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 60, 94, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border-light);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(26, 60, 94, 0.05);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 15px;
}

.btn-icon {
  padding: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
}

.btn-icon:hover {
  background: var(--border-light);
  color: var(--primary);
}

.cta-section {
  text-align: center;
  padding: 8px 0 4px;
}

.cta-section .btn {
  margin-bottom: 14px;
}

.cta-note {
  font-size: 12px;
  color: var(--text-muted);
}

.cta-note a {
  color: var(--primary);
  text-decoration: none;
}

/* Trust Indicators */
.trust-indicators {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Footer */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 28px 16px;
  margin-top: auto;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.footer-brand p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copyright {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Forms */
.form-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.required {
  color: var(--danger);
}

.form-input {
  padding: 13px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 60, 94, 0.08);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 4px;
  min-height: 16px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-actions .btn {
  flex: 1;
}

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 12px;
}

.alert-error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: var(--success);
  border: 1px solid #a7f3d0;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--border-light);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(26, 60, 94, 0.03);
}

.upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--primary);
  opacity: 0.6;
}

.upload-title {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}

.upload-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.preview-container {
  text-align: center;
}

.preview-container img {
  max-width: 100%;
  max-height: 320px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.preview-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.preview-actions .btn {
  flex: 1;
  max-width: 180px;
}

.upload-hints {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.hint svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.info-banner {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(26, 60, 94, 0.04) 0%, rgba(201, 162, 39, 0.06) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.info-banner svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex-shrink: 0;
}

.info-banner ul {
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Camera */
.camera-container {
  margin-bottom: 24px;
}

.camera-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 20px;
  aspect-ratio: 4/3;
  background: var(--primary-dark);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.camera-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.face-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.face-oval {
  width: 72%;
  max-width: 280px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.4));
}

.corner-indicators {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 76%;
  max-width: 300px;
  height: 86%;
  max-height: 340px;
}

.corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.8;
}

.corner.tl {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 8px;
}

.corner.tr {
  top: 0;
  right: 0;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 8px;
}

.corner.bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 8px;
}

.corner.br {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 8px;
}

.camera-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 20px;
}

.camera-placeholder svg {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.camera-placeholder p {
  margin-bottom: 16px;
  font-size: 14px;
}

.liveness-panel {
  text-align: center;
  margin-bottom: 20px;
}

.score-circle {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 10px;
}

.score-circle svg {
  transform: rotate(-90deg);
  width: 120px;
  height: 120px;
}

.score-bg {
  stroke: var(--border);
}

.score-progress {
  stroke: url(#scoreGradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.score-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.score-threshold {
  font-size: 11px;
  color: var(--text-muted);
}

.challenge-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}

.challenge-card {
  max-width: 320px;
  margin: 0 auto;
}

.challenge-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--primary);
}

.challenge-title {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}

.challenge-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.challenge-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.challenge-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.status-indicators {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.status-item.active {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  font-weight: 600;
}

.status-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.face-actions {
  text-align: center;
  margin-bottom: 20px;
}

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: rgba(26, 60, 94, 0.03);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.security-note svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Review Page */
.scores-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.score-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.score-card.success {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.score-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-card-icon svg {
  width: 24px;
  height: 24px;
}

.score-card-content {
  display: flex;
  flex-direction: column;
}

.score-card-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.score-card-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.score-card-status {
  font-size: 11px;
  font-weight: 700;
}

.score-card-status.passed {
  color: var(--success);
}

.review-section {
  margin-bottom: 24px;
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.review-item {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
}

.review-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.review-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}

.image-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.image-preview {
  text-align: center;
}

.image-preview img,
.image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.image-caption {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.consent-section {
  margin: 24px 0;
  padding: 16px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  position: relative;
}

.consent-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.consent-checkbox input:checked + .checkmark {
  background: var(--success);
  border-color: var(--success);
}

.consent-checkbox input:checked + .checkmark::after {
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.consent-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Complete Page */
.complete-page .main-content {
  max-width: 700px;
}

.success-animation {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.success-circle {
  width: 120px;
  height: 120px;
}

.checkmark-svg {
  width: 120px;
  height: 120px;
}

.checkmark-circle {
  stroke-dasharray: 339;
  stroke-dashoffset: 339;
}

.checkmark-path {
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
}

.complete-card {
  margin-top: -40px;
  padding-top: 40px;
}

.complete-header {
  padding-top: 20px !important;
}

.fiu-confirmation {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.fiu-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.fiu-content {
  flex: 1;
}

.fiu-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--success-dark);
  margin-bottom: 6px;
}

.fiu-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.fiu-details {
  display: grid;
  gap: 8px;
}

.fiu-detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.fiu-detail-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.fiu-detail-value {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.fiu-detail-value.status-confirmed {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 10px;
  border-radius: 12px;
}

.access-grant {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08) 0%, rgba(26, 60, 94, 0.06) 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.access-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.access-content {
  flex: 1;
}

.access-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.access-subtitle {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.5;
}

.access-date {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.access-date svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.verification-summary {
  margin-bottom: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
}

.summary-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.summary-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.summary-value.risk-low {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 10px;
  border-radius: 12px;
  width: fit-content;
}

.next-steps {
  margin-bottom: 24px;
}

.steps-timeline {
  position: relative;
  padding-left: 24px;
}

.steps-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-marker {
  position: absolute;
  left: -24px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border);
}

.timeline-marker.completed {
  background: var(--success);
  border-color: var(--success);
}

.timeline-marker.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.2);
}

.timeline-content h4 {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.timeline-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

.support-section {
  text-align: center;
  padding: 16px;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.support-section a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Responsive */
@media (max-width: 640px) {
  .progress-step .step-label {
    display: none;
  }
  
  .progress-steps {
    padding: 0 20px;
  }
  
  .info-panel {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .review-grid,
  .summary-grid,
  .scores-summary {
    grid-template-columns: 1fr;
  }
  
  .trust-indicators {
    grid-template-columns: 1fr;
  }
  
  .status-indicators {
    grid-template-columns: 1fr;
  }
  
  .image-previews {
    grid-template-columns: 1fr;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .card-body {
    padding: 20px;
  }
  
  .camera-frame {
    max-width: 100%;
  }
  
  .fiu-confirmation,
  .access-grant {
    flex-direction: column;
    text-align: center;
  }
  
  .fiu-detail {
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
}

@media (max-width: 480px) {
  .card-title {
    font-size: 20px;
  }
  
  .logo-text {
    font-size: 16px;
  }
  
  .btn-lg {
    padding: 14px 20px;
    font-size: 14px;
    width: 100%;
  }
}

/* Enhanced responsive design for all devices */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
  .main-content {
    max-width: 100%;
    padding: 0 16px;
  }
  
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .trust-indicators {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets */
@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
  }
  
  .main-content {
    padding: 16px 12px;
  }
  
  .card {
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(15, 40, 64, 0.08);
  }
  
  .card-header {
    padding: 24px 20px;
  }
  
  .card-body {
    padding: 20px;
  }
  
  .card-title {
    font-size: 22px;
  }
  
  .hero-title {
    font-size: 26px;
  }
  
  .hero-subtitle {
    font-size: 14px;
  }
  
  .steps-grid {
    grid-template-columns: 1fr;
  }
  
  .step-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 16px;
  }
  
  .step-card-icon {
    margin: 0 16px 0 0;
  }
  
  .step-card-content {
    flex: 1;
  }
  
  .step-card-number {
    display: none;
  }
  
  .trust-indicators,
  .status-indicators {
    grid-template-columns: 1fr;
  }
  
  .upload-grid {
    grid-template-columns: 1fr;
  }
  
  .document-types {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .camera-frame {
    max-width: 100%;
    border-radius: var(--radius);
  }
  
  .camera-frame::before {
    width: 70%;
    padding-bottom: 70%;
  }
  
  .challenge-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .liveness-status {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .review-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .fiu-confirmation,
  .access-grant {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  
  .fiu-icon,
  .access-icon {
    margin: 0 auto;
  }
  
  .fiu-detail {
    flex-direction: column;
    gap: 4px;
    align-items: center;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Small phones */
@media (max-width: 480px) {
  :root {
    --radius: 10px;
    --radius-lg: 14px;
  }
  
  .header {
    padding: 10px 14px;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  
  .logo-text {
    font-size: 15px;
  }
  
  .main-content {
    padding: 12px 10px;
  }
  
  .card {
    border-radius: var(--radius);
  }
  
  .card-header {
    padding: 20px 16px;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .card-title {
    font-size: 20px;
  }
  
  .card-subtitle {
    font-size: 13px;
  }
  
  .hero-title {
    font-size: 22px;
  }
  
  .hero-subtitle {
    font-size: 13px;
  }
  
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-label {
    font-size: 12px;
  }
  
  .form-control {
    padding: 13px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 48px;
  }
  
  select.form-control {
    height: 48px;
  }
  
  .btn {
    padding: 14px 20px;
    font-size: 14px;
    min-height: 48px;
    width: 100%;
    justify-content: center;
  }
  
  .btn-lg {
    padding: 16px 24px;
    font-size: 15px;
  }
  
  .document-types {
    grid-template-columns: 1fr;
  }
  
  .document-type-card {
    padding: 14px;
    flex-direction: row;
    text-align: left;
  }
  
  .document-type-card .document-type-icon {
    margin: 0 12px 0 0;
  }
  
  .document-type-card .document-type-name {
    flex: 1;
  }
  
  .upload-zone {
    padding: 24px 16px;
  }
  
  .upload-zone-icon {
    width: 44px;
    height: 44px;
  }
  
  .challenge-buttons {
    grid-template-columns: 1fr;
  }
  
  .challenge-btn {
    padding: 14px;
  }
  
  .camera-frame {
    border-radius: 50%;
    max-width: 260px;
    margin: 0 auto;
  }
  
  .camera-frame::before {
    width: 80%;
    padding-bottom: 80%;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .action-buttons .btn {
    width: 100%;
  }
  
  .progress-bar {
    padding: 8px 0;
  }
  
  .progress-step .step-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .progress-step::after {
    top: 14px;
  }
  
  .fiu-confirmation,
  .access-grant {
    padding: 16px;
  }
  
  .fiu-icon,
  .access-icon,
  .success-circle,
  .checkmark-svg {
    width: 48px;
    height: 48px;
  }
  
  .fiu-title,
  .access-title {
    font-size: 16px;
  }
  
  .fiu-subtitle,
  .access-subtitle {
    font-size: 12px;
  }
  
  .timeline-content h4 {
    font-size: 13px;
  }
  
  .timeline-content p {
    font-size: 11px;
  }
  
  .verification-info {
    padding: 16px;
  }
  
  .info-item {
    align-items: flex-start;
    gap: 12px;
  }
  
  .info-icon {
    width: 36px;
    height: 36px;
  }
  
  .support-section {
    font-size: 11px;
    padding: 12px;
  }
}

/* Extra small phones */
@media (max-width: 360px) {
  .hero-title {
    font-size: 20px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .form-control {
    padding: 12px 12px;
    font-size: 15px;
  }
  
  .btn {
    padding: 13px 16px;
    font-size: 13px;
  }
  
  .step-card-icon {
    width: 40px;
    height: 40px;
  }
  
  .step-card-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* Landscape mode on phones */
@media (max-height: 500px) and (orientation: landscape) {
  .header {
    padding: 8px 14px;
  }
  
  .main-content {
    padding-top: 8px;
  }
  
  .card-header {
    padding: 16px;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .hero-title {
    font-size: 22px;
  }
  
  .camera-frame {
    max-width: 220px;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .camera-frame,
  .upload-zone,
  .document-type-card {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Safe area support for notched phones */
@supports (padding: max(0px)) {
  .header {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  
  .main-content {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  
  .footer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* Prevent horizontal overflow on all devices */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Improve touch targets */
button, a, input, select, textarea, .document-type-card, .upload-zone, .challenge-btn {
  touch-action: manipulation;
}

/* Disable text selection on UI elements for better mobile experience */
.header, .progress-bar, .footer, .step-card, .document-type-card, .challenge-btn {
  -webkit-user-select: none;
  user-select: none;
}

/* Ensure forms are scrollable on small screens */
.form-control, textarea.form-control {
  -webkit-appearance: none;
  appearance: none;
}
