:root {
  color-scheme: dark;
  --bg: #08090b;
  --panel: #14161b;
  --panel-2: #1b1e25;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  --text: #f4f5f7;
  --muted: #9da3ad;
  --silver: #d9dde4;
  --silver-2: #aeb5c0;
  --glass: rgba(16, 18, 23, 0.68);
  --shine: rgba(255, 255, 255, 0.72);
  --danger: #ff6464;
  --ok: #c9ff7a;
  --warn: #ffd166;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% -8%, rgba(255, 255, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 110% 22%, rgba(190, 200, 215, 0.13), transparent 30rem),
    radial-gradient(circle at 50% 116%, rgba(255, 255, 255, 0.06), transparent 26rem),
    linear-gradient(145deg, #050506, #111319 48%, #090a0d);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 32%, black, transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 34rem);
  opacity: 0.58;
  animation: atmosphereShift 14s ease-in-out infinite alternate;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ambient {
  z-index: -1;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(100%, 720px);
  margin: 0 auto;
  min-height: 100vh;
  padding: max(22px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.login-view,
.app-view {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-view {
  justify-content: center;
  animation: pageRise 620ms cubic-bezier(.2, .9, .18, 1) both;
}

.brand,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  justify-content: flex-start;
}

.mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #050506;
  overflow: hidden;
  box-shadow: 0 18px 54px rgba(255, 255, 255, 0.12), inset 0 0 24px rgba(255, 255, 255, 0.06);
  position: relative;
}

.mark::after {
  content: "";
  position: absolute;
  inset: -45%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.34), transparent 65%);
  transform: translateX(-76%) rotate(18deg);
  animation: logoSweep 5s ease-in-out infinite;
}

.mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--silver-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 8vw, 54px);
  line-height: 0.95;
}

h2 {
  font-size: 26px;
  line-height: 1.05;
}

.login-card,
.panel,
.stats-panel,
.guard-panel,
.result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)),
    var(--glass);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(128%);
  position: relative;
  overflow: hidden;
}

.login-card::before,
.panel::before,
.stats-panel::before,
.guard-panel::before,
.result::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.18), transparent 16rem),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  opacity: 0.55;
}

.login-card {
  padding: 18px;
  animation: cardEnter 720ms 90ms cubic-bezier(.2, .9, .18, 1) both;
}

.turnstile-wrap {
  display: grid;
  justify-items: center;
  margin: 2px 0 13px;
  min-height: 65px;
}

.field {
  display: grid;
  gap: 9px;
  margin-bottom: 13px;
}

.field span {
  color: var(--silver);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(10, 11, 14, 0.7);
  padding: 0 15px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08), 0 12px 34px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
  background: rgba(15, 17, 22, 0.92);
}

textarea {
  min-height: 160px;
  padding-top: 14px;
  line-height: 1.45;
  resize: vertical;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--silver) 50%), linear-gradient(135deg, var(--silver) 50%, transparent 50%);
  background-position: calc(100% - 20px) 24px, calc(100% - 14px) 24px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.primary,
.ghost {
  min-height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.primary::before,
.ghost::before,
.action::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.36), transparent 9rem);
  opacity: 0;
  transition: opacity 180ms ease;
}

.primary::after,
.ghost::after {
  content: "";
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -30%;
  width: 32%;
  transform: translateX(-170%) rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  opacity: 0.55;
  transition: transform 560ms ease;
}

