@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
  --palm-teal: #3d8ba0;
  --palm-blue: #2e6ba5;
  --palm-deep: #163aa5;
  --palm-navy: #00246a;
  --palm-white: #ffffff;
  --palm-light: #f4f7fa;
  --palm-gray: #e8edf2;
  --palm-border: #d0d9e4;
  --palm-text: #1a1f36;
  --palm-text-light: #5e6c84;
  --palm-success: #0d9f6e;
  --palm-warning: #d97706;
  --palm-error: #dc2626;
  --gradient-primary: linear-gradient(135deg, #163aa5 0%, #00246a 100%);
  --gradient-brand: linear-gradient(135deg, #3d8ba0 0%, #2e6ba5 40%, #163aa5 70%, #00246a 100%);
  --shadow-xs: 0 1px 2px rgba(0, 36, 106, 0.04);
  --shadow-sm: 0 1px 4px rgba(0, 36, 106, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 36, 106, 0.08);
  --shadow-lg: 0 8px 28px rgba(0, 36, 106, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  font-family: 'Montserrat', sans-serif;
  color: var(--palm-text);
  background: var(--palm-light);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== AUTH ===== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
}

.auth-brand {
  width: 42%;
  background: var(--palm-navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(61, 139, 160, 0.08);
}

.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(22, 58, 165, 0.1);
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
  max-width: 380px;
}

.auth-logo-img {
  width: 240px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  margin-bottom: 24px;
}

.auth-brand-divider {
  width: 48px;
  height: 2px;
  background: rgba(255,255,255,0.25);
  margin: 0 auto 20px;
}

.auth-brand .slogan {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.75;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

.auth-features {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
}

.auth-feature svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}

.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--palm-white);
}

.auth-form-container {
  width: 100%;
  max-width: 400px;
}

.auth-form-logo {
  margin-bottom: 32px;
}

.auth-form-logo img {
  display: block;
}

.auth-form-container h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--palm-navy);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.auth-form-container .auth-subtitle {
  font-size: 0.9rem;
  color: var(--palm-text-light);
  margin-bottom: 28px;
  font-weight: 500;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--palm-text);
  margin-bottom: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--palm-border);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--palm-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--palm-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--palm-blue);
  box-shadow: 0 0 0 3px rgba(46, 107, 165, 0.1);
}

.form-control::placeholder { color: #b4bcc8; }

.form-control.has-icon {
  padding-left: 42px;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--palm-text-light);
  opacity: 0.5;
  display: flex;
  pointer-events: none;
}

.input-icon svg {
  width: 18px;
  height: 18px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%235e6c84' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--palm-navy);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #001d55;
  box-shadow: var(--shadow-md);
}

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

.btn-secondary {
  background: var(--palm-white);
  color: var(--palm-text);
  border: 1.5px solid var(--palm-border);
}

.btn-secondary:hover {
  border-color: var(--palm-blue);
  color: var(--palm-blue);
}

.btn-outline {
  background: transparent;
  color: var(--palm-blue);
  border: 1.5px solid var(--palm-blue);
}

.btn-outline:hover {
  background: var(--palm-blue);
  color: white;
}

.btn-success {
  background: var(--palm-success);
  color: white;
}

.btn-success:hover { background: #0b8a5e; }

.btn-danger {
  background: var(--palm-error);
  color: white;
}

.btn-danger:hover { background: #b91c1c; }

.btn-sm {
  padding: 6px 14px;
  font-size: 0.75rem;
}

.action-btns {
  display: flex;
  gap: 6px;
}

.auth-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--palm-text-light);
}

.auth-link a {
  color: var(--palm-blue);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.auth-link a:hover { text-decoration: underline; }

/* ===== ALERTS ===== */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
  line-height: 1.4;
}

.alert-error {
  background: #fef2f2;
  color: var(--palm-error);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: var(--palm-success);
  border: 1px solid #a7f3d0;
}

