:root {
  color-scheme: light;
  --green-light: #6EDC5A;
  --green-mid: #2FBF71;
  --green-dark: #1F8A5B;
  --blue-light: #2FA4D9;
  --blue-mid: #1F6FB2;
  --blue-dark: #0B3C6D;
  --main-gradient: linear-gradient(135deg, #6EDC5A, #2FBF71, #2FA4D9, #0B3C6D);
  --button-gradient: linear-gradient(135deg, #2FBF71 0%, #2FA4D9 52%, #0B3C6D 100%);
  --button-gradient-alt: linear-gradient(135deg, #6EDC5A 0%, #2FBF71 45%, #1F6FB2 100%);
  --bg: #f4f8f6;
  --surface: #ffffff;
  --ink: #10231a;
  --muted: #5f7068;
  --line: #d7e4dc;
  --brand: var(--green-dark);
  --brand-dark: var(--blue-dark);
  --accent: var(--blue-mid);
  --danger: #b42318;
  --shadow: 0 12px 30px rgba(11, 60, 109, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(110, 220, 90, 0.14), rgba(47, 164, 217, 0.08) 290px, transparent 560px),
    var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 16px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 3px solid var(--green-mid);
  backdrop-filter: blur(10px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: contain;
}

.plan-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 22px rgba(11, 60, 109, 0.08);
}

.plan-badge-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  flex: 0 0 auto;
  font-size: 18px;
}

.plan-badge-premium {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.plan-badge-premium .plan-badge-icon {
  background: transparent;
  color: #ffd54f;
  animation: premium-crown-pulse 1.9s ease-in-out infinite;
  box-shadow:
    0 0 0 rgba(31, 138, 91, 0),
    0 0 0 rgba(110, 220, 90, 0),
    0 0 28px rgba(255, 213, 79, 0.24);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.plan-badge-free {
  border-color: rgba(47, 164, 217, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(234, 247, 249, 0.96));
}

.plan-badge-free .plan-badge-icon {
  background: linear-gradient(135deg, rgba(110, 220, 90, 0.22), rgba(47, 164, 217, 0.24));
  color: var(--blue-dark);
}

@keyframes premium-crown-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(207, 156, 24, 0.36);
    filter: drop-shadow(0 0 0 rgba(255, 215, 80, 0.1));
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(207, 156, 24, 0);
    filter: drop-shadow(0 0 10px rgba(255, 215, 80, 0.5));
  }
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  color: var(--blue-dark);
  overflow-wrap: anywhere;
}

h2 {
  font-size: 21px;
  color: var(--blue-dark);
}

h3 {
  font-size: 16px;
  color: var(--green-dark);
}

.app-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 18px 16px 92px;
}

.landing {
  display: grid;
  gap: 32px;
}

.landing-hero {
  display: grid;
  min-height: calc(100vh - 170px);
  align-content: center;
  gap: 18px;
  margin: -18px -16px 0;
  padding: 40px 20px 48px;
  background:
    linear-gradient(135deg, rgba(110, 220, 90, 0.92), rgba(47, 191, 113, 0.9), rgba(47, 164, 217, 0.92), rgba(11, 60, 109, 0.96)),
    #0B3C6D;
  color: #fff;
}

.landing-hero-logo {
  justify-self: center;
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 50%;
  animation: logo-glow 2.4s ease-in-out infinite;
}

@keyframes logo-glow {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(110, 220, 90, 0.6)) drop-shadow(0 0 32px rgba(47, 191, 113, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(110, 220, 90, 0.9)) drop-shadow(0 0 48px rgba(47, 164, 217, 0.5));
  }
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.85);
}

.video-modal-inner {
  position: relative;
  width: min(100%, 400px);
  max-height: 90vh;
}

.video-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  z-index: 2;
  min-height: 36px;
  width: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  transform: none;
}

.video-modal-player {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

.landing-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: 0;
  transition: opacity 220ms ease;
}

.landing-video.ready {
  opacity: 1;
}

.landing-video-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: rgba(11, 60, 109, 0.64);
  color: #fff;
  font-weight: 700;
  text-align: center;
  box-shadow: none;
  cursor: pointer;
}

.landing-video-loading:hover {
  background: rgba(11, 60, 109, 0.72);
  box-shadow: none;
  transform: none;
}

