/* ==========================================================================
   Cash App Blessing - Premium Fintech & Digital Wallet Design System
   Color Palette:
   • Primary Green:   #00D632
   • Dark Green:      #008A22
   • White:           #FFFFFF
   • Light Green Tint:#F0FFF4
   • Light Surface:   #F7FBF8
   • Dark Text:       #17251B
   • Secondary Text:  #647067
   • Subtle Borders:  #E3EBE4
   ========================================================================== */

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

:root {
  --primary-green: #00D632;
  --primary-hover: #00BF2C;
  --dark-green: #008A22;
  --dark-green-deep: #006318;
  --light-green: #F0FFF4;
  --light-green-subtle: #F7FBF8;
  --white: #FFFFFF;
  --dark-text: #17251B;
  --secondary-text: #647067;
  --muted-text: #8E9B91;
  --border-light: #E3EBE4;
  --border-focus: #00D632;
  
  --danger: #E53935;
  --danger-light: #FDE8E8;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --info: #0284C7;
  --info-light: #E0F2FE;

  --shadow-sm: 0 1px 2px rgba(23, 37, 27, 0.04);
  --shadow-md: 0 4px 12px rgba(23, 37, 27, 0.06);
  --shadow-lg: 0 10px 25px -3px rgba(23, 37, 27, 0.08), 0 4px 6px -2px rgba(23, 37, 27, 0.03);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-main);
  background-color: var(--white);
  color: var(--dark-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #FAFCFA;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img, svg {
  vertical-align: middle;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--dark-text);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

p {
  color: var(--secondary-text);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 800px;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.text-dark { color: var(--dark-text); }
.text-secondary { color: var(--secondary-text); }
.text-green { color: var(--dark-green); }
.text-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }

/* ==========================================================================
   Cash App Blessing Brand Icon & Logo
   ========================================================================== */
.dl-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--dark-text);
  letter-spacing: -0.03em;
  user-select: none;
}

.dl-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  font-size: 1.3rem;
  box-shadow: 0 3px 10px rgba(0, 214, 50, 0.35);
  transition: var(--transition);
}

.dl-logo:hover .dl-logo-icon {
  transform: scale(1.05);
}

.dl-logo span.highlight {
  color: var(--dark-green);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-green);
  color: var(--dark-text);
  border-color: var(--primary-green);
  box-shadow: 0 4px 14px rgba(0, 214, 50, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 214, 50, 0.4);
}

.btn-dark {
  background-color: var(--dark-green);
  color: var(--white);
  border-color: var(--dark-green);
}

.btn-dark:hover {
  background-color: var(--dark-green-deep);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: var(--white);
  color: var(--dark-text);
  border-color: var(--border-light);
}

.btn-outline:hover {
  border-color: var(--primary-green);
  background-color: var(--light-green);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Badges & Status Tags
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success, .status-approved, .status-completed, .status-verified, .status-eligible {
  background-color: var(--light-green);
  color: var(--dark-green);
  border: 1px solid rgba(0, 138, 34, 0.2);
}

.badge-warning, .status-review, .status-pending, .status-withdrawal-pending, .status-processing {
  background-color: var(--warning-light);
  color: #B45309;
  border: 1px solid rgba(180, 83, 9, 0.2);
}

.badge-danger, .status-failed, .status-rejected, .status-suspended {
  background-color: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(229, 57, 53, 0.2);
}

.badge-info, .status-entered {
  background-color: var(--info-light);
  color: var(--info);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge-neutral, .status-not-entered {
  background-color: #F3F4F6;
  color: #4B5563;
  border: 1px solid #E5E7EB;
}

/* ==========================================================================
   Cards & Layout Components
   ========================================================================== */
.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-light {
  background-color: var(--light-green-subtle);
  border-color: rgba(0, 214, 50, 0.18);
}

/* ==========================================================================
   Public Navigation & Announcement Bar
   ========================================================================== */
.promo-bar {
  background: linear-gradient(90deg, #008A22 0%, #00D632 100%);
  color: var(--white);
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 50;
}

.promo-bar a {
  color: var(--white);
  text-decoration: underline;
  margin-left: 0.5rem;
}

.public-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

/* Prevent content hiding under sticky header + promo bar (~116px combined) */
.public-page-body {
  padding-top: 0; /* sections handle their own top padding */
}

/* Ensure first section clears the sticky header on scroll-linked anchors */
:target {
  scroll-margin-top: 120px;
}

.public-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.public-nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.public-nav-links a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--secondary-text);
}

.public-nav-links a:hover, .public-nav-links a.active {
  color: var(--dark-green);
}

.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1.1rem;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  color: var(--dark-text);
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(0, 214, 50, 0.15);
}

