/* ==========================================================================
   Clever Clouds Enterprise Client Identity Verification Portal
   Theme: peopleHum Enterprise Architecture • Dark Mode Edition
   Brand: Clever Clouds (https://www.cleverclouds.in)
   Copyright: © 2024 Clever Clouds
   ========================================================================== */

:root {
  /* Corporate Dark Mode Palette */
  --ph-bg-space: #07090e;         /* Deep Obsidian */
  --ph-bg-surface: #0c101b;       /* Surface Slate */
  --ph-card: #111726;             /* Card Dark Surface */
  --ph-card-subtle: #172033;      /* Subtle Elevate */
  --ph-input-bg: #090d16;         /* Input Well */
  --ph-topbar-bg: #090d17;

  --ph-primary: #3b82f6;          /* Bright Royal Blue */
  --ph-primary-hover: #2563eb;
  --ph-accent: #60a5fa;           /* Sky Indigo */
  --ph-accent-glow: rgba(59, 130, 246, 0.25);
  
  --ph-success: #10b981;          /* Emerald Green */
  --ph-success-glow: rgba(16, 185, 129, 0.2);
  --ph-warning: #f59e0b;          /* Amber */
  --ph-error: #ef4444;            /* Crimson Red */

  --ph-text-main: #f8fafc;        /* Slate 50 */
  --ph-text-body: #cbd5e1;        /* Slate 300 */
  --ph-text-muted: #94a3b8;       /* Slate 400 */
  --ph-text-subtle: #64748b;      /* Slate 500 */

  --ph-border: rgba(255, 255, 255, 0.08);
  --ph-border-focus: #3b82f6;
  --ph-border-glow: rgba(59, 130, 246, 0.4);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  /* Elevation */
  --shadow-card: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 40px -10px rgba(59, 130, 246, 0.15);
  --shadow-window: 0 20px 50px -10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(59, 130, 246, 0.12);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--ph-bg-space);
  color: var(--ph-text-body);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Ambient Glow */
.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.16;
}

.orb-primary {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #2563eb 0%, transparent 70%);
  top: -200px;
  left: 20%;
}

.orb-cyan {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  bottom: -150px;
  right: 15%;
}

.subtle-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 80%);
}

/* Header */
.ph-header {
  background: rgba(11, 16, 27, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ph-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(37, 99, 235, 0.35));
}

.brand-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
}

.header-portal-title {
  display: flex;
  flex-direction: column;
}

.portal-title-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ph-text-main);
  letter-spacing: -0.01em;
}

.portal-subtitle-text {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--ph-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.header-security-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--ph-success);
  box-shadow: 0 0 8px var(--ph-success);
}

/* Page Layout */
.page-canvas {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 28px 48px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 36px;
  align-items: start;
}

/* Left Side: peopleHum Context & Checkpoints Panel */
.context-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.context-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 9999px;
  width: fit-content;
}

.context-heading {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--ph-text-main);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.context-heading span {
  color: var(--ph-accent);
}

.context-description {
  font-size: 1rem;
  color: var(--ph-text-muted);
  line-height: 1.65;
}

/* Checkpoints Card */
.screening-steps-card {
  background: var(--ph-card);
  border: 1px solid var(--ph-border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.steps-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ph-text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.steps-card-title svg {
  color: var(--ph-accent);
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-icon-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content-col {
  display: flex;
  flex-direction: column;
}

.step-title-bold {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ph-text-main);
}

.step-sub-text {
  font-size: 0.8rem;
  color: var(--ph-text-muted);
}

/* Privacy Assurance */
.security-callout {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ph-border);
  border-left: 4px solid var(--ph-primary);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.callout-icon {
  color: var(--ph-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-text {
  font-size: 0.825rem;
  color: var(--ph-text-body);
  line-height: 1.5;
}

.callout-text strong {
  color: #ffffff;
}

/* Support Box */
.support-contact-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.825rem;
  color: var(--ph-text-muted);
}

.support-contact-box a {
  color: var(--ph-accent);
  font-weight: 600;
  text-decoration: none;
}

.support-contact-box a:hover {
  text-decoration: underline;
}

/* Right Side: Primary Verification Card */
.verification-canvas-card {
  background: var(--ph-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--ph-border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}

.verification-canvas-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #06b6d4);
}

/* Progress Stepper */
.ph-stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--ph-border);
  background: rgba(11, 16, 27, 0.6);
}

.ph-step {
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 1px solid var(--ph-border);
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.2s ease;
}

.ph-step:last-child {
  border-right: none;
}

.ph-step.active {
  background: rgba(59, 130, 246, 0.08);
  border-bottom: 2px solid var(--ph-primary);
}

.ph-step.completed {
  background: rgba(16, 185, 129, 0.05);
}

.step-idx {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ph-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-step.active .step-idx {
  background: var(--ph-primary);
  color: #ffffff;
  box-shadow: 0 0 12px var(--ph-accent-glow);
}

.ph-step.completed .step-idx {
  background: var(--ph-success);
  color: #ffffff;
}

.step-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--ph-text-muted);
}

