:root {
  --color-primary: #4f46e5;
  --color-primary-dark: #4338ca;
  --color-primary-light: #eef2ff;
  --color-accent: #0ea5a0;
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-bg: #f4f5fb;
  --color-card: #ffffff;
  --color-border: #e5e7f0;
  --color-text: #1a1d29;
  --color-text-muted: #6b7086;
  --color-text-faint: #9296a8;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(23, 24, 40, 0.06);
  --shadow: 0 2px 8px rgba(23, 24, 40, 0.06), 0 1px 2px rgba(23, 24, 40, 0.04);
  --shadow-lg: 0 20px 45px rgba(30, 27, 75, 0.14), 0 6px 16px rgba(30, 27, 75, 0.08);
  --font-display: "Lexend", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --color-primary: #6366f1;
  --color-primary-dark: #a5b4fc;
  --color-primary-light: rgba(99, 102, 241, 0.18);
  --color-accent: #2dd4bf;
  --color-success: #4ade80;
  --color-success-bg: rgba(74, 222, 128, 0.14);
  --color-danger: #f87171;
  --color-danger-bg: rgba(248, 113, 113, 0.14);
  --color-bg: #13131e;
  --color-card: #1c1c2b;
  --color-border: #302f45;
  --color-text: #f2f2f7;
  --color-text-muted: #a4a4bd;
  --color-text-faint: #7d7d97;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.55), 0 6px 16px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .flash-error,
:root[data-theme="dark"] .form-error,
:root[data-theme="dark"] .ai-error {
  border-color: rgba(248, 113, 113, 0.35);
}

:root[data-theme="dark"] .flash-success {
  border-color: rgba(74, 222, 128, 0.35);
}

:root[data-theme="dark"] .auth-brand-icon {
  background: linear-gradient(135deg, var(--color-primary-light), rgba(45, 212, 191, 0.16));
}

:root[data-theme="dark"] .ai-result-panel {
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--color-card) 160px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- Flash messages ---------- */

.flash-container {
  max-width: 720px;
  margin: 16px auto 0;
  padding: 0 20px;
}

.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.flash-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid #fecaca;
}

.flash-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid #bbf7d0;
}

/* ---------- Auth pages ---------- */

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 8%, rgba(79, 70, 229, 0.16), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(14, 165, 160, 0.14), transparent 45%),
    var(--color-bg);
}

.auth-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(30, 27, 75, 0.04);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 30px;
}

.auth-brand-icon {
  font-size: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--color-primary-light), #e0f2f1);
  margin-bottom: 16px;
}

.brand-logo {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 16px;
}

.auth-brand h1 {
  font-size: 21px;
  color: var(--color-text);
}

.auth-subtitle {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 8px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 14px;
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 24px;
}

.auth-switch a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-privacy-note {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-faint);
  margin-top: 20px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.feature-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: var(--color-text);
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-success, #16a34a);
  font-weight: 700;
}

.pricing-box {
  text-align: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
  padding: 18px 12px;
  margin-bottom: 4px;
}

.price-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--color-primary-dark, var(--color-primary));
}

.price-period {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-left: 2px;
}

.price-note {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ---------- Form controls ---------- */

input, select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

input:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 40px;
}

.password-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 6px 8px;
  color: var(--color-text-faint);
  line-height: 1;
}

.password-toggle-btn:hover {
  color: var(--color-text-muted);
}

/* ---------- Split login page ---------- */

.split-login {
  display: flex;
  min-height: 100vh;
}

.split-login-brand {
  flex: 1 1 46%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
  background: linear-gradient(155deg, #4f46e5, #0ea5a0);
  color: #fff;
}

.split-login-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(10px);
}

.split-login-glow::after {
  content: "";
  position: absolute;
  bottom: -260px;
  left: -160px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.split-login-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.split-login-header .brand-logo {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 12px;
}

.split-login-brand h1 {
  position: relative;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.2;
  margin-bottom: 14px;
}

.split-login-sub {
  position: relative;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 400px;
  margin-bottom: 32px;
}

.login-balance-card {
  position: relative;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  max-width: 320px;
  margin-bottom: 36px;
  backdrop-filter: blur(6px);
}

.login-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.login-balance-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.login-balance-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 9px;
  border-radius: 999px;
}

