html:has(.al-page),
body:has(.al-page) {
  height: 100%;
  overflow: hidden;
}

body:has(.al-page) .app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.app-main:has(.al-page) {
  padding: 0;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #020302;
}

body:has(.al-page) .tabbar {
  display: none !important;
}

.al-page {
  --c-accent: #b6f53a;
  --c-muted: #8f9688;
  --c-sub: #8f9688;
  --c-soft: #dfe8d2;
  --c-card: rgba(14, 18, 12, 0.72);
  --c-border: rgba(182, 245, 58, 0.14);
  --al-topbar-height: 48px;
  --al-tabs-height: 50px;
  --al-tabs-gap: 8px;
  --al-head-height: calc(var(--al-topbar-height) + var(--al-tabs-height) + var(--al-tabs-gap) + var(--safe-top));
  position: relative;
  isolation: isolate;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  padding-top: var(--al-head-height);
  box-sizing: border-box;
  background:
    radial-gradient(120% 70% at 50% -8%, rgba(126, 201, 34, 0.14), transparent 55%),
    linear-gradient(180deg, #050805 0%, #020302 50%, #000 100%);
  color: #f4f7ef;
  font-feature-settings: "tnum" 1;
}

.al-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.al-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.48;
  animation: al-float 10s ease-in-out infinite;
}

.al-orb-a {
  width: 210px;
  height: 210px;
  top: 8%;
  right: -70px;
  background: radial-gradient(circle, rgba(182, 245, 58, 0.3), transparent 68%);
}

.al-orb-b {
  width: 240px;
  height: 240px;
  bottom: 18%;
  left: -90px;
  background: radial-gradient(circle, rgba(90, 160, 30, 0.22), transparent 70%);
  animation-delay: -3.5s;
}

.al-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(182, 245, 58, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 245, 58, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 70%);
  opacity: 0.6;
}

@keyframes al-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(14px) scale(1.05); }
}

.al-head {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 auto !important;
  transform: none !important;
  width: 100%;
  max-width: 480px;
  z-index: 90;
  background: linear-gradient(180deg, rgba(2, 3, 2, 0.96) 0%, rgba(2, 3, 2, 0.88) 70%, rgba(2, 3, 2, 0.72));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: var(--safe-top);
  box-sizing: border-box;
}

.al-topbar {
  height: var(--al-topbar-height);
  padding: 0 16px;
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
}

.al-back {
  width: 36px;
  height: 36px;
  margin-left: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #eef7dc;
  border: 1px solid rgba(182, 245, 58, 0.16);
  background: rgba(182, 245, 58, 0.06);
  text-decoration: none;
}

.al-back:active {
  background: rgba(182, 245, 58, 0.14);
  color: var(--c-accent);
}

.al-title {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.03em;
}

.al-topbar-spacer {
  width: 36px;
  height: 36px;
}

.al-tabs {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--al-tabs-height);
  margin: 0 16px var(--al-tabs-gap);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(182, 245, 58, 0.14);
  background: rgba(8, 12, 6, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow-x: auto;
  overflow-y: hidden;
  gap: 4px;
  box-sizing: border-box;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

.al-tab {
  position: relative;
  flex: 1 0 auto;
  min-width: max-content;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--c-sub);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.al-tab.is-active {
  color: #0b1204;
  background: linear-gradient(90deg, #7ec922, #c8ff4a);
  box-shadow: 0 0 16px rgba(182, 245, 58, 0.28);
}

.al-tab.is-active::after {
  display: none;
}

.al-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 10px 0 calc(16px + var(--safe-bottom));
  box-sizing: border-box;
}

.al-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
  min-height: 120px;
}

.al-empty {
  border: 1px dashed rgba(182, 245, 58, 0.18);
  border-radius: 14px;
  background: rgba(14, 18, 12, 0.45);
  padding: 48px 14px;
  text-align: center;
  color: var(--c-muted);
  font-size: 13px;
}

.al-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--c-border);
  background:
    linear-gradient(145deg, rgba(182, 245, 58, 0.07), transparent 42%),
    var(--c-card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.al-item-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(182, 245, 58, 0.35);
  background: rgba(182, 245, 58, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(182, 245, 58, 0.14);
}

.al-item-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(182, 245, 58, 0.35));
}

.al-item-main {
  flex: 1;
  min-width: 0;
}

.al-item-title {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  line-height: 1.25;
}

.al-item-time {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--c-sub);
  line-height: 1;
}

.al-item-amount {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--c-soft);
  text-align: right;
  white-space: nowrap;
}

.al-item-amount.is-income {
  color: var(--c-accent);
  text-shadow: 0 0 12px rgba(182, 245, 58, 0.28);
}

.al-page .app-list-more {
  color: var(--c-muted);
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  max-width: min(86vw, 360px);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(10, 14, 8, 0.94);
  border: 1px solid rgba(182, 245, 58, 0.22);
  color: #f2f2f2;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 240;
  text-align: center;
  box-shadow: 0 0 20px rgba(182, 245, 58, 0.1);
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .al-orb {
    animation: none !important;
  }
}
