/* ========================================================
   SahiHisab Channel Partner Program (business.sahihisab.in)
   Mobile-first, 375px base. Premium B2B aesthetic.
   Brand: Deep emerald #047857 (growth/sales)
   ====================================================== */

:root {
  --bp-bg: #0a0e1a;
  --bp-bg-2: #111827;
  --bp-card: #1a2234;
  --bp-card-hover: #232c41;
  --bp-border: rgba(255, 255, 255, 0.08);
  --bp-border-strong: rgba(255, 255, 255, 0.16);

  --bp-text: #f1f5f9;
  --bp-text-2: #cbd5e1;
  --bp-text-3: #94a3b8;
  --bp-text-4: #64748b;

  --bp-brand: #0891b2;
  --bp-brand-2: #0e7490;
  --bp-brand-soft: rgba(8, 145, 178, 0.12);
  --bp-brand-line: rgba(8, 145, 178, 0.28);

  --bp-tier-l3: #0891b2;     /* Area Head — sea blue (matches brand) */
  --bp-tier-l2: #f59e0b;     /* City Head — amber */
  --bp-tier-l1: #a78bfa;     /* State Head — violet */

  --bp-success: #22c55e;
  --bp-warn: #f59e0b;
  --bp-danger: #ef4444;
  --bp-info: #3b82f6;

  --bp-radius-sm: 8px;
  --bp-radius: 12px;
  --bp-radius-lg: 16px;
  --bp-radius-xl: 24px;

  --bp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --bp-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --bp-shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);

  --bp-font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --bp-font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --bp-tap: 44px;
}

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

html, body {
  background: var(--bp-bg);
  color: var(--bp-text);
  font-family: var(--bp-font);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(8, 145, 178, 0.08), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(167, 139, 250, 0.06), transparent 50%),
    var(--bp-bg);
}

a { color: var(--bp-brand); text-decoration: none; }
a:hover { color: #22d3ee; }

button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ───── Layout ───── */
.bp-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 80px; /* leave room for bottom nav */
  position: relative;
}

@media (min-width: 920px) {
  .bp-shell {
    max-width: 1180px;
    padding-bottom: 0;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
  }
}

/* ───── Top bar (mobile) ───── */
.bp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--bp-bg) 60%, transparent);
  backdrop-filter: blur(8px);
}

.bp-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.bp-logo-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--bp-brand) 0%, var(--bp-brand-2) 100%);
  display: grid; place-items: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4);
}

.bp-logo-text {
  font-weight: 700;
}
.bp-logo-sub {
  font-size: 0.65rem;
  color: var(--bp-text-3);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: -2px;
}

.bp-icon-btn {
  width: var(--bp-tap); height: var(--bp-tap);
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--bp-text-2);
  transition: background 0.15s, color 0.15s;
}
.bp-icon-btn:hover { background: var(--bp-card); color: var(--bp-text); }
.bp-icon-btn .material-symbols-rounded { font-size: 22px; }

/* ───── Sidebar (desktop) ───── */
.bp-sidebar {
  display: none;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--bp-border);
  background: rgba(10, 14, 26, 0.6);
  flex-direction: column;
}

@media (min-width: 920px) {
  .bp-sidebar { display: flex; }
  .bp-top { display: none; }
}

.bp-sidebar .bp-logo { margin-bottom: 24px; padding: 0 8px; }

.bp-nav-section { margin-bottom: 8px; }
.bp-nav-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bp-text-4);
  padding: 12px 12px 6px;
}

.bp-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--bp-text-2);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
  width: 100%;
  text-align: left;
}
.bp-nav-item:hover { background: var(--bp-card); color: var(--bp-text); }
.bp-nav-item.active {
  background: var(--bp-brand-soft);
  color: var(--bp-brand);
}
.bp-nav-item .material-symbols-rounded { font-size: 20px; }

.bp-sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--bp-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.bp-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bp-brand) 0%, var(--bp-brand-2));
  display: grid; place-items: center;
  font-weight: 700;
  color: #fff;
  font-size: 0.85rem;
}

/* ───── Main content ───── */
.bp-main {
  padding: 0 20px 20px;
}
@media (min-width: 920px) {
  .bp-main { padding: 24px 32px; }
}

.bp-section { margin-bottom: 20px; }
.bp-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.bp-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.bp-section-link {
  font-size: 0.8rem;
  color: var(--bp-brand);
  font-weight: 500;
}

