/* ================= PAGE BACKGROUND ================= */

html, body {
  background: linear-gradient(to bottom, #9ba0a8, #858b96) !important;
  color: #111;
  min-height: 100vh;
  background-attachment: fixed;
}

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: 40;
}

.app-bg {
  background: transparent !important;
  min-height: 100vh;
  padding-top: 70px;
}

.wrap {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 16px 20px;
  width: 100%;
  padding-left: 8px !important;
  padding-right: 8px !important;  
  display: block;
}


/* Unified max-width container (matches SpendRecords) */
#tabs,
#fromTabs,
#summary,
.claims-container {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 16px;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}



/* ================= TABS (Claim_To + Claim_From) ================= */
.tabs {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0;               /* ✅ no padding */
  justify-content: flex-start;
  width: 100%;
  max-width: 768px;         /* ✅ ensures width matches SpendRecords */
  margin: 0 auto;           /* ✅ centers it on desktop */
}
.tabs::-webkit-scrollbar { display:none; }

.tab-pill, .from-pill {
  flex:0 0 auto; 
  padding:.5rem 1rem; 
  border-radius:9999px;
  font-weight:800; 
  font-size:.7rem;
  white-space:nowrap; 
  border:1px solid rgba(0,0,0,.08);
  background:#e8edf3; 
  color:#6b7280;
}

.tab-pill.active     { color:#fff; }
.tab-joint.active     { background:#3B82F6; }
.tab-groceries.active { background:#F59E0B; color:#111; }
.tab-syahill.active   { background:#22C55E; }
.tab-nana.active      { background:#8B5CF6; }

.from-pill.active {
  background:#3B82F6;
  color:white;
  border:none;
  box-shadow:0 4px 14px rgba(59,130,246,0.45);
}

/* ================= SUMMARY ================= */
.summary-grid { 
  display:grid; grid-template-columns:repeat(3,1fr);
  gap:.8rem; margin:.6rem 0 .6rem;
}
.summary-box {
  background: rgba(255,255,255,.65);
  border-radius:18px;
  padding:.4rem .6rem;
  text-align:center;
  box-shadow: 0 6px 18px rgba(0,0,0,.06) inset, 0 4px 18px rgba(0,0,0,.05);
}
.summary-title { font-size:.7rem; color:#6b7280; font-weight:700; margin-bottom:.1rem; }
.summary-amount { font-size:.82rem; font-weight:800; }

/* Active highlight */
.summary-box.pending-active {
  background:#F59E0B !important;
  color:#ffffff !important;
  border:none !important;
  box-shadow:0 4px 14px rgba(245,158,11,0.45);
}
.summary-box.paid-active {
  background:#22C55E !important;
  color:#ffffff !important;
  border:none !important;
  box-shadow:0 4px 14px rgba(34,197,94,0.45);
}

/* ================= DATE HEADER ================= */
.date-title {
  font-size:.85rem;
  font-weight:650;
  color: #374151 !important;
  margin: 0.75rem 0 0.4rem 0.2rem;
  display:flex;
  align-items:center;
  gap:.35rem;
}
.date-icon { opacity:.9; font-size:.85rem; }
.date-total { font-weight:700; color:#374151 !important; }
.date-sep { opacity:.5; }
.date-count { opacity:.85; }

/* ================= CLAIM CARD ================= */
.claim-card {
  background: rgba(5, 8, 15, 0.80);              /* same as txn-card */
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 0.6rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 34px rgba(0,0,0,0.45);
  color: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.claim-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.32);
}

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

.claim-shop {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.claim-amount {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none; /* removed dashed underline */
}

.pill-base {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.25);
}

/* Category pill (colored dynamically in JS) */
.claim-category {
  color: #fff;
}

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

.claim-note {
  color: #e2e8f0;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  line-height: 1.25;
}

/* Fade anim on load */
.fade-in { opacity:0; transform:translateY(6px); animation:fadeIn .25s ease-out forwards; }
@keyframes fadeIn { to { opacity:1; transform:translateY(0); } }

.hidden { display:none; }