.alert.show { display: block; }

/* ===== APP LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: var(--palm-navy);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand img {
  height: auto;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0 16px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 16px 14px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.85);
}

.nav-item.active {
  background: rgba(61, 139, 160, 0.25);
  color: white;
}

.nav-item .nav-icon {
  display: flex;
  align-items: center;
  width: 20px;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon svg { width: 18px; height: 18px; }

.sidebar-footer {
  padding: 8px 10px 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 4px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(61, 139, 160, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.user-email {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
}

.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 28px 32px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--palm-navy);
  letter-spacing: -0.3px;
}

.page-header p {
  font-size: 0.88rem;
  color: var(--palm-text-light);
  font-weight: 500;
  margin-top: 4px;
}

/* ===== KYC STEPPER ===== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

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

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  border: 2px solid var(--palm-border);
  color: var(--palm-text-light);
  background: var(--palm-white);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.step-circle svg { width: 16px; height: 16px; }

.step.active .step-circle {
  border-color: var(--palm-navy);
  background: var(--palm-navy);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 36, 106, 0.25);
}

.step.completed .step-circle {
  border-color: var(--palm-success);
  background: var(--palm-success);
  color: white;
}

.step-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--palm-text-light);
  white-space: nowrap;
}

.step.active .step-label { color: var(--palm-navy); }
.step.completed .step-label { color: var(--palm-success); }

.step-connector {
  width: 48px;
  height: 2px;
  background: var(--palm-border);
  margin: 0 6px;
  border-radius: 1px;
  flex-shrink: 0;
}

.step-connector.completed { background: var(--palm-success); }

/* ===== CARDS ===== */
.card {
  background: var(--palm-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 36, 106, 0.05);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--palm-gray);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--palm-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 svg { width: 18px; height: 18px; color: var(--palm-blue); }

.card-body { padding: 24px; }

.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--palm-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ===== STATS ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--palm-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(0, 36, 106, 0.05);
}

.stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-icon-wrap svg { width: 20px; height: 20px; }

.stat-icon-wrap.teal { background: rgba(61, 139, 160, 0.1); color: var(--palm-teal); }
.stat-icon-wrap.blue { background: rgba(46, 107, 165, 0.1); color: var(--palm-blue); }
.stat-icon-wrap.deep { background: rgba(22, 58, 165, 0.1); color: var(--palm-deep); }
.stat-icon-wrap.navy { background: rgba(0, 36, 106, 0.1); color: var(--palm-navy); }

.stat-card .stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--palm-navy);
  letter-spacing: -0.3px;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--palm-text-light);
  font-weight: 600;
  margin-top: 2px;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge svg { width: 12px; height: 12px; }

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-submitted { background: #dbeafe; color: #1e40af; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-active { background: #d1fae5; color: #065f46; }

/* ===== TABLE ===== */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }

table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--palm-text-light);
  border-bottom: 1.5px solid var(--palm-gray);
  background: var(--palm-light);
}

table td {
  padding: 12px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 1px solid var(--palm-gray);
  color: var(--palm-text);
}

table tr:last-child td { border-bottom: none; }
table tr:hover td { background: rgba(0, 36, 106, 0.015); }

.table-icon-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-icon-text svg { width: 18px; height: 18px; color: var(--palm-blue); }

/* ===== PALM SCANNER ===== */
.palm-scanner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.scanner-viewport {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: var(--palm-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 4px rgba(0, 36, 106, 0.08), 0 0 0 12px rgba(0, 36, 106, 0.03);
}

.scanner-inner-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,0.15);
}

.scanner-palm-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: all 0.3s ease;
}

.scanner-palm-icon svg {
  width: 80px;
  height: 80px;
}

.scan-beam {
  position: absolute;
  width: 180px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(61, 139, 160, 0.8), transparent);
  border-radius: 1px;
  animation: scan-move 2.5s ease-in-out infinite;
}

