/* ==================== SIDOTI PORTFOLIO ==================== */
.sidoti-portfolio-overlay {
    position: fixed;
    top: 0;
    left: 60px;
    right: 0;
    bottom: 0;
    background: #0a0a0a;
    z-index: 1050;
    overflow-y: auto;
    padding: 30px 20px;
}
.sidoti-portfolio-overlay.visible {
    display: block;
}
.sidoti-portfolio-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
.sidoti-portfolio-header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid #333;
}
.sidoti-portfolio-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.sidoti-portfolio-title-row h2 {
    color: #caa999;
    font-size: 24px;
    margin: 0;
}
.sidoti-portfolio-badge {
    background: rgba(202, 169, 153, 0.15);
    color: #caa999;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(202, 169, 153, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.sidoti-portfolio-subtitle {
    color: #777;
    font-size: 13px;
    margin: 0;
}

/* Summary Cards */
.sidoti-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.sidoti-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 18px 20px;
}
.sidoti-card-label {
    color: #777;
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidoti-card-value {
    color: #e0e0e0;
    font-size: 22px;
    font-weight: 700;
}
.sidoti-card-value.positive { color: #4caf50; }
.sidoti-card-value.negative { color: #f44336; }

/* Secondary Stats */
.sidoti-secondary-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 14px 18px;
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    font-size: 13px;
    color: #999;
}
.sidoti-stat {
    display: flex;
    gap: 6px;
}
.sidoti-stat-label { color: #666; }
.sidoti-stat-value { color: #ccc; font-weight: 500; }

/* Chart */
.sidoti-chart-section {
    margin-bottom: 28px;
}
.sidoti-chart-section h3 {
    color: #caa999;
    font-size: 16px;
    margin-bottom: 14px;
}
.sidoti-chart-container {
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 20px;
    min-height: 220px;
    position: relative;
}

/* Tabs */
.sidoti-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #333;
}
.sidoti-tab {
    background: none;
    border: none;
    color: #777;
    font-size: 14px;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.sidoti-tab:hover { color: #ccc; }
.sidoti-tab.active {
    color: #caa999;
    border-bottom-color: #caa999;
}
.sidoti-tab-content { display: none; }
.sidoti-tab-content.active { display: block; }

/* Positions Table */
.sidoti-positions-table table {
    width: 100%;
    border-collapse: collapse;
}
.sidoti-positions-table th {
    text-align: left;
    color: #777;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 1px solid #333;
    white-space: nowrap;
}
.sidoti-positions-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.sidoti-positions-table th.sortable:hover { color: #caa999; }
.sidoti-positions-table td {
    padding: 12px;
    font-size: 13px;
    color: #ccc;
    border-bottom: 1px solid #1a1a1a;
    white-space: nowrap;
}
.sidoti-positions-table tr:hover td {
    background: #151515;
}
.sidoti-positions-table .ticker-cell {
    color: #7cc3e4;
    font-weight: 600;
}
.sidoti-positions-table .pnl-positive { color: #4caf50; font-weight: 600; }
.sidoti-positions-table .pnl-negative { color: #f44336; font-weight: 600; }

/* Reason badges */
.sidoti-reason-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    letter-spacing: 0.3px;
}
.sidoti-reason-badge.trail {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}
.sidoti-reason-badge.time-stop {
    background: rgba(124, 195, 228, 0.15);
    color: #7cc3e4;
}
.sidoti-reason-badge.tp1-time {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

/* TP1 indicator */
.sidoti-tp1-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    margin-right: 4px;
    vertical-align: middle;
}

/* Trail distance bar */
.sidoti-trail-bar {
    width: 60px;
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}
.sidoti-trail-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

/* Empty state */
.sidoti-empty {
    text-align: center;
    padding: 40px;
    color: #555;
    font-size: 14px;
}

/* Loading */
.sidoti-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .sidoti-portfolio-overlay {
        left: 0;
        padding: 16px 12px;
    }
    .sidoti-summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .sidoti-card { padding: 14px 16px; }
    .sidoti-card-value { font-size: 18px; }
    .sidoti-secondary-stats {
        flex-direction: column;
        gap: 10px;
    }
    .sidoti-positions-table {
        overflow-x: auto;
    }
    .sidoti-portfolio-title-row {
        flex-wrap: wrap;
    }
    .sidoti-info-card { padding: 20px 18px; }
}

/* Info button */
.sidoti-info-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(202, 169, 153, 0.5);
    background: rgba(202, 169, 153, 0.1);
    color: #caa999;
    font-style: italic;
    font-weight: 700;
    font-size: 13px;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}
.sidoti-info-btn:hover { background: #caa999; color: #0a0a0a; }

/* Strategy info modal */
.sidoti-info-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sidoti-info-card {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 26px 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.sidoti-info-card h3 {
    color: #caa999;
    font-size: 19px;
    margin: 0 0 14px;
    padding-right: 30px;
}
.sidoti-info-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: #777;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}
.sidoti-info-close:hover { color: #e0e0e0; }
.sidoti-info-next {
    background: rgba(124, 195, 228, 0.08);
    border: 1px solid rgba(124, 195, 228, 0.25);
    border-radius: 8px;
    padding: 12px 14px;
    color: #cfe6f3;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.sidoti-info-body { color: #bbb; font-size: 13.5px; line-height: 1.6; }
.sidoti-info-body p { margin: 0 0 10px; }
.sidoti-info-body ul { margin: 0 0 12px; padding-left: 20px; }
.sidoti-info-body li { margin-bottom: 6px; }
.sidoti-info-body strong { color: #e0e0e0; }
.sidoti-info-body em { color: #caa999; font-style: italic; }
.sidoti-info-caveat {
    border-left: 2px solid #555;
    padding-left: 12px;
    color: #999;
    font-size: 12.5px;
}
.sidoti-info-newnote { color: #999; font-size: 12.5px; margin-top: 8px !important; }

/* NEW badge */
.sidoti-new-badge {
    display: inline-block;
    background: #4caf50;
    color: #0a0a0a;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Mandatory risk disclaimer */
.sidoti-disclaimer {
    margin-top: 30px;
    padding: 14px 16px;
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-left: 3px solid #caa999;
    border-radius: 8px;
    color: #8a8a8a;
    font-size: 11.5px;
    line-height: 1.65;
}
.sidoti-disclaimer strong { color: #b3b3b3; }
