:root {
  --bg: #08111f;
  --bg-soft: #0f172a;
  --surface: rgba(15, 23, 42, 0.86);
  --surface-2: rgba(15, 23, 42, 0.95);
  --surface-light: #f8fafc;
  --text: #e5eef9;
  --text-soft: #a7b6cc;
  --heading: #ffffff;
  --primary: #4f46e5;
  --primary-2: #06b6d4;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.3);
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
  --shadow-soft: 0 20px 45px rgba(2, 6, 23, 0.22);
  --radius: 18px;
  --radius-lg: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.28), transparent 30%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 26%),
    linear-gradient(180deg, #08111f 0%, #0b1324 45%, #08111f 100%);
  line-height: 1.6;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.12rem 0.45rem;
  border-radius: 0.5rem;
  font-family: inherit;
}

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

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(8, 17, 31, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.brand-badge {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.95rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.36);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav a,
.link-button {
  color: var(--text-soft);
  font-weight: 600;
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.link-button:hover {
  color: var(--heading);
}

.logout-form {
  margin: 0;
}

.link-button {
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  color: var(--heading);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
}

.main-content {
  display: block;
}

.hero {
  padding: 5.5rem 0 2.25rem;
}

.hero-grid,
.page-grid-two,
.footer-grid,
.split-showcase,
.kpi-grid,
.dashboard-grid-pro,
.section-grid {
  display: grid;
  gap: 1.25rem;
}

.hero-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
}

.page-grid-two,
.split-showcase {
  grid-template-columns: 0.92fr 1.08fr;
}

.dashboard-grid-pro {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 2rem;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.section-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.footer-grid {
  grid-template-columns: 1.3fr 0.8fr 0.9fr 1.1fr;
  padding: 3rem 0 2rem;
}

.section-block {
  padding: 1rem 0 0.75rem;
}

.card,
.glass-card,
.cta-card,
.flash {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card,
.glass-card {
  padding: 1.4rem;
}

.soft-card {
  background: linear-gradient(180deg, rgba(19, 31, 55, 0.95), rgba(14, 23, 39, 0.98));
}

.accent-card {
  position: relative;
  overflow: hidden;
}

.accent-card::after {
  content: '';
  position: absolute;
  inset: auto -60px -60px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.28), transparent 65%);
}

.hero h1,
.page-head h1,
.auth-copy h1,
.legal-card h1 {
  color: var(--heading);
  letter-spacing: -0.04em;
  line-height: 1.06;
  margin: 0.45rem 0 0.9rem;
}

.hero h1 {
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  max-width: 11ch;
}

.page-head h1,
.auth-copy h1,
.legal-card h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

h2,
strong {
  color: var(--heading);
}

p,
li,
small,
.table-note {
  color: var(--text-soft);
}

.lead,
.page-subtitle,
.auth-copy p,
.footer-copy {
  max-width: 64ch;
  font-size: 1.02rem;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #c4b5fd;
  background: rgba(79, 70, 229, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 999px;
  padding: 0.34rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-actions,
.hero-badges,
.footer-badges,
.centered-actions,
.page-actions,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(79, 70, 229, 0.36);
}

.button-small {
  padding: 0.6rem 0.95rem;
  font-size: 0.92rem;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  box-shadow: none;
}

.button-donate {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 35px rgba(234, 88, 12, 0.28);
}

.button-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: none;
}

.nav-donate {
  margin-left: 0.4rem;
}

.hero-badges span,
.footer-badges span,
.tag-cloud span,
.pill,
.ghost-pill {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.9rem;
}

.ghost-pill {
  background: rgba(255, 255, 255, 0.025);
}

.hero-panel {
  padding: 1.55rem;
}

.hero-panel-top,
.mini-stat-grid,
.section-title-row,
.list-tile,
.budget-meta-row,
.tag-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.hero-panel-top,
.section-title-row,
.list-tile,
.budget-meta-row {
  align-items: center;
}

.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.25rem;
}

.mini-stat-grid article,
.kpi-card,
.mini-panel,
.budget-card-inline,
.goal-card,
.list-tile,
.empty-state,
.flash {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
}

.mini-stat-grid article,
.kpi-card,
.mini-panel,
.goal-card,
.budget-card-inline,
.empty-state {
  padding: 1rem;
}

.mini-stat-grid span,
.muted-label,
.kpi-card small,
.form-note,
.legal-block p,
.notice-block p {
  color: var(--text-soft);
}

.status-positive {
  color: #86efac;
  font-weight: 700;
}

.showcase-chart,
.bars-pro {
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
}

.showcase-chart span,
.bar-pro {
  flex: 1;
  border-radius: 1.1rem 1.1rem 0.35rem 0.35rem;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.98), rgba(79, 70, 229, 0.98));
}

