:root {
  --app-accent: #3fd9cc;
  --app-accent-soft: #8fede4;
  --app-ink: #f2faf9;
  --app-muted: rgba(242, 250, 249, 0.55);
  --app-faint: rgba(242, 250, 249, 0.45);
  --app-glass-bg: rgba(255, 255, 255, 0.07);
  --app-glass-bg-strong: rgba(255, 255, 255, 0.09);
  --app-glass-border: rgba(255, 255, 255, 0.14);
  --app-sheet-bg: rgba(16, 52, 64, 0.82);
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-nav-height: 80px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  color-scheme: dark;
}

input,
textarea,
select {
  font: inherit;
  color: var(--app-ink);
  caret-color: var(--app-accent);
}

input::placeholder,
textarea::placeholder {
  color: var(--app-faint);
}

body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--app-ink);
  background: linear-gradient(175deg, #0b3140 0%, #07242d 45%, #041820 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a {
  color: var(--app-accent);
  text-decoration: none;
}

a:hover {
  color: var(--app-accent-soft);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

::-webkit-scrollbar {
  display: none;
}

* {
  scrollbar-width: none;
}

@keyframes appfloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -24px);
  }
}

@keyframes apppulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.25;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .app-blob,
  .app-sheet-panel {
    animation: none !important;
  }
}

.app-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.app-blob-top {
  top: -60px;
  right: -80px;
  width: 280px;
  height: 280px;
  background: radial-gradient(
    circle,
    rgba(63, 217, 204, 0.28),
    transparent 70%
  );
  animation: appfloat 9s ease-in-out infinite;
}

.app-blob-bottom {
  bottom: 120px;
  left: -90px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(90, 160, 220, 0.2), transparent 70%);
  animation: appfloat 12s ease-in-out infinite reverse;
}

.app-app-root {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.app-app-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(10px + var(--app-safe-top)) 16px var(--app-safe-bottom);
}

.app-app-header {
  flex: none;
  display: grid;
  grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr);
  align-items: start;
  min-height: 66px;
  padding: 0 0 12px;
}

.app-tab-deck {
  position: relative;
  flex: 1;
  min-height: 0;
}

.app-tab-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-tab-panel.is-active {
  visibility: visible;
  pointer-events: auto;
}

.app-tab {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 12px;
}

.app-tab-head {
  flex: none;
}

.app-currency-select {
  width: 64px;
  height: 32px;
  flex: none;
  appearance: auto;
  border: 1px solid rgba(63, 217, 204, 0.34);
  border-radius: 11px;
  padding: 0 6px;
  background: rgba(63, 217, 204, 0.12);
  color: #8fede4;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  outline: none;
}

.app-currency-select option {
  background: #10343d;
  color: var(--app-ink);
}

.app-money-picker {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  max-width: 100%;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
}

