:root {
  --primary: #3876fa;
  --primary-gradient: linear-gradient(135deg, #326ef5 0%, #528bfa 100%);
  --header-blue: linear-gradient(180deg, #3572f4 0%, #4b88f8 100%);
  --credit-green: #1ab862;
  --credit-gradient: linear-gradient(180deg, #18b560 0%, #159f54 100%);
  --bg-page: #f5f7fa;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #8e9aab;
  --text-light: #b0bac9;
  --border-color: #ebeef5;
  --danger: #ef4444;
  --gold: #f59e0b;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #0f172a;
  color: var(--text-main);
  line-height: 1.4;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* App Container (Phone Frame Simulation on Desktop, Fullscreen on Mobile) */
.app-viewport {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: var(--bg-page);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  overflow-x: hidden;
}

/* Header Bars */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  min-height: 52px;
}

.header-bar.header-blue {
  background: var(--header-blue);
  color: #ffffff;
  border-bottom: none;
}

.header-bar.header-green {
  background: #1cb561;
  color: #ffffff;
  border-bottom: none;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  min-width: 40px;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  flex: 1;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  color: inherit;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.lang-selector-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* Page Screen Views */
.screen-view {
  display: none;
  flex: 1;
  padding-bottom: 74px; /* Space for bottom nav */
  animation: fadeIn 0.18s ease-in-out;
}

.screen-view.active {
  display: block;
}

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

/* HOME SCREEN STYLES */
.home-header-bg {
  background: var(--header-blue);
  padding: 0 16px 14px 16px;
  color: #ffffff;
}

.home-carousel {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #1e293b;
  aspect-ratio: 16 / 9;
  margin-top: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease-in-out;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.25s ease;
}

.carousel-dot.active {
  background: #3876fa;
  width: 22px;
  border-radius: 4px;
}

/* Brands Grid */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 24px 16px;
}

.brand-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.brand-card:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.brand-logo-wrap {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  width: 100%;
}

.brand-logo-wrap svg, .brand-logo-wrap img {
  max-height: 34px;
  max-width: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
}

.brand-status-tag {
  display: inline-block;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #059669;
  font-weight: 600;
  margin-top: 3px;
}

/* 4 Quick Actions Bar */
.quick-actions-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px 14px;
  background: #ffffff;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.action-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: transform 0.15s ease;
}

.action-item:active .action-icon-circle {
  transform: scale(0.92);
}

.action-icon-circle.orange-doc {
  background: linear-gradient(135deg, #ff9f43, #ff793f);
  color: #fff;
}

.action-icon-circle.blue-card {
  background: linear-gradient(135deg, #3876fa, #2563eb);
  color: #fff;
}

.action-icon-circle.orange-card {
  background: linear-gradient(135deg, #ff9f1a, #ee5253);
  color: #fff;
}

.action-icon-circle.green-mail {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.action-icon-circle.cyan-invite {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
}

.action-icon-circle.yellow-user {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.action-label {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  max-width: 72px;
  line-height: 1.2;
}

/* Home Personal Information Card */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  padding: 16px 16px 8px 16px;
}

.balance-card-home {
  margin: 0 16px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.balance-card-home .balance-title {
  text-align: center;
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 6px;
}

.balance-card-home .balance-value {
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.sub-earnings-row {
  display: flex;
  justify-content: space-around;
  padding-top: 14px;
  border-top: 1px dashed var(--border-color);
}

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

.earning-tag-icon {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.earning-tag-icon.orange {
  background: #f97316;
}

.earning-tag-icon.light-brown {
  background: #d97706;
}

.earning-texts {
  font-size: 12px;
  color: #4b5563;
}

.earning-texts .value {
  font-weight: 700;
  color: #111827;
  margin-left: 4px;
}

/* Dynamic Commission List */
.commission-ticker-wrapper {
  position: relative;
  margin: 6px 16px;
  height: 330px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.commission-ticker-wrapper::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 18px;
  background: linear-gradient(to bottom, var(--bg-page), transparent);
  z-index: 5;
  pointer-events: none;
}

.commission-ticker-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 18px;
  background: linear-gradient(to top, var(--bg-page), transparent);
  z-index: 5;
  pointer-events: none;
}

.commission-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.commission-item-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  flex-shrink: 0;
  animation: itemSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.comm-date {
  font-size: 13px;
  color: #374151;
  padding-right: 12px;
  border-right: 1px solid var(--border-color);
}

.comm-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 12px;
  flex: 1;
}

.comm-amount-row {
  font-size: 13px;
  color: #374151;
}

.comm-amount-row .amount-gold {
  color: #f59e0b;
  font-weight: 700;
  margin-left: 4px;
}

.comm-email {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

/* Partner Logos */
.partners-container {
  margin: 10px 16px 20px 16px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.partners-container img {
  width: 100%;
  display: block;
}

/* TASK SCREEN STYLES */
.task-header-banner {
  background: var(--header-blue);
  padding: 14px 16px 36px 16px;
  color: #fff;
}

.task-vip-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #d4a373;
  color: #432818;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.task-stats-card {
  margin: -24px 16px 16px 16px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 10;
}

.task-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 10px;
  text-align: center;
}

.task-stats-grid.three-cols {
  grid-template-columns: repeat(3, 1fr);
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 12px 0;
}

.task-stat-item .stat-title {
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 4px;
}

.task-stat-item .stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.btn-grab-orders {
  width: 100%;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 16px;
  box-shadow: 0 4px 14px rgba(56, 118, 250, 0.35);
  transition: transform 0.1s ease, filter 0.15s ease;
}

.btn-grab-orders:active {
  transform: scale(0.98);
  filter: brightness(0.95);
}

.task-note-card {
  margin: 0 16px 20px 16px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
}

.task-note-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.task-note-card p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* ORDERS SCREEN STYLES */
.orders-tabs-nav {
  display: flex;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.orders-tab-btn {
  flex: 1;
  padding: 12px 6px;
  text-align: center;
  background: none;
  border: none;
  font-size: 13px;
  color: #4b5563;
  font-weight: 500;
  cursor: pointer;
  position: relative;
}

.orders-tab-btn.active {
  color: #111827;
  font-weight: 700;
}

.orders-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #ef4444;
}

.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state-img {
  width: 140px;
  opacity: 0.8;
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 24px;
}

.btn-pill-blue {
  background: #3b82f6;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 24px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* PROFILE SCREEN STYLES */
.profile-header {
  background: var(--header-blue);
  padding: 16px 16px 40px 16px;
  color: #ffffff;
}

.profile-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  cursor: pointer;
}

.avatar-silhouette {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.profile-details {
  flex: 1;
}

.profile-details .username {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-details .phone {
  font-size: 13px;
  opacity: 0.85;
}

.vip-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  color: #78350f;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* Profile Dark Balance Card */
.profile-balance-card {
  margin: 14px 0 0 0;
  background: #192330;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prof-bal-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #e2e8f0;
}

.prof-bal-amount {
  font-size: 24px;
  font-weight: 800;
  color: #fcd34d;
}

/* Profile Quick Action Float Card */
.profile-actions-card {
  margin: -24px 16px 16px 16px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 10;
}

/* List Menu Items */
.menu-list-group {
  margin: 0 16px 20px 16px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.menu-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.1s ease;
}

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

.menu-list-item:active {
  background: #f8fafc;
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.menu-item-left svg {
  width: 20px;
  height: 20px;
  color: #6b7280;
}

.chevron-right {
  color: #9ca3af;
  font-size: 16px;
}

/* RECHARGE SCREEN STYLES */
.recharge-toggle-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.recharge-toggle-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--primary);
  background: #ffffff;
  color: var(--primary);
  cursor: pointer;
}

.recharge-toggle-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.recharge-toggle-btn.offline {
  border-color: #ef4444;
  color: #ef4444;
}

.recharge-section {
  padding: 16px;
  background: #ffffff;
  margin-bottom: 10px;
}

.recharge-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.amount-chips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.amount-chip {
  padding: 14px 6px;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.amount-chip.selected {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.amount-chip.selected::after {
  content: "✓";
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 10px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recharge-notices {
  padding: 16px;
  font-size: 12px;
  color: #ef4444;
  line-height: 1.6;
}

.btn-confirm-recharge {
  width: calc(100% - 32px);
  margin: 16px auto;
  display: block;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* CREDIT SCORE SCREEN STYLES */
.credit-score-page {
  background: #1cb561;
  min-height: calc(100vh - 74px);
  padding: 16px;
  color: #ffffff;
}

.credit-main-card {
  background: #18a657;
  border-radius: 20px;
  padding: 24px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-bottom: 16px;
}

.credit-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.credit-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #facc15;
}

.credit-card-sub {
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 20px;
}

.gauge-container {
  position: relative;
  width: 260px;
  height: 150px;
  margin: 0 auto 10px auto;
}

.gauge-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.gauge-center-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
}

.gauge-number {
  font-size: 48px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.gauge-status {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 4px;
}

.gauge-date {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
}

/* Credit Accordion */
.credit-accordion {
  background: #15934d;
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 14px;
  cursor: pointer;
}

.credit-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #fef08a;
}

.credit-accordion-content {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.95;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 10px;
}

.credit-rule-item {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.credit-rule-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* INVITATION SCREEN STYLES */
.invite-card {
  margin: 16px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.invite-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

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

.invite-field-label {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  flex: 1;
}

.invite-field-value {
  font-size: 13px;
  color: #6b7280;
  margin-right: 10px;
  font-family: monospace;
}

.btn-copy-chip {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}

.btn-copy-chip:active {
  background: #e5e7eb;
}

.qr-card-container {
  text-align: center;
  padding: 16px;
}

.qr-image-wrapper {
  width: 200px;
  height: 200px;
  margin: 14px auto;
  border: 1px solid #e5e7eb;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.qr-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* PERSONAL CENTER & SETTINGS */
.personal-field-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
}

.personal-field-label {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.personal-field-value {
  font-size: 14px;
  color: #6b7280;
}

.btn-logout-orange {
  width: calc(100% - 32px);
  margin: 30px auto;
  display: block;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

/* BOTTOM NAVIGATION BAR */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: 60px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

.nav-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.15s ease;
}

.nav-tab-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.nav-tab-btn.active {
  color: var(--primary);
  font-weight: 700;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.modal-body {
  padding: 20px 16px;
}

.lang-option-btn {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fafb;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-option-btn.active {
  background: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
}

.toast-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17, 24, 39, 0.88);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.toast-msg.show {
  opacity: 1;
}

/* Detail article page */
.article-content {
  padding: 16px;
  background: #ffffff;
  min-height: calc(100vh - 126px);
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
}

.article-content p {
  margin-bottom: 14px;
}

/* Currency & Country Indicator Badge */
.currency-pill-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.currency-pill-badge:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Mobile Money Operators Styling */
.momo-card-item {
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.momo-card-item.orange {
  background: linear-gradient(135deg, #ff7900, #e05d00);
}

.momo-card-item.mtn {
  background: linear-gradient(135deg, #ffcc00, #e5b800);
  color: #111827;
}

.momo-card-item.moov {
  background: linear-gradient(135deg, #005bac, #004080);
}

.momo-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.momo-operator-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.momo-phone-display {
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.momo-holder-name {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
}

/* Static Deposit Page Styles */
.deposit-channel-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.deposit-channel-card:hover {
  border-color: #cbd5e1;
}

.deposit-channel-card.selected {
  border-color: #2563eb;
  background: #f8faff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.deposit-channel-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.deposit-channel-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.deposit-channel-name {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
  margin-bottom: 2px;
}

.deposit-channel-account {
  font-size: 12px;
  color: #4b5563;
  margin-bottom: 2px;
}

.deposit-channel-code {
  font-size: 11px;
  font-weight: 600;
}

.deposit-channel-check {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  margin-left: 4px;
  flex-shrink: 0;
}

.deposit-channel-card.selected .deposit-channel-check {
  display: flex;
}

.deposit-admin-notice-box {
  background: #eff6ff;
  border-left: 4px solid #3876fa;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 12px;
  color: #1e40af;
  line-height: 1.5;
  margin: 14px 0;
}

/* Authentication Screen (First Page to Display) */
#screen-auth {
  display: none;
  min-height: 100vh;
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 140px, #f1f5f9 140px, #f1f5f9 100%);
  padding-bottom: 30px;
}

#screen-auth.active {
  display: block;
}

.auth-screen-container {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.auth-screen-container .auth-brand-header {
  background: transparent;
  padding: 24px 20px 20px;
}

.auth-screen-container .auth-tabs {
  background: #ffffff;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  margin: 0 14px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

.auth-screen-container .auth-card-body {
  background: #ffffff;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  margin: 0 14px;
  padding: 22px 20px 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Fallback for overlay if invoked */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 250;
  padding: 16px;
}

.auth-overlay.active {
  display: flex;
}

.auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.auth-card-body {
  padding: 20px 18px;
  overflow-y: auto;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.auth-tab-btn {
  flex: 1;
  padding: 14px;
  text-align: center;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.auth-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-input-group {
  margin-bottom: 14px;
}

.auth-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.auth-input-group input, .auth-input-group select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
  background: #ffffff;
}

.auth-input-group input:focus, .auth-input-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(56, 118, 250, 0.15);
}

.btn-auth-submit {
  width: 100%;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(56, 118, 250, 0.3);
  margin-top: 8px;
}

/* Auth Header Branding */
.auth-brand-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  padding: 20px 18px 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-brand-title {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-brand-sub {
  font-size: 11px;
  color: #bfdbfe;
  margin-top: 2px;
}

.btn-demo-login {
  width: 100%;
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
  border-radius: 8px;
  padding: 11px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-demo-login:hover {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.btn-admin-shortcut {
  width: 100%;
  background: #f8fafc;
  color: #475569;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-admin-shortcut:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0 10px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.auth-divider:not(:empty)::before {
  margin-right: .5em;
}

.auth-divider:not(:empty)::after {
  margin-left: .5em;
}

/* Floating Admin Access Button */
.admin-floating-btn {
  position: fixed;
  bottom: 74px;
  right: 16px;
  background: #111827;
  color: #fbbf24;
  border: 1px solid #374151;
  border-radius: 24px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 120;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.admin-floating-btn:active {
  transform: scale(0.94);
}

/* Admin Dashboard Modal / View */
.admin-modal-card {
  max-width: 440px;
  width: 100%;
  max-height: 94vh;
}

.admin-tabs-nav {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
}

.admin-tab-item {
  flex: 1;
  padding: 11px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border: none;
  background: none;
  cursor: pointer;
}

.admin-tab-item.active {
  background: #ffffff;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  font-weight: 700;
}

.product-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.product-picker-item {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  transition: all 0.15s ease;
  background: #fff;
}

.product-picker-item.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(56, 118, 250, 0.2);
}

.product-picker-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.product-picker-item span {
  font-size: 10px;
  font-weight: 600;
  display: block;
  margin-top: 3px;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.status-badge.pending {
  background: #fef3c7;
  color: #b45309;
}

.status-badge.approved {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.active {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.blocked {
  background: #fee2e2;
  color: #b91c1c;
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-badge.admin {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.role-badge.user {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.admin-user-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.admin-user-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.admin-user-card.is-blocked {
  border-left: 4px solid #ef4444;
  background: #fffafa;
}

.admin-user-card.is-admin {
  border-left: 4px solid #f59e0b;
}

.admin-user-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.admin-user-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 11px;
  color: #475569;
}

.admin-user-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.btn-admin-action {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-admin-action:hover {
  background: #f1f5f9;
}

.btn-admin-action.primary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.btn-admin-action.primary:hover {
  background: #dbeafe;
}

.btn-admin-action.success {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.btn-admin-action.success:hover {
  background: #d1fae5;
}

.btn-admin-action.warning {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.btn-admin-action.warning:hover {
  background: #fef3c7;
}

.btn-admin-action.danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.btn-admin-action.danger:hover {
  background: #fee2e2;
}