.login-balance-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
}

.login-balance-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 40px;
}

.login-balance-bar {
  flex: 1;
  min-height: 4px;
  border-radius: 3px 3px 0 0;
  background: rgba(255, 255, 255, 0.55);
}

.split-login-features {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.split-login-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.split-login-features li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 14px;
  flex-shrink: 0;
}

.split-login-form-panel {
  /* Painel fixo em tema escuro, independente do tema do app. */
  --color-primary: #6366f1;
  --color-primary-dark: #a5b4fc;
  --color-primary-light: rgba(99, 102, 241, 0.18);
  --color-accent: #2dd4bf;
  --color-success: #4ade80;
  --color-success-bg: rgba(74, 222, 128, 0.14);
  --color-danger: #f87171;
  --color-danger-bg: rgba(248, 113, 113, 0.14);
  --color-bg: #13131e;
  --color-card: #1c1c2b;
  --color-border: #302f45;
  --color-text: #f2f2f7;
  --color-text-muted: #a4a4bd;
  --color-text-faint: #7d7d97;

  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--color-bg);
}

.split-login-form-wrap {
  width: 100%;
  max-width: 380px;
}

.split-login-form-wrap h2 {
  font-size: 24px;
  color: var(--color-text);
  margin-bottom: 6px;
}

.split-login-form-sub {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

.split-login-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
}

.split-login-label-row label {
  margin-top: 0;
}

.split-login-label-row a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-primary-dark, var(--color-primary));
  text-decoration: none;
}

.split-login-label-row a:hover {
  text-decoration: underline;
}

.split-login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12.5px;
  color: var(--color-text-faint);
}

.split-login-divider::before,
.split-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-card);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  text-decoration: none;
  margin-top: 0;
}

.btn-google:hover {
  background: var(--color-bg);
  border-color: var(--color-text-faint);
}

@media (max-width: 900px) {
  .split-login {
    flex-direction: column;
  }

  .split-login-brand {
    padding: 40px 28px;
  }

  .login-balance-card {
    max-width: none;
  }

  .split-login-form-panel {
    padding: 40px 24px 56px;
  }
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7086' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.btn {
  display: inline-block;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  transition: all 0.15s ease;
  font-family: inherit;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.38);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-block {
  width: 100%;
  margin-top: 22px;
  padding: 13px;
  font-size: 15px;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
  text-decoration: none;
  display: inline-block;
}

.btn-ghost:hover {
  background: var(--color-card);
  border-color: var(--color-text-faint);
  color: var(--color-text);
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--color-text-faint);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  line-height: 1;
}

.btn-close:hover {
  color: var(--color-text);
  background: var(--color-bg);
}

/* ---------- Sidebar layout ---------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--color-card);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 22px;
}

.sidebar-brand-icon {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.sidebar-brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--color-text);
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 18px 10px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-link-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.sidebar-link.active {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 12px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 4px;
  font-size: 13px;
}

.sidebar-user-name {
  color: var(--color-text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  color: var(--color-text-faint);
  text-decoration: none;
  font-weight: 500;
}

.sidebar-logout:hover {
  color: var(--color-danger);
}

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

.flash-container-inline {
  max-width: none;
  margin: 24px 32px 0;
  padding: 0;
}

@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 16px;
  }
  .sidebar-brand {
    padding: 0 10px 0 0;
  }
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar-section-label {
    display: none;
  }
  .sidebar-footer {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }
  .sidebar-user {
    display: none;
  }
}

/* ---------- Dashboard layout ---------- */

.page-content {
  max-width: 1200px;
  padding: 32px 32px 64px;
}

/* ---------- Stat cards (Receitas / Despesas / Saldo do mês) ---------- */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  border-left: 4px solid var(--color-border);
}

.stat-card-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.stat-card-value {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
}

.stat-card-income {
  border-left-color: var(--color-success);
}

.stat-card-income .stat-card-value {
  color: var(--color-success);
}

.stat-card-expense {
  border-left-color: var(--color-danger);
}

.stat-card-expense .stat-card-value {
  color: var(--color-danger);
}

.stat-card-balance {
  border-left-color: var(--color-primary);
}

