/* ==========================================================================
   SnapProfit — Dashboard styles
   Design system matches the login/auth screen:
   deep purple/indigo brand gradient, soft lavender neutrals,
   Plus Jakarta Sans, pill buttons, rounded "glass" cards.
   ========================================================================== */

:root {
  /* ---- Brand tokens (from the auth screen) ---- */
  --ink: #17171f;
  --ink-soft: #6b6b78;
  --purple: #16A34A;
  --purple-dark: #0F7A38;
  --purple-tint: #ECFDF3;
  --blue: #22C55E;
  --line: #e7ede9;

  /* ---- Dashboard-specific extensions ---- */
  --db-bg: #F5FAF7;
  --db-ink: #17171f;
  --db-sidebar-from: #0F3D2A;
  --db-sidebar-via: #155239;
  --db-sidebar-to: #16A34A;
  --earn: #1fa971;
  --earn-tint: #e7f8f1;
  --warn: #c9821a;
  --warn-tint: #fbf1de;
  --danger: #e0483f;
  --danger-tint: #fceceb;
  --text-muted: #8b8b96;
  --card-shadow: 0 2px 10px rgba(23, 23, 31, 0.04), 0 10px 30px rgba(23, 23, 31, 0.05);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--db-ink);
  background: var(--db-bg);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* Body scroll lock while the mobile drawer is open */
body.drawer-open { overflow: hidden; }

/* ==========================================================================
   Layout shell
   ========================================================================== */

.app-container {
  display: flex;
  min-height: 100vh;
}

.bank-combobox {
  position: relative;
}

.bank-search-input {
  width: 100%;
  font-size: 16px; /* keeps iOS from auto-zooming on focus */
}

.bank-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  z-index: 50;
}

.bank-dropdown-list li {
  padding: 10px 14px;
  font-size: 14.5px;
  cursor: pointer;
}

.bank-dropdown-list li:hover,
.bank-dropdown-list li.is-active {
  background: #f5f3ff;
}

.bank-dropdown-list .no-results {
  padding: 10px 14px;
  color: var(--text-muted, #888);
  font-size: 13.5px;
  cursor: default;
}


.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
.withdraw-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px 8px 8px;
}
.withdraw-success svg {
  width: 48px;
  height: 48px;
  color: var(--earn, #16a34a);
}

/* Smaller screens: bigger touch targets, dropdown pinned closer to viewport width */
@media (max-width: 480px) {
  .bank-dropdown-list {
    max-height: 45vh;
  }

  .bank-dropdown-list li {
    padding: 12px 14px;
    font-size: 15px;
  }
}

.sidebar-left {
  flex: 0 0 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0 22px;
  background: linear-gradient(180deg, var(--db-sidebar-from) 0%, var(--db-sidebar-via) 55%, var(--db-sidebar-to) 100%);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-left .brand-indicator {
  width: 28px;
  height: 5px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  margin-bottom: 34px;
}

.nav-icons-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.side-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  transition: background 0.15s ease, color 0.15s ease;
}
.side-icon svg { width: 20px; height: 20px; }
.side-icon:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.side-icon.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sidebar-footer .view-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}
.currency-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 4px;
  writing-mode: vertical-rl;
}

.main-viewport {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 100px;
}

/* ==========================================================================
   Top header
   ========================================================================== */

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.avatar-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  flex-shrink: 0;
}
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  color: var(--purple-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.welcome-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.user-handle {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.circle-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.circle-icon-btn svg { width: 19px; height: 19px; }
.circle-icon-btn:hover { border-color: var(--purple); color: var(--purple); }

/* ---- Hamburger trigger: hidden on desktop, shown once the icon
   sidebar disappears, so there's always a way to reach account
   actions (logout / forgot password) regardless of screen size. ---- */
.hamburger-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
}
.hamburger-btn svg { width: 20px; height: 20px; }
.hamburger-btn:hover { border-color: var(--purple); color: var(--purple); }

/* ==========================================================================
   Grid
   ========================================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
  align-items: start;
}

.grid-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.balance-card {
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  background: linear-gradient(150deg, #0f3d2a 0%, #16532f 65%, var(--purple) 130%);
  color: #fff;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% -10%, rgba(255, 255, 255, 0.18), transparent 55%);
  pointer-events: none;
}
.balance-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}
.balance-amount {
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.balance-sub {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #b9f3d6;
}

.white-glass-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--card-shadow);
}

.card-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.white-glass-card h2,
.white-glass-card h3 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.3px;
}

.stat-row-light {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.stat-row-light > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-num {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  color: var(--db-ink);
}
.stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.earnings-split-card { padding-bottom: 24px; }

/* Plan / upgrade banner */
.gradient-banner-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: linear-gradient(120deg, var(--purple-tint), #eaf8ee);
  border: 1px solid #d7f0de;
}
.banner-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.15);
}
.banner-avatar svg { width: 20px; height: 20px; }
.banner-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.banner-type {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.banner-value {
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 600;
}
.banner-upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 9px 14px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.05s ease;
}
.banner-upgrade-btn:hover { background: var(--purple-dark); }
.banner-upgrade-btn:active { transform: scale(0.97); }
.banner-upgrade-btn svg { width: 14px; height: 14px; }

