/* FINORA: Intelligent Cash Flow & Personal Wealth Architecture */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --canvas-bg: #090D16;
  --surface-card: #111827;
  --surface-border: rgba(255, 255, 255, 0.08);
  --gold-primary: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-dark: #997A15;
  --emerald-mint: #10B981;
  --emerald-glow: rgba(16, 185, 129, 0.16);
  --velvet-rose: #F43F5E;
  --rose-glow: rgba(244, 63, 94, 0.16);
  --amber-warm: #F59E0B;
  --text-primary: #F8FAFC;
  --text-muted: #94A3B8;
}

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

body {
  background-color: var(--canvas-bg);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  user-select: none;
}

/* Tabular Financial Numbers */
.font-mono-financial {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Glassmorphism Surface */
.glass-surface {
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
}

.glass-nav {
  background: rgba(13, 19, 32, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Gold Gradients */
.gold-gradient-text {
  background: linear-gradient(135deg, #F9F3D8 0%, #D4AF37 55%, #AA820A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-bg,
.bg-gold-gradient-bg {
  background: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #B8860B 100%) !important;
  color: #090D16 !important;
}

.gold-border-glow {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.emerald-glow-box {
  box-shadow: 0 4px 20px var(--emerald-glow);
}

.rose-glow-box {
  box-shadow: 0 4px 20px var(--rose-glow);
}

/* Gold Crest Monogram */
.gold-crest {
  background: radial-gradient(circle at 30% 30%, #20293d, #0d121c);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(243, 229, 171, 0.3);
}

/* Floating Plus Button */
.floating-plus-btn {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
  background: linear-gradient(135deg, #FBEBB5 0%, #D4AF37 50%, #B8860B 100%) !important;
  box-shadow: 0 4px 25px rgba(212, 175, 55, 0.45), 0 0 0 4px rgba(17, 24, 39, 0.9) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-plus-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 30px rgba(212, 175, 55, 0.6), 0 0 0 4px rgba(17, 24, 39, 0.9);
}

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

/* Custom Minimal Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Pulsing Badge for Over Budget */
@keyframes pulse-rose {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.03);
  }
}

.pulse-over-budget {
  animation: pulse-rose 2s infinite ease-in-out;
}

/* Custom Bottom Sheet Slide Animations */
.sheet-backdrop {
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet-enter {
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sheet-backdrop:not(.hidden) > .sheet-enter,
.sheet-enter-active {
  transform: translateY(0%) !important;
}

/* Radial Gauge Styling */
.gauge-meter-bg {
  stroke: rgba(255, 255, 255, 0.08);
}

.gauge-meter-value {
  transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  stroke-linecap: round;
}

/* Desktop Centered Mockup Frame */
@media (min-width: 640px) {
  .app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.07);
    position: relative;
    background-color: var(--canvas-bg);
  }
}

/* Tier Badges & Auth Aesthetics */
.badge-tier-free {
  background: rgba(148, 163, 184, 0.15);
  color: #CBD5E1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-tier-pro {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-tier-vip, .badge-tier-executive {
  background: rgba(212, 175, 55, 0.18);
  color: #F3E5AB;
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.badge-role-admin {
  background: rgba(244, 63, 94, 0.15);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.pwd-meter-segment {
  height: 4px;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

/* ============================================================================ */
/* SRI LANKAN HERITAGE & BANKNOTE AESTHETIC SUITE                               */
/* Inspired by Central Bank of Sri Lanka Currency Notes & Colombo Lotus Tower   */
/* ============================================================================ */

/* Lotus Tower Glowing Aura */
.lotus-aura-glow {
  filter: drop-shadow(0 0 14px rgba(225, 29, 72, 0.45)) drop-shadow(0 0 28px rgba(212, 175, 55, 0.3));
}

@keyframes lotus-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(225, 29, 72, 0.4)) drop-shadow(0 0 22px rgba(212, 175, 55, 0.25));
    transform: translateY(0px) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(236, 72, 153, 0.6)) drop-shadow(0 0 36px rgba(212, 175, 55, 0.5));
    transform: translateY(-2px) scale(1.02);
  }
}

.animate-lotus-pulse {
  animation: lotus-pulse 3.5s ease-in-out infinite;
}

/* Spire Beacon Light Blink */
@keyframes beacon-blink {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

.beacon-pulse {
  animation: beacon-blink 1.2s infinite ease-in-out;
  transform-origin: center;
}

/* Guilloche Mandala Slow Rotation */
@keyframes spin-mandala {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-mandala-slow {
  animation: spin-mandala 45s linear infinite;
}

/* Sri Lankan Banknote Guilloche Pattern Background */
.banknote-pattern {
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 65%),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.03) 0px, rgba(212, 175, 55, 0.03) 1px, transparent 1px, transparent 12px),
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.03) 0px, rgba(212, 175, 55, 0.03) 1px, transparent 1px, transparent 12px);
}

/* Luxury Banknote Watermark Card */
.banknote-watermark-card {
  position: relative;
  overflow: hidden;
}

.banknote-watermark-card::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(circle, rgba(212, 175, 55, 0.12) 1px, transparent 1px),
                    radial-gradient(circle, rgba(16, 185, 129, 0.08) 1px, transparent 1px);
  background-size: 8px 8px, 16px 16px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}

/* Liyawel Corner Accents (Disabled per design request) */
.liyawel-corner {
  display: none !important;
}

/* Splash Screen Container & Animations */
#finoraSplashScreen {
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.65s;
}

#finoraSplashScreen.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Loading Bar Shimmer */
@keyframes shimmer-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

.shimmer-progress {
  position: relative;
  overflow: hidden;
}

.shimmer-progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: shimmer-sweep 1.4s infinite ease-in-out;
}

/* ========================================================================= */
/* ERADICATE NETLIFY WATERMARK, BADGE & DRAWER OVERLAYS                      */
/* ========================================================================= */
#netlify-badge,
.netlify-badge,
[data-netlify-badge],
[data-netlify-drawer],
netlify-drawer,
iframe[src*="netlify"],
iframe[title*="Netlify"],
iframe[title*="Feedback"],
div[class*="netlify"],
div[class*="feedback-badge"],
div[id*="netlify"],
a[href*="netlify.com"][class*="badge"],
div[aria-label*="Netlify"],
div[aria-label*="Feedback"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  bottom: -9999px !important;
  z-index: -9999 !important;
}

/* ========================================================================= */
/* AUTHENTICATION SCREEN MOBILE ACCESSIBILITY & VIEWPORT SAFE-AREA           */
/* ========================================================================= */
#authScreen {
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-overflow-scrolling: touch;
}

/* On desktop and tall viewports, center card vertically if space allows */
@media (min-width: 641px) and (min-height: 820px) {
  #authScreen {
    justify-content: center;
    padding-bottom: 2rem;
  }
  #authScreen .glass-surface {
    margin-top: auto;
    margin-bottom: auto;
  }
}

/* On all mobile phones and compact/medium viewports, start at top with generous scroll clearance */
@media (max-width: 640px), (max-height: 820px) {
  #authScreen {
    justify-content: flex-start !important;
    align-items: center !important;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0.5rem)) !important;
    padding-bottom: max(5.5rem, calc(4rem + env(safe-area-inset-bottom, 0px))) !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #authScreen .glass-surface {
    margin-top: 0 !important;
    margin-bottom: 3.5rem !important;
  }
}