.app-money-picker-amount {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-money-picker-currency {
  font-size: 0.86em;
}

.app-money-picker-chevron {
  font-size: 0.72em;
  transform: translateY(-0.08em);
}

.app-currency-select.is-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.app-kpi-value .app-money-picker {
  font-size: 18px;
}

.app-scroll-y {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: var(--app-nav-height);
}

.app-tab-scroll {
  display: flex;
  flex-direction: column;
  gap: inherit;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.app-tab-scroll > * {
  flex: none;
}

.app-safe-zone {
  flex: none;
  height: calc(var(--app-nav-height) + var(--app-safe-bottom) + 8px);
  pointer-events: none;
}

.app-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-scroll-list > * {
  flex: none;
}

.app-rail-x {
  flex: none;
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding: 2px 0;
}

.app-rail-snap {
  scroll-snap-type: x mandatory;
}

.app-rail-snap > * {
  scroll-snap-align: start;
}

.app-rail-x > * {
  flex: none;
}

.app-shop-headrow {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-shop-headrow > .app-rail-x {
  flex: 1;
  min-width: 0;
}

.app-shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.app-agenda-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 200px;
  max-width: 78%;
  border-radius: 18px;
  padding: 11px 13px;
}

.app-home-leads {
  display: flex;
  flex-direction: column;
  flex: none;
}

.app-greeting {
  font-size: 22px;
  font-weight: 800;
}

.app-greeting-date {
  font-size: 12.5px;
  color: var(--app-muted);
  margin-top: 2px;
}

.app-kpi {
  border-radius: 20px;
  padding: 12px;
}

.app-kpi-title {
  font-size: 11px;
  color: var(--app-muted);
}

.app-kpi-value {
  font-size: 20px;
  font-weight: 800;
  margin-top: 2px;
  white-space: nowrap;
}

.app-kpi-note {
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-kpi-note-button {
  display: inline;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}

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

@media (max-height: 680px) {
  :root {
    --app-nav-height: 72px;
  }

  .app-app-header {
    min-height: 52px;
    padding-bottom: 8px;
  }

  .app-brand-logo {
    width: 52px;
    height: 50px;
  }

  .app-header-side {
    padding-top: 12px;
  }

  .app-tab {
    gap: 9px;
  }

  .card {
    border-radius: 20px;
    padding: 12px;
  }

  .app-greeting {
    font-size: 17px;
  }

  .app-greeting-date {
    font-size: 11px;
  }

  .app-kpi {
    border-radius: 16px;
    padding: 9px;
  }

  .app-kpi-value {
    font-size: 16px;
  }

  .app-kpi-note {
    font-size: 9.5px;
  }

  .app-section-header {
    margin-bottom: 8px;
  }

  .app-agenda-card {
    width: 172px;
    border-radius: 16px;
    padding: 9px 11px;
  }
}

@media (max-height: 560px) {
  .app-tab {
    gap: 8px;
  }

  .card {
    padding: 10px;
  }

  .app-greeting {
    font-size: 15px;
  }

  .app-kpi-value {
    font-size: 15px;
  }

  .app-agenda-card {
    padding: 8px 10px;
  }
}

.app-header-side {
  min-width: 64px;
  padding-top: 17px;
}

.app-brand-logo {
  display: block;
  width: 64px;
  height: 62px;
  object-fit: contain;
}

.glass {
  background: var(--app-glass-bg);
  border: 1px solid var(--app-glass-border);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.glass-strong {
  background: var(--app-glass-bg-strong);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.card {
  border-radius: 24px;
  padding: 16px;
}

.app-skeleton {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  animation: apppulse 1.4s ease-in-out infinite;
}

.app-input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--app-ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

input.app-input,
select.app-input {
  height: 44px;
}

.app-input:focus {
  border-color: rgba(63, 217, 204, 0.55);
}

.app-field-focus:focus,
.app-field-focus:focus-within {
  border-color: rgba(63, 217, 204, 0.55) !important;
}

.app-rich-surface h3 {
  margin: 10px 0 6px;
  font-size: 14px;
  font-weight: 800;
}

.app-rich-surface p {
  margin: 0 0 8px;
}

.app-rich-surface ul {
  margin: 0 0 8px;
  padding-left: 20px;
}

.app-input::placeholder {
  color: var(--app-faint);
}

select.app-input option {
  background: #0b3140;
  color: var(--app-ink);
}

.app-date-control {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  padding: 0 14px;
  color: var(--app-ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.app-date-control:focus-within {
  border-color: rgba(63, 217, 204, 0.55);
}

.app-date-control-input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: inherit;
  background: transparent;
  border: 0;
  outline: none;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
}

.app-date-control-input::-webkit-date-and-time-value {
  text-align: left;
}

.app-date-control-input::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.6);
}

.app-primary-btn {
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: #04252b;
  background: linear-gradient(
    160deg,
    rgba(63, 217, 204, 0.9),
    rgba(38, 160, 150, 0.85)
  );
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.app-primary-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.app-sheet-panel {
  animation: appsheet 0.22s ease-out;
}

.app-bottom-nav {
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
}

body:has(.app-sheet-layer) .app-bottom-nav {
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
}

.app-tab-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 2px;
}

.app-tab-title {
  font-size: 22px;
  font-weight: 800;
  min-width: 0;
}

.app-tab-note {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--app-muted);
  white-space: nowrap;
}

.app-tab-header > .app-tab-title + :not(.app-tab-note) {
  margin-left: auto;
}

.app-back-btn {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--app-ink);
}

.app-menu-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border-radius: 18px;
  padding: 12px 13px;
}

.app-menu-icon {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--app-accent-soft);
  background: rgba(63, 217, 204, 0.16);
  border: 1px solid rgba(143, 237, 228, 0.3);
}

