/* ============================================
   Setu by Swadharma — App Styles
   Warm Sanatani temple aesthetics, mobile-first
   ============================================ */

/* --- Base Reset & Globals --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  transition: background-color var(--duration-slow) var(--ease-in-out), color var(--duration-slow) var(--ease-in-out);
  overflow-x: hidden;
  line-height: 1.5;
}

/* --- Phone Frame Container --- */
.app-frame {
  max-width: 430px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  position: relative;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#app-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  will-change: transform, opacity;
}

/* --- Directional Page Transitions --- */
@keyframes pageSlideFromRight {
  from { transform: translateX(28%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pageSlideFromLeft {
  from { transform: translateX(-12%); opacity: 0.4; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: scale(0.985) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

#app-content[data-nav="forward"] {
  animation: pageSlideFromRight var(--duration-page) var(--ease-ios) both;
}

#app-content[data-nav="back"] {
  animation: pageSlideFromLeft 0.28s var(--ease-ios) both;
}

#app-content[data-nav="fade"] {
  animation: pageFadeIn 0.22s ease-out both;
}

/* --- Scrollbar --- */
.app-frame::-webkit-scrollbar { width: 3px; }
.app-frame::-webkit-scrollbar-track { background: transparent; }
.app-frame::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
.page-content::-webkit-scrollbar { width: 3px; }
.page-content::-webkit-scrollbar-track { background: transparent; }
.page-content::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* --- Typography --- */
.font-sans { font-family: var(--font-body); }
.font-display { font-family: var(--font-display); }

/* --- Page Content Area --- */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--space-5) var(--space-6);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
}

.page-content.auth-page {
  padding: 40px var(--space-6) 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- Header --- */
.app-header {
  flex-shrink: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-secondary);
  padding: var(--space-3) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  transition: background-color var(--duration-slow) var(--ease-in-out),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

.app-header.scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .app-header.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.app-header .header-title {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* --- Chakra spinner (spinning Dharma Chakra as a loader) --- */
.chakra-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C8401C' stroke-width='5' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='40' stroke-width='4'/%3E%3Cline x1='50' y1='12' x2='50' y2='88'/%3E%3Cline x1='12' y1='50' x2='88' y2='50'/%3E%3Cline x1='23' y1='23' x2='77' y2='77'/%3E%3Cline x1='77' y1='23' x2='23' y2='77'/%3E%3Cline x1='30' y1='14' x2='70' y2='86'/%3E%3Cline x1='70' y1='14' x2='30' y2='86'/%3E%3Cline x1='14' y1='30' x2='86' y2='70'/%3E%3Cline x1='86' y1='30' x2='14' y2='70'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='6' fill='%23F4C430'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: chakraSpin 1.6s linear infinite;
  vertical-align: middle;
}

.chakra-spinner-sm { width: 18px; height: 18px; }
.chakra-spinner-md { width: 32px; height: 32px; }
.chakra-spinner-lg { width: 56px; height: 56px; }
.chakra-spinner-xl { width: 88px; height: 88px; }

@keyframes chakraSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .chakra-spinner { animation-duration: 4s; }
}

[data-theme="dark"] .chakra-spinner {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23E86A3D' stroke-width='5' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='40' stroke-width='4'/%3E%3Cline x1='50' y1='12' x2='50' y2='88'/%3E%3Cline x1='12' y1='50' x2='88' y2='50'/%3E%3Cline x1='23' y1='23' x2='77' y2='77'/%3E%3Cline x1='77' y1='23' x2='23' y2='77'/%3E%3Cline x1='30' y1='14' x2='70' y2='86'/%3E%3Cline x1='70' y1='14' x2='30' y2='86'/%3E%3Cline x1='14' y1='30' x2='86' y2='70'/%3E%3Cline x1='86' y1='30' x2='14' y2='70'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='6' fill='%23F4C430'/%3E%3C/svg%3E");
}

/* Inline spinner inside button (replaces text label while loading) */
.btn .chakra-spinner {
  filter: brightness(0) invert(1); /* white version on filled buttons */
}

.btn-outline .chakra-spinner {
  filter: none; /* keep terracotta on outline */
}

/* Centered page-level loading state */
.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px var(--space-5);
  gap: var(--space-4);
}

.page-loading .chakra-spinner {
  width: 56px;
  height: 56px;
}

