/* Trading Signals Platform - Main Stylesheet */

/* ============================================
   CSS Variables - Custom Color Palette
   ============================================ */
:root {
  /* Primary - Deep Navy (navbar, sidebar, headers) */
  --primary-900: #0a143f;
  --primary-800: #0c1a4d;
  --primary-700: #0e215b;
  --primary-600: #112969;
  --primary-500: #1a3a7a;
  --primary-400: #2d4f8f;
  --primary-300: #4a69a7;
  
  /* Secondary - Vibrant Red/Pink (CTAs, buttons) */
  --secondary-900: #7a1629;
  --secondary-700: #a41e36;
  --secondary-600: #b9223c;
  --secondary-500: #c3263f;
  --secondary-400: #ce4a61;
  --secondary-300: #d96e83;
  
  /* Background Accents - Soft Mint Green */
  --accent-green-50: #e5f3f1;
  --accent-green-100: #c8e6e1;
  
  /* Background Accents - Soft Cream */
  --accent-cream-50: #fff7ee;
  --accent-cream-100: #ffedda;
  
  /* Neutral - Gray scale */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Success/Error/Warning */
  --success-500: #10b981;
  --error-500: #ef4444;
  --warning-500: #f59e0b;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-900);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
  color: var(--secondary-500);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-600);
}

/* ============================================
   Navigation Bar
   ============================================ */
.navbar {
  background: var(--primary-900);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  color: white !important;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.navbar-nav .nav-link.active {
  color: white !important;
  background: var(--secondary-500);
  border-radius: 6px;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--secondary-500);
  color: white;
}

.btn-primary:hover {
  background: var(--secondary-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--primary-600);
  color: white;
}

.btn-secondary:hover {
  background: var(--primary-700);
}

.btn-success {
  background: var(--success-500);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--secondary-500);
  color: var(--secondary-500);
}

.btn-outline-primary:hover {
  background: var(--secondary-500);
  color: white;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: none;
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-header {
  background: var(--primary-900);
  color: white;
  padding: 1.25rem 1.5rem;
  border-bottom: none;
  font-weight: 600;
  font-size: 1.25rem;
}

.card-header h5 ,
.card-header h4 
{
  color: white;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background: var(--gray-50);
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--gray-200);
}

/* ============================================
   Signal Cards
   ============================================ */
.signal-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 5px solid var(--secondary-500);
  transition: var(--transition);
  position: relative;
}

.signal-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateX(4px);
}

.signal-card.buy-signal {
  border-left-color: var(--success-500);
  background: linear-gradient(to right, rgba(16, 185, 129, 0.05), white);
}

.signal-card.sell-signal {
  border-left-color: var(--error-500);
  background: linear-gradient(to right, rgba(239, 68, 68, 0.05), white);
}

.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.signal-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 250px;
}

.signal-action {
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
}

.signal-action.buy {
  background: var(--success-500);
  color: white;
}

.signal-action.sell {
  background: var(--error-500);
  color: white;
}

.signal-asset {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-900);
}

.signal-type-badge {
  background: var(--accent-cream-50);
  color: var(--primary-800);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.signal-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.signal-time {
  color: var(--gray-500);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.signal-status-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-active {
  background: var(--accent-green-50);
  color: var(--success-500);
}

.status-closed {
  background: var(--gray-100);
  color: var(--gray-600);
}

.signal-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
}

.signal-detail {
  background: var(--gray-50);
  padding: 1rem;
  border-radius: 8px;
}

.signal-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.signal-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-900);
  font-family: 'Courier New', monospace;
}

.signal-analysis {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--accent-cream-50);
  border-radius: 8px;
  border-left: 3px solid var(--warning-500);
}

.signal-analysis h5 {
  font-size: 1rem;
  color: var(--primary-800);
  margin-bottom: 0.5rem;
}

.signal-analysis p {
  color: var(--gray-700);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ============================================
   Blur Overlay for Free Users
   ============================================ */
.signal-blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 10;
}

