/* ============================================
   Modern Seasonality Platform - Redesigned
   ============================================ */

/* CSS Variables for Consistent Theming */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Modern Professional Header */
header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

header .container {
    display: flex;
    flex-direction: column;
}

/* Top Bar - Logo and Branding */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

header h1 {
    margin: 0;
}

/* Logo Styles */
header h1 a.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
}

header h1 a.logo-link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

header h1 .logo {
    height: 50px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

header h1 .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* Legacy text logo support (if logo image unavailable) */
header h1 a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: opacity 0.3s;
}

header h1 a:hover {
    opacity: 0.8;
}

header .subtitle {
    color: #6b7280;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-top: 4px;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Navigation Bar */
.main-nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    padding: 0.75rem 0;
    flex-wrap: wrap;
    margin: 0;
}

.main-nav a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    padding: 0.625rem 1.125rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    white-space: nowrap;
    position: relative;
    letter-spacing: 0.01em;
}

.main-nav a:hover {
    background: #f3f4f6;
    color: #667eea;
}

.main-nav a.nav-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.main-nav a.nav-highlight:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.main-nav a.cta-link {
    background: #f0fdf4;
    color: #16a34a;
    border: 1.5px solid #86efac;
    font-weight: 600;
    margin-left: 0.5rem;
}

.main-nav a.cta-link:hover {
    background: #dcfce7;
    border-color: #4ade80;
    color: #15803d;
    transform: translateY(-1px);
}

/* Dropdown Navigation Menus */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-trigger {
    cursor: pointer;
    user-select: none;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 200px;
    z-index: 1001;
    padding: 0.5rem 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border-radius: 0;
}

.nav-dropdown-menu a:hover {
    background: #f3f4f6;
    color: #667eea;
}

.nav-dropdown-menu a.nav-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0 0.5rem;
    border-radius: 6px;
}

.nav-dropdown-menu a.nav-highlight:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

/* Responsive Navigation */
@media (max-width: 968px) {
    header .container {
        padding: 0 16px;
    }

    header h1 .logo {
        height: 42px;
    }

    header h1 .logo-text {
        font-size: 1.25rem;
    }

    .main-nav {
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: #e5e7eb transparent;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
    }

    .main-nav::-webkit-scrollbar {
        height: 4px;
    }

    .main-nav::-webkit-scrollbar-thumb {
        background: #e5e7eb;
        border-radius: 2px;
    }

    .main-nav a {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
    }
}

/* Main Content Area */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0 3rem;
}

/* Modern Page Header */
.page-header {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.page-header h2 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.page-header-text {
    flex: 1;
}

.alerts-notification {
    display: flex;
    align-items: flex-start;
}

.alerts-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid var(--border-color);
}

