/* Reset default browser styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base body styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Fixed top navigation */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 2px solid #e2e8f0;
    padding: 0 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.main-content {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* Left panel for charts */
#left {
    width: 70%;
    padding: 2rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

/* Right panel for form and analysis */
#right {
    width: 30%;
    padding: 2rem;
    background-color: #f8fafc;
    border-left: 1px solid #e2e8f0;
}

/* Headings */
h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
}

/* Form styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
}

input {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Button styles */
button {
    padding: 0.75rem 1.5rem;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #2b6cb0;
}

button:active {
    background-color: #2c5282;
}

/* Chart image */
#chart {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Analysis and forecast sections */
#analysis, #forecast {
    margin-top: 2rem;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#analysis h3, #forecast h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

pre {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #2d3748;
    white-space: pre-wrap;
    background-color: #f7fafc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Responsive design */
@media (max-width: 1024px) {
    body {
        flex-direction: column;
    }

    #left, #right {
        width: 100%;
    }

    #right {
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }
}

@media (max-width: 640px) {
    #left, #right {
        padding: 1rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    input, button {
        font-size: 0.9rem;
    }
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Progress bar styles */
#progress-bar-container {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 20px;
    background-color: #3182ce;
    text-align: center;
    color: white;
    line-height: 20px;
    transition: width 0.3s ease;
}

#progress-bar-container.hidden {
    display: none;
}

/* Chart selection fieldset */
fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

legend {
    font-weight: 600;
    color: #4a5568;
    padding: 0 0.5rem;
}

fieldset label {
    display: flex;
    align-items: center;
    margin: 0.5rem 0;
    font-weight: normal;
}

fieldset input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
    padding: 0;
}

/* Swing trade color coding */
.bull { color: #16a34a; font-weight: 600; }
.bear { color: #dc2626; font-weight: 600; }
.bull-row { background-color: rgba(22, 163, 74, 0.08); }
.bear-row { background-color: rgba(220, 38, 38, 0.08); }

td.macd-bull { background-color: rgba(22, 163, 74, 0.15); color: #16a34a; }
td.macd-bear { background-color: rgba(220, 38, 38, 0.15); color: #dc2626; }

#swing-result {
    overflow-x: auto;
}

#swing-result h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin: 1.25rem 0 0.5rem;
}

#swing-result p {
    margin: 0.4rem 0;
}

.swing-table {
    width: auto;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0.5rem 0;
    font-size: 1.0rem;
    font-family: 'Fira Code', 'Courier New', monospace;
    white-space: nowrap;
}
.swing-table th, .swing-table td {
    padding: 0.35rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: right;
}
.swing-table th {
    background-color: #f1f5f9;
    font-weight: 600;
}
.swing-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.swing-table th.sortable:hover {
    background-color: #dbe4ee;
}
.swing-table td:first-child, .swing-table th:first-child {
    text-align: left;
}

/* Strategy table (2-col key/value) */
.swing-table.kv { table-layout: auto; }
.swing-table.kv td:first-child { font-weight: 600; width: 40%; }

/* Category dropdown */
select {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    color: #333;
    transition: border-color 0.2s ease;
}
select option {
    font-size: 1rem;
}
select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* VIX banner */
.vix-banner {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.vix-normal {
    background-color: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: #16a34a;
}
.vix-elevated {
    background-color: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

/* Warning badges */
.warn {
    color: #d97706;
    font-weight: 600;
    font-size: 0.85rem;
}
p.warn {
    background-color: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    margin: 0.5rem 0;
}

/* Momentum recommendation banner */
.momentum-rec {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    padding: 0.6rem;
    border-radius: 6px;
    margin: 0.5rem 0 1rem;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
}
.momentum-rec.bull {
    background-color: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.4);
    color: #16a34a;
}
.momentum-rec.bear {
    background-color: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.4);
    color: #dc2626;
}

/* Tabs */
.top-nav .tab {
    padding: 0.75rem 1.4rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 1.17rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-radius: 0;
    transition: color 0.2s, border-color 0.2s;
}
.top-nav .tab:hover {
    color: #1a202c;
    background: none;
}
.top-nav .tab.active {
    color: #3182ce;
    border-bottom-color: #3182ce;
    background: none;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Sub-navigation inside consolidated tabs */
.sub-nav {
    display: inline-flex;
    gap: 6px;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.sub-nav .sub-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sub-nav .sub-tab:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}
.sub-nav .sub-tab.active {
    background: #ffffff;
    color: #1d4ed8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.sub-tab-panel {
    display: none;
}
.sub-tab-panel.active {
    display: block;
}

/* When left panel is hidden, right panel takes full width */
body.chart-hidden #left { display: none; }
body.chart-hidden #right { width: 100%; }

/* Momentum tab: stack vertically */
body.chart-stacked .main-content { flex-direction: column; }
body.chart-stacked #left { width: 100%; max-height: 50vh; overflow-y: auto; }
body.chart-stacked #right { width: 100%; border-left: none; border-top: 1px solid #e2e8f0; }

/* Documentation tabs */
.doc-content {
    line-height: 1.7;
    max-width: 900px;
}
.doc-content h2 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}
.doc-content h3 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
}
.doc-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}
.doc-content p {
    margin: 0.5rem 0;
    color: #4a5568;
}
.doc-content ul, .doc-content ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
    color: #4a5568;
}
.doc-content li {
    margin: 0.3rem 0;
}
.doc-content hr {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 2rem 0;
}
.doc-content code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
    font-family: 'Fira Code', monospace;
}
.doc-content pre {
    margin: 0.75rem 0;
}
.doc-subtitle {
    font-size: 1rem;
    color: #64748b !important;
    margin-bottom: 1.5rem !important;
}
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}
.doc-table th, .doc-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.doc-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1a202c;
}
.doc-table tr:hover {
    background: #f8fafc;
}
.nav-directory-table {
    width: 100%;
    margin-top: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    border-collapse: collapse;
}
.nav-directory-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
    padding: 0.75rem 0.85rem;
    border-bottom: 2px solid #cbd5e1;
}
.nav-directory-table td {
    padding: 0.85rem;
    vertical-align: middle;
    line-height: 1.55;
    border-color: #e2e8f0;
}
.nav-jump-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.nav-jump-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
}
.doc-callout {
    background: #eff6ff;
    border-left: 4px solid #3182ce;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    color: #1e40af;
}
.doc-checklist {
    list-style: none;
    margin-left: 0 !important;
    padding-left: 0;
}
.doc-checklist li {
    padding: 0.3rem 0 0.3rem 1.75rem;
    position: relative;
}
.doc-checklist li::before {
    content: "✅";
    position: absolute;
    left: 0;
}

