/* ── WealthWise Main Stylesheet ─────────────────────────────── */
/* Augments Tailwind with custom components and animations       */

/* ── Custom Properties ────────────────────────────────────────── */
:root {
  --brand-50:  #f0f4ff;
  --brand-100: #e0eaff;
  --brand-200: #c7d7fe;
  --brand-400: #8099f8;
  --brand-500: #6173f1;
  --brand-600: #4a54e5;
  --brand-700: #3c43cc;
  --brand-800: #3337a5;
  --brand-900: #2d3182;
  --brand-950: #1c1f56;
  --gold-400:  #f5c842;
  --gold-600:  #c99c1a;
  --shadow-brand: 0 8px 32px rgba(74, 84, 229, 0.18);
  --shadow-card:  0 2px 16px rgba(0, 0, 0, 0.06);
}

/* ── Typography ───────────────────────────────────────────────── */
.font-display { font-family: 'Playfair Display', Georgia, serif; }
.font-mono    { font-family: 'DM Mono', 'Courier New', monospace; }

/* ── Scrollbar ────────────────────────────────────────────────── */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Range Input Styling ─────────────────────────────────────── */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, #4a54e5 0%, #4a54e5 var(--range-progress, 50%), #e5e7eb var(--range-progress, 50%), #e5e7eb 100%);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid #4a54e5;
  box-shadow: 0 2px 8px rgba(74, 84, 229, 0.3);
  cursor: pointer;
  margin-top: -6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(74, 84, 229, 0.5);
}
input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
}
input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: #4a54e5;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid #4a54e5;
  cursor: pointer;
}

/* ── Select Styling ───────────────────────────────────────────── */
select option { background: #1c1f56; color: white; }

/* ── Form Focus Rings ─────────────────────────────────────────── */
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 84, 229, 0.12);
}

/* ── Button Components ────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3c43cc, #6173f1);
  color: white;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(74, 84, 229, 0.38);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #4a54e5;
  color: #4a54e5;
  padding: 11px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-outline:hover {
  background: #4a54e5;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 84, 229, 0.3);
}

/* ── Card Hover Animation ─────────────────────────────────────── */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(74, 84, 229, 0.15);
}

/* ── Gradient Text ────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #3c43cc, #6173f1, #8099f8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gold-text {
  background: linear-gradient(135deg, #c99c1a, #f5c842);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
@keyframes shimmer {
  to { background-position: -200% center; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.animate-fade-up    { animation: fadeUp 0.6s ease forwards; }
.animate-fade-in    { animation: fadeIn 0.4s ease forwards; }
.animate-scale-in   { animation: scaleIn 0.45s ease forwards; }
.animate-slide-right { animation: slideInRight 0.4s ease forwards; }
.animate-float      { animation: float 3s ease-in-out infinite; }

.delay-50  { animation-delay: 0.05s; }
.delay-100 { animation-delay: 0.10s; }
.delay-200 { animation-delay: 0.20s; }
.delay-300 { animation-delay: 0.30s; }
.delay-400 { animation-delay: 0.40s; }
.delay-500 { animation-delay: 0.50s; }
.delay-600 { animation-delay: 0.60s; }

/* ── Glass Card ───────────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.glass-card-dark {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Table Styles ─────────────────────────────────────────────── */
.ww-table { width: 100%; border-collapse: collapse; }
.ww-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #f3f4f6;
}
.ww-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid #f9fafb;
}
.ww-table tbody tr:hover { background: #f8f9ff; }
.ww-table tbody tr:last-child td { border-bottom: none; }

/* ── Status Badges ────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; }
.badge-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-warning { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-danger  { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-info    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-purple  { background: #faf5ff; color: #7c3aed; border: 1px solid #e9d5ff; }

/* ── Risk Level Pills ─────────────────────────────────────────── */
.risk-low      { background: #f0fdf4; color: #16a34a; }
.risk-moderate { background: #fffbeb; color: #d97706; }
.risk-high     { background: #fef2f2; color: #dc2626; }
.risk-very-high { background: #fdf2f8; color: #9333ea; }

/* ── Notification Toast ───────────────────────────────────────── */
.toast-enter { animation: slideInRight 0.3s ease forwards; }
.toast-leave { animation: fadeIn 0.2s ease reverse forwards; }

/* ── Print Styles ─────────────────────────────────────────────── */
@media print {
  nav, footer, .no-print { display: none !important; }
  .print-full { width: 100% !important; }
}

/* ── Responsive Helpers ───────────────────────────────────────── */
@media (max-width: 768px) {
  .btn-primary, .btn-outline {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

/* ── Logo Icon Components ───────────────────────────────────────── */
.logo-icon-container {
  width: 2rem; /* 32px */
  height: 2rem;
  border-radius: 0.5rem; /* 8px */
  overflow: hidden;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.logo-icon-container img {
  max-width: none !important;
  width: 3.5rem; /* 56px */
  height: 3.5rem;
  margin-left: 0.625rem; /* 10px shift to center the chart icon */
  margin-top: 0.0625rem; /* 1px shift */
}

.logo-icon-container-lg {
  width: 2.25rem; /* 36px */
  height: 2.25rem;
  border-radius: 0.75rem; /* 12px */
  overflow: hidden;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.logo-icon-container-lg img {
  max-width: none !important;
  width: 3.875rem; /* 62px */
  height: 3.875rem;
  margin-left: 0.6875rem; /* offset to center */
  margin-top: 0.0625rem;
}