/* Backward-compatible alias if the icon-only markup is still in use */
.banner-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.banner-arrow-btn:hover { background: var(--purple-dark); }
.banner-arrow-btn svg { width: 16px; height: 16px; }

/* ==========================================================================
   Tasks
   ========================================================================== */

.tasks-card h2 { margin-bottom: 16px; }

.task-rows-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-glass-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #faf9fd;
  border: 1.5px solid var(--line);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}
.task-glass-row:hover {
  border-color: var(--purple);
  background: #fff;
}
.task-glass-row:active { transform: scale(0.995); }
.task-glass-row[data-locked="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.task-icon-squircle {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--purple-tint);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.task-icon-squircle svg { width: 18px; height: 18px; }

.task-info { flex: 1; min-width: 0; }
.task-row-title {
  margin: 0 0 3px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.task-row-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.task-row-amount {
  font-size: 14px;
  font-weight: 800;
  color: var(--earn);
}

.task-status-pill-light {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: capitalize;
}
.status-pending, .status-in_review, .status-in-review {
  background: var(--warn-tint);
  color: var(--warn);
}
.status-approved, .status-completed, .status-success {
  background: var(--earn-tint);
  color: var(--earn);
}
.status-rejected, .status-failed {
  background: var(--danger-tint);
  color: var(--danger);
}
.status-open {
  background: var(--purple-tint);
  color: var(--purple);
}

.empty-msg {
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  padding: 24px 0;
  margin: 0;
}

/* ==========================================================================
   Recent activity
   ========================================================================== */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.activity-row:last-child { border-bottom: none; }
.activity-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.activity-date {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.activity-amount {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}

/* ==========================================================================
   Buttons (shared with auth screen)
   ========================================================================== */

.btn-purple-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: var(--purple);
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}
.btn-purple-pill:hover { background: var(--purple-dark); }
.btn-purple-pill:active { transform: scale(0.99); }
.btn-purple-pill.full-width { width: 100%; }
.btn-purple-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Floating dock (mobile bottom nav)
   ========================================================================== */

.floating-dock {
  display: none;
}

@media (max-width: 860px) {
  .floating-dock {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 10px 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(23, 23, 31, 0.12);
    z-index: 40;
  }
  .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
  }
  .dock-icon svg { width: 20px; height: 20px; }
  .dock-item.active {
    color: var(--purple);
    background: var(--purple-tint);
  }
}

/* ==========================================================================
   Mobile drawer (hamburger menu: nav + account actions)
   ========================================================================== */

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 22, 0.5);
  z-index: 110;
}
.drawer-overlay.open { display: block; }

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(300px, 82vw);
  background: #fff;
  box-shadow: -12px 0 40px rgba(23, 23, 31, 0.2);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
}
.drawer-overlay.open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-head .avatar-ring { width: 44px; height: 44px; }
.drawer-head .drawer-user-name {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
}
.drawer-head .drawer-user-handle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.drawer-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--purple-tint);
  color: var(--purple-dark);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drawer-close:hover { background: #d7f0de; }

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 10px 10px;
  gap: 2px;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.drawer-link svg { width: 18px; height: 18px; color: var(--ink-soft); flex-shrink: 0; }
.drawer-link:hover { background: var(--purple-tint); }
.drawer-link.active { background: var(--purple-tint); color: var(--purple-dark); }
.drawer-link.active svg { color: var(--purple); }

.drawer-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 14px 4px;
}

.drawer-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 10px;
}

.drawer-link.danger { color: var(--danger); }
.drawer-link.danger svg { color: var(--danger); }
.drawer-link.danger:hover { background: var(--danger-tint); }

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 22, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay.open { display: flex; }

.modal {
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 26px 26px 28px;
  box-shadow: 0 20px 60px rgba(23, 23, 31, 0.25);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--purple-tint);
  color: var(--purple-dark);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: #d7f0de; }

