:root {
  --bg-dark: #0a0e1a;
  --card-bg: #12182b;
  --card-bg-2: #151d33;
  --accent-blue: #3b82f6;
  --accent-green: #22c55e;
  --accent-purple: #a855f7;
  --accent-orange: #f59e0b;
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --border-subtle: rgba(255, 255, 255, 0.06);
}

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

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  padding-bottom: 80px;
  overflow-x: hidden;
}

/* Status bar simulation (optional) */
.app-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 4px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  background: var(--bg-dark);
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 16px;
  background: var(--bg-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.logo-text {
  line-height: 1.1;
}

.logo-text .brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo-text .brand span {
  color: #f59e0b;
}

.logo-text .tagline {
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.user-badge {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: 6px 14px 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.user-badge .avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 14px;
}

/* Section title */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 20px;
}

.section-title .icon-box {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.section-title h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.section-title p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Cards */
.card-main {
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 18px;
  padding: 20px;
  margin: 0 16px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card-main::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}

.card-main .package-icon {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #60a5fa;
  margin-bottom: 12px;
}

.card-main .label {
  font-size: 14px;
  color: #93c5fd;
  font-weight: 500;
}

.card-main .amount {
  font-size: 32px;
  font-weight: 800;
  margin: 4px 0 6px;
  letter-spacing: -0.5px;
}

.card-main .status {
  font-size: 13px;
  color: var(--text-secondary);
}

.card-main .arrow-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  background: rgba(59, 130, 246, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  font-size: 16px;
  border: none;
}

/* Grid cards */
.income-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 16px;
}

.income-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  min-height: 130px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.income-card:active {
  transform: scale(0.98);
}

.income-card .icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.income-card.green .icon-circle {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.income-card.orange .icon-circle {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.income-card.purple .icon-circle {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}
.income-card.blue .icon-circle {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.income-card .title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.income-card.green .title { color: #4ade80; }
.income-card.orange .title { color: #fbbf24; }
.income-card.purple .title { color: #c084fc; }
.income-card.blue .title { color: #60a5fa; }

.income-card .value {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.income-card .sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.income-card .arrow {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: none;
}

.income-card.green .arrow {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
.income-card.orange .arrow {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
.income-card.purple .arrow {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}
.income-card.blue .arrow {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

/* Total income card */
.total-card {
  background: linear-gradient(135deg, #0f2a1a 0%, #0a1f14 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 0 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.total-card .icon-circle {
  width: 48px;
  height: 48px;
  background: rgba(34, 197, 94, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #4ade80;
  flex-shrink: 0;
}

.total-card .info .label {
  font-size: 14px;
  color: #86efac;
  font-weight: 600;
}

.total-card .info .amount {
  font-size: 28px;
  font-weight: 800;
  margin: 2px 0;
}

.total-card .info .sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.total-card .chart-area {
  margin-left: auto;
  width: 110px;
  height: 50px;
  position: relative;
}

.total-card .arrow {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 30px;
  height: 30px;
  background: rgba(34, 197, 94, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4ade80;
  font-size: 14px;
  border: none;
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0d1324;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 14px;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  transition: color 0.2s;
  min-width: 60px;
}

.nav-item i {
  font-size: 22px;
}

.nav-item.active {
  color: #3b82f6;
}

.nav-item.active i {
  color: #3b82f6;
}

/* Common page content */
.page-content {
  padding-bottom: 20px;
}

/* Empty / other pages */
.placeholder-page {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-secondary);
}

.placeholder-page i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.placeholder-page h2 {
  font-size: 20px;
  color: white;
  margin-bottom: 8px;
}

/* Profile page extras */
.profile-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  margin: 0 16px 16px;
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #0f172a;
  margin: 0 auto 12px;
}

.list-group-dark .list-group-item {
  background: var(--card-bg);
  border-color: var(--border-subtle);
  color: white;
  padding: 14px 16px;
}

.list-group-dark .list-group-item i {
  width: 28px;
  color: #60a5fa;
}

/* Team page */
.team-stat {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border-subtle);
}

.team-stat .num {
  font-size: 26px;
  font-weight: 800;
  color: #60a5fa;
}

.team-stat .lbl {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Payout page */
.payout-row {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-subtle);
}

.payout-row .status-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.status-success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* Side Menu (Offcanvas) */
.offcanvas-menu {
  background: #0d1324 !important;
  color: white;
  width: 280px !important;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.offcanvas-menu .offcanvas-header {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 20px 20px 16px;
}

.offcanvas-menu .offcanvas-title {
  font-weight: 700;
  font-size: 18px;
}

.offcanvas-menu .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(59, 130, 246, 0.08);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.side-user .avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #0f172a;
  flex-shrink: 0;
}

.side-user .info .name {
  font-weight: 700;
  font-size: 15px;
}

.side-user .info .id {
  font-size: 12px;
  color: var(--text-secondary);
}

.side-nav {
  list-style: none;
  padding: 12px 0;
  margin: 0;
}

.side-nav li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 24px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.side-nav li a:hover,
.side-nav li a.active {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-left-color: #3b82f6;
}

.side-nav li a i {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.side-nav .divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 10px 20px;
}

.side-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

/* Utility */
.text-muted-custom {
  color: var(--text-secondary) !important;
}

.btn-primary-custom {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 600;
  color: white;
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
}

/* Chart bars (simple CSS) */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.mini-chart .bar {
  width: 8px;
  background: linear-gradient(to top, #22c55e, #4ade80);
  border-radius: 3px 3px 0 0;
  opacity: 0.85;
}

.mini-chart .line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
}

/* Responsive tweaks */
@media (min-width: 576px) {
  body {
    max-width: 430px;
    margin: 0 auto;
    border-left: 1px solid rgba(255,255,255,0.05);
    border-right: 1px solid rgba(255,255,255,0.05);
  }
  .bottom-nav {
    max-width: 430px;
    left: 50%;
    transform: translateX(-50%);
  }
}