/* Hangyeol Financial — customer dashboard */

:root {
  --bg: #060f17;
  --bg-soft: #08141d;
  --panel: #0c1b27;
  --panel-2: #0f2432;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #e9f2f5;
  --soft: #a9bfcb;
  --muted: #6f8797;
  --mint: #43d7a8;
  --mint-dim: rgba(67, 215, 168, 0.13);
  --gold: #e0b76a;
  --gold-dim: rgba(224, 183, 106, 0.13);
  --red: #f2786c;
  --amber: #e6b455;
  --amber-dim: rgba(230, 180, 85, 0.13);
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 620px at 88% -12%, rgba(67, 215, 168, 0.09), transparent 62%),
    radial-gradient(900px 520px at 0% 8%, rgba(88, 155, 255, 0.06), transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }
p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- shared bits ---------- */

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, #1d4b3f, #0e2a24);
  border: 1px solid rgba(67, 215, 168, 0.32);
  color: var(--mint); font-family: serif; font-size: 1rem;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 0.95rem; }
.brand-text small { font-size: 0.55rem; letter-spacing: 0.18em; color: var(--muted); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 0.84rem; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--mint); color: #04231a; font-weight: 700; }
.btn-primary:hover { background: #63e5bb; }
.btn-ghost { border-color: var(--line-strong); background: transparent; color: var(--soft); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 0.78rem; border-radius: 8px; }
.btn-block { width: 100%; padding: 12px 16px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 0.76rem; color: var(--soft); font-weight: 500; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: rgba(4, 12, 18, 0.8); border: 1px solid var(--line-strong);
  color: var(--text); font-family: inherit; font-size: 0.88rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field input::placeholder { color: #55707f; }
.field input:focus {
  outline: none; border-color: rgba(67, 215, 168, 0.6);
  box-shadow: 0 0 0 3px rgba(67, 215, 168, 0.12);
}

/* ---------- sign in ---------- */

.auth-view {
  min-height: 100vh; display: grid; place-items: center; align-content: center;
  gap: 18px; padding: 40px 20px; position: relative; overflow: hidden;
}
.auth-glow {
  position: absolute; width: 820px; height: 820px; border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 215, 168, 0.13), transparent 62%);
  top: -380px; right: -220px; pointer-events: none;
}
.auth-card {
  position: relative; width: 100%; max-width: 430px;
  background: linear-gradient(168deg, rgba(15, 36, 50, 0.96), rgba(8, 19, 27, 0.99));
  border: 1px solid var(--line-strong); border-radius: 22px;
  padding: 34px 32px 28px;
  box-shadow: 0 46px 90px -56px rgba(0, 0, 0, 0.95);
}
.auth-card h1 { font-size: 1.45rem; margin: 26px 0 8px; }
.auth-lead { font-size: 0.83rem; color: var(--muted); line-height: 1.75; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .btn { margin-top: 6px; }
.auth-foot { font-size: 0.78rem; color: var(--muted); margin-top: 20px; text-align: center; }
.auth-foot a { color: var(--mint); border-bottom: 1px solid rgba(67, 215, 168, 0.35); }
.auth-demo { font-size: 0.68rem; color: #4f6574; text-align: center; max-width: 420px; }
.form-error {
  font-size: 0.78rem; color: #ffb3aa; background: rgba(242, 120, 108, 0.1);
  border: 1px solid rgba(242, 120, 108, 0.28); border-radius: 9px; padding: 9px 12px;
}

/* ---------- app shell ---------- */

.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

.side {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: 22px;
  padding: 24px 20px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 24, 34, 0.9), rgba(6, 15, 23, 0.6));
}
.side-profile {
  display: flex; align-items: center; gap: 11px;
  padding: 12px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
}
.avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  background: var(--mint-dim); border: 1px solid rgba(67, 215, 168, 0.28);
  color: var(--mint); font-weight: 700; font-size: 0.9rem; flex: none;
}
.side-profile-text { display: flex; flex-direction: column; min-width: 0; }
.side-profile-text strong { font-size: 0.84rem; }
.side-profile-text span { font-size: 0.7rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-size: 0.83rem; color: var(--soft);
  transition: background 0.16s ease, color 0.16s ease;
}
.side-nav a i { font-style: normal; font-size: 0.9rem; color: var(--muted); width: 16px; text-align: center; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.side-nav a.is-current { background: var(--mint-dim); color: var(--mint); }
.side-nav a.is-current i { color: var(--mint); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.side-link {
  display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: 9px; font-size: 0.78rem; color: var(--muted);
}
.side-link:hover { background: rgba(255, 255, 255, 0.05); color: var(--soft); }

.main { padding: 30px 34px 48px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar h1 { font-size: 1.5rem; margin-top: 6px; }
.eyebrow { font-size: 0.66rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.asof { font-size: 0.72rem; color: var(--muted); }

/* ---------- pending notice ---------- */

.notice {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px; border-radius: 12px; font-size: 0.8rem;
  background: var(--amber-dim); border: 1px solid rgba(230, 180, 85, 0.28); color: #f0d19a;
}
.notice-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none;
  box-shadow: 0 0 0 4px rgba(230, 180, 85, 0.16);
}

/* ---------- hero ---------- */

.hero {
  display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1px;
  border-radius: 22px; overflow: hidden; border: 1px solid rgba(67, 215, 168, 0.18);
  background: var(--line);
  box-shadow: 0 40px 80px -60px rgba(0, 0, 0, 0.9);
}
.hero-main {
  padding: 26px 28px;
  background:
    radial-gradient(700px 320px at 92% -30%, rgba(67, 215, 168, 0.24), transparent 60%),
    linear-gradient(135deg, #0f3a44, #0b2333 62%, #0a1a27);
}
.hero-label { display: flex; align-items: center; gap: 10px; font-size: 0.76rem; color: #a9c8d2; letter-spacing: 0.02em; }
.hero-value { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 600; margin: 10px 0 6px; letter-spacing: -0.03em; }
.hero-value span { font-size: 1rem; font-family: var(--sans); color: #9dbcc7; margin-left: 6px; font-weight: 400; }
.hero-sub { font-size: 0.76rem; color: #8fadb9; }

.pill {
  font-size: 0.66rem; padding: 3px 9px; border-radius: 99px; font-weight: 600;
  background: var(--mint-dim); color: var(--mint); border: 1px solid rgba(67, 215, 168, 0.3);
}
.pill.is-waiting { background: var(--amber-dim); color: var(--amber); border-color: rgba(230, 180, 85, 0.32); }
.pill.is-empty { background: rgba(255, 255, 255, 0.06); color: var(--soft); border-color: var(--line-strong); }

.breakdown {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.breakdown dt { font-size: 0.7rem; color: #90aeba; }
.breakdown dd { font-size: 0.86rem; margin-top: 3px; color: #e6f3f6; }

.hero-side {
  display: flex; flex-direction: column; justify-content: space-between; gap: 1px;
  background: var(--line);
}
.hero-stat {
  flex: 1; padding: 18px 22px; background: rgba(10, 26, 36, 0.96);
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.hero-stat p { font-size: 0.71rem; color: var(--muted); }
.hero-stat strong { font-size: 1.12rem; font-weight: 500; }
.hero-stat span { font-size: 0.68rem; color: #5c7383; }

/* ---------- stat cards ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card {
  padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(170deg, rgba(16, 36, 50, 0.78), rgba(9, 21, 30, 0.92));
  border: 1px solid var(--line);
}
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.72rem; color: var(--muted); }
.tag {
  font-size: 0.6rem; letter-spacing: 0.08em; padding: 2px 7px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.05); color: var(--soft); border: 1px solid var(--line);
}
.tag.gold { background: var(--gold-dim); color: var(--gold); border-color: rgba(224, 183, 106, 0.26); }
.stat-value { font-size: 1.28rem; font-weight: 500; margin: 10px 0 6px; }
.stat-foot { font-size: 0.68rem; color: #5c7383; }

/* ---------- panels ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.side-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.panel {
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(14, 32, 45, 0.8), rgba(8, 19, 27, 0.92));
  padding: 20px 22px; min-width: 0;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 0.98rem; }
.panel-meta { font-size: 0.7rem; color: var(--muted); }
.panel-note { font-size: 0.68rem; color: #556c7c; margin-top: 12px; line-height: 1.6; }
.panel-activity { display: flex; flex-direction: column; }

/* transactions */
.tx-list { display: flex; flex-direction: column; }
.tx-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tx-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.tx-icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  font-size: 0.7rem; font-weight: 600; flex: none;
  background: rgba(255, 255, 255, 0.05); color: var(--soft); border: 1px solid var(--line);
}
.tx-icon.up { background: var(--mint-dim); color: var(--mint); border-color: rgba(67, 215, 168, 0.24); }
.tx-body { flex: 1; min-width: 0; }
.tx-body strong { display: block; font-size: 0.83rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-body span { font-size: 0.68rem; color: var(--muted); }
.tx-right { text-align: right; flex: none; }
.tx-right .amount { display: block; font-size: 0.87rem; }
.tx-right .state { font-size: 0.64rem; color: var(--muted); }
.amount.up { color: var(--mint); }
.amount.down { color: #d9e6ec; }
.state.is-pending { color: var(--amber); }
.state.is-flagged { color: var(--red); }
.state.is-declined, .state.is-reversed { color: #7d93a2; }

.empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 34px 16px; text-align: center; color: var(--muted);
}
.empty-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  font-size: 1.1rem; color: #6d8595; margin-bottom: 4px;
}
.empty p { font-size: 0.85rem; color: var(--soft); }
.empty span { font-size: 0.74rem; }
.empty.small { padding: 22px 12px; }
.empty a { color: var(--mint); }

/* standing */
.standing { display: flex; flex-direction: column; gap: 1px; }
.standing > div {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.standing > div:last-child { border-bottom: 0; padding-bottom: 0; }
.standing dt { font-size: 0.74rem; color: var(--muted); }
.standing dd { font-size: 0.76rem; text-align: right; color: var(--soft); }
.verified { color: var(--mint); font-weight: 600; }
.verified::before { content: "● "; font-size: 0.55rem; vertical-align: middle; }
.waiting { color: var(--amber); font-weight: 600; }

/* movers */
.movers { display: flex; flex-direction: column; }
.movers li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 0.78rem;
}
.movers li:last-child { border-bottom: 0; }
.tick { color: var(--soft); font-weight: 500; letter-spacing: 0.04em; }
.up { color: var(--mint); }
.down { color: var(--red); }

/* accounts + wallets */
.deck { margin-top: 0; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.account-card {
  padding: 16px 17px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(20, 44, 58, 0.6), rgba(9, 22, 31, 0.85));
  border: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 10px;
}
.account-card.is-pending { border-color: rgba(230, 180, 85, 0.3); }
.account-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.account-name { font-size: 0.86rem; font-weight: 500; }
.account-number { font-size: 0.74rem; color: var(--muted); letter-spacing: 0.02em; }
.account-balance { font-size: 1.15rem; font-weight: 500; }
.account-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.66rem; color: #5c7383; }

.badge {
  font-size: 0.62rem; padding: 2px 8px; border-radius: 99px; font-weight: 600; flex: none;
  background: var(--mint-dim); color: var(--mint); border: 1px solid rgba(67, 215, 168, 0.26);
}
.badge.is-pending { background: var(--amber-dim); color: var(--amber); border-color: rgba(230, 180, 85, 0.3); }
.badge.is-off { background: rgba(255, 255, 255, 0.05); color: #8298a6; border-color: var(--line); }

.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.wallet-card {
  padding: 16px 17px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(30, 30, 20, 0.35), rgba(9, 22, 31, 0.9));
  display: flex; flex-direction: column; gap: 9px;
}
.wallet-card.is-pending { border-color: rgba(230, 180, 85, 0.3); }
.wallet-address {
  font-size: 0.67rem; letter-spacing: -0.01em; color: var(--soft); word-break: break-all;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line);
  border-radius: 9px; padding: 8px 10px;
}

/* footer */
.app-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; font-size: 0.68rem; color: #4f6574;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.app-foot a { color: var(--soft); }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .hero-stat { padding: 14px 16px; }
  .hero-stat strong { font-size: 1rem; }
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: static; height: auto; flex-direction: row; align-items: center;
    flex-wrap: wrap; gap: 12px; padding: 14px 18px;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .side .brand { margin-right: auto; }
  .side-profile { order: 2; padding: 8px 10px; }
  .side-nav { order: 4; flex-direction: row; width: 100%; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .side-nav a { white-space: nowrap; padding: 8px 11px; font-size: 0.78rem; }
  .side-nav a i { display: none; }
  .side-foot { order: 3; margin: 0; padding: 0; border: 0; flex-direction: row; }
  .side-foot a { display: none; }
  .side-link { width: auto; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--soft); }
  .main { padding: 22px 18px 38px; }
  .wallet-address { font-size: 0.63rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar h1 { font-size: 1.25rem; }
  .asof { display: none; }
  .breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-main { padding: 22px 20px; }
  .hero-side { flex-direction: column; }
  .hero-stat { padding: 14px 20px; }
  .hero-stat strong { font-size: 1rem; }
  .breakdown { gap: 12px 14px; margin-top: 20px; }

  .side { padding: 12px 16px; gap: 10px; }
  .side-profile { display: none; }
  .side .brand { gap: 9px; }
  .side .brand-mark { width: 34px; height: 34px; }
  .side-foot .side-link { padding: 6px 11px; font-size: 0.74rem; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px 14px 13px; }
  .stat-label { font-size: 0.68rem; }
  .stat-value { font-size: 1.02rem; margin: 8px 0 4px; }
  .stat-foot { font-size: 0.64rem; line-height: 1.45; }

  .tx-list li { gap: 10px; padding: 11px 0; }
  .tx-icon { width: 31px; height: 31px; border-radius: 9px; }
  .tx-right .amount { font-size: 0.84rem; }
  .tx-acct { display: none; }

  .wallet-card { padding: 14px; }
  .wallet-address { font-size: 0.61rem; padding: 7px 9px; }

  .auth-card { padding: 28px 22px 24px; }
  .panel { padding: 17px 16px; }
}