@keyframes scan-move {
  0% { top: 25%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 75%; opacity: 0; }
}

.scanner-viewport.scanning {
  animation: glow-pulse 1.5s ease-in-out infinite;
}

.scanner-viewport.scanning .scanner-palm-icon { color: rgba(255,255,255,0.95); }

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(61, 139, 160, 0.15), 0 0 20px rgba(61, 139, 160, 0.1); }
  50% { box-shadow: 0 0 0 6px rgba(61, 139, 160, 0.3), 0 0 40px rgba(61, 139, 160, 0.2); }
}

.scanner-viewport.success {
  background: var(--palm-success);
  box-shadow: 0 0 0 4px rgba(13, 159, 110, 0.15), 0 0 20px rgba(13, 159, 110, 0.1);
}

.scanner-viewport.error {
  background: var(--palm-error);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.scanner-status { text-align: center; }

.scanner-status h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--palm-navy);
  margin-bottom: 4px;
}

.scanner-status p {
  font-size: 0.85rem;
  color: var(--palm-text-light);
  font-weight: 500;
}

.hand-selector {
  display: flex;
  gap: 10px;
}

.hand-option {
  padding: 10px 20px;
  border: 1.5px solid var(--palm-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--palm-text-light);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--palm-white);
}

.hand-option svg { width: 20px; height: 20px; }

.hand-option:hover {
  border-color: var(--palm-blue);
  color: var(--palm-blue);
}

.hand-option.selected {
  border-color: var(--palm-navy);
  background: rgba(0, 36, 106, 0.04);
  color: var(--palm-navy);
}

/* ===== SENSOR STATUS ===== */
.sensor-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.82rem;
  font-weight: 600;
}

.sensor-status-bar svg { width: 16px; height: 16px; }

.sensor-status-bar.disconnected {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.sensor-status-bar.connected {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.sensor-status-bar.scanning {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.sensor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.disconnected .sensor-dot { background: #f59e0b; }
.connected .sensor-dot { background: var(--palm-success); animation: pulse-dot 2s infinite; }
.scanning .sensor-dot { background: #3b82f6; animation: pulse-dot 1s infinite; }

.sensor-icon { display: flex; align-items: center; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ===== FILE UPLOAD ===== */
.file-upload {
  border: 1.5px dashed var(--palm-border);
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--palm-light);
}

.file-upload:hover {
  border-color: var(--palm-blue);
  background: rgba(46, 107, 165, 0.03);
}

.file-upload.has-file {
  border-color: var(--palm-success);
  border-style: solid;
  background: #ecfdf5;
}

.file-upload .upload-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--palm-text-light);
}

.file-upload.has-file .upload-icon { color: var(--palm-success); }

.file-upload .upload-icon svg { width: 28px; height: 28px; }

.file-upload p {
  font-size: 0.82rem;
  color: var(--palm-text-light);
  font-weight: 600;
}

.file-upload .file-hint {
  display: block;
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
  margin-top: 4px;
}

.file-upload .file-name {
  font-size: 0.78rem;
  color: var(--palm-success);
  font-weight: 700;
  margin-top: 4px;
}

.file-upload input[type="file"] { display: none; }

/* ===== QUALITY METER ===== */
.quality-meter {
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.quality-bar {
  height: 6px;
  background: var(--palm-gray);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.quality-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.quality-fill.low { background: var(--palm-error); }
.quality-fill.medium { background: var(--palm-warning); }
.quality-fill.high { background: var(--palm-success); }

.quality-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
  color: var(--palm-text-light);
}

/* ===== INFO GRID / REVIEW ===== */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.info-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--palm-text-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.info-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--palm-text);
}

.info-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--palm-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--palm-text-light);
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid var(--palm-gray);
}

.info-notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--palm-blue); }

