/*
 * InvestmentVault v2 — custom.css
 * Professional dark-navy + gold theme additions
 */

:root {
  --iv-dark:       #0a1628;
  --iv-medium:     #1e3a5f;
  --iv-gold:       #c9a227;
  --iv-gold-light: #e8c94a;
  --iv-light:      #f8f9fa;
}

/* ── Global typography ── */
body { font-family: 'Inter', sans-serif; }
h1, h2, h3, h4, h5 { font-weight: 700; }

/* ── Card defaults ── */
.iv-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: box-shadow 0.25s, transform 0.25s;
}
.iv-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* ── Project cards ── */
.project-card { cursor: pointer; }
.project-card .card-img-top {
  height: 180px;
  object-fit: cover;
}
.project-card .funding-bar { height: 6px; border-radius: 3px; }
.project-card .risk-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.risk-low    { background: rgba(40,167,69,0.15);  color: #28a745; }
.risk-medium { background: rgba(255,193,7,0.15);  color: #d97706; }
.risk-high   { background: rgba(220,53,69,0.15);  color: #dc3545; }

/* ── Investor cards (find investors page) ── */
.investor-card { text-align: center; }
.investor-card .investor-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--iv-gold);
  margin: 0 auto 12px;
  display: block;
}

/* ── Negotiation chat ── */
.negotiate-badge {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #28a745;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Profile page ── */
.profile-stat-card {
  text-align: center;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 14px 10px;
}
.profile-stat-card .num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--iv-dark);
}
.profile-stat-card .lbl {
  font-size: 0.72rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── User type card selection (register) ── */
.user-type-card {
  border: 2px solid #dee2e6;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  height: 100%;
}
.user-type-card:hover {
  border-color: var(--iv-gold);
  background: #fffdf0;
}
.user-type-card.selected {
  border-color: var(--iv-gold);
  background: #fffbea;
  box-shadow: 0 0 0 3px rgba(201,162,39,0.18);
}
.user-type-card i { font-size: 1.6rem; margin-bottom: 6px; display: block; color: var(--iv-medium); }
.user-type-card.selected i { color: var(--iv-gold); }
.user-type-card .label { font-size: 0.8rem; font-weight: 600; color: var(--iv-dark); margin: 0; }

/* ── Scroll fade-in animation ── */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Gold text / bg helpers ── */
.text-gold { color: var(--iv-gold) !important; }
.bg-iv-dark { background: var(--iv-dark) !important; }
.bg-iv-medium { background: var(--iv-medium) !important; }
.border-gold { border-color: var(--iv-gold) !important; }

/* ── Table improvements ── */
.table th { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #6c757d; }
.table td { vertical-align: middle; }

/* ── Admin sidebar nav ── */
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}
.admin-nav-link:hover,
.admin-nav-link.active {
  background: rgba(201,162,39,0.15);
  color: var(--iv-gold);
}

/* ── Chatbot widget overrides (if needed beyond base.html inline) ── */
.chatbot-typing {
  display: flex; gap: 4px; padding: 10px 14px;
  background: #f1f3f5; border-radius: 14px 14px 14px 4px;
  align-self: flex-start;
}
.chatbot-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #9ca3af;
  animation: typingDot 1.2s infinite;
}
.chatbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
  .iv-footer .col-lg-2,
  .iv-footer .col-lg-3 { margin-bottom: 16px; }
  .chat-container { flex-direction: column; }
}

/* ── Form focus glow ── */
.form-control:focus,
.form-select:focus {
  border-color: var(--iv-gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}

/* ── Scroll to top button ── */
#scrollTopBtn {
  position: fixed;
  bottom: 92px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(10,22,40,0.8);
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1050;
  transition: opacity 0.3s;
  font-size: 0.9rem;
}
#scrollTopBtn:hover { background: var(--iv-dark); }