.page-loading-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* --- Sacred chakra-ring success icon (receipt confirmation, etc.) --- */
.success-chakra-icon {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C8401C' stroke-opacity='0.55' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cline x1='50' y1='8' x2='50' y2='92'/%3E%3Cline x1='8' y1='50' x2='92' y2='50'/%3E%3Cline x1='20' y1='20' x2='80' y2='80'/%3E%3Cline x1='80' y1='20' x2='20' y2='80'/%3E%3Cline x1='29' y1='10.7' x2='71' y2='89.3'/%3E%3Cline x1='71' y1='10.7' x2='29' y2='89.3'/%3E%3Cline x1='10.7' y1='29' x2='89.3' y2='71'/%3E%3Cline x1='89.3' y1='29' x2='10.7' y2='71'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle, var(--saffron-light) 0%, var(--brand-light) 100%);
  background-size: 100% 100%, 100% 100%;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  box-shadow:
    0 0 0 1px rgba(200, 64, 28, 0.18),
    0 6px 24px rgba(200, 64, 28, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: chakraSpinIn 0.7s var(--ease-spring);
}

.success-chakra-icon .material-symbols-outlined {
  font-size: 34px;
  color: var(--brand);
  font-variation-settings: 'FILL' 0, 'wght' 800;
  position: relative;
  z-index: 1;
  /* Tucked inside the chakra ring */
  background: var(--bg-card);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(60, 30, 15, 0.1);
}

@keyframes chakraSpinIn {
  0% { transform: scale(0.5) rotate(-90deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .success-chakra-icon { animation: none; }
}

[data-theme="dark"] .success-chakra-icon {
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23F4C430' stroke-opacity='0.65' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cline x1='50' y1='8' x2='50' y2='92'/%3E%3Cline x1='8' y1='50' x2='92' y2='50'/%3E%3Cline x1='20' y1='20' x2='80' y2='80'/%3E%3Cline x1='80' y1='20' x2='20' y2='80'/%3E%3Cline x1='29' y1='10.7' x2='71' y2='89.3'/%3E%3Cline x1='71' y1='10.7' x2='29' y2='89.3'/%3E%3Cline x1='10.7' y1='29' x2='89.3' y2='71'/%3E%3Cline x1='89.3' y1='29' x2='10.7' y2='71'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle, rgba(244, 196, 48, 0.16) 0%, rgba(232, 106, 61, 0.12) 100%);
  box-shadow:
    0 0 0 1px rgba(232, 106, 61, 0.3),
    0 6px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .success-chakra-icon .material-symbols-outlined {
  background: var(--bg-card);
  color: var(--accent);
}

/* --- Display title (Playfair Display, used for hero numbers + stats) --- */
.display-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.05;
  margin: 0;
}
.display-title-sm { font-size: 22px; }
.display-title-md { font-size: 30px; }
.display-title-lg { font-size: 36px; }
.display-title-xl { font-size: 44px; }
.display-title-inverse { color: #FFFFFF; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }

.header-brand-logo {
  height: 44px;
  width: auto;
  display: block;
  /* Sharpen the terracotta against parchment for crisp focus */
  filter: contrast(1.12) saturate(1.15) drop-shadow(0 1px 2px rgba(60, 30, 15, 0.12));
  -webkit-filter: contrast(1.12) saturate(1.15) drop-shadow(0 1px 2px rgba(60, 30, 15, 0.12));
  image-rendering: -webkit-optimize-contrast;
}

[data-theme="dark"] .header-brand-logo {
  /* On warm-night background, slightly lift brightness so the terracotta logo retains punch */
  filter: contrast(1.1) saturate(1.2) brightness(1.15) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  -webkit-filter: contrast(1.1) saturate(1.2) brightness(1.15) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.app-header .header-back {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--duration-fast), transform var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}

.app-header .header-back:active {
  transform: scale(0.9);
  background: var(--surface-highlight);
}

.app-header .header-actions {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

.app-header .header-action-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast), transform var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.app-header .header-action-btn:active {
  transform: scale(0.9);
  background: var(--surface-highlight);
  color: var(--text-primary);
}

.app-header .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 500;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  flex-shrink: 0;
  z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border-secondary);
  transition: background-color var(--duration-slow) var(--ease-in-out);
}

.bottom-nav-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: var(--space-2) var(--space-2);
}

@supports (padding: env(safe-area-inset-bottom)) {
  .bottom-nav-inner {
    padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  padding: 6px 16px;
  border: none;
  background: none;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.02em;
  transition: color var(--duration-normal) var(--ease-in-out), transform var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}

.nav-item .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: font-variation-settings var(--duration-normal), transform var(--duration-normal) var(--ease-spring);
}

.nav-item:active {
  transform: scale(0.88);
}

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

.nav-item.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 200, 'opsz' 24;
  transform: scale(1.08);
}

/* Pill-shaped active indicator */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--brand);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
  animation: navPillIn 0.3s var(--ease-spring) forwards;
}

@keyframes navPillIn {
  from { width: 0; opacity: 0; }
  to { width: 24px; opacity: 1; }
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--badge-unread);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-nav);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* --- Button Badge --- */
.btn-badge-wrapper {
  position: relative;
  flex: 1;
  display: flex;
}
.btn-badge-wrapper .btn { width: 100%; }
.btn-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--badge-unread);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: 2px solid var(--bg-primary);
  animation: badgePulse 2s ease-in-out infinite;
}

.temple-detail-actions.three-up .btn {
  padding: 12px 8px;
  font-size: 13px;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--duration-slow), border-color var(--duration-slow), box-shadow var(--duration-slow), transform var(--duration-fast);
}

