/* ============================================================
   Livasta Host Dashboard — Settings Page Styles
   ============================================================ */

/* ---------- Settings Layout ---------- */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 1024px) {
  .settings-layout {
    grid-template-columns: 240px 1fr;
  }
}

/* ---------- Settings Sidebar Nav ---------- */
.settings-nav {
  display: flex;
  flex-direction: row;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.settings-nav::-webkit-scrollbar { display: none; }

@media (min-width: 1024px) {
  .settings-nav {
    flex-direction: column;
    position: sticky;
    top: 140px;
    overflow-x: visible;
    padding-bottom: 0;
  }
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: all var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.settings-nav-item:hover {
  color: var(--ink);
  background: rgba(220, 232, 223, 0.3);
}

.settings-nav-item.active {
  color: var(--pine);
  background: rgba(22, 51, 44, 0.08);
}

.settings-nav-item svg {
  flex-shrink: 0;
}

/* ---------- Settings Content ---------- */
.settings-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Grid items default to min-width:auto, which lets a wide child (KYC form,
     billing table, provider grids) stretch this column past the screen and get
     clipped on mobile. Allow it to shrink to the available width instead. */
  min-width: 0;
}
.settings-content > *,
.settings-card,
.settings-card-body,
.settings-section { min-width: 0; max-width: 100%; }
.settings-layout { min-width: 0; }

.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

/* ---------- Settings Card ---------- */
.settings-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(220, 232, 223, 0.7);
  overflow: hidden;
}

.settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(220, 232, 223, 0.5);
}

.settings-card-header h3 {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--pine);
}

.settings-card-body {
  padding: 24px;
}

/* Tighter, edge-to-edge feel on small phones so cards don't feel boxed-in. */
@media (max-width: 560px) {
  .settings-card-body { padding: 18px 15px; }
  .pf-hero__row { padding: 0 15px 18px; }
  .pf-hero__cover { height: 96px; }
  .pf-avatar, .pf-avatar img { width: 84px; height: 84px; }
  .settings-form-actions { flex-wrap: wrap; }
  .settings-form-actions > * { flex: 1 1 auto; }
}

/* ---------- Profile Section ---------- */
.profile-photo-area {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-photo-area img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--sage);
}

.profile-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-photo-actions .name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.profile-photo-actions .role {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Settings Form ---------- */
.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .settings-form-grid { grid-template-columns: repeat(2, 1fr); }
}

.settings-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-form-group.full-width {
  grid-column: 1 / -1;
}

/* ---------- Notification Settings ---------- */
.notification-group {
  display: flex;
  flex-direction: column;
}

.notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(220, 232, 223, 0.4);
}

.notification-row:last-child {
  border-bottom: none;
}

.notification-row .notif-info {
  flex: 1;
}

.notification-row .notif-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.notification-row .notif-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---------- Security Settings ---------- */
.security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(220, 232, 223, 0.4);
  gap: 16px;
}

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

.security-item .sec-info {
  flex: 1;
}

.security-item .sec-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.security-item .sec-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.security-item .sec-value {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Payout Methods ---------- */
.payout-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--sage);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.payout-method + .payout-method {
  margin-top: 12px;
}

.payout-method.primary {
  border-color: var(--pine);
  background: rgba(22, 51, 44, 0.03);
}

.payout-method .pm-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--pine);
}

.payout-method .pm-info {
  flex: 1;
}

.payout-method .pm-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.payout-method .pm-detail {
  font-size: 12px;
  color: var(--muted);
}

.payout-method .pm-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(22, 51, 44, 0.08);
  color: var(--pine);
}


/* Payout Type Grid selectors */
.payout-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.payout-type-card {
  border: 1px solid var(--sage);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.payout-type-card i {
  font-size: 18px;
  color: var(--muted);
  transition: color var(--transition-fast);
}
.payout-type-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.payout-type-card:hover {
  border-color: var(--pine);
  background: rgba(22, 51, 44, 0.02);
}
.payout-type-card:hover i {
  color: var(--pine);
}
.payout-type-card.active {
  border-color: var(--pine);
  background: rgba(22, 51, 44, 0.05);
  box-shadow: 0 0 0 1px var(--pine);
}
.payout-type-card.active i {
  color: var(--pine);
}

/* ---------- Payout insights ---------- */
.payout-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.payout-stat {
  border: 1px solid var(--sage);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.payout-stat .ps-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.payout-stat .ps-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.payout-stat .ps-sub {
  font-size: 11px;
  color: var(--muted);
}
.payout-stat:first-child {
  border-color: var(--pine);
  background: rgba(22, 51, 44, 0.04);
}

/* ---------- Saved payout method / empty state ---------- */
.payout-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--sage);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 14px;
}
.payout-empty i { font-size: 20px; color: var(--pine); }

.pm-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.pm-status.verified { background: rgba(22,51,44,.08); color: var(--pine); }
.pm-status.pending  { background: rgba(217,119,6,.12); color: #b45309; }
.pm-status.unverified { background: rgba(100,116,139,.12); color: #475569; }

/* ---------- Latest payouts list ---------- */
.payout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--sage);
  border-radius: var(--radius-md);
}
.payout-row + .payout-row { margin-top: 10px; }
.payout-row .pr-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.payout-row .pr-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--sage); color: var(--pine);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.payout-row .pr-date { font-size: 13px; font-weight: 600; color: var(--ink); }
.payout-row .pr-meta { font-size: 12px; color: var(--muted); }
.payout-row .pr-amount { font-size: 15px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.payout-row .pr-status {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full);
  background: rgba(22,51,44,.08); color: var(--pine);
}
.payouts-empty {
  text-align: center;
  padding: 26px 16px;
  color: var(--muted);
  font-size: 14px;
}
.payouts-empty i { font-size: 26px; color: var(--sage); display: block; margin-bottom: 8px; }

#payout-msg.ok { color: var(--pine); }
#payout-msg.err { color: #dc2626; }

@media (max-width: 560px) {
  .payout-insights { grid-template-columns: 1fr; }
  .payout-stat .ps-value { font-size: 22px; }
}

/* ---------- Danger Zone ---------- */
.danger-zone {
  border-color: rgba(235, 111, 74, 0.3) !important;
}

.danger-zone .settings-card-header {
  border-bottom-color: rgba(235, 111, 74, 0.2);
}

.danger-zone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(235, 111, 74, 0.1);
  gap: 16px;
}

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

.danger-zone-item .dz-info {
  flex: 1;
}

.danger-zone-item .dz-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--coral);
}

.danger-zone-item .dz-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid rgba(235, 111, 74, 0.3);
  color: var(--coral);
  background: transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-danger:hover {
  background: rgba(235, 111, 74, 0.08);
  border-color: var(--coral);
}