.ph-step.active .step-name {
  color: #ffffff;
  font-weight: 700;
}

.ph-step.completed .step-name {
  color: var(--ph-success);
}

/* View 1: Client Intake Form */
.form-view-body {
  padding: 34px 38px;
}

.form-intro-header {
  margin-bottom: 24px;
}

.form-main-heading {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.form-sub-heading {
  font-size: 0.925rem;
  color: var(--ph-text-muted);
}

/* Alert */
.ph-alert-box {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* Form Inputs */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.ph-input-label {
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--ph-text-body);
}

.req-asterisk {
  color: var(--ph-error);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-svg {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--ph-text-subtle);
  pointer-events: none;
}

.ph-text-input {
  width: 100%;
  background: var(--ph-input-bg);
  border: 1px solid var(--ph-border);
  border-radius: 10px;
  padding: 12px 14px 12px 42px;
  font-size: 0.925rem;
  color: #ffffff;
  font-family: inherit;
  transition: all 0.2s ease;
}

.ph-text-input:focus {
  outline: none;
  border-color: var(--ph-border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Prerequisites box */
.ph-prereq-banner {
  background: rgba(59, 130, 246, 0.05);
  border: 1px dashed rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-icon {
  color: var(--ph-accent);
  flex-shrink: 0;
}

.banner-content {
  font-size: 0.825rem;
  color: var(--ph-text-muted);
}

.banner-content strong {
  color: #ffffff;
}

/* Consent check */
.ph-consent-wrapper {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ph-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 26px;
}

.consent-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.consent-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ph-primary);
  margin-top: 2px;
  cursor: pointer;
}

.consent-label-text {
  font-size: 0.8rem;
  color: var(--ph-text-muted);
  line-height: 1.5;
}

.consent-label-text strong {
  color: #ffffff;
}

/* Primary Button */
.ph-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  padding: 15px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}

.ph-btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

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

/* View 2: Professional Didit Verification Window */
.ph-window-frame {
  background: #000000;
  display: flex;
  flex-direction: column;
}

.ph-window-topbar {
  background: #0b0f19;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ph-border);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-indicator-dots {
  display: flex;
  gap: 6px;
}

.win-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.win-dot-red { background: #ef4444; }
.win-dot-yellow { background: #f59e0b; }
.win-dot-green { background: #10b981; }

.window-title {
  font-size: 0.775rem;
  font-weight: 600;
  color: #94a3b8;
  margin-left: 6px;
}

.topbar-center {
  display: flex;
  align-items: center;
}

.session-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
}

.live-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: beaconPulse 2s infinite;
}

@keyframes beaconPulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.topbar-right a {
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.topbar-right a:hover {
  text-decoration: underline;
}

.ph-window-viewport {
  position: relative;
  width: 100%;
  height: 650px;
  background: #000000;
}

.viewport-loader {
  position: absolute;
  inset: 0;
  background: #07090e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #94a3b8;
  z-index: 2;
}

.ph-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--ph-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.viewport-loader h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.ph-window-viewport iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.ph-window-bottombar {
  background: #0b0f19;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ph-border);
  color: #94a3b8;
  font-size: 0.8rem;
}

.ph-btn-subtle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--ph-border);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ph-btn-subtle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* View 3: Completion View */
.completion-view-body {
  padding: 44px 36px;
  text-align: center;
}

.completion-emblem-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid var(--ph-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.25);
}

.completion-emblem-wrap svg {
  color: var(--ph-success);
}

.completion-heading {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.completion-desc {
  font-size: 0.95rem;
  color: var(--ph-text-muted);
  max-width: 460px;
  margin: 0 auto 28px;
}

.receipt-summary-table {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ph-border);
  border-radius: 12px;
  max-width: 440px;
  margin: 0 auto 30px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.receipt-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.receipt-item-label {
  color: var(--ph-text-muted);
  font-weight: 500;
}

.receipt-item-val {
  font-weight: 700;
  color: #ffffff;
}

.receipt-item-val.font-mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #93c5fd;
}

.ph-status-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Footer */
.ph-footer {
  background: rgba(11, 16, 27, 0.7);
  border-top: 1px solid var(--ph-border);
  margin-top: auto;
  padding: 24px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--ph-text-muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-nav a {
  color: var(--ph-text-body);
  text-decoration: none;
}

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

/* Toast */
.ph-toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ph-toast {
  background: #111726;
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  animation: slideToast 0.25s ease;
}

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

/* Responsive */
@media (max-width: 960px) {
  .split-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .context-heading {
    font-size: 1.75rem;
  }
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .form-view-body {
    padding: 24px 20px;
  }
  .ph-window-viewport {
    height: 520px;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
