/* Đối tác MoMo mini app, styled with the MoMo Design System.
   The tokens below are the design system's own names and values (Figma
   "colors", "Spacing", "Radius" and "Typography" collections). Rules use the
   semantic --theme-* tokens; the four --base-black-* steps are the ones the
   design system's own Chip, HandleBar, Switch and Toast use directly. */
/* Fallback face for devices without SF Pro Text (Android, Windows): Inter,
   SIL Open Font License (fonts/OFL.txt). SF Pro itself may not be embedded
   on the web; Apple devices render it as the system font and never fetch
   these files. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-vietnamese-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --theme-primary: rgb(235, 47, 150);
  --theme-secondary: rgb(247, 172, 213);
  --theme-gradient: rgb(253, 202, 222);
  --theme-brand: rgb(165, 0, 100);
  --theme-bg-default: rgb(242, 242, 246);
  --theme-bg-surface: rgb(255, 255, 255);
  --theme-bg-tonal: rgb(253, 234, 244);
  --theme-bg-selected: rgb(254, 244, 250);
  --theme-bg-pressed: rgb(223, 223, 230);
  --theme-bg-disable: rgb(235, 235, 242);
  --base-black-03: rgb(240, 240, 240);
  --theme-txt-default: rgb(48, 50, 51);
  --theme-txt-secondary: rgb(72, 72, 72);
  --theme-txt-hint: rgb(114, 114, 114);
  --theme-txt-disable: rgb(198, 198, 198);
  --theme-txt-white: rgb(255, 255, 255);
  --theme-bd-default: rgb(232, 232, 232);
  --base-black-06: rgb(216, 216, 216);
  --theme-success-primary: rgb(52, 199, 89);
  --theme-success-container: rgb(214, 244, 222);
  --theme-warning-primary: rgb(250, 84, 28);
  --theme-warning-container: rgb(254, 221, 210);
  --theme-error-primary: rgb(245, 34, 45);
  --theme-error-container: rgb(253, 211, 213);
  --theme-interactive-primary: rgb(0, 122, 255);
  --theme-interactive-container: rgb(204, 228, 255);
  --theme-overlay: rgba(0, 0, 0, 0.6);
  --base-black-17: rgb(48, 50, 51);
  --base-black-07: rgb(204, 204, 204);

  --space-xxs: 2px;
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 12px;
  --space-l: 16px;
  --space-xl: 24px;
  --radius-xs: 4px;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 24px;
  --shadow-light: 0 2px 10px rgba(48, 50, 51, 0.07);
  --shadow-dark: 0 2px 10px rgba(48, 50, 51, 0.25);

  --font-family-base: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --typo-headline-xl-bold: 700 28px/40px var(--font-family-base);
  --typo-headline-l-bold: 700 24px/34px var(--font-family-base);
  --typo-header-m-bold: 700 18px/26px var(--font-family-base);
  --typo-header-default-bold: 700 16px/22px var(--font-family-base);
  --typo-header-s-semibold: 600 14px/20px var(--font-family-base);
  --typo-header-xs-semibold: 600 12px/18px var(--font-family-base);
  --typo-body-default: 400 14px/20px var(--font-family-base);
  --typo-description-default: 400 12px/18px var(--font-family-base);
  --typo-description-xs: 400 10px/14px var(--font-family-base);
  --typo-label-default-medium: 500 14px/20px var(--font-family-base);
  --typo-label-s-medium: 500 12px/18px var(--font-family-base);
  --typo-label-xs-medium: 500 10px/14px var(--font-family-base);
  --typo-action-default-bold: 700 16px/22px var(--font-family-base);
  --typo-action-s-bold: 700 14px/20px var(--font-family-base);
  --typo-action-xs-bold: 700 12px/18px var(--font-family-base);

  /* The box is hardware with its own dark screen; these are not app theme. */
  --box-body: #17141f;
  --box-bezel: #2c2838;
  --box-key: #3a3547;

  font: var(--typo-body-default);
  color: var(--theme-txt-default);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
html, body { margin: 0; background: var(--theme-bg-pressed); }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
b { font-weight: 600; }
p { margin: 0; }
.icon { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--theme-interactive-primary); outline-offset: 2px; }

