/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', sans-serif;
  background: #0d0d0f;
  color: #fff;
  display: grid;
  grid-template-columns: 72px 1fr 320px;
  grid-template-rows: 64px 1fr;
  grid-template-areas:
    "sidebar-left top-bar sidebar-right"
    "sidebar-left main sidebar-right";
  height: 100vh;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
img { display: block; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* ── Left Sidebar ── */
.sidebar-left {
  grid-area: sidebar-left;
  background: #141416;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0;
  gap: 8px;
  border-right: 1px solid #1e1e22;
}
.logo { margin-bottom: 16px; }
.nav-icons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 16px;
  color: #666;
  transition: all .2s;
}
.nav-icon:hover, .nav-icon.active {
  color: #fff;
  background: rgba(255,255,255,.06);
}
.nav-icon.active {
  background: rgba(46,204,113,.15);
  color: #2ECC71;
}
.nav-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Top Bar ── */
.top-bar {
  grid-area: top-bar;
  background: #141416;
  border-bottom: 1px solid #1e1e22;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1c1c20;
  border-radius: 10px;
  padding: 8px 16px;
  flex: 1;
  max-width: 400px;
}
.search-box i { color: #555; font-size: 13px; }
.search-box input {
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  outline: none;
  width: 100%;
}
.search-box input::placeholder { color: #555; }
.btn-space {
  background: #1c1c20;
  color: #fff;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #1c1c20;
  color: #888;
  font-size: 14px;
  transition: color .2s;
}
.icon-btn:hover { color: #fff; }
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  background: #1c1c20;
  border-radius: 28px;
  cursor: pointer;
}
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 12.5px; font-weight: 600; }
.user-handle { font-size: 11px; color: #888; }
.user-profile .fa-chevron-down { font-size: 10px; color: #666; margin-left: 4px; }

/* ── Main Content ── */
.main-content {
  grid-area: main;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

/* ── Cards ── */
.card {
  background: #18181c;
  border-radius: 16px;
  padding: 22px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}
.card-header h2 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.amount-row { display: flex; align-items: center; gap: 10px; }
.amount { font-size: 24px; font-weight: 700; }
.change {
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}
.change.positive { color: #2ECC71; }
.change.negative { color: #e74c3c; }

/* Timeframe buttons */
.timeframe-btns { display: flex; gap: 6px; }
.timeframe-btns button {
  padding: 6px 14px;
  border-radius: 8px;
  background: #1c1c20;
  color: #888;
  font-size: 12px;
  font-weight: 500;
  transition: all .2s;
}
.timeframe-btns button.active,
.timeframe-btns button:hover {
  background: #2a2a30;
  color: #fff;
}

/* Chart */
.chart-container { height: 200px; position: relative; }
.chart-container.bar-chart { height: 160px; }
.avg-rate { margin-top: 12px; font-size: 13px; color: #888; }
.avg-rate strong { color: #fff; }

/* Investments controls */
.inv-controls { display: flex; gap: 8px; }
.sort-btn, .month-btn {
  padding: 6px 14px;
  border-radius: 8px;
  background: #1c1c20;
  color: #888;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.month-btn { background: #2a2a30; color: #fff; }

/* ── Promo Card ── */
.promo-card {
  background: linear-gradient(135deg, #e8752c 0%, #f5a623 50%, #f7c948 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  min-height: 180px;
  flex-shrink: 0;
}
.promo-content {
  flex: 1;
  padding-right: 20px;
}
.promo-content h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.promo-content p { font-size: 12.5px; color: rgba(255,255,255,.85); margin-bottom: 14px; line-height: 1.4; }
.promo-avatars {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.promo-avatars img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e8752c;
  margin-left: -8px;
}
.promo-avatars img:first-child { margin-left: 0; }
.avatar-more {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-left: -8px;
}
.btn-request {
  background: #fff;
  color: #e8752c;
  padding: 8px 28px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
}
.promo-visual {
  flex-shrink: 0;
  width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.coffee-cup {
  font-size: 64px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}

/* ── Right Sidebar ── */
.sidebar-right {
  grid-area: sidebar-right;
  background: #141416;
  border-left: 1px solid #1e1e22;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.sidebar-right .card { background: #1a1a1e; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-header h3 { font-size: 15px; font-weight: 600; }
.add-new {
  background: #1c1c20;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.view-all { color: #888; font-size: 12.5px; }
.view-all:hover { color: #fff; }

/* Bank Cards */
.cards-stack { position: relative; height: 140px; margin-bottom: 16px; }
.bank-card {
  position: absolute;
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, #1e1e26 0%, #2a2a32 100%);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #2a2a32;
}
.bank-card.card-2 {
  top: 36px;
  opacity: .8;
  transform: scale(.97);
  transform-origin: top left;
}
.card-chip { color: #f0c040; font-size: 18px; }
.card-logo {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #888;
}
.card-number { font-size: 11px; letter-spacing: 1px; color: #666; }
.card-balance { font-size: 16px; font-weight: 700; }

/* Balance Info */
.balance-info {
  padding: 14px 0;
  border-top: 1px solid #2a2a30;
  border-bottom: 1px solid #2a2a30;
  margin-bottom: 16px;
}
.balance-label { font-size: 12px; color: #888; display: block; margin-bottom: 4px; }

/* Card Actions */
.card-actions { display: flex; gap: 10px; }
.btn-outline {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #333;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.btn-orange {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  background: #e8752c;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
}
.btn-orange:hover { background: #d4651f; }

/* Transactions */
.tx-list { display: flex; flex-direction: column; gap: 4px; }
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}
.tx-item + .tx-item { border-top: 1px solid #222; }
.tx-avatar, .tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.tx-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
}
.tx-icon.google { background: #4285f4; }
.tx-icon.nike { background: #111; border: 1px solid #333; }
.tx-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.tx-name { font-size: 13px; font-weight: 500; }
.tx-date { font-size: 11.5px; color: #666; }
.tx-amount { font-size: 14px; font-weight: 600; }
.tx-amount.positive { color: #2ECC71; }
.tx-amount.negative { color: #e74c3c; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  body { grid-template-columns: 72px 1fr; grid-template-areas: "sidebar-left top-bar" "sidebar-left main"; }
  .sidebar-right { display: none; }
}
@media (max-width: 700px) {
  body { grid-template-columns: 1fr; grid-template-areas: "top-bar" "main"; }
  .sidebar-left { display: none; }
  .top-bar { padding: 0 12px; }
  .main-content { padding: 14px; }
}