.primary {
  width: 100%;
  color: #08090b;
  background: linear-gradient(135deg, #ffffff, #c1c7d0 55%, #838b98);
  box-shadow: 0 16px 44px rgba(255, 255, 255, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.ghost {
  min-height: 44px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 14px;
}

.primary:hover,
.ghost:hover,
.action:hover {
  transform: translateY(-2px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28), 0 0 34px rgba(255, 255, 255, 0.08);
}

.primary:hover::before,
.ghost:hover::before,
.action:hover::before {
  opacity: 1;
}

.primary:hover::after,
.ghost:hover::after {
  transform: translateX(520%) rotate(18deg);
}

.primary:active,
.ghost:active,
.action:active {
  transform: translateY(0) scale(0.985);
}

.primary:disabled {
  cursor: wait;
  filter: grayscale(0.35) brightness(0.78);
}

.message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.actions {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.action {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  display: grid;
  align-content: center;
  gap: 5px;
  text-align: left;
  padding: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  animation: actionPop 520ms cubic-bezier(.2, .9, .18, 1) both;
}

.action:nth-child(2) { animation-delay: 55ms; }
.action:nth-child(3) { animation-delay: 110ms; }
.action:nth-child(4) { animation-delay: 165ms; }

.action::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  right: -28px;
  bottom: -28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09), transparent 62%);
}

.action span {
  font-size: clamp(15px, 4vw, 20px);
  font-weight: 900;
}

.action small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.action.is-active {
  color: #08090b;
  background: linear-gradient(145deg, #ffffff, #c9cfd8);
  box-shadow: 0 18px 44px rgba(255, 255, 255, 0.12);
}

.action.is-active small {
  color: #323842;
}

.danger-action {
  border-color: rgba(255, 100, 100, 0.38);
}

.danger-action.is-active {
  color: #ffffff;
  background: linear-gradient(145deg, #6e1818, #e05353);
}

.danger-action.is-active small {
  color: rgba(255, 255, 255, 0.82);
}

.check-field {
  min-height: 56px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: center;
  margin: 2px 0 13px;
  padding: 13px;
  border: 1px solid rgba(255, 100, 100, 0.28);
  border-radius: 8px;
  background: rgba(255, 100, 100, 0.07);
}

.check-field input {
  width: 20px;
  min-height: 20px;
  accent-color: #ff6464;
}

.check-field span {
  color: var(--silver);
  font-size: 13px;
  font-weight: 900;
}

.panel {
  padding: 16px;
  animation: cardEnter 620ms 120ms cubic-bezier(.2, .9, .18, 1) both;
}

.stats-panel {
  padding: 16px;
  animation: cardEnter 620ms 120ms cubic-bezier(.2, .9, .18, 1) both;
}

.guard-panel {
  padding: 16px;
  animation: cardEnter 620ms 120ms cubic-bezier(.2, .9, .18, 1) both;
}

.command-card {
  width: min(180px, 48vw);
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.12), transparent 13rem),
    rgba(255, 255, 255, 0.045);
  display: grid;
  place-items: center;
  gap: 7px;
  text-align: center;
  padding: 16px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.command-card span {
  max-width: 100%;
  font-size: clamp(16px, 3vw, 30px);
  font-weight: 950;
  overflow-wrap: anywhere;
  line-height: 1.08;
}

.command-card small {
  color: var(--silver-2);
  font-size: 12px;
  font-weight: 850;
}

.command-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28), 0 0 34px rgba(255, 255, 255, 0.08);
}

.command-card.is-active {
  color: #08090b;
  background: linear-gradient(145deg, #ffffff, #c9cfd8);
}

.command-card.is-active small {
  color: #323842;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.035)),
    rgba(16, 18, 23, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.18), transparent 16rem),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  opacity: 0.55;
}

.modal-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.modal-card .field,
.modal-card .primary {
  position: relative;
}

.modal-close {
  min-width: 88px;
}

.stats-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.refresh-stats {
  min-width: 112px;
}

.stats-state {
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--silver);
  background: rgba(0, 0, 0, 0.22);
  font-weight: 900;
  text-align: center;
}

.stats-content {
  display: grid;
  gap: 12px;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat-card,
.chart-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08), transparent 12rem),
    rgba(0, 0, 0, 0.22);
}

.stat-card {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
}

.stat-label,
.stat-hint,
.bar-foot,
.legend-item small,
.month-column small {
  color: var(--silver-2);
  font-size: 11px;
  font-weight: 800;
}

.stat-value {
  font-size: clamp(19px, 4vw, 28px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(230px, 0.82fr);
  gap: 12px;
}

.chart-block {
  padding: 14px;
  overflow: hidden;
}

.overall-chart {
  min-height: 340px;
}

.expense-graph {
  display: grid;
  grid-template-columns: 74px 1fr;
  min-height: 318px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    rgba(255, 255, 255, 0.045);
  background-size: 100% 25%;
  padding: 16px 14px 12px;
}

.graph-scale {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  color: var(--silver-2);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  padding: 0 10px 28px 0;
}

.graph-plot {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(76px, 1fr));
  align-items: end;
  gap: clamp(12px, 4vw, 42px);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  padding: 0 10px;
  overflow-x: auto;
}

.graph-column {
  height: 254px;
  display: grid;
  grid-template-rows: 28px 1fr 30px;
  align-items: end;
  gap: 8px;
  text-align: center;
}

.graph-value {
  color: var(--silver);
  font-size: 12px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.graph-bar {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
}

.graph-bar span {
  width: min(86px, 72%);
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px 5px 0 0;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transition: height 520ms cubic-bezier(.2, .9, .18, 1);
}

.graph-label {
  color: var(--silver);
  font-size: 11px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.section-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.section-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.section-card-head {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
}

.section-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.24);
}

.section-card h4 {
  margin: 0;
  font-size: 17px;
}

.section-card small,
.section-facts span {
  color: var(--silver-2);
  font-size: 11px;
  font-weight: 850;
}

.section-card-head strong {
  color: var(--silver);
  font-size: 15px;
  white-space: nowrap;
}

.section-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.section-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.2));
}

