/* Colours and type sampled from the bank "Account Details" screenshot. */
:root {
  --bg: #f7f7f7;
  --surface: #ffffff;
  --ink: #1f2229;
  --slate: #3d4452;
  --muted: #8b909a;
  --line: #d9dadd;
  --border: #b9bbc0;
  --blue: #0b63b8;
  --blue-btn: #1664b8;
  --blue-press: #0f4f94;
  --green: #11755a;
  --red: #a8282c;
  --amber-bg: #fff6e0;
  --amber-ink: #7a5300;
  --radius-card: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, "Noto Sans HK", "PingFang HK", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #7fb4ea; outline-offset: 2px; }
.page { max-width: 560px; margin: 0 auto; padding: 0 20px 48px; }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface);
  display: grid; grid-template-columns: 56px 1fr 56px; align-items: center;
  height: 60px; padding-top: env(safe-area-inset-top, 0px);
  box-sizing: content-box;
}
.topbar h1 { margin: 0; text-align: center; font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.icon-btn {
  width: 48px; height: 48px; margin: 0 auto; border: 0; background: none; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; color: var(--ink); text-decoration: none;
}
.icon-btn:active { background: #eef0f3; }
.icon-btn svg { width: 26px; height: 26px; }

.menu {
  position: absolute; right: 12px; top: calc(56px + env(safe-area-inset-top, 0px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(20, 30, 50, .14); min-width: 180px; padding: 6px; z-index: 20;
}
.menu button, .menu a {
  display: block; width: 100%; text-align: left; padding: 12px 14px; border: 0; background: none;
  border-radius: 10px; font-size: 16px; cursor: pointer; color: var(--ink); text-decoration: none;
}
.menu button:hover, .menu a:hover { background: #f1f3f6; }

/* Account card */
.acct-card {
  margin-top: 18px; border: 1.5px solid var(--border); border-radius: var(--radius-card);
  padding: 16px 20px; background: transparent;
}
.acct-card .acct-name { font-size: 17px; font-weight: 700; color: var(--ink); }
.acct-card .acct-no { margin-top: 6px; font-size: 15px; letter-spacing: .04em; color: var(--ink); }
.acct-card .acct-owner { float: right; font-size: 14px; color: var(--muted); }

/* Balance */
.balance { text-align: center; margin: 34px 0 6px; color: var(--blue); line-height: 1; }
.balance .ccy { font-size: 20px; font-weight: 700; margin-right: 2px; }
.balance .amt { font-size: clamp(40px, 12vw, 52px); font-weight: 700; letter-spacing: -.01em; }
.avail { text-align: center; font-size: 18px; color: var(--ink); margin: 14px 0 0; }
.avail .gap { display: inline-block; width: .8em; }

.interest-note {
  margin: 20px auto 0; max-width: 420px; text-align: center; font-size: 14.5px; line-height: 1.45; color: var(--slate);
}
.interest-note strong { color: var(--green); font-weight: 700; }

/* Two outlined action buttons (Deposit / Withdrawal) */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.btn-outline {
  height: 64px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--bg);
  font-size: 19px; color: var(--ink); cursor: pointer; display: grid; place-items: center; text-decoration: none;
}
.btn-outline:active { background: #eceef1; }

/* Transaction history */
.section-title { font-size: 20px; font-weight: 700; color: var(--slate); margin: 38px 0 10px; }
.tabs { display: flex; align-items: stretch; border-bottom: 0; margin: 0 -4px; }
.tab {
  flex: 1; border: 0; background: none; padding: 14px 4px 12px; font-size: 17px; color: var(--muted);
  border-bottom: 3px solid transparent; cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue-btn); }
.tab-sep { width: 1px; background: var(--line); margin: 8px 6px 14px; }
.tab-filter { flex: 0 0 52px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.tab-filter svg { width: 26px; height: 26px; }
.filter-row { display: flex; gap: 8px; margin: 12px 0 0; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--border); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { border-color: var(--blue-btn); color: var(--blue-btn); font-weight: 600; }

.day-label { font-size: 17px; color: var(--slate); margin: 26px 0 10px; }
.day-label span { margin-left: 10px; }
.tx-list { background: var(--surface); }
.tx {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 28px 16px 28px;
  border-bottom: 1px solid var(--line);
}
.tx:last-child { border-bottom: 0; }
.tx .desc { font-size: 17px; color: var(--slate); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx .ref { grid-column: 1; font-size: 16px; color: var(--slate); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx .amt { font-size: 17px; font-weight: 500; text-align: right; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; font-size: 16px; line-height: 1.5; }

/* Forms (deposit / withdrawal / admin) */
.form-card { background: var(--surface); border-radius: var(--radius-card); padding: 22px 20px; margin-top: 22px; }
.label { display: block; font-size: 15px; color: var(--slate); margin-bottom: 8px; font-weight: 600; }
.hint { font-size: 14px; color: var(--muted); margin: 8px 0 0; line-height: 1.45; }
.money-input {
  display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--border); padding: 6px 2px 8px;
}
.money-input:focus-within { border-bottom-color: var(--blue-btn); }
.money-input .ccy { font-size: 22px; font-weight: 700; color: var(--blue); }
.money-input input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 40px; font-weight: 700; color: var(--blue); padding: 0;
}
.money-input input::placeholder { color: #c5d6ea; }
.text-input {
  width: 100%; height: 50px; border: 1.5px solid var(--border); border-radius: 12px; padding: 0 14px; font-size: 16px; background: var(--surface);
}
.text-input:focus { border-color: var(--blue-btn); outline: 0; }
.field { margin-top: 20px; }
.quick { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.btn-primary {
  display: block; width: 100%; height: 56px; border: 0; border-radius: 999px; background: var(--blue-btn); color: #fff;
  font-size: 19px; font-weight: 500; cursor: pointer; margin-top: 26px;
}
.btn-primary:active { background: var(--blue-press); }
.btn-primary:disabled { background: #9dbbdc; cursor: default; }
.btn-small {
  border: 1.5px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 14px; font-size: 15px; cursor: pointer;
}
.btn-small.solid { background: var(--blue-btn); border-color: var(--blue-btn); color: #fff; }
.btn-small.danger { color: var(--red); }

.alert { border-radius: 12px; padding: 12px 14px; font-size: 15px; line-height: 1.45; margin-top: 16px; }
.alert.error { background: #fdecec; color: var(--red); }
.alert.ok { background: #e7f5ef; color: var(--green); }
.alert.info { background: var(--amber-bg); color: var(--amber-ink); }

.pending-list { margin-top: 26px; }
.pending-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface);
  padding: 14px 16px; border-radius: 14px; margin-top: 10px; border: 1.5px dashed var(--border);
}
.pending-item .p-amt { font-weight: 700; font-size: 17px; }
.pending-item .p-meta { font-size: 13.5px; color: var(--muted); margin-top: 3px; }

/* Success sheet */
.done { text-align: center; padding: 34px 10px 8px; }
.done .big { font-size: 56px; line-height: 1; }
.done h2 { font-size: 22px; margin: 16px 0 8px; }
.done p { color: var(--slate); line-height: 1.5; margin: 0; }

/* Tables (admin) */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13.5px; padding: 8px 8px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
table.data td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data tr.link { cursor: pointer; }
table.data tr.link:hover td { background: #f5f8fc; }
.badge { display: inline-block; min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; text-align: center; margin-left: 8px; vertical-align: 2px; }
.badge.zero { background: #d7d9de; color: var(--slate); }

@media (max-width: 380px) {
  .tx { padding: 14px 16px; }
  .page { padding: 0 14px 40px; }
}

/* Daily interest card */
.daily { margin-top: 24px; }
.daily-card {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid #cfe3d9; border-radius: var(--radius-card); padding: 16px 18px 14px;
}
.daily-card:active { background: #fafdfb; }
.dc-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.dc-label { font-size: 13.5px; color: var(--muted); }
.dc-today { font-size: 26px; font-weight: 700; color: var(--green); margin-top: 2px; }
.dc-right { text-align: right; }
.dc-sofar { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.dc-bars { display: flex; align-items: flex-end; gap: 2px; height: 56px; margin: 14px 0 10px; }
.dc-bars .bar { flex: 1; background: #9fd1bb; border-radius: 3px 3px 0 0; min-width: 2px; }
.dc-bars .bar.today { background: var(--green); }
.dc-bars .bar.future { height: 6px; background: #e8ecef; }
.dc-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--slate); }
.dc-more { color: var(--blue); font-weight: 600; white-space: nowrap; }
.daily-panel { background: var(--surface); border-radius: var(--radius-card); padding: 6px 14px 14px; margin-top: 10px; }
.daily-table td { padding: 10px 6px; }
.daily-table tr.is-today td { font-weight: 700; }
.nowrap { white-space: nowrap; }