.card-gold {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

/* Subtle saffron glow on card-gold */
.card-gold::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 60%;
  height: 100%;
  background: radial-gradient(ellipse, var(--saffron-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Dharma ID Card (QR-Centric) --- */
.dharma-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1.3 / 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, #3B1810 0%, #7C2D12 35%, #C8401C 70%, #E05A2D 100%);
  border: none;
  box-shadow: 0 8px 32px rgba(124, 45, 18, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.4s var(--ease-spring), box-shadow var(--duration-slow);
  -webkit-tap-highlight-color: transparent;
}

/* Slowly rotating chakra watermark — sacred ambient motion */
.dharma-card-chakra {
  position: absolute;
  width: 50%;
  aspect-ratio: 1 / 1;
  bottom: -8%;
  right: -6%;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.13' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='42'/%3E%3Cline x1='50' y1='8' x2='50' y2='92'/%3E%3Cline x1='8' y1='50' x2='92' y2='50'/%3E%3Cline x1='20' y1='20' x2='80' y2='80'/%3E%3Cline x1='80' y1='20' x2='20' y2='80'/%3E%3Cline x1='29' y1='10.7' x2='71' y2='89.3'/%3E%3Cline x1='71' y1='10.7' x2='29' y2='89.3'/%3E%3Cline x1='10.7' y1='29' x2='89.3' y2='71'/%3E%3Cline x1='89.3' y1='29' x2='10.7' y2='71'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='5' fill='%23ffffff' fill-opacity='0.18'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  animation: dharmaCardChakraSpin 120s linear infinite;
  will-change: transform;
}

@keyframes dharmaCardChakraSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .dharma-card-chakra { animation: none; }
}

[data-theme="dark"] .dharma-card {
  background: linear-gradient(135deg, #1A0F08 0%, #3B1810 35%, #7C2D12 70%, #C8401C 100%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 1px rgba(232, 106, 61, 0.3);
}

[data-theme="dark"] .dharma-card-chakra {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23F4C430' stroke-opacity='0.18' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='42'/%3E%3Cline x1='50' y1='8' x2='50' y2='92'/%3E%3Cline x1='8' y1='50' x2='92' y2='50'/%3E%3Cline x1='20' y1='20' x2='80' y2='80'/%3E%3Cline x1='80' y1='20' x2='20' y2='80'/%3E%3Cline x1='29' y1='10.7' x2='71' y2='89.3'/%3E%3Cline x1='71' y1='10.7' x2='29' y2='89.3'/%3E%3Cline x1='10.7' y1='29' x2='89.3' y2='71'/%3E%3Cline x1='89.3' y1='29' x2='10.7' y2='71'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='5' fill='%23F4C430' fill-opacity='0.22'/%3E%3C/svg%3E");
}

.dharma-card:active {
  transform: scale(0.97);
}

/* Subtle shimmer overlay */
.dharma-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}

/* Animated shimmer sweep */
.dharma-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 55%, transparent 80%);
  animation: cardShimmerSweep 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes cardShimmerSweep {
  0%, 100% { left: -120%; }
  50% { left: 120%; }
}

.dharma-card-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: var(--space-5) 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Top row: brand + contactless */
.dharma-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dharma-card-brand {
  display: flex;
  align-items: center;
}

.dharma-card-brand img {
  height: 28px;
  width: auto;
  object-fit: contain;
  /* Render logo as white silhouette on terracotta gradient for max legibility */
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.dharma-card-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.dharma-card-qr-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.dharma-card-qr-center .qr-code-svg {
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.dharma-card-contactless {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dharma-card-contactless svg {
  width: 22px;
  height: 22px;
  opacity: 0.5;
}

/* Middle row: chip + QR */
.dharma-card-middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Gold metallic chip */
.dharma-card-chip {
  width: 42px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #C8A84B 0%, #E8C97A 25%, #F5E09A 50%, #D4A843 75%, #B8912E 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dharma-card-chip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.15);
}

.dharma-card-chip::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.dharma-card-chip-lines {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

.dharma-card-qr {
  position: relative;
}

.dharma-card-qr .qr-code-svg {
  border-radius: 4px;
}

/* QR radiation rings */
.dharma-card-qr .qr-radiation-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  opacity: 0;
  animation: radiateRingCard 3s ease-out infinite;
  pointer-events: none;
}

.dharma-card-qr .qr-radiation-ring:nth-child(1) { width: 110%; height: 110%; animation-delay: 0s; }
.dharma-card-qr .qr-radiation-ring:nth-child(2) { width: 130%; height: 130%; animation-delay: 1s; }
.dharma-card-qr .qr-radiation-ring:nth-child(3) { width: 150%; height: 150%; animation-delay: 2s; }

@keyframes radiateRingCard {
  0% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.85); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

/* Bottom row: address + holder name */
.dharma-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dharma-card-address {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1.5px;
  word-break: break-all;
}

.dharma-card-holder {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.dharma-card-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  opacity: 0.95;
}

.dharma-card-since {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dharma-card-since span {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

/* Card background pattern */
.dharma-card-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.04;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.5) 0px, rgba(255,255,255,0.5) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.5) 0px, rgba(255,255,255,0.5) 1px, transparent 1px, transparent 20px);
}

/* Card actions row below card */
.dharma-card-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: 14px;
}

/* Legacy QR support */
.qr-code-svg {
  position: relative;
  z-index: 2;
  border-radius: 4px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: all var(--duration-normal) var(--ease-in-out);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.01em;
}

.btn:active {
  transform: scale(0.96);
}

.btn-gold, .btn-primary {
  background: var(--brand);
  color: #FFFFFF;
  box-shadow: var(--shadow-brand);
}

[data-theme="dark"] .btn-gold,
[data-theme="dark"] .btn-primary {
  background: #E86A3D;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(232, 106, 61, 0.3);
}

.btn-gold:hover, .btn-primary:hover {
  opacity: 0.92;
  box-shadow: 0 6px 24px rgba(200, 64, 28, 0.3);
}

.btn-outline {
  background: var(--bg-card);
  border: 1.5px solid var(--brand);
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(60, 30, 15, 0.04);
  font-weight: 600;
}

.btn-outline:hover {
  background: var(--brand-light);
  border-color: var(--brand-dark);
  color: var(--brand-dark);
}

[data-theme="dark"] .btn-outline {
  background: rgba(232, 106, 61, 0.16);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(232, 106, 61, 0.26);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  padding: var(--space-2) var(--space-4);
}

.btn-ghost:hover {
  background: var(--surface-highlight);
}

.btn-danger {
  background: var(--error);
  color: white;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
}

.btn-sm {
  padding: var(--space-2) 18px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* --- Form Inputs --- */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 13px var(--space-4);
  background: var(--bg-input);
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

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

/* Validation input wrapper */
.form-input-wrap {
  position: relative;
}

.form-input-wrap .form-input {
  padding-right: 40px;
}

.form-input-tick {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  font-size: 20px;
  color: var(--success);
  font-variation-settings: 'FILL' 1, 'wght' 600;
  opacity: 0;
  transition: transform 0.3s var(--ease-spring), opacity 0.2s ease;
  pointer-events: none;
}

.form-input-wrap.valid .form-input {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-input-wrap.valid .form-input-tick {
  transform: translateY(-50%) scale(1);
  opacity: 1;
}

.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-bg);
}

.form-error {
  font-size: 12px;
  color: var(--error);
  margin-top: var(--space-1);
  display: none;
  font-weight: 500;
}

.form-error.visible {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* --- Toggle Switch --- */
.toggle-switch {
  position: relative;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--toggle-bg);
  border-radius: var(--radius-full);
  transition: background 0.3s var(--ease-in-out);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: var(--radius-full);
  transition: transform 0.3s var(--ease-spring);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

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

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

/* --- Chips/Tags --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 11px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
  cursor: pointer;
  transition: all var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.chip:active {
  transform: scale(0.95);
}

.chip.active {
  background: var(--brand);
  color: #FFFFFF;
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(200, 64, 28, 0.25);
}

[data-theme="dark"] .chip.active {
  background: rgba(232, 106, 61, 0.2);
  color: #FBD64D;
  border-color: rgba(232, 106, 61, 0.4);
  box-shadow: none;
}

/* --- Progress Bar --- */
.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--saffron));
  border-radius: var(--radius-full);
  transition: width 0.8s var(--ease-out);
  animation: progressGrow 1.2s var(--ease-out) forwards;
  transform-origin: left;
  position: relative;
}

/* Shimmer on progress bar */
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: shimmerSlide 2s ease-in-out infinite;
}

@keyframes shimmerSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes progressGrow {
  from { width: 0; }
}

/* --- Temple Card --- */
.temple-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-spring), box-shadow var(--duration-normal);
  -webkit-tap-highlight-color: transparent;
}

.temple-card:active {
  transform: scale(0.97);
}

.temple-card-header {
  height: 110px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: var(--space-3);
  overflow: hidden;
}

/* Gradient overlay for readability */
.temple-card-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.35) 100%);
}

.temple-card-header > * {
  position: relative;
  z-index: 1;
}

.temple-card-body {
  padding: var(--space-4) var(--space-5) var(--space-5);
}

/* --- Temple Favourite Button --- */
.temple-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--duration-fast), background var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}

.temple-fav-btn .material-symbols-outlined {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
  transition: color var(--duration-fast);
}