.phone {
  --tone: var(--theme-gradient);
  position: relative;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background: linear-gradient(var(--tone), var(--theme-bg-default)) top / 100% 260px no-repeat var(--theme-bg-default);
  display: flex;
  flex-direction: column;
}
/* Each tab has its own header tint, as in the partner app. */
.phone[data-tone="blue"] { --tone: rgb(166, 208, 255); }
.phone[data-tone="peach"] { --tone: rgb(253, 217, 194); }
.phone[data-tone="purple"] { --tone: rgb(232, 210, 255); }
@media (min-width: 520px) {
  .phone { min-height: calc(100vh - 32px); margin: 16px auto; border-radius: var(--radius-xl); overflow: clip; box-shadow: var(--shadow-dark); }
}

/* Header: tab tint, back in a white circle, support | home capsule */
.top {
  display: flex; align-items: center; gap: var(--space-s);
  min-height: 56px;
  padding: var(--space-s) var(--space-m);
  background: var(--tone);
  position: sticky; top: 0; z-index: 5;
}
.top h1 { flex: 1; min-width: 0; margin: 0; font: var(--typo-header-m-bold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-shop { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-s); }
.top-shop .who { min-width: 0; display: flex; flex-direction: column; }
.top-shop .who b { font: var(--typo-header-default-bold); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-shop .who span { font: var(--typo-description-default); color: var(--theme-txt-secondary); }
.back { width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; padding: 0; background: var(--theme-bg-surface); display: grid; place-items: center; }
.back:active { background: var(--theme-bg-pressed); }
.capsule { flex: none; display: flex; align-items: center; gap: var(--space-s); height: 32px; padding: 0 10px; border-radius: var(--radius-l); background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(48, 50, 51, .1); }
.capsule a { display: grid; place-items: center; }
.capsule i { width: 1px; height: 16px; background: var(--base-black-07); }
.top-mo { position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--box-body); display: grid; place-items: center; }
.top-mo svg { width: 26px; height: 26px; }
.top-mo.lg { width: 48px; height: 48px; }
.top-mo.lg svg { width: 36px; height: 36px; }
.top-mo.on::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--theme-success-primary); box-shadow: 0 0 0 2px var(--theme-bg-surface); }

main { flex: 1; padding: var(--space-m) var(--space-m) 88px; display: flex; flex-direction: column; gap: var(--space-m); }

/* Bottom tab */
.tabs {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--theme-bg-surface);
  box-shadow: inset 0 1px 0 var(--theme-bd-default);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 6;
}
@media (min-width: 520px) { .tabs { bottom: 16px; border-radius: 0 0 var(--radius-xl) var(--radius-xl); } }
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-xxs);
  padding: 10px 0 var(--space-s);
  font: var(--typo-description-xs); color: var(--theme-txt-hint);
  position: relative; white-space: nowrap;
}
.tabs a::before { content: ""; position: absolute; top: 0; left: 50%; width: 44px; height: 2px; margin-left: -22px; border-radius: 0 0 1px 1px; background: transparent; }
.tabs a.on { font: var(--typo-label-xs-medium); color: var(--theme-primary); }
.tabs a.on::before { background: var(--theme-primary); }
.tabs .ic { display: grid; place-items: center; width: 28px; height: 28px; }
.tabs em { position: absolute; top: 4px; left: 50%; margin-left: 4px; padding: 0 5px; border-radius: var(--radius-s); background: var(--theme-warning-primary); color: var(--theme-txt-white); font: var(--typo-label-xs-medium); font-style: normal; }

/* Cards: white, radius 16, no border, no shadow on the grey page */
.card { background: var(--theme-bg-surface); border-radius: var(--radius-l); padding: var(--space-l); }
.card h2 { margin: 0 0 var(--space-m); font: var(--typo-header-default-bold); display: flex; align-items: center; gap: var(--space-s); }
.card h2 .more { margin-left: auto; font: var(--typo-action-s-bold); color: var(--theme-primary); background: none; border: 0; padding: 0; }
.muted { color: var(--theme-txt-hint); }
.small { font: var(--typo-description-default); }
.note { font: var(--typo-description-default); color: var(--theme-txt-hint); margin-top: var(--space-s); }
.lead { color: var(--theme-txt-secondary); margin-top: var(--space-xs); }
.link { display: inline-flex; align-items: center; font: var(--typo-label-s-medium); color: var(--theme-txt-hint); }
.row { display: flex; align-items: center; gap: var(--space-s); }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: var(--space-s); }
.stack.center { align-items: center; text-align: center; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: var(--space-m); }

