/* =========================================================
   ExpensePro Master Design System & Colorful Styling
   Modern Financial Tech UI / UX Polish
   ========================================================= */

:root {
  --color-primary: #10b981;
  --color-primary-hover: #059669;
  --color-rose: #f43f5e;
  --color-violet: #8b5cf6;
  --color-amber: #f59e0b;
  --color-cyan: #06b6d4;
  --color-indigo: #6366f1;
}

/* Glassmorphism Accents */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

.dark .glass-panel {
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(51, 65, 85, 0.65);
}

/* Vibrant KPI Cards with Colored Hairline and Glow */
.card-kpi {
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-kpi:hover {
  transform: translateY(-2px);
}

.card-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, #10b981);
}

.card-kpi-emerald { --card-accent: linear-gradient(90deg, #10b981, #14b8a6); }
.card-kpi-rose    { --card-accent: linear-gradient(90deg, #f43f5e, #fb7185); }
.card-kpi-violet  { --card-accent: linear-gradient(90deg, #8b5cf6, #a855f7); }
.card-kpi-amber   { --card-accent: linear-gradient(90deg, #f59e0b, #fbbf24); }
.card-kpi-cyan    { --card-accent: linear-gradient(90deg, #06b6d4, #38bdf8); }
.card-kpi-indigo  { --card-accent: linear-gradient(90deg, #6366f1, #818cf8); }

/* Soft Glowing Backdrops */
.glow-emerald {
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.25), 0 8px 10px -6px rgba(16, 185, 129, 0.2);
}
.glow-rose {
  box-shadow: 0 10px 25px -5px rgba(244, 63, 94, 0.25), 0 8px 10px -6px rgba(244, 63, 94, 0.2);
}
.glow-violet {
  box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.25), 0 8px 10px -6px rgba(139, 92, 246, 0.2);
}
.glow-amber {
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.25), 0 8px 10px -6px rgba(245, 158, 11, 0.2);
}

/* Gradient Buttons */
.btn-gradient-primary {
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  color: #022c22;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}
.btn-gradient-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #0f766e 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
.btn-gradient-primary:active {
  transform: scale(0.98);
}

/* Interactive Hover Lift */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.12);
}
.dark .hover-lift:hover {
  box-shadow: 0 12px 20px -8px rgba(0, 0, 0, 0.45);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

/* Mobile Safe Area Padding */
.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 1rem);
}

/* Smooth transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke, box-shadow, transform;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent unwanted pull-to-refresh while keeping modal scroll */
.modal-open {
  overflow: hidden;
}

/* Chart Canvas Responsive container */
.chart-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Pulse animation for live online indicator */
@keyframes soft-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.08); }
}
.animate-soft-pulse {
  animation: soft-pulse 2s infinite ease-in-out;
}

/* Radar / Ping wave for active processes */
@keyframes radar-wave {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}
.animate-radar {
  animation: radar-wave 2s infinite cubic-bezier(0, 0.2, 0.8, 1);
}

/* Modern Gradient Progress Bars */
.progress-bar-gradient {
  background: linear-gradient(90deg, #10b981 0%, #34d399 70%, #f59e0b 88%, #f43f5e 100%);
}

/* Terminal Console Styling for Cron Execution Logs */
.terminal-window {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 10px 25px -5px rgba(0,0,0,0.4);
}
