/* ===== IDENTITY HUB — Premium User Account UI ===== */

.ih-root {
  position: fixed;
  inset: 0;
  z-index: 9600;
  pointer-events: none;
  visibility: hidden;
}

.ih-root.ih-open {
  pointer-events: auto;
  visibility: visible;
}

.ih-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.ih-root.ih-open .ih-backdrop { opacity: 1; }

.ih-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(920px, 100%);
  height: 100%;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #060b12;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.55);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.ih-root.ih-open .ih-panel { transform: translateX(0); }

/* Sidebar */
.ih-sidebar {
  padding: 28px 22px;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, rgba(6, 11, 18, 0) 55%),
              linear-gradient(160deg, #0a1018, #070c13);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
}

.ih-sidebar::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 70%);
  pointer-events: none;
}

.ih-close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ih-close:hover {
  color: #fff;
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.1);
}

.ih-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
}

.ih-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.ih-avatar-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #38bdf8, #818cf8, #c084fc);
  position: relative;
  transition: box-shadow 0.35s ease;
}

.ih-avatar-ring.ih-has-photo {
  box-shadow: 0 0 32px rgba(129, 140, 248, 0.35);
}

.ih-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0f1724;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ih-avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ih-avatar-initial {
  font-size: 32px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.35);
}

.ih-photo-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #0a1018;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.ih-photo-btn:hover { transform: scale(1.1); }

.ih-meta { text-align: center; }
.ih-email { font-size: 13px; font-weight: 600; color: #e2e8f0; word-break: break-all; }
.ih-member-id { font-size: 11px; color: #64748b; margin-top: 4px; font-family: ui-monospace, monospace; }

.ih-status-chip {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.ih-st-unverified { background: rgba(251, 191, 36, 0.12); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.25); }
.ih-st-pending { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); animation: ihPulse 2.2s ease infinite; }
.ih-st-verified { background: rgba(52, 211, 153, 0.12); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); }
.ih-st-rejected { background: rgba(248, 113, 113, 0.12); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); }

@keyframes ihPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.ih-sidebar-note {
  margin-top: auto;
  font-size: 11px;
  line-height: 1.6;
  color: #475569;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

/* Main */
.ih-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #060b12;
}

.ih-main-head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ih-main-head h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.3px;
}

.ih-main-head p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.ih-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-top: 18px;
  overflow: hidden;
}

.ih-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  border-radius: 2px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ih-steps {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.ih-step-pill {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ih-step-pill.ih-active {
  color: #e2e8f0;
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.ih-step-pill.ih-done {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

.ih-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 100px;
}

.ih-content::-webkit-scrollbar { width: 5px; }
.ih-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Status screens */
.ih-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  animation: ihFadeUp 0.5s ease;
}

.ih-screen.ih-show { display: flex; }

@keyframes ihFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.ih-screen-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 18px;
}

.ih-screen.pending .ih-screen-ring {
  border: 3px solid rgba(56, 189, 248, 0.3);
  animation: ihSpin 2s linear infinite;
}

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

.ih-screen.verified .ih-screen-ring { background: rgba(52, 211, 153, 0.12); color: #34d399; }
.ih-screen.rejected .ih-screen-ring { background: rgba(248, 113, 113, 0.12); color: #f87171; }

.ih-screen h3 { margin: 0 0 8px; font-size: 20px; color: #f1f5f9; }
.ih-screen p { margin: 0; max-width: 380px; font-size: 13px; line-height: 1.7; color: #64748b; }

.ih-resubmit-btn {
  margin-top: 20px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ih-resubmit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
}

/* Wizard panes */
.ih-step-pane {
  display: none;
  animation: ihFadeUp 0.4s ease;
}

.ih-step-pane.ih-visible { display: block; }

.ih-field-grid {
  display: grid;
  gap: 16px;
}

.ih-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 8px;
}

.ih-field input,
.ih-field select,
.ih-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #f1f5f9;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ih-field textarea { min-height: 88px; resize: vertical; }

.ih-field input:focus,
.ih-field select:focus,
.ih-field textarea:focus {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ih-field input:disabled,
.ih-field select:disabled,
.ih-field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ih-doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.ih-upload-zone {
  position: relative;
  display: block;
  min-height: 150px;
  border-radius: 14px;
  border: 1.5px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.ih-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 4;
  font-size: 0;
}

.ih-photo-file {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.ih-upload-zone.ih-uploading {
  pointer-events: none;
  opacity: 0.65;
}

.ih-upload-zone.ih-uploading::after {
  content: 'Uploading…';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 11, 18, 0.72);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  z-index: 5;
}

.ih-upload-overlay {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}

.ih-upload-zone.ih-filled .ih-upload-overlay {
  display: block;
}

.ih-upload-zone.ih-filled .ih-upload-ph {
  pointer-events: none;
}

.ih-upload-zone:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.04);
}

.ih-upload-zone.ih-filled {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.45);
}

.ih-upload-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 16px;
  text-align: center;
  gap: 8px;
}

.ih-upload-ph svg { opacity: 0.5; color: #94a3b8; }
.ih-upload-ph span { font-size: 12px; font-weight: 600; color: #94a3b8; }
.ih-upload-ph small { font-size: 10px; color: #475569; }

.ih-upload-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  pointer-events: none;
  z-index: 1;
}

/* Footer */
.ih-footer {
  position: absolute;
  bottom: 0;
  left: 280px;
  right: 0;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, transparent, rgba(6, 11, 18, 0.95) 30%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ih-btn-ghost {
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #94a3b8;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ih-btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.2); }

.ih-btn-primary {
  padding: 11px 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  opacity: 0.45;
}

.ih-btn-primary.ih-ready {
  opacity: 1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.ih-btn-primary.ih-ready:hover { transform: translateY(-1px); }

.ih-btn-primary:disabled { cursor: not-allowed; }

/* Responsive */
@media (max-width: 768px) {
  .ih-panel {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .ih-sidebar {
    padding: 18px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  .ih-brand { width: 100%; }
  .ih-avatar-wrap { flex-direction: row; width: 100%; }
  .ih-meta { text-align: left; flex: 1; }
  .ih-sidebar-note { display: none; }
  .ih-footer { left: 0; }
  .ih-doc-grid { grid-template-columns: 1fr; }
  .ih-upload-zone { min-height: 168px; }
  .ih-file-input { min-height: 168px; }
  .ih-main-head { padding: 18px 16px 12px; }
  .ih-content { padding: 16px 16px 100px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .ih-panel { width: min(720px, 100%); grid-template-columns: 240px 1fr; }
  .ih-footer { left: 240px; }
}
