/* ═══════════════════════════════════════════
   FilteredPayments — Mobile (max-width: 480px)
   Theme: newuseronboarding.css
   ═══════════════════════════════════════════ */

/* ─── FIXED TOP: Header + Chips ─── */
.fptop-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 16px 16px 0;
  margin: 0 auto;
  box-sizing: border-box;
}

.fptop-container {
  width: 100%;
}

/* ─── SCROLLABLE CONTENT ─── */
/* Sits below the fixed header; padding-bottom clears FooterNav */
.fp-page {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 16px;
  padding-bottom: 100px;
  margin: 0 auto;
  box-sizing: border-box;
  padding-top: 440px;
  min-height: 100vh;
}

.fp-container {
  width: 100%;
}

/* ─── HEADER SPACING ─── */
/* HeaderComponent provides its own styles via common.css.
   This ensures the chip row sits below the header correctly. */
.fp-container .mobile-header {
  margin-bottom: 16px;
}

/* ─── LOADING / ERROR / EMPTY ─── */
.fp-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 0;
}

.fp-error {
  text-align: center;
  color: #f87171;
  padding: 40px 20px;
  font-size: 0.85rem;
}

.fp-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
}

/* ─── STICKY CHIPS WRAPPER ─── */
.fp-sticky-chips {
  padding: 0 0 12px;
  margin-top: 12px;
}

/* ─── FILTER CHIPS ─── */
.fp-chip-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.fp-chip-row::-webkit-scrollbar {
  display: none;
}

.fp-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  white-space: nowrap;
  font-family: inherit;
}

.fp-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.fp-chip-active {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.15);
}

.fp-chip-active:hover {
  background: rgba(34, 211, 238, 0.2);
}

.fp-chip-count {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 3px;
}

/* ─── STATS CARD ─── */
.fp-stats-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.fp-stats-gradient-bar {
  height: 3px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6, #8b5cf6);
}

.fp-stats-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 18px 6px;
}

.fp-stats-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.fp-stats-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: #f1f5f9;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  letter-spacing: -0.02em;
}

.fp-stats-right {
  text-align: right;
}

.fp-stats-pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.fp-stats-count {
  padding: 4px 18px 14px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* ─── PAYMENT CARD LIST ─── */
/* Scrollable area — 60vh keeps cards contained between stats and FooterNav */
.fp-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  
}

/* Hide scrollbar but keep functionality */
.fp-card-list::-webkit-scrollbar {
  display: none;
}
.fp-card-list {
  scrollbar-width: none;
}

/* ─── PAYMENT CARD ─── */
.fp-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  outline: none;
  font-family: inherit;
}

.fp-card:hover {
  border-color: rgba(34, 211, 238, 0.2);
  background: linear-gradient(135deg, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
}

.fp-card:active {
  transform: scale(0.98);
}

.fp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.fp-card-mid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.fp-card-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
  margin: 0;
}

.fp-card-amount {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  margin: 0;
}

.fp-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fp-card-date {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
}

.fp-card-po {
  font-size: 0.72rem;
  color: rgba(34, 211, 238, 0.5);
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}


/* ─── BADGES ─── */
.fp-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.fp-badge-sm {
  font-size: 0.68rem;
  padding: 2px 8px;
}

/* Type badges */
.fp-badge-type-abn {
  background: rgba(34, 211, 238, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.fp-badge-type-tfn {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Status badges */
.fp-badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.fp-badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.fp-badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.fp-badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.fp-badge-teal {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.3);
}

.fp-badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.fp-badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ─── MODAL OVERLAY ─── */
/* bottom: 100px keeps modal above the FooterNav */
.fp-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 100px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding: 0;
}

/* ─── MODAL CARD (bottom sheet style) ─── */
/* max-height accounts for the 100px footer clearance */
.fp-modal-card {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px 20px 0 0;
  position: relative;
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-bottom: none;
  animation: fp-slide-up 0.25s ease-out;
  margin-bottom: 100px;
}

@keyframes fp-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fp-modal-gradient-bar {
  height: 3px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6, #8b5cf6);
}

/* ─── MODAL HEADER ─── */
.fp-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.fp-modal-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fp-modal-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fp-modal-icon-cyan {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
}

.fp-modal-icon-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.fp-modal-title {
  color: #f1f5f9;
  font-weight: 700;
  font-size: 1.05rem;
}

.fp-modal-close-x {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color 0.2s ease;
}

.fp-modal-close-x:hover {
  color: #22d3ee;
}

/* ─── MODAL BODY ─── */
.fp-modal-body {
  padding: 16px 20px;
}

.fp-modal-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.fp-modal-date {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
}

.fp-modal-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.fp-modal-row-mt {
  margin-top: 8px;
}

/* ─── MODAL FIELDS ─── */
.fp-modal-field {
  flex: 1;
  min-width: 0;
}

.fp-modal-field-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.fp-modal-field-value {
  font-size: 0.88rem;
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── MODAL AMOUNTS ─── */
.fp-modal-amount-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.fp-modal-amount-box-cyan {
  border-color: rgba(34, 211, 238, 0.2);
}

.fp-modal-amount-box-purple {
  border-color: rgba(139, 92, 246, 0.2);
}

.fp-modal-amount {
  font-size: 0.92rem;
  font-weight: 600;
}

.fp-modal-amount-lg {
  font-size: 1.15rem;
  font-weight: 700;
}

/* Amount colors */
.fp-color-cyan { color: #22d3ee; }
.fp-color-green { color: #4ade80; }
.fp-color-amber { color: #fbbf24; }
.fp-color-orange { color: #fb923c; }
.fp-color-purple { color: #a78bfa; }
.fp-color-blue { color: #60a5fa; }

/* ─── MODAL SECTIONS ─── */
.fp-modal-section-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  margin-top: 4px;
}

.fp-modal-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* ─── LEAVE CHIPS ─── */
.fp-leave-row {
  display: flex;
  gap: 8px;
}

.fp-leave-chip {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}

.fp-leave-chip-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.fp-leave-chip-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
}

/* ─── MODAL LOADING ─── */
.fp-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  gap: 12px;
}

.fp-modal-loading-title {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.95rem;
}

.fp-modal-loading-msg {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
}

/* ─── MODAL FOOTER ─── */
.fp-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── MODAL BUTTONS ─── */
.fp-btn-modal-close {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.fp-btn-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.fp-btn-modal-download {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
  border: none;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.25);
  transition: all 0.2s ease;
  font-family: inherit;
}

.fp-btn-modal-download:hover {
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.35);
}

.fp-btn-modal-download:active {
  transform: scale(0.97);
}

.fp-btn-modal-create {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25);
  transition: all 0.2s ease;
  font-family: inherit;
}

.fp-btn-modal-create:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
}

.fp-btn-modal-create:active {
  transform: scale(0.97);
}

/* ─── UTILITIES ─── */
.fp-mono {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

/* ─── SPINNER ─── */
.fp-spinner-svg {
  animation: fp-spin 0.8s linear infinite;
}

@keyframes fp-spin {
  to { transform: rotate(360deg); }
}

/* ─── FOOTER ─── */
.fp-footer {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.15);
  margin-top: 24px;
  padding-bottom: 16px;
}