.info-notice.warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.info-notice.warning svg { color: #d97706; }

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

.review-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--palm-text-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.review-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--palm-text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.review-value svg { width: 14px; height: 14px; }

.text-success { color: var(--palm-success) !important; }
.text-error { color: var(--palm-error) !important; }

/* ===== COMPLETION SCREEN ===== */
.completion-screen {
  text-align: center;
  padding: 48px 20px;
}

.completion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 16px;
}

.completion-icon svg { width: 32px; height: 32px; }

.completion-approved {
  background: rgba(16, 185, 129, 0.1);
  color: var(--palm-success);
}

.completion-sent {
  background: rgba(46, 107, 165, 0.1);
  color: var(--palm-blue);
}

.completion-approved {
  background: rgba(13, 159, 110, 0.1);
  color: var(--palm-success);
}

.completion-screen h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--palm-navy);
  margin-bottom: 8px;
}

.completion-screen p {
  font-size: 0.9rem;
  color: var(--palm-text-light);
  font-weight: 500;
  max-width: 420px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* ===== SPINNER ===== */
.spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--palm-gray);
  border-top-color: var(--palm-navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

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

/* ===== MOBILE ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--palm-navy);
  z-index: 101;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}

.mobile-header img { height: 28px; width: auto; }

.mobile-menu-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
}

.mobile-menu-btn svg { width: 22px; height: 22px; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

@media (max-width: 768px) {
  .auth-brand { display: none; }
  .auth-form-side { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .mobile-header { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; padding: 72px 16px 24px; }
  .stepper { flex-wrap: wrap; gap: 4px; }
  .step-connector { width: 24px; }
  .step-label { display: none; }
  .scanner-viewport { width: 220px; height: 220px; }
  .scanner-palm-icon svg { width: 56px; height: 56px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .review-grid, .info-grid { grid-template-columns: 1fr; }
  .hand-selector { flex-direction: column; width: 100%; }
  .hand-option { justify-content: center; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .btn-primary, .btn-secondary { width: 100%; }
}

/* ===== ADMIN BACKOFFICE ===== */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--palm-white);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid rgba(0, 36, 106, 0.05);
  box-shadow: var(--shadow-xs);
}

.admin-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--palm-text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.admin-tab svg { width: 16px; height: 16px; }

.admin-tab:hover { background: var(--palm-light); color: var(--palm-text); }

.admin-tab.active {
  background: var(--palm-navy);
  color: white;
  box-shadow: var(--shadow-sm);
}

.stat-card-clickable { cursor: pointer; transition: transform 0.15s; }
.stat-card-clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.row-pending { background: rgba(59, 130, 246, 0.03); }
.row-pending td:first-child { border-left: 3px solid var(--palm-blue); }

.admin-detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

.admin-detail-main { min-width: 0; }
.admin-detail-sidebar { position: sticky; top: 20px; }

.doc-viewer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.doc-viewer-item { text-align: center; }

.doc-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--palm-text-light);
  margin-bottom: 6px;
}

.doc-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--palm-gray);
  cursor: pointer;
  transition: all 0.2s;
}

.doc-image:hover {
  border-color: var(--palm-blue);
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.doc-placeholder {
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--palm-light);
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--palm-border);
  color: var(--palm-text-light);
}

.doc-placeholder svg { width: 24px; height: 24px; }
.doc-placeholder span { font-size: 0.7rem; font-weight: 600; }

.audit-timeline {
  padding: 12px 16px;
}

.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--palm-gray);
}

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

.audit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--palm-border);
  margin-top: 5px;
  flex-shrink: 0;
}

.dot-review { background: var(--palm-blue); }
.dot-enroll { background: var(--palm-teal); }

.audit-content { flex: 1; min-width: 0; }

.audit-action {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--palm-text);
}

.audit-time {
  font-size: 0.68rem;
  color: var(--palm-text-light);
}

.core-result { margin-top: 4px; }

.core-customer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.core-customer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.core-customer-badge svg { width: 12px; height: 12px; }

