/* DITM Screener - Styles (Dark Theme) */

:root {
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #1a1f2e;
    --surface: #313d50;
    --border: #374151;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
/* Modern Professional Header */
.main-header {
    background: linear-gradient(to right, #0f1419 0%, #1a1f2e 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

/* Brand Section */
.header-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    transition: opacity 0.2s;
    padding: 0.5rem 0;
}

.brand-link:hover {
    opacity: 0.8;
}

.brand-icon {
    font-size: 1.75rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.brand-name {
    font-weight: 800;
    font-size: 1.125rem;
    letter-spacing: 0.5px;
}

.brand-tagline {
    font-size: 0.65rem;
    color: #93c5fd;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    margin: 0 2rem;
}

.nav-section {
    display: flex;
    gap: 0;
    align-items: center;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
}

.nav-primary {
    border-bottom: 2px solid transparent;
}

.nav-primary:hover {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

.nav-primary.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-toggle {
    padding: 0.5rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-dropdown-toggle:hover {
    color: #60a5fa;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: #374151;
    color: #60a5fa;
    padding-left: 1.25rem;
}

.dropdown-item:first-child {
    border-radius: 0.375rem 0.375rem 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Admin Navigation */
.nav-admin {
    margin-left: auto;
}

.nav-admin-link {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-radius: 0.375rem;
}

.nav-admin-link:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

/* User Section */
.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.user-badge {
    font-size: 0.875rem;
    color: #d1d5db;
    font-weight: 500;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin: 0 -0.5rem 0 1rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #e5e7eb;
    transition: all 0.3s;
    border-radius: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Old Header Styles (backward compatibility) */
header {
    background: linear-gradient(to right, #0f1419 0%, #1a1f2e 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.header-info {
    margin-top: 1rem;
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.header-content {
    flex: 1;
}

.main-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-hover);
}

/* Detail Page Title Section */
.detail-page-header {
    background: linear-gradient(to right, #0f1419 0%, #1a1f2e 100%);
    color: white;
    padding: 1rem 0 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-page-header .back-link {
    margin-bottom: 0.75rem;
}

.detail-page-header h1 {
    font-size: 1.75rem;
    margin: 0.25rem 0 0;
    font-weight: 700;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Filters Section */
.filters-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.filters-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    align-items: end;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: #1f2937;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.filter-select:hover {
    border-color: var(--primary-color);
    background-color: #374151;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.filter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: #1f2937;
    transition: all 0.2s;
}

.filter-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.filter-input:hover {
    border-color: var(--primary-color);
    background-color: #374151;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* Remove spinner arrows from number input */
.filter-input::-webkit-outer-spin-button,
.filter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.filter-input[type=number] {
    -moz-appearance: textfield;
}

/* Search input with icon */
#symbol-search {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M7 12C9.76142 12 12 9.76142 12 7C12 4.23858 9.76142 2 7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12Z' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M13.9999 14L10.6499 10.65' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    padding-left: 2.75rem;
}

#symbol-search:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M7 12C9.76142 12 12 9.76142 12 7C12 4.23858 9.76142 2 7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12Z' stroke='%2360a5fa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M13.9999 14L10.6499 10.65' stroke='%2360a5fa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.filter-actions .btn {
    width: 100%;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #0f1419;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

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

.btn-secondary:hover {
    background: #4b5563;
}

.btn-verify {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3), 0 2px 4px -1px rgba(16, 185, 129, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-verify:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4), 0 4px 6px -2px rgba(16, 185, 129, 0.3);
}

.btn-verify:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3), 0 2px 4px -1px rgba(16, 185, 129, 0.2);
}

.btn-verify:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.verify-icon {
    font-size: 1.2rem;
    display: inline-block;
    transition: transform 0.3s;
}

.btn-verify:hover .verify-icon {
    transform: rotate(180deg);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
}

/* Opportunities Section */
.opportunities-section {
    margin: 2rem 0 4rem 0;
}

.opportunities-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

/* Opportunity Card */
.opportunity-card {
    background: var(--surface);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

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

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

.card-ticker-section {
    flex: 1;
    min-width: 0;
}

.card-ticker {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.25rem;
}

.card-company-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-sector {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.8;
    padding: 0.15rem 0.5rem;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 0.25rem;
    display: inline-block;
    margin-top: 0.25rem;
}

.position-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #dc2626;
    margin-left: 0.25rem;
    cursor: help;
    animation: pulse 2s infinite;
}

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

.card-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.card-badge {
    background: var(--success-color);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-badge.high-return {
    background: var(--success-color);
}

.card-badge.medium-return {
    background: var(--warning-color);
}

/* High Reward/Risk Tag */
.high-rr-tag {
    display: inline-block;
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.65rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    animation: pulse-red 1.5s ease-in-out infinite;
}

.high-rr-tag-small {
    display: inline-block;
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.6rem;
    font-weight: 600;
    margin-left: 0.25rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    animation: pulse-red 1.5s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% {
        background: rgba(239, 68, 68, 0.2);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        background: rgba(239, 68, 68, 0.35);
        box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.3);
    }
}

/* Probability Badge on Cards */
.probability-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.probability-badge .prob-value {
    font-size: 0.85rem;
    line-height: 1;
}

.probability-badge .prob-label {
    font-size: 0.65rem;
    font-weight: 500;
    opacity: 0.9;
}

.probability-badge.prob-high {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.probability-badge.prob-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid #eab308;
}

.probability-badge.prob-low {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.probability-badge.prob-very-low {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

/* Probability Cell in Table */
.probability-cell {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.probability-cell.prob-high {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.probability-cell.prob-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.probability-cell.prob-low {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.probability-cell.prob-very-low {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.card-price {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-metrics {
    display: grid;
    gap: 0.75rem;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
}

.metric-row:last-child {
    border-bottom: none;
}

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

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

.metric-value.positive {
    color: var(--success-color);
}

.metric-value.highlight {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Loading & Error States */
.loading {
    text-align: center;
    padding: 4rem 2rem;
}

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

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

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.no-results p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Detail Page */
.detail-container {
    padding: 2rem 0;
}

.verify-section {
    margin-bottom: 2rem;
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.verify-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 0.5rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.verify-result.success {
    border-left: 4px solid var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.verify-result.warning {
    border-left: 4px solid var(--warning-color);
    background: rgba(245, 158, 11, 0.05);
}

.verify-result.error {
    border-left: 4px solid var(--danger-color);
    background: rgba(239, 68, 68, 0.05);
}

.detail-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.detail-section h2 {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    font-weight: 600;
}

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

.metric-card {
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    text-align: center;
    background: #1f2937;
}

.metric-card.highlight {
    background: var(--surface);
    border: 1px solid var(--primary-color);
}

.metric-card .metric-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

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

.metric-card.highlight .metric-value {
    color: var(--primary-color);
}

.info-grid {
    display: grid;
    gap: 0.75rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.375rem;
    background: #1f2937;
    border: 1px solid rgba(55, 65, 81, 0.5);
}

.info-label {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.9rem;
}

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

/* Market Regime Detection */
.regime-box {
    background: #1f2937;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.regime-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.regime-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-align: center;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    width: fit-content;
}

.regime-timestamp {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.regime-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.regime-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.regime-interpretation {
    padding: 1rem;
    background: rgba(148, 163, 184, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

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

/* Strategy Summary */
.strategy-summary .strategy-box {
    background: #1f2937;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.strategy-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.strategy-box ol, .strategy-box ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.strategy-box li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

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

.scenario {
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    border: 1px solid var(--border);
    background: #1f2937;
}

.scenario.best {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
}

.scenario.breakeven {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
}

.scenario-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.scenario-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.scenario.best .scenario-value {
    color: var(--success-color);
}

.scenario.breakeven .scenario-value {
    color: var(--warning-color);
}

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

.risk-list {
    list-style: disc;
    margin-left: 1.5rem;
    line-height: 1.8;
}

.risk-list li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: #0f1419;
    color: var(--text-secondary);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .footer-logo {
        height: 50px;
    }

    header h1 {
        font-size: 1.5rem;
    }

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

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

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .card-ticker {
        font-size: 1.25rem;
    }

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

/* Navigation */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.header-content {
    flex: 1;
}

.main-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(96, 165, 250, 0.1);
    border-color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(96, 165, 250, 0.15);
    border-color: var(--primary-color);
    font-weight: 600;
}

/* Chart Sections */
.chart-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
    border: 1px solid var(--border);
}

.chart-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

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

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 1rem;
}

.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.chart-container-half {
    position: relative;
    height: 350px;
}

.chart-container-half h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.chart-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: -0.5rem;
}

/* Chart View Toggle */
.chart-header {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.chart-toggle {
    display: inline-flex;
    background: var(--background);
    border-radius: 0.5rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
}

.chart-toggle-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.chart-toggle-btn:hover {
    color: var(--text-primary);
}

.chart-toggle-btn.active {
    background: var(--primary-color);
    color: white;
}

.chart-view {
    display: none;
}

.chart-view.active {
    display: block;
}

/* Crossover Alerts */
.crossover-alerts {
    margin-bottom: 1.5rem;
}

.crossover-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.crossover-alert.bullish {
    border-left-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.crossover-alert.bearish {
    border-left-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.crossover-alert.neutral {
    border-left-color: var(--primary-color);
    background: rgba(96, 165, 250, 0.1);
}

.crossover-alert strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Ratio Interpretation Box */
.ratio-interpretation {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border);
    background: linear-gradient(135deg, rgba(42, 49, 66, 0.9) 0%, rgba(31, 41, 55, 0.9) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.interpretation-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.interpretation-ratio {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    min-width: 120px;
}

.interpretation-text {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Sentiment-specific colors */
.ratio-interpretation.high-bearish {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(185, 28, 28, 0.15) 100%);
}

.ratio-interpretation.high-bearish .interpretation-ratio {
    color: var(--danger-color);
}

.ratio-interpretation.bearish {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
}

.ratio-interpretation.bearish .interpretation-ratio {
    color: #f59e0b;
}

.ratio-interpretation.balanced {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
}

.ratio-interpretation.balanced .interpretation-ratio {
    color: var(--primary-color);
}

.ratio-interpretation.bullish {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
}

.ratio-interpretation.bullish .interpretation-ratio {
    color: #10b981;
}

.ratio-interpretation.high-bullish {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
}

.ratio-interpretation.high-bullish .interpretation-ratio {
    color: var(--success-color);
}

/* Detail Page Header Ratio Interpretation */
/* Detail Header Metrics Container */
.detail-header-metrics {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.detail-metric-box {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(42, 49, 66, 0.6);
    flex: 1;
    min-width: 250px;
}

.detail-ratio-interpretation {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(42, 49, 66, 0.6);
    display: inline-block;
    max-width: 100%;
}

/* IVR Box Styling */
.detail-metric-box.ivr-high .detail-ratio-value {
    color: #10b981;
}

.detail-metric-box.ivr-high .detail-ratio-badge {
    background: #10b981;
    color: #0f1419;
}

.detail-metric-box.ivr-elevated .detail-ratio-value {
    color: #14b8a6;
}

.detail-metric-box.ivr-elevated .detail-ratio-badge {
    background: #14b8a6;
    color: #0f1419;
}

.detail-metric-box.ivr-normal .detail-ratio-value {
    color: var(--primary-color);
}

.detail-metric-box.ivr-normal .detail-ratio-badge {
    background: var(--primary-color);
    color: #0f1419;
}

.detail-metric-box.ivr-low .detail-ratio-value {
    color: #f59e0b;
}

.detail-metric-box.ivr-low .detail-ratio-badge {
    background: #f59e0b;
    color: #0f1419;
}

.detail-interpretation-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.detail-ratio-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-ratio-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.detail-ratio-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--primary-color);
    color: #0f1419;
}

.detail-interpretation-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Sentiment-specific badge colors for detail header */
.detail-ratio-interpretation.high-bearish .detail-ratio-value {
    color: var(--danger-color);
}

.detail-ratio-interpretation.high-bearish .detail-ratio-badge {
    background: var(--danger-color);
    color: white;
}

.detail-ratio-interpretation.bearish .detail-ratio-value {
    color: #f59e0b;
}

.detail-ratio-interpretation.bearish .detail-ratio-badge {
    background: #f59e0b;
    color: #0f1419;
}

.detail-ratio-interpretation.balanced .detail-ratio-value {
    color: var(--primary-color);
}

.detail-ratio-interpretation.balanced .detail-ratio-badge {
    background: var(--primary-color);
    color: #0f1419;
}

.detail-ratio-interpretation.bullish .detail-ratio-value {
    color: #10b981;
}

.detail-ratio-interpretation.bullish .detail-ratio-badge {
    background: #10b981;
    color: #0f1419;
}

.detail-ratio-interpretation.high-bullish .detail-ratio-value {
    color: var(--success-color);
}

.detail-ratio-interpretation.high-bullish .detail-ratio-badge {
    background: var(--success-color);
    color: #0f1419;
}

/* Responsive - Charts */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .chart-container {
        height: 300px;
    }

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

    .chart-container-half {
        height: 280px;
    }

    .interpretation-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .interpretation-ratio {
        font-size: 2.5rem;
        min-width: auto;
    }

    .interpretation-text {
        font-size: 1.1rem;
    }
}

/* Trade Tracker Styles */
.action-section {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    align-items: center;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-success {
    background: var(--success-color);
    color: white;
    font-weight: 600;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    font-weight: 600;
}

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

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

/* Tabs */
.tabs-section {
    margin: 2rem 0 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    flex: 1;
    min-width: 300px;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    position: relative;
    bottom: -2px;
}

.tab-button:hover {
    color: var(--primary-color);
    background: rgba(96, 165, 250, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

/* Account Filter */
.account-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.account-filter label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.account-filter select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.account-filter select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Trades Grid */
.trades-section {
    margin: 2rem 0 4rem 0;
}

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

/* Trade Card */
.trade-card {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

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

.trade-card.open {
    border-left: 4px solid var(--success-color);
}

.trade-card.closed {
    border-left: 4px solid var(--secondary-color);
}

.trade-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.trade-ticker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.trade-ticker strong {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.trade-status {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-open {
    background: var(--success-color);
    color: white;
}

.status-closed {
    background: var(--secondary-color);
    color: white;
}

.trade-account {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-left: 0.5rem;
}

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

.trade-dates small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

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

.trade-current-prices {
    background: rgba(96, 165, 250, 0.05);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.trade-exit-prices {
    background: rgba(107, 114, 128, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.trade-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .trade-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

.calculations-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(31, 41, 55, 0.3);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .calculations-summary {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* Risk/Reward Ratio Animations */
@keyframes glowGreenBlue {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.6), inset 0 0 10px rgba(16, 185, 129, 0.3);
        background: rgba(16, 185, 129, 0.1);
    }
    50% {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.6), inset 0 0 15px rgba(59, 130, 246, 0.3);
        background: rgba(59, 130, 246, 0.1);
    }
}

@keyframes pulsePinkRed {
    0%, 100% {
        box-shadow: 0 0 10px rgba(236, 72, 153, 0.6), inset 0 0 10px rgba(236, 72, 153, 0.3);
        background: rgba(236, 72, 153, 0.1);
    }
    50% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.6), inset 0 0 15px rgba(239, 68, 68, 0.3);
        background: rgba(239, 68, 68, 0.1);
    }
}

.metric-item.ratio-good {
    animation: glowGreenBlue 2s ease-in-out infinite;
}

.metric-item.ratio-bad {
    animation: pulsePinkRed 2s ease-in-out infinite;
}

.metric-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(31, 41, 55, 0.5);
    border-radius: 0.375rem;
    border: 1px solid var(--border);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

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

.metric-value.profit {
    color: var(--success-color);
}

.metric-value.loss {
    color: var(--danger-color);
}

.trade-notes {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(31, 41, 55, 0.5);
    border-radius: 0.375rem;
    border-left: 3px solid var(--primary-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.trade-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

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

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

.modal-content {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}

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

.modal-header h2 {
    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;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
}

/* Edit Exit Section */
.edit-exit-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.section-divider {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Live Metrics Display */
.live-metrics-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

/* Backwards compatibility */
.rr-display-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.rr-display {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--card-bg);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.rr-display .rr-label {
    color: var(--text-secondary);
}

.rr-display .rr-value {
    font-size: 1.25rem;
    font-weight: 700;
}

/* High R/R (>5) - Red highlight with pulse */
.rr-display.high-rr {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    animation: pulse-red 1.5s ease-in-out infinite;
}

.rr-display.high-rr .rr-value {
    color: #ef4444;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
    }
}

/* Good R/R (<=5) - Glowing teal */
.rr-display.good-rr {
    background: rgba(20, 184, 166, 0.15);
    border-color: #14b8a6;
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.4);
    animation: glow-teal 2s ease-in-out infinite;
}

.rr-display.good-rr .rr-value {
    color: #14b8a6;
}

@keyframes glow-teal {
    0%, 100% {
        box-shadow: 0 0 15px rgba(20, 184, 166, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(20, 184, 166, 0.7);
    }
}

/* Max Profit Display */
.maxprofit-display {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--card-bg);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.maxprofit-display .maxprofit-label {
    color: var(--text-secondary);
}

.maxprofit-display .maxprofit-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.maxprofit-display.has-value {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

/* Detail Page R/R Card Animations */
.metric-card.rr-high {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid #ef4444;
    animation: rr-glow-red 1.5s ease-in-out infinite;
}

.metric-card.rr-high .metric-value {
    color: #ef4444;
}

@keyframes rr-glow-red {
    0%, 100% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
    }
}

.metric-card.rr-good {
    border: 2px solid #10b981;
    animation: rr-pulse-green-blue 2s ease-in-out infinite;
}

.metric-card.rr-good .metric-value {
    animation: rr-text-green-blue 2s ease-in-out infinite;
}

/* AI Analysis Section */
.ai-analysis-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-icon {
    font-size: 1.2em;
}

.ai-analysis-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
}

.ai-probability-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.ai-probability-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e1e2e, #2a2a3e);
    border: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.ai-probability-circle.prob-high {
    border-color: #10b981;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.ai-probability-circle.prob-medium {
    border-color: #eab308;
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.4);
}

.ai-probability-circle.prob-low {
    border-color: #f59e0b;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
}

.ai-probability-circle.prob-very-low {
    border-color: #ef4444;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
}

.ai-probability-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
}

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

.ai-probability-rating {
    text-align: center;
}

.rating-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--primary);
    color: white;
}

.rating-badge.rating-high {
    background: linear-gradient(135deg, #10b981, #059669);
}

.rating-badge.rating-medium {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: #0f1419;
}

.rating-badge.rating-low {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f1419;
}

.rating-badge.rating-very-low {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.ai-explanation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-explanation h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.ai-explanation-text {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

.ai-factors-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.ai-factors-positive, .ai-factors-negative {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.ai-factors-positive {
    border-left: 3px solid #10b981;
}

.ai-factors-negative {
    border-left: 3px solid #ef4444;
}

.ai-factors-positive h4, .ai-factors-negative h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-factors-positive h4 {
    color: #10b981;
}

.ai-factors-negative h4 {
    color: #ef4444;
}

.ai-factors-positive ul, .ai-factors-negative ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ai-factors-positive li, .ai-factors-negative li {
    margin-bottom: 0.35rem;
}

.ai-factors-positive li {
    color: #6ee7b7;
}

.ai-factors-negative li {
    color: #fca5a5;
}

@media (max-width: 768px) {
    .ai-analysis-box {
        grid-template-columns: 1fr;
    }

    .ai-factors-summary {
        grid-template-columns: 1fr;
    }
}

@keyframes rr-pulse-green-blue {
    0%, 100% {
        background: rgba(16, 185, 129, 0.2);
        border-color: #10b981;
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    }
    50% {
        background: rgba(59, 130, 246, 0.2);
        border-color: #3b82f6;
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    }
}

@keyframes rr-text-green-blue {
    0%, 100% {
        color: #10b981;
    }
    50% {
        color: #3b82f6;
    }
}

/* Login Modal Styles */
#login-modal .modal-content {
    max-width: 360px;
    border: 2px solid var(--primary);
    border-radius: 0.75rem;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

#login-modal .modal-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
}

#login-modal .modal-content form {
    padding: 1.5rem;
}

#login-modal .form-group {
    margin-bottom: 1rem;
}

#login-modal .form-group input {
    padding: 0.75rem;
}

#login-modal button[type="submit"] {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
}

#login-modal .error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: #1f2937;
    transition: all 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(96, 165, 250, 0.2);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.form-group small {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* Remove spinner arrows from number input */
.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
}

/* Success Message Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Closed Trades Table */
.trades-table-container {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow-x: auto;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.trades-table thead {
    background: #1f2937;
    border-bottom: 2px solid var(--border);
}

.trades-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    border-bottom: 2px solid var(--border);
}

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

.trades-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.05);
}

.trades-table td {
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.trades-table td strong {
    color: var(--primary-color);
    font-size: 1.05rem;
}

.trades-table .profit {
    color: var(--success-color);
    font-weight: 600;
}

.trades-table .loss {
    color: var(--danger-color);
    font-weight: 600;
}

.exit-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.exit-type-badge.assigned {
    background: var(--success-color);
    color: white;
}

.exit-type-badge.closed {
    background: var(--warning-color);
    color: #0f1419;
}

.exit-type-badge.rolled {
    background: var(--primary-color);
    color: #0f1419;
}

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

.notes-row {
    background: rgba(96, 165, 250, 0.03) !important;
}

.notes-row td {
    padding: 0.75rem 1rem !important;
    border-top: none !important;
}

.table-notes {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

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

    .action-section {
        flex-direction: column;
        align-items: stretch;
    }

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

    .trade-actions {
        flex-direction: column;
    }

    .trade-actions .btn {
        width: 100%;
    }

    .trades-table {
        font-size: 0.8rem;
    }

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

    .table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }

    .table-actions .btn {
        width: 100%;
        font-size: 0.75rem;
    }
}

/* ============================================================
   LITMUS TEST PAGE STYLES
   ============================================================ */

/* Search Card */
.search-card {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.search-card h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.search-description {
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.ticker-input {
    flex: 1;
    max-width: 300px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-primary);
    background-color: #1f2937;
    transition: all 0.2s;
}

.ticker-input:hover {
    border-color: var(--primary-color);
    background-color: #374151;
}

.ticker-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.ticker-input::placeholder {
    text-transform: none;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Results Section */
.results-section {
    animation: fadeIn 0.3s ease-in;
}

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

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

.status-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-badge.pass {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.status-badge.fail {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Opportunity Preview */
.opportunity-preview {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--success-color);
}

.opportunity-preview h3 {
    margin: 0 0 1.5rem 0;
    color: var(--success-color);
    font-size: 1.5rem;
    font-weight: 700;
}

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

.opp-item {
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.opp-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.opp-item.highlight {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.opp-item.highlight:hover {
    background: rgba(16, 185, 129, 0.12);
}

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

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

.opp-item.highlight .opp-value {
    color: var(--success-color);
}

/* Results Section - Checklist/Table */
.checklist-section {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

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

.checklist-container {
    /* Container for results tables */
}

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

.results-category:last-child {
    margin-bottom: 0;
}

.results-category-header {
    margin: 0 0 1rem 0;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    border-left: 4px solid var(--primary-color);
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #1f2937;
}

.results-table thead {
    background: #374151;
}

.results-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    border-bottom: 2px solid var(--border);
}

.results-table td {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table tbody tr:hover {
    background: #374151;
}

/* Column widths */
.col-status {
    width: 80px;
    text-align: center;
}

.col-requirement {
    width: 35%;
    font-weight: 500;
    color: var(--text-primary);
}

.col-actual {
    width: 25%;
    font-weight: 600;
    color: var(--text-primary);
}

.col-required {
    width: 25%;
}

/* Row styling */
.pass-row {
    background: rgba(16, 185, 129, 0.05);
}

.fail-row {
    background: rgba(239, 68, 68, 0.05);
}

.pass-row:hover {
    background: rgba(16, 185, 129, 0.1) !important;
}

.fail-row:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Status icons */
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
}

.pass-icon {
    background: #10b981;
    color: white;
}

.fail-icon {
    background: #ef4444;
    color: white;
}

/* Responsive - Litmus Test */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }

    .ticker-input {
        max-width: 100%;
    }

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

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

    .status-badge {
        align-self: flex-start;
        font-size: 0.9rem;
        padding: 0.625rem 1.25rem;
    }

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

    /* Mobile table styling */
    .results-table {
        font-size: 0.85rem;
    }

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

    .col-status {
        width: 60px;
    }

    .col-requirement {
        width: auto;
        min-width: 150px;
    }

    .col-actual,
    .col-required {
        width: auto;
    }

    .status-icon {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .results-category-header {
        font-size: 1rem;
        padding: 0.625rem 0.875rem;
    }

    .search-card {
        padding: 1.5rem;
    }

    .search-card h2 {
        font-size: 1.25rem;
    }

    .search-description {
        font-size: 0.875rem;
    }

    .opportunity-preview {
        padding: 1.5rem;
    }

    .checklist-section {
        padding: 1.5rem;
    }
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--surface);
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-toggle-btn:hover {
    background: rgba(96, 165, 250, 0.1);
    color: var(--primary-color);
}

.view-toggle-btn.active {
    background: var(--primary-color);
    color: var(--background);
}

.view-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* Table View */
.opportunities-table {
    background: var(--surface);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

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

.opportunities-table thead {
    background: rgba(96, 165, 250, 0.05);
    border-bottom: 2px solid var(--border);
}

.opportunities-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.opportunities-table td {
    padding: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-primary);
}

.opportunities-table tbody tr {
    transition: background 0.2s;
    cursor: pointer;
}

.opportunities-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.05);
}

.opportunities-table .ticker-cell {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.opportunities-table .positive {
    color: var(--success-color);
    font-weight: 600;
}

.opportunities-table .warning {
    color: var(--warning-color);
}

/* Earnings Badge */
.earnings-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--warning-color);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--warning-color);
    margin-top: 0.5rem;
}

.earnings-badge svg {
    width: 14px;
    height: 14px;
}

/* Responsive Table */
@media (max-width: 1200px) {
    .opportunities-table {
        overflow-x: auto;
    }

    .opportunities-table table {
        min-width: 1000px;
    }
}

/* Schedule Page Styles */
.schedule-info-section {
    margin: 2rem 0;
}

.info-card {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

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

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

.time-zone {
    text-align: center;
}

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

.time-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

.market-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    margin-top: 1.5rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.open {
    background: var(--success-color);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-indicator.closed {
    background: var(--danger-color);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    animation: none;
}

.status-indicator.pre-market {
    background: var(--warning-color);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.status-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

/* Schedule Section */
.schedule-section {
    margin: 2rem 0;
}

.schedule-section h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.schedule-table {
    width: 100%;
    background: var(--surface);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.schedule-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.schedule-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

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

.schedule-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.1);
}

.schedule-table tbody tr:last-child {
    border-bottom: none;
}

.schedule-table td {
    padding: 1.25rem 1rem;
    color: var(--text-primary);
}

.task-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
}

.task-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.task-schedule,
.task-market-time {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.task-next-run {
    font-weight: 600;
    color: var(--text-primary);
}

.task-status {
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-scheduled {
    background: rgba(96, 165, 250, 0.15);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.status-badge.status-soon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.status-badge.status-overdue {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.status-badge.status-pending {
    background: rgba(107, 114, 128, 0.15);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.status-badge.status-running {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid var(--success-color);
    animation: pulse 2s ease-in-out infinite;
}

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

/* Notes Section */
.notes-section {
    margin: 2rem 0;
}

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

.notes-content {
    background: var(--surface);
    padding: 1.5rem 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.notes-content ul {
    list-style: none;
    padding: 0;
}

.notes-content li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.notes-content li:last-child {
    border-bottom: none;
}

.notes-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================================
   PROBABILITY SECTION STYLES (Detail Page)
   ============================================================ */

.probability-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.probability-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.probability-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.probability-display {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.probability-gauge-container {
    flex: 0 0 auto;
}

.probability-gauge {
    position: relative;
    width: 200px;
    height: 120px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
}

.gauge-background {
    transition: all 0.3s ease;
}

.gauge-fill {
    transition: all 0.8s ease-out;
}

.gauge-value {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.gauge-label {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.probability-interpretation {
    flex: 1;
    min-width: 250px;
}

.interpretation-box {
    padding: 1.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--border);
    background: #1f2937;
}

.interpretation-box.prob-high {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.interpretation-box.prob-medium {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.1);
}

.interpretation-box.prob-low {
    border-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
}

.interpretation-box.prob-very-low {
    border-color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.interpretation-icon {
    font-size: 1.5rem;
}

.interpretation-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

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

/* Factor Breakdown */
.factor-breakdown {
    margin-top: 1rem;
}

.factor-breakdown h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.factor-table-container {
    overflow-x: auto;
}

.factor-table {
    width: 100%;
    border-collapse: collapse;
    background: #1f2937;
    border-radius: 0.5rem;
    overflow: hidden;
}

.factor-table thead {
    background: #374151;
}

.factor-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
}

.factor-table td {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.factor-table tbody tr:last-child td {
    border-bottom: none;
}

.factor-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.05);
}

.factor-table .factor-positive td {
    background: rgba(16, 185, 129, 0.05);
}

.factor-table .factor-negative td {
    background: rgba(239, 68, 68, 0.05);
}

.factor-table .factor-neutral td {
    background: rgba(148, 163, 184, 0.03);
}

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

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

.impact-neutral {
    color: var(--text-secondary);
}

.impact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.9rem;
}

.impact-positive .impact-icon {
    background: rgba(16, 185, 129, 0.2);
}

.impact-negative .impact-icon {
    background: rgba(239, 68, 68, 0.2);
}

.impact-neutral .impact-icon {
    background: rgba(148, 163, 184, 0.2);
}

/* Model Info */
.model-info {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    text-align: center;
}

.model-info small {
    font-size: 0.8rem;
}

/* Responsive - Probability Section */
@media (max-width: 768px) {
    .probability-display {
        flex-direction: column;
        align-items: center;
    }

    .probability-interpretation {
        min-width: 100%;
    }

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

    .factor-table th,
    .factor-table td {
        padding: 0.625rem 0.75rem;
    }
}

/* ============================================================
   TRADE FEEDBACK MODAL STYLES
   ============================================================ */

.feedback-modal-content {
    max-width: 500px;
}

.feedback-result {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #1f2937;
    border-radius: 0.5rem;
    text-align: center;
}

.feedback-profit-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.feedback-profit-display .profit-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

.feedback-profit-display .profit-value {
    font-size: 2rem;
    font-weight: 700;
}

.feedback-profit-display .profit-pct {
    font-size: 1rem;
    font-weight: 600;
}

.feedback-profit-display.profit {
    border: 1px solid var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.feedback-profit-display.loss {
    border: 1px solid var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.feedback-question h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.feedback-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.feedback-include-btn {
    flex: 1;
    min-width: 180px;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.feedback-include-btn.selected {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
    transform: scale(1.02);
}

.external-factors-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

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

/* Violation Badge on Trade Card */
.violation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #dc2626;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.violation-badge:hover {
    background: #b91c1c;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.4);
    transform: translateY(-1px);
}

.violation-badge.thesis {
    background: #dc2626;
}

.violation-badge.thesis:hover {
    background: #b91c1c;
}

.violation-badge.sma {
    background: #ea580c;
}

.violation-badge.sma:hover {
    background: #c2410c;
}

.violation-badge.both {
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
}

.violation-badge.both:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #c2410c 100%);
}

/* Responsive - Feedback Modal */
@media (max-width: 768px) {
    .feedback-buttons {
        flex-direction: column;
    }

    .feedback-include-btn {
        min-width: 100%;
    }

    .feedback-profit-display {
        flex-direction: column;
        gap: 0.5rem;
    }

    .feedback-profit-display .profit-value {
        font-size: 1.75rem;
    }
}

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

.dashboard-window {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.window-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}

.window-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.window-subheader {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Dashboard Open Trades Container */
.trades-container {
    min-height: 200px;
}

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

/* Dashboard Trade Card - Uses unique class name to avoid conflicts with trade-tracker cards */
.dashboard-trade-card {
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 1.25rem;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dashboard-trade-card:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.dashboard-trade-card.has-violation {
    border-color: #dc2626;
    background: #fef2f2;
    animation: pulse-red 2s infinite;
}

.dashboard-trade-card.high-return {
    border-color: #059669;
    background: #f0fdf4;
    animation: pulse-green 2s infinite;
}

.trade-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.trade-row.trade-ticker {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.875rem;
    margin-bottom: 0.875rem;
    font-weight: 600;
}

.ticker {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.5px;
}

.unrealized-pnl {
    font-size: 1.125rem;
    font-weight: 700;
}

.trade-row .label {
    font-size: 0.9375rem;
    color: #4b5563;
    font-weight: 600;
}

.trade-row .value {
    font-size: 0.9375rem;
    color: #111827;
    font-weight: 700;
}

.violation-badge {
    display: inline-block;
    background: #dc2626;
    color: white;
    padding: 0.4rem 0.875rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-top: 0.625rem;
    letter-spacing: 0.3px;
}

/* Opportunities Container */
.opportunities-container {
    min-height: 200px;
}

.opportunities-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.opportunities-table thead {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
}

.opportunities-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

.opportunities-table tbody tr {
    border-bottom: 1px solid var(--border);
}

.opportunities-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.1);
}

.opportunities-table td {
    padding: 0.75rem;
}

.ticker-cell {
    font-weight: 600;
    color: #1f2937;
}

.spread-cell,
.success-cell {
    color: #6b7280;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-size: 0.875rem;
}

.error-state {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    font-size: 0.875rem;
}

/* Dashboard Footer */
.dashboard-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

.dashboard-footer p {
    margin: 0.5rem 0;
}

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

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #6b7280;
}

.spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile Header */
    .header-container {
        height: 60px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .brand-tagline {
        display: none;
    }

    .brand-icon {
        font-size: 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #1f2937;
        flex-direction: column;
        gap: 0;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        border-radius: 0;
    }

    .header-nav.active {
        max-height: 500px;
        padding: 1rem 0;
    }

    .nav-section {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
    }

    .nav-primary {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        width: 100%;
        padding: 0.75rem 1.5rem;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: all 0.2s;
        background: #374151;
        margin: 0;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    .nav-dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
    }

    .nav-dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 300px;
    }

    .dropdown-item {
        padding: 0.625rem 2rem;
        border-radius: 0;
    }

    .nav-admin {
        margin-left: 0;
        width: 100%;
    }

    .nav-admin-link {
        width: 100%;
        border-radius: 0;
        padding: 0.75rem 1.5rem;
    }

    .header-user {
        position: absolute;
        top: 60px;
        right: 0;
        flex-direction: column;
        gap: 0.5rem;
        background: rgba(0, 0, 0, 0.5);
        padding: 1rem 1.5rem;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
    }

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

    .opportunities-table {
        font-size: 0.875rem;
    }

    .opportunities-table th,
    .opportunities-table td {
        padding: 0.625rem;
    }

    .trade-row {
        font-size: 0.9375rem;
    }

    .ticker {
        font-size: 1.125rem;
        font-weight: 800;
    }

    .unrealized-pnl {
        font-size: 1rem;
        font-weight: 700;
    }

    .trade-row .label,
    .trade-row .value {
        font-size: 0.875rem;
    }

    .dashboard-trade-card {
        padding: 1rem;
    }
}