.alerts-bell:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.alerts-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.header-actions {
    margin-top: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    display: inline-block;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

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

.btn-outline {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Modern Cards */
.chart-container,
.comparison-controls,
.screener-controls,
.comparison-section,
.statistics-container,
.auth-container,
.comparison-results,
.results-container,
.categories-grid,
.symbols-list,
.category-container,
.dashboard-grid,
.all-symbols-grid,
.chart-info,
.screener-info,
.filter-grid,
.comparison-summary,
.user-info-card,
.watchlist-card,
.quick-select {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* Chart Wrapper */
.chart-wrapper {
    position: relative;
    height: 500px;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

/* Form Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1.125rem;
    font-size: 0.9375rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-family: inherit;
    background: white;
    color: var(--text-primary);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Modern Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9375rem;
}

thead th {
    background: #f8f9fa;
    color: var(--text-primary);
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.875rem;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

thead th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

thead th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

thead th.sortable:hover {
    background: #e9ecef;
}

thead th.sortable .sort-icon {
    display: inline-block;
    margin-left: 0.5rem;
    color: var(--primary-color);
    font-size: 0.75rem;
    min-width: 12px;
}

thead th.sort-asc,
thead th.sort-desc {
    background: #e9ecef;
}

tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

tbody tr:hover {
    background: var(--bg-secondary);
}

tbody tr:last-child td:first-child {
    border-radius: 0 0 0 var(--radius-md);
}

tbody tr:last-child td:last-child {
    border-radius: 0 0 var(--radius-md) 0;
}

/* Statistics Cards */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

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

.stat-card-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.stat-card-header h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-years-analyzed {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-detail {
    color: var(--text-light);
    font-size: 0.8125rem;
}

.stat-positive {
    color: var(--secondary-color);
}

.stat-negative {
    color: var(--danger-color);
}

.stat-neutral {
    color: var(--accent-color);
}

/* Signal Badges */
.signal-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.signal-strong-buy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.signal-buy {
    background: #d1fae5;
    color: #065f46;
}

.signal-hold {
    background: #fef3c7;
    color: #92400e;
}

.signal-sell {
    background: #fee2e2;
    color: #991b1b;
}

.signal-strong-sell {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* Screener Table */
.screener-table {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

/* Loading States */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    padding: 1rem 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.result-count {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Export Buttons */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.export-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.export-icon {
    font-size: 1.125rem;
}

/* Symbol Comparison */
.symbol-selector-grid {
    margin: 1.5rem 0;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.selected-symbols {
    min-height: 80px;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.selected-symbol-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.125rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.tag-ticker {
    font-weight: 700;
}

.tag-remove {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.tag-remove:hover {
    background: rgba(255, 255, 255, 0.3);
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.symbol-card {
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s;
}

.symbol-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.symbol-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: var(--primary-dark);
    color: white;
    box-shadow: var(--shadow-lg);
}

.symbol-card.selected .symbol-ticker,
.symbol-card.selected .symbol-name {
    color: white;
}

.symbol-ticker {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.symbol-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Selected Symbols Section */
.selected-symbols-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.selected-symbols-section .selected-symbols {
    min-height: 100px;
    padding: 1.5rem;
}

.selected-symbols-section #addSymbolBtn {
    align-self: flex-start;
}

/* Symbol Search Section */
.symbol-search-section {
    margin-bottom: 1.5rem;
}

.symbol-search {
    position: relative;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 1000px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.modal-search-bar {
    margin-bottom: 1.5rem;
}

.symbol-count {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.modal-body .symbols-grid {
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.modal-body .symbols-grid::-webkit-scrollbar {
    width: 8px;
}

.modal-body .symbols-grid::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.modal-body .symbols-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modal-body .symbols-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Regime Toggle */
.regime-toggle-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.regime-toggle {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-family: inherit;
}

.regime-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.regime-toggle.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

/* Presidential Cycle Toggle */
.cycle-toggle-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.cycle-toggle {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-family: inherit;
}

.cycle-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.cycle-toggle.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #047857;
    box-shadow: var(--shadow-md);
}

.current-cycle-info {
    margin-top: 1rem;
    animation: fadeIn 0.3s ease-in;
}

.cycle-info-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cycle-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.cycle-column {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.cycle-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: color 0.2s;
    user-select: none;
}

.checkbox-label:hover {
    color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    margin: 0;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

footer p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-links .separator {
    color: var(--text-light);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .footer-content {
        font-size: 0.8125rem;
    }

    .footer-links {
        font-size: 0.8125rem;
    }
}

/* Ticker Symbol Badge */
.ticker-symbol {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .page-header {
        padding: 1.5rem;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    .header-content {
        flex-direction: column;
    }

    .chart-wrapper {
        height: 350px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .symbols-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .dashboard-sidebar {
        order: -1;
        max-width: 100%;
    }

    .dashboard-section .symbols-grid {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .checkbox-group {
        flex-direction: column;
    }

    .checkbox-label {
        width: 100%;
    }
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Accessibility */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Category Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

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

.category-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.category-card .symbol-count {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Category Page - Controls */
.category-controls {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: all 0.2s;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    min-width: 200px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.category-controls .result-count {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    background: transparent;
    display: block;
    margin-left: 0;
    border-radius: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Category Page - Symbol Cards */
.symbol-card .symbol-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.symbol-card .symbol-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.symbol-card .symbol-ticker-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.symbol-card .symbol-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.symbol-card .btn {
    width: 100%;
    justify-content: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* Responsive for category controls */
@media (max-width: 768px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }

    .sort-select {
        min-width: 100%;
    }
}

/* Symbol List */
.symbols-list {
    padding: 2rem;
}

.symbols-list h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.symbol-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}

.symbol-link:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.symbol-info h4 {
    color: var(--text-primary);
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.symbol-info .ticker {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.875rem;
}

.symbol-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.dashboard-section {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    min-width: 0; /* Prevent grid overflow */
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 300px;
    max-width: 400px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.section-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.watchlist-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.user-info-card,
.quick-links-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.user-info-card h4,
.quick-links-card h4 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 700;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.user-info-card p {
    color: var(--text-secondary);
    margin: 0.75rem 0;
    font-size: 0.9rem;
}

.user-info-card p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.user-info-card .btn-block {
    width: 100%;
    margin-top: 1.5rem;
    text-align: center;
}

.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links li {
    margin-bottom: 0.75rem;
}

.quick-links li:last-child {
    margin-bottom: 0;
}

.quick-links a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    font-weight: 500;
}

.quick-links a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateX(5px);
}

.dashboard-section .symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.dashboard-section .symbol-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

.dashboard-section .symbol-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.dashboard-section .symbol-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.dashboard-section .symbol-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
}

.dashboard-section .symbol-header .symbol-name {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
}

.dashboard-section .symbol-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.dashboard-section .card-actions {
    display: flex;
    gap: 0.75rem;
}

.dashboard-section .card-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
    padding: 0.6rem 1rem;
}

.btn-remove-watchlist {
    background: white;
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn-remove-watchlist:hover {
    background: var(--danger-color);
    color: white;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px dashed #e5e7eb;
    margin: 2rem 0;
}

.empty-state h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem auto 2rem;
    max-width: 500px;
    text-align: left;
}

.empty-state li {
    color: #374151;
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background: #f9fafb;
    border-left: 3px solid #3b82f6;
    border-radius: 4px;
    font-weight: 500;
}

.empty-state li:before {
    content: "✓ ";
    color: #3b82f6;
    font-weight: bold;
    margin-right: 0.5rem;
}

.empty-state .btn {
    margin-top: 1rem;
    font-weight: 600;
}

.empty-state-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.dashboard-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.dashboard-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Filter Grid */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-item label {
    display: block;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Info Sections */
.chart-info,
.screener-info {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.chart-info h3,
.screener-info h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chart-info ul,
.screener-info ul {
    list-style: none;
    padding: 0;
}

.chart-info li,
.screener-info li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.chart-info li::before,
.screener-info li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
}

.chart-info li strong,
.screener-info li strong {
    color: var(--text-primary);
}

/* Stats Header */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stats-header h3 {
    margin: 0;
    color: var(--text-primary);
}

/* Export Action */
.export-action {
    text-align: right;
    margin-bottom: 1.5rem;
}

/* Regime Info */
.regime-info {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    color: var(--text-primary);
}

/* Chart Controls */
.chart-controls h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

/* Suggestion List */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

/* Symbol suggestions dropdown */
.symbol-suggestions {
    min-width: 400px;
    white-space: nowrap;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: block;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: var(--bg-secondary);
}

.suggestion-item strong {
    color: var(--primary-color);
    font-weight: 600;
    margin-right: 0.5rem;
}

.suggestion-ticker {
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 1rem;
}

.suggestion-name {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Quick Select */
.quick-select h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.quick-select-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quick-select-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-primary);
}

.quick-select-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary-color);
}

/* Comparison Options */
.comparison-options {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.option-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: white;
}

/* Selected Symbols Hint */
.selected-symbols .hint {
    color: var(--text-light);
    font-style: italic;
    margin: 0;
}

/* Advanced Filters Section */
.advanced-filters {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0;
    margin-top: 1.5rem;
    transition: all 0.3s;
}

.advanced-filters:hover {
    border-color: var(--primary-light);
}

.advanced-filters summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.advanced-filters summary::-webkit-details-marker {
    display: none;
}

.advanced-filters summary::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.3s;
    color: var(--primary-color);
    font-size: 0.75rem;
}

.advanced-filters[open] summary::before {
    transform: rotate(90deg);
}

.advanced-filters summary:hover {
    background: var(--bg-secondary);
}

.filter-content {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.filter-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.filter-section {
    margin-bottom: 1.25rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h4 {
    color: var(--text-primary);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Removed duplicate - using global .checkbox-label style */

.filter-section input[type="text"] {
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    flex: 1;
    transition: all 0.2s;
}

.filter-section input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.exclusion-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-primary);
    font-weight: 500;
}

.exclusion-tag button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.exclusion-tag button:hover {
    color: var(--danger-color);
}

.filter-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--primary-dark);
}

.filter-status .status-icon {
    font-size: 1rem;
}

.section-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(118, 75, 162, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

/* Print Styles */
@media print {
    header,
    footer,
    .btn,
    .export-btn {
        display: none;
    }

    body {
        background: white;
    }

    .chart-container,
    .comparison-section {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Portfolio Styles */
.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.portfolio-stats .stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: none;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-stats .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.portfolio-stats .stat-label {
    color: rgba(255, 255, 255, 1) !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.portfolio-stats .stat-value {
    color: white !important;
    font-size: 2.25rem !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.portfolio-stats .stat-value.stat-positive {
    color: #a7f3d0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.portfolio-stats .stat-value.stat-negative {
    color: #fecaca;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.portfolio-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.position-filters select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background: white;
}

/* Symbol Search Autocomplete */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    margin-top: -8px;
}

.search-result-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--bg-tertiary);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--bg-secondary);
}

.search-result-item.no-results {
    cursor: default;
    color: var(--text-secondary);
    text-align: center;
}

.search-result-item.no-results:hover {
    background-color: white;
}

.form-group {
    position: relative;
}

.positions-container {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.position-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.2s;
}

.position-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.position-symbol h3 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.position-symbol .position-name {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.position-status {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-open {
    background: #10b981;
    color: white;
}

.status-closed {
    background: #6b7280;
    color: white;
}

.position-details {
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.position-notes {
    margin-top: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.position-notes strong {
    color: var(--text-primary);
}

.position-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.position-actions .btn {
    flex: 1;
    min-width: 80px;
    text-align: center;
    font-size: 0.813rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Checkbox Group Styling */
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group span {
    font-weight: 500;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.btn-danger {
    background: white;
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-accent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid transparent;
}

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

/* Responsive Portfolio */
@media (max-width: 768px) {
    .portfolio-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .positions-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }
}

/* Dashboard Portfolio Summary */
.portfolio-summary-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.summary-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
}

.recent-positions {
    margin-top: 1rem;
}

.mini-position-card {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
}

.mini-position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.mini-position-header strong {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.mini-days {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mini-position-date {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Position Analytics */
.analytics-summary {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 2px solid #e9ecef;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.analytics-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.analytics-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.analytics-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-neutral {
    color: #f59e0b !important;
}

.positive {
    color: var(--secondary-color);
    font-weight: 600;
}

.negative {
    color: var(--danger-color);
    font-weight: 600;
}

/* Seasonal Progress Bar */
.seasonal-progress {
    margin-bottom: 1rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.progress-label span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.progress-change {
    font-weight: 700;
    font-size: 0.9rem;
}

.progress-bar-container {
    position: relative;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: visible;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-marker {
    position: absolute;
    top: -2px;
    width: 4px;
    height: 28px;
    background: var(--primary-color);
    transform: translateX(-50%);
    border-radius: 2px;
    cursor: pointer;
}

.progress-marker.entry-marker {
    background: #ef4444;
    z-index: 10;
}

.marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    margin-bottom: 4px;
    transition: opacity 0.2s;
}

.progress-marker:hover .marker-tooltip {
    opacity: 1;
}

/* Analytics Details */
.analytics-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.analytics-details .detail-row {
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.analytics-details .detail-row.highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid var(--primary-color);
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-value {
        font-size: 1rem;
    }
}

/* Advanced Analytics Styles */
.analytics-container {
    margin-top: 2rem;
}

.analytics-section {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.analytics-section h3 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Consistency Score Display */
.consistency-display {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-lg);
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.score-value.consistency-excellent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.score-value.consistency-very-good {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.score-value.consistency-good {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.score-value.consistency-fair {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.score-value.consistency-poor {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.score-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.score-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-details .detail-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.score-details .detail-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.score-details .detail-value {
    color: var(--text-primary);
    font-weight: 700;
}

/* Heat Map Grid */
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.heatmap-cell {
    aspect-ratio: 1;
    padding: 1rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.heatmap-cell:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.heatmap-cell.very-strong {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.heatmap-cell.strong {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.heatmap-cell.moderate {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.heatmap-cell.weak {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.heatmap-cell.very-weak {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.month-name {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.month-return {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.month-winrate {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Heat Map Legend */
.heatmap-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.very-strong {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.legend-color.strong {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.legend-color.moderate {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.legend-color.weak {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.legend-color.very-weak {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.insight-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all 0.2s;
}

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

.insight-card.positive {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: #10b981;
}

.insight-card.negative {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: #ef4444;
}

.insight-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.insight-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.insight-detail {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .consistency-display {
        flex-direction: column;
    }

    .heatmap-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .heatmap-cell {
        padding: 0.75rem;
    }

    .month-name {
        font-size: 0.75rem;
    }

    .month-return {
        font-size: 1rem;
    }

    .month-winrate {
        font-size: 0.7rem;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   CORRELATION MATRIX STYLES
   =================================== */

.correlation-controls {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.control-section {
    margin-bottom: 2rem;
}

.control-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 1rem;
}

.mode-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: var(--primary-color);
}

/* Symbol Selector */
.symbol-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius-md);
}

.symbol-checkbox {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.symbol-checkbox:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.symbol-checkbox input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.symbol-label {
    font-size: 0.9rem;
}

.symbol-label strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Years Selector */
.years-selector {
    display: flex;
    gap: 1rem;
}

.years-selector label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.years-selector label:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.years-selector input[type="radio"] {
    margin-right: 0.5rem;
}

.years-selector input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Results Container */
#resultsContainer {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.results-header {
    margin-bottom: 2rem;
}

.results-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.results-header .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--radius-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-color {
    width: 30px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.strong-positive {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.legend-color.moderate-positive {
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%);
}

.legend-color.neutral {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.legend-color.moderate-negative {
    background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
}

.legend-color.strong-negative {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Correlation Matrix Table */
.correlation-matrix-container {
    margin-bottom: 2rem;
    overflow-x: auto;
}

.correlation-matrix-container h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.correlation-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    margin-top: 1rem;
}

.correlation-table th {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
}

.correlation-table th.ticker-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 0.85rem;
    line-height: 1.3;
}

.correlation-table .ticker-name {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 2px;
}

.correlation-cell {
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.correlation-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.correlation-cell.diagonal {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    opacity: 0.5;
}

.correlation-cell.strong-positive {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.correlation-cell.moderate-positive {
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 100%);
    color: #1f2937;
}

.correlation-cell.neutral {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #1f2937;
}

.correlation-cell.moderate-negative {
    background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
}

.correlation-cell.strong-negative {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Strong Correlations List */
#strongCorrelationsContainer {
    margin-bottom: 2rem;
}

#strongCorrelationsContainer h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.strong-correlations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.strong-correlation-item {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid #e9ecef;
    transition: all 0.2s;
}

.strong-correlation-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.strong-correlation-item.positive-correlation {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: #10b981;
}

.strong-correlation-item.negative-correlation {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: #ef4444;
}

.correlation-pair {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.correlation-pair .ticker {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.correlation-names {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.correlation-icon {
    font-size: 1.2rem;
    color: #6b7280;
}

.correlation-value {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.positive-correlation .correlation-value {
    color: #059669;
}

.negative-correlation .correlation-value {
    color: #dc2626;
}

.correlation-strength {
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: capitalize;
}

/* Interpretation Guide */
.interpretation-guide {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.interpretation-guide h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.interpretation-guide ul {
    list-style: none;
    padding: 0;
}

.interpretation-guide li {
    padding: 0.5rem 0;
    line-height: 1.6;
}

.interpretation-guide strong {
    color: var(--primary-color);
}

/* Loading and Error States */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-indicator p {
    margin-top: 1rem;
    color: #6b7280;
}

.error-container {
    padding: 1.5rem;
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: var(--radius-md);
    color: #991b1b;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mode-selector {
        flex-direction: column;
    }

    .symbol-selector {
        grid-template-columns: 1fr;
        max-height: 300px;
    }

    .years-selector {
        flex-direction: column;
    }

    .correlation-table {
        font-size: 0.75rem;
    }

    .correlation-cell {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .strong-correlations-list {
        grid-template-columns: 1fr;
    }

    .results-header .legend {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===================================
   SIMILAR SYMBOLS WIDGET
   =================================== */

.similar-symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.similar-symbol-card {
    display: block;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    cursor: pointer;
}

.similar-symbol-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.similar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.similar-ticker {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.correlation-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.correlation-badge.positive {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    color: #059669;
    border: 1px solid #10b981;
}

.correlation-badge.negative {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.2) 100%);
    color: #dc2626;
    border: 1px solid #ef4444;
}

.similar-name {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.similar-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.correlation-type {
    font-size: 0.85rem;
    color: #4b5563;
}

.strength-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.strength-badge.very-strong {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.strength-badge.strong {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.strength-badge.moderate {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.strength-badge.weak {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    color: white;
}

.strength-badge.very-weak {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #374151;
}

.similar-category {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
}

.section-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    padding: 2rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .similar-symbols-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   YEAR-OVER-YEAR COMPARISON
   =================================== */

.yoy-comparison {
    margin-top: 1.5rem;
}

.yoy-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.yoy-stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid #e9ecef;
    text-align: center;
    transition: all 0.2s;
}

.yoy-stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.yoy-stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.yoy-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.yoy-stat-value.positive {
    color: #059669;
}

.yoy-stat-value.negative {
    color: #dc2626;
}

.yoy-stat-value.neutral {
    color: #6b7280;
}

.yoy-stat-value.performance-significantly-above-average {
    color: #059669;
    font-size: 1.1rem;
}

.yoy-stat-value.performance-above-average {
    color: #10b981;
    font-size: 1.1rem;
}

.yoy-stat-value.performance-on-track {
    color: #3b82f6;
    font-size: 1.1rem;
}

.yoy-stat-value.performance-below-average {
    color: #f59e0b;
    font-size: 1.1rem;
}

.yoy-stat-value.performance-significantly-below-average {
    color: #dc2626;
    font-size: 1.1rem;
}

.yoy-chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid #e9ecef;
}

.yoy-chart-container canvas {
    max-height: 400px;
}

@media (max-width: 1024px) {
    .yoy-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .yoy-stats {
        grid-template-columns: 1fr;
    }

    .yoy-stat-value {
        font-size: 1.25rem;
    }

    .yoy-chart-container {
        padding: 1rem;
    }
}

/* Market Regime Banner */
.market-regime-banner {
    margin: 20px 0 30px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.regime-loading {
    padding: 20px;
    text-align: center;
    background: white;
    color: #6b7280;
}

.regime-content {
    padding: 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
}

.regime-bull {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.regime-bear {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.regime-neutral {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.regime-icon {
    font-size: 3rem;
    line-height: 1;
}

.regime-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.regime-info p {
    margin: 0;
    opacity: 0.95;
    font-size: 0.95rem;
}

.regime-indices {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.regime-index {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.regime-index strong {
    min-width: 100px;
}

.regime-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.regime-badge.bull {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.regime-badge.bear {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.regime-badge.neutral {
    background: rgba(139, 92, 246, 0.9);
    color: white;
}

.regime-index .confidence {
    margin-left: auto;
    opacity: 0.9;
    font-size: 0.8rem;
}

@media (max-width: 968px) {
    .regime-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .regime-icon {
        text-align: center;
    }

    .regime-indices {
        gap: 8px;
    }

    .regime-index {
        flex-wrap: wrap;
    }
}

/* Regime Comparison Page */
.regime-comparison-controls {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.symbol-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f9fafb;
    border-radius: var(--radius-md);
}

.regime-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.regime-comparison-table thead tr:first-child th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 12px;
    font-weight: 600;
}

.regime-comparison-table thead tr:nth-child(2) th {
    background: #f3f4f6;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

.regime-header {
    text-align: center;
}

.bull-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.bear-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.regime-comparison-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

.regime-comparison-table tbody tr:hover {
    background: #f9fafb;
}

.regime-comparison-table tbody td {
    padding: 12px;
    text-align: center;
}

.regime-comparison-table tbody td:nth-child(1),
.regime-comparison-table tbody td:nth-child(2) {
    text-align: left;
}

.advantage-bull {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-weight: 600;
}

.advantage-bear {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    font-weight: 600;
}

.advantage-neutral {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    font-weight: 600;
}

.insights-section {
    margin-top: 2rem;
}

.insights-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.insight-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.insight-card.bull {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #10b981;
}

.insight-card.bear {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 4px solid #ef4444;
}

.insight-card.defensive {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
}

.insight-card.neutral {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-left: 4px solid #8b5cf6;
}

.insight-card h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.insight-card p {
    margin: 0 0 0.75rem 0;
    color: #6b7280;
}

.insight-card ul {
    margin: 0;
    padding-left: 1.25rem;
}

.insight-card li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.ticker-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
}

.ticker-link:hover {
    text-decoration: underline;
}

/* Alerts Page */
.alerts-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alerts-filter {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f3f4f6;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.alerts-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.unread-badge {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    border-left: 4px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.alert-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.alert-card.unread {
    background: #f0f9ff;
    border-left-color: #3b82f6;
}

.alert-card.seasonal-entry {
    border-left-color: #10b981;
}

.alert-card.seasonal-exit {
    border-left-color: #f59e0b;
}

.alert-card.regime-change {
    border-left-color: #8b5cf6;
}

.alert-card.opportunity {
    border-left-color: #eab308;
}

.alert-icon {
    font-size: 2rem;
    line-height: 1;
}

.alert-content {
    flex: 1;
}

.alert-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.alert-type {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.alert-symbol {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.alert-time {
    margin-left: auto;
    color: #9ca3af;
    font-size: 0.85rem;
}

.alert-message {
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.alert-symbol-name {
    color: #6b7280;
    font-size: 0.85rem;
}

.alert-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-mark-read {
    padding: 0.25rem 0.75rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-mark-read:hover {
    background: #2563eb;
}

.btn-delete {
    padding: 0.25rem 0.75rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.btn-delete:hover {
    background: #dc2626;
}

.loading-state, .error-state {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.loading-state .spinner {
    margin: 0 auto 1rem;
}

.loading-state p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.loading-subtext {
    font-size: 0.875rem;
    color: #9ca3af;
    font-style: italic;
}

@media (max-width: 768px) {
    .alerts-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .alerts-filter {
        width: 100%;
        flex-wrap: wrap;
    }

    .filter-btn {
        flex: 1;
        min-width: 100px;
    }

    .alert-card {
        flex-direction: column;
    }

    .alert-actions {
        flex-direction: row;
    }
}

/* ============================================
   Seasonal Calendar Styles
   ============================================ */

.calendar-controls {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.calendar-filters {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.filter-select:hover {
    border-color: var(--primary-light);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.calendar-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.calendar-stats .stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    color: white;
}

.calendar-stats .stat-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
}

.calendar-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.opportunity-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

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

.opportunity-card.strength-very-strong {
    border-left: 6px solid #10b981;
}

.opportunity-card.strength-strong {
    border-left: 6px solid #3b82f6;
}

.opportunity-card.strength-moderate {
    border-left: 6px solid #f59e0b;
}

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

.opportunity-symbol h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.opportunity-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
}

.strength-badge {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strength-badge.strength-very-strong {
    background: #d1fae5;
    color: #065f46;
}

.strength-badge.strength-strong {
    background: #dbeafe;
    color: #1e40af;
}

.strength-badge.strength-moderate {
    background: #fef3c7;
    color: #92400e;
}

.opportunity-category {
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.opportunity-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.positive {
    color: #10b981;
}

.metric-value.high {
    color: #10b981;
}

.metric-value.medium {
    color: #3b82f6;
}

.metric-value.low {
    color: #f59e0b;
}

.opportunity-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.value-indicator {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.value-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.value-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.value-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Calendar Price Projections */
.opportunity-price-projection {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.price-projection-header {
    text-align: center;
    margin-bottom: 0.75rem;
}

.price-projection-header .price-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-projection-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.price-current,
.price-target {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    text-align: center;
}

.price-label-small {
    font-size: 0.7rem;
    color: #166534;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #15803d;
}

.price-arrow-large {
    font-size: 1.5rem;
    color: #16a34a;
    font-weight: 700;
}

.opportunity-price-projection .price-change {
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
}

.opportunity-price-projection .price-change.positive {
    background: #d1fae5;
    color: #065f46;
}

.opportunity-price-projection .price-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

.opportunity-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .opportunities-grid {
        grid-template-columns: 1fr;
    }

    .calendar-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .metric-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Data Management Admin Styles
   ============================================ */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-stats .stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: none;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.admin-stats .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.admin-stats .stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.admin-stats .stat-value {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
}

.admin-stats .stat-value.stat-positive {
    color: #a7f3d0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-controls {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.control-group {
    margin-bottom: 2rem;
}

.control-group h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-spinner {
    display: inline-block;
}

.filter-select,
.search-input {
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-input {
    min-width: 250px;
    margin-left: 1rem;
}

.symbols-table-container {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.symbols-table {
    width: 100%;
    border-collapse: collapse;
}

.symbols-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.symbols-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.symbols-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.symbols-table tbody tr:hover {
    background-color: var(--bg-secondary);
}

.symbols-table td {
    padding: 1rem;
    font-size: 0.95rem;
}

.symbol-ticker {
    font-weight: 700;
    color: var(--primary-color);
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.status-active {
    background: #10b981;
    color: white;
}

.status-badge.status-inactive {
    background: #6b7280;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-icon {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.last-updated .timestamp {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.last-updated .no-data {
    color: var(--text-light);
    font-style: italic;
}

.last-updated .loading-text {
    color: var(--text-light);
    font-size: 0.85rem;
}

.last-updated .error {
    color: var(--danger-color);
}

.progress-info {
    padding: 1.5rem;
}

.progress-info p {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

#progressCount {
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .search-input {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }

    .symbols-table {
        font-size: 0.85rem;
    }

    .symbols-table th,
    .symbols-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Price Projections */
.price-projections-container {
    margin: 2rem 0;
}

.projections-header {
    margin-bottom: 1.5rem;
}

.projections-header h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-description {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
}

.projections-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.projection-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.projection-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 1.5rem;
    color: white;
}

.projection-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.projection-items {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.projection-item {
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 1rem;
    background: #f9fafb;
    transition: transform 0.2s, box-shadow 0.2s;
}

.projection-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.projection-timeframe {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    text-align: center;
}

.projection-prices {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.price-current,
.price-target {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.price-arrow {
    font-size: 1.5rem;
    font-weight: bold;
}

.price-arrow.positive {
    color: #10b981;
}

.price-arrow.negative {
    color: #ef4444;
}

.price-arrow.neutral {
    color: #6b7280;
}

.projection-change {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.75rem;
    border-radius: var(--radius-md);
}

.projection-change.positive {
    background: #d1fae5;
    color: #065f46;
}

.projection-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

.projection-change.neutral {
    background: #f3f4f6;
    color: #374151;
}

.change-dollars {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.8;
    display: block;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .projection-items {
        grid-template-columns: 1fr;
    }

    .price-value {
        font-size: 1.1rem;
    }

    .projection-change {
        font-size: 1rem;
    }
}

/* Screener Price Target Cell */
.price-target-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.price-current,
.price-target-value {
    font-weight: 600;
    color: #1f2937;
}

.price-arrow {
    color: #9ca3af;
    font-weight: bold;
}

.price-change {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.price-change.positive-return {
    background: #d1fae5;
    color: #065f46;
}

.price-change.negative-return {
    background: #fee2e2;
    color: #991b1b;
}

.no-data {
    color: #9ca3af;
    font-style: italic;
}

/* ============================================
   Event Calendar Styles
   ============================================ */

.event-calendar-page {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.event-calendar-page h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.event-calendar-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.control-group select,
.control-group input[type="number"] {
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    min-width: 180px;
    transition: border-color 0.2s;
}

.control-group select:focus,
.control-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Events Section */
.events-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.events-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.events-timeline {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-height: 200px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.event-type-group {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
}

.event-type-header {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.event-item {
    display: grid;
    grid-template-columns: 120px 1fr 100px;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.event-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.event-item.soon {
    border-left-color: var(--danger-color);
    background: #fef2f2;
}

.event-item.upcoming {
    border-left-color: var(--accent-color);
}

.event-item.future {
    border-left-color: var(--text-light);
}

.event-date {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.event-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-name {
    font-weight: 600;
    color: var(--text-primary);
}

.event-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.event-countdown {
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Analysis Section */
.analysis-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.analysis-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.analysis-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.analysis-results {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-height: 150px;
}

.analysis-summary {
    margin-bottom: 1.5rem;
}

.analysis-summary h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.summary-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pattern-table {
    overflow-x: auto;
    margin-top: 1rem;
}

.pattern-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.pattern-table th {
    background: var(--bg-tertiary);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.pattern-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.pattern-table td.positive {
    color: var(--secondary-color);
    font-weight: 600;
}

.pattern-table td.negative {
    color: var(--danger-color);
    font-weight: 600;
}

#chartContainer {
    margin-top: 2rem;
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

/* Opportunities Section */
.opportunities-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.opportunities-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.opportunities-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.opportunities-controls .btn-primary {
    color: white !important;
}

.opportunities-results {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-height: 150px;
}

.opportunities-header {
    margin-bottom: 1rem;
}

.opportunities-header p {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.opportunities-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.opportunities-table th {
    background: var(--bg-tertiary);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.opportunities-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.opportunities-table tr:hover {
    background: var(--bg-secondary);
}

.opportunities-table .positive {
    color: var(--secondary-color);
    font-weight: 600;
}

.opportunities-table .negative {
    color: var(--danger-color);
    font-weight: 600;
}

.opportunities-table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.opportunities-table a:hover {
    text-decoration: underline;
}

/* Utility Classes */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.error {
    background: #fef2f2;
    color: #991b1b;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--danger-color);
}

.info-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-calendar-controls,
    .analysis-controls,
    .opportunities-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group select,
    .control-group input[type="number"] {
        min-width: 100%;
    }

    .event-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .event-countdown {
        text-align: left;
    }

    .summary-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .opportunities-table {
        font-size: 0.875rem;
    }

    .opportunities-table th,
    .opportunities-table td {
        padding: 0.5rem;
    }
}

/* ============================================
   Alert Modal Styles
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 600px;
}

.modal-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    margin: 0;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

/* ============================================
   Advanced Statistics Display
   ============================================ */

.stat-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.confidence-stars {
    font-size: 1.1rem;
    color: #f59e0b;
    letter-spacing: 2px;
    cursor: help;
    user-select: none;
}

.significance-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.advanced-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.advanced-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.advanced-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.advanced-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.advanced-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.advanced-stat-hint {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: help;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.advanced-stat-hint:hover {
    opacity: 1;
}

.statistical-details {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    background: var(--bg-secondary);
}

.statistical-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    user-select: none;
    padding: 0.25rem;
}

.statistical-details summary:hover {
    color: var(--primary-color);
}

.statistical-details[open] summary {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.detailed-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.detailed-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.detailed-stat span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.detailed-stat span:last-child {
    color: var(--text-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .advanced-stats-row {
        grid-template-columns: 1fr;
    }

    .detailed-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Sticky columns for screener table */
.screener-table th:nth-child(1),
.screener-table td:nth-child(1) {
    position: sticky;
    left: 0;
    background: white;
    z-index: 10;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.screener-table th:nth-child(2),
.screener-table td:nth-child(2) {
    position: sticky;
    left: 120px; /* Width of first column */
    background: white;
    z-index: 10;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.screener-table thead th:nth-child(1),
.screener-table thead th:nth-child(2) {
    z-index: 11; /* Header needs to be above body cells */
}

/* Ensure table wrapper allows horizontal scroll */
.table-wrapper {
    overflow-x: auto;
    position: relative;
}
/* Fix readability for Price Projections and Statistics sections */
.price-projections-container {
    background: white !important;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.projections-header h3,
.stats-header h3 {
    color: #1f2937 !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.projections-header .section-description,
.stats-header .section-description {
    color: #6b7280 !important;
    font-size: 0.95rem;
}

.statistics-grid .stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%) !important;
    padding: 1.75rem !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    display: block !important;
    text-align: left !important;
    color: inherit !important;
    transition: all 0.3s;
}

.statistics-grid .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl) !important;
}

.statistics-grid .stat-card-header h4 {
    color: #1f2937 !important;
}

.statistics-grid .stat-label,
.statistics-grid .stat-value,
.statistics-grid .stat-detail {
    color: inherit !important;
}
/* Sticky columns for screener table - FIXED VERSION */
.screener-table th:nth-child(1),
.screener-table td:nth-child(1) {
    position: sticky !important;
    left: 0 !important;
    background: white !important;
    z-index: 10 !important;
    min-width: 100px;
    max-width: 100px;
}

.screener-table th:nth-child(2),
.screener-table td:nth-child(2) {
    position: sticky !important;
    left: 100px !important;
    background: white !important;
    z-index: 10 !important;
    min-width: 200px;
}

.screener-table thead th:nth-child(1),
.screener-table thead th:nth-child(2) {
    z-index: 11 !important;
    background: #f9fafb !important;
}

/* Add shadow to show sticky effect */
.screener-table th:nth-child(2)::after,
.screener-table td:nth-child(2)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Baskets Management Page
   ============================================ */

.baskets-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

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

.page-header h2 {
    margin: 0;
    font-size: 2rem;
    color: var(--text-primary);
}

.page-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
    flex-basis: 100%;
}

.basket-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.basket-stats .stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: white;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.basket-stats .stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.basket-stats .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.basket-tabs {
    display: flex;
    gap: 0;
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 0.375rem;
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    flex: 1;
    min-width: max-content;
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.05);
}

.tab-btn.active {
    color: white;
    background: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.baskets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.basket-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

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

.basket-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.basket-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-system {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-public {
    background: #10b981;
    color: white;
}

.basket-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0 0 1rem 0;
    min-height: 2.5em;
}

.basket-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.symbol-count {
    font-weight: 600;
    color: var(--primary-color);
}

.basket-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.btn-danger:hover {
    background: #c81e1e;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
    min-width: 120px;
    width: auto;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Removed duplicate - using global .checkbox-label style */

/* Symbol Management */
.add-symbol-section,
.current-symbols-section,
.csv-section {
    margin-bottom: 2rem;
}

.add-symbol-section h4,
.current-symbols-section h4,
.csv-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.symbol-search {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.no-results {
    padding: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.current-symbols-list {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    max-height: 400px;
    overflow-y: auto;
}

.symbol-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.symbol-item:last-child {
    border-bottom: none;
}

.symbol-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.symbol-info strong {
    color: var(--primary-color);
    min-width: 80px;
}

.symbol-info span {
    color: var(--text-secondary);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

.csv-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .baskets-page {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .baskets-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }

    .basket-actions {
        flex-direction: column;
    }

    .basket-actions .btn {
        width: 100%;
    }
}

/* ========================================
   My Symbols Page Styles
   ======================================== */

.my-symbols-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.my-symbols-page .page-header {
    margin-bottom: 2rem;
}

.symbols-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.symbols-stats .stat-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    color: white;
    flex: 1;
    min-width: 200px;
}

.symbols-stats .stat-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
}

.symbols-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.symbols-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.symbols-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.symbols-controls .search-box {
    flex: 2;
}

.symbols-controls .filter-controls {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.symbols-grid-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.symbols-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.symbols-grid-header .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.symbols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    min-height: 400px;
}

.symbol-item {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    transition: all 0.2s ease;
    background: white;
}

.symbol-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.symbol-item.enabled {
    background: linear-gradient(135deg, #f0f4ff 0%, #f3e8ff 100%);
    border-color: var(--primary-color);
}

.symbol-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    width: 100%;
}

.symbol-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.symbol-checkbox input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.symbol-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.symbol-ticker {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.symbol-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.symbol-category {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
    width: fit-content;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.pagination-info {
    font-weight: 600;
    color: var(--text-primary);
}

.pagination .btn {
    min-width: 120px;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 1024px) {
    .symbols-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .symbols-controls {
        flex-direction: column;
    }

    .symbols-controls .search-box,
    .symbols-controls .filter-controls {
        width: 100%;
        flex: none;
    }

    .symbols-stats {
        flex-direction: column;
    }

    .symbols-stats .stat-card {
        width: 100%;
    }

    .symbols-actions {
        width: 100%;
        margin-left: 0;
    }

    .symbols-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .pagination .btn {
        width: 100%;
    }
}

/* ============================================
   Full-Page Loading Overlay
   ============================================ */
.full-page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.loading-content {
    position: relative;
    z-index: 10000;
    background: white;
    padding: 3rem 4rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 500px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border: 6px solid #f3f4f6;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.loading-note {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
}

/* ============================================
   Trade Signals Page
   ============================================ */
.signal-lookup {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.lookup-controls {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.signal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e5a8e 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.signal-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.signal-meta {
    display: flex;
    gap: 2rem;
    opacity: 0.9;
}

.price-position-card {
    background: white;
    padding: 1.5rem;
    border-left: 3px solid var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.trade-signal-card {
    background: white;
    padding: 2rem;
    border-left: 3px solid var(--primary-color);
    border-right: 3px solid var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    border-radius: 0 0 8px 8px;
    margin-bottom: 2rem;
}

.signal-type-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.signal-strong-buy {
    background: #1b5e20;
    color: white;
}

.signal-buy {
    background: #2e7d32;
    color: white;
}

.signal-hold {
    background: #757575;
    color: white;
}

.signal-sell {
    background: #c62828;
    color: white;
}

.signal-strong-sell {
    background: #b71c1c;
    color: white;
}

.signal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.signal-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signal-label {
    font-weight: 600;
    color: #666;
}

.signal-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.signal-reasons {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.signal-reasons h4 {
    margin-bottom: 1rem;
    color: #333;
}

.signal-reasons ul {
    list-style: none;
    padding: 0;
}

.signal-reasons li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
}

.signal-reasons li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 1.5rem;
}

.signal-recommendation {
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.signal-recommendation h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #333;
}

.signal-recommendation p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
}

.target-prices-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.target-prices-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
}

.targets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.target-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #ccc;
    transition: all 0.3s ease;
}

.target-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.target-header {
    font-size: 1rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.target-price {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.target-change {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.target-change.positive {
    color: #2e7d32;
}

.target-change.negative {
    color: #c62828;
}

.target-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.target-confidence {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.target-confidence:contains("HIGH") {
    background: #c8e6c9;
    color: #1b5e20;
}

.forward-outlook,
.backtesting-context {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.forward-outlook h4,
.backtesting-context h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
}

.outlook-stats,
.backtest-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.outlook-item,
.backtest-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.outlook-label,
.backtest-label {
    font-weight: 600;
    color: #666;
}

.outlook-value,
.backtest-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #c62828;
    margin-bottom: 1.5rem;
}

.loading-message {
    background: #e3f2fd;
    color: var(--primary-color);
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .lookup-controls {
        grid-template-columns: 1fr;
    }

    .signal-details {
        grid-template-columns: 1fr;
    }

    .targets-grid {
        grid-template-columns: 1fr;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Auth Pages - Alert Messages
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-weight: 500;
    border-left: 4px solid;
    animation: slideIn 0.3s ease-out;
}

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

.alert-error {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
}

.alert-error::before {
    content: "⚠️ ";
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.alert-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.alert-success::before {
    content: "✓ ";
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Auth container and card */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

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

.auth-card h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.75rem;
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Auth Form - Terms Checkbox */
.checkbox-group {
    margin: 1.5rem 0;
}

/* Removed duplicate - using global .checkbox-label style */

.checkbox-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.checkbox-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* ============================================
   Premium Required Badge (Symbol Page)
   ============================================ */
.premium-required-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: help;
    border: 2px solid #f59e0b;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    transition: all 0.3s ease;
}

.premium-required-badge:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}


/* Range Selection Panel */
.range-selection-panel {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.range-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
}

.range-info {
    margin-bottom: 20px;
}

.range-dates {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.range-label {
    font-weight: 600;
    color: #666;
}

.range-text {
    color: #007bff;
    font-weight: 600;
    font-size: 1.1rem;
}

.range-statistics-grid {
    display: grid;
    gap: 20px;
}

.range-stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.range-stat-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.direction-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.direction-banner.positive {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
}

.direction-banner.negative {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #dc3545;
}

.direction-arrow {
    font-size: 1.5rem;
    font-weight: bold;
}

.direction-label {
    font-size: 1.1rem;
}

.projection-note {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin: 0 0 15px 0;
}

.error-message {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    text-align: center;
}

/* Chart cursor changes */
#seasonalityChart {
    cursor: default;
}

#seasonalityChart:hover {
    cursor: crosshair;
}

/* Additional styles for range selection stats */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.stat-value.positive {
    color: #28a745;
}

.stat-value.negative {
    color: #dc3545;
}

/* Pattern Scanner Styles */
.pattern-scanner-section {
    margin-top: 10px;
}

.patterns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.pattern-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pattern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pattern-card.positive {
    border-left: 4px solid #28a745;
}

.pattern-card.positive:hover {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #ffffff 100%);
}

.pattern-card.negative {
    border-left: 4px solid #dc3545;
}

.pattern-card.negative:hover {
    border-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #ffffff 100%);
}

.pattern-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pattern-direction {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pattern-direction.positive {
    color: #28a745;
}

.pattern-direction.negative {
    color: #dc3545;
}

.pattern-dates {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #333;
}

.pattern-duration {
    font-size: 0.85rem;
    color: #666;
    margin-left: 5px;
}

.pattern-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.pattern-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pattern-stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pattern-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.pattern-stat-value.positive {
    color: #28a745;
}

.pattern-stat-value.negative {
    color: #dc3545;
}

.pattern-score {
    font-size: 0.85rem;
    color: #888;
    text-align: right;
    font-style: italic;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.projection-info {
    margin-top: 10px;
}