.landing-demo-btn {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(11, 60, 109, 0.18);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.landing-demo-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(11, 60, 109, 0.24);
}

.landing-kicker {
  width: fit-content;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 6px 10px 6px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.88);
}

.landing-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: #6EDC5A;
  box-shadow: 0 0 14px rgba(110, 220, 90, 0.72);
}

.landing h2 {
  margin: 0;
  color: inherit;
  font-size: 34px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.landing-copy {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1.45;
}

.landing-actions {
  display: grid;
  gap: 10px;
}

.landing-cta,
.landing-install-btn,
.landing-link {
  width: 100%;
}

.landing-hero .landing-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: cta-pulse-glow 2.4s ease-in-out infinite;
}

.landing-hero .landing-cta::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(120deg, transparent 16%, rgba(255, 255, 255, 0.48) 36%, transparent 58%);
  transform: translateX(-120%);
  animation: cta-shine 3.2s ease-in-out infinite;
}

@keyframes cta-pulse-glow {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 10px 20px rgba(31, 111, 178, 0.2), 0 0 0 rgba(110, 220, 90, 0);
  }
  50% {
    transform: translateY(-1px) scale(1.025);
    box-shadow: 0 16px 30px rgba(11, 60, 109, 0.28), 0 0 26px rgba(110, 220, 90, 0.42);
  }
}

@keyframes cta-shine {
  0%, 42% {
    transform: translateX(-120%);
  }
  68%, 100% {
    transform: translateX(120%);
  }
}

.landing-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.landing-link:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.landing-strip,
.landing-features {
  display: grid;
  gap: 14px;
}

.landing-strip article,
.landing-feature {
  display: grid;
  gap: 8px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(11, 60, 109, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.landing-strip article:hover,
.landing-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(11, 60, 109, 0.14);
}

.landing-strip-icon,
.landing-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(110, 220, 90, 0.15), rgba(47, 164, 217, 0.15));
  color: var(--green-dark);
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.landing-strip strong,
.landing-feature strong {
  color: var(--blue-dark);
  font-size: 16px;
}

.landing-strip span,
.landing-feature span {
  color: var(--muted);
  line-height: 1.4;
  font-size: 14px;
}

.landing-section {
  display: grid;
  gap: 16px;
}

.landing-section-copy {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.landing-bottom-cta {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 40px 20px;
  margin: 0 -16px;
  background:
    linear-gradient(135deg, rgba(110, 220, 90, 0.92), rgba(47, 191, 113, 0.9), rgba(47, 164, 217, 0.92), rgba(11, 60, 109, 0.96)),
    #0B3C6D;
  color: #fff;
  text-align: center;
  border-radius: 12px;
}

.landing-bottom-cta h2 {
  margin: 0;
  color: #fff;
}

.landing-bottom-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 16px;
}

.landing-bottom-cta .landing-cta {
  width: auto;
  padding: 0 28px;
}

.login-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-mid);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease;
}

.login-back-link:hover {
  color: var(--green-dark);
}

.login-back-link .icon {
  width: 16px;
  height: 16px;
}

.login-help-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.login-help-actions button {
  min-height: 40px;
  padding: 0 10px;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(11, 60, 109, 0.42);
}

.install-modal {
  width: min(100%, 440px);
}

.upgrade-modal {
  width: min(100%, 520px);
  overflow: hidden;
  border: 1px solid rgba(47, 164, 217, 0.3);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(11, 60, 109, 0.28);
}

.upgrade-modal-hero {
  display: grid;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(110, 220, 90, 0.96), rgba(47, 191, 113, 0.94), rgba(47, 164, 217, 0.95), rgba(11, 60, 109, 0.98));
  color: #fff;
}

.upgrade-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.upgrade-modal-hero h2,
.upgrade-modal-hero p {
  margin: 0;
  color: inherit;
}

.upgrade-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 24px 8px;
}

.upgrade-stat {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f3fbff);
}

.upgrade-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.upgrade-stat strong {
  color: var(--blue-dark);
  font-size: 22px;
}

.upgrade-modal-actions {
  display: grid;
  gap: 10px;
  padding: 16px 24px 24px;
}

.password-modal {
  width: min(100%, 440px);
}

.payment-modal {
  width: min(100%, 460px);
}