/* Tag */
.pill { display: inline-flex; align-items: center; gap: var(--space-xs); font: var(--typo-label-s-medium); padding: 1px var(--space-s); border-radius: var(--radius-s); background: var(--theme-bd-default); color: var(--theme-txt-default); white-space: nowrap; }
.pill.green { background: var(--theme-success-container); color: var(--theme-success-primary); }
.pill.amber { background: var(--theme-warning-container); color: var(--theme-warning-primary); }
.pill.red { background: var(--theme-error-container); color: var(--theme-error-primary); }
.pill.blue { background: var(--theme-interactive-container); color: var(--theme-interactive-primary); }
.pill.pink { background: var(--theme-bg-tonal); color: var(--theme-primary); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Button: md 36 by default, .lg 48, .sm 28; primary, tonal, secondary */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  height: 36px; padding: 0 var(--space-m);
  border: 0; border-radius: var(--radius-s);
  font: var(--typo-action-s-bold); text-align: center; white-space: nowrap;
  background: var(--theme-primary); color: var(--theme-txt-white);
}
.btn.ghost { background: var(--theme-bg-tonal); color: var(--theme-primary); }
.btn.line { background: var(--theme-bg-surface); color: var(--theme-primary); box-shadow: inset 0 0 0 1px var(--theme-primary); }
.btn.plain { background: var(--theme-bg-surface); color: var(--theme-txt-default); box-shadow: inset 0 0 0 1px var(--theme-bd-default); }
.btn.lg { height: 48px; padding: 0 var(--space-l); font: var(--typo-action-default-bold); }
.btn.sm { height: 28px; padding: 0 var(--space-s); font: var(--typo-action-xs-bold); }
.btn.block { width: 100%; }
.btn:active { filter: brightness(0.94); }
.btn:disabled { background: var(--theme-bg-disable); color: var(--theme-txt-disable); box-shadow: none; cursor: default; filter: none; }

/* Hero: tonal pink, radius 16, the amount in primary */
.hero { background: var(--theme-bg-tonal); border-radius: var(--radius-l); padding: var(--space-l); }
.hero .label { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--theme-txt-secondary); }
.big { font: var(--typo-headline-xl-bold); margin: var(--space-xs) 0; }
.hero .big { color: var(--theme-primary); }
.hero .sub { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.hero .pill:not([class*=" "]) { background: var(--theme-bg-surface); }
.eye { border: 0; background: none; color: var(--theme-txt-hint); padding: 0; display: grid; place-items: center; }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-s); margin-top: var(--space-m); }
.split div { background: var(--theme-bg-default); border-radius: var(--radius-s); padding: var(--space-s); min-width: 0; }
.hero .split div { background: var(--theme-bg-surface); }
.split span { display: block; font: var(--typo-description-default); color: var(--theme-txt-hint); }
.split b { display: block; font: var(--typo-header-s-semibold); margin-top: var(--space-xxs); overflow: hidden; text-overflow: ellipsis; }

