:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --ink: #151515;
  --soft-ink: #3f3f3a;
  --muted: #78776f;
  --line: rgba(21, 21, 21, 0.1);
  --panel: rgba(255, 255, 255, 0.92);
  --black: #151515;
  --green: #0f766e;
  --red: #c71f36;
  --purple: #7c3aed;
  --gray: #6b7280;
  --steel: #eef2f1;
  --danger: #b42318;
  --shadow: 0 18px 42px rgba(21, 21, 21, 0.1);
  --highlight: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #d7d7d2;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 12px;
  font-size: 16px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.62);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

label > span,
.hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

[hidden] {
  display: none !important;
}

.login {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 10%, rgba(199, 31, 54, 0.13), transparent 30%),
    linear-gradient(180deg, #f7f7f4, #e3e3dc);
}

.login-panel {
  width: min(390px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 26px 70px rgba(21, 21, 21, 0.18), var(--highlight);
  padding: 18px;
}

.login-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  text-align: center;
}

.login-logo {
  width: min(260px, 72vw);
  margin: 0 auto;
}

.login-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.login-access {
  display: grid;
  gap: 12px;
}

.app-frame {
  position: relative;
  width: min(430px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 4%, rgba(199, 31, 54, 0.09), transparent 28%),
    radial-gradient(circle at 90% 8%, rgba(15, 118, 110, 0.11), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 244, 241, 0.96) 30%),
    var(--bg);
  padding: max(10px, env(safe-area-inset-top)) 14px calc(150px + env(safe-area-inset-bottom));
}

.app-frame::before {
  position: fixed;
  inset: 0;
  max-width: 430px;
  margin: 0 auto;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(21, 21, 21, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 21, 21, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, black, transparent 62%);
}

.app-header,
.month-hero,
.method-grid,
.hero-tabs,
.command-panel,
.insight-strip,
.quick-list,
.bottom-nav,
.panel,
.entry-form {
  position: relative;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 8px;
  background: url("/digislam-favicon.png") center / 31px auto no-repeat, white;
  box-shadow: var(--highlight), 0 10px 22px rgba(21, 21, 21, 0.08);
}

.brand-lockup div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand-lockup h1 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  white-space: normal;
}

.brand-lockup p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.round-button,
.month-arrow,
.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--green);
  box-shadow: var(--highlight), 0 8px 18px rgba(21, 21, 21, 0.08);
}

.muted-action {
  color: var(--soft-ink);
}

.month-hero {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.14), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(199, 31, 54, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    var(--black);
  color: white;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 22px 48px rgba(21, 21, 21, 0.2);
}

.hero-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.hero-top label {
  text-align: center;
}

.hero-top span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
  text-transform: capitalize;
}

#overviewMonth {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.month-arrow {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: white;
  box-shadow: none;
  font-size: 28px;
}

.hero-amount {
  display: block;
  color: white;
  text-align: center;
  font-size: 36px;
  font-weight: 950;
  line-height: 0.98;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.hero-meta span {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  padding: 7px 5px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.hero-meta b {
  font-weight: 900;
}

.hero-meta .down {
  color: #ffd9df;
}

.hero-meta .up {
  color: #d6fff6;
}

.hero-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  padding: 5px;
}

.hero-tabs button {
  min-height: 32px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
}

.hero-tabs .active {
  background: linear-gradient(180deg, white, #ecefed);
  color: var(--black);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.hero-trend {
  display: grid;
  gap: 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
  padding: 8px;
}

.hero-trend span {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 68px;
  align-items: center;
  gap: 8px;
}

.hero-trend em {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.hero-trend i {
  position: relative;
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-trend i::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.86);
  content: "";
}

.hero-trend span:first-child i::before {
  background: var(--green);
}

.hero-trend .today i::before {
  background: var(--red);
}

.hero-trend strong {
  color: white;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin: 8px 0 0;
}

.method-grid article {
  position: relative;
  grid-column: span 3;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent), black 8%);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent), black 10%));
  color: white;
  padding: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 24px color-mix(in srgb, var(--accent), transparent 78%);
}

.method-grid article:nth-child(n + 3) {
  grid-column: span 2;
  padding: 8px;
}

.method-grid article::before {
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.76);
  content: "";
}