/* ============================================================
   KYC Verification Section
   ============================================================ */

/* ---------- KYC Status Banners ---------- */
.kyc-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  animation: kycBannerFadeIn 0.4s ease;
}

@keyframes kycBannerFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.kyc-status-banner .kyc-status-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kyc-status-banner .kyc-status-body {
  flex: 1;
}

.kyc-status-banner .kyc-status-title {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.kyc-status-banner .kyc-status-desc {
  font-size: 13px;
  line-height: 1.5;
}

.kyc-status-banner .kyc-status-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Pending / Not Submitted */
.kyc-status-banner.status-pending {
  background: linear-gradient(135deg, rgba(217, 163, 90, 0.08), rgba(217, 163, 90, 0.04));
  border: 1px solid rgba(217, 163, 90, 0.25);
}
.kyc-status-banner.status-pending .kyc-status-icon {
  background: rgba(217, 163, 90, 0.12);
  color: #B8860B;
}
.kyc-status-banner.status-pending .kyc-status-title { color: #8B6914; }
.kyc-status-banner.status-pending .kyc-status-desc { color: #A67C00; }
.kyc-status-banner.status-pending .kyc-status-badge {
  background: rgba(217, 163, 90, 0.15);
  color: #8B6914;
}

/* Approved */
.kyc-status-banner.status-approved {
  background: linear-gradient(135deg, rgba(0, 122, 122, 0.06), rgba(0, 122, 122, 0.02));
  border: 1px solid rgba(0, 122, 122, 0.2);
}
.kyc-status-banner.status-approved .kyc-status-icon {
  background: rgba(0, 122, 122, 0.1);
  color: var(--pine);
}
.kyc-status-banner.status-approved .kyc-status-title { color: var(--pine-dark); }
.kyc-status-banner.status-approved .kyc-status-desc { color: var(--pine); }
.kyc-status-banner.status-approved .kyc-status-badge {
  background: rgba(0, 122, 122, 0.12);
  color: var(--pine-dark);
}

/* Rejected */
.kyc-status-banner.status-rejected {
  background: linear-gradient(135deg, rgba(235, 111, 74, 0.08), rgba(235, 111, 74, 0.03));
  border: 1px solid rgba(235, 111, 74, 0.25);
}
.kyc-status-banner.status-rejected .kyc-status-icon {
  background: rgba(235, 111, 74, 0.12);
  color: var(--coral);
}
.kyc-status-banner.status-rejected .kyc-status-title { color: #C0392B; }
.kyc-status-banner.status-rejected .kyc-status-desc { color: var(--coral); }
.kyc-status-banner.status-rejected .kyc-status-badge {
  background: rgba(235, 111, 74, 0.12);
  color: #C0392B;
}

/* ---------- KYC Step Progress ---------- */
.kyc-steps-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 4px;
}

.kyc-step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}

.kyc-step-indicator:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--sage);
  margin: 0 8px;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.kyc-step-indicator:not(:last-child).completed::after {
  background: var(--pine);
}

.kyc-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--sage);
  color: var(--muted);
  background: var(--white);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.kyc-step-indicator.active .kyc-step-num {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 122, 122, 0.12);
}

.kyc-step-indicator.completed .kyc-step-num {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--white);
}

.kyc-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.kyc-step-indicator.active .kyc-step-label {
  color: var(--pine);
}

.kyc-step-indicator.completed .kyc-step-label {
  color: var(--pine);
}

@media (max-width: 640px) {
  .kyc-step-label { display: none; }
  .kyc-step-indicator:not(:last-child)::after { margin: 0 4px; }
}

/* ---------- KYC Form Steps ---------- */
.kyc-form-step {
  display: none;
  animation: kycStepIn 0.35s ease;
}

.kyc-form-step.active {
  display: block;
}

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

.kyc-step-title {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--pine);
  margin-bottom: 4px;
}

.kyc-step-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ---------- File Upload Zones ---------- */
.kyc-upload-zone {
  border: 2px dashed var(--sage);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(225, 236, 234, 0.15);
  position: relative;
  overflow: hidden;
}

.kyc-upload-zone:hover {
  border-color: var(--pine-light);
  background: rgba(0, 122, 122, 0.04);
}

.kyc-upload-zone.has-file {
  border-color: var(--pine);
  border-style: solid;
  background: rgba(0, 122, 122, 0.03);
}

.kyc-upload-zone .upload-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(0, 122, 122, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: var(--pine);
}

.kyc-upload-zone .upload-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.kyc-upload-zone .upload-hint {
  font-size: 11px;
  color: var(--muted);
}

.kyc-upload-zone .upload-preview {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.kyc-upload-zone .upload-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(235, 111, 74, 0.9);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s;
}

.kyc-upload-zone:hover .upload-remove,
.kyc-upload-zone.has-file .upload-remove {
  opacity: 1;
}

/* ---------- Video KYC Widget ---------- */
.kyc-video-widget {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
  aspect-ratio: 16/9;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  border: 3px solid var(--sage);
}

.kyc-video-widget video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kyc-video-widget .video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,0.5);
  background: linear-gradient(135deg, #1a2a2a, #0d1f1f);
}

.kyc-video-widget .video-placeholder svg {
  opacity: 0.4;
}

.kyc-video-widget .video-placeholder span {
  font-size: 13px;
  font-weight: 600;
}

.kyc-video-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.kyc-video-controls .btn-record {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.kyc-video-controls .btn-record.start {
  background: var(--coral);
  color: white;
}

.kyc-video-controls .btn-record.start:hover {
  background: var(--coral-dark);
  transform: scale(1.03);
}

.kyc-video-controls .btn-record.stop {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--sage);
}

.kyc-rec-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(235, 68, 68, 0.9);
  color: white;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  animation: kycRecPulse 1.2s infinite;
}

@keyframes kycRecPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.kyc-rec-indicator .rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

/* ---------- KYC Form Navigation ---------- */
.kyc-form-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(220, 232, 223, 0.5);
}

.kyc-form-nav .btn-kyc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--sage);
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
}

.kyc-form-nav .btn-kyc-back:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.kyc-form-nav .btn-kyc-next,
.kyc-form-nav .btn-kyc-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kyc-form-nav .btn-kyc-next {
  background: var(--pine);
  color: var(--white);
}

.kyc-form-nav .btn-kyc-next:hover {
  background: var(--pine-dark);
  transform: translateY(-1px);
}

.kyc-form-nav .btn-kyc-submit {
  background: linear-gradient(135deg, var(--pine), var(--pine-dark));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(0, 122, 122, 0.25);
}

.kyc-form-nav .btn-kyc-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 122, 122, 0.35);
}