/* Box mirror */
.boxcard { display: grid; grid-template-columns: 132px 1fr; gap: var(--space-m); align-items: center; }
.boxcard .stack { min-width: 0; align-items: flex-start; }
.device {
  width: 132px; aspect-ratio: 240 / 284;
  background: var(--box-body); border-radius: var(--radius-l); padding: var(--space-s);
  box-shadow: inset 0 0 0 3px var(--box-bezel);
  color: var(--theme-txt-white); font-size: 9px; line-height: 1.25;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden; position: relative;
}
.device .face { display: flex; align-items: center; gap: var(--space-xs); }
.device .face svg { width: 30px; height: 30px; flex: none; }
.device .face .name { font-size: 8px; opacity: .7; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.device .t { font-weight: 700; font-size: 10px; }
.device .v { font-weight: 700; font-size: 15px; color: var(--theme-secondary); }
.device .c { opacity: .75; }
.device .rows { display: flex; flex-direction: column; gap: 1px; margin-top: 2px; }
.device .rows div { display: flex; justify-content: space-between; gap: var(--space-xs); border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 1px; }
.device .rows span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; opacity: .85; }
.device .rows span:last-child { white-space: nowrap; font-weight: 600; }
.device .badge { position: absolute; top: 8px; right: 8px; background: var(--theme-primary); border-radius: var(--radius-s); padding: 1px 5px; font-weight: 700; font-size: 8px; }
.device .btns { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.device .btns button { border: 0; border-radius: var(--radius-xs); padding: 4px 0; font-size: 9px; font-weight: 700; color: var(--theme-txt-white); }
.device .btns .yes { background: var(--theme-primary); }
.device .btns .no { background: var(--box-key); }
.device.big { width: 100%; max-width: 240px; font-size: 13px; border-radius: var(--radius-xl); padding: 14px; gap: 6px; }
.device.big .face svg { width: 56px; height: 56px; }
.device.big .face .name { font-size: 12px; }
.device.big .t { font-size: 15px; }
.device.big .v { font-size: 24px; }
.device.big .badge { font-size: 11px; top: 14px; right: 14px; }
.device.big .btns button { font-size: 13px; padding: 8px 0; border-radius: var(--radius-s); }
.status-line { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.status-line .pill { white-space: normal; }

/* Lists: rows 8 px vertical, 40 px icon well, divider between rows */
.list { display: flex; flex-direction: column; }
.item { display: flex; gap: var(--space-s); align-items: center; padding: var(--space-s) 0; border-top: 1px solid var(--theme-bd-default); }
.item:first-child { border-top: 0; padding-top: 0; }
.item:last-child { padding-bottom: 0; }
.item .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--theme-bg-default); color: var(--theme-txt-default); }
.item .ico.warn { background: var(--theme-error-container); color: var(--theme-error-primary); }
.item .ico.mo { background: var(--theme-bg-tonal); color: var(--theme-primary); }
.item .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-xxs); }
.item .main b { font: var(--typo-header-s-semibold); }
.item .main span:not(.pill) { font: var(--typo-description-default); color: var(--theme-txt-hint); overflow: hidden; text-overflow: ellipsis; }
.item .amt { font: var(--typo-header-s-semibold); white-space: nowrap; }
.amt.in { color: var(--theme-success-primary); }

/* Proposals */
.proposal { box-shadow: inset 0 0 0 1px var(--theme-bd-default); border-radius: var(--radius-m); padding: var(--space-m); display: flex; flex-direction: column; gap: var(--space-xs); }
.proposal .ttl { font: var(--typo-header-s-semibold); margin-top: var(--space-xs); }
.proposal .sum { color: var(--theme-txt-secondary); }
.proposal .act { display: flex; gap: var(--space-s); margin-top: var(--space-s); }
.proposal .act .btn { flex: 1; }

/* Quick actions: 48 px tonal circle */
.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xs); }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); font: var(--typo-description-default); text-align: center; }
.shortcut .ic { width: 48px; height: 48px; border-radius: 50%; background: var(--theme-bg-tonal); display: grid; place-items: center; }

/* Handled counter */
.handled { display: flex; gap: var(--space-m); align-items: center; }
.handled .num { font: var(--typo-headline-xl-bold); color: var(--theme-primary); min-width: 48px; text-align: center; }
.handled .muted { font: var(--typo-description-default); margin-top: var(--space-xxs); }

/* Information: a state container, no decoration */
.alert, .notice { display: flex; gap: var(--space-s); align-items: flex-start; border-radius: var(--radius-s); }
.alert { background: var(--theme-error-container); }
.notice { background: var(--theme-warning-container); align-items: center; }
.alert > .icon { color: var(--theme-error-primary); }
.notice > .icon { color: var(--theme-warning-primary); }
.alert .muted, .notice .muted { color: var(--theme-txt-secondary); margin-top: var(--space-xxs); }

/* Chip */
.chips { display: flex; gap: var(--space-s); overflow-x: auto; scrollbar-width: none; }
.chips.wrap { flex-wrap: wrap; }
.chips.gap { margin: var(--space-s) 0; }
.chip { border: 0; background: var(--base-black-03); border-radius: var(--radius-xl); padding: 6px var(--space-m); font: var(--typo-label-default-medium); white-space: nowrap; color: var(--theme-txt-default); }
.chip.on { background: var(--theme-bg-selected); color: var(--theme-primary); box-shadow: inset 0 0 0 2px var(--theme-secondary); }

