@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf4;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(16, 131, 62, 0.5);

  --accent: #10833e;
  --accent-light: #16a34a;
  --accent-dark: #065f46;
  --accent-glow: rgba(16, 131, 62, 0.18);

  --gold: #15803d;
  --gold-light: #22c55e;
  --gold-glow: rgba(21, 128, 61, 0.18);

  --success: #059669;
  --error: #dc2626;
  --warning: #d97706;

  --text-primary: #1a1a1a;
  --text-secondary: #4b5563;
  --text-muted: #94a3b8;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(16, 131, 62, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== ANIMATED BACKGROUND REMOVED FOR PURE WHITE ===== */
body::before,
body::after {
  display: none;
}

/* ===== WRAPPER ===== */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 16px 60px;
}

/* ===== HEADER ===== */
.site-header {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeDown 0.7s ease both;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.1));
}

.site-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.site-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.site-subtitle {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ===== LANDING BUTTONS ===== */
#landing-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 480px;
  animation: fadeUp 0.7s ease 0.15s both;
}

.landing-label {
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.choice-card {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  box-shadow: var(--shadow-card);
}

.choice-card:hover {
  background: #f0fdf4;
  border-color: var(--accent);
  box-shadow: var(--shadow-card), 0 0 30px var(--accent-glow);
  transform: translateY(-3px);
}

.choice-card.gold:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-card), 0 0 30px var(--gold-glow);
}

.choice-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.choice-icon.purple {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 4px 20px var(--accent-glow);
}

.choice-icon.gold {
  background: linear-gradient(135deg, var(--accent-dark), var(--gold));
  box-shadow: 0 4px 20px var(--gold-glow);
}

.choice-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.choice-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.choice-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 18px;
  transition: var(--transition);
}

.choice-card:hover .choice-arrow {
  color: var(--accent-light);
  transform: translateX(4px);
}

.choice-card.gold:hover .choice-arrow {
  color: var(--gold-light);
}

/* ===== FORM SECTION ===== */
.form-section {
  display: none;
  width: 100%;
  max-width: 600px;
  animation: fadeUp 0.5s ease both;
}

.form-section.active {
  display: block;
}

.form-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px 36px 32px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.form-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.form-header-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.form-header-icon.purple {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
}

.form-header-icon.gold {
  background: linear-gradient(135deg, var(--accent-dark), var(--gold));
}

.form-header-text h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.form-header-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.back-btn {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
}

.back-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.18);
}

/* ===== FORM FIELDS ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-group label span.req {
  color: var(--error);
  margin-left: 2px;
}

.form-group label span.optional {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  font-size: 0.75rem;
  margin-left: 4px;
}

.form-control {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  padding: 11px 14px;
  transition: var(--transition);
  outline: none;
  width: 100%;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--border-focus);
  background: #f0fdf4;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-control.success {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234b5563'%3E%3Cpath d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}

select.form-control option {
  background: #ffffff;
  color: var(--text-primary);
}

.field-error {
  font-size: 0.75rem;
  color: var(--error);
  display: none;
  align-items: center;
  gap: 4px;
}

.field-error.visible {
  display: flex;
}

/* ===== PAN NOTICE ===== */
.pan-notice {
  background: linear-gradient(135deg, rgba(16, 131, 62, 0.08), rgba(16, 131, 62, 0.04));
  border: 1px solid rgba(16, 131, 62, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  animation: fadeUp 0.3s ease;
}

.otp-status-notice {
  background: linear-gradient(135deg, rgba(16, 131, 62, 0.08), rgba(16, 131, 62, 0.04));
  border: 1px solid rgba(16, 131, 62, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 4px;
  animation: fadeUp 0.3s ease;
}

/* ===== AMOUNT HIGHLIGHT ===== */
.amount-wrapper {
  position: relative;
}

.amount-wrapper .currency-symbol {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  pointer-events: none;
}

.amount-wrapper .form-control {
  padding-left: 28px;
}

/* ===== DIVIDER ===== */
.form-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 20px 0 16px;
}

/* ===== PAY BUTTON ===== */
.pay-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
  background-size: 200% 200%;
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 15px 24px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 30px var(--accent-glow);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: gradientShift 4s ease infinite;
}

.pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
  filter: brightness(1.1);
}

