:root {
  --pine-1000: #041810;
  --pine-950: #082217;
  --pine-900: #0c2f21;
  --pine-700: #0f3f2a;
  --mint-600: #00a364;
  --mint-500: #19c37d;
  --mint-300: #7fe4b3;
  --foam: #f5fbf7;
  --panel: #ffffff;
  --border: #d5e7dd;
  --ink: #0f2018;
  --muted: #4b6258;
  --shadow: 0 20px 60px -28px rgba(6, 74, 46, 0.55);
  --glow: 0 14px 30px -18px rgba(25, 195, 125, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-orb {
    animation: floaty 14s ease-in-out infinite;
  }
}

@keyframes floaty {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0px); }
}

body {
  font-family: "Manrope", "Sora", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 900px at 8% 10%, rgba(25, 195, 125, 0.18), transparent),
    radial-gradient(600px 600px at 80% 0%, rgba(12, 63, 42, 0.22), transparent),
    linear-gradient(145deg, var(--pine-950) 0%, var(--pine-900) 50%, var(--pine-1000) 100%);
  color: var(--ink);
  min-height: 100vh;
}

.bg-grid {
  background-image:
    linear-gradient(transparent 0, transparent 94%, rgba(255, 255, 255, 0.06) 100%),
    linear-gradient(90deg, transparent 0, transparent 94%, rgba(255, 255, 255, 0.06) 100%);
  background-size: 80px 80px;
}

.topbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(213, 231, 221, 0.8);
}

.nav-shell {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(213, 231, 221, 0.8);
  box-shadow: var(--shadow);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all 160ms ease;
}
.nav-link:hover {
  border-color: rgba(25, 195, 125, 0.35);
  color: var(--ink);
  background: rgba(25, 195, 125, 0.08);
}
.nav-link.is-active {
  border-color: rgba(25, 195, 125, 0.65);
  background: linear-gradient(120deg, rgba(25, 195, 125, 0.16), rgba(12, 63, 42, 0.1));
  color: var(--ink);
  box-shadow: var(--glow);
}

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

.pill {
  border-radius: 999px;
  border: 1px solid rgba(25, 195, 125, 0.35);
  background: linear-gradient(120deg, rgba(25, 195, 125, 0.18), rgba(25, 195, 125, 0.05));
  color: var(--pine-700);
}

.glass {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(213, 231, 221, 0.9);
  box-shadow: var(--shadow);
}

.cta {
  background: linear-gradient(120deg, #17c07b, #0da861);
  color: #042413;
  border: 1px solid #17c07b;
  box-shadow: 0 15px 35px -20px rgba(23, 192, 123, 0.6);
}
.cta:hover {
  transform: translateY(-1px);
}

input, textarea, select {
  background: #ffffff !important;
  color: var(--ink) !important;
  border-color: #d4e4db !important;
  box-shadow: none !important;
}
input::placeholder, textarea::placeholder {
  color: #9bb1a7 !important;
}

.chip {
  border-radius: 999px;
  border: 1px solid rgba(25, 195, 125, 0.3);
  background: rgba(25, 195, 125, 0.08);
  color: var(--pine-700);
}

.business-pill {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  transition: all 140ms ease;
  box-shadow: 0 10px 30px -22px rgba(6, 74, 46, 0.35);
}
.business-pill:hover {
  border-color: rgba(25, 195, 125, 0.5);
  box-shadow: var(--glow);
}
.business-pill input[type="radio"] {
  appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 999px;
  border: 2px solid rgba(25, 195, 125, 0.4);
  background: #ffffff;
  position: relative;
  cursor: pointer;
  transition: all 120ms ease;
}
.business-pill input[type="radio"]:checked {
  border-color: rgba(25, 195, 125, 0.9);
}
.business-pill input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: #19c37d;
  box-shadow: 0 0 0 4px rgba(25, 195, 125, 0.18);
}
.business-pill:has(input[type="radio"]:checked) {
  border-color: rgba(25, 195, 125, 0.8);
  background: linear-gradient(140deg, rgba(25, 195, 125, 0.12), #ffffff);
  box-shadow: 0 16px 38px -24px rgba(6, 74, 46, 0.5);
}

/* Ensure checkboxes are visible and clickable */
input[type="checkbox"].row-check,
#ledger-select-all,
#receipts-select-all {
  appearance: auto !important;
  accent-color: #10b981;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.stat-tile {
  background: linear-gradient(150deg, rgba(25, 195, 125, 0.12), rgba(12, 63, 42, 0.05));
  border: 1px solid rgba(25, 195, 125, 0.16);
}

/* Override dark Tailwind tokens so existing templates adopt the new palette */
.bg-slate-950,
.bg-slate-900,
.bg-slate-900\/60,
.bg-slate-900\/70,
.bg-slate-900\/80 {
  background-color: rgba(255, 255, 255, 0.95) !important;
}
.bg-slate-800,
.bg-slate-800\/60,
.bg-slate-800\/70,
.bg-slate-800\/80 {
  background-color: rgba(255, 255, 255, 0.85) !important;
}
.border-slate-900,
.border-slate-800,
.border-slate-700,
.border-slate-600 {
  border-color: var(--border) !important;
}
.text-slate-50,
.text-slate-100,
.text-slate-200 {
  color: var(--ink) !important;
}
.text-slate-300,
.text-slate-400,
.text-slate-500,
.text-slate-600 {
  color: var(--muted) !important;
}
.bg-emerald-900\/40,
.bg-emerald-900\/50 {
  background-color: rgba(25, 195, 125, 0.12) !important;
}
.text-emerald-300,
.text-emerald-200 {
  color: #0f7a4e !important;
}
.shadow-emerald-500\/30 {
  box-shadow: var(--glow);
}

/* Flash message palette */
.flash-success { background: #ecfdf3; border: 1px solid #bbf7d0; color: #065f46; }
.flash-warning { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.flash-error { background: #fef2f2; border: 1px solid #fecdd3; color: #991b1b; }
.flash-info { background: #eef2ff; border: 1px solid #c7d2fe; color: #4338ca; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(25, 195, 125, 0.35);
  border-radius: 12px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.35);
}
