:root {
  --orange: #FF6200;
  --orange-dark: #e65800;
  --ink: #2C2A29;
  --bg: #f5f5f4;
  --line: #e7e5e4;
  --muted: #78716c;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
input, select, textarea, button { font-family: inherit; }

/* ---------- Layout ---------- */
.layout { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 260px;
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 30;
}
.sidebar .brand { padding: 20px 24px; border-bottom: 1px solid var(--line); }
.nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px; margin-bottom: 4px;
  color: var(--muted); font-weight: 600; font-size: 15px;
  transition: background .18s, color .18s;
}
.nav a:hover { background: #fff3ea; color: var(--orange); }
.nav a.active { background: var(--orange); color: #fff; box-shadow: 0 4px 12px rgba(255,98,0,.25); }
.nav a svg, .nav a .ic { width: 20px; height: 20px; }
.sidebar .foot { padding: 12px; border-top: 1px solid var(--line); }
.sidebar .foot a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.sidebar .foot a:hover { background: #f5f5f4; }

.content { margin-left: 260px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 64px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
}
.search {
  display: flex; align-items: center; gap: 10px;
  background: #f5f5f4; border-radius: 999px; padding: 9px 16px; width: 300px;
}
.search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 14px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.bell { position: relative; padding: 9px; border-radius: 999px; color: var(--muted); }
.bell:hover { background: #f5f5f4; }
.badge-dot {
  position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px;
  padding: 0 4px; border-radius: 999px; background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.avatar { width: 38px; height: 38px; border-radius: 999px; object-fit: cover; }
.user-meta { line-height: 1.15; }
.user-meta .n { font-weight: 800; font-size: 14px; }
.user-meta .c { font-size: 11px; color: #a8a29e; }

.main { padding: 32px; max-width: 1200px; margin: 0 auto; }

/* ---------- Typography ---------- */
h1.page { font-size: 30px; font-weight: 900; margin: 0; }
.sub { color: var(--muted); margin: 4px 0 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

/* ---------- Brand logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 8px; color: #fff; font-weight: 900; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF7A1A, #FF6200);
}
.logo .name { font-weight: 900; font-size: 22px; letter-spacing: -.5px; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g23 { grid-template-columns: 2fr 1fr; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 800; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: background .18s, border .18s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: #d6d3d1; }
.btn-full { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 16px; }

/* ---------- Balance hero ---------- */
.hero {
  background: linear-gradient(135deg, #2C2A29, #43403d); color: #fff;
  border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden;
}
.hero .lbl { color: rgba(255,255,255,.7); }
.hero .amt { font-size: 46px; font-weight: 900; margin: 6px 0 0; letter-spacing: -1px; }
.hero .up { color: #34d399; font-weight: 700; font-size: 14px; margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.hero .mini { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 22px; position: relative; z-index: 2; }
.hero .mini a { background: rgba(255,255,255,.1); border-radius: 12px; padding: 12px; transition: background .18s; }
.hero .mini a:hover { background: rgba(255,255,255,.16); }
.hero .mini .t { font-size: 12px; color: rgba(255,255,255,.6); }
.hero .mini .v { font-weight: 800; margin-top: 4px; }
.hero .glow { position: absolute; right: -60px; bottom: -60px; width: 240px; height: 240px; border-radius: 999px; background: radial-gradient(circle, #FF6200, transparent 70%); opacity: .2; }

/* ---------- Quick actions ---------- */
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qa a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; transition: all .18s; }
.qa a:hover { border-color: var(--orange); background: #fff7ed; }
.qa .ico { width: 44px; height: 44px; border-radius: 999px; background: #ffedd5; color: var(--orange); display: flex; align-items: center; justify-content: center; }
.qa a:hover .ico { background: var(--orange); color: #fff; }
.qa .lbl { font-weight: 700; font-size: 14px; }

/* ---------- Donut ---------- */
.donut-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.donut { width: 170px; height: 170px; border-radius: 999px; position: relative; }
.donut .hole { position: absolute; inset: 26px; background: #fff; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut .hole .s { font-size: 12px; color: #a8a29e; }
.donut .hole .v { font-weight: 900; font-size: 18px; }
.legend { flex: 1; min-width: 170px; }
.legend .row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding: 5px 0; }
.legend .dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 8px; }

/* ---------- Bars ---------- */
.bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; height: 200px; padding-top: 10px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bars .stack { display: flex; align-items: flex-end; gap: 6px; height: 160px; width: 100%; justify-content: center; }
.bars .bar { width: 32%; border-radius: 6px 6px 0 0; }
.bars .bar.in { background: var(--orange); }
.bars .bar.out { background: #d6d3d1; }
.bars .m { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- Transactions ---------- */
.tx { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px; border-radius: 10px; transition: background .18s; }
.tx:hover { background: #fafaf9; }
.tx + .tx { border-top: 1px solid #f5f5f4; }
.tx .l { display: flex; align-items: center; gap: 12px; }
.tx .ic { width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.tx .ic.pos { background: #d1fae5; color: #059669; }
.tx .ic.neg { background: #f5f5f4; color: #78716c; }
.tx .lab { font-weight: 700; font-size: 14px; }
.tx .meta { font-size: 12px; color: #a8a29e; }
.tx .amt { font-weight: 800; font-size: 14px; }
.tx .amt.pos { color: #059669; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px; font-size: 15px; outline: none; background: #fff; transition: border .18s, box-shadow .18s;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,98,0,.12); }
.input:disabled { background: #fafaf9; color: #78716c; }
.field { margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.col-span { grid-column: 1 / -1; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #57534e; margin: 0 0 14px; }
.money { position: relative; }
.money .cur { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #a8a29e; font-weight: 800; }

/* ---------- Flash ---------- */
.flash { padding: 13px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.flash.success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.flash.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- Badges & progress ---------- */
.pill { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.pill.green { background: #d1fae5; color: #059669; }
.pill.grey { background: #f5f5f4; color: #78716c; }
.progress { height: 10px; background: #f5f5f4; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--orange); border-radius: 999px; }

/* ---------- Credit card visual ---------- */
.ccard { width: 100%; max-width: 400px; aspect-ratio: 1.586; border-radius: 18px; padding: 24px; color: #fff; position: relative; overflow: hidden; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.ccard.gold { background: linear-gradient(135deg,#2C2A29,#4a4744 55%,#1a1918); }
.ccard.classic { background: linear-gradient(135deg,#FF6200,#ff8a3d); }
.ccard .top { display: flex; justify-content: space-between; align-items: flex-start; }
.ccard .chip { width: 46px; height: 34px; border-radius: 6px; background: linear-gradient(135deg,#fde68a,#f59e0b); margin-top: 18px; opacity: .9; }
.ccard .num { font-family: monospace; font-size: 20px; letter-spacing: 3px; margin-top: 16px; }
.ccard .bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 16px; }
.ccard .k { font-size: 10px; opacity: .7; text-transform: uppercase; }
.ccard .brand-mark { font-weight: 900; font-style: italic; font-size: 18px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; }
.login .left { width: 48%; background: var(--orange); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .left .bg { position: absolute; inset: 0; opacity: .2; background: radial-gradient(circle at 20% 20%, #fff5 0, transparent 40%), radial-gradient(circle at 80% 70%, #fff3 0, transparent 45%); }
.login .left h1 { font-size: 46px; font-weight: 900; line-height: 1.1; position: relative; }
.login .left p.lead { font-size: 18px; font-weight: 300; margin-top: 16px; position: relative; }
.login .feat { display: flex; align-items: center; gap: 12px; margin-top: 16px; position: relative; }
.login .feat .ico { width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; }
.login .right { width: 52%; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login .form-box { width: 100%; max-width: 420px; }
.login .copyright { position: relative; color: rgba(255,255,255,.7); font-size: 14px; }
.hint { margin-top: 20px; padding: 12px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 14px; color: #57534e; }

.stat { }
.stat .k { font-size: 14px; color: var(--muted); }
.stat .v { font-size: 26px; font-weight: 900; margin-top: 4px; }
.mb { margin-bottom: 22px; }
.mt { margin-top: 22px; }
.link { color: var(--orange); font-weight: 700; }
.link:hover { text-decoration: underline; }
.mono { font-family: monospace; }
.spread { display: flex; align-items: center; justify-content: space-between; }

/* ---------- Alerts ---------- */
.alert-item { display: flex; gap: 16px; align-items: flex-start; }
.alert-item.unread { border-left: 4px solid var(--orange); }
.alert-item .ico { width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico.info { background: #dbeafe; color: #2563eb; }
.ico.warning { background: #fef3c7; color: #d97706; }
.ico.success { background: #d1fae5; color: #059669; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .content { margin-left: 0; }
  .g2, .g3, .g23, .form-grid { grid-template-columns: 1fr; }
  .login .left { display: none; }
  .login .right { width: 100%; }
  .search { display: none; }
  .menu-btn { display: inline-flex !important; }
}
.menu-btn { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); padding: 6px; }
