
.profile-cover {
  height: 240px;
  background: radial-gradient(60% 90% at 85% 0%, rgba(16, 185, 129, .3), transparent 65%), linear-gradient(135deg, #04130d 0%, #073a28 55%, #05080a 100%);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
  position: relative;
  overflow: hidden;
  transition: height var(--transition-base);
}

@media (max-width: 768px) {
  .profile-cover { height: 160px; }
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.profile-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 36, 96, 0.2), rgba(15, 36, 96, 0.6));
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--space-6) var(--space-6);
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: var(--font-weight-bold);
  border: 6px solid var(--bg-card);
  margin-bottom: var(--space-4);
  position: relative;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.profile-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.5);
}

.profile-avatar::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: var(--radius-pill);
  border: 2px dashed rgba(16, 185, 129, 0.3);
  animation: spin 10s linear infinite;
}

.profile-info { flex: 1; padding-bottom: var(--space-2); }

.profile-name {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: var(--line-height-tight);
}

[data-theme="dark"] .profile-name { color: #fff; }

.profile-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.profile-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin: 2px;
}

.profile-hero-stats {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  text-align: center;
}

.profile-hero-balance-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  margin-bottom: var(--space-1);
}

.profile-hero-balance-value {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
    FORM SECTIONS
    ============================================================ */
.form-section {
  margin-bottom: var(--space-6);
}

.form-section-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
  max-width: 640px;
}

/* ============================================================
    TRANSACTION HISTORY
    ============================================================ */
.txn-filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.filter-select {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-family: var(--font-family-base);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition-fast);
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.txn-search {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  position: relative;
}

.txn-search .form-control {
  padding-left: var(--space-9);
}

.txn-search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  justify-content: center;
  margin-top: var(--space-5);
}

.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
  font-family: var(--font-family-base);
  font-variant-numeric: tabular-nums;
}

.page-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
    REFERRAL PAGE
    ============================================================ */
.referral-link-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.referral-link-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  margin-bottom: var(--space-2);
}

.referral-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.referral-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.referral-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.referral-stat-value {
  font-size: var(--font-size-financial);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  line-height: 1.1;
  margin-bottom: var(--space-1);
}

.referral-stat-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
}

/* Commission tiers */
.tier-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-color);
}

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

.tier-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  flex-shrink: 0;
}

.tier-1 { background: var(--color-primary-light); color: var(--color-primary); }
.tier-2 { background: var(--color-success-light); color: var(--color-success); }
.tier-3 { background: var(--color-warning-light); color: var(--color-warning); }

.status-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.status-label i {
  font-size: 16px;
  color: var(--color-primary);
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-5) 0;
}

/* Security Score Card */
.security-score-card {
  padding: var(--space-6);
}

.security-score-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.security-score-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.security-score-val {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-success);
}

.security-progress-wrap {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-6);
  overflow: hidden;
}

.security-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-success));
  border-radius: var(--radius-pill);
  transition: width 1s ease-out;
}

/* Horizontal Stat Bar */
.stat-bar-horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
  border: 1px solid var(--border-color);
  gap: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

@media (max-width: 768px) {
  .stat-bar-horizontal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: var(--space-4);
  }
  .stat-bar-item:last-child {
    grid-column: span 2;
    justify-content: center;
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-3);
    margin-top: var(--space-1);
  }
}

@media (max-width: 480px) {
  .stat-bar-horizontal {
    grid-template-columns: 1fr;
  }
  .stat-bar-item:last-child {
    grid-column: span 1;
  }
}

.stat-bar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.stat-bar-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--bg-card);
  color: var(--color-primary);
  border: 1px solid var(--border-color);
}

.stat-bar-info {
  display: flex;
  flex-direction: column;
}

.stat-bar-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-weight: var(--font-weight-bold);
}

