/* ============================================================
   SmartInvest AI - Global Styles
   ============================================================ */

:root {
  --primary: #ffc107;
  --dark-bg: #0a0e1a;
  --card-bg: rgba(255,255,255,0.04);
  --border-color: rgba(255,255,255,0.1);
  --green: #4caf50;
  --red: #f44336;
  --text-muted: #888;
}

* { box-sizing: border-box; }

body {
  background-color: var(--dark-bg);
  color: #e0e0e0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
}

/* ---- Gradient Text ---- */
.text-gradient {
  background: linear-gradient(135deg, #ffc107, #ff5722);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Navbar ---- */
.navbar-brand { font-size: 1.2rem; }

.ticker-scroll {
  white-space: nowrap;
  overflow: hidden;
}

.ticker-item {
  font-size: 0.8rem;
  color: #aaa;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
}

.ticker-item .price { font-weight: bold; color: #fff; }
.ticker-item.up .price { color: #4caf50; }
.ticker-item.down .price { color: #f44336; }

/* ---- Avatar ---- */
.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border-color: var(--border-color) !important;
  border-radius: 12px;
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
}

/* ---- Tables ---- */
.table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,0.02);
  --bs-table-hover-bg: rgba(255,255,255,0.05);
}

.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 600;
  border-color: rgba(255,255,255,0.1) !important;
}

.table td {
  border-color: rgba(255,255,255,0.05) !important;
  vertical-align: middle;
}

/* ---- Buttons ---- */
.btn-xs {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.btn-warning { color: #000 !important; }
.btn-warning:hover { background: #e0a800; border-color: #d39e00; }

/* ---- Forms ---- */
.form-control:focus, .form-select:focus {
  border-color: #ffc107 !important;
  box-shadow: 0 0 0 0.2rem rgba(255,193,7,0.15) !important;
}

.form-control::placeholder { color: #555; }

/* ---- Badges ---- */
.badge { font-weight: 500; letter-spacing: 0.3px; }

/* ---- Progress Bars ---- */
.progress {
  background: rgba(255,255,255,0.1);
  border-radius: 20px;
}

/* ---- Charts ---- */
canvas { max-width: 100%; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ---- Signal Colors ---- */
.signal-strong-buy  { color: #00c853; font-weight: bold; }
.signal-buy         { color: #4caf50; }
.signal-hold        { color: #ffc107; }
.signal-sell        { color: #f44336; }
.signal-strong-sell { color: #b71c1c; font-weight: bold; }

/* ---- Market ticker animation ---- */
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Hover effects ---- */
.hover-card:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

a.hover-bg-dark:hover { background: rgba(255,255,255,0.05) !important; }

/* ---- Auth pages ---- */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1b2a 50%, #1a0a2e 100%);
}

/* ---- Loading spinner ---- */
.spinner-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .ticker-scroll { display: none !important; }
  h1, h2 { font-size: 1.5rem; }
  .card-body { padding: 0.75rem; }
}

/* ---- Landing Page ---- */
.hero-section {
  min-height: 90vh;
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1b2a 60%, #1a0a2e 100%);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,193,7,0.05) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(33,150,243,0.05) 0%, transparent 60%);
}

.stat-box {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-box:hover {
  background: rgba(255,193,7,0.1);
  border-color: rgba(255,193,7,0.3);
  transform: translateY(-4px);
}

.feature-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}

/* ---- Notification dot ---- */
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f44336;
  display: inline-block;
}

/* ---- Table row market status ---- */
tr.market-open { border-left: 3px solid #4caf50; }
tr.market-closed { border-left: 3px solid #666; }

/* ---- P&L coloring ---- */
.pnl-positive { color: #4caf50 !important; }
.pnl-negative { color: #f44336 !important; }

/* ---- Info tooltips ---- */
.tooltip-inner {
  background: #1a1a2e;
  border: 1px solid rgba(255,193,7,0.3);
  max-width: 300px;
  font-size: 0.8rem;
}