.task-modal-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  background: var(--purple-tint);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 12px;
}
.task-modal-brief {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 16px;
}
.task-modal-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--earn-tint);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  color: #157a53;
}
.task-modal-amount .n {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  color: var(--earn);
}

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-md);
  padding: 26px 16px;
  text-align: center;
  background: #faf9fd;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--purple);
  background: var(--purple-tint);
}
.dropzone .up-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: #fff;
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(23,23,31,0.08);
}
.dropzone .up-icon svg { width: 18px; height: 18px; }
.dropzone h4 {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.dropzone p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.file-preview-grid:empty { display: none; }
.file-preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.upload-error {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--danger);
  background: var(--danger-tint);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
}
.upload-error.show { display: flex; }
.upload-error svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Upgrade modal */
.warning-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--warn-tint);
  color: #7a5410;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.warning-banner svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--warn); }

.plan-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.plan-pick-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-pick-card input { accent-color: var(--purple); }
.plan-pick-card.is-checked {
  border-color: var(--purple);
  background: var(--purple-tint);
}
.plan-pick-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.plan-pick-price {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--purple-dark);
}

.upgrade-ack {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 16px;
  cursor: pointer;
}
.upgrade-ack input {
  margin-top: 2px;
  accent-color: var(--purple);
}

.pay-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.pay-summary-amount {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

/* ==========================================================================
   Form fields (withdrawal modal, etc.)
   ========================================================================== */

.field { margin-bottom: 16px; text-align: left; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 7px;
}
.field input,
.field select {
  width: 100%;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: #faf9fd;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field input::placeholder { color: #b3b3bd; }
.field input:focus,
.field select:focus {
  border-color: var(--purple);
  background: #fff;
}
.field input[readonly] {
  color: var(--text-muted);
  cursor: not-allowed;
}

.field.has-max { position: relative; }
.field.has-max .max-btn {
  position: absolute;
  right: 14px;
  top: 37px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--purple);
  background: var(--purple-tint);
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.helper-text {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 12px 0 0;
}

.sub {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sidebar-left { display: none; }
  .hamburger-btn { display: flex; }
  .main-viewport { padding: 24px 16px 110px; }
  .balance-amount { font-size: 32px; }
  .field-row { grid-template-columns: 1fr; }
}

/* Narrow phones: let the greeting truncate instead of colliding with
   the notification bell + hamburger, and keep everything on one row. */
@media (max-width: 400px) {
  .welcome-title { font-size: 16px; }
  .user-handle { max-width: 130px; }
  .top-actions { gap: 8px; }
}

/* ==========================================================================
   Redesign layer: hero balance, zone grouping, payout hierarchy,
   modal stakes, empty-state personality
   ========================================================================== */

/* ---- Balance card: hero treatment ---- */
.balance-card {
  padding: 34px 30px 30px;
}
.balance-amount {
  font-size: 44px;
  line-height: 1.05;
}
.balance-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
}
.balance-sub::before {
  content: '▲';
  font-size: 8px;
  color: #6ee7a8;
}

/* ---- Left column zone grouping ---- */
.db-zone {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.db-zone + .db-zone {
  margin-top: 4px;
  padding-top: 26px;
  position: relative;
}
.db-zone + .db-zone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 4px;
  right: 4px;
  height: 1px;
  background: var(--line);
}
.db-zone-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 2px;
  margin: 0 0 -6px;
}

/* ---- Task row: payout gets visual priority over title ---- */
.task-row-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.task-row-amount {
  font-size: 15.5px;
  font-weight: 800;
  background: var(--earn-tint);
  border-radius: 999px;
  padding: 5px 12px;
  display: inline-block;
}

/* ---- Earnings breakdown: normalize density against task/activity rows ---- */
.earnings-split-card .stat-row-light {
  gap: 20px 30px;
}
.earnings-split-card .stat-row-light + .stat-row-light {
  margin-top: 16px !important;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---- Modal stakes: withdrawal feels heavier than task detail ---- */
.modal--stakes-high {
  border-top: 4px solid var(--purple-dark);
}
.modal--stakes-high .modal-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal--stakes-high .modal-head h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
}
.modal--stakes-low .modal-head h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--earn);
  flex-shrink: 0;
}
.modal--stakes-low .modal-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Empty states with personality ---- */
.empty-msg {
  padding: 32px 0 28px;
}
.empty-msg::before {
  content: attr(data-icon);
  display: block;
  font-size: 26px;
  margin-bottom: 8px;
  opacity: 0.7;
}

/* ---- Status pills: slightly stronger color signal ---- */
.task-status-pill-light {
  font-weight: 800;
  letter-spacing: 0.01em;
}