/* ───── Tier hero card ───── */
.bp-tier-hero {
  position: relative;
  border-radius: var(--bp-radius-lg);
  padding: 20px;
  background: linear-gradient(135deg, #164e63 0%, #0e7490 50%, #155e75 100%);
  border: 1px solid rgba(8, 145, 178, 0.3);
  overflow: hidden;
  box-shadow: var(--bp-shadow-lg);
}
.bp-tier-hero::before {
  content: '';
  position: absolute;
  inset: -50% -10% auto auto;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.bp-tier-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.bp-tier-greeting {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}
.bp-tier-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 2px;
  letter-spacing: -0.02em;
}
.bp-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bp-tier-badge.l3 { color: #cffafe; }
.bp-tier-badge.l2 { color: #fef3c7; }
.bp-tier-badge.l1 { color: #ede9fe; }

.bp-tier-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}
.bp-tier-stat {
  border-left: 2px solid rgba(255, 255, 255, 0.18);
  padding-left: 10px;
}
.bp-tier-stat-label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bp-tier-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ───── Promotion progress ───── */
.bp-promo-card {
  background: var(--bp-card);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-lg);
  padding: 18px;
}

.bp-promo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.bp-promo-title-wrap { flex: 1; }
.bp-promo-title {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bp-promo-title .material-symbols-rounded {
  font-size: 18px;
  color: var(--bp-tier-l2);
}
.bp-promo-sub {
  font-size: 0.78rem;
  color: var(--bp-text-3);
  margin-top: 2px;
}

.bp-promo-percent {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--bp-brand);
  min-width: 60px;
  text-align: right;
}

.bp-promo-axis {
  margin-top: 14px;
}
.bp-promo-axis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.bp-promo-axis-label {
  font-size: 0.82rem;
  color: var(--bp-text-2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bp-promo-axis-label .material-symbols-rounded {
  font-size: 14px;
  color: var(--bp-text-3);
}
.bp-promo-axis-value {
  font-size: 0.82rem;
  color: var(--bp-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bp-promo-axis-value .target {
  color: var(--bp-text-4);
  font-weight: 500;
}
.bp-promo-axis-bar {
  height: 6px;
  background: var(--bp-bg-2);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}
.bp-promo-axis-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bp-brand-2), var(--bp-brand));
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.bp-promo-axis-fill.complete {
  background: linear-gradient(90deg, var(--bp-success), #4ade80);
}

.bp-promo-action {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--bp-radius);
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.28);
  font-size: 0.82rem;
  color: #fcd34d;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bp-promo-action.eligible {
  background: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.35);
  color: #67e8f9;
}
.bp-promo-action .material-symbols-rounded { font-size: 18px; }

/* ───── Stats grid ───── */
.bp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bp-stat-card {
  background: var(--bp-card);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  padding: 14px;
  position: relative;
}
.bp-stat-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--bp-brand-soft);
  color: var(--bp-brand);
  display: grid; place-items: center;
  margin-bottom: 10px;
}
.bp-stat-icon .material-symbols-rounded { font-size: 18px; }
.bp-stat-icon.amber { background: rgba(245, 158, 11, 0.12); color: var(--bp-warn); }
.bp-stat-icon.violet { background: rgba(167, 139, 250, 0.12); color: var(--bp-tier-l1); }
.bp-stat-icon.blue { background: rgba(59, 130, 246, 0.12); color: var(--bp-info); }

.bp-stat-label {
  font-size: 0.74rem;
  color: var(--bp-text-3);
  font-weight: 500;
}
.bp-stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.bp-stat-trend {
  font-size: 0.72rem;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}
.bp-stat-trend.up { color: var(--bp-success); }
.bp-stat-trend.down { color: var(--bp-danger); }
.bp-stat-trend.flat { color: var(--bp-text-3); }

/* ───── List card ───── */
.bp-list-card {
  background: var(--bp-card);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-lg);
  overflow: hidden;
}
.bp-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bp-border);
  transition: background 0.15s;
}
.bp-list-row:last-child { border-bottom: 0; }
.bp-list-row:hover { background: var(--bp-card-hover); }

