﻿/* ═══════════════════════════════════════════
   MAVORATRADE — Shared base (Tailwind-compatible)
   Custom properties only; components handled by Tailwind + per-page classes
   ═══════════════════════════════════════════ */



@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@300;400;500;600;700;800;900&display=swap');

/* ── DARK theme (default) ── */
:root {
  /* Surfaces */
  --bg:          #08061a;
  --bg2:         #0f0c28;
  --card:        #131030;
  --card2:       #1a1640;
  --glass:       rgba(255,255,255,0.04);
  --glass2:      rgba(255,255,255,0.08);
  /* Brand */
  --pu:          #7b2fbe;
  --pu2:         #9b59d6;
  --pu3:         #c084fc;
  --or:          #f97316;
  --or2:         #fb923c;
  /* Text */
  --fg:          #f1eef9;
  --fg2:         #b8a8d4;
  --fg3:         #7b6e96;
  /* Semantic */
  --green:       #22d38a;
  --green-light: rgba(34,211,138,0.12);
  --red:         #ef4444;
  --red-light:   rgba(239,68,68,0.10);
  /* Borders */
  --brd:         rgba(123,47,190,0.28);
  --brd2:        rgba(255,255,255,0.07);
  /* Glows */
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.35);
  --shadow-md:   0 6px 24px rgba(0,0,0,0.45);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.55);
  --glowp:       0 0 32px rgba(123,47,190,0.25);
  --glowo:       0 0 32px rgba(249,115,22,0.25);
  /* Legacy aliases */
  --primary:       #7b2fbe;
  --secondary:     #9b59d6;
  --accent-blue:   #6d28d9;
  --accent-red:    #ef4444;
  --accent-orange: #f97316;
  --white:         #ffffff;
  --text:          #f1eef9;
  --text-muted:    #b8a8d4;
  --text-light:    #7b6e96;
  --border:        rgba(123,47,190,0.28);
  --radius:        16px;
  --radius-sm:     10px;
  --radius-lg:     24px;
  --nav-h:         68px;
  --font-display:  'Urbanist', sans-serif;
  --font-body:     'Urbanist', sans-serif;
  color-scheme: dark;
}

/* ── LIGHT theme ── */
:root[data-theme="light"] {
  --bg:          #f5f3ff;
  --bg2:         #ede9fe;
  --card:        #ffffff;
  --card2:       #f0ebff;
  --glass:       rgba(123,47,190,0.06);
  --glass2:      rgba(123,47,190,0.10);
  --pu:          #6d23a8;
  --pu2:         #7b2fbe;
  --pu3:         #9333ea;
  --fg:          #160a2e;
  --fg2:         #4a3270;
  --fg3:         #7b6e96;
  --brd:         rgba(123,47,190,0.28);
  --brd2:        rgba(123,47,190,0.12);
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:   0 6px 24px rgba(0,0,0,0.12);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.18);
  --glowp:       0 0 32px rgba(123,47,190,0.12);
  --glowo:       0 0 32px rgba(249,115,22,0.15);
  /* Legacy aliases */
  --primary:       #6d23a8;
  --secondary:     #7b2fbe;
  --text:          #160a2e;
  --text-muted:    #4a3270;
  --text-light:    #7b6e96;
  --border:        rgba(123,47,190,0.28);
  color-scheme: light;
}

/* Light-theme specific overrides */
:root[data-theme="light"] .app-header {
  background: rgba(245,243,255,0.95);
  border-bottom-color: var(--brd2);
}
:root[data-theme="light"] .bottom-nav {
  background: rgba(245,243,255,0.97);
  border-top-color: var(--brd2);
}
:root[data-theme="light"] .card {
  background: var(--card);
  border-color: var(--brd2);
  box-shadow: 0 2px 16px rgba(123,47,190,0.07);
}
:root[data-theme="light"] .tx-item:hover { background: rgba(123,47,190,0.04); }
:root[data-theme="light"] .form-input { background: var(--bg2); border-color: var(--brd2); }