.payment-success-modal {
  border: 1px solid rgba(47, 164, 217, 0.28);
  background: linear-gradient(180deg, #ffffff, #f3fbff);
  box-shadow: 0 24px 60px rgba(11, 60, 109, 0.2);
}

.system-billing-banner {
  border-top-color: #1f6fb2;
  background: linear-gradient(135deg, rgba(110, 220, 90, 0.12), rgba(47, 164, 217, 0.12), rgba(11, 60, 109, 0.1));
}

.system-billing-banner h2 {
  margin: 0;
  color: var(--blue-dark);
}

.system-billing-banner-overdue {
  border-top-color: #0b3c6d;
}

.system-billing-banner-pending {
  border-top-color: #2fbf71;
}

.system-billing-banner-paid {
  border-top-color: #6edc5a;
  background: linear-gradient(135deg, rgba(110, 220, 90, 0.18), rgba(47, 191, 113, 0.12), rgba(47, 164, 217, 0.08));
}

.system-billing-item {
  border-color: rgba(31, 111, 178, 0.28);
  background: linear-gradient(180deg, #ffffff, rgba(47, 164, 217, 0.08));
  box-shadow: 0 14px 30px rgba(11, 60, 109, 0.08);
}

.system-billing-item.is-open {
  border-left: 6px solid #2fa4d9;
}

.system-billing-item.is-pending {
  border-left: 6px solid #2fbf71;
}

.system-billing-item.is-overdue {
  border-left: 6px solid #0b3c6d;
  background: linear-gradient(180deg, #ffffff, rgba(11, 60, 109, 0.08));
}

.system-billing-item.is-paid {
  border-left: 6px solid #6edc5a;
}

.system-billing-state {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue-dark);
}

.system-billing-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6edc5a, #2fa4d9, #0b3c6d);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.panel.system-billing-spotlight {
  position: relative;
  overflow: hidden;
  gap: 16px;
  padding: 20px;
  border-radius: 22px;
  border-top: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, #6edc5a 0%, #2fbf71 28%, #2fa4d9 62%, #0b3c6d 100%);
  box-shadow: 0 22px 44px rgba(11, 60, 109, 0.18);
  color: #fff;
}

.panel.system-billing-spotlight::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -36px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.panel.system-billing-spotlight h2,
.panel.system-billing-spotlight .muted,
.panel.system-billing-spotlight .card strong,
.panel.system-billing-spotlight .card span,
.panel.system-billing-spotlight .eyebrow {
  color: #fff;
}

.panel.system-billing-spotlight .eyebrow {
  opacity: 0.82;
}

.panel.system-billing-spotlight .actions,
.panel.system-billing-spotlight .row,
.panel.system-billing-spotlight .grid,
.panel.system-billing-spotlight .system-billing-spotlight-value {
  position: relative;
  z-index: 1;
}

.panel.system-billing-spotlight .button {
  background: #fff;
  color: #0b3c6d;
}

.panel.system-billing-spotlight .ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.system-billing-spotlight-value {
  margin: 0;
  font-size: clamp(34px, 7vw, 48px);
  line-height: 0.95;
  font-weight: 900;
}

.system-billing-spotlight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel.system-billing-spotlight .card {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.panel.system-billing-spotlight .card .muted {
  color: rgba(255, 255, 255, 0.82);
}

.panel.system-billing-spotlight .card strong {
  color: #fff;
}

.panel.system-billing-spotlight-overdue {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #1f8a5b 0%, #1f6fb2 45%, #0b3c6d 100%);
}

.panel.system-billing-spotlight-pending {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #6edc5a 0%, #2fbf71 35%, #1f6fb2 100%);
}

.panel.system-billing-spotlight-paid {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #2fbf71 0%, #2fa4d9 55%, #1f8a5b 100%);
}

.system-billing-qr {
  width: min(100%, 240px);
  justify-self: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
}

[data-pix-code] {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.system-billing-pix-stack {
  gap: 16px;
}

.system-pix-code-label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: var(--blue-dark);
}

.system-pix-code {
  min-height: 168px;
  padding: 16px;
  border: 1px solid rgba(31, 111, 178, 0.24);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(110, 220, 90, 0.08), rgba(47, 164, 217, 0.1));
  color: var(--blue-dark);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.system-billing-status-box {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 191, 113, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(110, 220, 90, 0.08), rgba(255, 255, 255, 0.96));
}

.system-billing-status-box strong,
.system-billing-status-box p {
  margin: 0;
}

.payment-modal-metrics {
  display: grid;
  gap: 10px;
}

.partial-payments {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}

.partial-payments summary {
  cursor: pointer;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.partial-payment-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.partial-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6fbf8;
}

.password-modal h2 {
  margin: 0;
}

.icon-button {
  width: 40px;
  min-height: 40px;
  padding: 0;
}

.install-logo {
  width: 82px;
  height: auto;
}

.install-steps {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--ink);
  line-height: 1.4;
}