.kyc-form-nav .btn-kyc-submit:disabled,
.kyc-form-nav .btn-kyc-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---------- KYC Submitted Details (Read-Only) ---------- */
.kyc-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .kyc-details-grid { grid-template-columns: repeat(2, 1fr); }
}

.kyc-detail-item {
  padding: 12px 16px;
  background: rgba(225, 236, 234, 0.2);
  border-radius: var(--radius-md);
  border: 1px solid rgba(220, 232, 223, 0.4);
}

.kyc-detail-item .detail-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}

.kyc-detail-item .detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.kyc-detail-item .detail-value.empty {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}

.kyc-detail-item.full-width {
  grid-column: 1 / -1;
}

.kyc-doc-preview {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sage);
  margin-top: 8px;
  background: var(--white);
}

/* ---------- KYC Loading Spinner ---------- */
.kyc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

.kyc-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--sage);
  border-top-color: var(--pine);
  border-radius: 50%;
  animation: kycSpin 0.8s linear infinite;
}

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

.kyc-loading-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- KYC Upload Progress ---------- */
.kyc-upload-progress {
  margin-top: 16px;
}

.kyc-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--sage);
  border-radius: 3px;
  overflow: hidden;
}

.kyc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pine), var(--pine-light));
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.kyc-progress-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 6px;
  text-align: center;
}

/* Contextual Footer Info Cards */
.settings-footer-info {
  margin-top: 16px;
  background: rgba(22, 51, 44, 0.02);
  border: 1px dashed var(--sage);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.settings-footer-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--pine);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-footer-info p, .settings-footer-info li {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.settings-footer-info ul {
  margin: 4px 0 0 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.security-trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.security-trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid rgba(220, 232, 223, 0.5);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.security-trust-badge i {
  font-size: 14px;
  color: var(--pine);
}
.security-trust-badge span {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
}

/* ============================================================
   Billing & Subscriptions — live plan, plan grid, payment history
   ============================================================ */
.bill-loading { padding: 28px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---- current plan card ---- */
.bill-current {
  position: relative;
  margin-bottom: 28px;
  padding: 22px;
  border: 1px solid var(--sage);
  border-left: 4px solid var(--pine);
  border-radius: var(--radius-md);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(0, 122, 122, .07), transparent 60%),
    radial-gradient(90% 120% at 0% 100%, rgba(217, 163, 90, .09), transparent 55%),
    #fdfdfc;
}
.bill-current--free { border-left-color: var(--gold); }
.bill-current.is-pending { border-left-color: var(--gold); }
.bill-current.is-expired { border-left-color: var(--coral); }

.bill-current__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.bill-kicker {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.bill-plan-name {
  font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600;
  color: var(--pine); line-height: 1.2; margin: 0;
}
.bill-free-note { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 16px; }

.bill-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.bill-meta-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--sage);
}
.bill-meta-k { font-size: 13px; color: var(--muted); flex: 0 0 auto; }
.bill-meta-v { font-size: 14px; color: var(--ink); text-align: right; }
.bill-meta-v strong { font-weight: 700; }

.bill-chip {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--radius-full);
  background: var(--sage); color: var(--pine); font-size: 11px; font-weight: 700;
}
.bill-chip--ok { background: #E3F1E6; color: #2F7D4F; }
.bill-chip--warn { background: #FBF0DD; color: #B5792A; }
.bill-chip--danger { background: #FBE7E1; color: #C5502E; }

/* ---- usage bar ---- */
.bill-usage { margin-top: 18px; }
.bill-usage__top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--muted); margin-bottom: 6px;
}
.bill-usage__top strong { color: var(--ink); font-size: 15px; }
.bill-bar { height: 6px; border-radius: var(--radius-full); background: var(--sage); overflow: hidden; }
.bill-bar span {
  display: block; height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--pine), var(--pine-light));
  transition: width .4s ease;
}

.bill-cta { display: inline-flex; margin-top: 18px; }

/* ---- inline banners ---- */
.bill-banner {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 600; line-height: 1.5; margin-bottom: 16px;
}
.bill-banner a { color: inherit; text-decoration: underline; }
.bill-banner--warn { background: #FBF0DD; color: #8A6010; }
.bill-banner--danger { background: #FBE7E1; color: #C5502E; }

/* ---- blocks ---- */
.bill-block { margin-top: 28px; }
.bill-block__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.bill-h {
  font-family: 'Fraunces', serif; font-size: 15px; font-weight: 600;
  color: var(--pine); margin: 0;
}
.bill-link { font-size: 13px; font-weight: 600; color: var(--pine); text-decoration: none; }
.bill-link:hover { text-decoration: underline; }
.bill-count { font-size: 12px; font-weight: 600; color: var(--muted); }

/* ---- upgrade promo band ---- */
.bill-promo {
  position: relative; display: flex; align-items: center; gap: 18px;
  margin: 26px 0 0; padding: 20px 22px; overflow: hidden;
  border: 1px solid var(--sage); border-radius: var(--radius-md);
  background: linear-gradient(120deg, var(--pine) 0%, #0A6E6B 55%, #0E9C95 100%);
  color: #fff; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.bill-promo:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -18px rgba(0, 122, 122, .8); }
/* soft gold bloom, purely decorative */
.bill-promo__glow {
  position: absolute; top: -60%; right: -10%; width: 320px; height: 320px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(217, 163, 90, .5), transparent 65%);
}
.bill-promo__body { position: relative; flex: 1; min-width: 0; }
.bill-promo__title {
  display: block; font-family: 'Fraunces', serif; font-size: 18px;
  font-weight: 600; margin-bottom: 3px;
}
.bill-promo__sub { display: block; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .82); }
.bill-promo__cta {
  position: relative; flex: 0 0 auto; padding: 10px 18px;
  border-radius: var(--radius-full); background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .34);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  transition: background .18s, border-color .18s;
}
.bill-promo:hover .bill-promo__cta { background: #fff; color: var(--pine); border-color: #fff; }

/* ---- payment history table ---- */
.bill-table-wrap {
  overflow-x: auto; border: 1px solid var(--sage);
  border-radius: var(--radius-md); background: #fff;
}
.bill-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; text-align: left; }
.bill-table thead tr {
  background: linear-gradient(180deg, var(--canvas), rgba(238, 243, 243, .55));
}
.bill-table th {
  padding: 12px 18px; font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
  border-bottom: 1px solid var(--sage);
}
.bill-th-amt { text-align: right; }
.bill-table td { padding: 15px 18px; border-bottom: 1px solid rgba(225, 236, 234, .75); vertical-align: middle; }
.bill-table tbody tr:last-child td { border-bottom: 0; }

/* status rail down the left edge of each row */
.bill-row td:first-child { position: relative; padding-left: 22px; }
.bill-row td:first-child::before {
  content: ''; position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 26px; border-radius: 999px; background: var(--sage);
}
.bill-row--paid td:first-child::before { background: #2F7D4F; }
.bill-row--free td:first-child::before { background: var(--pine-light); }
.bill-row--pending td:first-child::before { background: var(--gold); }
.bill-row--failed td:first-child::before { background: var(--coral); }
.bill-row:hover { background: rgba(0, 122, 122, .035); }

.bill-date { font-weight: 600; color: var(--ink); white-space: nowrap; }

/* plan cell: initial mark + name + cycle/date range */
.bill-plan-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.bill-mark {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--pine), var(--pine-light));
  color: #fff; font-size: 14px; font-weight: 800;
}
.bill-row--free .bill-mark { background: linear-gradient(140deg, var(--muted), #8FA3A9); }
.bill-plan-cell__txt { min-width: 0; }
.bill-plan-cell__txt strong { display: block; color: var(--ink); font-weight: 700; }
.bill-td-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.bill-amt {
  text-align: right; font-weight: 800; color: var(--ink);
  white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 15px;
}
.bill-amt.is-free { color: var(--pine); font-size: 14px; }

/* empty state */
.bill-empty { padding: 34px 18px; color: var(--muted); text-align: center; }
.bill-empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 3px; }
.bill-empty span:not(.bill-empty__mark) { font-size: 13px; }
.bill-empty__mark {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--sage); color: var(--pine); font-size: 18px; font-weight: 800;
}

