/* FundedOx Client Portal — Step 2 */
:root {
  --navy: #0B1830;
  --navy-2: #0E2038;
  --navy-3: #122a49;
  --green: #16C784;
  --green-2: #0EA76D;
  --green-glow: rgba(22, 199, 132, .28);
  --white: #FFFFFF;
  --text: #F2F5FA;
  --muted: rgba(242,245,250,.58);
  --muted-2: rgba(242,245,250,.38);
  --line: rgba(255,255,255,.09);
  --card: rgba(255,255,255,.055);
  --card-2: rgba(255,255,255,.075);
  --danger: #EF4C54;
  --warning: #F5A623;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: Inter, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 75% -10%, rgba(22,199,132,.13), transparent 60%),
    radial-gradient(800px 500px at 0% 30%, rgba(46,159,255,.08), transparent 60%),
    linear-gradient(180deg, var(--navy), var(--navy-2));
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3 { font-family: "Space Grotesk", sans-serif; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.app { min-height: 100vh; display: flex; }
.sidebar {
  width: 250px;
  flex-shrink: 0;
  min-height: 100vh;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: rgba(7,18,37,.72);
  backdrop-filter: blur(18px);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
}
.brand { display:flex; align-items:center; gap:10px; padding: 2px 10px 30px; font:700 20px "Space Grotesk",sans-serif; }
.brand-mark {
  width: 34px; height:34px; border-radius:9px;
  display:grid; place-items:center;
  background: linear-gradient(135deg,var(--green),var(--green-2));
  color:#06120C; font-weight:800; font-size:12px;
  box-shadow:0 8px 24px -8px var(--green-glow);
}
.nav-section { margin: 18px 8px 8px; color: var(--muted-2); font-size: 10px; font-weight:800; text-transform:uppercase; letter-spacing:.12em; }
.nav-link {
  display:flex; align-items:center; gap:12px;
  padding:12px 12px; margin:4px 0; border-radius:10px;
  color:var(--muted); font-size:14px; font-weight:600;
  transition:.18s ease;
}
.nav-link:hover, .nav-link.active { background:rgba(22,199,132,.10); color:#fff; }
.nav-link.active { box-shadow: inset 2px 0 var(--green); }
.nav-icon { width:20px; text-align:center; color:var(--green); }
.sidebar-bottom { position:absolute; left:16px; right:16px; bottom:20px; border-top:1px solid var(--line); padding-top:16px; }

.main { width:100%; margin-left:250px; }
.topbar {
  height:76px; padding:0 34px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:rgba(11,24,48,.52);
  backdrop-filter:blur(18px);
  position:sticky; top:0; z-index:30;
}
.topbar-title { font-size:14px; color:var(--muted); }
.user-area { display:flex; align-items:center; gap:12px; }
.avatar { width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:rgba(22,199,132,.15);border:1px solid rgba(22,199,132,.3);color:var(--green);font-weight:800; }
.user-copy { line-height:1.2; }
.user-copy strong { display:block; font-size:13px; }
.user-copy span { display:block; font-size:11px; color:var(--muted-2); margin-top:3px; }

.content { max-width:1400px; margin:0 auto; padding:34px; }
.hero { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:26px; }
.hero h1 { font-size:32px; margin-bottom:6px; }
.hero p { color:var(--muted); font-size:14px; }
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid transparent; border-radius:10px; padding:12px 18px;
  font-size:13px; font-weight:800; cursor:pointer; transition:.18s ease;
}
.btn-primary { color:#06120C; background:linear-gradient(180deg,var(--green),var(--green-2)); box-shadow:0 10px 28px -12px var(--green-glow); }
.btn-primary:hover { transform:translateY(-1px); }
.btn-outline { background:transparent; border-color:var(--line); color:#fff; }
.btn-outline:hover { background:rgba(255,255,255,.06); }
.btn-sm { padding:9px 14px; font-size:12px; }

.grid-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:18px; }
.card { background:linear-gradient(145deg,var(--card-2),var(--card)); border:1px solid var(--line); border-radius:var(--radius); }
.stat-card { padding:20px; position:relative; overflow:hidden; }
.stat-card::after { content:""; position:absolute; width:90px;height:90px;border-radius:50%;right:-35px;bottom:-45px;background:rgba(22,199,132,.07); }
.stat-label { color:var(--muted); font-size:12px; font-weight:600; }
.stat-value { margin-top:9px; font:700 25px "Space Grotesk",sans-serif; }
.stat-note { margin-top:7px; color:var(--muted-2); font-size:11px; }
.positive { color:var(--green) !important; }
.negative { color:#ff7d84 !important; }

.section { margin-top:18px; }
.section-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.section-head h2 { font-size:18px; }
.section-head a { color:var(--green); font-size:12px; font-weight:700; }

.account-list, .transactions { overflow:hidden; }
.account-row {
  display:grid; grid-template-columns:1.5fr 2fr auto; align-items:center;
  gap:20px; padding:18px 20px; border-bottom:1px solid var(--line);
}
.account-row:last-child,.transaction-row:last-child { border-bottom:0; }
.account-main { display:flex; align-items:center; gap:12px; min-width:0; }
.account-icon,.transaction-icon {
  width:40px;height:40px;border-radius:11px;display:grid;place-items:center;
  background:rgba(22,199,132,.10); color:var(--green); font-size:11px; font-weight:800;
  flex-shrink:0;
}
.account-main h3 { font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.account-main p { color:var(--muted-2); font-size:11px; margin-top:3px; }
.account-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.account-metrics span { display:block; color:var(--muted-2); font-size:10px; margin-bottom:3px; }
.account-metrics strong { font-size:12px; }
.status-badge {
  display:inline-flex; align-items:center; justify-content:center;
  padding:5px 9px; border-radius:999px; font-size:10px; font-weight:800;
  text-transform:capitalize; background:rgba(22,199,132,.10); color:var(--green);
  border:1px solid rgba(22,199,132,.18); white-space:nowrap;
}
.status-badge.small { font-size:9px; padding:4px 7px; }

.transaction-row {
  display:grid; grid-template-columns:auto 1fr auto auto; align-items:center;
  gap:12px; padding:15px 20px; border-bottom:1px solid var(--line);
}
.transaction-icon.withdrawal { color:#ff9aa0; background:rgba(239,76,84,.10); }
.transaction-description strong { display:block; font-size:12px; }
.transaction-description span { display:block; color:var(--muted-2); font-size:10px; margin-top:3px; }

.empty-state { display:flex; align-items:center; gap:14px; padding:24px 20px; }
.empty-state.compact { padding:20px; }
.empty-icon { width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:rgba(255,255,255,.05);color:var(--muted);font-size:20px; flex-shrink:0; }
.empty-state strong { display:block; font-size:13px; }
.empty-state p { color:var(--muted-2); font-size:11px; margin-top:3px; }
.empty-state .btn { margin-left:auto; }

.loader-wrap { min-height:70vh; display:grid; place-items:center; padding:30px; }
.loader { width:34px;height:34px;border-radius:50%;border:3px solid rgba(255,255,255,.10);border-top-color:var(--green);animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.hidden { display:none !important; }
.loader-error { max-width:420px; text-align:center; padding:30px; }
.loader-error strong { display:block; margin-bottom:7px; }
.loader-error p { color:var(--muted); font-size:13px; margin-bottom:18px; }

.mobile-menu,.mobile-overlay { display:none; }

@media (max-width:1050px) {
  .grid-stats { grid-template-columns:repeat(2,1fr); }
  .account-row { grid-template-columns:1fr auto; }
  .account-metrics { grid-column:1 / -1; }
}
@media (max-width:760px) {
  .sidebar { transform:translateX(-100%); transition:.22s ease; box-shadow:20px 0 50px rgba(0,0,0,.35); }
  .sidebar.open { transform:none; }
  .main { margin-left:0; }
  .topbar { padding:0 18px; height:66px; }
  .topbar-title { display:none; }
  .mobile-menu { display:grid; place-items:center; width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:transparent;color:#fff;cursor:pointer; }
  .mobile-overlay { position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:35; }
  .mobile-overlay.show { display:block; }
  .content { padding:24px 16px; }
  .hero { align-items:flex-start; flex-direction:column; }
  .hero h1 { font-size:27px; }
  .grid-stats { grid-template-columns:1fr 1fr; gap:10px; }
  .stat-card { padding:15px; }
  .stat-value { font-size:20px; }
  .account-row { padding:15px; }
  .account-metrics { gap:8px; }
  .transaction-row { grid-template-columns:auto 1fr auto; }
  .transaction-row .status-badge { display:none; }
  .user-copy { display:none; }
}
@media (max-width:460px) {
  .grid-stats { grid-template-columns:1fr; }
  .account-row { grid-template-columns:1fr; }
  .account-metrics { grid-column:auto; }
  .account-row > .status-badge { justify-self:start; }
  .empty-state { align-items:flex-start; flex-wrap:wrap; }
  .empty-state .btn { margin-left:54px; }
}
/* =========================================================
   FUNDEDOX PORTAL NAVIGATION
   ========================================================= */

.sidebar {
  display: flex;
  flex-direction: column;
}

.nav-section {
  margin-top: 26px;
  margin-bottom: 8px;
  padding: 0 16px;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;

  color: rgba(255,255,255,.38);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  min-height: 44px;
  padding: 0 16px;

  box-sizing: border-box;

  border: 0;
  border-radius: 10px;

  background: transparent;
  color: rgba(255,255,255,.68);

  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.nav-link:hover {
  background: rgba(255,255,255,.055);
  color: #fff;
}

.nav-link.active {
  background: rgba(22,199,132,.10);
  color: #fff;
}

.nav-icon {
  width: 20px;
  min-width: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 15px;
  opacity: .85;
}

.nav-link.active .nav-icon {
  color: var(--green);
  opacity: 1;
}

.nav-signout {
  color: rgba(255,255,255,.55);
  text-align: left;
}

.nav-signout:hover {
  color: #fff;
}

.nav-buy {
  color: var(--green);
}

.nav-buy:hover {
  background: rgba(22,199,132,.08);
  color: var(--green);
}


/* =========================================================
   MOBILE NAVIGATION
   ========================================================= */

.mobile-menu {
  display: none;
}

.mobile-overlay {
  display: none;
}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 900px) {

  .mobile-menu {
    display: inline-flex;

    width: 40px;
    height: 40px;

    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;

    background: rgba(255,255,255,.04);
    color: #fff;

    font-size: 18px;
    cursor: pointer;
  }

  .sidebar {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    width: min(280px, 84vw);

    z-index: 1000;

    transform: translateX(-105%);
    transition: transform .25s ease;

    overflow-y: auto;

    background: #081a31;

    box-shadow: 18px 0 45px rgba(0,0,0,.35);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;

    z-index: 999;

    background: rgba(0,0,0,.58);

    opacity: 0;
    pointer-events: none;

    display: block;

    transition: opacity .25s ease;
  }

  .mobile-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  .main {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    gap: 12px;
  }

  .topbar-title {
    flex: 1;
  }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 600px) {

  .sidebar {
    width: min(300px, 88vw);
  }

  .topbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .user-copy {
    display: none;
  }

  .avatar {
    width: 36px;
    height: 36px;
  }

  .content {
    padding: 18px 14px;
  }

  .hero {
    margin-bottom: 16px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .nav-section {
    margin-top: 22px;
  }
}
.nav-signout {
  appearance: none;
  -webkit-appearance: none;

  width: 100%;
  min-height: 44px;
  padding: 0 16px;

  display: flex;
  align-items: center;
  gap: 12px;

  border: 0;
  border-radius: 10px;

  background: transparent !important;
  color: rgba(255,255,255,.55) !important;

  font: inherit;
  font-size: 13px;
  font-weight: 600;

  text-align: left;
  cursor: pointer;
}

.nav-signout:hover {
  background: rgba(255,255,255,.055) !important;
  color: #fff !important;
}

.nav-signout .nav-icon {
  color: inherit;
}
.mobile-menu {
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  color: #fff !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 18px;
  line-height: 1;
}

.mobile-menu:hover,
.mobile-menu:focus,
.mobile-menu:active {
  background: rgba(255,255,255,.06) !important;
  color: #fff !important;
  outline: none;
}