/* Bars */
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--space-s); align-items: end; height: 110px; }
.bars div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: var(--space-xs); height: 100%; }
.bars i { display: block; width: 70%; border-radius: var(--radius-xs) var(--radius-xs) 0 0; background: var(--theme-secondary); min-height: 3px; }
.bars div.today i { background: var(--theme-primary); }
.bars span { font: var(--typo-description-xs); color: var(--theme-txt-hint); }
.bars div.today span { font: var(--typo-label-xs-medium); color: var(--theme-txt-default); }

/* Progress */
.meter { position: relative; height: 8px; background: var(--theme-bd-default); border-radius: var(--radius-xs); margin: var(--space-s) 0 var(--space-xs); }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--theme-primary); border-radius: var(--radius-xs); }
.meter .mark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--theme-txt-secondary); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: var(--space-s) var(--space-m); }
.kv > span:nth-child(odd) { color: var(--theme-txt-secondary); }
.kv > span:nth-child(even) { font: var(--typo-header-s-semibold); text-align: right; }

/* Ask MoBox */
.ask { display: flex; gap: var(--space-s); }
.ask input { flex: 1; min-width: 0; }
.bubble { background: var(--theme-bg-tonal); border-radius: var(--radius-m) var(--radius-m) var(--radius-m) var(--radius-xs); padding: var(--space-s) var(--space-m); align-self: flex-start; max-width: 88%; }
.bubble.me { background: var(--theme-bg-default); border-radius: var(--radius-m) var(--radius-m) var(--radius-xs) var(--radius-m); align-self: flex-end; }

/* Input: radius 8, 1 px border, primary border when active.
   Text stays 16 px so iOS Safari does not zoom the page on focus. */
.input, .ask input, .field input, .field select {
  height: 48px; padding: 0 var(--space-m);
  border: 0; border-radius: var(--radius-s);
  box-shadow: inset 0 0 0 1px var(--theme-bd-default);
  background: var(--theme-bg-surface);
  font-size: 16px; line-height: 22px;
  outline: 0;
}
.ask input { height: 36px; }
.input::placeholder, .ask input::placeholder, .field input::placeholder { color: var(--theme-txt-hint); }
.input:focus, .ask input:focus, .field input:focus, .field select:focus { box-shadow: inset 0 0 0 1px var(--theme-primary); }
.field { display: flex; flex-direction: column; gap: var(--space-xs); font: var(--typo-label-s-medium); color: var(--theme-txt-secondary); }

/* Skills */
.skill { display: flex; gap: var(--space-m); align-items: flex-start; padding: var(--space-m) 0; border-top: 1px solid var(--theme-bd-default); }
.skill:first-of-type { border-top: 0; padding-top: 0; }
.skill:last-of-type { padding-bottom: 0; }
.skill .main { flex: 1; min-width: 0; }
.skill .main b { font: var(--typo-header-s-semibold); }
.skill .main .muted { margin-top: var(--space-xxs); }
.skill ul { margin: var(--space-xs) 0; padding-left: 18px; color: var(--theme-txt-secondary); }

/* Switch: 38 x 22 track, ring knob, green when on */
.switch { position: relative; width: 38px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 1px 0; background: var(--base-black-07); border-radius: 11px; transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 4px; top: 4px; border: 4px solid var(--theme-bg-surface); border-radius: 50%; transition: transform .2s; }
.switch input:checked + span { background: var(--theme-success-primary); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:disabled { cursor: default; }
.switch input:disabled + span { opacity: .45; }
.switch input:focus-visible + span { outline: 2px solid var(--theme-interactive-primary); outline-offset: 2px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--base-black-17); color: var(--theme-txt-white); min-height: 48px; padding: 14px var(--space-m); border-radius: var(--radius-s); font: var(--typo-body-default); max-width: 416px; width: calc(100% - 24px); z-index: 30; box-shadow: var(--shadow-dark); }

/* Goods stepper */
.stock { display: flex; align-items: center; gap: var(--space-xs); }
.stock button { min-width: 28px; height: 28px; padding: 0 var(--space-xs); border: 0; border-radius: var(--radius-s); background: var(--theme-bg-surface); box-shadow: inset 0 0 0 1px var(--theme-bd-default); font: var(--typo-action-xs-bold); }
.stock button:active { background: var(--theme-bg-pressed); }
.stock b { min-width: 40px; text-align: center; font: var(--typo-header-s-semibold); }

