/* ═══════════════════════════════════════════
   ALPHAPULSE TRADE — Shared Stylesheet
   ═══════════════════════════════════════════ */

:root {
  --primary: #112b68;
  --secondary: #5774d4;
  --accent-blue: #152b74;
  --accent-red: #c13911;
  --accent-orange: #dd6c10;
  --white: #ffffff;
  --bg: #f5f7fc;
  --card: #ffffff;
  --text: #0d1b40;
  --text-muted: #6b7a9e;
  --text-light: #9ba8c4;
  --border: #e4e9f5;
  --green: #0daa6b;
  --green-light: #e6f9f1;
  --red-light: #fdeee9;
  --shadow-sm: 0 2px 8px rgba(17,43,104,0.07);
  --shadow-md: 0 4px 20px rgba(17,43,104,0.12);
  --shadow-lg: 0 8px 40px rgba(17,43,104,0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --nav-h: 72px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── APP WRAPPER ── */
.app-wrapper {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  padding-bottom: var(--nav-h);
  position: relative;
}
@media (min-width: 480px) {
  .app-wrapper { box-shadow: 0 0 60px rgba(17,43,104,0.15); }
}

/* ── APP HEADER ── */
.app-header {
  background: white;
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.header-icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  text-decoration: none;
}
.header-icon-btn:hover { background: var(--border); }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  height: var(--nav-h);
  box-shadow: 0 -4px 20px rgba(17,43,104,0.1);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  background: none;
  padding: 0;
  position: relative;
}
.nav-item i { font-size: 18px; color: var(--text-light); transition: all 0.2s; }
.nav-item span { font-size: 10px; font-weight: 500; color: var(--text-light); transition: all 0.2s; }
.nav-item.active i,
.nav-item:hover i { color: var(--accent-red); }
.nav-item.active span,
.nav-item:hover span { color: var(--accent-red); }
.nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 36px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--accent-red);
}

/* ── PAGE CONTENT ── */
.page-content { padding: 16px; }

/* ── LOGO ── */
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 800; font-size: 17px; color: var(--primary);
  text-decoration: none;
}
.logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 15px;
}

/* ── CARDS ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.25s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-body { padding: 18px; }
.card-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.card-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--primary); }
.card-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── BALANCE CARD ── */
.balance-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-blue) 60%, #1e3a8a 100%);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(17,43,104,0.35);
}
.balance-card::before {
  content: '';
  position: absolute; top: -40px; right: -30px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255,255,255,0.06);
}
.balance-card::after {
  content: '';
  position: absolute; bottom: -50px; left: -20px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255,255,255,0.04);
}
.balance-label { font-size: 12px; color: rgba(255,255,255,0.65); font-weight: 500; margin-bottom: 4px; }
.balance-amount { font-family: var(--font-display); font-size: 36px; font-weight: 800; color: white; line-height: 1; margin-bottom: 8px; }
.balance-amount span { font-size: 20px; opacity: 0.7; margin-right: 2px; }
.balance-change {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(13,170,107,0.2); border: 1px solid rgba(13,170,107,0.3);
  padding: 3px 10px; border-radius: 50px;
  font-size: 12px; font-weight: 600; color: #4ade80;
}
.balance-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.balance-sub-label { font-size: 11px; color: rgba(255,255,255,0.5); margin-bottom: 2px; }
.balance-sub-val { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: white; }

/* ── QUICK ACTIONS ── */
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.qa-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.qa-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.qa-label { font-size: 12px; font-weight: 600; color: var(--text); }

/* ── TRANSACTIONS ── */
.tx-list { display: flex; flex-direction: column; gap: 0; }
.tx-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  transition: background 0.15s; cursor: pointer;
}
.tx-item:last-child { border-bottom: none; }
.tx-item:hover { background: var(--bg); }
.tx-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.tx-info { flex: 1; }
.tx-name { font-size: 14px; font-weight: 600; color: var(--text); }
.tx-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.tx-amount.positive { color: var(--green); }
.tx-amount.negative { color: var(--accent-red); }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 8px; display: block; }
.form-input {
  width: 100%; padding: 13px 16px; border-radius: 12px;
  border: 1.5px solid var(--border);
  font-family: var(--font-body); font-size: 14px; color: var(--text);
  background: white; outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--secondary); }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.submit-btn {
  width: 100%; padding: 15px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white; font-family: var(--font-display); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: all 0.25s;
  box-shadow: 0 4px 18px rgba(87,116,212,0.4);
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(87,116,212,0.5); }

/* ── PILLS ── */
.pill { padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 700; }
.pill-blue { background: rgba(87,116,212,0.12); color: var(--secondary); }
.pill-green { background: var(--green-light); color: var(--green); }
.pill-red { background: var(--red-light); color: var(--accent-red); }
.pill-orange { background: rgba(221,108,16,0.12); color: var(--accent-orange); }

/* ── SECTION HEADING ── */
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-heading-title { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--primary); }
.section-heading-link { font-size: 13px; font-weight: 600; color: var(--secondary); text-decoration: none; cursor: pointer; }

/* ── INFO LIST ── */
.info-list { display: flex; flex-direction: column; gap: 0; }
.info-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.15s; text-decoration: none;
}
.info-item:hover { background: var(--bg); }
.info-item:last-child { border-bottom: none; }
.info-item-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.info-item-content { flex: 1; }
.info-item-label { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.info-item-value { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 1px; }
.info-item-arrow { color: var(--text-light); font-size: 12px; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.animate-in { animation: fadeInUp 0.4s ease both; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); display: inline-block; margin-right: 5px;
  animation: pulse 1.5s ease infinite;
}

/* ── PAYDAY BANNER ── */
.payday-banner {
  background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.payday-icon { font-size: 24px; }
.payday-title { font-family: var(--font-display); font-size: 14px; font-weight: 800; color: white; }
.payday-sub { font-size: 11px; color: rgba(255,255,255,0.8); margin-top: 2px; }

/* ── COPY TOAST ── */
.copy-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: white; padding: 10px 20px;
  border-radius: 50px; font-size: 13px; font-weight: 600;
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.copy-toast.show { opacity: 1; }

/* ── SPACING HELPERS ── */
.gap-12 { margin-bottom: 12px; }
.gap-16 { margin-bottom: 16px; }
.gap-20 { margin-bottom: 20px; }
.mt-8 { margin-top: 8px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