.panel,
.card,
.list-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
  border-top: 4px solid var(--green-mid);
}

.loading-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
}

.loading-panel strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue-dark);
}

.loading-spinner {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 4px solid rgba(47, 164, 217, 0.18);
  border-top-color: var(--green-mid);
  border-right-color: var(--blue-light);
  border-radius: 999px;
  animation: spin 780ms linear infinite;
}

.loading-spinner::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin: 8px;
  border-radius: 999px;
  background: var(--blue-dark);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.stack {
  display: grid;
  gap: 14px;
}

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

.metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profit-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 22px 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 36%),
    linear-gradient(135deg, rgba(110, 220, 90, 0.96), rgba(47, 191, 113, 0.94), rgba(47, 164, 217, 0.96), rgba(11, 60, 109, 1));
  box-shadow: 0 22px 44px rgba(11, 60, 109, 0.2);
  color: #fff;
}

.profit-hero-loading {
  opacity: 0.88;
}

.profit-hero::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -62px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.profit-hero-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.profit-hero h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  color: #fff;
}

.profit-hero-subtitle {
  max-width: 40rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.profit-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profit-hero-stat {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.profit-hero-stat span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
}

.profit-hero-stat strong {
  font-size: 22px;
  line-height: 1.1;
}

.dashboard-toolbar {
  display: grid;
  gap: 12px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef8fb;
}

.segmented button {
  min-height: 40px;
  background: transparent;
  color: var(--blue-dark);
  box-shadow: none;
}

.segmented button.active {
  background: var(--button-gradient);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31, 111, 178, 0.18);
}

.segmented button:hover {
  transform: none;
}

.card {
  min-height: 106px;
  padding: 14px;
  border-top: 4px solid var(--blue-light);
}

.card:nth-child(odd) {
  border-top-color: var(--green-mid);
}

.card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  color: var(--blue-dark);
}

.muted {
  color: var(--muted);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

a.button,
button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--button-gradient);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(31, 111, 178, 0.2);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

button:hover,
a.button:hover {
  filter: brightness(0.96) saturate(1.08);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(11, 60, 109, 0.24);
}

button:disabled {
  cursor: wait;
  opacity: 0.66;
  transform: none;
}

.landing-hero .landing-cta:hover {
  animation-play-state: paused;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 34px rgba(11, 60, 109, 0.3), 0 0 32px rgba(47, 164, 217, 0.42);
}

.secondary {
  background: var(--button-gradient-alt);
  color: #fff;
}

.secondary:hover {
  filter: brightness(0.96) saturate(1.08);
}

.ghost {
  min-height: 38px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--blue-light);
  color: var(--blue-dark);
  box-shadow: none;
}

.ghost:hover {
  background: #eef8fb;
  transform: none;
  box-shadow: none;
}

.landing .landing-link:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: none;
  box-shadow: none;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.autocomplete-field {
  position: relative;
}

.autocomplete-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  max-height: 230px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--blue-light);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(11, 60, 109, 0.18);
}

.autocomplete-option {
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  background: #fff;
  color: var(--blue-dark);
  box-shadow: none;
  text-align: left;
}

.autocomplete-option:hover {
  background: #eaf7f9;
  color: var(--green-dark);
  transform: none;
  box-shadow: none;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(47, 164, 217, 0.16);
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.installment-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.paid-installment-row input {
  background: #f4f7f6;
  color: var(--muted);
}

.installment-status-badge {
  display: inline-grid;
  min-height: 36px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.animal-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-mid);
  border-radius: 8px;
  background: #fff;
}

.animal-type-field {
  position: relative;
  grid-column: 1 / -1;
}