/* Demo board */
.demo { box-shadow: inset 0 0 0 1px var(--base-black-06); }
.demo .grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-s); }
.demo .grid .btn { padding: 0 var(--space-xs); overflow: hidden; text-overflow: ellipsis; }

/* Login */
.login { margin: var(--space-xl) 0; display: flex; flex-direction: column; gap: var(--space-m); text-align: center; }
.login > svg { width: 88px; height: 88px; margin: 0 auto; background: var(--box-body); border-radius: var(--radius-xl); padding: var(--space-s); }
.login b { font: var(--typo-header-m-bold); }

.empty { text-align: center; color: var(--theme-txt-hint); padding: var(--space-m) 0; }
.skeleton { height: 120px; border-radius: var(--radius-m); background: linear-gradient(90deg, var(--theme-bd-default) 25%, var(--theme-bg-surface) 50%, var(--theme-bd-default) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* MoBox's face */
.mo-eye { transform-origin: center; transform-box: fill-box; }
.mood-idle .mo-eye { animation: blink 5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.mood-thinking .mo-eyes { animation: look 3s ease-in-out infinite; }
@keyframes look { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
.mood-alert .mo-face-g { animation: shake .5s ease-in-out 2; }
@keyframes shake { 25% { transform: translateX(-1.5px); } 75% { transform: translateX(1.5px); } }
.mood-happy .mo-face-g { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { .mo-eye, .mo-eyes, .mo-face-g, .skeleton { animation: none !important; } }

/* Section title on the grey page */
.sect { margin: var(--space-xs) var(--space-xs) calc(-1 * var(--space-xs)); font: var(--typo-header-m-bold); }
.sect small { display: block; font: var(--typo-body-default); color: var(--theme-txt-secondary); }

/* Revenue card (Tổng quan): gradient ring, amount | count, trend, MoBox strip */
.revenue { position: relative; box-shadow: 0 0 0 1.5px var(--theme-secondary), var(--shadow-light); z-index: 1; }
.revenue .rev-label { display: inline-flex; align-items: center; gap: var(--space-s); font: var(--typo-header-default-bold); }
.revenue .bell { position: relative; color: var(--theme-primary); border: 0; background: none; padding: 0; }
.revenue .bell[data-n]::after { content: attr(data-n); position: absolute; top: -6px; right: -8px; min-width: 16px; padding: 0 4px; border-radius: var(--radius-s); background: var(--theme-error-primary); color: var(--theme-txt-white); font: var(--typo-label-xs-medium); text-align: center; }
.rev-main { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; gap: var(--space-m); margin: var(--space-xs) 0; }
.rev-main > i { height: 36px; background: var(--theme-bd-default); }
.rev-main .big { margin: 0; white-space: nowrap; }
.rev-main .count { text-align: center; color: var(--theme-txt-secondary); }
.rev-main .count b { font: var(--typo-headline-xl-bold); color: var(--theme-txt-default); margin-right: var(--space-xs); }
.trend { display: inline-flex; align-items: center; gap: var(--space-xs); color: var(--theme-txt-secondary); }
.trend b { display: inline-flex; align-items: center; font-weight: 600; }
.trend.up b { color: var(--theme-success-primary); }
.trend.down b { color: var(--theme-warning-primary); }
.strip { display: flex; align-items: center; gap: var(--space-s); margin-top: var(--space-m); padding: var(--space-s) var(--space-m); border-radius: var(--radius-xl); background: var(--theme-bg-tonal); font: var(--typo-description-default); }
.strip b { color: var(--theme-primary); font-weight: 700; }
.strip .go { margin-left: auto; font: var(--typo-action-xs-bold); color: var(--theme-primary); white-space: nowrap; }
.strip .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* "Dòng tiền của bạn" / "Mở rộng": a tab hanging under the summary */
.flow { margin: calc(-1 * var(--space-m)) var(--space-xl) 0; background: var(--theme-bg-surface); border-radius: 0 0 var(--radius-l) var(--radius-l); }
.flow summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: var(--space-xs); padding: var(--space-s); font: var(--typo-label-default-medium); color: var(--theme-primary); cursor: pointer; }
.flow summary::-webkit-details-marker { display: none; }
.flow[open] summary .icon { transform: rotate(180deg); }
.flow .inner { padding: 0 var(--space-m) var(--space-m); }
.flow .split { margin-top: 0; }
.band + .flow { margin-top: calc(-1 * var(--space-m)); }
.band + .flow summary { color: var(--theme-txt-hint); }

/* Quick actions: tonal rounded square, as on the partner home */
.shortcuts { grid-template-columns: repeat(5, 1fr); }
.shortcut .ic { border-radius: var(--radius-m); color: var(--theme-primary); }
.shortcut { color: var(--theme-txt-secondary); gap: var(--space-xs); }

/* Linked-box notice (yellow card on the partner home) */
.linkbox { display: flex; gap: var(--space-m); align-items: flex-start; background: rgb(255, 249, 230); box-shadow: inset 0 0 0 1px rgb(250, 226, 150); }
.linkbox .go { display: inline-flex; align-items: center; margin-top: var(--space-xs); font: var(--typo-action-s-bold); color: var(--theme-primary); }

/* Sổ thu chi: white band with period chips and the centred total */
.band { margin: calc(-1 * var(--space-m)) calc(-1 * var(--space-m)) 0; padding: var(--space-m); background: var(--theme-bg-surface); text-align: center; }
.band .chips { margin-bottom: var(--space-l); }
.band .cap { color: var(--theme-txt-hint); }
.band .big { display: inline-flex; align-items: center; gap: var(--space-s); font: 700 32px/44px var(--font-family-base); }
.band .trend { display: flex; justify-content: center; padding-bottom: var(--space-m); }

/* Ask MoBox: face, one-line input, send; suggestions as tonal cards */
.askcard { box-shadow: inset 0 0 0 1px var(--theme-bd-default); }
.askcard .ask { align-items: center; }
.askcard .ask input { height: 40px; padding: 0; box-shadow: none; }
.askcard .ask input:focus { box-shadow: none; }
.askcard .send { border: 0; background: none; padding: var(--space-xs); color: var(--theme-primary); }
.askcard .stack:not(:empty) { margin-bottom: var(--space-s); }
.suggest { display: flex; gap: var(--space-s); overflow-x: auto; scrollbar-width: none; margin: var(--space-s) calc(-1 * var(--space-l)) 0; padding: 0 var(--space-l); }
.suggest button { flex: none; width: 132px; min-height: 60px; padding: var(--space-s) var(--space-m); border: 0; border-radius: var(--radius-m); background: var(--theme-bg-selected); text-align: left; font: var(--typo-body-default); }

/* Transactions: search, day header, rows */
.search { display: flex; align-items: center; gap: var(--space-s); }
.search label { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-s); height: 40px; padding: 0 var(--space-m); border-radius: var(--radius-xl); background: var(--base-black-03); color: var(--theme-txt-hint); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: 16px; color: var(--theme-txt-default); }
.txlist { margin: var(--space-m) calc(-1 * var(--space-l)) calc(-1 * var(--space-l)); }
.day { padding: var(--space-s) var(--space-l); background: rgb(229, 240, 255); font: var(--typo-header-s-semibold); }
.tx { display: flex; gap: var(--space-m); align-items: center; padding: var(--space-m) var(--space-l); border-top: 1px solid var(--theme-bd-default); }
.day + .tx { border-top: 0; }
.tx .ico { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--theme-bd-default); color: var(--theme-txt-hint); }
.tx.in .ico { color: var(--theme-success-primary); }
.tx .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-xxs); }
.tx .main b { font: var(--typo-header-default-bold); font-weight: 500; }
.tx .main span { color: var(--theme-txt-hint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx .main .how { display: flex; align-items: center; gap: var(--space-xs); color: var(--theme-txt-secondary); font: var(--typo-description-default); }
.tx .amt { align-self: flex-end; font: var(--typo-header-default-bold); white-space: nowrap; }
.fab { position: fixed; z-index: 4; bottom: calc(76px + env(safe-area-inset-bottom)); right: max(var(--space-m), calc(50% - 220px + var(--space-m))); height: 44px; padding: 0 var(--space-l); border-radius: var(--radius-s); box-shadow: var(--shadow-dark); font: var(--typo-action-default-bold); }
@media (min-width: 520px) { .fab { bottom: 92px; } }
main.has-fab { padding-bottom: 148px; }

/* Entry form: outlined fields with the label on the border */
.ofield { position: relative; display: block; border-radius: var(--radius-m); box-shadow: inset 0 0 0 1px var(--base-black-06); padding: 0 var(--space-m); }
.ofield:focus-within { box-shadow: inset 0 0 0 1.5px var(--theme-primary); }
.ofield > span { position: absolute; top: -9px; left: var(--space-m); padding: 0 var(--space-xs); background: var(--theme-bg-surface); font: var(--typo-description-default); color: var(--theme-txt-hint); }
.ofield > span i { color: var(--theme-error-primary); font-style: normal; }
.ofield input { width: 100%; height: 56px; border: 0; background: none; outline: 0; font-size: 16px; }
.ofield input.money { font: 700 24px/34px var(--font-family-base); }
.ofield .icon { position: absolute; right: var(--space-m); top: 16px; color: var(--theme-txt-secondary); }
.form { display: flex; flex-direction: column; gap: var(--space-xl); padding-top: var(--space-xl); }
.form .lbl { font: var(--typo-header-default-bold); margin-bottom: calc(-1 * var(--space-m)); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-s); }
.opts button { height: 40px; border: 0; border-radius: var(--radius-s); background: var(--base-black-03); font: var(--typo-label-default-medium); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-s); }
.opts button.on { background: var(--theme-bg-selected); color: var(--theme-txt-default); box-shadow: inset 0 0 0 1px var(--theme-secondary); }
.opts button.on .icon { color: var(--theme-primary); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); }

