@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #5c52d4;
  --primary-hover: #4d43c2;
  --primary-light: #ecebfa;
  --primary-gradient: linear-gradient(135deg, #5b4cdb 0%, #7952e6 50%, #646cff 100%);
  --secondary: #10b981;
  --accent-yellow: #f59e0b;
  --bg-gradient: linear-gradient(180deg, #4f46c7 0%, #3e38a3 40%, #2f2a80 100%);
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 25px 50px -12px rgba(26, 16, 83, 0.25);
}

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

body {
  font-family: 'Hind Siliguri', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 60px;
}

/* Header & Titles */
.main-header {
  text-align: center;
  color: #ffffff;
  margin-bottom: 20px;
  max-width: 480px;
  width: 100%;
}

.main-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.main-header p {
  font-size: 0.95rem;
  opacity: 0.9;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Progress Stepper */
.stepper-container {
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 0 10px;
}

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

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 1;
}

.step-item.completed:not(:last-child)::after {
  background: #34d399;
}

.step-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.step-item.active .step-bubble {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.step-item.completed .step-bubble {
  background: #10b981;
  color: #ffffff;
}

.step-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
  font-weight: 600;
  text-align: center;
}

.step-item.active .step-label {
  color: #ffffff;
  font-weight: 700;
}

/* Card Container (Faithful to Reference Image) */
.card-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  padding: 24px 20px 28px;
  position: relative;
  overflow: hidden;
}

/* Yellow Notice Box */
.notice-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: #92400e;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Payment Amount Box */
.amount-card {
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  color: #ffffff;
  margin-bottom: 18px;
  box-shadow: 0 10px 20px -5px rgba(92, 82, 212, 0.4);
}

.amount-card .amount-title {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.92;
  margin-bottom: 4px;
}

.amount-card .amount-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
}

.amount-card .amount-unit {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.95;
  margin-top: 4px;
}

/* Instruction Rules Box */
.rules-box {
  background: #f0f7ff;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.rules-box .rules-title {
  color: #1e40af;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rules-box ol {
  padding-left: 20px;
  color: #1e3a8a;
  font-size: 0.85rem;
  line-height: 1.6;
  font-weight: 500;
}

.rules-box ol li {
  margin-bottom: 2px;
}

/* Payment Method Selection */
.methods-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.method-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.method-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.method-card.selected {
  border-color: var(--primary);
  background: #faf5ff;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.method-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.method-radio {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.method-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.method-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}

.method-details .number {
  font-size: 0.85rem;
  color: #475569;
  font-family: monospace;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.copy-btn {
  background: #eef2ff;
  color: #4f46e5;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover {
  background: #e0e7ff;
}

.copy-btn:active {
  transform: scale(0.95);
}

/* Input Fields & Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-label .optional-badge {
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(92, 82, 212, 0.15);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* File Upload Custom Box */
.file-upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s;
  position: relative;
}

.file-upload-box:hover, .file-upload-box.dragover {
  border-color: var(--primary);
  background: #f5f3ff;
}

.file-upload-box input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-upload-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.file-upload-text {
  font-size: 0.88rem;
  color: #334155;
  font-weight: 600;
}

.file-upload-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
}

.preview-thumb {
  max-height: 150px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
}

/* Primary Action Button */
.btn-submit {
  width: 100%;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px -4px rgba(92, 82, 212, 0.5);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -4px rgba(92, 82, 212, 0.6);
  opacity: 0.95;
}

.btn-submit:active {
  transform: translateY(1px);
}

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

/* 3D Face Verification Styles */
.face-scanner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.face-oval-container {
  width: 280px;
  height: 350px;
  border-radius: 50% / 55%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 6px rgba(92, 82, 212, 0.3), 0 20px 30px rgba(0,0,0,0.25);
  background: #0f172a;
  margin: 10px auto 16px;
}

.face-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror view */
}

.face-overlay-guide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50% / 55%;
  border: 4px solid #6366f1;
  pointer-events: none;
  box-sizing: border-box;
  animation: pulseGlow 2.5s infinite;
  transition: border-color 0.3s;
}

.face-overlay-guide.success {
  border-color: #10b981;
  box-shadow: inset 0 0 30px rgba(16, 185, 129, 0.35);
}

.face-overlay-guide.warning {
  border-color: #f59e0b;
}

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8, #818cf8, transparent);
  box-shadow: 0 0 15px #38bdf8;
  animation: scanMovement 2s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes scanMovement {
  0% { top: 5%; }
  100% { top: 90%; }
}