.animal-type-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 32;
  display: grid;
  max-height: 250px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--blue-light);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(11, 60, 109, 0.18);
}

.animal-type-option {
  justify-content: flex-start;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  background: #fff;
  color: var(--blue-dark);
  box-shadow: none;
  text-align: left;
}

.animal-type-option:hover {
  background: #eaf7f9;
  color: var(--green-dark);
  transform: none;
  box-shadow: none;
}

.animal-type-option:disabled {
  color: #93a09a;
  cursor: not-allowed;
  opacity: 0.72;
}

.animal-type-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.totalizer {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--blue-light);
  border-left: 4px solid var(--blue-mid);
  border-radius: 8px;
  background: #eef8fb;
}

.totalizer span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.totalizer strong {
  color: var(--blue-dark);
  font-size: 24px;
}

.totalizer small {
  color: var(--green-dark);
  font-weight: 700;
}

.type-change-panel {
  display: grid;
  gap: 12px;
}

.stock-action-modal {
  width: min(100%, 620px);
  max-height: min(88vh, 920px);
  overflow: auto;
  border-left: 4px solid var(--blue-mid);
  border: 1px solid rgba(47, 164, 217, 0.22);
  border-left-width: 4px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(11, 60, 109, 0.24);
  backdrop-filter: none;
}

.stock-action-modal-wide {
  width: min(100%, 760px);
}

.stock-action-modal h3,
.stock-action-modal label,
.stock-action-modal strong {
  color: var(--blue-dark);
}

.stock-action-modal p,
.stock-action-modal span,
.stock-action-modal .muted {
  color: var(--muted);
}

.stock-action-modal input,
.stock-action-modal select,
.stock-action-modal textarea {
  background: #fff;
  color: var(--text);
}

.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 40px;
}

.checkbox-line input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  padding: 0;
  margin: 0;
}

.animal-expense-types {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.animal-row .remove-animal {
  grid-column: 1 / -1;
}

.list {
  display: grid;
  gap: 10px;
}

.data-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
  border: 1px solid rgba(11, 60, 109, 0.16);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(110, 220, 90, 0.08), rgba(47, 164, 217, 0.08));
  box-shadow: none;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(132px, 1.4fr) 58px minmax(96px, 1fr) minmax(92px, 1fr);
  gap: 8px;
  min-width: 520px;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(11, 60, 109, 0.1);
  border-radius: 0;
  background: transparent;
  transition: background-color 140ms ease;
}

.table-row.wide {
  grid-template-columns: minmax(132px, 1.4fr) 58px minmax(96px, 1fr) minmax(92px, 1fr) minmax(92px, 1fr) minmax(82px, 0.8fr) minmax(92px, 1fr) minmax(92px, 1fr);
  min-width: 940px;
}

.table-row.stock-wide {
  grid-template-columns: minmax(132px, 1.4fr) 58px minmax(96px, 1fr) minmax(92px, 1fr) minmax(92px, 1fr) minmax(82px, 0.8fr);
  min-width: 720px;
}

.table-row.stock-impact-wide {
  grid-template-columns: minmax(132px, 1.3fr) 58px minmax(96px, 1fr) minmax(92px, 1fr) minmax(92px, 1fr) minmax(82px, 0.8fr) minmax(96px, 1fr) minmax(92px, 1fr) minmax(82px, 0.8fr);
  min-width: 1080px;
}

.data-table .table-row:not(.table-head):nth-child(even) {
  background: rgba(47, 164, 217, 0.08);
}

.data-table .table-row:not(.table-head):nth-child(odd) {
  background: rgba(110, 220, 90, 0.08);
}

.data-table .table-row:not(.table-head):hover {
  background: rgba(47, 191, 113, 0.16);
}

.data-table .table-row:last-child {
  border-bottom: 0;
}

.table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(47, 191, 113, 0.94), rgba(31, 111, 178, 0.94), rgba(11, 60, 109, 0.98));
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: none;
}

.table-row strong {
  color: var(--blue-dark);
  font-size: 14px;
}

.table-row span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.table-head span,
.table-head strong {
  color: rgba(255, 255, 255, 0.92);
}

.list-item {
  padding: 12px;
  border-left: 4px solid var(--green-dark);
}

.recent-card {
  padding: 0;
}