.stat-card-balance .stat-card-value {
  color: var(--color-primary);
}

.stat-card-balance.negative .stat-card-value {
  color: var(--color-danger);
}

.stat-card-invest {
  border-left-color: #3b82f6;
}

.stat-card-invest .stat-card-value {
  color: #3b82f6;
}

.stat-cards-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .stat-cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .stat-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- List filter (segmented control) ---------- */

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.list-header .section-subtitle {
  margin-top: 0;
  margin-bottom: 0;
}

.segmented-control {
  display: inline-flex;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.segmented-btn {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.segmented-btn.active {
  background: var(--color-card);
  color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}

.ai-cta-section {
  text-align: center;
  padding: 24px 0 32px;
}

.btn-ai {
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 55%, #0ea5a0 130%);
  color: #fff;
  font-size: 16.5px;
  padding: 17px 38px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(79, 70, 229, 0.32);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.01em;
}

.btn-ai:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(79, 70, 229, 0.4);
}

.btn-ai:active {
  transform: translateY(0);
}

.btn-ai:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

.btn-ai-icon {
  font-size: 19px;
}

.ai-cta-hint {
  color: var(--color-text-muted);
  font-size: 13.5px;
  margin-top: 14px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-grid .chart-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid .chart-panel {
    grid-column: auto;
  }
  .page-content {
    padding: 24px 18px 48px;
  }
}

.dashboard-grid-4 {
  grid-template-columns: repeat(3, 1fr);
}

.dashboard-grid-4 .chart-panel {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .dashboard-grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .dashboard-grid-4 {
    grid-template-columns: 1fr;
  }
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500 !important;
  color: var(--color-text-muted);
  margin-top: 14px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--color-primary);
}

.panel {
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  padding: 26px;
}

.panel h2 {
  font-size: 16px;
  margin-bottom: 18px;
}

.section-subtitle {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text-faint);
  margin-top: 30px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.expense-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.expense-form label {
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}

.form-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ---------- Expense list ---------- */

.expense-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.expense-list-empty {
  color: var(--color-text-faint);
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
}

.expense-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.expense-item:hover {
  border-color: var(--color-border);
  background: var(--color-card);
}

.expense-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.expense-item-description {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expense-item-meta {
  font-size: 12px;
  color: var(--color-text-muted);
}

.see-all-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.see-all-link:hover {
  text-decoration: underline;
}

.expense-item-amount {
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-text);
  white-space: nowrap;
  margin-left: 12px;
}

/* ---------- Chart panel ---------- */

.chart-wrapper {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-empty-state {
  color: var(--color-text-faint);
  font-size: 14px;
  text-align: center;
  max-width: 260px;
}

.chart-total {
  text-align: center;
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.chart-total strong {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 17px;
}

/* ---------- AI result panel ---------- */

.ai-result-section {
  margin-bottom: 24px;
}

.ai-result-panel {
  border-color: #ddd6fe;
  border-left: 4px solid var(--color-primary);
  background: linear-gradient(180deg, #f7f7ff 0%, #ffffff 160px);
}

.ai-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.ai-result-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}

.ai-result-body {
  font-size: 14.5px;
  color: var(--color-text);
}

.ai-result-body h2 {
  font-size: 15px;
  font-family: var(--font-display);
  color: var(--color-primary-dark);
  margin-top: 22px;
  margin-bottom: 10px;
}

.ai-result-body h2:first-child {
  margin-top: 10px;
}

.ai-result-body p {
  margin: 8px 0;
}

.ai-result-body ul {
  margin: 8px 0;
  padding-left: 20px;
}

.ai-result-body li {
  margin-bottom: 7px;
}

.ai-result-body strong {
  color: var(--color-text);
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 14px;
  padding: 14px 0;
}

.ai-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.ai-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid #fecaca;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.ai-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.ai-chat-thread:empty {
  margin-top: 0;
}

.ai-chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
}

.ai-chat-bubble p {
  margin: 4px 0;
}

.ai-chat-bubble p:first-child {
  margin-top: 0;
}

.ai-chat-bubble p:last-child {
  margin-bottom: 0;
}

.ai-chat-bubble ul {
  margin: 4px 0;
  padding-left: 18px;
}