.stat-bar-value {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

/* ============================================================
    FILEPOND CUSTOMIZATION
    ============================================================ */
.filepond--root {
  font-family: inherit;
  margin-bottom: 0;
}

.filepond--credits {
  display: none !important;
}


/* Circular Profile Upload */
.profile-avatar-container {
  width: 110px;
  height: 110px;
  position: relative;
  margin-bottom: var(--space-4);
  border: 6px solid var(--bg-card);
  border-radius: var(--radius-pill);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.profile-avatar-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.profile-avatar-pond {
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}

.profile-avatar-pond .filepond--panel-root {
  background-color: var(--bg-secondary) !important;
  border: 2px dashed var(--color-primary-light) !important;
}

.profile-avatar-pond .filepond--drop-label {
  color: var(--color-primary);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.profile-avatar-pond .filepond--label-action {
  text-decoration: none;
}

.pond-upload-icon {
  font-size: 1.5rem;
  margin-bottom: -5px;
}

.pond-upload-text {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* General Upload Box */
.pond-upload-box {
  text-align: center;
  padding: var(--space-4);
}

.pond-upload-box i {
  opacity: 0.7;
}

.pond-upload-box p {
  font-size: var(--font-size-sm);
}

.filepond--panel-root {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
}

.filepond--drop-label {
  color: var(--text-muted);
}

[data-theme="dark"] .filepond--panel-root {
  background-color: var(--bg-secondary) !important;
}

/* KYC Upload Card */
.kyc-upload-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  height: 100%;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.kyc-upload-card:hover {
  border-color: var(--color-primary);
  background: var(--bg-elevated);
}

.kyc-upload-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.kyc-upload-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.kyc-upload-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
}

.kyc-filepond-wrap {
  min-height: 160px;
}

.kyc-filepond-wrap .filepond--panel-root {
  background-color: var(--bg-input) !important;
  border: 1px dashed var(--border-color) !important;
}

.kyc-filepond-wrap .filepond--drop-label {
  height: 160px !important;
}
/* ============================================================
    DANGER ZONE
    ============================================================ */
.danger-zone-section {
  margin-top: var(--space-8);
}

.danger-zone-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  background: rgba(239, 68, 68, 0.03);
  border: 1px dashed rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
}

.danger-zone-content h6 {
  margin-bottom: var(--space-1);
  color: var(--color-danger);
}

.danger-zone-content p {
  margin-bottom: 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* ============================================================
    SETTINGS CARD (UNIFIED DESIGN)
    ============================================================ */
.settings-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  min-height: 500px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.settings-nav-header {
  width: 100%;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border-color);
  padding: 0 var(--space-4);
  overflow-x: auto;
}

.settings-nav {
  display: flex;
  flex-direction: row;
}

.settings-nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: none;
  background: none;
  white-space: nowrap;
  transition: all var(--transition-base);
  position: relative;
}

.settings-nav-link i {
  font-size: 18px;
  transition: transform var(--transition-base);
}

.settings-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.settings-nav-link.active {
  color: var(--color-primary);
  background: rgba(16, 185, 129, 0.08);
}

.settings-nav-link.active::after {
  content: '';
  position: absolute;
  left: var(--space-6);
  right: var(--space-6);
  bottom: 0;
  height: 3px;
  background: var(--color-primary);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -2px 10px var(--color-primary-light);
}

.settings-nav-link.active i {
  transform: scale(1.1);
}

.settings-content {
  flex: 1;
  padding: var(--space-10);
  background: var(--bg-card);
}

.settings-pane {
  display: none;
  animation: slideInUp 0.4s ease;
  max-width: 800px;
}

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

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

.settings-pane-header {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.settings-pane-header h5 {
  margin-bottom: var(--space-1);
  font-weight: var(--font-weight-bold);
}

.settings-pane-header p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: 0;
}

.settings-pane-footer {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* Compact Security Card */
.security-status-card.compact {
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.security-status-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
}

.security-status-desc {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 991px) {
  .settings-card {
    flex-direction: column;
    min-height: auto;
  }
  .settings-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    overflow-x: auto;
  }
  .settings-nav {
    flex-direction: row;
    padding: 0 var(--space-4);
  }
  .settings-nav-link {
    padding: var(--space-4) var(--space-5);
    white-space: nowrap;
    width: auto;
  }
  .settings-nav-link.active::after {
    left: var(--space-6);
    right: var(--space-6);
    top: auto;
    bottom: 0;
    width: auto;
    height: 2px;
    border-radius: 2px 2px 0 0;
  }
  .settings-content {
    padding: var(--space-6) var(--space-4);
  }
}

@media (max-width: 576px) {
  .danger-zone-card {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .danger-zone-card .btn {
    width: 100%;
  }
}
  
  