/* ==========================================================================
   TABUNGAN FOUR SC - TROPICAL OCEAN & WARM SAND FINTECH UI
   Inspired by modern mobile banking layout with coastal beach & swim vibes
   ========================================================================== */

:root {
  /* Coastal Sand & Warm Cream Palette (Matches reference light surfaces) */
  --bg-outer: #e6dfd1;
  --bg-sand-main: #faf7f0;
  --bg-sand-card: #ffffff;
  --bg-sand-soft: #efeae0;
  --bg-sand-pill: #e7e0d2;
  --border-sand: #e2dac9;

  /* Deep Ocean Lagoon Palette (Replaces dark forest green from reference) */
  --ocean-950: #042836;
  --ocean-900: #06394c;
  --ocean-800: #094e66;
  --ocean-700: #0b6480;
  --ocean-600: #0284c7;
  --ocean-500: #06b6d4;
  --ocean-400: #38bdf8;

  /* Tropical Palm, Sun & Coral Accents */
  --palm-600: #059669;
  --palm-500: #10b981;
  --palm-400: #34d399;
  --palm-100: #d1fae5;
  --coral-600: #ea580c;
  --coral-500: #f97316;
  --sun-500: #f59e0b;

  /* Typography Colors */
  --text-main: #0f2937;
  --text-muted: #5c707d;
  --text-light: #8fa1ad;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-outer);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(9, 78, 102, 0.2);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(9, 78, 102, 0.4);
}

/* Background Ocean & Sand Ambient Pattern */
.coastal-ambient-bg {
  background-color: #e6dfd1;
  background-image:
    radial-gradient(at 10% 10%, rgba(6, 182, 212, 0.14) 0px, transparent 50%),
    radial-gradient(at 90% 15%, rgba(245, 158, 11, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 90%, rgba(5, 150, 105, 0.12) 0px, transparent 50%);
}

/* Splash / Login Deep Ocean Hero Surface */
.splash-ocean-bg {
  background: linear-gradient(165deg, #042836 0%, #074157 48%, #0b637e 82%, #0e7c96 100%);
  position: relative;
  overflow: hidden;
}

.splash-ocean-bg::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

/* Hero Balance Card (Matches center screen dark card in reference) */
.hero-ocean-card {
  background: linear-gradient(145deg, #042c3b 0%, #074359 55%, #0a5c78 100%);
  box-shadow: 0 18px 36px -10px rgba(4, 44, 59, 0.35), 0 4px 12px -2px rgba(4, 44, 59, 0.2);
  position: relative;
  overflow: hidden;
}

.hero-ocean-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -30px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

/* Quick Action Square Buttons (Matches + Add Money, Send, Convert, More in reference) */
.action-sand-btn {
  background-color: #efeae0;
  border: 1px solid #e4dec9;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.action-sand-btn:hover {
  background-color: #e6dfd1;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(15, 41, 55, 0.08);
}
.action-sand-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Soft Sand Card */
.sand-card {
  background-color: #ffffff;
  border: 1px solid #ece6d8;
  box-shadow: 0 4px 18px -4px rgba(15, 41, 55, 0.05);
}

.sand-subtle-card {
  background-color: #f2ede2;
  border: 1px solid #e5decb;
}

/* Pill Tabs (Matches Spending | Income | Savings | Goals in reference) */
.pill-tab-bar {
  background-color: #efeae0;
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid #e4dec9;
}

.pill-tab-btn {
  border-radius: 9999px;
  transition: all 0.2s ease;
  color: #4b6370;
  font-weight: 600;
}

.pill-tab-btn.active {
  background-color: #06394c;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(6, 57, 76, 0.25);
}

/* Bottom Navigation Bar & Center Floating Action Button */
.bottom-nav-shell {
  background: rgba(250, 247, 240, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #e5decb;
  box-shadow: 0 -8px 28px rgba(15, 41, 55, 0.07);
}

.center-fab-btn {
  background: linear-gradient(145deg, #06394c 0%, #0b6480 100%);
  box-shadow: 0 10px 24px -4px rgba(6, 57, 76, 0.48), 0 0 0 5px #faf7f0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.center-fab-btn:hover {
  transform: translateY(-3px) scale(1.04);
}
.center-fab-btn:active {
  transform: scale(0.95);
}

/* App Container Sizing: Mobile Mode vs Widescreen Mode */
.app-viewport-mobile {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-sand-main);
  box-shadow: 0 25px 60px -15px rgba(4, 40, 54, 0.22);
  position: relative;
}

@media (min-width: 768px) {
  .app-viewport-mobile {
    min-height: calc(100vh - 2rem);
    margin: 1rem auto;
    border-radius: 38px;
    border: 6px solid #fffdf9;
    overflow: hidden;
  }
}

.app-viewport-wide {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-sand-main);
  position: relative;
}

@media (min-width: 1024px) {
  .app-viewport-wide {
    min-height: calc(100vh - 2rem);
    margin: 1rem auto;
    border-radius: 32px;
    border: 4px solid #fffdf9;
    box-shadow: 0 25px 60px -15px rgba(4, 40, 54, 0.18);
    overflow: hidden;
  }
}

/* Wave Progress Bar Shimmer */
@keyframes waveShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.ocean-progress-fill {
  background: linear-gradient(90deg, #10b981, #06b6d4, #38bdf8, #10b981);
  background-size: 200% 200%;
  animation: waveShimmer 5s ease infinite;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Floating Animation for 3D Beach Card on Splash */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(0deg); }
}

.animate-float-card {
  animation: floatSlow 4.5s ease-in-out infinite;
}

/* Modal Backdrop & Bottom Sheet Animation */
.modal-backdrop {
  background: rgba(4, 40, 54, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

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

.animate-sheet {
  animation: slideUpSheet 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Print Styles for Rekening Koran */
@media print {
  body {
    background: #ffffff !important;
  }
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .app-viewport-mobile,
  .app-viewport-wide {
    max-width: 100% !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }
}