.core-active { background: #d1fae5; color: #065f46; }
.core-blocked { background: #fee2e2; color: #991b1b; }
.core-inactive { background: #fef3c7; color: #92400e; }

.core-account {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-family: monospace;
  font-weight: 700;
  color: var(--palm-text-light);
}

.core-account svg { width: 14px; height: 14px; }

.core-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.core-check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--palm-light);
}

.core-check-icon { flex-shrink: 0; display: flex; margin-top: 1px; }
.core-check-icon svg { width: 16px; height: 16px; }
.check-ok { color: var(--palm-success); }
.check-warn { color: var(--palm-warning); }
.check-err { color: var(--palm-error); }
.check-miss { color: var(--palm-text-light); }

.core-check-detail { flex: 1; min-width: 0; }

.core-check-field {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--palm-text);
}

.core-check-values {
  font-size: 0.68rem;
  color: var(--palm-text-light);
  font-weight: 500;
}

.image-viewer-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
  cursor: pointer;
}

.image-viewer-modal.open { display: flex; }

.image-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  color: white;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.image-viewer-modal img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  cursor: default;
}

@media (max-width: 768px) {
  .admin-detail-grid {
    grid-template-columns: 1fr;
  }
  .admin-detail-sidebar {
    position: static;
  }
  .doc-viewer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== PAYMENT METHODS ===== */
.payment-add-form {
  padding: 16px;
  background: var(--palm-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--palm-gray);
  margin-bottom: 16px;
}

.card-brand-selector {
  display: flex;
  gap: 10px;
}

.card-brand-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 2px solid var(--palm-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.card-brand-option:hover { border-color: var(--palm-blue); }
.card-brand-option.selected { border-color: var(--palm-navy); background: rgba(0, 36, 106, 0.03); }

.card-brand-logo {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 1px;
  font-family: 'Montserrat', sans-serif;
}

.visa-logo { color: #1a1f71; font-style: italic; }
.mc-logo { color: #eb001b; }

.wallet-provider-selector {
  display: flex;
  gap: 10px;
}

.wallet-provider-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 2px solid var(--palm-gray);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--palm-text);
}

.wallet-provider-option:hover { border-color: var(--palm-blue); }
.wallet-provider-option.selected { border-color: var(--palm-navy); background: rgba(0, 36, 106, 0.03); }

.wallet-provider-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.payment-cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.payment-card-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.emv-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  font-family: 'Montserrat', monospace;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.emv-card.visa {
  background: linear-gradient(135deg, #1a1f71 0%, #00246a 40%, #163aa5 100%);
}

.emv-card.mastercard {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
}

.emv-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.emv-card::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.emv-card-chip {
  width: 36px;
  height: 26px;
  border-radius: 4px;
  background: linear-gradient(135deg, #e8c547 0%, #daa520 50%, #c69214 100%);
  border: 1px solid rgba(200, 160, 50, 0.5);
  position: relative;
}

.emv-card-chip::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.emv-card-contactless {
  position: absolute;
  top: 20px;
  right: 20px;
  opacity: 0.6;
  transform: rotate(90deg);
}

.emv-card-contactless svg { width: 20px; height: 20px; }

.emv-card-number {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.emv-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 1;
}

.emv-card-holder {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.9;
}

.emv-card-expiry {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.emv-card-brand {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 1px;
  opacity: 0.8;
  z-index: 1;
}

.emv-card.visa .emv-card-brand {
  font-style: italic;
  font-size: 1.3rem;
}

.emv-card.mastercard .emv-card-brand {
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  text-transform: lowercase;
}

.emv-card-default {
  position: absolute;
  top: 16px;
  left: 60px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 8px;
  border-radius: 50px;
}

.emv-card-default svg { width: 10px; height: 10px; }

.payment-card-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.wallets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--palm-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--palm-gray);
  transition: all 0.2s;
}

.wallet-item.is-default {
  border-color: var(--palm-teal);
  background: rgba(61, 139, 160, 0.03);
}

.wallet-icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: white;
  border: 1px solid var(--palm-gray);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--palm-navy);
}

.wallet-info { flex: 1; min-width: 0; }

.wallet-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--palm-navy);
}