.temple-fav-btn:active {
  transform: scale(0.85);
}

.temple-fav-btn.active .material-symbols-outlined {
  color: var(--vermillion);
}

/* Heart burst on activate (added briefly via JS, then removed) */
.temple-fav-btn.heart-burst .material-symbols-outlined {
  animation: heartBurstPop 0.5s var(--ease-spring);
}

.temple-fav-btn.heart-burst::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 0%, var(--vermillion) 1.5px, transparent 2.5px),
    radial-gradient(circle at 100% 50%, var(--vermillion) 1.5px, transparent 2.5px),
    radial-gradient(circle at 50% 100%, var(--vermillion) 1.5px, transparent 2.5px),
    radial-gradient(circle at 0% 50%, var(--vermillion) 1.5px, transparent 2.5px),
    radial-gradient(circle at 85% 15%, var(--saffron-dark) 1.2px, transparent 2.2px),
    radial-gradient(circle at 15% 15%, var(--saffron-dark) 1.2px, transparent 2.2px),
    radial-gradient(circle at 85% 85%, var(--saffron-dark) 1.2px, transparent 2.2px),
    radial-gradient(circle at 15% 85%, var(--saffron-dark) 1.2px, transparent 2.2px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  animation: heartBurstSparks 0.55s ease-out forwards;
  z-index: 1;
}

@keyframes heartBurstPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@keyframes heartBurstSparks {
  0%   { transform: scale(0.4); opacity: 0; }
  35%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1.85); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .temple-fav-btn.heart-burst .material-symbols-outlined { animation: none; }
  .temple-fav-btn.heart-burst::before { display: none; }
}

/* --- Temples Description --- */
.temples-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

/* --- Favourites Filter Chip --- */
.fav-filter-chip .material-symbols-outlined {
  transition: color var(--duration-fast);
}

.fav-filter-chip.active .material-symbols-outlined {
  color: #FFFFFF;
}

/* --- Notification Item --- */
/* --- Notification card (premium grouped layout) --- */
.notification-item {
  position: relative;
  display: flex;
  gap: var(--space-3);
  padding: 14px var(--space-4) 14px var(--space-5);
  margin: 0 var(--space-4) 10px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-secondary);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s var(--ease-spring), box-shadow var(--duration-normal);
  -webkit-tap-highlight-color: transparent;
}

.notification-item:active {
  transform: scale(0.985);
  box-shadow: var(--shadow-md);
}

/* Unread: warm cream tint + left accent stripe + subtle glow */
.notification-item.unread {
  background: linear-gradient(90deg, rgba(244, 196, 48, 0.16) 0%, var(--bg-card) 35%);
  border-color: rgba(200, 64, 28, 0.22);
  box-shadow: 0 1px 2px rgba(60, 30, 15, 0.04), 0 4px 12px rgba(200, 64, 28, 0.1);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--saffron) 100%);
  border-radius: 0 2px 2px 0;
}

[data-theme="dark"] .notification-item.unread {
  background: linear-gradient(90deg, rgba(251, 214, 77, 0.18) 0%, var(--bg-card) 35%);
  border-color: rgba(232, 106, 61, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(232, 106, 61, 0.05);
}

[data-theme="dark"] .notification-item.unread::before {
  background: linear-gradient(180deg, var(--accent) 0%, var(--gold) 100%);
}

.notification-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 24px;
  /* Subtle inner highlight + outer ring for depth */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 3px rgba(60, 30, 15, 0.08);
}

.notification-icon-wrapper .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

[data-theme="dark"] .notification-icon-wrapper {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .notification-icon-wrapper .material-symbols-outlined {
  filter: brightness(1.45) saturate(1.15);
}

.notification-content {
  flex: 1;
  min-width: 0;
  padding-right: 14px; /* room for the unread dot in the corner */
}

.notification-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.notification-item.unread .notification-title {
  font-weight: 700;
}

/* Temple chip — terracotta-tinted pill with proper contrast */
.notification-temple-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 6px;
  line-height: 1;
  padding: 3px 8px 3px 6px;
  background: var(--brand-light);
  border-radius: var(--radius-full);
  width: fit-content;
  letter-spacing: 0.2px;
}

[data-theme="dark"] .notification-temple-tag {
  background: rgba(232, 106, 61, 0.15);
  color: var(--accent);
}

.notification-temple-tag .material-symbols-outlined {
  font-size: 12px;
  font-variation-settings: 'FILL' 1, 'wght' 700;
  color: var(--brand);
}

[data-theme="dark"] .notification-temple-tag .material-symbols-outlined {
  color: var(--accent);
}

.notification-body {
  font-size: 13px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.notification-time {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* Unread dot — anchored top-right with glow ring */
.notification-item .unread-dot {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 4px rgba(200, 64, 28, 0.12), 0 0 8px rgba(200, 64, 28, 0.3);
  animation: badgePulse 2s ease-in-out infinite;
}

[data-theme="dark"] .notification-item .unread-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 106, 61, 0.15), 0 0 8px rgba(232, 106, 61, 0.4);
}

/* --- Receipt Row --- */
.receipt-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px var(--space-5);
  border-bottom: 1px solid var(--border-secondary);
  cursor: pointer;
  transition: background var(--duration-fast), transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.receipt-row:active {
  background: var(--surface-highlight);
  transform: scale(0.985);
}

.receipt-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-highlight);
  color: var(--brand);
  flex-shrink: 0;
}

.receipt-icon .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

.receipt-info {
  flex: 1;
  min-width: 0;
}

.receipt-temple {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.receipt-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.receipt-amount {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
  color: var(--brand);
  text-align: right;
}

.receipt-date {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  font-weight: 500;
}

/* --- Quick Actions Grid --- */
.quick-actions-card {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: var(--space-5) var(--space-4) var(--space-5);
  margin: var(--space-3) 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-primary);
  transition: box-shadow var(--duration-slow);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative top accent line */
.quick-actions-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--saffron) 50%, var(--vermillion) 100%);
  opacity: 0.8;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 4px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s var(--ease-in-out), transform 0.25s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.quick-action:active {
  transform: scale(0.92);
  background: var(--surface-highlight);
}

/* Icon circle — bigger, bolder, more depth */
.quick-action .icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s var(--ease-in-out);
  position: relative;
  overflow: hidden;
}

/* Inner highlight for gloss/depth effect */
.quick-action .icon-circle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 100%);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}

