/* ============================
   GLOBAL NAV EFFECTS
   ============================ */
/* ======================================
   PAGE BACKGROUND
   ====================================== */
body {
  background: linear-gradient(to bottom, #a7adb6, #878c94);
  background-attachment: fixed;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(to bottom,
      rgba(255,255,255,0.25),
      rgba(255,255,255,0));
  pointer-events: none;
  z-index: 5;
}

.glass-nav {
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 9999px;
  transition: box-shadow .25s ease;
}

#topNav.scrolled .glass-nav {
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}

.nav-item.active {
  background: rgba(255,255,255,0.85);
  color: #111 !important;
  border-radius: 9999px;
  font-weight: 600;
}

/* CRITICAL FIX: Proper spacing from top for nav */
body.nav-offset {
  padding-top: 85px;  /* Reduced for more compact nav */
}

/* Additional top margin for main content container */
.max-w-3xl {
  margin-top: 0;
}

/* ======================================
   ACCOUNT FILTER (Pure CSS, no Tailwind)
   ====================================== */
#accountFilter {
  width: 100%;
  padding: 8px 12px;
  
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  
  border-radius: 9999px; /* pill style */
  font-size: 0.85rem;
  color: #111;

  appearance: none; /* cleaner select */
  outline: none;

  box-shadow: 0 2px 6px rgba(0,0,0,0.08);

  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Optional: select focus state */
#accountFilter:focus {
  border-color: rgba(37, 99, 235, 0.55); /* blue-ish */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}


/* ============================
   MONTH TABS (Arrows v4.2)
   ============================ */
.month-scroll-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 0.8rem;
}

.month-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.28);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  border: none;
  transition: background .25s ease, opacity .25s ease;
}

.month-arrow:hover {
  background: rgba(0,0,0,0.50);
}

.month-arrow.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.month-scroll-mask {
  flex: 1;
  overflow: hidden;   /* desktop: lock scroll */
  pointer-events: none;
  position: relative;
}

.month-scroll {
  display: inline-flex;
  gap: .6rem;
  white-space: nowrap;
  transition: transform .35s ease;
  pointer-events: auto; /* allow clicking month pills */
}

.month-pill {
  flex: 0 0 auto;
  padding: .35rem .65rem;
  font-size: .8rem;
  border-radius: 9999px;
  background: #e5e7eb;
  color: #374151;
  cursor: pointer;
  user-select: none;
  border: none;
  transition: all .2s ease;
}

.month-pill:hover {
  background: #d1d5db;
}

.month-pill.active {
  background: #2563eb !important;
  color: #fff !important;
}

/* MATCH PAGE GRADIENT FADE */
.fade-left,
.fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  pointer-events: none;
  z-index: 3;
}

/* Left Fade */
.fade-left {
  left: 0;
  background: linear-gradient(
    to right,
    rgba(160, 166, 175, 0.65),
    rgba(160, 166, 175, 0.15),
    rgba(160, 166, 175, 0)
  );
}

/* Right Fade */
.fade-right {
  right: 0;
  background: linear-gradient(
    to left,
    rgba(160, 166, 175, 0.65),
    rgba(160, 166, 175, 0.15),
    rgba(160, 166, 175, 0)
  );
}

/* MOBILE: swipe enabled */
@media (max-width: 768px) {
  body.nav-offset {
    padding-top: 80px;  /* Compact nav on mobile */
  }

  .month-scroll-mask {
    pointer-events: auto !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .month-scroll-mask::-webkit-scrollbar {
    display: none !important;
  }

  .month-scroll {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    transform: none !important;
  }

  .month-scroll::-webkit-scrollbar {
    display: none !important;
  }

  .month-arrow {
    display: none !important;
  }
}

/* ============================
   CARDS, PILLS, BADGES
   ============================ */
.txn-card {
  background: rgba(5, 8, 15, 0.80);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: .6rem 1.1rem;
  margin-bottom: 1rem;
  color: #fff;
  box-shadow: 0 10px 34px rgba(0,0,0,0.45);
  transition: all .2s ease;
}

.txn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 38px rgba(0,0,0,0.50);
}

.txn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .35rem;
}

.shop {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color .2s ease;
}

.shop:hover {
  color: #60a5fa;
}

.amount {
  font-weight: 700;
  font-size: 1rem;
  color: #fbbf24;
}

/* Pill Base */
.pill-base {
  display: inline-flex;
  align-items: center;
  padding: .25rem .7rem;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(10px) saturate(160%);
}

.category-pill {
  color: #fff;
}

.location-pill {
  background: rgba(100, 116, 139, 0.6);
  color: #e2e8f0;
}

/* Claim Badges */
.claim-badge {
  padding: .25rem .75rem;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 700;
}

.claim-pending { 
  background: #facc15; 
  color: #111; 
}

.claim-paid { 
  background: #22c55e; 
  color: #fff; 
}

/* Summary */
#monthSummary {
  margin-bottom: 0.8rem;
}

.month-summary-pill {
  display: inline-block;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.6);
  padding: .45rem 1.1rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: .88rem;
  color: #111;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Remarks */
.txn-note {
  color: #e2e8f0;
  font-size: .8rem;
  margin-top: .25rem;
  font-style: italic;
}

.day-group {
  font-size: .85rem;
  font-weight: 650;
  color: #374151;
  margin: 1rem 0 .5rem 0.2rem;
  padding: .3rem 0;
}

/* Ensure proper spacing in records container */
#recordsContainer {
  margin-top: 0.5rem;
}