.ai-chat-bubble-user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ai-chat-bubble-assistant {
  align-self: flex-start;
  background: var(--color-bg);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.ai-chat-loading-bubble {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
}

.ai-chat-loading-bubble .ai-spinner {
  width: 14px;
  height: 14px;
}

.ai-chat-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.ai-chat-form input {
  flex: 1;
}

/* ---------- Page header (shared title row) ---------- */

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  color: var(--color-text);
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-top: 6px;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-header-row .page-header {
  margin-bottom: 0;
}

.chart-panel-standalone {
  margin-top: 24px;
  max-width: 640px;
}

.chart-panel-standalone .chart-wrapper {
  height: 340px;
}

/* ---------- Visão Geral: balance card + quick access ---------- */

.balance-card {
  background: linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 38px;
  box-shadow: 0 18px 36px rgba(22, 163, 74, 0.28);
  margin-bottom: 36px;
}

.balance-card.negative {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.28);
}

.balance-card-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.balance-card-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  margin-top: 10px;
  letter-spacing: -0.02em;
}

.balance-card-hint {
  font-size: 13px;
  opacity: 0.85;
  margin-top: 10px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 4px 0 16px;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.quick-access-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.quick-access-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--color-primary);
}

.quick-access-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 12px;
}

.quick-access-label {
  font-size: 13.5px;
  font-weight: 600;
}

/* ---------- Em breve (placeholder sections) ---------- */

.empty-state-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 24px;
}

.empty-state-icon {
  font-size: 56px;
  margin-bottom: 22px;
}

.empty-state-page h1 {
  font-size: 22px;
  margin-bottom: 12px;
}

.empty-state-page p {
  color: var(--color-text-muted);
  max-width: 440px;
  margin: 0 auto 24px;
}

.empty-state-badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* ---------- Extrato ---------- */

.extrato-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.extrato-filter {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.extrato-filter label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.extrato-filter select,
.extrato-filter input {
  min-width: 160px;
}

.extrato-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.extrato-totals div {
  font-size: 13px;
  color: var(--color-text-muted);
}

.extrato-totals strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--color-text);
  margin-top: 2px;
}

.extrato-table-wrapper {
  overflow-x: auto;
}