/* Quick action gradient color variants — vibrant, not pastel */
.qa-blue {
  background: linear-gradient(145deg, #E05A2D 0%, #C8401C 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(200, 64, 28, 0.35), 0 1px 3px rgba(200, 64, 28, 0.15);
}
.qa-green {
  background: linear-gradient(145deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35), 0 1px 3px rgba(5, 150, 105, 0.15);
}
.qa-purple {
  background: linear-gradient(145deg, #8B5CF6 0%, #7C3AED 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35), 0 1px 3px rgba(124, 58, 237, 0.15);
}
.qa-amber {
  background: linear-gradient(145deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35), 0 1px 3px rgba(217, 119, 6, 0.15);
}

/* Lifted shadow on active press */
.quick-action:active .qa-blue { box-shadow: 0 2px 6px rgba(200, 64, 28, 0.25); transform: scale(0.95); }
.quick-action:active .qa-green { box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25); transform: scale(0.95); }
.quick-action:active .qa-purple { box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25); transform: scale(0.95); }
.quick-action:active .qa-amber { box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25); transform: scale(0.95); }

/* Dark mode — rich translucent glass style */
[data-theme="dark"] .qa-blue {
  background: linear-gradient(145deg, rgba(224, 90, 45, 0.3) 0%, rgba(200, 64, 28, 0.45) 100%);
  color: #FBD64D;
  box-shadow: 0 4px 14px rgba(200, 64, 28, 0.2), inset 0 1px 0 rgba(244, 196, 48, 0.15);
}
[data-theme="dark"] .qa-green {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.3) 0%, rgba(5, 150, 105, 0.45) 100%);
  color: #6EE7B7;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2), inset 0 1px 0 rgba(110, 231, 183, 0.1);
}
[data-theme="dark"] .qa-purple {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.3) 0%, rgba(124, 58, 237, 0.45) 100%);
  color: #C4B5FD;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.2), inset 0 1px 0 rgba(196, 181, 253, 0.1);
}
[data-theme="dark"] .qa-amber {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.45) 100%);
  color: #FCD34D;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.2), inset 0 1px 0 rgba(252, 211, 77, 0.1);
}

/* Dark mode inner highlight — more subtle */
[data-theme="dark"] .quick-action .icon-circle::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 100%);
}

.qa-blue .material-symbols-outlined,
.qa-green .material-symbols-outlined,
.qa-purple .material-symbols-outlined,
.qa-amber .material-symbols-outlined { color: inherit; }

.quick-action .material-symbols-outlined {
  font-size: 27px;
  font-variation-settings: 'FILL' 1, 'wght' 600;
  position: relative;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* Label block */
.quick-action .qa-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.quick-action .qa-label-title {
  font-size: 12px;
  color: var(--text-primary);
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.quick-action .qa-label-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Stagger animation for each quick action */
.quick-action:nth-child(1) { animation: qaFadeUp 0.4s var(--ease-out) 0.05s both; }
.quick-action:nth-child(2) { animation: qaFadeUp 0.4s var(--ease-out) 0.1s both; }
.quick-action:nth-child(3) { animation: qaFadeUp 0.4s var(--ease-out) 0.15s both; }
.quick-action:nth-child(4) { animation: qaFadeUp 0.4s var(--ease-out) 0.2s both; }

@keyframes qaFadeUp {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Stats Cards --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

/* Subtle gradient accent on stat cards */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--saffron));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  font-size: 22px;
}

.stat-icon .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

[data-theme="dark"] .stat-icon .material-symbols-outlined {
  filter: brightness(1.45) saturate(1.15);
}

.stat-value {
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.stat-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-secondary);
}

/* --- Journey Chart --- */
.journey-chart { display: flex; flex-direction: column; gap: 14px; }

.chart-row { display: flex; align-items: center; gap: 10px; }
.chart-label { width: 52px; font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: right; flex-shrink: 0; }
.chart-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.chart-bar {
  height: 18px;
  border-radius: var(--radius-sm);
  min-width: 2px;
  transition: width 0.6s var(--ease-out);
  position: relative;
}
.chart-bar-puja { background: linear-gradient(90deg, #B91C1C, #7C2D12); }
.chart-bar-donation { background: linear-gradient(90deg, #E05A2D, #C8401C); }

.chart-bar-value {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  color: white;
}

.chart-legend { display: flex; gap: 16px; justify-content: center; margin-bottom: 12px; }
.chart-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.chart-legend-dot { width: 10px; height: 10px; border-radius: var(--radius-full); }

/* --- Timeline --- */
.timeline {
  position: relative;
  padding-left: var(--space-6);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--saffron) 50%, var(--border-primary) 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-6);
}

.timeline-dot {
  position: absolute;
  left: -23px;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.85' stroke-width='6' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='34' stroke-width='5'/%3E%3Cline x1='50' y1='14' x2='50' y2='86'/%3E%3Cline x1='14' y1='50' x2='86' y2='50'/%3E%3Cline x1='25' y1='25' x2='75' y2='75'/%3E%3Cline x1='75' y1='25' x2='25' y2='75'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='8' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border: 2px solid var(--bg-primary);
  z-index: 1;
  box-shadow: 0 0 0 2px var(--brand), 0 0 8px rgba(200, 64, 28, 0.35);
}

.timeline-dot.inactive {
  width: 14px;
  height: 14px;
  left: -20px;
  top: 4px;
  background-color: var(--text-muted);
  background-image: none;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--text-muted);
}

.timeline-date {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.4;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: var(--space-1);
  padding: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  box-shadow: inset 0 1px 2px rgba(60, 30, 15, 0.05);
}

.tab {
  flex: 1;
  padding: 13px var(--space-3);
  border-radius: 10px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-in-out);
  -webkit-tap-highlight-color: transparent;
}

.tab:active {
  transform: scale(0.96);
}

.tab.active {
  background: var(--tab-active-bg);
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(60, 30, 15, 0.06), 0 2px 8px rgba(200, 64, 28, 0.12);
  font-weight: 700;
}

[data-theme="dark"] .tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(232, 106, 61, 0.25);
}

/* --- Section Headers --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-7) 0 var(--space-4);
}

.section-title {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Subtle Dharma Chakra ornament before each section title — reinforces brand DNA */
.section-title::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C89A1A' stroke-width='6' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='38' stroke-width='5'/%3E%3Cline x1='50' y1='14' x2='50' y2='86'/%3E%3Cline x1='14' y1='50' x2='86' y2='50'/%3E%3Cline x1='25' y1='25' x2='75' y2='75'/%3E%3Cline x1='75' y1='25' x2='25' y2='75'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='9' fill='%23C8401C'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.85;
}

