:root {
  --ptp-forest: #123B2A;
  --ptp-forest-light: #1B543C;
  --ptp-mustard: #F5B82E;
  --ptp-amber: #C57932;
  --ptp-amber-text: #8F4F14;
  --ptp-maroon: #6D2537;
  --ptp-cream: #FFF4DE;
  --ptp-cream-soft: #FFF9EE;
  --ptp-charcoal: #20231F;
  --ptp-wa: #16A34A;
}

html, body {
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--ptp-charcoal);
  min-height: 100dvh;
}

body.ptp-app-bg {
  background-color: var(--ptp-cream-soft);
  background-image:
    radial-gradient(rgba(197, 121, 50, 0.08) 1px, transparent 1px),
    radial-gradient(rgba(18, 59, 42, 0.05) 1px, var(--ptp-cream-soft) 1px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
}

body.ptp-auth-bg {
  background: linear-gradient(160deg, #123B2A 0%, #174632 55%, #6D2537 100%);
}

@media (min-width: 540px) {
  body.ptp-app-bg {
    background-color: #EFE6D5;
  }
}

.ptp-mobile-shell {
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  min-height: 100dvh;
  background-color: var(--ptp-cream-soft);
  position: relative;
}

@media (min-width: 540px) {
  .ptp-mobile-shell {
    box-shadow: 0 24px 60px rgba(18, 59, 42, 0.14);
    border-left: 1px solid rgba(197, 121, 50, 0.22);
    border-right: 1px solid rgba(197, 121, 50, 0.22);
  }
}

.ptp-auth-shell {
  background: transparent;
  box-shadow: none;
  border: none;
}

.ptp-main-content {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}

h1, h2, h3, h4, .font-display {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.ptp-topbar {
  background-color: var(--ptp-forest);
  border-bottom: 1px solid rgba(245, 184, 46, 0.22);
  z-index: 1020;
}

.ptp-hero {
  background: linear-gradient(135deg, #123B2A 0%, #194A35 55%, #6D2537 100%);
  color: var(--ptp-cream);
  border-radius: 1.5rem;
}

.ptp-card {
  background-color: #ffffff;
  border: 1px solid rgba(197, 121, 50, 0.22);
  border-radius: 1.25rem;
  box-shadow: 0 2px 10px rgba(32, 35, 31, 0.04);
}

.btn-ptp-mustard {
  background-color: var(--ptp-mustard);
  color: var(--ptp-forest);
  font-weight: 700;
  border: none;
  border-radius: 0.9rem;
  min-height: 46px;
}

.btn-ptp-mustard:hover,
.btn-ptp-mustard:focus-visible {
  background-color: #e2a51e;
  color: var(--ptp-forest);
}

.btn-ptp-forest {
  background-color: var(--ptp-forest);
  color: var(--ptp-cream);
  font-weight: 700;
  border: none;
  border-radius: 0.9rem;
  min-height: 44px;
}

.btn-ptp-forest:hover {
  background-color: var(--ptp-forest-light);
  color: var(--ptp-cream);
}

.btn-ptp-maroon {
  background-color: var(--ptp-maroon);
  color: var(--ptp-cream);
  font-weight: 700;
  border: none;
  border-radius: 0.9rem;
  min-height: 44px;
}

.btn-ptp-whatsapp {
  background-color: var(--ptp-wa);
  color: #ffffff;
  font-weight: 700;
  border: none;
  border-radius: 0.9rem;
  min-height: 44px;
}

.btn-ptp-whatsapp:hover {
  background-color: #15803D;
  color: #ffffff;
}

.ptp-banner-farmhouse {
  background: linear-gradient(90deg, #123B2A 0%, #1B543C 55%, #C57932 100%);
  height: 86px;
  border-radius: 1rem;
}

.ptp-banner-dhol {
  background: linear-gradient(90deg, #6D2537 0%, #8B3249 55%, #C57932 100%);
  height: 86px;
  border-radius: 1rem;
}

.ptp-banner-peg {
  background: linear-gradient(90deg, #20231F 0%, #123B2A 55%, #D99B16 100%);
  height: 86px;
  border-radius: 1rem;
}

/* Fixed 480px Bottom Navigation */
.ptp-bottom-nav {
  background: transparent;
  pointer-events: none;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 1030;
}

.ptp-bottom-nav-inner {
  pointer-events: auto;
  max-width: 480px;
  margin: 0 auto;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: rgba(18, 59, 42, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(245, 184, 46, 0.25);
}

.ptp-bottom-nav-inner a {
  color: rgba(255, 244, 222, 0.72);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  position: relative;
  transition: color 0.15s ease;
}

.ptp-bottom-nav-inner a i {
  font-size: 1.15rem;
}

.ptp-bottom-nav-inner a.active {
  color: var(--ptp-mustard);
}

.ptp-bottom-nav-inner a.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 99px 99px;
  background-color: var(--ptp-mustard);
}

/* Floating Add Expense CTA */
.ptp-fab-wrap {
  position: fixed;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  padding: 0 1rem;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  z-index: 1015;
}

.ptp-fab-btn {
  pointer-events: auto;
  min-height: 48px;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background-color: var(--ptp-mustard);
  color: var(--ptp-forest);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  border: 1px solid rgba(18, 59, 42, 0.18);
  box-shadow: 0 12px 28px rgba(18, 59, 42, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Bottom Sheet Bootstrap Modal Override */
.ptp-sheet-modal .modal-dialog {
  margin: 0 auto;
  max-width: 480px;
  min-height: 100%;
  display: flex;
  align-items: flex-end;
}

.ptp-sheet-modal .modal-content {
  border-radius: 1.5rem 1.5rem 0 0 !important;
  max-height: 88dvh;
  overflow-y: auto;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background-color: #ffffff;
}

.ptp-sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 99px;
  background-color: rgba(32, 35, 31, 0.22);
  margin: 0.65rem auto 0.25rem;
}

.form-control, .form-select {
  min-height: 44px;
  border-radius: 0.85rem;
}