/* ── Light-theme overrides for Tailwind hardcoded colour classes ── */
:root[data-theme="light"] .text-\[\#f1eef9\] { color: var(--fg) !important; }
:root[data-theme="light"] .text-\[\#b8a8d4\] { color: var(--fg2) !important; }
:root[data-theme="light"] .text-\[\#7b6e96\] { color: var(--fg3) !important; }
:root[data-theme="light"] .text-white        { color: var(--fg) !important; }
:root[data-theme="light"] .border-white\/\[0\.07\]  { border-color: var(--brd2) !important; }
:root[data-theme="light"] .divide-white\/\[0\.07\] > * + * { border-color: var(--brd2) !important; }
:root[data-theme="light"] .bg-white\/\[0\.03\]  { background: var(--glass) !important; }
:root[data-theme="light"] .bg-white\/\[0\.06\]  { background: var(--glass2) !important; }
:root[data-theme="light"] .bg-white\/\[0\.08\]  { background: var(--glass2) !important; }
:root[data-theme="light"] .bg-white\/\[0\.04\]  { background: var(--glass) !important; }
/* Preserve intentionally-white text on coloured surfaces (purple/orange backgrounds) */
:root[data-theme="light"] [style*="background:linear-gradient"] .text-white,
:root[data-theme="light"] [style*="background: linear-gradient"] .text-white { color: #fff !important; }

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

body {
  font-family: 'Urbanist', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── 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 80px rgba(123,47,190,0.2); }
}

/* ── APP HEADER ── */
.app-header {
  background: rgba(8,6,26,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--brd2);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header-title { font-family: 'Urbanist', sans-serif; font-size: 18px; font-weight: 800; color: var(--fg); }
.header-icon-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--glass);
  border: 1px solid var(--brd2);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg2); cursor: pointer; font-size: 14px; transition: all 0.2s; text-decoration: none;
}
.header-icon-btn:hover { background: var(--glass2); border-color: var(--brd); color: var(--fg); }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 100;
  background: rgba(10,8,30,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--brd2);
  display: flex; height: var(--nav-h);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.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(--fg3); transition: all 0.2s; }
.nav-item span { font-size: 10px; font-weight: 500; color: var(--fg3); transition: all 0.2s; font-family: 'Urbanist', sans-serif; }
.nav-item.active i, .nav-item:hover i     { color: var(--or); }
.nav-item.active span, .nav-item:hover span { color: var(--or); }
.nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 3px; border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--pu), var(--or));
}

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

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