.extrato-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.extrato-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  padding: 10px 12px;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.extrato-table td {
  padding: 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.extrato-table tbody tr:hover td {
  background: var(--color-bg);
}

.extrato-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.extrato-type-receita {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.extrato-type-despesa {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.extrato-type-investimento {
  background: rgba(59, 130, 246, 0.14);
  color: #3b82f6;
}

.status-active {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.status-late {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.status-inactive,
.status-canceled {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.extrato-amount {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.extrato-amount-receita {
  color: var(--color-success);
}

.extrato-amount-despesa {
  color: var(--color-danger);
}

.extrato-amount-investimento {
  color: #3b82f6;
}

/* ---------- Extrato: new entry form ---------- */

.new-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.new-entry-header h2 {
  margin-bottom: 0;
}

.entry-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.entry-form-grid > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.entry-form-grid label {
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .entry-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .entry-form-grid {
    grid-template-columns: 1fr;
  }
}

.extrato-empty {
  text-align: center;
  color: var(--color-text-faint);
  padding: 48px 0;
  font-size: 14px;
}

/* ---------- Calculadoras ---------- */

#calcSwitch {
  margin-bottom: 20px;
}

.calc-panel h2 {
  margin-bottom: 4px;
}

.calc-input-with-select {
  display: flex;
  gap: 6px;
}

.calc-input-with-select input {
  flex: 1.4;
  min-width: 0;
}

.calc-input-with-select select {
  flex: 1;
  min-width: 0;
  padding-left: 10px;
  padding-right: 30px;
}

.calc-result {
  margin-top: 22px;
}

.calc-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

/* ---------- Configurações ---------- */

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.category-manager-group {
  margin-bottom: 22px;
}

.category-manager-group:last-child {
  margin-bottom: 0;
}

.category-manager-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.category-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 13px;
  color: var(--color-text);
}

.category-chip button {
  background: none;
  border: none;
  color: var(--color-text-faint);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 50%;
}

.category-chip button:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.category-add-form {
  display: flex;
  gap: 8px;
}

.category-add-form input {
  flex: 1;
}

.category-add-form button {
  flex-shrink: 0;
  white-space: nowrap;
}

.category-error {
  color: var(--color-danger);
  font-size: 12.5px;
  margin-top: 8px;
}

/* ---------- Theme toggle ---------- */

.theme-toggle-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.theme-toggle-btn:hover {
  background: var(--color-primary-light);
  transform: scale(1.06);
}

.panel-hint {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: -8px 0 16px;
}

.value-add-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.value-add-form input[type="text"] {
  flex: 2;
  min-width: 140px;
}

.value-add-form input[type="number"] {
  flex: 1;
  min-width: 110px;
}

.value-add-form button {
  flex-shrink: 0;
}

.expense-item-trailing {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 12px;
}

.item-delete-btn {
  background: none;
  border: none;
  color: var(--color-text-faint);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.item-delete-btn:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.theme-toggle-btn-floating {
  position: absolute;
  top: 24px;
  right: 24px;
}

/* ---------- Landing page (venda) ---------- */

.landing {
  /* Página de venda: sempre clara, independente do tema do visitante/app. */
  --color-primary: #4f46e5;
  --color-primary-dark: #4338ca;
  --color-primary-light: #eef2ff;
  --color-accent: #0ea5a0;
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --color-bg: #f4f5fb;
  --color-card: #ffffff;
  --color-border: #e5e7f0;
  --color-text: #1a1d29;
  --color-text-muted: #6b7086;
  --color-text-faint: #9296a8;

  position: relative;
  background: var(--color-card);
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--color-text);
}

.landing-logo .brand-logo {
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 10px;
}

.landing-header-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  transition: all 0.15s ease;
}

.landing-header-link:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

.landing-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 68px;
  background: var(--color-card);
}

.landing-hero-text {
  flex: 1 1 440px;
  max-width: 500px;
}

.landing-hero-phone {
  flex: 0 0 auto;
  position: relative;
}

.landing-hero h1 {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.18;
  color: var(--color-text);
  margin-bottom: 16px;
}

.landing-hero-sub {
  font-size: 16px;
  color: var(--color-text-muted);
  margin: 0 0 28px;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  font-size: 16px;
  border-radius: 999px;
}

.landing-cta .arrow {
  transition: transform 0.15s ease;
}

.landing-cta:hover .arrow {
  transform: translateX(3px);
}

.landing-hero-price {
  margin-top: 16px;
  font-size: 14px;
  color: var(--color-text-muted);
}

.landing-hero-price strong {
  color: var(--color-primary-dark, var(--color-primary));
}

.phone-mockup {
  width: 240px;
  aspect-ratio: 9 / 19.5;
  background: #17172a;
  border-radius: 34px;
  padding: 10px;
  box-shadow: 0 30px 60px rgba(30, 27, 75, 0.22), 0 10px 24px rgba(30, 27, 75, 0.14);
  position: relative;
  animation: phoneFloat 4.5s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.6deg); }
}

.phone-float-badge {
  position: absolute;
  top: -16px;
  right: -22px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px 9px 10px;
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-success);
  white-space: nowrap;
  opacity: 0;
  animation: badgeIn 0.5s ease-out 1.1s forwards, badgeFloat 3.2s ease-in-out 1.6s infinite;
}

.phone-float-badge span:first-child {
  font-size: 16px;
}

@keyframes badgeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.phone-mini-chart-bar {
  transform-origin: bottom;
  animation: barGrow 0.5s ease-out backwards;
}

.phone-mini-chart-bar:nth-child(1) { animation-delay: 0.5s; }
.phone-mini-chart-bar:nth-child(2) { animation-delay: 0.58s; }
.phone-mini-chart-bar:nth-child(3) { animation-delay: 0.66s; }
.phone-mini-chart-bar:nth-child(4) { animation-delay: 0.74s; }
.phone-mini-chart-bar:nth-child(5) { animation-delay: 0.82s; }
.phone-mini-chart-bar:nth-child(6) { animation-delay: 0.9s; }

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .phone-mockup,
  .phone-float-badge,
  .phone-mini-chart-bar {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.phone-mockup::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 16px;
  background: #17172a;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  border-radius: 24px;
  overflow: hidden;
  padding: 26px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phone-greeting {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--color-text);
  padding: 0 2px;
}