.pay-btn:active {
  transform: translateY(0);
}

.pay-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transition: left 0.5s ease;
}

.pay-btn:hover::before {
  left: 100%;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ===== MOBILE LOOKUP ===== */
/* old mobile-lookup-card definition removed to use the new one below */

.mobile-lookup-card .form-header {
  margin-bottom: 24px;
}

#lookup-btn, #verify-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-dark), var(--gold));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 24px var(--gold-glow);
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#lookup-btn:hover, #verify-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--gold-glow);
}

/* ===== MEMBER INFO CARD ===== */
.member-info-card {
  background: #f0fdf4;
  border: 1px solid rgba(16, 131, 62, 0.15);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.member-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.member-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.member-badge {
  margin-left: auto;
  background: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: #065f46;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ===== RETURNING DONATION FORM ===== */
#returning-donation-area {
  display: none;
}

#returning-donation-area.visible {
  display: block;
  animation: fadeUp 0.4s ease both;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

/* ===== FOOTER TEXT ===== */
.form-footer-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 14px;
}

.form-footer-note i {
  color: var(--success);
  margin-right: 4px;
}

/* ===== HISTORY TABLE ===== */
.history-table-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.history-table th {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 500;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-actions {
  display: flex;
  gap: 8px;
}

.hist-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.hist-btn.print {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.hist-btn.print:hover {
  background: #16a34a;
  color: #fff;
}

.hist-btn.download {
  background: #eff6ff;
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.hist-btn.download:hover {
  background: #3b82f6;
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-card,
  .mobile-lookup-card {
    padding: 24px 18px;
  }

  .site-title {
    font-size: 1.6rem;
  }

  .choice-card {
    padding: 20px 20px;
  }

  .page-wrapper {
    padding: 28px 12px 48px;
  }
}

@media (max-width: 380px) {
  .choice-text p {
    display: none;
  }
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  background: #ffffff;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
}

.sidebar .site-logo {
  width: 100%;
  max-width: 150px;
  margin-bottom: 40px;
  justify-content: flex-start;
  filter: none;
}

.sidebar .site-logo img {
  max-height: 50px;
}

.main-content {
  padding: 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.nav-list {
  list-style: none;
  margin-top: 40px;
  flex-grow: 1;
}

.nav-item {
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  margin-bottom: 4px;
}

.nav-link i {
  width: 22px;
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-link:hover {
  background: #f0fdf4;
  color: var(--accent);
}

.nav-link:hover i {
  color: var(--accent);
}

.nav-link.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.nav-link.active i {
  color: #ffffff;
}

/* ===== TOPBAR / HEADER BAR ===== */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  background: #ffffff;
  padding: 20px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  width: 100%;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}

.sidebar-overlay,
.sidebar-close {
  display: none;
}

.header-bar h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.header-bar p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.user-pill {
  background: #ffffff;
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.user-pill:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ===== STATS & CARDS ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.stat-card {
  background: #ffffff;
  padding: 30px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.stat-card h3 {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.stat-card .value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 12px;
}

@media (max-width: 1200px) {
  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
  }

  .stat-card {
    padding: 25px;
  }
}

@media (max-width: 600px) {
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
  }

  .stat-card {
    padding: 20px;
    border-radius: var(--radius-lg);
  }

  .stat-card .value {
    font-size: 1.8rem;
  }
}

/* ===== DATA TABLES ===== */
.data-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  max-width: 100%;
}

.data-card h3 {
  padding: 25px 30px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.2rem;
  font-weight: 700;
  background: #fafbff;
}

.table-container {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

.table-container::-webkit-scrollbar {
  height: 6px;
}

.table-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

.table-container::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 600px) {
  .data-card h3 {
    padding: 18px 20px;
    font-size: 1.1rem;
  }

  th,
  td {
    padding: 12px 15px;
    font-size: 0.85rem;
  }

  th {
    white-space: nowrap;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

@media (max-width: 768px) {
  table {
    min-width: 800px;
  }
}

th {
  text-align: left;
  background: #f9fafb;
  padding: 16px 25px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

td {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-primary);
  transition: var(--transition);
}

tr:hover td {
  background: #fcfcfd;
}

tr[onclick] {
  cursor: pointer;
}

.badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
}

.badge-success {
  background: #ecfdf5;
  color: #10b981;
}

/* ===== UTILS ===== */
.search-bar {
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-bar>div {
    width: 100%;
  }

  .search-bar button {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

.search-input {
  flex-grow: 1;
  padding: 14px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition);
  background: #ffffff;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
  outline: none;
}

/* ===== PROFILE / DETAILS VIEW ===== */
.profile-header {
  display: flex;
  align-items: center;
  gap: 35px;
  margin-bottom: 40px;
  background: #ffffff;
  padding: 35px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.profile-avatar {
  width: 90px;
  height: 90px;
  background: #f0fdf4;
  color: var(--accent);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
  border: 1px solid rgba(16, 131, 62, 0.1);
  box-shadow: 0 8px 20px rgba(16, 131, 62, 0.1);
}

.profile-info h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.profile-info p {
  color: var(--text-secondary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 30px;
}

.info-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 35px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  height: fit-content;
}

.info-item {
  margin-bottom: 25px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.info-item span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.history-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.history-card h3 {
  padding: 25px 30px;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.2rem;
  background: #fafbff;
}

.lifetime-stat {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid rgba(16, 131, 62, 0.1);
  padding: 30px;
  border-radius: var(--radius-lg);
  margin-top: 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 0 20px rgba(16, 131, 62, 0.05);
}

.lifetime-val {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  margin-top: 5px;
}

/* ===== RESPONSIVE DASHBOARD ===== */
/* ===== RESPONSIVE DASHBOARD (COLLAPSIBLE SIDEBAR) ===== */
@media (max-width: 768px) {
  .dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100vh;
    z-index: 2000;
    transition: var(--transition);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
  }

  .sidebar-open .sidebar {
    left: 0;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
  }

  .main-content {
    padding: 20px 15px;
    width: 100%;
  }

  .sidebar-toggle {
    display: flex !important;
  }

  .sidebar-close {
    display: flex !important;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    border: none;
  }
}

.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  margin-right: 15px;
}

.sidebar-toggle:hover {
  background: #f0fdf4;
  color: var(--accent);
  border-color: var(--accent);
}

.sidebar-close {
  display: none;
}

@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 25px 20px;
  }

  .profile-avatar {
    margin: 0 auto;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .header-bar {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    text-align: left;
    padding: 20px;
  }

  .header-bar .top-left {
    display: flex;
    align-items: center;
    width: 100%;
  }

  .header-bar div:first-child {
    width: 100%;
  }

  .user-pill {
    width: fit-content;
    padding: 6px 12px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 25px 20px;
  }

  .history-card h3 {
    padding: 20px;
    font-size: 1.1rem;
  }

  td,
  th {
    padding: 15px;
    font-size: 0.85rem;
  }

  .lifetime-stat {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.5rem;
  }

  .form-card {
    padding: 25px 20px;
  }

  .main-content {
    padding: 15px 10px;
  }

  .header-bar h1 {
    font-size: 1.3rem;
  }

  .stat-card .value {
    font-size: 1.6rem;
  }
}



/* ===== RETURNING LAYOUT ===== */
.returning-section-wide {
  max-width: 1100px !important;
}

.returning-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

@media (min-width: 1024px) {
  .returning-layout {
    flex-direction: row;
    justify-content: center;
    align-items: start;
    flex-wrap: wrap;
  }
}

.mobile-lookup-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  width: 100%;
  max-width: 500px;
}

.history-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  width: 100%;
  /* max-width: 500px; */
  animation: fadeUp 0.5s ease both;
}

.history-card .form-header {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 10px;
}

.history-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.history-item-card:hover {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.15);
  transform: translateX(4px);
}

.hist-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hist-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hist-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ===== PREMIUM PAGINATION ===== */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 15px;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pagination-info span {
  font-weight: 600;
  color: var(--text-primary);
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.pagination-item a, 
.pagination-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: #ffffff;
  cursor: pointer;
}

.pagination-item a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.pagination-item.active span {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.pagination-item.disabled span {
  color: var(--text-muted);
  background: #f8fafc;
  cursor: not-allowed;
  border-color: var(--border-color);
}

@media (max-width: 640px) {
  .pagination-container {
    flex-direction: column;
    text-align: center;
  }
}