.method-grid span,
.section-head span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.method-grid strong {
  display: block;
  margin-top: 5px;
  color: white;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.method-grid em {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  padding: 4px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.insight-strip {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.insight-strip span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 246, 0.9)), var(--panel);
  box-shadow: var(--highlight), 0 9px 18px rgba(21, 21, 21, 0.055);
  padding: 8px;
  color: var(--soft-ink);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.insight-strip b {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.insight-strip em {
  font-style: normal;
}

.quick-list,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--highlight), var(--shadow);
  padding: 14px;
}

.quick-list {
  margin-top: 8px;
  margin-bottom: 112px;
}

.section-head,
.panel-head,
.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head span {
  color: var(--muted);
}

.section-head h2,
.section-head h3,
.panel-head h2,
.form-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.08;
}

.section-head button {
  width: 56px;
  min-height: 36px;
  border: 1px solid var(--line);
  background: white;
  color: var(--green);
  font-size: 13px;
}

.list-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7f8f6, #ecefed);
  padding: 5px;
}

.list-switch button {
  min-height: 36px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.list-switch .active {
  background: linear-gradient(180deg, #232323, #111);
  color: white;
  box-shadow: 0 10px 20px rgba(21, 21, 21, 0.14);
}

.month-group {
  display: grid;
  gap: 0;
}

.month-group + .month-group {
  margin-top: 16px;
}

.month-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 118, 110, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 246, 0.9));
  color: var(--ink);
  padding: 12px;
  box-shadow: var(--highlight), 0 10px 24px rgba(21, 21, 21, 0.07);
}

.month-head h3,
.month-head p {
  margin: 0;
}

.month-head h3 {
  font-size: 18px;
  text-transform: capitalize;
}

.month-head p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.month-head strong {
  border-radius: 8px;
  background: var(--black);
  color: white;
  padding: 9px 10px;
  font-size: 18px;
  white-space: nowrap;
}

.month-totals {
  display: none;
}

.history-list {
  display: grid;
}

.daily-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 8px;
  text-align: left;
  box-shadow: var(--highlight), 0 8px 18px rgba(21, 21, 21, 0.045);
}

.daily-row + .daily-row {
  margin-top: 7px;
}

.daily-row time {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7f8f6, #e9eeeb);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-row time b {
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.daily-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.daily-row span b {
  display: block;
  margin-bottom: 2px;
  color: var(--soft-ink);
  font-size: 14px;
}

.daily-row small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.daily-row small i {
  border-radius: 999px;
  background: linear-gradient(180deg, #f2f5f4, #e8eeec);
  color: var(--muted);
  padding: 3px 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.daily-row > strong {
  color: var(--ink);
  font-size: 16px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.daily-row::after {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #eef5f3;
  color: var(--green);
  font-size: 15px;
  font-weight: 950;
  content: "✎";
}

.floating-new-entry {
  position: fixed;
  left: 50%;
  bottom: calc(70px + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(402px, calc(100vw - 20px));
  min-height: 56px;
  transform: translateX(-50%);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, var(--red), #a91d30);
  color: white;
  box-shadow: 0 18px 38px rgba(199, 31, 54, 0.3);
}

.floating-new-entry span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 18px;
}

.floating-new-entry strong {
  font-size: 16px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: min(402px, calc(100vw - 20px));
  transform: translateX(-50%);
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--highlight), 0 16px 38px rgba(21, 21, 21, 0.16);
  padding: 5px;
  backdrop-filter: blur(16px);
}

.bottom-nav:has(.back-button:not([hidden])) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bottom-nav button {
  min-height: 48px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.bottom-nav .active {
  background: linear-gradient(180deg, #262626, #111);
  color: white;
  box-shadow: 0 10px 22px rgba(21, 21, 21, 0.16);
}

.entry-form:not([hidden]) {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 8;
  display: grid;
  gap: 8px;
  width: min(430px, 100vw);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  transform: translateX(-50%);
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 8px 8px 0 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(199, 31, 54, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 246, 243, 0.96));
  box-shadow: var(--highlight), 0 -22px 48px rgba(21, 21, 21, 0.22);
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
}

.entry-form:not([hidden])::before {
  width: 44px;
  height: 5px;
  margin: 0 auto 2px;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.16);
  content: "";
}

.form-head {
  margin-bottom: 0;
}

.form-head h2 {
  font-size: 23px;
}

.quick-entry,
.transfer-panel {
  display: grid;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
}

.quick-entry #quickType {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.date-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #f7f8f6, #ecefed);
  padding: 5px;
}

.date-picker button {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.date-picker .active {
  background: linear-gradient(180deg, #232323, #111);
  color: white;
}

.quick-date-field {
  margin-top: -2px;
}

.amount-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.quick-type-card {
  display: grid;
  gap: 5px;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 9px;
  text-align: left;
  box-shadow: var(--highlight), 0 8px 16px rgba(21, 21, 21, 0.05);
}

.quick-type-card::before {
  display: block;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  content: "";
}

.quick-type-card.pos::before {
  background: #111827;
}

.quick-type-card.cash::before {
  background: var(--red);
}

.quick-type-card.transfer::before {
  background: var(--green);
}

.quick-type-card.paypal::before {
  background: var(--purple);
}

.quick-type-card.other::before {
  background: var(--gray);
}

.quick-type-card.active {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: var(--highlight), 0 12px 28px rgba(21, 21, 21, 0.13);
}

.quick-type-card span,
.quick-amount-field span,
#quickTransferNameRow span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-type-card strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.quick-type-card.other {
  grid-column: 1 / -1;
  min-height: 58px;
}

.quick-amount-field input {
  border-color: rgba(15, 118, 110, 0.22);
  font-size: 26px;
  font-weight: 950;
}

.quick-dates button,
.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--green);
}

.date-row {
  display: grid;
  gap: 8px;
}

.transfer-list {
  display: grid;
  gap: 7px;
}

.transfer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 120px) 44px;
  gap: 7px;
}