/* Half-width buttons for swing and momentum forms */
#swing-form button,
#momentum-form button {
    width: 50%;
}

/* Half-width recommendation banner */
.momentum-rec {
    width: 50%;
}

/* Earnings warning - flashing red */
.earnings-warn {
    color: #dc2626;
    font-weight: 700;
    animation: flash-red 1s ease-in-out infinite;
}
@keyframes flash-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Seasonality & Patterns Advisor Styles */
.recommendation-badge {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
}
.recommendation-badge.strong-buy {
    background-color: #064e3b;
    color: #34d399;
}
.recommendation-badge.buy {
    background-color: #d1fae5;
    color: #065f46;
}
.recommendation-badge.hold {
    background-color: #f3f4f6;
    color: #4b5563;
}
.recommendation-badge.sell {
    background-color: #fee2e2;
    color: #991b1b;
}
.recommendation-badge.strong-sell {
    background-color: #7f1d1d;
    color: #fca5a5;
}

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

.advisor-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.advisor-card h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
    color: #1e293b;
}

/* Seasonality Bars */
.metric-bar-container {
    width: 100%;
    height: 14px;
    background-color: #e2e8f0;
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}
.metric-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.3s ease;
}
.metric-bar-fill.positive {
    background-color: #10b981;
}
.metric-bar-fill.negative {
    background-color: #ef4444;
}
.metric-bar-fill.winrate {
    background-color: #3b82f6;
}

/* Highlighting months */
.month-highlight-current {
    background-color: #fffbeb !important;
    border-left: 4px solid #f59e0b !important;
    font-weight: 700;
}
.month-highlight-next {
    background-color: #f0f9ff !important;
    border-left: 4px dashed #0284c7 !important;
}

