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

:root {
  --primary: #10b981; /* Emerald Green */
  --primary-hover: #059669;
  --primary-glow: rgba(16, 185, 129, 0.15);
  --primary-light: #ecfdf5;
  --secondary: #0ea5e9; /* Sky Blue */
  --accent: #f59e0b; /* Warning/Urgent Amber */
  --danger: #ef4444;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;
  --border: #f1f5f9;
  
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px 0 rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --shadow-bottom-sheet: 0 -10px 30px -5px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: #0f172a; /* Frame background */
  color: var(--text-main);
  line-height: 1.5;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* --- App Viewport Frame (Smartphone Emulator) --- */
.app-frame {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  background-color: var(--bg-main);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (min-width: 481px) {
  .app-frame {
    height: 90vh;
    border-radius: 36px;
    border: 8px solid #1e293b;
  }
}

/* --- Scrollable Content Container --- */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 100px; /* Space for sticky bottom navigation + Safe Area */
  scroll-behavior: smooth;
  scrollbar-width: none; /* Hide scrollbar Firefox */
}

.app-content::-webkit-scrollbar {
  display: none;
}

/* View Switcher States */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

/* --- App Header --- */
.app-header {
  position: sticky;
  top: 0;
  background-color: var(--bg-card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

/* Simulated Status Bar for Desktop Emulator */
.status-bar-sim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px 4px 24px;
  background-color: var(--bg-card);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  z-index: 100;
}

@media (max-width: 480px) {
  .status-bar-sim {
    display: none;
  }
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.app-brand i {
  color: var(--primary);
  font-size: 20px;
}

.app-brand span {
  color: var(--primary);
}

.header-action {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  position: relative;
  cursor: pointer;
}

.header-action .badge-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: var(--danger);
  border-radius: var(--radius-full);
  border: 1px solid var(--bg-card);
}

/* --- Search Bar --- */
.search-container {
  padding: 8px 20px 16px 20px;
  background-color: var(--bg-card);
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper i {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: none;
  background-color: var(--bg-main);
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  color: var(--text-main);
  transition: all 0.3s ease;
}

.search-input:focus {
  background-color: #ffffff;
  box-shadow: 0 0 0 2px var(--primary-light), 0 4px 6px -1px rgba(0,0,0,0.05);
}

/* --- Stories Carousel --- */
.stories-section {
  padding: 16px 0;
  background-color: var(--bg-card);
  border-bottom: 8px solid var(--border);
}

.stories-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-sub);
  padding: 0 20px 12px 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stories-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 20px;
  scrollbar-width: none;
}

.stories-carousel::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 68px;
  cursor: pointer;
}

.story-avatar-wrapper {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  padding: 2.5px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-item.read .story-avatar-wrapper {
  background: var(--text-muted);
}

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-card);
  object-fit: cover;
}

.story-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 68px;
}

/* --- Category Circles Grid --- */
.categories-section {
  padding: 20px;
  background-color: var(--bg-card);
  border-bottom: 8px solid var(--border);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.category-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.category-item:hover .category-icon-box {
  transform: translateY(-3px);
}

.cat-medis { background-color: #e0f2fe; color: var(--secondary); }
.cat-bencana { background-color: #fee2e2; color: var(--danger); }
.cat-pendidikan { background-color: #fef3c7; color: var(--accent); }
.cat-panti { background-color: #f3e8ff; color: #a855f7; }

.category-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
}

/* --- Promo Banner --- */
.promo-banner {
  margin: 16px 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  height: 120px;
}

.promo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0,0,0,0.64) 0%, rgba(0,0,0,0) 80%);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.promo-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

.promo-desc {
  font-size: 10px;
  opacity: 0.9;
  max-width: 220px;
}

/* --- Campaign Feed List --- */
.feed-section {
  padding: 16px 20px;
  background-color: var(--bg-card);
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.feed-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.feed-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.feed-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* App-style Campaign Card */
.app-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-img-wrapper {
  position: relative;
  height: 140px;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: white;
}

.app-card-content {
  padding: 16px 16px 8px 16px;
  display: flex;
  flex-direction: column;
}

.app-card-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
}

/* Progress bar indicator */
.card-progress-bar {
  width: 100%;
  height: 6px;
  background-color: #f1f5f9;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.card-progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.8s ease;
}

.card-stats {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
}

.card-stats span strong {
  color: var(--text-main);
}

.card-footer {
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-urgency {
  font-size: 10px;
  font-weight: 700;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-action-btn {
  background-color: var(--primary);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

/* --- Interactive Collapsible Donors Section inside Card --- */
.donors-toggle-row {
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  background-color: #fafbfc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
}

.donors-toggle-row:active {
  background-color: #f1f5f9;
}

.donors-toggle-row i {
  transition: transform 0.3s ease;
}

.donors-toggle-row.expanded i {
  transform: rotate(180deg);
}

.donors-list-container {
  display: none;
  background-color: #ffffff;
  border-top: 1px solid var(--border);
  padding: 4px 16px 12px 16px;
  max-height: 180px;
  overflow-y: auto;
}

.donors-list-container.show {
  display: block;
}

.donor-row-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 11px;
  animation: fadeIn 0.4s ease forwards;
}

.donor-row-item:last-child {
  border-bottom: none;
}

.donor-row-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 70%;
}

.donor-row-name {
  font-weight: 700;
  color: var(--text-main);
}

.donor-row-msg {
  color: var(--text-sub);
  font-style: italic;
  font-size: 10px;
}

.donor-row-amount {
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.highlight-row {
  background-color: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}

/* --- Sticky Bottom Navigation (Mobile Tab bar) --- */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 76px;
  padding-bottom: 12px; /* Simulated Mobile Bottom Safe Area */
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 500;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  width: 60px;
  transition: color 0.2s ease;
}

.nav-item i {
  font-size: 20px;
}

.nav-item-name {
  font-size: 9px;
  font-weight: 700;
}

.nav-item.active {
  color: var(--primary);
}

/* --- Slide-Up Bottom Sheet (Donation Panel) --- */
.bottom-sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-card);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: var(--shadow-bottom-sheet);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.94, 0.6, 1);
  z-index: 1001;
  max-height: 85%;
  display: flex;
  flex-direction: column;
}

