/* Profile & KYC settings — mockup gemini-code-1787018961522 (wired to live data) */
body.app-body { background: #fafafb !important; color: #0f172a !important; }
#app-content { background: #fafafb !important; }
body.app-body .card,
body.app-body .form-group input,
body.app-body .form-group select,
body.app-body .form-group textarea { background: #ffffff !important; color: #0f172a !important; border-color: #e2e8f0 !important; }
body.app-body .card-title { color: #0f172a !important; }
body.app-body th { background: #fff1f2 !important; color: #e1147a !important; }
body.app-body td { color: #0f172a !important; border-color: #e2e8f0 !important; }
body.app-body tr:hover { background: rgba(225, 20, 122, 0.04) !important; }
body.app-body .page-title { color: #0f172a !important; }
body.app-body .form-group label { color: #64748b !important; }
body.app-body .btn { box-shadow: 0 2px 10px rgba(225, 20, 122, 0.2) !important; }
body.app-body .btn-outline { background: #fff1f2 !important; color: #e1147a !important; border-color: #fecdd3 !important; }
body.app-body .tag { background: #fff1f2 !important; color: #e1147a !important; border-color: #fecdd3 !important; }

.profile-view {
  --prof-magenta: #e1147a;
  --prof-magenta-hover: #c20e66;
  --prof-blush: #fff1f2;
  --prof-blush-border: #fecdd3;
  --prof-green: #10b981;
  --prof-green-bg: #ecfdf5;
  --prof-green-border: #a7f3d0;
  --prof-amber: #d97706;
  --prof-amber-bg: #fffbeb;
  --prof-amber-border: #fde68a;
  --prof-blue: #0284c7;
  --prof-blue-bg: #f0f9ff;
  --prof-blue-border: #bae6fd;
  --prof-slate-900: #0f172a;
  --prof-slate-700: #334155;
  --prof-slate-600: #475569;
  --prof-slate-500: #64748b;
  --prof-slate-400: #94a3b8;
  --prof-slate-200: #e2e8f0;
  --prof-slate-100: #f1f5f9;
}

.profile-view .prof {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px 24px;
}

/* ─── Hero card ─────────────────────────────────────────────── */
.user-hero-card {
  background: #ffffff;
  border: 1px solid var(--prof-slate-200);
  border-radius: 18px;
  padding: 20px 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.avatar-container { position: relative; margin-bottom: 10px; }

.avatar-main {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #e1147a 0%, #f43f5e 100%);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 8px 20px -4px rgba(225, 20, 122, 0.35);
  border: 3px solid #ffffff;
}

.user-hero-card h2 {
  font-size: 17.5px;
  font-weight: 800;
  color: var(--prof-slate-900);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.user-hero-card p.email {
  font-size: 11.5px;
  color: var(--prof-slate-500);
  font-weight: 500;
  margin-bottom: 10px;
}

.profile-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }

.user-hero-card .profile-inline-edit {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-hero-card .profile-inline-edit.hidden { display: none; }

.user-hero-card .profile-inline-edit input {
  width: 170px;
  background: var(--prof-blue-bg);
  border: 1.5px solid var(--prof-blue-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--prof-slate-900);
  outline: none;
}

.tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 14px;
  transition: all 0.2s ease;
}

.tier-pill.verified {
  background: var(--prof-green-bg);
  color: var(--prof-green);
  border: 1px solid var(--prof-green-border);
}

.tier-pill.unverified {
  background: var(--prof-amber-bg);
  color: var(--prof-amber);
  border: 1px solid var(--prof-amber-border);
}

.user-stats-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--prof-slate-100);
}

.user-stat-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.user-stat-col.stat-sep { border-left: 1px solid var(--prof-slate-100); border-right: 1px solid var(--prof-slate-100); }

.stat-label { font-size: 10.5px; font-weight: 600; color: var(--prof-slate-400); }
.stat-val { font-size: 13.5px; font-weight: 800; color: var(--prof-slate-900); }
.stat-val.accent { color: var(--prof-magenta); }

/* ─── KYC summary card ──────────────────────────────────────── */
.kyc-summary-card {
  background: #ffffff;
  border: 1.5px solid var(--prof-slate-200);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-header-row { display: flex; align-items: center; justify-content: space-between; }

.card-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--prof-slate-900);
}

.card-title-box svg { color: var(--prof-magenta); }

.badge-kyc-status {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-kyc-status.verified {
  background: var(--prof-green-bg);
  color: var(--prof-green);
  border: 1px solid var(--prof-green-border);
}

.badge-kyc-status.unverified {
  background: var(--prof-amber-bg);
  color: var(--prof-amber);
  border: 1px solid var(--prof-amber-border);
}

.kyc-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--prof-slate-100);
  border: 1px solid var(--prof-slate-200);
  border-radius: 12px;
  padding: 10px 12px;
}

.kyc-item { display: flex; flex-direction: column; gap: 2px; }

.kyc-item span.lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--prof-slate-400);
  text-transform: uppercase;
}

.kyc-item span.val {
  font-size: 12px;
  font-weight: 700;
  color: var(--prof-slate-900);
}

.btn-manage-kyc {
  width: 100%;
  background: var(--prof-blush);
  color: var(--prof-magenta);
  border: 1px solid var(--prof-blush-border);
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-manage-kyc:hover {
  background: var(--prof-magenta);
  color: #ffffff;
}

/* ─── General cards ─────────────────────────────────────────── */
.profile-card {
  background: #ffffff;
  border: 1px solid var(--prof-slate-200);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.data-field-list { display: flex; flex-direction: column; gap: 8px; }

.data-field-item {
  background: var(--prof-slate-100);
  border: 1px solid var(--prof-slate-200);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--prof-slate-400);
  display: block;
  margin-bottom: 2px;
}

.field-value {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--prof-slate-900);
}

.field-value.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }

.copy-box {
  background: var(--prof-slate-100);
  border: 1px dashed var(--prof-blush-border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.copy-text-wrap { flex: 1; overflow: hidden; }

.copy-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--prof-slate-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.btn-copy {
  background: var(--prof-blush);
  color: var(--prof-magenta);
  border: 1px solid var(--prof-blush-border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-copy:hover { background: var(--prof-magenta); color: #ffffff; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.toggle-row.tg { border-top: 1px solid var(--prof-slate-100); padding-top: 10px; }

.toggle-info h4 { font-size: 12.5px; font-weight: 700; color: var(--prof-slate-900); margin-bottom: 2px; }
.toggle-info p { font-size: 10.5px; color: var(--prof-slate-500); }

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--prof-slate-200);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.switch input:checked + .slider { background-color: var(--prof-magenta); }
.switch input:checked + .slider:before { transform: translateX(18px); }

.btn-logout {
  width: 100%;
  background: #ffffff;
  color: #ef4444;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  padding: 13px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.btn-logout:hover { background: #fef2f2; }

/* ─── KYC modal ─────────────────────────────────────────────── */
.pf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: pfFadeIn 0.2s ease-in-out;
}

.pf-modal-overlay.open { display: flex; }

.pf-modal-sheet {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  animation: pfSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.pf-modal-header { display: flex; justify-content: space-between; align-items: center; }
.pf-modal-title { font-size: 15px; font-weight: 800; color: var(--prof-slate-900); }

.pf-modal-close {
  background: var(--prof-slate-100);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--prof-slate-600);
  font-weight: 700;
}

.kyc-security-badge {
  background: var(--prof-slate-100);
  border: 1px solid var(--prof-slate-200);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--prof-slate-600);
  font-weight: 600;
}

.kyc-security-badge svg { color: var(--prof-green); flex-shrink: 0; }

.kyc-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kyc-type-btn {
  padding: 10px;
  border-radius: 8px;
  border: 1.5px solid var(--prof-slate-200);
  background: var(--prof-slate-100);
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  color: var(--prof-slate-700);
}

.kyc-type-btn.active {
  border-color: var(--prof-magenta);
  background: var(--prof-blush);
  color: var(--prof-magenta);
  font-weight: 800;
}

.form-input {
  width: 100%;
  background: var(--prof-slate-100);
  border: 1px solid var(--prof-slate-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--prof-slate-900);
  outline: none;
}

.form-input:focus { border-color: var(--prof-magenta); background: #ffffff; }

.btn-verify-submit {
  background: var(--prof-magenta);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(225, 20, 122, 0.28);
}

.btn-verify-submit:disabled { opacity: 0.7; cursor: wait; }

.pf-edit-link {
  font-size: 11.5px;
  font-weight: 700;
  color: #e1147a;
  cursor: pointer;
  text-decoration: none;
}
.pf-edit-link:hover { text-decoration: underline; }

@keyframes pfFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pfSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ─── API key create form ──────────────────────────────────── */
.pf-create-key-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pf-api-desc {
  font-size: 11.5px;
  color: var(--prof-slate-500);
  line-height: 1.5;
  margin: -4px 0 4px;
}

.pf-regen-link {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 700;
  color: var(--prof-magenta);
  cursor: pointer;
  padding: 0;
  text-align: left;
  margin-top: 2px;
}

.pf-regen-link:hover { text-decoration: underline; }

.avatar-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  color: var(--prof-slate-500);
}

.pf-forgot-link {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--prof-slate-400);
  cursor: pointer;
  text-align: center;
  margin-top: -4px;
}

.pf-forgot-link:hover { color: var(--prof-magenta); }