[data-theme="dark"] .section-title::before {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23F4C430' stroke-width='6' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='38' stroke-width='5'/%3E%3Cline x1='50' y1='14' x2='50' y2='86'/%3E%3Cline x1='14' y1='50' x2='86' y2='50'/%3E%3Cline x1='25' y1='25' x2='75' y2='75'/%3E%3Cline x1='75' y1='25' x2='25' y2='75'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='9' fill='%23E86A3D'/%3E%3C/svg%3E");
}

.section-action {
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

/* --- Collapsible Sections --- */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  border-bottom: 1px solid var(--border-secondary);
  -webkit-tap-highlight-color: transparent;
  transition: background var(--duration-fast);
}

.collapsible-header:active {
  background: var(--surface-highlight);
}

.collapsible-header > .material-symbols-outlined {
  transition: transform 0.3s var(--ease-spring);
  color: var(--text-muted);
}

.collapsible-header.open > .material-symbols-outlined {
  transform: rotate(180deg);
}

.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease-in-out);
}

.collapsible-body.open {
  max-height: 2000px;
}

.collapsible-content {
  padding: var(--space-5);
}

/* --- Settings Row --- */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--space-5);
  border-bottom: 1px solid var(--border-secondary);
  cursor: pointer;
  transition: background var(--duration-fast), transform 0.2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}

.settings-row:active {
  background: var(--surface-highlight);
  transform: scale(0.985);
}

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

.settings-row-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.settings-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.settings-icon .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

[data-theme="dark"] .settings-icon .material-symbols-outlined {
  filter: brightness(1.45) saturate(1.15);
}

.settings-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* --- Profile Card --- */
.profile-card {
  text-align: center;
  padding: var(--space-7) var(--space-5) var(--space-6);
  position: relative;
}

/* Decorative gradient backdrop for profile */
.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -20px;
  right: -20px;
  height: 120px;
  background: linear-gradient(135deg, var(--brand) 0%, #7C2D12 50%, #3B1810 100%);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  z-index: 0;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--brand), var(--saffron));
  border: 4px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  font-size: 32px;
  color: #FFFFFF;
  font-weight: 800;
  /* Sacred halo: stacked gold rings + warm drop-shadow */
  box-shadow:
    0 0 0 6px rgba(244, 196, 48, 0.25),
    0 0 0 10px rgba(244, 196, 48, 0.10),
    0 4px 20px rgba(200, 64, 28, 0.3);
  position: relative;
  z-index: 1;
  animation: avatarHaloPulse 4s ease-in-out infinite;
}

@keyframes avatarHaloPulse {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(244, 196, 48, 0.25),
      0 0 0 10px rgba(244, 196, 48, 0.10),
      0 4px 20px rgba(200, 64, 28, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 7px rgba(244, 196, 48, 0.32),
      0 0 0 12px rgba(244, 196, 48, 0.13),
      0 4px 24px rgba(200, 64, 28, 0.36);
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-avatar { animation: none; }
}

[data-theme="dark"] .profile-avatar {
  border-color: var(--bg-card);
  box-shadow:
    0 0 0 6px rgba(251, 214, 77, 0.20),
    0 0 0 10px rgba(251, 214, 77, 0.08),
    0 4px 24px rgba(232, 106, 61, 0.4);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.profile-id {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: var(--space-1);
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

/* --- Search Bar --- */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-input);
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.search-bar:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.search-bar .material-symbols-outlined {
  color: var(--text-muted);
  font-size: 20px;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-body);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* --- Filter Bar --- */
.filter-bar {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-4);
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

/* --- Toast System --- */
.toast-container {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-2);
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transform: translateY(30px);
  opacity: 0;
  animation: toastIn 0.35s var(--ease-spring) forwards;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.toast.toast-exit {
  animation: toastOut 0.25s var(--ease-in-out) forwards;
}

.toast-success { background: rgba(5, 150, 105, 0.95); color: #fff; }
.toast-error { background: rgba(220, 38, 38, 0.95); color: #fff; }
.toast-info { background: rgba(200, 64, 28, 0.95); color: #fff; }
.toast-warning { background: rgba(217, 119, 6, 0.95); color: #fff; }
.toast .toast-icon { font-size: 20px; flex-shrink: 0; }

@keyframes toastIn { to { transform: translateY(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateY(30px); opacity: 0; } }

/* --- Bottom Sheet --- */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 9990;
  transition: background 0.3s var(--ease-in-out);
}

.bottom-sheet-overlay.active {
  background: var(--bg-overlay);
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: 0 var(--space-6) var(--space-7);
  max-height: 80vh;
  overflow-y: auto;
  z-index: 9991;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(.32,.72,.24,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.15);
}

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

.bottom-sheet.dragging {
  transition: none !important;
}

.bottom-sheet-handle {
  display: flex;
  justify-content: center;
  padding: var(--space-3) 0 var(--space-2);
  cursor: grab;
  touch-action: none;
}

.bottom-sheet-handle:active {
  cursor: grabbing;
}

.bottom-sheet-handle div {
  width: 36px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--text-muted);
  opacity: 0.4;
}

/* --- Splash Screen --- */
.splash-screen {
  position: fixed;
  inset: 0;
  background: #FBF7F2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s var(--ease-in-out);
}

[data-theme="dark"] .splash-screen {
  background: #1A0F08;
}

.splash-screen.fade-out {
  opacity: 0;
}

.splash-logo {
  animation: splashFadeIn 0.8s var(--ease-out) forwards;
}

.splash-logo img {
  max-width: 200px;
  height: auto;
}

.splash-spinner {
  margin-top: var(--space-6);
  opacity: 0;
  animation: splashSpinnerFadeIn 0.6s ease-out 0.4s forwards, chakraSpin 1.6s linear infinite 0.4s;
}

@keyframes splashSpinnerFadeIn {
  to { opacity: 0.9; }
}

.splash-tagline {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--space-4);
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: splashFadeIn 0.8s var(--ease-out) 0.2s both;
  font-weight: 500;
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Ripple Effect --- */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(200, 64, 28, 0.06);
  transform: scale(0);
  animation: rippleAnim 0.5s var(--ease-out) forwards;
  pointer-events: none;
  z-index: 50;
}

@keyframes rippleAnim {
  to { transform: scale(3); opacity: 0; }
}

/* Staggered scroll reveals */
.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal-delay-1 { transition-delay: 0.06s; }
.scroll-reveal-delay-2 { transition-delay: 0.12s; }
.scroll-reveal-delay-3 { transition-delay: 0.18s; }
.scroll-reveal-delay-4 { transition-delay: 0.24s; }
.scroll-reveal-delay-5 { transition-delay: 0.30s; }

.flame-pulse {
  animation: flamePulse 2.5s ease-in-out infinite;
}

@keyframes flamePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

/* --- Skeleton Loading --- */
.skeleton {
  background: var(--skeleton-base);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--skeleton-shine) 50%, transparent 100%);
  animation: skeletonShimmer 1.8s ease-in-out infinite;
}

@keyframes skeletonShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skeleton-text { height: 14px; width: 80%; }
.skeleton-text-sm { height: 10px; width: 60%; }
.skeleton-circle { border-radius: var(--radius-full); }
.skeleton-card { height: 120px; border-radius: var(--radius-xl); }

/* --- Auth Page Specific --- */
.auth-logo {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-logo img {
  max-width: 180px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.auth-logo h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
}

.auth-logo p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: var(--space-3);
  font-weight: 500;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
}

.auth-divider span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-primary);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-6);
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* --- KYB Section Colors --- */
.kyb-section-personal { border-left: 3px solid var(--saffron); }
.kyb-section-address { border-left: 3px solid var(--info); }
.kyb-section-ids { border-left: 3px solid var(--success); }
.kyb-section-dharmic { border-left: 3px solid var(--maroon); }

