@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-main: #050811;
  --bg-card: rgba(13, 19, 36, 0.75);
  --bg-card-hover: rgba(20, 29, 54, 0.85);
  --bg-card-glass: rgba(13, 19, 36, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.25);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-cyan: #00f2fe;
  --accent-blue: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.2);
  --accent-red: #f43f5e;
  --accent-red-glow: rgba(244, 63, 94, 0.2);
  --accent-amber: #f59e0b;
  --accent-purple: #a855f7;
  --accent-violet: #8b5cf6;

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 15% 10%, rgba(0, 242, 254, 0.07) 0px, transparent 45%),
    radial-gradient(at 85% 20%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 85%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Header Navbar */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 2.2rem;
  background: rgba(9, 14, 26, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #00f2fe 0%, #8b5cf6 50%, #6366f1 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #050811;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
  letter-spacing: -0.02em;
  position: relative;
  overflow: hidden;
}

.logo-badge::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(30deg);
  animation: shine 4s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(30deg); }
  20%, 100% { transform: translateX(100%) rotate(30deg); }
}

.brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 70%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand .sub {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

nav {
  display: flex;
  gap: 6px;
  background: rgba(13, 19, 36, 0.75);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(139, 92, 246, 0.2));
  color: #fff;
  border: 1px solid rgba(0, 242, 254, 0.4);
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.15);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-live {
  background: var(--accent-green-glow);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-dry {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* AI Highlights Bar */
.ai-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.ai-feature-card {
  background: linear-gradient(135deg, rgba(13, 19, 36, 0.8), rgba(20, 29, 54, 0.6));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.ai-feature-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ai-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ai-feature-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.ai-feature-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* Main Layout Container */
main {
  flex: 1;
  padding: 2.2rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Progress Loader Overlay */
.loader-box {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner-ring {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(0, 242, 254, 0.15);
  border-top: 4px solid var(--accent-cyan);
  border-right: 4px solid var(--accent-violet);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.3);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.progress-bar-track {
  width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-top: 6px;
}

.progress-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
  animation: progressPulse 1.4s ease-in-out infinite;
}

@keyframes progressPulse {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

/* Stat Cards Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  background: var(--bg-card-glass);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}

.btn-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #8b5cf6 100%);
  color: #050811;
  border: none;
  padding: 11px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.3);
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 242, 254, 0.45);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-danger {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: var(--accent-red);
  color: #fff;
}

/* Signals Grid & Cards */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 1.5rem;
}

.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  backdrop-filter: blur(14px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.signal-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.signal-card.hero-border {
  border: 1px solid rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.22);
}

.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.signal-symbol {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.badge-buy {
  background: var(--accent-green-glow);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.badge-sell {
  background: var(--accent-red-glow);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

.badge-hold {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
}

/* AI Win Probability Meter Bar */
.ai-prob-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(5, 8, 17, 0.7);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-prob-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.ai-prob-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.ai-prob-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}

/* Timeframe Radar Chips */
.tf-radar-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(5, 8, 17, 0.5);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.tf-chip {
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.tf-chip-green {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.tf-chip-red {
  background: rgba(244, 63, 94, 0.18);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(5, 8, 17, 0.6);
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.metric-val {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.reason-box {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-cyan);
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btn-approve {
  flex: 1;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-approve:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-dismiss {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-dismiss:hover {
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.25);
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

th, td {
  padding: 14px 20px;
  text-align: left;
}

th {
  background: rgba(9, 14, 26, 0.9);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

tr:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Settings Form */
.settings-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  backdrop-filter: blur(12px);
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-cyan);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  letter-spacing: 0.02em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.form-control {
  background: rgba(5, 8, 17, 0.75);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
}

select.form-control option {
  background: #0d1324;
  color: #fff;
}

/* Footer Disclaimer */
footer {
  margin-top: auto;
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  background: rgba(5, 8, 17, 0.95);
}

/* Glassmorphic Market Indices Ticker Bar */
.indices-ticker-container {
  background: rgba(9, 14, 26, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 2.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.indices-ticker-container::-webkit-scrollbar {
  display: none;
}
.ticker-title-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
  border-right: 1px solid var(--border-color);
}
.indices-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.index-chip {
  background: rgba(13, 19, 36, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.index-chip:hover {
  border-color: rgba(0, 242, 254, 0.4);
  transform: translateY(-1px);
}
.index-chip-name {
  font-weight: 700;
  color: #fff;
}
.index-chip-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}
.index-chip-pct {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.pct-up {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.pct-down {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* User Account Profile & Funds Widget */
.account-summary-widget {
  background: linear-gradient(135deg, rgba(13, 19, 36, 0.9), rgba(20, 29, 54, 0.7));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  align-items: center;
  backdrop-filter: blur(10px);
}
.account-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--border-color);
  padding-right: 1.25rem;
}
.avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f2fe, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #050811;
}
.profile-meta-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}
.profile-meta-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.fund-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fund-stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fund-stat-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

/* Intraday Position Cards & Tables */
.pnl-badge-positive {
  color: var(--accent-green);
  font-weight: 800;
  font-family: var(--font-mono);
}
.pnl-badge-negative {
  color: var(--accent-red);
  font-weight: 800;
  font-family: var(--font-mono);
}
.tag-mis {
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.tag-buy {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
}
.tag-sell {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-red);
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
}