.transfer-total,
.form-actions,
.import-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.primary,
.save-entry {
  border: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent 42%), linear-gradient(180deg, var(--red), #a91d30);
  color: white;
  box-shadow: 0 16px 30px rgba(199, 31, 54, 0.22);
}

.danger {
  border: 1px solid rgba(180, 35, 24, 0.2);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.form-actions button {
  flex: 1;
}

.panel {
  display: grid;
  gap: 12px;
}

.stats-panel {
  gap: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 112px;
}

.stats-panel .panel-head {
  align-items: end;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #262626, #111);
  color: white;
  margin: 0;
  padding: 14px;
  box-shadow: 0 18px 38px rgba(21, 21, 21, 0.16);
}

.stats-panel .panel-head span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-panel .panel-head h2 {
  color: white;
  font-size: 26px;
}

.stats-mode-control {
  width: 132px;
  gap: 4px;
}

.stats-mode-control select {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.filters,
.stats-grid,
.method-stats,
.charts {
  display: grid;
  gap: 8px;
}

.filters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 246, 0.9));
  padding: 10px;
  box-shadow: var(--highlight), 0 10px 22px rgba(21, 21, 21, 0.055);
}

.filters label:not([hidden]) {
  min-width: 0;
}

.stats-grid,
.method-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 118, 110, 0.08), transparent 32%),
    white;
  padding: 10px;
  box-shadow: var(--highlight), 0 8px 18px rgba(21, 21, 21, 0.05);
}

.method-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.method-stats > div {
  position: relative;
  grid-column: span 3;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--method-color), black 8%);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(180deg, var(--method-color), color-mix(in srgb, var(--method-color), black 10%));
  color: white;
  padding: 10px;
}

.method-stats > div:nth-child(n + 3) {
  grid-column: span 2;
}

.chart-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 246, 0.9)),
    white;
  padding: 12px;
  box-shadow: var(--highlight), 0 10px 24px rgba(21, 21, 21, 0.07);
}

.stats-grid span,
.method-stats dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-grid strong,
.method-stats dd {
  display: block;
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.method-stats dd {
  margin-left: 0;
}

.method-stats dt,
.method-stats dd,
.method-stats span {
  color: white;
}

.method-stats span {
  position: absolute;
  top: 9px;
  right: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
}

.chart-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.chart-box canvas {
  width: 100%;
  max-width: 100%;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  border-radius: 999px;
  background: #eef2f1;
  padding: 5px 7px;
  font-size: 10px;
  font-weight: 850;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 431px) {
  body {
    padding: 18px 0;
  }

  .app-frame {
    min-height: calc(100vh - 36px);
    border: 1px solid rgba(21, 21, 21, 0.16);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(21, 21, 21, 0.22);
  }
}

@media (max-width: 370px) {
  .brand-mark {
    width: 40px;
    height: 40px;
    background-size: 31px auto;
  }

  .brand-lockup h1 {
    font-size: 17px;
  }

  .hero-amount {
    font-size: 35px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .daily-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .daily-row > strong {
    grid-column: 2;
  }
}