.bottom-sheet-overlay.active .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background-color: #cbd5e1;
  border-radius: var(--radius-full);
  margin: 12px auto 6px auto;
}

.sheet-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-title {
  font-size: 15px;
  font-weight: 800;
}

.sheet-close-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-sub);
}

.sheet-body {
  overflow-y: auto;
  padding: 20px;
  flex: 1;
}

/* Bottom Sheet Campaign Preview */
.sheet-campaign-preview {
  display: flex;
  gap: 12px;
  background-color: var(--bg-main);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.preview-img {
  width: 70px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.preview-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Preset Nominal Grid */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.preset-btn {
  background-color: var(--bg-main);
  border: 1.5px solid transparent;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  transition: all 0.2s ease;
}

.preset-btn:active {
  transform: scale(0.95);
}

.preset-btn.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.amount-input-box {
  position: relative;
  margin-bottom: 20px;
}

.amount-input-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

.amount-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background-color: var(--bg-main);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 800;
  outline: none;
  transition: all 0.2s ease;
}

.amount-input:focus {
  background-color: white;
  border-color: var(--primary);
}

/* Bank / E-Wallet selectors */
.payment-method-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-sub);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.payment-method-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.payment-method-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1.5px solid #f1f5f9;
  border-radius: var(--radius-md);
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-method-row:active {
  background-color: var(--bg-main);
}

.payment-method-row.active {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.payment-method-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.payment-icon-wrapper {
  width: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.payment-icon-wrapper i {
  font-size: 18px;
}

.payment-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-method-row.active .payment-radio-circle {
  border-color: var(--primary);
}

.payment-method-row.active .payment-radio-circle::after {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

/* Form input styling */
.sheet-input-group {
  margin-bottom: 16px;
}

.sheet-input-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-sub);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.sheet-input-field {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-main);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}

.sheet-input-field:focus {
  background-color: white;
  border-color: var(--primary);
}

/* Switch styling for anonymous mode */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-bottom: 16px;
  border-top: 1px solid var(--border);
}

.switch-label-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-title {
  font-size: 13px;
  font-weight: 700;
}

.switch-desc {
  font-size: 10px;
  color: var(--text-muted);
}

/* Slide switch toggle buttons */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.switch-toggle input:checked + .slider-round {
  background-color: var(--primary);
}

.switch-toggle input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* Pay CTA bar */
.payment-cta-container {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background-color: white;
}