.wallet-id-display {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--palm-text-light);
  margin-top: 2px;
}

.wallet-actions {
  display: flex;
  gap: 6px;
}

.payment-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--palm-text-light);
}

.payment-empty svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.3; }
.payment-empty p { font-weight: 700; font-size: 0.92rem; color: var(--palm-text); margin-bottom: 4px; }
.payment-empty span { font-size: 0.78rem; }

@media (max-width: 768px) {
  .payment-cards-list { grid-template-columns: 1fr; }
  .wallet-provider-selector { flex-direction: column; }
}

.token-status-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--palm-gray);
  font-size: 0.75rem;
}

.token-status-bar.token-active {
  background: linear-gradient(135deg, rgba(61, 139, 160, 0.06), rgba(0, 36, 106, 0.04));
  border-color: rgba(61, 139, 160, 0.3);
}

.token-status-bar.token-pending {
  background: rgba(245, 166, 35, 0.04);
  border-color: rgba(245, 166, 35, 0.3);
}

.token-status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.68rem;
}

.token-active .token-status-indicator { color: var(--palm-teal); }
.token-active .token-status-indicator svg { width: 14px; height: 14px; color: var(--palm-teal); }
.token-pending .token-status-indicator { color: #b8860b; }
.token-pending .token-status-indicator svg { width: 14px; height: 14px; color: #b8860b; }

.token-details {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.token-id {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--palm-navy);
  background: rgba(0, 36, 106, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.token-id svg { width: 12px; height: 12px; }

.token-hand {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--palm-teal);
}

.token-hand svg { width: 12px; height: 12px; }

.token-hint {
  font-size: 0.68rem;
  color: var(--palm-text-light);
  font-style: italic;
}

.wallet-token-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.admin-payment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-payment-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--palm-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--palm-gray);
}

.admin-payment-icon {
  width: 40px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: 900;
  font-size: 0.6rem;
  letter-spacing: 0.5px;
  color: white;
}

.admin-payment-icon.visa { background: linear-gradient(135deg, #1a1f71, #00246a); }
.admin-payment-icon.mastercard { background: linear-gradient(135deg, #1a1a2e, #0f3460); }
.admin-payment-icon.wallet-type { background: var(--palm-light); border: 1px solid var(--palm-gray); color: var(--palm-text); font-size: 1rem; }

.admin-payment-info { flex: 1; min-width: 0; }

.admin-payment-title {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--palm-text);
}

.admin-payment-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--palm-text-light);
  margin-top: 1px;
}

/* ===== VEIN PATTERN ===== */
.vein-result-display {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.vein-result-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: veinFadeIn 0.8s ease-out;
}

.vein-result-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px;
  display: flex;
  justify-content: center;
}

.vein-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.3px;
}

.vein-result-badge svg { width: 12px; height: 12px; }

.scanner-viewport.vein-captured {
  border-color: var(--palm-teal);
  box-shadow: 0 0 30px rgba(61, 139, 160, 0.3);
}

@keyframes veinFadeIn {
  0% { opacity: 0; transform: scale(0.9); filter: blur(4px); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

.palm-enrollments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.palm-enrollment-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--palm-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--palm-gray);
  transition: all 0.2s;
}

.palm-enrollment-card:hover {
  border-color: var(--palm-teal);
  box-shadow: var(--shadow-sm);
}

.palm-enrollment-vein {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a0a12;
}

.vein-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.vein-thumb:hover {
  transform: scale(1.05);
}

.vein-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(61, 139, 160, 0.3);
}

.vein-thumb-placeholder svg {
  width: 32px;
  height: 32px;
}