.phone-balance-card {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.phone-balance-label {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.phone-balance-value {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.phone-grid-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  padding: 2px 2px 0;
}

.phone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.phone-grid-item {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 7.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
}

.phone-grid-item span {
  font-size: 15px;
}

.phone-mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 44px;
  padding: 2px 2px 0;
  margin-top: 2px;
}

.phone-mini-chart-bar {
  flex: 1;
  min-height: 4px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--color-accent), var(--color-primary));
}

@media (max-width: 860px) {
  .landing-hero {
    flex-direction: column;
    text-align: center;
    padding-top: 40px;
  }

  .landing-hero-text {
    text-align: center;
    max-width: 480px;
  }

  .landing-hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .landing-hero-phone {
    order: -1;
  }

  .phone-mockup {
    width: 200px;
  }
}

.landing-feature {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.landing-feature-reverse .landing-feature-text {
  order: 2;
}

.landing-feature-reverse .landing-feature-visual {
  order: 1;
}

.landing-feature-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary-dark, var(--color-primary));
  background: var(--color-primary-light);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.landing-feature-text h2 {
  font-size: clamp(21px, 2.6vw, 27px);
  color: var(--color-text);
  margin-bottom: 12px;
  line-height: 1.28;
}

.landing-feature-text p {
  font-size: 14.5px;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

.landing-feature-visual {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  padding: 24px;
  min-height: 200px;
}

.landing-mock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.landing-mock-row:last-child {
  border-bottom: none;
}

.landing-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.landing-mock-label {
  flex: 1;
  color: var(--color-text);
  font-weight: 500;
}

.landing-mock-bar-track {
  flex-shrink: 0;
  width: 84px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}

.landing-mock-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--color-primary);
}

.landing-mock-total {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1.5px dashed var(--color-border);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.landing-mock-total strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-success);
}

.landing-pricing {
  text-align: center;
  padding: 64px 24px 56px;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.landing-pricing h2 {
  font-size: clamp(22px, 3vw, 28px);
  color: var(--color-text);
  margin-bottom: 8px;
}

.landing-pricing-sub {
  font-size: 14.5px;
  color: var(--color-text-muted);
  margin-bottom: 36px;
}

.pricing-cards {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.pricing-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--color-bg);
  border: 1.5px solid var(--color-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 38px 30px 28px;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 55px rgba(30, 27, 75, 0.18), 0 8px 20px rgba(30, 27, 75, 0.1);
}

.pricing-card-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 18px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.pricing-card .pricing-box,
.pricing-card .feature-list,
.pricing-card > .btn {
  width: 100%;
}

.pricing-card-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary-dark, var(--color-primary));
  margin-bottom: 14px;
}

.pricing-card .feature-list {
  margin-top: 18px;
  margin-bottom: 6px;
}

.pricing-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.pricing-card-cta .arrow {
  transition: transform 0.15s ease;
}

.pricing-card-cta:hover .arrow {
  transform: translateX(3px);
}

.pricing-card-trust {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
}

.landing-faq {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px;
}

.landing-faq h2 {
  text-align: center;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--color-text);
  margin-bottom: 8px;
}

.landing-faq-sub {
  text-align: center;
  font-size: 14.5px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--color-primary);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text-muted);
}

.landing-sticky-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -10px 24px rgba(23, 24, 40, 0.12);
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.landing-sticky-cta .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 14.5px;
}

@media (max-width: 760px) {
  .landing-sticky-cta {
    display: block;
  }

  .landing-sticky-cta.is-visible {
    transform: translateY(0);
  }

  .landing-footer {
    padding-bottom: 92px;
  }
}

.landing-footer {
  text-align: center;
  padding: 36px 24px 44px;
  color: var(--color-text-muted);
  font-size: 13.5px;
}

.landing-footer p {
  margin: 0 0 8px;
}

.landing-footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
}

.landing-footer-links a:hover {
  color: var(--color-text);
}

@media (max-width: 760px) {
  .landing-feature {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 24px;
  }

  .landing-feature-reverse .landing-feature-text,
  .landing-feature-reverse .landing-feature-visual {
    order: initial;
  }
}
