/* ==========================================================================
   ArthSaathi AI — Main Stylesheet
   Design System: Navy Blue (#0d2137) + White + Purple Accent (#7c3aed)
   ========================================================================== */

:root {
  --finbot-navy:    #0d2137;
  --finbot-navy-2:  #112a45;
  --finbot-navy-3:  #1a3a5c;
  --accent:         #7c3aed;
  --accent-light:   #a78bfa;
  --accent-dark:    #5b21b6;
  --white:          #ffffff;
  --bg-light:       #f4f7fb;
  --text-muted:     #6b7280;
  --border-light:   #e5e9f0;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --card-radius:    14px;
  --shadow-sm:      0 2px 8px rgba(0,0,0,.08);
  --shadow-md:      0 4px 20px rgba(0,0,0,.12);
  --transition:     0.2s ease;
}

/* --------------------------------------------------------------------------
   Reset / Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-light);
  color: #1e293b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.main-content { flex: 1; }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.navbar-finbot {
  background-color: var(--finbot-navy);
  border-bottom: 1px solid var(--finbot-navy-3);
  padding: 0.6rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-icon-svg { width: 20px; height: 20px; color: white; }

.brand-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}
.brand-accent { color: var(--accent-light); }

.nav-icon-link {
  color: rgba(255,255,255,.75) !important;
  border-radius: 8px;
  padding: 0.45rem 0.75rem !important;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition), color var(--transition);
}
.nav-icon-link:hover, .nav-icon-link.active {
  color: white !important;
  background: rgba(255,255,255,.1);
}
.nav-icon { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-finbot-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
}
.btn-finbot-primary:hover {
  color: white;
  opacity: .9;
  transform: translateY(-1px);
}

.btn-finbot-outline {
  border: 2px solid rgba(255,255,255,.6);
  color: white;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: background var(--transition);
}
.btn-finbot-outline:hover {
  background: rgba(255,255,255,.1);
  color: white;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  background: linear-gradient(160deg, var(--finbot-navy) 0%, var(--finbot-navy-3) 60%, #1e3a5f 100%);
  color: white;
  padding: 5rem 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(124,58,237,.25);
  border: 1px solid rgba(124,58,237,.4);
  color: var(--accent-light);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  max-width: 560px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */
.section-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--finbot-navy);
  letter-spacing: -0.02em;
}

.bg-light-finbot { background-color: var(--bg-light); }

/* --------------------------------------------------------------------------
   Feature Cards
   -------------------------------------------------------------------------- */
.feature-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(124,58,237,.04));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.feature-icon { width: 24px; height: 24px; color: var(--accent); }

.feature-title {
  font-weight: 700;
  color: var(--finbot-navy);
  margin-bottom: 0.5rem;
}
.feature-desc { color: var(--text-muted); font-size: 0.9rem; flex: 1; }

/* --------------------------------------------------------------------------
   Disclaimer Banner
   -------------------------------------------------------------------------- */
.disclaimer-banner {
  background: #fff8e1;
  border-top: 1px solid #ffe082;
  border-bottom: 1px solid #ffe082;
}

/* --------------------------------------------------------------------------
   Dashboard Cards
   -------------------------------------------------------------------------- */
.stat-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-icon { width: 32px; height: 32px; color: var(--accent); margin-bottom: .5rem; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--finbot-navy); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.dash-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--finbot-navy-2), var(--finbot-navy-3));
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--accent);
}

.dash-card-link { text-decoration: none; color: inherit; display: block; }
.dash-card {
  background: white;
  border-radius: var(--card-radius);
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.dash-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.dash-card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-card-icon i { width: 20px; height: 20px; }

/* Soft colour backgrounds */
.bg-primary-soft   { background: rgba(13,33,55,.08); }
.bg-accent-soft    { background: rgba(124,58,237,.1); }
.bg-success-soft   { background: rgba(25,135,84,.1); }
.bg-warning-soft   { background: rgba(240,165,0,.1); }
.bg-info-soft      { background: rgba(13,202,240,.1); }
.bg-purple-soft    { background: rgba(124,58,237,.12); }

/* --------------------------------------------------------------------------
   Chat UI
   -------------------------------------------------------------------------- */
.chat-window {
  background: white;
  border-radius: var(--card-radius);
  border: 1px solid var(--border-light);
  height: 420px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.chat-message { display: flex; }
.chat-message.user  { justify-content: flex-end; }
.chat-message.assistant { justify-content: flex-start; }

.chat-bubble {
  max-width: 78%;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-message.assistant .chat-bubble {
  background: var(--bg-light);
  color: #1e293b;
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}

/* Typing dots animation */
.typing-dots span {
  animation: typing-blink 1.2s infinite;
  font-size: 1.4rem;
  line-height: 1;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-blink {
  0%, 80%, 100% { opacity: .2; }
  40%           { opacity: 1;  }
}

/* --------------------------------------------------------------------------
   Bank Cards
   -------------------------------------------------------------------------- */
.bank-card {
  background: white;
  border-radius: var(--card-radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.bank-card:hover { box-shadow: var(--shadow-md); }

.bank-avatar {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--finbot-navy), var(--finbot-navy-3));
  color: white;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem;
  margin: 0 auto;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Badges / Labels
   -------------------------------------------------------------------------- */
.bg-finbot   { background-color: var(--finbot-navy) !important; color: white; }
.bg-accent   { background-color: var(--accent) !important; color: white; }
.alert-finbot {
  background: rgba(124,58,237,.08);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  color: #1e293b;
}
.text-accent { color: var(--accent) !important; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer-finbot {
  background-color: var(--finbot-navy);
  border-top: 1px solid var(--finbot-navy-3);
  margin-top: auto;
}
.footer-link {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--transition);
  display: block;
  margin-bottom: 0.25rem;
}
.footer-link:hover { color: white; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-muted { color: var(--text-muted) !important; }

/* --------------------------------------------------------------------------
   Sidebar & App Layout
   -------------------------------------------------------------------------- */
.border-navy-subtle { border-color: rgba(255,255,255,0.1) !important; }

.finbot-sidebar {
  width: 260px;
  min-width: 260px;
  background-color: var(--finbot-navy);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1040;
  transition: transform 0.3s ease;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  color: white;
  background: rgba(255,255,255,0.08);
}

.sidebar-link.active {
  color: white;
  background: linear-gradient(135deg, rgba(124,58,237,0.3) 0%, rgba(124,58,237,0.15) 100%);
  border-left: 3px solid var(--accent);
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.topbar {
  z-index: 1020;
}

.shadow-xs {
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Mobile responsive sidebar */
@media (max-width: 991.98px) {
  .finbot-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .finbot-sidebar.show {
    transform: translateX(0);
  }
}