.btn-full {
  width: 100%;
  padding: 14px;
  background-color: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-full:active {
  transform: scale(0.98);
}

/* --- QRIS Screen --- */
.qris-screen {
  display: none;
  text-align: center;
  padding: 10px 0;
}

.qris-header {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}

.qris-timer {
  font-size: 11px;
  color: var(--danger);
  font-weight: 700;
  margin-bottom: 20px;
}

.qris-barcode-box {
  width: 180px;
  height: 180px;
  margin: 0 auto 20px auto;
  border: 1px solid #cbd5e1;
  padding: 10px;
  border-radius: var(--radius-md);
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qris-barcode-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qris-amount-display {
  background-color: var(--bg-main);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}

.va-transfer-box {
  background-color: var(--bg-main);
  border: 1px dashed var(--text-muted);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: left;
  margin-bottom: 20px;
}

.va-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
}

.va-row:last-child {
  margin-bottom: 0;
}

.va-label {
  color: var(--text-sub);
  font-weight: 600;
}

.va-number {
  font-family: monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.va-copy-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background-color: var(--primary-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

/* Celebration Screen style */
.celebration-screen {
  display: none;
  text-align: center;
  padding: 30px 10px;
}

.celebration-icon {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px auto;
  border: 3px solid var(--primary);
}

.celebration-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.celebration-desc {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 20px;
  line-height: 1.6;
}

.celebration-card {
  background-color: var(--bg-main);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: left;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.cel-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}

.cel-row:last-child {
  margin-bottom: 0;
  font-weight: 800;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  color: var(--primary);
}

.cel-label {
  color: var(--text-sub);
}

.cel-val {
  color: var(--text-main);
}

/* --- Story Viewer Popup --- */
.story-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  z-index: 2000;
  display: none;
  flex-direction: column;
  color: white;
  padding: 24px 20px;
}

.story-progress-container {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.story-progress-bar {
  flex: 1;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.story-progress-fill {
  height: 100%;
  width: 0;
  background-color: white;
  border-radius: var(--radius-full);
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.story-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-user-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1.5px solid white;
}

.story-user-name {
  font-size: 12px;
  font-weight: 700;
}

.story-close {
  font-size: 20px;
  color: white;
  cursor: pointer;
}

.story-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.story-img-main {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.story-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  opacity: 0.9;
}

.story-footer-btn {
  margin-top: auto;
  width: 100%;
  background-color: var(--primary);
  color: white;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
}

/* --- Toast Styling --- */
.toast {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: var(--text-main);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast i {
  color: var(--primary);
}

.update-indicator-banner {
  background-color: #eff6ff;
  border-left: 4px solid var(--secondary);
  padding: 12px 16px;
  margin: 0 20px 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 8px;
}

.update-indicator-banner i {
  color: var(--secondary);
  font-size: 14px;
}

/* --- Public Activity Feed Card Styles --- */
.public-donor-card {
  background-color: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}

.public-donor-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.public-donor-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.public-donor-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.public-donor-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.public-donor-time {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 500;
}

.public-donor-program {
  font-size: 10px;
  color: var(--secondary);
  font-weight: 700;
  margin: 1px 0;
}

.public-donor-amount {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}

.public-donor-message {
  font-size: 10.5px;
  color: var(--text-sub);
  font-style: italic;
  background-color: var(--bg-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  border-left: 2px solid var(--primary);
}


/* --- DYNAMIC VIEWS FOR NAVIGATION TABS --- */

/* Tab 2: My Donations (Riwayat Donasi) */
.history-title-area {
  padding: 24px 20px 12px 20px;
  background-color: white;
  border-bottom: 1px solid var(--border);
}

.history-card-list {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.history-item-card {
  background-color: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.history-date {
  color: var(--text-muted);
  font-weight: 500;
}

.history-status-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-transform: uppercase;
}

.history-card-body {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.history-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 12px;
}

.history-pay-label {
  color: var(--text-sub);
}

.history-amount {
  font-weight: 800;
  color: var(--primary);
}

.history-empty-state {
  text-align: center;
  padding: 80px 20px;
}

.history-empty-icon {
  font-size: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.history-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.history-empty-desc {
  font-size: 12px;
  color: var(--text-sub);
  max-width: 240px;
  margin: 0 auto;
}

/* Tab 3: Transparency Laporan */
.reports-list {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.report-item-card {
  background-color: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.report-icon-box {
  width: 44px;
  height: 44px;
  background-color: #f0fdf4;
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.report-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.report-title-card {
  font-size: 13px;
  font-weight: 700;
}

.report-meta-card {
  font-size: 11px;
  color: var(--text-muted);
}

.report-download-btn {
  font-size: 16px;
  color: var(--text-sub);
  cursor: pointer;
  padding: 4px;
}

.report-download-btn:hover {
  color: var(--primary);
}

/* Tab 4: Account Panel Settings */
.account-profile-box {
  background-color: white;
  padding: 32px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.profile-avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  border: 2px solid var(--primary);
}

.profile-name-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.profile-email-text {
  font-size: 12px;
  color: var(--text-sub);
}

.account-menu-group {
  margin-top: 20px;
  background-color: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.account-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
}

.account-menu-item:last-child {
  border-bottom: none;
}

.account-menu-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-menu-left i {
  font-size: 16px;
  color: var(--text-muted);
}

/* --- Category Circles Filter Active Outline --- */
.category-icon-box.active {
  box-shadow: 0 0 0 3px var(--primary), 0 0 10px rgba(16, 185, 129, 0.6);
  transform: scale(1.08);
}

/* --- Search Empty State --- */
.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px dashed var(--text-muted);
  margin: 10px 0;
  width: 100%;
  animation: fadeIn 0.4s ease forwards;
}

.search-empty-state .empty-icon {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.search-empty-state .empty-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.search-empty-state .empty-desc {
  font-size: 11px;
  color: var(--text-sub);
  max-width: 240px;
  margin: 0 auto;
}

/* --- Card Share Button --- */
.card-share-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-sub);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.card-share-btn:hover {
  background-color: var(--bg-main);
  color: var(--primary);
  border-color: var(--primary);
}

/* --- Card Bookmark Button --- */
.card-bookmark-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 5;
}

.card-bookmark-btn:active {
  transform: scale(0.9);
}

.card-bookmark-btn.active {
  background-color: white;
  color: var(--danger);
}

.card-bookmark-btn.active i {
  font-weight: 900; /* Force FontAwesome solid style */
  color: var(--danger);
}

/* --- Wishlist Section & Cards --- */
.wishlist-section {
  background-color: var(--bg-card);
}

.wishlist-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.wishlist-item-card:active {
  transform: scale(0.99);
}

.wishlist-img {
  width: 50px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.wishlist-details {
  flex: 1;
  min-width: 0;
}

.wishlist-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.wishlist-amount {
  font-size: 10px;
  color: var(--primary);
  font-weight: 800;
}

.wishlist-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wishlist-btn-donasi {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.wishlist-btn-donasi:active {
  transform: scale(0.95);
}

.wishlist-btn-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
}

.wishlist-btn-remove:hover {
  color: var(--danger);
}

/* --- Digital Receipt Layouts --- */
.receipt-print-box {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Kuitansi button inside history cards */
.btn-invoice-link {
  background-color: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-invoice-link:hover {
  background-color: var(--primary);
  color: white;
}

@media print {
  body * {
    visibility: hidden;
  }
  #receiptPrintArea, #receiptPrintArea * {
    visibility: visible;
  }
  #receiptPrintArea {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 480px;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    padding: 30px !important;
    background-color: white !important;
    border-radius: 12px !important;
  }
  body {
    background: white !important;
    margin: 0 !important;
  }
  .app-frame {
    border: none !important;
    box-shadow: none !important;
    background: none !important;
  }
}

/* --- E-Wallet Connection UI --- */
.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wallet-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.wallet-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wallet-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 16px;
}
.gopay-bg { background-color: #00a2e9; }
.ovo-bg { background-color: #4c2a86; }
.dana-bg { background-color: #108ee9; }
.linkaja-bg { background-color: #e02424; }

.wallet-info {
  display: flex;
  flex-direction: column;
}
.wallet-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
}
.wallet-balance {
  font-size: 10px;
  color: var(--text-sub);
}
.wallet-btn-action {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.wallet-btn-action.connected {
  background-color: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}
.wallet-btn-action:active {
  transform: scale(0.95);
}

/* --- FAQ / Help Center Accordion --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: white;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
}
.faq-question i {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}
.faq-item.active .faq-question i {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 16px 14px 16px;
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.5;
  border-top: 1px dashed var(--border);
  animation: slideDown 0.2s ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Sorting Toolbar --- */
.sort-toolbar-container {
  padding: 10px 20px;
  background-color: var(--bg-card);
  border-bottom: 8px solid var(--border);
}
.sort-toolbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.sort-toolbar::-webkit-scrollbar {
  display: none;
}
.sort-pill {
  white-space: nowrap;
  background-color: var(--bg-main);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  outline: none;
}
.sort-pill:active {
  transform: scale(0.95);
}
.sort-pill.active {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

/* --- Simulated Push Notifications --- */
.sim-notification {
  position: absolute;
  top: 10px;
  left: 16px;
  right: 16px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.15);
  z-index: 2500;
  transform: translateY(-150%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}
.sim-notification.active {
  transform: translateY(0);
}
@media (min-width: 481px) {
  .sim-notification {
    top: 45px; /* Account for emulator frame top border */
  }
}
.sim-notification-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.sim-notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.sim-notification-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sim-notification-app {
  font-size: 9px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1px;
}
.sim-notification-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sim-notification-body {
  font-size: 10.5px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.sim-notification-close {
  padding: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 8px;
  transition: color 0.2s ease;
}
.sim-notification-close:hover {
  color: var(--text-main);
}

/* --- Certificate Preview --- */
.certificate-preview-box {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}