.blur-content {
  text-align: center;
  padding: 2rem;
  max-width: 500px;
}

.blur-icon {
  font-size: 3rem;
  color: var(--warning-500);
  margin-bottom: 1rem;
}

.blur-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-900);
  margin-bottom: 0.75rem;
}

.blur-timer {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-500);
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
}

.blur-message {
  color: var(--gray-700);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ============================================
   Forms
   ============================================ */
.form-control {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--secondary-500);
  box-shadow: 0 0 0 0.2rem rgba(195, 38, 63, 0.15);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.form-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: none;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-500);
  border-left: 4px solid var(--success-500);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-500);
  border-left: 4px solid var(--error-500);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-500);
  border-left: 4px solid var(--warning-500);
}

.alert-info {
  background: var(--accent-green-50);
  color: var(--primary-700);
  border-left: 4px solid var(--primary-500);
}

/* ============================================
   Dashboard Stats
   ============================================ */
.stats-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stats-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

.stats-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-500);
}

.stats-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-500);
}

.stats-icon.primary {
  background: rgba(26, 58, 122, 0.1);
  color: var(--primary-600);
}

.stats-info h6 {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 600;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-900);
  line-height: 1;
}

/* ============================================
   Tables
   ============================================ */
.table {
  width: 100%;
  margin-bottom: 1rem;
}

.table thead th {
  background: var(--primary-900);
  color: white;
  font-weight: 600;
  padding: 1rem;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  border: none;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
  background: var(--gray-50);
}

/* ============================================
   Badges
   ============================================ */
.badge {
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-block;
}

.badge-success {
  background: var(--success-500);
  color: white;
}

.badge-danger {
  background: var(--error-500);
  color: white;
}

.badge-warning {
  background: var(--warning-500);
  color: white;
}

.badge-primary {
  background: var(--primary-600);
  color: white;
}

.badge-secondary {
  background: var(--gray-400);
  color: white;
}

/* ============================================
   Pricing Cards
   ============================================ */
.pricing-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition);
  border: 2px solid transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  border-color: var(--secondary-500);
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
  border-color: var(--secondary-500);
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: scale(1.05);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary-500);
  color: white;
  padding: 0.35rem 1.25rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.pricing-card h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary-500);
  margin: 1rem 0;
}

.pricing-price span {
  font-size: 1.25rem;
  color: var(--gray-600);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  text-align: left;
  flex-grow: 1;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pricing-features li:before {
  content: "✓";
  color: var(--success-500);
  font-weight: 700;
  font-size: 1.25rem;
}

/* ============================================
   Login/Register Pages
   ============================================ */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-600) 100%);
  padding: 2rem 1rem;
}

.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  padding: 3rem;
  width: 100%;
  max-width: 450px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo h1 {
  color: var(--primary-900);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.auth-logo p {
  color: var(--gray-600);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--primary-900);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
}

.footer a:hover {
  color: white;
}

/* ============================================
   Utilities
   ============================================ */
.text-primary { color: var(--primary-900) !important; }
.text-secondary { color: var(--secondary-500) !important; }
.bg-primary { background-color: var(--primary-900) !important; }
.bg-secondary { background-color: var(--secondary-500) !important; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .signal-card {
    padding: 1rem;
  }
  
  .signal-body {
    grid-template-columns: 1fr;
  }
  
  .signal-header {
    flex-direction: column;
  }
  
  .auth-card {
    padding: 2rem 1.5rem;
  }
  
  .pricing-card.featured {
    transform: scale(1);
  }
  
  .stats-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .signal-action {
    font-size: 1rem;
    padding: 0.4rem 1rem;
  }
  
  .signal-asset {
    font-size: 1.25rem;
  }
  
  .stats-value {
    font-size: 1.5rem;
  }
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--secondary-500);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .navbar, .footer, .btn, .blur-overlay {
    display: none !important;
  }
}