/* ========== Auth Pages ========== */
.auth-page {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2439 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.auth-card h1 {
    font-size: 1.6rem;
    color: #1e3a5f;
    margin-bottom: 0.25rem;
}

.auth-card h2 {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.auth-card label {
    display: block;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.3rem;
    margin-top: 1rem;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.auth-card input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.auth-card button[type="submit"] {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.7rem;
    background: #3182ce;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.auth-card button[type="submit"]:hover {
    background: #2b6cb0;
}

.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.auth-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.auth-link {
    margin-top: 1.2rem;
    font-size: 0.85rem;
    color: #64748b;
}

.auth-link a {
    color: #3182ce;
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

.field-hint {
    display: block;
    text-align: left;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

/* ========== User Header Bar ========== */
.user-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1e3a5f;
    color: #fff;
    padding: 0.4rem 2rem;
    font-size: 0.85rem;
}

.user-greeting strong {
    color: #93c5fd;
}

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

.btn-watchlist {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-watchlist:hover {
    background: #1d4ed8;
}

.btn-navguide {
    background: #0f766e;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-navguide:hover {
    background: #0d9488;
}

.btn-logout {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* ========== Watchlist Panel ========== */
.watchlist-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.watchlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.watchlist-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #1e3a5f;
}

.watchlist-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
}

.watchlist-close:hover {
    color: #dc2626;
}

.watchlist-add-row,
.watchlist-import-row {
    display: flex;
    gap: 0.4rem;
    padding: 0.8rem 1.2rem 0.4rem;
}

.watchlist-add-row input {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.85rem;
}

.watchlist-add-row button,
.watchlist-import-row button {
    padding: 0.4rem 0.8rem;
    background: #3182ce;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.watchlist-add-row button:hover,
.watchlist-import-row button:hover {
    background: #2b6cb0;
}

.watchlist-import-row select {
    flex: 1;
    padding: 0.4rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.8rem;
}

.watchlist-items {
    list-style: none;
    margin: 0;
    padding: 0.5rem 1.2rem;
    flex: 1;
    overflow-y: auto;
}

.watchlist-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.watchlist-items li:hover {
    background: #f8fafc;
}

.watchlist-ticker {
    font-weight: 600;
    color: #1e3a5f;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.watchlist-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
}

.watchlist-remove-btn:hover {
    color: #dc2626;
}

.watchlist-empty {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.85rem;
    padding: 1rem 0;
    text-align: center;
}

.watchlist-actions {
    padding: 0.8rem 1.2rem;
    border-top: 1px solid #e2e8f0;
}

.btn-use-watchlist {
    width: 100%;
    padding: 0.6rem;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-use-watchlist:hover {
    background: #047857;
}

/* ========== Ticker Autocomplete & Suggestions ========== */
.ticker-autocomplete-wrap {
    position: relative;
    width: 100%;
}

.watchlist-add-row .ticker-autocomplete-wrap {
    flex: 1;
}

.watchlist-add-row .ticker-autocomplete-wrap input {
    width: 100%;
}

.ticker-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1200;
    display: none;
    padding: 4px;
}

.ticker-autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease;
    gap: 8px;
    user-select: none;
}

.ticker-autocomplete-item:hover,
.ticker-autocomplete-item.active-item {
    background: #f1f5f9;
}

.ticker-autocomplete-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex: 1;
}

.ticker-symbol-badge {
    background: #1e3a5f;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.ticker-company-name {
    font-size: 0.86rem;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.ticker-autocomplete-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ticker-exchange-tag {
    font-size: 0.7rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

.ticker-type-tag {
    font-size: 0.7rem;
    color: #0369a1;
    background: #e0f2fe;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

.ticker-autocomplete-hint {
    padding: 6px 10px 4px;
    font-size: 0.72rem;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    text-align: right;
}

/* ========== Stochastic Oscillator Badges ========== */
.stoch-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 3px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}
.badge-pegged-ob {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}
.badge-pegged-os {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.badge-bull-cross {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.badge-bear-cross {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.badge-neutral {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* ========== ≤14 DTE Options Strategy Advisor ========== */
.options-advisor-container {
    margin-top: 24px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.options-advisor-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.options-advisor-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-selector-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 4px 8px;
    border-radius: 8px;
}

.share-selector-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.share-pills {
    display: flex;
    gap: 4px;
}

.share-pill {
    padding: 3px 9px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.share-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.share-pill.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
}

.share-custom-input {
    width: 75px;
    padding: 3px 6px;
    font-size: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: right;
    font-weight: 600;
}

.options-strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 16px;
}

.opt-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.opt-card.call-card {
    border-top: 4px solid #0284c7;
}

.opt-card.put-card {
    border-top: 4px solid #10b981;
}

.opt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.opt-badge-sub {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
}

.opt-badge-call {
    background: #e0f2fe;
    color: #0369a1;
}

.opt-badge-put {
    background: #dcfce7;
    color: #15803d;
}

.opt-strike-hero {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opt-strike-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
}

.opt-strike-meta {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-align: right;
}

.opt-rationale-box {
    background: #ffffff;
    border-left: 3px solid #64748b;
    border-radius: 0 4px 4px 0;
    padding: 8px 10px;
    font-size: 0.8rem;
    color: #334155;
    line-height: 1.4;
    margin-bottom: 12px;
}

.opt-edge-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #7c3aed;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 4px;
    padding: 1px 6px;
    margin-top: 4px;
}

.opt-metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: auto;
    font-size: 0.82rem;
}

.opt-metrics-table td {
    padding: 5px 2px;
    border-bottom: 1px solid #edf2f7;
}

.opt-metrics-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.opt-bargain-banner {
    margin-top: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.8rem;
    color: #065f46;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opt-checklist-accordion {
    margin-top: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.opt-checklist-summary {
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
    cursor: pointer;
    background: #f1f5f9;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.opt-checklist-content {
    padding: 12px 16px;
    font-size: 0.82rem;
    color: #334155;
    line-height: 1.5;
}

.opt-checklist-item {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}