.bp-list-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #334155);
  display: grid; place-items: center;
  font-weight: 600;
  color: var(--bp-text);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.bp-list-avatar.l3 { background: linear-gradient(135deg, #0e7490, #0891b2); }
.bp-list-avatar.l2 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.bp-list-avatar.l1 { background: linear-gradient(135deg, #6d28d9, #a78bfa); }

.bp-list-body { flex: 1; min-width: 0; }
.bp-list-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-list-meta {
  font-size: 0.76rem;
  color: var(--bp-text-3);
  margin-top: 2px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.bp-list-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--bp-text-4); }

.bp-list-amount {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex-shrink: 0;
}
.bp-list-amount-sub {
  font-size: 0.7rem;
  color: var(--bp-text-3);
  font-weight: 500;
  margin-top: 1px;
}

/* ───── Status pill ───── */
.bp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bp-pill.paid { background: rgba(34, 197, 94, 0.15); color: #6ee7b7; }
.bp-pill.pending { background: rgba(245, 158, 11, 0.15); color: #fcd34d; }
.bp-pill.held { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.bp-pill.released { background: rgba(8, 145, 178, 0.18); color: #67e8f9; }
.bp-pill.clawed { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

/* ───── Action bar (referral link) ───── */
.bp-action-bar {
  background: var(--bp-card);
  border: 1px solid var(--bp-border-strong);
  border-radius: var(--bp-radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bp-action-bar-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--bp-brand-soft);
  color: var(--bp-brand);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.bp-action-bar-body { flex: 1; min-width: 0; }
.bp-action-bar-label {
  font-size: 0.7rem;
  color: var(--bp-text-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bp-action-bar-text {
  font-size: 0.85rem;
  color: var(--bp-text);
  font-weight: 600;
  font-family: var(--bp-font-mono);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-action-bar-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bp-brand);
  color: #fff;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.bp-action-bar-btn:hover { background: #22d3ee; }
.bp-action-bar-btn:active { transform: scale(0.95); }

/* ───── Buttons ───── */
.bp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  min-height: var(--bp-tap);
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
  white-space: nowrap;
}
.bp-btn-primary {
  background: linear-gradient(135deg, var(--bp-brand) 0%, var(--bp-brand-2) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.25);
}
.bp-btn-primary:hover { box-shadow: 0 6px 16px rgba(8, 145, 178, 0.35); }
.bp-btn-primary:active { transform: translateY(1px); }

.bp-btn-secondary {
  background: var(--bp-card);
  color: var(--bp-text);
  border: 1px solid var(--bp-border-strong);
}
.bp-btn-secondary:hover { background: var(--bp-card-hover); border-color: var(--bp-text-4); }

.bp-btn-ghost {
  background: transparent;
  color: var(--bp-text-2);
}
.bp-btn-ghost:hover { color: var(--bp-text); background: var(--bp-card); }

.bp-btn-block { width: 100%; }
.bp-btn .material-symbols-rounded { font-size: 18px; }

/* ───── Bottom nav (mobile) ───── */
.bp-bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--bp-border);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 100;
}
@media (min-width: 920px) {
  .bp-bottom-nav { display: none; }
}
.bp-bottom-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 10px;
  color: var(--bp-text-3);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s;
}
.bp-bottom-tab.active { color: var(--bp-brand); }
.bp-bottom-tab .material-symbols-rounded { font-size: 22px; }

/* ───── Login screen ───── */
.bp-auth-shell {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 32px;
}
.bp-auth-brand {
  margin-top: 24px;
  margin-bottom: 32px;
}
.bp-auth-brand-mark {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--bp-brand) 0%, var(--bp-brand-2) 100%);
  display: grid; place-items: center;
  font-weight: 800;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.35);
  margin-bottom: 16px;
}
.bp-auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.bp-auth-sub {
  font-size: 0.92rem;
  color: var(--bp-text-3);
  margin-top: 8px;
  line-height: 1.5;
}

.bp-form-group { margin-bottom: 16px; }
.bp-form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bp-text-2);
  margin-bottom: 6px;
  display: block;
}
.bp-form-input {
  width: 100%;
  background: var(--bp-card);
  border: 1px solid var(--bp-border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--bp-text);
  min-height: var(--bp-tap);
  transition: border-color 0.15s, background 0.15s;
}
.bp-form-input:focus {
  outline: none;
  border-color: var(--bp-brand);
  background: var(--bp-card-hover);
}
.bp-form-input::placeholder { color: var(--bp-text-4); }

.bp-form-hint {
  font-size: 0.76rem;
  color: var(--bp-text-3);
  margin-top: 6px;
}

.bp-auth-foot {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--bp-text-3);
}

/* ───── Misc ───── */
.bp-divider {
  height: 1px;
  background: var(--bp-border);
  margin: 16px 0;
}

.bp-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--bp-text-3);
  font-size: 0.88rem;
}

.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
