/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; color: #1a1a1a; background: #f7f8fa; line-height: 1.6; font-size: 15px; }
a { color: #1a6b3c; }
button { font-family: inherit; cursor: pointer; }

/* === NAV === */
.nav { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.logo-mark { width: 30px; height: 30px; border-radius: 7px; background: #1a6b3c; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: 0.02em; }
.logo-img { height: 34px; width: auto; display: block; }
.logo-sub { color: #6b7280; font-weight: 400; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-btn { padding: 6px 14px; border-radius: 6px; border: none; background: none; font-size: 13px; color: #4b5563; transition: all 0.15s; font-weight: 500; }
.nav-btn:hover { background: #f3f4f6; color: #1a1a1a; }
.nav-btn.active { background: #f0faf4; color: #1a6b3c; }
.nav-btn.admin-btn { color: #7c3aed; }
.nav-btn.admin-btn:hover { background: #f5f3ff; }
.nav-btn.logout { color: #6b7280; }

/* === PAGES === */
.page { display: none; min-height: calc(100vh - 56px); }
.page.active { display: block; }
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* === HERO === */
.hero { text-align: center; padding: 60px 24px 48px; max-width: 620px; margin: 0 auto; }
.hero-pill { display: inline-block; background: #e8f5ef; color: #1a6b3c; border-radius: 20px; padding: 5px 16px; font-size: 13px; font-weight: 600; margin-bottom: 20px; border: 1px solid #a7d7bb; }
.hero h1 { font-size: 40px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.02em; }
.hero p { font-size: 16px; color: #4b5563; line-height: 1.75; }
.accent { color: #1a6b3c; }

/* === STEPS === */
.steps-section { background: #fff; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 40px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { text-align: center; padding: 8px; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: #1a6b3c; color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.step-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.step-card p { font-size: 13px; color: #6b7280; line-height: 1.6; }

/* === FORM SECTION === */
.form-section { padding: 48px 24px; }
.form-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 32px; max-width: 680px; margin: 0 auto; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.form-card.narrow { max-width: 420px; }
.form-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.form-sub { font-size: 13px; color: #6b7280; margin-bottom: 24px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.field-hint { font-weight: 400; color: #9ca3af; }
.field input { width: 100%; padding: 9px 13px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; color: #1a1a1a; background: #fff; transition: border-color 0.15s; }
.field input:focus { outline: none; border-color: #1a6b3c; box-shadow: 0 0 0 3px rgba(26,107,60,0.08); }

/* === BUTTONS === */
.btn-primary { display: inline-block; padding: 11px 20px; background: #1a6b3c; color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; width: 100%; margin-top: 4px; }
.btn-primary:hover { background: #155c32; }
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-outline { display: inline-block; padding: 10px 20px; background: #fff; color: #1a6b3c; border: 1px solid #1a6b3c; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.btn-outline:hover { background: #f0faf4; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn-row .btn-primary, .btn-row .btn-outline { width: auto; flex: 1; text-align: center; }
.btn-xs { padding: 4px 10px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; font-size: 12px; color: #4b5563; cursor: pointer; }
.btn-xs:hover { background: #f3f4f6; }
.link-toggle { font-weight: 500; }
.link-toggle.active { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }

.withdraw-btn { display: block; margin-top: 10px; background: #1a6b3c; color: #fff; border-color: #1a6b3c; padding: 6px 14px; }
.withdraw-btn:hover { background: #155c32; }

.withdraw-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.withdraw-modal-card { background: #fff; border-radius: 14px; max-width: 420px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 28px; position: relative; }
.withdraw-modal-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; color: #9ca3af; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #1a1a1a; }

/* === SUCCESS CARD === */
.success-card { background: #fff; border: 1px solid #a7d7bb; border-radius: 12px; padding: 40px 32px; max-width: 520px; margin: 0 auto; text-align: center; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: #1a6b3c; color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; color: #1a6b3c; }
.success-card p { font-size: 14px; color: #4b5563; margin-bottom: 16px; }
.link-display { background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 16px; font-family: monospace; font-size: 12px; color: #1a6b3c; word-break: break-all; text-align: left; margin-bottom: 4px; }

/* === ALERTS === */
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.alert.success { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.alert.info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

/* === DASHBOARD HEADER === */
.dash-header { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 20px 0; }
.dash-hd-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dash-hd-inner h2 { font-size: 20px; font-weight: 700; }
.muted { font-size: 13px; color: #6b7280; }
.link-compact-wrap { text-align: right; }
.link-label { font-size: 11px; color: #9ca3af; display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.link-compact { font-family: monospace; font-size: 11px; color: #1a6b3c; background: #f0faf4; padding: 6px 10px; border-radius: 6px; word-break: break-all; max-width: 340px; margin-bottom: 4px; }

/* === DASH BODY === */
.dash-body { padding: 28px 24px; }
.payout-banner { background: #e8f5ef; border: 1px solid #a7d7bb; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #1a6b3c; font-weight: 500; margin-bottom: 20px; }

/* === STATS GRID === */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px; }
.stat-card.green .stat-val { color: #1a6b3c; }
.stat-label { font-size: 12px; color: #6b7280; font-weight: 500; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-val { font-size: 26px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-hint { font-size: 11px; color: #9ca3af; }

/* === SECTION TITLES === */
.section-title { font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-hint { font-size: 12px; color: #9ca3af; font-weight: 400; }

/* === TABLE === */
.table-wrap { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
th { padding: 10px 14px; text-align: left; background: #f9fafb; font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid #e5e7eb; }
td { padding: 11px 14px; border-bottom: 1px solid #f3f4f6; color: #1a1a1a; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.empty-row td { text-align: center; color: #9ca3af; padding: 32px; }

/* === BADGES === */
.badge { display: inline-block; padding: 3px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.badge.pending  { background: #fef3c7; color: #92400e; }
.badge.approved { background: #d1fae5; color: #065f46; }
.badge.declined { background: #fee2e2; color: #991b1b; }

/* === ADMIN === */
.admin-badge { display: inline-block; background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; border-radius: 6px; padding: 3px 10px; font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.filter-btns { display: flex; gap: 6px; }
.filter { padding: 4px 12px; border: 1px solid #e5e7eb; border-radius: 20px; background: #fff; font-size: 12px; color: #6b7280; cursor: pointer; font-weight: 500; }
.filter.active { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }
.action-btns { display: flex; gap: 6px; }
.act-btn { padding: 4px 10px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff; font-size: 11px; cursor: pointer; font-weight: 600; transition: all 0.12s; }
.act-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.act-approve { border-color: #1a6b3c; color: #1a6b3c; }
.act-approve:hover:not(:disabled) { background: #e8f5ef; }
.act-decline { border-color: #dc2626; color: #dc2626; }
.act-decline:hover:not(:disabled) { background: #fef2f2; }

/* === LOADING === */
.loading { text-align: center; padding: 32px; color: #9ca3af; font-size: 13px; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #e5e7eb; border-top-color: #1a6b3c; border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .hero h1 { font-size: 28px; }
  .steps-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-hd-inner { flex-direction: column; }
  .link-compact-wrap { text-align: left; }
}
