/* ~/stockengun/static/css/stockengun.css */
/* =============================================
   STOCKENGÜN PROFESSIONAL STYLESHEET
   ============================================= */

/* Color Palette */
:root {
  /* Primary colors - professional finance theme */
  --primary: #1e3a5f;      /* Deep navy blue */
  --primary-dark: #0f1f35; /* Darker navy */
  --primary-light: #2c4a70; /* Lighter navy */
  
  /* Accent colors */
  --accent: #3b82f6;        /* Professional blue */
  --accent-hover: #2563eb;  /* Hover state */
  
  /* Market colors */
  --success: #059669;       /* Green for gains */
  --danger: #dc2626;        /* Red for losses */
  --warning: #d97706;       /* Amber for warnings */
  
  /* Neutral colors */
  --gray-900: #111827;      /* Almost black */
  --gray-800: #1f2937;      /* Dark gray */
  --gray-700: #374151;      /* Medium-dark gray */
  --gray-600: #4b5563;      /* Medium gray */
  --gray-500: #6b7280;      /* Gray */
  --gray-400: #9ca3af;      /* Light gray */
  --gray-300: #d1d5db;      /* Lighter gray */
  --gray-200: #e5e7eb;      /* Very light gray */
  --gray-100: #f3f4f6;      /* Off-white */
  --white: #ffffff;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Borders */
  --border-radius: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-color: var(--gray-200);
}

/* Base Typography */
body {
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-900);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--gray-900);
}

h1 { font-size: 2.25rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.875rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.875rem; }
h5 { font-size: 1.125rem; margin-bottom: 0.75rem; }
h6 { font-size: 1rem; margin-bottom: 0.5rem; }

/* Hero Section */
.hero-section {
  background: #0f1419;
  position: relative;
  min-height: 500px;
  overflow: hidden;
}

#matrix-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 0;
}

/* Hero text backdrop */
.hero-text-backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 255, 255, 0.1);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.hero-section h1 {
  color: var(--white);
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.3);
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.hero-section h3.text-info {
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.6);
}

.market-status-card {
  background: rgba(10, 15, 20, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
}

.status-box {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--border-radius);
  transition: transform 0.2s ease;
  backdrop-filter: blur(5px);
}

.status-box:hover {
  transform: translateY(-2px);
}

.status-box.status-green {
  background: rgba(5, 150, 105, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.status-box.status-red {
  background: rgba(220, 38, 38, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.status-box.status-yellow {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.status-box h4 {
  color: inherit;
  font-weight: 700;
}

.status-box small {
  opacity: 0.8;
}

/* Navigation Bar */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
}

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

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
  border-radius: var(--border-radius);
}

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

.navbar-nav .nav-link i {
  margin-right: 0.375rem;
}

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.card-header {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

.card-body {
  padding: 1.25rem;
}

/* Tables */
.table {
  font-size: 0.875rem;
}

.table thead th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  color: var(--gray-700);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 0.75rem;
}

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

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

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: var(--border-radius);
  padding: 0.5rem 1.25rem;
  transition: all 0.2s ease;
  border: none;
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: 0.25px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

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

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

/* Badges */
.badge {
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.bg-success {
  background-color: var(--success) !important;
}

.bg-danger {
  background-color: var(--danger) !important;
}

.bg-warning {
  background-color: var(--warning) !important;
}

/* Market Data Styles */
.text-success {
  color: var(--success) !important;
  font-weight: 500;
}

.text-danger {
  color: var(--danger) !important;
  font-weight: 500;
}

.price-up::before {
  content: "▲ ";
  font-size: 0.75rem;
}

.price-down::before {
  content: "▼ ";
  font-size: 0.75rem;
}

/* Stock Symbol Links */
a.stock-symbol {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

a.stock-symbol:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Dashboard Stats Cards */
.stat-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Forms */
.form-control, .form-select {
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
  outline: none;
}

.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

/* Alerts & Messages */
.alert {
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
}

.alert-success {
  background: rgba(5, 150, 105, 0.1);
  color: var(--success);
  border-left: 3px solid var(--success);
}

.alert-danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
  border-left: 3px solid var(--danger);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 2rem;
  margin-top: 5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fix for login button on white pages */
main .btn-outline-light {
  border-color: var(--primary);
  color: var(--primary);
}

main .btn-outline-light:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

footer h5, footer h6 {
  color: var(--white);
  font-weight: 600;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--white);
}

/* Loading States */
.spinner-border {
  width: 1.25rem;
  height: 1.25rem;
  border-width: 0.15rem;
  color: var(--accent);
}

/* Responsive Tables */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.8125rem;
  }
  
  .table thead th {
    font-size: 0.7rem;
    padding: 0.5rem;
  }
  
  .table tbody td {
    padding: 0.5rem;
  }
}

/* Utility Classes */
.text-muted { color: var(--gray-500) !important; }
.text-primary { color: var(--accent) !important; }
.bg-light { background-color: var(--gray-50) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* Market Status Indicators */
.market-status {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.market-status.open::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

.market-status.closed::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
}

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

/* Professional Data Grid */
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.data-grid-item {
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.data-grid-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

/* Dashboard Styles */
.dashboard-section {
    background: linear-gradient(180deg, #0f1419 0%, #1a1f2e 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.dashboard-section .stat-card {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
}

.dashboard-section .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.2);
}

.dashboard-section .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #60d5ff !important;
    text-shadow: 0 0 20px rgba(96, 213, 255, 0.8), 0 0 40px rgba(96, 213, 255, 0.4);
}

.dashboard-section .stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Print Styles */
@media print {
  .navbar, footer, .btn, .no-print { display: none !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { font-size: 12pt; }
}

/* Admin pages*/
.btn-cyan {
    background: transparent;
    color: #60d5ff;
    border: 1px solid #60d5ff;
    transition: all 0.3s ease;
}

.btn-cyan:hover {
    background: #60d5ff;
    color: #0a1422;
    box-shadow: 0 0 20px rgba(96, 213, 255, 0.5);
}

.btn-outline-cyan {
    background: transparent;
    color: #60d5ff;
    border: 1px solid rgba(96, 213, 255, 0.5);
}

.btn-outline-cyan:hover {
    background: rgba(96, 213, 255, 0.1);
    border-color: #60d5ff;
    color: #00ffff;
}

/* Django Messages - Cyberpunk Theme */
.messages {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.messages li {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(96, 213, 255, 0.3);
    border-left: 4px solid #60d5ff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    color: #60d5ff;
    font-weight: 500;
    box-shadow: 0 0 20px rgba(96, 213, 255, 0.2);
    position: relative;
    animation: slideIn 0.3s ease;
}

.messages li.success {
    border-left-color: #10b981;
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.messages li.error {
    border-left-color: #ef4444;
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.messages li.warning {
    border-left-color: #f59e0b;
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.messages li.info {
    border-left-color: #60d5ff;
    color: #60d5ff;
    text-shadow: 0 0 10px rgba(96, 213, 255, 0.5);
}

/* Close button for messages */
.messages li button.close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.messages li button.close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