.section-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.chart-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.chart-head h3 {
  margin: 0;
  font-size: 18px;
}

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

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.bar-money {
  color: var(--silver);
  white-space: nowrap;
}

.bar-track {
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.2);
  transition: width 420ms ease;
}

.pie-block {
  display: grid;
  gap: 10px;
}

.pie-wrap {
  width: min(220px, 66vw);
  aspect-ratio: 1;
  justify-self: center;
  position: relative;
  display: grid;
  place-items: center;
}

.pie {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.34), 0 18px 42px rgba(0, 0, 0, 0.28);
}

.pie-center {
  width: 56%;
  aspect-ratio: 1;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(8, 9, 11, 0.82);
  text-align: center;
}

.pie-center span {
  max-width: 86%;
  font-size: 17px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.pie-center small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

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

.legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 8px;
  align-items: center;
}

.legend-item span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-item strong {
  overflow-wrap: anywhere;
}

.month-chart {
  min-height: 190px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 1fr);
  align-items: end;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.month-column {
  min-width: 72px;
  display: grid;
  grid-template-rows: 132px auto auto;
  gap: 7px;
  text-align: center;
}

.month-bar {
  height: 132px;
  display: flex;
  align-items: end;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.month-bar span {
  width: 100%;
  min-height: 0;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #f8fafc, #9aa3af);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.2);
  transition: height 420ms ease;
}

.month-column strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.mode-title {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.submit {
  margin-top: 4px;
}

.result {
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.22);
  animation: cardEnter 420ms cubic-bezier(.2, .9, .18, 1) both;
}

.receipt {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.receipt-row {
  display: grid;
  grid-template-columns: minmax(72px, 0.38fr) 16px 1fr;
  gap: 8px;
  align-items: baseline;
}

.receipt-label {
  color: var(--silver-2);
  font-size: 12px;
  font-weight: 900;
}

.pipe {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 900;
}

.receipt-value {
  font-size: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  z-index: 50;
  transform: translate(-50%, -14px) scale(0.96);
  min-width: 128px;
  border: 1px solid rgba(197, 255, 122, 0.42);
  border-radius: 8px;
  padding: 11px 18px;
  color: #efffe2;
  background: rgba(42, 122, 58, 0.72);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

@keyframes atmosphereShift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 1%, 0) scale(1.05); }
}

@keyframes pageRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes actionPop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logoSweep {
  0%, 54% { transform: translateX(-76%) rotate(18deg); }
  72%, 100% { transform: translateX(76%) rotate(18deg); }
}

@media (max-width: 420px) {
  .shell {
    padding-left: 10px;
    padding-right: 10px;
  }

  .actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .action {
    min-height: 76px;
    padding: 10px;
  }

  .action small {
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  .actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-summary,
  .chart-grid,
  .section-details {
    grid-template-columns: 1fr;
  }

  .expense-graph {
    grid-template-columns: 58px 1fr;
    padding: 12px 10px 10px;
  }

  .graph-plot {
    grid-template-columns: repeat(4, minmax(62px, 1fr));
    gap: 10px;
  }

  .graph-column {
    height: 228px;
  }

  .stats-title-row,
  .chart-head {
    align-items: flex-start;
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}



.petals-gif {
  position: absolute;
  top: -92px;
  z-index: -1;
  width: min(760px, 72vw);
  opacity: 0.1;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: saturate(0.45) brightness(1.15) contrast(0.9);
  animation: petalsDrift 18s ease-in-out infinite;
}

.petals-gif-left {
  left: -170px;
}

.petals-gif-right {
  right: -170px;
  transform: scaleX(-1);
  animation-name: petalsDriftRight;
  animation-delay: -9s;
}

@keyframes petalsDrift {
  0%, 100% {
    opacity: 0.04;
    transform: translate3d(-18px, -12px, 0) scale(1.02);
  }

  35%, 70% {
    opacity: 0.1;
  }

  50% {
    transform: translate3d(34px, 30px, 0) scale(1.08);
  }
}

@keyframes petalsDriftRight {
  0%, 100% {
    opacity: 0.04;
    transform: translate3d(18px, -12px, 0) scaleX(-1) scale(1.02);
  }

  35%, 70% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.1;
    transform: translate3d(-34px, 30px, 0) scaleX(-1) scale(1.08);
  }
}

.chart-head .eyebrow,
.chart-head h3 {
  text-wrap: balance;
}

.expense-graph {
  grid-template-columns: 74px 1fr;
  min-height: 336px;
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 25%),
    rgba(255, 255, 255, 0.045);
  background-size: 100% 25%, auto;
  background-position: left bottom, left top;
  padding: 18px 14px 14px;
}

.graph-scale {
  height: 272px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 10px 0 0;
}

.graph-plot {
  height: 272px;
  align-items: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
  padding: 0 10px;
}