.app-menu-name {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
}

.app-menu-note {
  display: block;
  font-size: 10.5px;
  color: var(--app-muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menu-tag {
  flex: none;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0b860;
  background: rgba(240, 184, 96, 0.14);
  border: 1px solid rgba(240, 184, 96, 0.35);
  border-radius: 7px;
  padding: 2px 6px;
}

.app-view-switch {
  flex: none;
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 12px;
}

.app-view-btn {
  width: 30px;
  height: 26px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-view-btn.is-active {
  background: linear-gradient(
    160deg,
    rgba(63, 217, 204, 0.9),
    rgba(38, 160, 150, 0.85)
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.app-cal-monthbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 8px;
}

.app-cal-monthname {
  font-size: 13px;
  font-weight: 800;
}

.app-cal-chev {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--app-ink);
}

.app-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  color: var(--app-faint);
  text-align: center;
  padding-bottom: 3px;
}

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

.app-cal-day {
  aspect-ratio: 1 / 1;
  max-height: 44px;
  border: 1px solid transparent;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.app-cal-day.is-today {
  color: var(--app-accent-soft);
}

.app-cal-day.is-selected {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.app-cal-dots {
  display: flex;
  gap: 2px;
  height: 4px;
  align-items: center;
}

.app-cal-dot-mini {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.app-cal-railday {
  width: 48px;
  border-radius: 15px;
  padding: 8px 0 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.app-cal-railday.is-selected {
  background: rgba(63, 217, 204, 0.2);
  border-color: rgba(143, 237, 228, 0.55);
}

.app-cal-raildow {
  font-size: 9px;
  font-weight: 700;
  color: var(--app-faint);
}

.app-cal-railday.is-selected .app-cal-raildow {
  color: var(--app-accent-soft);
}

.app-cal-railnum {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.app-cal-daylabel {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--app-faint);
  padding: 0 2px;
}

.app-cal-event {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 16px;
  padding: 10px 12px;
}

.app-cal-time {
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--app-accent);
  font-variant-numeric: tabular-nums;
}

.app-cal-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-cal-meta {
  font-size: 10.5px;
  color: var(--app-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-cal-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

@media (max-height: 680px) {
  .app-tab-title {
    font-size: 17px;
  }

  .app-cal-day {
    max-height: 36px;
    border-radius: 9px;
    font-size: 11px;
  }

  .app-cal-railday {
    width: 44px;
    padding: 6px 0 5px;
  }

  .app-menu-row {
    border-radius: 16px;
    padding: 10px 11px;
  }

  .app-menu-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
}

.app-windy {
  display: block;
  width: 100%;
  padding: 10px 12px 12px;
}

.app-windy-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.app-windy-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--app-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-windy-site {
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--app-accent);
  padding: 6px 2px;
}

.app-windy-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--app-ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.app-windy-frame-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-windy-frame {
  display: block;
  width: 100%;
  border: 0;
}

.app-windy-skeleton {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.app-windy-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--app-muted);
}

.app-windy-retry {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-ink);
  border-radius: 12px;
  padding: 8px 14px;
}