/* --- Notifications page enhancements --- */
.header-mark-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px 7px 10px;
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-light);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.1px;
  transition: transform 0.2s var(--ease-spring), background var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}

.header-mark-read-btn:active {
  transform: scale(0.95);
  background: rgba(200, 64, 28, 0.16);
}

[data-theme="dark"] .header-mark-read-btn {
  background: rgba(232, 106, 61, 0.15);
  color: var(--accent);
  border-color: rgba(232, 106, 61, 0.25);
}

.notifications-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: var(--space-4) var(--space-5) 0;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(244, 196, 48, 0.12) 0%, rgba(200, 64, 28, 0.06) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.notifications-summary strong {
  color: var(--brand);
  font-weight: 700;
}

.notifications-summary-dot {
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 4px rgba(200, 64, 28, 0.15);
  animation: badgePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

[data-theme="dark"] .notifications-summary {
  background: linear-gradient(90deg, rgba(251, 214, 77, 0.12) 0%, rgba(232, 106, 61, 0.08) 100%);
}

[data-theme="dark"] .notifications-summary strong {
  color: var(--accent);
}

[data-theme="dark"] .notifications-summary-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(232, 106, 61, 0.15);
}

/* Empty state (also reusable on other empty pages) */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px var(--space-6) 40px;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--brand);
}

.empty-state-icon .material-symbols-outlined {
  font-size: 36px;
  font-variation-settings: 'FILL' 0, 'wght' 500;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 280px;
}

[data-theme="dark"] .empty-state-icon {
  background: rgba(232, 106, 61, 0.15);
  color: var(--accent);
}

/* --- Date Group Header (elegant horizontal rule with centered date) --- */
.date-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) var(--space-5) var(--space-3);
  padding: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.date-group::before,
.date-group::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-primary) 50%, transparent 100%);
}

/* First date group sits closer to header */
.page-content > .date-group:first-child,
.page-content > div:first-child > .date-group {
  margin-top: var(--space-4);
}

/* --- Message Channel --- */
.msg-channel-content {
  padding-left: var(--space-4) !important;
  padding-right: var(--space-4) !important;
  padding-bottom: var(--space-6) !important;
}

.msg-date-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5) 0 var(--space-3);
}

.msg-date-divider span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Base bubble */
.msg-bubble {
  max-width: 92%;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  overflow: hidden;
  animation: msgSlideIn 0.3s var(--ease-spring) both;
}

@keyframes msgSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Text-only bubble */
.msg-bubble.msg-text-only {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  padding: 12px 14px 6px;
}

.msg-bubble.msg-text-only .msg-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0;
}

.msg-bubble.msg-text-only .msg-cta {
  margin-top: 10px;
}

/* Image-only bubble */
.msg-bubble.msg-image-only {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
}

.msg-bubble.msg-image-only .msg-img {
  border-radius: 0;
}

.msg-img-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 10px 14px 2px;
}

/* Rich bubble (image + content) */
.msg-bubble.msg-rich {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
}

.msg-rich-body {
  padding: 12px 14px 6px;
}

/* Card bubble (accent bar) */
.msg-bubble.msg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  display: flex;
  overflow: hidden;
}

.msg-card-accent {
  width: 4px;
  flex-shrink: 0;
  border-radius: 4px 0 0 0;
}

.msg-card-body {
  padding: 12px 14px 6px;
  flex: 1;
  min-width: 0;
}

/* Shared elements */
.msg-img {
  width: 100%;
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-tertiary);
}

.msg-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
  line-height: 1.35;
}

.msg-bubble .msg-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.msg-time {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  padding-bottom: 4px;
}

.msg-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-top: 10px;
  -webkit-tap-highlight-color: transparent;
}

.msg-cta .material-symbols-outlined {
  font-size: 16px;
  transition: transform 0.2s;
}

.msg-cta:active .material-symbols-outlined {
  transform: translateX(3px);
}

/* Message body truncation */
.msg-body-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.msg-body-expanded {
  display: block;
  overflow: visible;
}

.msg-read-more {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Message footer (time + share) */
.msg-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-bottom: 4px;
}

.msg-share-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--duration-fast), color var(--duration-fast);
}

.msg-share-btn:active {
  background: var(--surface-highlight);
  color: var(--text-primary);
}

.msg-share-btn .material-symbols-outlined {
  font-size: 18px;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-9) var(--space-6);
}

.empty-state .material-symbols-outlined {
  font-size: 56px;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  font-variation-settings: 'FILL' 1, 'wght' 500;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Greeting Section --- */
.greeting-section {
  padding: var(--space-6) 0 var(--space-3);
}

.greeting-time {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.greeting-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-top: var(--space-1);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* --- Activity Item --- */
.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-secondary);
}

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

.activity-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

[data-theme="dark"] .activity-icon .material-symbols-outlined {
  filter: brightness(1.45) saturate(1.15);
}

