/* Shared mock-up UI: phone shell, app screens, rows, switches and charts.
   Everything here is decorative; the real content is the text around it. */

/* ---------- phone ---------- */
.phone {
  flex: none;
  width: 296px;
  max-width: 100%;
  aspect-ratio: 296 / 608;
}

.phone__frame {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10px;
  border-radius: 48px;
  background: var(--phone-frame);
  box-shadow: 0 0 0 1px var(--phone-ring), 0 48px 80px -32px rgba(14, 17, 22, 0.4),
    0 16px 32px -16px rgba(14, 17, 22, 0.25);
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 38px;
  background: var(--app-bg);
}

.phone__island {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 80px;
  height: 22px;
  border-radius: var(--r-pill);
  background: #05070a;
  transform: translateX(-50%);
}

/* ---------- app screen ---------- */
.app {
  --panel-bg: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 0 16px;
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: left;
}

.app__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 40px;
  padding: 8px 8px 0;
  font-size: var(--fs-xs);
  font-weight: var(--w-strong);
}

.app__status-icons {
  display: flex;
  gap: 4px;
}

.app__status-icons .i {
  width: 14px;
  height: 14px;
}

.app__head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
}

.app__sub {
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.app__title {
  font-size: 1.125rem;
  font-weight: var(--w-strong);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.app__hint {
  font-size: 0.8125rem;
  color: var(--text-2);
}

.app__label {
  margin-bottom: 8px;
  font-size: var(--fs-xs);
  font-weight: var(--w-strong);
  color: var(--text-3);
}

.app__headline {
  font-size: 0.9375rem;
  font-weight: var(--w-strong);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.app__card {
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.app__balance {
  flex: none;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.app__balance .app__sub {
  color: inherit;
  opacity: 0.72;
}

.app__amount {
  font-size: 1.5rem;
  font-weight: var(--w-strong);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.app__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--btn-arrow-bg);
}

.app__stat-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  opacity: 0.72;
}

.app__stat-label .i {
  width: 12px;
  height: 12px;
}

.app__stat-val {
  font-size: 0.8125rem;
  font-weight: var(--w-strong);
  font-variant-numeric: tabular-nums;
}

.app__chart {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.app__chart > div:last-child {
  flex: 1;
  min-width: 0;
}

.app__chart .app__label {
  margin-bottom: 4px;
}

.app__tabs {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  margin: auto -16px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.app__tab {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text-3);
}

.app__tab.is-active {
  color: var(--text);
}

.app__tab--fab {
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.app__btn {
  display: grid;
  place-items: center;
  flex: none;
  height: 44px;
  margin-top: auto;
  margin-bottom: 20px;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: var(--w-strong);
}

/* ---------- donut ---------- */
.donut-wrap {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-center__amt {
  font-size: 0.8125rem;
  font-weight: var(--w-strong);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.donut-center__label {
  font-size: 0.6875rem;
  color: var(--text-3);
}

.report .donut-center__amt {
  font-size: 1.25rem;
}

.legend {
  display: grid;
  gap: 0;
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--text-2);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend__pct {
  margin-left: auto;
  font-weight: var(--w-strong);
  color: var(--text);
}

/* ---------- rows ---------- */
.rows {
  display: grid;
  gap: 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.row__main {
  display: grid;
  flex: 1;
  min-width: 0;
}

.row__title,
.row__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row__title {
  font-size: var(--fs-sm);
  font-weight: var(--w-strong);
  line-height: 1.3;
}

.row__meta {
  font-size: var(--fs-xs);
  line-height: 1.3;
  color: var(--text-3);
}

.row__amt {
  flex: none;
  font-size: var(--fs-sm);
  font-weight: var(--w-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row__amt.is-in,
.is-in {
  color: var(--accent-ink);
}

.app .row,
.sms__result .row,
.nl__group .row {
  padding: 8px 12px 8px 8px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.app .row {
  padding: 6px 10px 6px 6px;
}

.app .cat {
  width: 32px;
  height: 32px;
}

.row--panel {
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--panel-bg, var(--surface-2));
}

.app .row--panel {
  border: 1px solid var(--line);
}

.row--fresh {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---------- switches and sender lists ---------- */
.switch {
  position: relative;
  flex: none;
  width: 40px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--bar-muted);
  transition: background-color 0.4s var(--ease);
}

.switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(14, 17, 22, 0.25);
  transition: transform 0.4s var(--ease);
}

.switch.is-on {
  background: var(--accent);
}

.switch.is-on .switch__knob {
  transform: translateX(16px);
}

.senders {
  display: grid;
  gap: 8px;
}

.sender {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--panel-bg, var(--surface-2));
  font-size: 0.8125rem;
  font-weight: var(--w-strong);
}

.app .sender {
  border: 1px solid var(--line);
}

.app .senders {
  gap: 6px;
}

/* ---------- tips ---------- */
.tips {
  display: grid;
  gap: 12px;
}

.tip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.tip__body {
  flex: 1;
  min-width: 0;
}

.tip__text {
  font-size: var(--fs-sm);
  line-height: 1.4;
}

.tip__meta {
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.tip .chip {
  flex: none;
}

.tips--compact {
  gap: 8px;
}

.tips--compact .tip {
  padding: 10px;
}

.tips--compact .tip__text {
  font-size: 0.8125rem;
}

.tips--compact .chip {
  display: none;
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 72px;
  margin: 12px 0 20px;
}

.mini-bars span {
  position: relative;
  flex: 1;
  height: calc(var(--h) * 100%);
  min-height: 8px;
  border-radius: 8px 8px 4px 4px;
  background: var(--bar-muted);
}

.mini-bars .is-now {
  background: var(--accent);
}

.mini-bars i {
  position: absolute;
  right: 0;
  bottom: -18px;
  left: 0;
  font-size: 0.6875rem;
  font-style: normal;
  text-align: center;
  color: var(--text-3);
}

/* ---------- how-it-works screen switching (CSS-driven, no JS animation needed) ---------- */
.hiw__screen {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease), visibility 0s linear 0.5s;
}

.hiw__screen.is-active {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.hiw__screen .app__item {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}

.hiw__screen.is-active .app__item {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 70ms + 160ms);
}