/* Feature card (Tài chính): coloured title, tonal table, checklist, outlined action */
.feature { display: flex; flex-direction: column; gap: var(--space-m); box-shadow: inset 0 0 0 1.5px var(--ring, var(--theme-secondary)); }
.feature .head b { display: block; font: var(--typo-headline-l-bold); font-size: 20px; line-height: 28px; color: var(--ink, var(--theme-primary)); }
.feature .head span { color: var(--theme-txt-secondary); }
.feature.warm { --ink: rgb(196, 106, 10); --ring: rgb(250, 214, 170); --tint: rgb(255, 245, 232); }
.feature.violet { --ink: rgb(165, 0, 100); --ring: rgb(214, 180, 250); --tint: rgb(247, 240, 255); }
.feature.rose { --ink: rgb(214, 62, 30); --ring: rgb(250, 190, 170); --tint: rgb(255, 243, 230); }
.table { border-radius: var(--radius-m); background: var(--tint, var(--theme-bg-selected)); padding: 0 var(--space-m); }
.table div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-m); padding: var(--space-m) 0; border-top: 1px solid rgba(48, 50, 51, .06); }
.table div:first-child { border-top: 0; }
.table b { font: var(--typo-header-default-bold); color: var(--ink, var(--theme-primary)); text-align: right; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-s); }
.checks li { display: flex; gap: var(--space-s); align-items: flex-start; }
.checks .icon { color: var(--theme-primary); margin-top: 1px; }
.sub { font: var(--typo-header-default-bold); }

/* Tài khoản: profile card and grouped menus */
.profile .who { display: flex; align-items: center; gap: var(--space-m); margin-bottom: var(--space-m); }
.profile .who b { font: var(--typo-header-default-bold); text-transform: uppercase; }
.blue { color: var(--theme-interactive-primary); }
.green { color: var(--theme-success-primary); }
.help { display: flex; align-items: center; gap: var(--space-s); margin-top: var(--space-m); padding: var(--space-s) var(--space-m); border-radius: var(--radius-s); background: var(--theme-bg-default); }
.menu { padding-bottom: var(--space-xs); }
.menu h2 { margin-bottom: var(--space-xs); }
.menu a { display: flex; align-items: center; gap: var(--space-m); padding: var(--space-m) 0; }
.menu a > .icon:first-child { color: var(--theme-primary); }
.menu a > .icon:last-child { color: var(--theme-primary); margin-left: auto; }
.menu a .pill { margin-left: calc(-1 * var(--space-xs)); }
.ver { text-align: center; font: var(--typo-description-xs); color: var(--theme-txt-hint); }
.pill.new { background: var(--theme-warning-primary); color: var(--theme-txt-white); }