.palm-enrollment-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.palm-enrollment-hand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-palm-enrollments {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-palm-card {
  display: flex;
  gap: 20px;
  padding: 16px;
  background: var(--palm-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--palm-gray);
}

.admin-palm-vein {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a0a12;
  border: 2px solid rgba(61, 139, 160, 0.2);
}

.admin-vein-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-vein-img:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(61, 139, 160, 0.4);
}

.admin-vein-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(61, 139, 160, 0.3);
}

.admin-vein-placeholder svg { width: 40px; height: 40px; }
.admin-vein-placeholder span { font-size: 0.7rem; font-weight: 600; }

.admin-palm-details {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .palm-enrollments-grid { grid-template-columns: 1fr; }
  .admin-palm-card { flex-direction: column; align-items: center; }
  .admin-palm-vein { width: 140px; height: 140px; }
}

/* ===== CAPTURE ZONES ===== */
.capture-zone {
  border: 1.5px dashed var(--palm-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  background: var(--palm-light);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.capture-zone.selfie-zone {
  max-width: 300px;
}

.capture-zone.has-capture {
  border-color: var(--palm-success);
  border-style: solid;
  background: #ecfdf5;
  padding: 0;
}

.capture-placeholder {
  margin-bottom: 14px;
}

.capture-placeholder .upload-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
  color: var(--palm-text-light);
}

.capture-placeholder .upload-icon svg { width: 28px; height: 28px; }

.capture-placeholder p {
  font-size: 0.82rem;
  color: var(--palm-text-light);
  font-weight: 600;
}

.hidden-placeholder {
  display: none;
}

.capture-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.capture-zone.has-capture .capture-actions {
  display: none;
}

.btn-cam {
  background: var(--palm-navy);
  color: white;
  border: none;
}

.btn-cam:hover {
  background: #001d55;
}

.btn-file-alt {
  background: var(--palm-white);
  color: var(--palm-text);
  border: 1.5px solid var(--palm-border);
}

.btn-file-alt:hover {
  border-color: var(--palm-blue);
  color: var(--palm-blue);
}

.capture-preview {
  display: none;
  position: relative;
}

.capture-preview.show {
  display: block;
}

.capture-preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
}

.capture-uploaded-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(13, 159, 110, 0.9);
  color: white;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.capture-uploaded-badge svg { width: 12px; height: 12px; }

.capture-retake {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.capture-retake svg { width: 14px; height: 14px; }

.capture-retake:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* ===== CAMERA MODAL ===== */
.camera-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.camera-modal.open {
  display: flex;
}

.camera-modal-content {
  background: var(--palm-navy);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 720px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.camera-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: white;
}

.camera-modal-header h3 {
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.camera-modal-header h3 svg { width: 18px; height: 18px; }

.camera-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.camera-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.camera-close-btn svg { width: 16px; height: 16px; }

.camera-viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: #000;
  overflow: hidden;
}

.camera-viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-guide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.camera-guide p {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.guide-frame {
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
}

.doc-guide .guide-frame {
  width: 80%;
  aspect-ratio: 1.6/1;
  border-radius: var(--radius-md);
}

.selfie-guide .guide-frame {
  width: 50%;
  aspect-ratio: 1/1.2;
  border-radius: 50%;
}

.camera-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: var(--palm-navy);
}

.camera-controls .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
  padding: 8px 14px;
}

.camera-controls .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.btn-capture {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid white;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-capture:hover {
  transform: scale(1.05);
}

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

.capture-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: white;
  transition: all 0.15s ease;
}

.btn-capture:active .capture-ring {
  background: var(--palm-teal);
}

@media (max-width: 768px) {
  .camera-modal-content {
    border-radius: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .camera-viewfinder {
    flex: 1;
    aspect-ratio: unset;
  }
  .camera-modal {
    padding: 0;
  }
  .capture-preview img {
    height: 140px;
  }
}

.hidden { display: none !important; }