.recent-card summary {
  display: block;
  padding: 12px 38px 12px 12px;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.recent-card summary::-webkit-details-marker {
  display: none;
}

.recent-card summary::after {
  content: "+";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef8fb;
  color: var(--blue-dark);
  font-weight: 800;
}

.recent-card[open] summary::after {
  content: "-";
}

.recent-summary {
  display: grid;
  gap: 8px;
}

.recent-animal-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.recent-animal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f6fbf8;
}

.recent-animal-row strong {
  color: var(--blue-dark);
}

.recent-animal-row span,
.recent-empty {
  color: var(--muted);
}

.recent-empty {
  padding: 0 12px 12px;
}

.recent-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 0 12px 12px;
}

.recent-actions button {
  min-height: 36px;
  padding: 0 10px;
}

.recent-actions .danger {
  color: var(--danger);
}

.recent-actions .danger:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.cashflow-filter-panel {
  border-top-color: var(--blue-light);
}

.cashflow-filter-panel h2 {
  margin-bottom: 0;
}

.cashflow-filters {
  padding-bottom: 2px;
}

.party-toolbar {
  border-top-color: var(--blue-light);
}

.party-layout {
  display: grid;
  gap: 14px;
}

.party-card {
  display: grid;
  gap: 10px;
}

.party-card-selected {
  border-color: rgba(31, 111, 178, 0.32);
  box-shadow: 0 12px 28px rgba(31, 111, 178, 0.12);
}

.party-card-metrics {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.party-whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

.party-whatsapp-link:hover {
  color: var(--blue-dark);
}

.pagination-controls {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr);
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

.pagination-controls [data-page-status] {
  font-size: 13px;
  white-space: nowrap;
}

.pagination-controls button {
  min-height: 38px;
  padding: 8px 10px;
}

.pagination-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.list-item .row,
.row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

.success {
  color: var(--green-dark);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 11;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 3px solid var(--blue-mid);
  background: var(--surface);
}

.bottom-nav a {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 13px 6px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.bottom-nav .icon {
  width: 17px;
  height: 17px;
  opacity: 0.78;
}

.bottom-nav a.active {
  color: var(--blue-dark);
  background: #eaf7f9;
  box-shadow: inset 0 3px 0 var(--green-mid);
}

.bottom-nav a.active .icon {
  color: var(--green-dark);
  opacity: 1;
}

@media (min-width: 720px) {
  .topbar {
    padding-inline: calc((100vw - 920px) / 2 + 16px);
  }

  .metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

  .dashboard-toolbar {
    grid-template-columns: 1fr 190px;
    align-items: end;
  }

  .party-layout {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    align-items: start;
  }

  .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-hero {
    min-height: calc(100vh - 150px);
    margin-inline: 0;
    padding: 54px;
    border-radius: 12px;
  }

  .landing h2 {
    font-size: 54px;
  }

  .landing-actions {
    width: min(100%, 430px);
    grid-template-columns: 1fr 1fr;
  }

  .landing-install-btn {
    grid-column: 1 / -1;
  }

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

  .landing-features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-bottom-cta {
    margin-inline: 0;
    border-radius: 12px;
  }

  .modal-backdrop {
    place-items: center;
  }

  .animal-row {
    grid-template-columns: minmax(180px, 1fr) 100px 120px 150px auto;
  }

  .animal-type-field {
    grid-column: auto;
  }

  .animal-row .remove-animal {
    grid-column: auto;
  }

  .bottom-nav {
    width: min(100%, 920px);
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 719px) {
  .topbar-actions {
    gap: 8px;
  }

  .plan-badge {
    width: 40px;
    height: 40px;
  }
}

.offline-banner,
.sync-status {
  padding: 10px 12px;
  border: 1px solid var(--blue-light);
  border-left: 4px solid var(--blue-mid);
  border-radius: 8px;
  background: #eef8fb;
  color: var(--blue-dark);
  font-weight: 700;
}

.sync-status {
  position: fixed;
  right: 12px;
  bottom: 78px;
  left: 12px;
  z-index: 20;
  box-shadow: var(--shadow);
  text-align: center;
}

.pending-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 8px;
  background: #eef8fb;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
}

@media (min-width: 720px) {
  .sync-status {
    right: calc((100vw - 920px) / 2 + 16px);
    left: auto;
    width: 360px;
  }
}
