:root {
  --bg: #f2f2f7;
  --card-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --card-radius: 20px;
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --accent: #5e72e4;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; min-height: 100vh; font-family: var(--font); background: var(--bg); -webkit-font-smoothing: antialiased; }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

.page { max-width: 480px; margin: 0 auto; padding: 24px 16px; min-height: 100vh; display: flex; flex-direction: column; gap: 20px; }
.page-header { text-align: center; padding: 12px 0; }
.page-title { font-size: 22px; font-weight: 700; color: #1c1c1e; letter-spacing: -0.02em; }
.page-subtitle { font-size: 14px; color: #8e8e93; margin-top: 4px; }

/* Card - Apple Wallet Style */
.card-wrapper { perspective: 1000px; }
.card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  border-radius: var(--card-radius);
  background: var(--card-bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 8px 20px rgba(0,0,0,0.15);
  overflow: hidden;
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-4px) rotateX(2deg); }
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.card-logo { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.card-badge { font-size: 11px; color: var(--text-secondary); background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 20px; backdrop-filter: blur(8px); }
.card-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.card-name { font-size: 22px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.card-title { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.card-company { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
.card-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; }
.card-contact { display: flex; flex-direction: column; gap: 3px; }
.card-contact-item { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.card-qr { width: 52px; height: 52px; background: #fff; border-radius: 8px; padding: 4px; }
.card-qr canvas { width: 100%; height: 100%; }

/* Actions */
.actions { display: flex; gap: 12px; }
.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.action-btn.primary { background: var(--accent); color: #fff; }
.action-btn.primary:hover { background: #4c63d2; transform: translateY(-1px); }
.action-btn.secondary { background: #fff; color: #1c1c1e; border: 1px solid #e5e5ea; }
.action-btn.secondary:hover { background: #f5f5f7; }

/* Info Sections */
.info-section { background: #fff; border-radius: 16px; padding: 20px; }
.info-title { font-size: 13px; font-weight: 600; color: #8e8e93; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f2f2f7; }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 15px; color: #1c1c1e; }
.info-value { font-size: 15px; color: #8e8e93; text-align: right; max-width: 60%; word-break: break-all; }

/* Create Form */
.form-group { margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: #8e8e93; margin-bottom: 6px; display: block; }
.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e5e5ea;
  font-size: 16px;
  font-family: var(--font);
  background: #fff;
  transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--accent); }

/* Share Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; border-radius: 20px 20px 0 0; padding: 24px; width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto; }
.modal-title { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 20px; }
.share-qr { display: flex; justify-content: center; margin: 20px 0; }
.share-qr canvas { width: 200px; height: 200px; border-radius: 12px; border: 1px solid #e5e5ea; }
.share-link { display: flex; gap: 8px; margin-top: 16px; }
.share-link input { flex: 1; padding: 12px; border-radius: 12px; border: 1px solid #e5e5ea; font-size: 14px; }
.share-link button { padding: 12px 18px; border-radius: 12px; background: var(--accent); color: #fff; border: none; font-weight: 600; cursor: pointer; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-title { font-size: 20px; font-weight: 700; color: #1c1c1e; margin-bottom: 8px; }
.empty-desc { font-size: 15px; color: #8e8e93; margin-bottom: 24px; }

/* Step wizard */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 24px; }
.wizard-step { flex: 1; height: 4px; border-radius: 2px; background: #e5e5ea; }
.wizard-step.active { background: var(--accent); }
.wizard-step.done { background: #34c759; }

@media (max-width: 390px) {
  .card { padding: 20px 18px; }
  .card-name { font-size: 19px; }
  .actions { flex-direction: column; }
}