.activity-info {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.activity-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.activity-amount {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* --- Checkbox --- */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: var(--space-4) 0;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  margin-top: 1px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.checkbox-group label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  cursor: pointer;
}

.checkbox-group label a {
  color: var(--brand);
  text-decoration: underline;
  font-weight: 600;
}

/* --- OTP Input --- */
.otp-inputs {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin: var(--space-5) 0;
}

.otp-input {
  width: 56px;
  height: 64px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 700;
  background: var(--bg-input);
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast);
}

.otp-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  transform: scale(1.05);
}

/* --- Temple Detail Header --- */
.temple-detail-header {
  height: 180px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: var(--space-5);
  margin: -20px -20px var(--space-4);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
}

.temple-detail-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.5) 100%);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.temple-detail-header > * {
  position: relative;
  z-index: 1;
}

/* --- Select Input --- */
.form-select {
  width: 100%;
  padding: 13px var(--space-4);
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  appearance: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60, 30, 15, 0.04);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C8401C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

/* --- Badge for Counts --- */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
}

/* --- Dharma Points Card --- */
.dharma-points-card {
  text-align: center;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  position: relative;
  overflow: hidden;
}

.dharma-points-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse, var(--saffron-glow) 0%, transparent 70%);
  pointer-events: none;
}

.dharma-points-card::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(200, 64, 28, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Temple Info Section --- */
.temple-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-secondary);
}

.temple-info-section {
  margin-bottom: var(--space-4);
}

.temple-info-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-secondary);
}

.temple-info-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--brand-bg);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.temple-info-icon .material-symbols-outlined {
  font-size: 18px;
  font-variation-settings: 'FILL' 1, 'wght' 600;
}

.temple-info-text {
  flex: 1;
  min-width: 0;
}

.temple-info-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.temple-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1px;
}

.temple-info-value a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.temple-info-value a:active {
  opacity: 0.7;
}

/* --- Temple Detail Actions (above tabs) --- */
.temple-detail-actions {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.temple-detail-actions .btn {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

/* --- Temple Action Buttons --- */
.temple-action-buttons {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-secondary);
}

.temple-action-buttons .btn {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

/* --- Temple Activity Rows (Minimal) --- */
.temple-activity-row {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-secondary);
  transition: background var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}

.temple-activity-row:last-child {
  border-bottom: none;
}

.temple-activity-row:active {
  background: var(--surface-highlight);
}

.temple-activity-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.activity-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.activity-chevron {
  font-size: 16px !important;
  color: var(--brand);
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

/* --- Contact Form --- */
.contact-form {
  padding: var(--space-5) !important;
}

.form-textarea {
  width: 100%;
  padding: 13px var(--space-4);
  background: var(--bg-input);
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  line-height: 1.5;
}

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

.form-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.file-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  cursor: pointer;
  transition: border-color var(--duration-fast), background var(--duration-fast);
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.file-upload-area:active {
  border-color: var(--brand);
  background: var(--brand-bg);
}

.file-upload-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.file-upload-name {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
  word-break: break-all;
}

/* --- Theme transition veil (smooths the light↔dark swap) --- */
.theme-veil {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-out;
}

.theme-veil.active {
  opacity: 1;
}

/* --- Tab pane crossfade --- */
.tab-pane-enter {
  animation: tabPaneFadeIn 0.28s var(--ease-out);
}

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

@media (prefers-reduced-motion: reduce) {
  .tab-pane-enter { animation: none; }
}

/* --- Focus rings (keyboard navigation) --- */
.btn:focus-visible,
.btn-outline:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.btn-danger:focus-visible,
.btn-gold:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.nav-item:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.toggle-switch:focus-visible,
.header-action-btn:focus-visible,
.header-back:focus-visible,
.header-mark-read-btn:focus-visible,
.notification-item:focus-visible,
.receipt-row:focus-visible,
.settings-row:focus-visible,
.dharma-card:focus-visible,
.temple-fav-btn:focus-visible,
.quick-action:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: inherit;
}

[data-theme="dark"] .btn:focus-visible,
[data-theme="dark"] .btn-outline:focus-visible,
[data-theme="dark"] .btn-primary:focus-visible,
[data-theme="dark"] .btn-ghost:focus-visible,
[data-theme="dark"] .btn-danger:focus-visible,
[data-theme="dark"] .btn-gold:focus-visible,
[data-theme="dark"] .chip:focus-visible,
[data-theme="dark"] .tab:focus-visible,
[data-theme="dark"] .nav-item:focus-visible,
[data-theme="dark"] .form-input:focus-visible,
[data-theme="dark"] .form-select:focus-visible,
[data-theme="dark"] .toggle-switch:focus-visible,
[data-theme="dark"] .header-action-btn:focus-visible,
[data-theme="dark"] .header-back:focus-visible,
[data-theme="dark"] .header-mark-read-btn:focus-visible,
[data-theme="dark"] .notification-item:focus-visible,
[data-theme="dark"] .receipt-row:focus-visible,
[data-theme="dark"] .settings-row:focus-visible,
[data-theme="dark"] .dharma-card:focus-visible,
[data-theme="dark"] .temple-fav-btn:focus-visible,
[data-theme="dark"] .quick-action:focus-visible {
  outline-color: var(--accent);
}

/* --- Responsive --- */
@media (min-width: 431px) {
  body {
    background: #EFE6D8;
  }
  [data-theme="dark"] body {
    background: #0F0805;
  }
  .app-frame {
    box-shadow: 0 0 60px rgba(60, 30, 15, 0.12);
    border-left: 1px solid var(--border-secondary);
    border-right: 1px solid var(--border-secondary);
  }
  [data-theme="dark"] .app-frame {
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  }
}

/* --- Back Swipe Indicator --- */
.back-swipe-indicator {
  position: fixed;
  left: 0;
  top: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transform: translateX(-100%) translateY(-50%);
  pointer-events: none;
  box-shadow: var(--shadow-md);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

.back-swipe-indicator .material-symbols-outlined {
  font-size: 16px;
  color: white;
  font-variation-settings: 'FILL' 0, 'wght' 600;
}

/* --- iOS-like Selection Prevention on UI controls --- */
.btn, .nav-item, .temple-card, .quick-action, .chip, .tab,
.toggle-switch, .notification-item, .receipt-row, .settings-row,
.dharma-card, .collapsible-header, .temple-fav-btn, .bottom-sheet-handle {
  -webkit-user-select: none;
  user-select: none;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  #app-content[data-nav] {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .back-swipe-indicator { display: none; }
}