.bar-pro-item {
  flex: 1;
  display: grid;
  align-items: flex-end;
  justify-items: center;
  gap: 0.7rem;
  min-width: 56px;
}

.bar-pro {
  width: 100%;
  min-height: 12px;
}

.feature-card h2,
.section-title-row h2,
.cta-card h2 {
  margin: 0.35rem 0 0.45rem;
}

.check-list,
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.check-list {
  display: grid;
  gap: 0.75rem;
}

.check-list li {
  position: relative;
  padding-left: 1.6rem;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #86efac;
  font-weight: 800;
}

.compact-list {
  margin-top: 1.2rem;
}

.cta-card {
  padding: 1.35rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.auth-section {
  padding: 3.5rem 0 1.5rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.25rem;
  align-items: center;
}

.auth-card-pro {
  max-width: 560px;
  width: 100%;
  margin-left: auto;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid label {
  display: grid;
  gap: 0.45rem;
  color: var(--heading);
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(3, 11, 24, 0.76);
  color: var(--heading);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(96, 165, 250, 0.8);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.14);
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.25rem 0 1rem;
}

.dashboard-head {
  align-items: center;
}

.kpi-card strong {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  display: block;
  margin: 0.35rem 0;
}

.tall-card {
  min-height: 100%;
}

.stack-list,
.goal-stack,
.budget-stack,
.card-grid-list {
  display: grid;
  gap: 0.9rem;
}

.list-tile {
  padding: 0.95rem 1rem;
}

.no-border {
  padding: 0;
  background: transparent;
  border: 0;
}

.text-link {
  color: #93c5fd;
  font-weight: 700;
}

.text-link:hover {
  color: white;
}

.progress {
  margin: 0.85rem 0 0.65rem;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--success), var(--primary-2));
}

.amount-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  min-width: 104px;
}

.amount-pill.income {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
}

.amount-pill.expense {
  color: #fda4af;
  background: rgba(239, 68, 68, 0.12);
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

th,
 td {
  padding: 1rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

th {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.table-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
}

.color-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}

.legal-wrap {
  padding: 2.4rem 0 1.2rem;
}

.legal-card {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.7rem;
}

.legal-block + .legal-block {
  margin-top: 1.2rem;
}

.notice-block {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius);
  padding: 1rem;
}

.center-card {
  text-align: center;
}

.flash-wrap {
  margin-top: 1rem;
}

.flash {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
}

.flash p,
.flash strong {
  margin: 0;
}

.flash-success {
  border-color: rgba(34, 197, 94, 0.38);
}

.flash-error {
  border-color: rgba(239, 68, 68, 0.38);
}

.flash-info {
  border-color: rgba(96, 165, 250, 0.38);
}

.flash-close {
  background: transparent;
  color: var(--text-soft);
  border: 0;
  font-size: 1rem;
  cursor: pointer;
}

.floating-donate {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 32;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: white;
  font-weight: 800;
  box-shadow: 0 18px 35px rgba(234, 88, 12, 0.34);
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 17, 31, 0.64);
}

.site-footer h3,
.site-footer h4 {
  margin-top: 0;
}

.site-footer ul {
  display: grid;
  gap: 0.45rem;
}

.site-footer li a {
  color: var(--text-soft);
}

.site-footer li a:hover {
  color: white;
}

.donate-card {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(124, 45, 18, 0.32), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 1rem 0 2rem;
  text-align: center;
}

.sticky-card {
  position: sticky;
  top: 102px;
  align-self: start;
}

.empty-state {
  text-align: center;
}

.compact-empty {
  min-height: 220px;
  display: grid;
  align-content: center;
}

@media (max-width: 1080px) {
  .hero-grid,
  .page-grid-two,
  .auth-shell,
  .split-showcase,
  .dashboard-grid-pro,
  .footer-grid,
  .kpi-grid,
  .section-grid.three-col {
    grid-template-columns: 1fr;
  }

  .auth-card-pro {
    margin-left: 0;
  }

  .sticky-card {
    position: static;
  }
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    inset: calc(100% + 0.55rem) 1rem auto 1rem;
    display: none;
    padding: 1rem;
    border-radius: 1.2rem;
    flex-direction: column;
    align-items: stretch;
    background: rgba(8, 17, 31, 0.98);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-donate {
    margin-left: 0;
  }

  .page-head,
  .cta-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 1.2rem));
  }

  .hero {
    padding-top: 4.2rem;
  }

  .hero h1 {
    max-width: none;
  }

  .card,
  .glass-card,
  .legal-card,
  .cta-card {
    padding: 1.1rem;
    border-radius: 1.25rem;
  }

  th,
  td {
    padding: 0.85rem 0.5rem;
  }

  .floating-donate {
    right: 0.8rem;
    bottom: 0.8rem;
    padding: 0.8rem 0.9rem;
    font-size: 0.92rem;
  }
}