.graph-column {
  height: 100%;
  grid-template-rows: minmax(0, 1fr) 30px;
  align-items: stretch;
}

.graph-bar {
  position: relative;
  height: 100%;
}

.graph-bar span {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.graph-value {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-height, 0%) + 8px);
  transform: translateX(-50%);
  min-width: 72px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .petals-gif {
    width: 520px;
    top: -58px;
  }

  .petals-gif-left {
    left: -205px;
  }

  .petals-gif-right {
    right: -205px;
  }
}


.petals-gif {
  position: absolute;
  top: -92px;
  z-index: -1;
  width: min(760px, 72vw);
  opacity: 0.1;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: saturate(0.45) brightness(1.15) contrast(0.9);
  animation: petalsDrift 18s ease-in-out infinite;
}

.petals-gif-left {
  left: -170px;
}

.petals-gif-right {
  right: -170px;
  transform: scaleX(-1);
  animation-name: petalsDriftRight;
  animation-delay: -9s;
}

@keyframes petalsDrift {
  0%, 100% {
    opacity: 0.04;
    transform: translate3d(-18px, -12px, 0) scale(1.02);
  }

  35%, 70% {
    opacity: 0.1;
  }

  50% {
    transform: translate3d(34px, 30px, 0) scale(1.08);
  }
}

@keyframes petalsDriftRight {
  0%, 100% {
    opacity: 0.04;
    transform: translate3d(18px, -12px, 0) scaleX(-1) scale(1.02);
  }

  35%, 70% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.1;
    transform: translate3d(-34px, 30px, 0) scaleX(-1) scale(1.08);
  }
}

.chart-head .eyebrow,
.chart-head h3 {
  text-wrap: balance;
}

.expense-graph {
  grid-template-columns: 74px 1fr;
  min-height: 336px;
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 25%),
    rgba(255, 255, 255, 0.045);
  background-size: 100% 25%, auto;
  background-position: left bottom, left top;
  padding: 18px 14px 14px;
}

.graph-scale {
  height: 272px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 10px 0 0;
}

.graph-plot {
  height: 272px;
  align-items: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
  padding: 0 10px;
}

.graph-column {
  height: 100%;
  grid-template-rows: minmax(0, 1fr) 30px;
  align-items: stretch;
}

.graph-bar {
  position: relative;
  height: 100%;
}

.graph-bar span {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.graph-value {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-height, 0%) + 8px);
  transform: translateX(-50%);
  min-width: 72px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .petals-gif {
    width: 520px;
    top: -58px;
  }

  .petals-gif-left {
    left: -205px;
  }

  .petals-gif-right {
    right: -205px;
  }
}


.petals-gif {
  position: absolute;
  top: -92px;
  z-index: -1;
  width: min(760px, 72vw);
  opacity: 0.1;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: saturate(0.45) brightness(1.15) contrast(0.9);
  animation: petalsDrift 18s ease-in-out infinite;
}

.petals-gif-left {
  left: -170px;
}

.petals-gif-right {
  right: -170px;
  transform: scaleX(-1);
  animation-name: petalsDriftRight;
  animation-delay: -9s;
}

@keyframes petalsDrift {
  0%, 100% {
    opacity: 0.04;
    transform: translate3d(-18px, -12px, 0) scale(1.02);
  }

  35%, 70% {
    opacity: 0.1;
  }

  50% {
    transform: translate3d(34px, 30px, 0) scale(1.08);
  }
}

@keyframes petalsDriftRight {
  0%, 100% {
    opacity: 0.04;
    transform: translate3d(18px, -12px, 0) scaleX(-1) scale(1.02);
  }

  35%, 70% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.1;
    transform: translate3d(-34px, 30px, 0) scaleX(-1) scale(1.08);
  }
}

.chart-head .eyebrow,
.chart-head h3 {
  text-wrap: balance;
}

.expense-graph {
  grid-template-columns: 74px 1fr;
  min-height: 336px;
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 25%),
    rgba(255, 255, 255, 0.045);
  background-size: 100% 25%, auto;
  background-position: left bottom, left top;
  padding: 18px 14px 14px;
}

.graph-scale {
  height: 272px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 10px 0 0;
}

.graph-plot {
  height: 272px;
  align-items: stretch;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.46);
  padding: 0 10px;
}

.graph-column {
  height: 100%;
  grid-template-rows: minmax(0, 1fr) 30px;
  align-items: stretch;
}

.graph-bar {
  position: relative;
  height: 100%;
}

.graph-bar span {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.graph-value {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-height, 0%) + 8px);
  transform: translateX(-50%);
  min-width: 72px;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .petals-gif {
    width: 520px;
    top: -58px;
  }

  .petals-gif-left {
    left: -205px;
  }

  .petals-gif-right {
    right: -205px;
  }
}