@keyframes pulseGlow {
  0% { box-shadow: inset 0 0 15px rgba(99, 102, 241, 0.3); }
  50% { box-shadow: inset 0 0 30px rgba(99, 102, 241, 0.65); }
  100% { box-shadow: inset 0 0 15px rgba(99, 102, 241, 0.3); }
}

.pose-instruction-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

.pose-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pose-desc {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  margin-top: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  width: 0%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Warning badges for glasses/covering */
.verification-alert {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

/* Success Card */
.success-card {
  text-align: center;
}

.success-icon-wrap {
  width: 72px;
  height: 72px;
  background: #ecfdf5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #10b981;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 8px #d1fae5;
  animation: scaleBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleBounce {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-order-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 18px 0;
  text-align: left;
}

.success-order-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
}

.success-order-item:last-child {
  border-bottom: none;
}

.success-order-label {
  color: #64748b;
  font-weight: 500;
}

.success-order-val {
  color: #0f172a;
  font-weight: 700;
}

/* Admin Styles */
.admin-body {
  background: #f1f5f9;
  color: #1e293b;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 250px;
  background: #0f172a;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
}

.admin-brand {
  padding: 24px 20px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.admin-nav a:hover, .admin-nav a.active {
  background: #1e293b;
  color: #ffffff;
}

.admin-nav a.active {
  background: var(--primary);
  color: #ffffff;
}

.admin-main {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-box {
  background: #ffffff;
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--primary);
}

.stat-box.pending { border-left-color: #f59e0b; }
.stat-box.processing { border-left-color: #3b82f6; }
.stat-box.completed { border-left-color: #10b981; }

.stat-info h3 {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}

.stat-info .stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.stat-icon {
  font-size: 2rem;
  opacity: 0.8;
}

.table-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  padding: 12px 14px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
}

.custom-table td {
  padding: 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
  vertical-align: middle;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.pending { background: #fef3c7; color: #b45309; }
.status-badge.verified { background: #e0e7ff; color: #4338ca; }
.status-badge.processing { background: #dbeafe; color: #1e40af; }
.status-badge.completed { background: #d1fae5; color: #065f46; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }

.btn-action {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.btn-action.view { background: #eef2ff; color: #4f46e5; }
.btn-action.view:hover { background: #e0e7ff; }

.btn-action.whatsapp { background: #25d366; color: #ffffff; }
.btn-action.whatsapp:hover { background: #20ba59; }

/* Admin Grid Layouts */
.order-view-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Mobile Bar for Admin */
.admin-mobile-bar {
  display: none;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.admin-menu-toggle {
  background: #1e293b;
  border: 1px solid #334155;
  color: #ffffff;
  font-size: 1.25rem;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive adjustments (Tablet & Mobile) */
@media (max-width: 860px) {
  .admin-mobile-bar {
    display: flex;
  }

  .desktop-only {
    display: none !important;
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 999;
    transform: translateY(-120%);
    transition: transform 0.25s ease-in-out;
    border-top: 1px solid #1e293b;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  }

  .admin-sidebar.open {
    transform: translateY(0);
  }

  .admin-main {
    padding: 16px 12px;
  }

  .order-view-grid, .settings-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
}

/* Mobile Screens */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 14px 10px 40px;
  }
  
  .card-container {
    padding: 18px 14px 22px;
    border-radius: var(--radius-lg);
  }

  .main-header h1 {
    font-size: 1.4rem;
  }

  .main-header p {
    font-size: 0.85rem;
  }
  
  .amount-card {
    padding: 16px 12px;
  }

  .amount-card .amount-value {
    font-size: 2.1rem;
  }

  .face-oval-container {
    width: 230px;
    height: 290px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }

  .stat-box {
    padding: 12px 14px;
  }

  .stat-info h3 {
    font-size: 0.75rem;
  }

  .stat-info .stat-number {
    font-size: 1.35rem;
  }

  .stat-icon {
    font-size: 1.4rem;
  }

  .table-card {
    padding: 14px 10px;
  }

  .form-input, .form-textarea {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
  }

  .method-card {
    padding: 10px 12px;
  }

  .method-details h4 {
    font-size: 0.88rem;
  }

  .method-details .number {
    font-size: 0.78rem;
  }

  .copy-btn {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
}

@media (max-width: 400px) {
  .stepper-container {
    padding: 0;
  }

  .step-label {
    font-size: 0.65rem;
  }

  .step-bubble {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