/* ---- responsive ---- */
@media (max-width: 640px) {
  .bill-meta { grid-template-columns: 1fr; gap: 8px; }
  .bill-current { padding: 18px; }
  .bill-plan-name { font-size: 20px; }
  .bill-current__head { flex-direction: column; gap: 8px; }

  .bill-promo { flex-direction: column; align-items: flex-start; gap: 14px; }
  .bill-promo__cta { width: 100%; text-align: center; }

  /* The table restacks into cards. data-label on every cell supplies the
     header text, so there is only one set of markup to maintain. */
  .bill-table-wrap { border: 0; background: transparent; }
  .bill-table, .bill-table tbody, .bill-table tr, .bill-table td { display: block; width: 100%; }
  .bill-table thead { display: none; }
  .bill-table tr.bill-row {
    position: relative; margin-bottom: 12px; padding: 14px 16px 14px 20px;
    border: 1px solid var(--sage); border-radius: var(--radius-md); background: #fff;
  }
  .bill-table tr.bill-row::before {
    content: ''; position: absolute; left: 0; top: 12px; bottom: 12px;
    width: 3px; border-radius: 999px; background: var(--sage);
  }
  .bill-row--paid::before { background: #2F7D4F; }
  .bill-row--free::before { background: var(--pine-light); }
  .bill-row--pending::before { background: var(--gold); }
  .bill-row--failed::before { background: var(--coral); }
  /* the desktop rail would double up inside the card */
  .bill-row td:first-child::before { display: none; }
  .bill-row td:first-child { padding-left: 0; }

  .bill-table td {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; padding: 7px 0; border-bottom: 0; text-align: left;
  }
  .bill-table td::before {
    content: attr(data-label); flex: 0 0 auto;
    font-size: 11px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--muted);
  }
  .bill-table td.bill-amt { text-align: right; }
  .bill-table tr.bill-row:hover { background: #fff; }
  .bill-empty { border: 1px solid var(--sage); border-radius: var(--radius-md); background: #fff; }
}

/* ---- dark mode ---- */
html[data-theme="dark"] .bill-current { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .bill-plan { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .bill-plan.is-current { background: rgba(0, 122, 122, .12); }
html[data-theme="dark"] .bill-table thead tr { background: rgba(255, 255, 255, .04); }
html[data-theme="dark"] .bill-table tbody tr:hover { background: rgba(0, 122, 122, .08); }
html[data-theme="dark"] .bill-table-wrap { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .bill-table thead tr { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .bill-row:hover { background: rgba(0, 122, 122, .08); }
html[data-theme="dark"] .bill-empty__mark { background: rgba(255, 255, 255, .08); }
@media (max-width: 640px) {
  html[data-theme="dark"] .bill-table tr.bill-row,
  html[data-theme="dark"] .bill-empty { background: rgba(255, 255, 255, .04); }
  html[data-theme="dark"] .bill-table tr.bill-row:hover { background: rgba(255, 255, 255, .04); }
}

/* ============================================================
   Sign-in & Account Security — replaces the old password card
   ============================================================ */
.sec-loading { padding: 28px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---- how you sign in ---- */
.sec-method {
  display: flex; align-items: center; gap: 16px; padding: 20px;
  border: 1px solid var(--sage); border-left: 4px solid var(--pine);
  border-radius: var(--radius-md);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(0, 122, 122, .07), transparent 60%),
    #fdfdfc;
}
.sec-method__icon {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, var(--pine), var(--pine-light));
  color: #fff; font-size: 19px;
}
.sec-method__body { flex: 1; min-width: 0; }
.sec-kicker {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 3px;
}
.sec-method__title { display: block; font-size: 17px; color: var(--ink); margin-bottom: 3px; }
.sec-method__desc { display: block; font-size: 13px; color: var(--muted); line-height: 1.55; }

/* ---- warnings / all clear ---- */
.sec-warns { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.sec-warn {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; line-height: 1.5;
}
.sec-warn i { flex: 0 0 auto; }
.sec-warn span { flex: 1; min-width: 0; }
.sec-warn a { color: inherit; text-decoration: underline; white-space: nowrap; font-weight: 700; }
.sec-warn--warn { background: #FBF0DD; color: #8A6010; }
.sec-warn--danger { background: #FBE7E1; color: #C5502E; }
.sec-allgood {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  background: #E3F1E6; color: #2F7D4F; font-size: 13px; font-weight: 600;
}

/* ---- blocks ---- */
.sec-block { margin-top: 26px; }
.sec-block__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.sec-h {
  font-family: 'Fraunces', serif; font-size: 15px; font-weight: 600;
  color: var(--pine); margin: 0 0 10px;
}
.sec-block__head .sec-h { margin: 0; }
.sec-score { font-size: 12px; font-weight: 700; color: var(--muted); }

.sec-bar { height: 6px; border-radius: var(--radius-full); background: var(--sage); overflow: hidden; margin-bottom: 14px; }
.sec-bar span {
  display: block; height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--pine), var(--pine-light));
  transition: width .4s ease;
}

/* ---- checklist ---- */
.sec-checks { border: 1px solid var(--sage); border-radius: var(--radius-md); overflow: hidden; }
.sec-check {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  border-bottom: 1px solid rgba(225, 236, 234, .75); background: #fff;
}
.sec-check:last-child { border-bottom: 0; }
.sec-check__mark {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #FBF0DD; color: #B5792A; font-size: 11px;
}
.sec-check.is-ok .sec-check__mark { background: #E3F1E6; color: #2F7D4F; }
.sec-check__txt { flex: 1; min-width: 0; }
.sec-check__txt strong { display: block; font-size: 14px; color: var(--ink); font-weight: 700; }
.sec-check__txt span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; word-break: break-word; }
.sec-check__state { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #2F7D4F; }
.sec-check__state.is-todo { color: var(--muted); }
.sec-check__fix {
  flex: 0 0 auto; padding: 6px 14px; border-radius: var(--radius-full);
  border: 1.5px solid var(--pine); color: var(--pine);
  font-size: 12px; font-weight: 700; text-decoration: none; transition: all .15s;
}
.sec-check__fix:hover { background: var(--pine); color: #fff; }

/* ---- connected providers ---- */
.sec-providers { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.sec-prov {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 14px 16px; border: 1px solid var(--sage); border-radius: var(--radius-md);
  background: #fff; opacity: .6;
}
.sec-prov.is-on { opacity: 1; border-color: var(--pine); background: linear-gradient(180deg, rgba(0, 122, 122, .05), #fff 70%); }
.sec-prov i { font-size: 17px; color: var(--muted); margin-bottom: 4px; }
.sec-prov.is-on i { color: var(--pine); }
.sec-prov span { font-size: 14px; font-weight: 700; color: var(--ink); }
.sec-prov em { font-style: normal; font-size: 12px; color: var(--muted); }

/* ---- advisory ---- */
.sec-advice {
  display: flex; gap: 12px; margin-top: 26px; padding: 15px 17px;
  border-radius: var(--radius-md); border: 1px dashed var(--gold);
  background: rgba(217, 163, 90, .08);
}
.sec-advice i { flex: 0 0 auto; color: #8A6010; margin-top: 2px; }
.sec-advice strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 2px; }
.sec-advice span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

/* ---- responsive ---- */
@media (max-width: 640px) {
  .sec-method { flex-wrap: wrap; padding: 16px; }
  .sec-method__body { flex: 1 1 100%; order: 3; }
  .sec-check { flex-wrap: wrap; }
  .sec-check__txt { flex: 1 1 60%; }
  .sec-providers { grid-template-columns: 1fr; }
}

/* ---- dark mode ---- */
html[data-theme="dark"] .sec-method { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .sec-check { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .sec-prov { background: rgba(255, 255, 255, .03); }
html[data-theme="dark"] .sec-prov.is-on { background: rgba(0, 122, 122, .12); }

/* ============================================================
   Phone verification — country code + number, then 6 OTP boxes
   ============================================================ */
.pv-loading { padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }
.pv-lead { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0 0 18px; max-width: 62ch; }
.pv-label {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}

/* ---- number row: dial code + national number as one control ---- */
.pv-row { display: flex; align-items: stretch; max-width: 440px; }

.pv-cc { position: relative; flex: 0 0 auto; }
/* the real <select> sits invisible on top so we keep native mobile pickers
   and keyboard behaviour, while the visible face stays styled */
.pv-cc__select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 16px; /* 16px stops iOS zoom */
}
.pv-cc__face {
  display: flex; align-items: center; gap: 7px; height: 100%;
  padding: 11px 12px; border: 1px solid var(--sage); border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--canvas); color: var(--ink); font-size: 14px; font-weight: 700;
  white-space: nowrap; transition: border-color .15s, background .15s;
}
.pv-cc__select:focus + .pv-cc__face { border-color: var(--pine); background: #fff; }
.pv-cc__flag { font-size: 17px; line-height: 1; }
.pv-cc__face i { font-size: 10px; color: var(--muted); }

.pv-input {
  flex: 1; min-width: 0; padding: 11px 14px;
  border: 1px solid var(--sage); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 15px; font-family: inherit; color: var(--ink); outline: none;
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s;
}
.pv-input::placeholder { color: #C3D0CF; letter-spacing: .1em; }
.pv-input:focus { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(0, 122, 122, .1); }

.pv-hint { font-size: 12px; color: var(--muted); margin: 8px 0 16px; }
.pv-send { padding: 11px 26px; }

/* ---- already verified ---- */
.pv-verified {
  display: flex; align-items: center; gap: 13px; padding: 15px 17px;
  border: 1px solid rgba(47, 125, 79, .3); border-radius: var(--radius-md);
  background: rgba(227, 241, 230, .55);
}
.pv-verified__icon { flex: 0 0 auto; color: #2F7D4F; font-size: 21px; }
.pv-verified__body { flex: 1; min-width: 0; }
.pv-verified__body strong {
  display: block; font-size: 15px; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: .03em;
}
.pv-verified__body span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.pv-change {
  flex: 0 0 auto; padding: 7px 16px; border-radius: var(--radius-full);
  border: 1.5px solid var(--pine); background: transparent; color: var(--pine);
  font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.pv-change:hover { background: var(--pine); color: #fff; }

/* ---- OTP step ---- */
.pv-back {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--pine); font-size: 13px; font-weight: 700;
}
.pv-back:hover { text-decoration: underline; }
.pv-otp__lead { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 16px; }
.pv-otp__lead strong { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .03em; }

.pv-otp__boxes { display: flex; gap: 10px; margin-bottom: 20px; }
.pv-otp__box {
  width: 52px; height: 60px; text-align: center;
  border: 1.5px solid var(--sage); border-radius: var(--radius-md);
  background: #fff; color: var(--ink);
  font-size: 24px; font-weight: 700; font-family: inherit;
  font-variant-numeric: tabular-nums; outline: none; caret-color: var(--pine);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.pv-otp__box:focus {
  border-color: var(--pine); box-shadow: 0 0 0 3px rgba(0, 122, 122, .12);
  transform: translateY(-1px);
}
.pv-otp__box:not(:placeholder-shown) { border-color: var(--pine-light); }

.pv-otp__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pv-resend {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--pine); font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pv-resend:hover:not(:disabled) { text-decoration: underline; }
.pv-resend:disabled { color: var(--muted); cursor: default; }

/* ---- inline note ---- */
.pv-note {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; line-height: 1.5;
}
.pv-note[hidden] { display: none !important; }
.pv-note--ok { background: #E3F1E6; color: #2F7D4F; }
.pv-note--warn { background: #FBF0DD; color: #8A6010; }
.pv-note--err { background: #FBE7E1; color: #C5502E; }

/* ---- responsive ---- */
@media (max-width: 560px) {
  .pv-row { max-width: 100%; }
  .pv-cc__face { padding: 11px 9px; font-size: 13px; }
  .pv-otp__boxes { gap: 7px; }
  .pv-otp__box { width: 100%; height: 54px; font-size: 20px; }
  .pv-verified { flex-wrap: wrap; }
  .pv-verified__body { flex: 1 1 100%; order: 3; }
}

/* ---- dark mode ---- */
html[data-theme="dark"] .pv-cc__face { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .pv-input,
html[data-theme="dark"] .pv-otp__box { background: rgba(255, 255, 255, .04); color: #E7EFEE; }
html[data-theme="dark"] .pv-verified { background: rgba(47, 125, 79, .14); }

/* ============================================================
   Notification preferences — category × channel matrix
   ============================================================ */
.np-loading, .np-error { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.np-lead { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0 0 20px; max-width: 64ch; }

/* Shared column template so header and rows line up exactly. */
.np-head, .np-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px 92px 92px;
  align-items: center;
  gap: 8px;
}

.np-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sage);
}
.np-head__ch { text-align: center; line-height: 1.35; }
.np-head__ch i { display: block; font-size: 15px; color: var(--pine); margin-bottom: 3px; }
.np-head__ch span {
  display: block; font-size: 12px; font-weight: 700; color: var(--ink);
}
.np-head__ch em {
  display: block; font-style: normal; font-size: 10px; color: var(--muted);
  margin-top: 2px; line-height: 1.4;
}
.np-chan-ok { color: #2F7D4F; font-weight: 600; word-break: break-word; }
.np-chan-off { color: #B5792A; font-weight: 600; }
.np-fix { color: var(--pine); text-decoration: underline; white-space: nowrap; }

.np-rows { display: flex; flex-direction: column; }
.np-row { padding: 15px 0; border-bottom: 1px solid rgba(225, 236, 234, .7); }
.np-row:last-child { border-bottom: 0; }

.np-row__info { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.np-row__icon {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sage); color: var(--pine); font-size: 14px;
}
.np-row__info strong { display: block; font-size: 14px; color: var(--ink); font-weight: 700; }
.np-row__info span span, .np-row__info > span > span {
  display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px;
}

.np-cell { display: flex; align-items: center; justify-content: center; }
.np-cell--fixed { color: #2F7D4F; font-size: 13px; }

/* switch */
.np-sw {
  position: relative; width: 42px; height: 24px; flex: 0 0 auto;
  border: 0; border-radius: 999px; background: var(--sage);
  cursor: pointer; padding: 0; transition: background .18s;
}
.np-sw span {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .18s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.np-sw.is-on { background: var(--pine); }
.np-sw.is-on span { transform: translateX(18px); }
.np-sw.is-blocked { opacity: .4; cursor: not-allowed; }
.np-sw:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }

/* footer */
.np-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--sage);
}
.np-status { font-size: 13px; font-weight: 600; color: var(--muted); }
.np-status--ok { color: #2F7D4F; }
.np-status--err { color: #C5502E; }
.np-save { padding: 10px 24px; }
.np-save:disabled { opacity: .5; cursor: default; }

/* responsive: channel labels shrink, then rows stack */
@media (max-width: 720px) {
  .np-head, .np-row { grid-template-columns: minmax(0, 1fr) 62px 62px 62px; }
  .np-head__ch span { font-size: 11px; }
  .np-head__ch em { display: none; }
  .np-sw { width: 38px; height: 22px; }
  .np-sw span { width: 16px; height: 16px; }
  .np-sw.is-on span { transform: translateX(16px); }
}
@media (max-width: 480px) {
  .np-row__icon { display: none; }
  .np-row__info strong { font-size: 13px; }
}

/* dark mode */
html[data-theme="dark"] .np-row__icon { background: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .np-sw { background: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .np-sw.is-on { background: var(--pine); }

/* On, but the channel is not live yet — kept, not promised. */
.np-sw.is-pending { background: var(--gold); opacity: .75; }
.np-sw.is-pending span { background: #FFF8EC; }
html[data-theme="dark"] .np-sw.is-pending { background: var(--gold); }

/* Phone-verify used inline inside the profile grid rather than its own card.
   The form group already provides the "Phone number" label, so the widget's
   own is redundant; hints and spacing tighten to sit among the other fields. */
.pv-inline.pv-loading { padding: 12px 0; text-align: left; }
.pv-inline .pv-label { display: none; }
.pv-inline .pv-hint { margin-top: 8px; margin-bottom: 10px; }
.pv-inline .pv-form,
.pv-inline .pv-otp { margin: 0; }
.pv-inline .pv-verified { margin: 0; }

/* ============================================================
   Email verification widget (inline in the profile, under email)
   ============================================================ */
.ev-inline { margin-top: 10px; }
.ev-inline[hidden] { display: none !important; }

.ev-prompt {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid rgba(217, 163, 90, .4); border-radius: var(--radius-md);
  background: rgba(217, 163, 90, .08);
}
.ev-prompt__icon { flex: 0 0 auto; color: #B5792A; font-size: 20px; }
.ev-prompt__body { flex: 1; min-width: 0; }
.ev-prompt__body strong { display: block; font-size: 13.5px; color: var(--ink); }
.ev-prompt__body span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; line-height: 1.5; }
.ev-send { flex: 0 0 auto; padding: 8px 16px; font-size: 13px; }

.ev-otp {
  border: 1px solid var(--sage); border-radius: var(--radius-md);
  padding: 14px 16px; background: #fdfdfc;
}
.ev-back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--pine); font-size: 12.5px; font-weight: 700;
}
.ev-back:hover { text-decoration: underline; }
.ev-otp__lead { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.ev-otp__lead strong { color: var(--ink); }
.ev-otp__boxes { display: flex; gap: 8px; margin-bottom: 14px; }
.ev-otp__box {
  width: 42px; height: 50px; text-align: center;
  border: 1.5px solid var(--sage); border-radius: var(--radius-md);
  background: #fff; color: var(--ink); font-size: 20px; font-weight: 700;
  font-variant-numeric: tabular-nums; outline: none; caret-color: var(--pine);
  transition: border-color .15s, box-shadow .15s;
}
.ev-otp__box:focus { border-color: var(--pine); box-shadow: 0 0 0 3px rgba(0, 122, 122, .12); }
.ev-otp__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ev-resend { padding: 0; border: 0; background: none; cursor: pointer; color: var(--pine); font-size: 12.5px; font-weight: 700; }
.ev-resend:hover:not(:disabled) { text-decoration: underline; }
.ev-resend:disabled { color: var(--muted); cursor: default; }

.ev-done {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: var(--radius-md); background: #E3F1E6; color: #2F7D4F;
  font-size: 13px; font-weight: 600;
}

.ev-note {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px;
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; line-height: 1.4;
}
.ev-note[hidden] { display: none !important; }
.ev-note--ok { background: #E3F1E6; color: #2F7D4F; }
.ev-note--warn { background: #FBF0DD; color: #8A6010; }
.ev-note--err { background: #FBE7E1; color: #C5502E; }

@media (max-width: 560px) {
  .ev-prompt { flex-wrap: wrap; }
  .ev-prompt__body { flex: 1 1 100%; }
  .ev-otp__box { width: 100%; height: 46px; font-size: 18px; }
}
html[data-theme="dark"] .ev-otp { background: rgba(255,255,255,.03); }
html[data-theme="dark"] .ev-otp__box { background: rgba(255,255,255,.04); color: #E7EFEE; }

/* =========================================================================
   Profile section — redesigned ("pf-" prefix). Colourful, Airbnb-style.
   Uses the host palette: pine (teal), coral, gold, sage, cream.
   ========================================================================= */
.pf-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--sage);
  margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.pf-hero__cover {
  height: 110px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(0,122,122,.9), transparent 55%),
    radial-gradient(120% 160% at 100% 0%, rgba(235,111,74,.85), transparent 55%),
    linear-gradient(120deg, var(--pine) 0%, var(--pine-light) 45%, #2b7d74 100%);
}
.pf-hero__row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 0 26px 22px;
  margin-top: -46px;
  flex-wrap: wrap;
}
.pf-avatar {
  position: relative;
  width: 104px;
  height: 104px;
  flex-shrink: 0;
}
.pf-avatar img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--cream);
  background: var(--cream);
  box-shadow: 0 8px 24px -10px rgba(2,6,23,.5);
  cursor: zoom-in;
  transition: transform .15s;
}
.pf-avatar img:hover { transform: scale(1.03); }
.pf-avatar__cam {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  background: var(--coral);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.pf-avatar__cam:hover { background: var(--coral-dark); transform: scale(1.08); }
.pf-hero__id { flex: 1; min-width: 180px; padding-bottom: 4px; }
.pf-hero__name {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}
.pf-hero__role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--pine-dark);
}
.pf-chip--ok { background: #e0f2f1; color: #00695c; }
.pf-chip--warn { background: #fff4e0; color: #b26a00; }
.pf-chip--coral { background: #fdece7; color: #c0492c; }
.pf-chip i { font-size: 10px; }

/* completeness ring */
.pf-complete { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-bottom: 4px; }
.pf-complete__ring {
  --pct: 0;
  width: 66px; height: 66px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--coral) calc(var(--pct) * 1%), var(--sage) 0);
  transition: background .6s ease;
}
.pf-complete__ring span {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--pine-dark);
}
.pf-complete__label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: center; line-height: 1.2; }

/* cards + inputs */
.pf-card { margin-bottom: 0; }
.pf-card .settings-card-header h3 { display: flex; align-items: center; gap: 10px; }
.pf-ico {
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff; flex-shrink: 0;
}
.pf-ico--pine { background: linear-gradient(135deg, var(--pine-light), var(--pine)); }
.pf-ico--coral { background: linear-gradient(135deg, #f6a06a, var(--coral)); }
.pf-sub { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.pf-label { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.pf-input {
  width: 100%;
  border: 1.5px solid var(--sage);
  border-radius: var(--radius-md, 12px);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.pf-input:focus { border-color: var(--pine); }
.pf-input--locked { background: var(--sage); color: var(--muted); cursor: not-allowed; }
.pf-textarea { resize: vertical; min-height: 96px; line-height: 1.55; margin-bottom: 4px; }

/* Airbnb-style prompt cards */
.pf-prompts-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 22px 0 12px; flex-wrap: wrap;
}
.pf-prompts-head span { font-weight: 800; font-size: 14px; color: var(--pine-dark); display: inline-flex; align-items: center; gap: 8px; }
.pf-prompts-head span i { color: var(--coral); }
.pf-prompts-head small { font-size: 12px; color: var(--muted); }
.pf-prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.pf-prompt {
  border: 1.5px solid var(--sage);
  border-radius: 16px;
  padding: 14px 15px;
  background: var(--cream);
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.pf-prompt:focus-within { border-color: var(--pine); box-shadow: 0 8px 22px -14px rgba(0,122,122,.5); transform: translateY(-1px); }
.pf-prompt.is-filled { border-color: rgba(0,122,122,.4); background: #fff; }
.pf-prompt__q { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 9px; }
.pf-prompt__ico {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff;
}
.pf-prompt__a {
  width: 100%; border: none; background: transparent; outline: none; resize: none;
  font-family: inherit; font-size: 13.5px; color: var(--ink); line-height: 1.5; min-height: 42px;
}
.pf-prompt__a::placeholder { color: var(--muted); }
.pf-save { align-self: flex-start; }

/* Avatar lightbox */
.pf-lightbox {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 12, 20, .88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: clamp(16px, 4vw, 48px);
}
.pf-lightbox[hidden] { display: none; }
.pf-lightbox img {
  /* Consistent large viewing size — scales small avatars up to a comfortable
     size and caps large ones to the viewport. */
  width: min(84vw, 560px);
  height: auto;
  max-height: 88vh;
  border-radius: 20px;
  object-fit: contain;
  background: #0d1420;
  border: 4px solid rgba(255, 255, 255, .92);
  box-shadow: 0 30px 90px -18px rgba(0, 0, 0, .85);
  image-rendering: auto;
  animation: pfZoom .22s cubic-bezier(.2,.7,.2,1);
}
@keyframes pfZoom { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
/* Shrink-wraps the image so the close button can sit on its corner. */
.pf-lightbox__frame { position: relative; display: inline-flex; line-height: 0; }
.pf-lightbox__close {
  position: absolute; top: -16px; right: -16px;
  width: 44px; height: 44px; border-radius: 50%;
  padding: 0; margin: 0;
  border: 2px solid #fff; background: #0d1420; color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
  transition: background .15s, transform .12s;
  z-index: 2;
}
.pf-lightbox__close svg { display: block; width: 18px; height: 18px; }
.pf-lightbox__close:hover { background: #e11d48; border-color: #fff; transform: scale(1.08); }
.pf-lightbox__close:active { transform: scale(.96); }
/* On small screens the photo is near-full-width, so tuck the button inside the
   corner instead of letting it overhang off the edge. */
@media (max-width: 560px) {
  .pf-lightbox__close { top: 6px; right: 6px; width: 40px; height: 40px; }
}

@media (max-width: 560px) {
  .pf-hero__row { margin-top: -40px; padding: 0 16px 18px; }
  .pf-complete { order: 3; margin-left: auto; }
}

/* ===== Profile view / edit modes ===== */
.pf-hero__side { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 4px; }
.pf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 13.5px;
  border-radius: 999px; padding: 9px 20px; cursor: pointer; border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
  white-space: nowrap;
}
.pf-btn:active { transform: translateY(1px); }
.pf-btn--primary { background: var(--pine); color: #fff; box-shadow: 0 10px 22px -12px rgba(0,122,122,.8); }
.pf-btn--primary:hover { background: var(--pine-dark); }
.pf-btn--ghost { background: transparent; color: var(--muted); border-color: var(--sage); }
.pf-btn--ghost:hover { background: var(--sage); color: var(--ink); }

/* Camera only usable while editing */
.pf-avatar__cam { display: none; }
#profile-settings.is-editing .pf-avatar__cam { display: flex; }

.pf-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Read-only detail rows */
.pf-view-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 26px; }
.pf-view-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-view-row.full { grid-column: 1 / -1; }
.pf-view-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pf-view-v { font-size: 15px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; word-break: break-word; }
.pf-view-v.empty { color: var(--muted); font-weight: 500; font-style: italic; }
.pf-vbadge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.pf-vbadge--ok { background: #e0f2f1; color: #00695c; }
.pf-vbadge--warn { background: #fff4e0; color: #b26a00; cursor: pointer; }

/* Bio + answered prompts in view mode */
.pf-view-bio { font-size: 15px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; }
.pf-view-bio.empty { color: var(--muted); font-style: italic; }
.pf-view-prompts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.pf-vp {
  border: 1px solid var(--sage); border-left: 4px solid var(--pine);
  border-radius: 14px; padding: 13px 15px; background: var(--cream);
}
.pf-vp__q { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 6px; }
.pf-vp__ico { width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; }
.pf-vp__a { font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.pf-view-empty { color: var(--muted); font-size: 14px; }

/* Edit form layout + reliable hide. The `hidden` attribute must win, so the
   form's flex layout lives here (an inline `display` would override [hidden]
   and leave the edit form visible in view mode). */
#profile-form { display: flex; flex-direction: column; gap: 20px; }
#profile-form[hidden] { display: none !important; }
#pf-view[hidden] { display: none !important; }

/* ===== KYC — address blocks, masked-doc notice, video script ===== */
.kyc-lbl { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.kyc-in {
  width: 100%; border: 1px solid var(--sage); border-radius: var(--radius-md, 12px);
  padding: 10px 14px; font-size: 14px; font-family: inherit; color: var(--ink);
  background: #fff; outline: none; transition: border-color .15s;
}
.kyc-in:focus { border-color: var(--pine); }
select.kyc-in { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C968F' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
select.kyc-in:disabled { background-color: var(--sage); color: var(--muted); cursor: not-allowed; }

.kyc-addr-block { border: 1px solid var(--sage); border-radius: 16px; padding: 16px 18px; background: var(--cream); }
.kyc-addr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kyc-addr-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.kyc-addr-head .kyc-addr-title { margin-bottom: 14px; }
.kyc-addr-badge { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0; }
.kyc-addr-badge--perm { background: linear-gradient(135deg, var(--pine-light), var(--pine)); }
.kyc-addr-badge--temp { background: linear-gradient(135deg, #f6a06a, var(--coral)); }
.kyc-same { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--pine-dark); cursor: pointer; margin-bottom: 14px; }
.kyc-same input { width: 15px; height: 15px; accent-color: var(--pine); cursor: pointer; }

.kyc-mask-note {
  display: flex; gap: 13px; align-items: flex-start;
  background: #fff8ec; border: 1px solid #f0d9a8; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 22px;
}
.kyc-mask-note__ico { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: #f6a623; color: #fff; font-size: 15px; }
.kyc-mask-note strong { display: block; font-size: 13.5px; color: #8a5a00; margin-bottom: 3px; }
.kyc-mask-note span { font-size: 12.5px; color: #7a6a4a; line-height: 1.5; }
.kyc-mask-note b { color: #8a5a00; }
.kyc-mask-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #b26a00; background: #fff4e0; padding: 2px 8px; border-radius: 999px; }

.kyc-script {
  border: 1px dashed var(--pine); border-radius: 14px; padding: 14px 16px;
  background: rgba(0,122,122,.05); margin-bottom: 16px;
}
.kyc-script__head { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--pine-dark); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.kyc-script__text { font-size: 14.5px; line-height: 1.6; color: var(--ink); font-weight: 500; margin: 0; }
.kyc-script__text #kyc-video-script-name { font-weight: 800; color: var(--pine-dark); }

/* ===== KYC required-field validation states ===== */
.kyc-invalid { border-color: #e53935 !important; box-shadow: 0 0 0 3px rgba(229,57,53,.12); }
.kyc-upload-zone.kyc-zone-invalid { border-color: #e53935 !important; background: rgba(229,57,53,.05); animation: kycShake .3s; }
.kyc-selfie__stage.kyc-zone-invalid { border-color: #e53935 !important; box-shadow: 0 0 0 3px rgba(229,57,53,.15); animation: kycShake .3s; }
@keyframes kycShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.kyc-req-note {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 4px;
  font-size: 12px; color: var(--coral-dark, #c0492c); font-weight: 600;
}

/* ===== KYC live selfie capture ===== */
.kyc-live-tag { display:inline-flex; align-items:center; gap:6px; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:#c0392b; background:#fde7e2; padding:2px 9px; border-radius:999px; }
.kyc-live-dot { width:6px; height:6px; border-radius:50%; background:#e0503a; animation: kycPulse 1.2s infinite; }
@keyframes kycPulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.kyc-selfie { max-width: 360px; }
.kyc-selfie__stage {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 16px; overflow: hidden; background: #0f172a;
  border: 1px solid var(--sage); display: flex; align-items: center; justify-content: center;
}
.kyc-selfie__stage video, .kyc-selfie__stage img {
  width: 100%; height: 100%; object-fit: cover; display: none;
  transform: scaleX(-1);   /* mirror like a real selfie */
}
.kyc-selfie__stage.is-live video { display: block; }
.kyc-selfie__stage.is-captured img { display: block; }
.kyc-selfie__ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(255,255,255,.75); text-align: center; padding: 20px; font-size: 12.5px; }
.kyc-selfie__stage.is-live .kyc-selfie__ph, .kyc-selfie__stage.is-captured .kyc-selfie__ph { display: none; }
.kyc-selfie .kyc-video-controls { margin-top: 12px; }