/* ── BALANCE CARD ── */
.balance-card {
  background: linear-gradient(135deg, #2d0878 0%, var(--pu) 55%, #6d28d9 100%);
  border-radius: var(--radius-lg); padding: 24px;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 40px rgba(123,47,190,0.45);
}
.balance-card::before { content:''; position:absolute; top:-40px; right:-30px; width:180px; height:180px; border-radius:50%; background:rgba(255,255,255,0.06); }
.balance-card::after  { content:''; position:absolute; bottom:-50px; left:-20px; width:140px; height:140px; border-radius:50%; background:rgba(249,115,22,0.1); }
.balance-label  { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 500; margin-bottom: 4px; position:relative; z-index:2; }
.balance-amount { font-family: 'Urbanist', sans-serif; font-size: 36px; font-weight: 800; color: white; line-height: 1; margin-bottom: 10px; position:relative; z-index:2; }
.balance-amount span { font-size: 20px; opacity: 0.7; margin-right: 2px; }
.balance-change { display:inline-flex; align-items:center; gap:5px; background:rgba(34,211,138,0.2); border:1px solid rgba(34,211,138,0.3); padding:3px 10px; border-radius:50px; font-size:12px; font-weight:600; color:#4ade80; position:relative; z-index:2; }
.balance-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:18px; position:relative; z-index:2; }
.balance-sub-label { font-size:11px; color:rgba(255,255,255,0.5); margin-bottom:2px; }
.balance-sub-val   { font-family:'Urbanist',sans-serif; font-size:16px; font-weight:700; color:white; }

/* ── QUICK ACTIONS ── */
.quick-actions { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.qa-btn { display:flex; flex-direction:column; align-items:center; gap:7px; padding:14px 6px; border-radius:var(--radius); background:var(--card); border:1px solid var(--brd2); cursor:pointer; transition:all 0.2s; text-decoration:none; }
.qa-btn:hover { transform:translateY(-2px); box-shadow:var(--shadow-sm); border-color:var(--brd); }
.qa-icon  { width:40px; height:40px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:16px; }
.qa-label { font-size:11px; font-weight:600; color:var(--fg2); font-family:'Urbanist',sans-serif; }

/* ── TRANSACTIONS ── */
.tx-list { display:flex; flex-direction:column; }
.tx-item { display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid var(--brd2); transition:background 0.15s; }
.tx-item:last-child { border-bottom:none; }
.tx-item:hover { background:var(--glass); }
.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; min-width:0; }
.tx-name   { font-size:14px; font-weight:600; color:var(--fg); }
.tx-date   { font-size:11px; color:var(--fg3); margin-top:2px; }
.tx-amount { font-family:'Urbanist',sans-serif; font-size:15px; font-weight:700; }
.tx-amount.positive { color:var(--green); }
.tx-amount.negative { color:var(--red); }

/* ── FORMS ── */
.form-group  { margin-bottom: 16px; }
.form-label  { font-size:13px; font-weight:600; color:var(--fg); margin-bottom:8px; display:block; }
.form-input  { width:100%; padding:13px 16px; border-radius:12px; border:1.5px solid var(--brd2); font-family:'Urbanist',sans-serif; font-size:14px; color:var(--fg); background:var(--bg2); outline:none; transition:border-color 0.2s; }
.form-input:focus { border-color:var(--pu); }
.form-input::placeholder { color:var(--fg3); }
.form-hint   { font-size:11px; color:var(--fg3); margin-top:6px; }
.submit-btn  { width:100%; padding:15px; border-radius:14px; border:none; background:linear-gradient(135deg,var(--or),var(--or2)); color:white; font-family:'Urbanist',sans-serif; font-size:16px; font-weight:700; cursor:pointer; transition:all 0.25s; box-shadow:0 4px 18px rgba(249,115,22,0.4); }
.submit-btn:hover { transform:translateY(-2px); box-shadow:0 8px 28px rgba(249,115,22,0.5); }

/* ── PILLS ── */
.pill        { padding:4px 12px; border-radius:50px; font-size:11px; font-weight:700; }
.pill-blue   { background:rgba(123,47,190,0.15); color:var(--pu3); border:1px solid rgba(123,47,190,0.3); }
.pill-green  { background:var(--green-light); color:var(--green); border:1px solid rgba(34,211,138,0.25); }
.pill-red    { background:var(--red-light); color:var(--red); border:1px solid rgba(239,68,68,0.2); }
.pill-orange { background:rgba(249,115,22,0.12); color:var(--or); border:1px solid rgba(249,115,22,0.25); }

/* ── SECTION HEADING ── */
.section-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.section-heading-title { font-family:'Urbanist',sans-serif; font-size:15px; font-weight:800; color:var(--fg); letter-spacing:-.2px; }
.section-heading-link  { font-size:13px; font-weight:600; color:var(--pu3); text-decoration:none; }

/* ── INFO LIST ── */
.info-list { display:flex; flex-direction:column; }
.info-item { display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid var(--brd2); cursor:pointer; transition:background 0.15s; text-decoration:none; }
.info-item:hover { background:var(--glass); }
.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(--fg3); font-weight:500; }
.info-item-value   { font-size:14px; font-weight:600; color:var(--fg); margin-top:1px; }
.info-item-arrow   { color:var(--fg3); font-size:12px; }

/* ── ANIMATIONS ── */
@keyframes fadeInUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.animate-in { animation:fadeInUp 0.35s 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(--or),#c2510a); border-radius:var(--radius); padding:14px 16px; display:flex; align-items:center; gap:12px; margin-bottom:16px; box-shadow:var(--glowo); }
.payday-icon  { font-size:22px; }
.payday-title { font-family:'Urbanist',sans-serif; font-size:14px; font-weight:800; color:white; }
.payday-sub   { font-size:11px; color:rgba(255,255,255,0.75); margin-top:2px; }

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

/* ── SPACING ── */
.gap-8{margin-bottom:8px} .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(--brd); border-radius:4px; }

/* ── SELECT ── */
select.form-input option { background:var(--card); color:var(--fg); }