.form-text {
  font-size: 0.8125rem;
  color: var(--secondary-text);
  margin-top: 0.35rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

/* ==========================================================================
   Flash Alerts
   ========================================================================== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background-color: var(--light-green);
  border: 1px solid rgba(0, 138, 34, 0.25);
  color: var(--dark-green-deep);
}

.alert-danger {
  background-color: var(--danger-light);
  border: 1px solid rgba(229, 57, 53, 0.25);
  color: #991B1B;
}

.alert-warning {
  background-color: var(--warning-light);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #92400E;
}

.alert-info {
  background-color: var(--info-light);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #075985;
}

/* ==========================================================================
   Table Styles
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--white);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table th {
  background: #F8FAF8;
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  color: var(--secondary-text);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--dark-text);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: #FBFDFB;
}

/* ==========================================================================
   User Dashboard & Digital Wallet Layout
   ========================================================================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  width: 270px;
  background: var(--white);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-nav {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-md);
  color: var(--secondary-text);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: var(--transition);
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.sidebar-link:hover {
  background-color: var(--light-green);
  color: var(--dark-green);
}

.sidebar-link.active {
  background-color: var(--light-green);
  color: var(--dark-green);
  font-weight: 700;
}

.sidebar-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #FAFCFA;
}

.dashboard-topbar {
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.dashboard-content {
  padding: 2rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   Prominent $5,000 Reward Card
   ========================================================================== */
.reward-card {
  background: var(--white);
  border: 2px solid var(--primary-green);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: 0 8px 30px rgba(0, 214, 50, 0.12);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.reward-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(0, 214, 50, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.reward-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--light-green);
  color: var(--dark-green);
  font-size: 0.8125rem;
  font-weight: 800;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.reward-amount-display {
  font-size: clamp(1.75rem, 6vw, 3.25rem);
  font-weight: 800;
  color: var(--dark-text);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.reward-amount-display span.currency {
  font-size: clamp(1.1rem, 3.5vw, 1.75rem);
  color: var(--dark-green);
  margin-right: 0.25rem;
}

.reward-desc {
  color: var(--secondary-text);
  font-size: 0.95rem;
  max-width: 620px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.reward-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(23, 37, 27, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

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

.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-light);
  animation: modalFadeIn 0.25s ease-out;
}

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

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

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-light);
  background: #F8FAF8;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

/* ==========================================================================
   Mobile Bottom Navigation
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--white);
  border-top: 1px solid var(--border-light);
  z-index: 40;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-items {
  display: flex;
  height: 100%;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--secondary-text);
  padding: 0.35rem 0.5rem;
}

.mobile-nav-item svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-item.active {
  color: var(--dark-green);
  font-weight: 700;
}

/* ==========================================================================
   Header Overlap Prevention
   ========================================================================== */
/* On mobile the promo bar + sticky nav total ~110px; push body anchor targets below */
@media (max-width: 900px) {
  :target { scroll-margin-top: 110px; }

  /* Hero section: reduce top padding so CTA button stays above fold */
  .hero-section {
    padding-top: 3rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Tighten all public sections on mobile */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Reduce card padding on mobile for more breathing room */
  .card { padding: 1.15rem !important; }
}

/* ==========================================================================
   Mobile-First Responsive System
   ========================================================================== */

/* ---- Global mobile safety ---- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ---- Fluid Typography ---- */
body {
  font-size: clamp(14px, 3.5vw, 16px);
}

h1 { font-size: clamp(1.5rem, 5vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
h3 { font-size: clamp(1.05rem, 3.5vw, 1.35rem); }
h4 { font-size: clamp(0.95rem, 3vw, 1.1rem); }
p  { font-size: clamp(0.875rem, 2.5vw, 1rem); }

/* ---- Touch targets: minimum 44×44px ---- */
.btn,
.mobile-nav-item,
.cab-icon-btn,
.cab-avatar-btn,
.cab-tile {
  min-height: 44px;
}

.btn-sm { min-height: 36px; }

/* ---- Form controls: 16px prevents iOS auto-zoom ---- */
.form-control,
.wd-input,
.pin-digit {
  font-size: max(16px, 1rem);
}

/* ---- Safe area insets (notched phones) ---- */
.mobile-bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(64px + env(safe-area-inset-bottom, 0px));
}

body.with-mobile-nav {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

/* ---- Dashboard content responsive padding ---- */
.dashboard-content {
  padding: clamp(1rem, 4vw, 2rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ---- Prevent card overflow on small screens ---- */
.card {
  overflow: hidden;
  word-break: break-word;
}

/* ---- Reward card fluid amount ---- */
.reward-amount-display {
  font-size: clamp(2rem, 8vw, 3.25rem);
}

/* ---- Responsive grid helpers ---- */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

/* ---- Prevent horizontal scroll on tables ---- */
.table-responsive {
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Breakpoint: ≤ 900px (Tablet / Large Mobile)
   ========================================================================== */
@media (max-width: 900px) {
  .dashboard-sidebar { display: none; }
  .mobile-bottom-nav { display: block; }
  .public-nav-links  { display: none; }

  .dashboard-content {
    padding: 1.25rem 1rem;
  }
}

/* ==========================================================================
   Breakpoint: ≤ 768px (Mobile)
   ========================================================================== */
@media (max-width: 768px) {
  /* Pull dashboard content flush on mobile */
  .dashboard-content {
    padding: 1rem 0.875rem;
  }

  /* Make modal full-screen on mobile */
  .modal-box {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }

  /* Stack form rows vertically */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Compact cards on mobile */
  .card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  /* Reduce reward badge text */
  .reward-badge-tag { font-size: 0.75rem; }

  /* Stack nav actions */
  .public-nav-actions {
    gap: 0.5rem;
  }

  /* Smaller button text on mobile */
  .btn { font-size: 0.875rem; padding: 0.65rem 1.1rem; }
  .btn-sm { font-size: 0.78rem; padding: 0.45rem 0.85rem; }
  .btn-lg { font-size: 0.9375rem; padding: 0.8rem 1.5rem; }
}

/* ==========================================================================
   Breakpoint: ≤ 480px (Small Mobile)
   ========================================================================== */
@media (max-width: 480px) {
  .dashboard-content {
    padding: 0.875rem 0.75rem;
  }

  /* Full-width action buttons */
  .reward-actions {
    flex-direction: column;
    width: 100%;
  }

  .reward-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Cab action row: full width pills */
  .cab-action-row {
    gap: 0.6rem;
  }

  /* Cab tile grid: 2 columns on tiny screens */
  .cab-tile-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Reduce balance card font */
  .cab-balance-amount {
    font-size: clamp(1.75rem, 8vw, 2.75rem);
  }
}

/* ==========================================================================
   Breakpoint: ≤ 360px (Very Small — Galaxy S series etc)
   ========================================================================== */
@media (max-width: 360px) {
  body { font-size: 13px; }

  .dashboard-content {
    padding: 0.75rem 0.625rem;
  }

  .card { padding: 1rem; }

  .btn { font-size: 0.8125rem; padding: 0.6rem 0.9rem; }

  .cab-balance-amount { font-size: 1.6rem; }

  .cab-tile-label { font-size: 0.68rem; }
}

/* ==========================================================================
   Flexible Large Balance & Layout Overflow Protection Utilities
   ========================================================================== */
.auto-fit-balance {
  font-variant-numeric: tabular-nums;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.balance-card-container {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.balance-text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

