﻿/* SafeTrade Portfolio AI Agent Hub, 3-Tab Billboard & 3-Step Wizard StylesFile: /Styles/SafeStyles/portfolio-agent.css */
.portfolio-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 7px 14px;
    margin-bottom: 8px;
}

    .portfolio-topbar .last-update-text {
        color: #666;
    }

        .portfolio-topbar .last-update-text strong {
            color: #304A6B;
        }
/* ── Portfolio Main Panel (Identity Left + AI Agent Hub Right) ── */

.portfolio-panel {
    background-color: #eef2f7;
    border: 1px solid #d0d8e4;
    border-left: 4px solid #304A6B;
    border-radius: 4px;
    margin-bottom: 10px;
}

.portfolio-name-heading {
    font-size: 20px;
    font-weight: bold;
    color: #304A6B;
}

.aps-status-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-left: 3px solid green;
    background-color: rgba(255,255,255,0.65);
    border-radius: 0 3px 3px 0;
    font-weight: bold;
    vertical-align: middle;
    line-height: 1.4;
    font-size: 12px;
}

.membership-pill {
    display: inline-block;
    background: linear-gradient(135deg, #304A6B, #1e324a);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    vertical-align: middle;
}

.identity-label {
    font-weight: bold;
    color: #304A6B;
}

.identity-value {
    color: #3B3B3B;
}

.identity-divider {
    margin: 7px 0;
    border-color: #c8d4e3;
}
/* ── Financial Metrics Chips ── */

.metric-chip {
    display: inline-block;
    margin-right: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.metric-label {
    font-weight: bold;
    color: #304A6B;
}

.metric-value {
    font-weight: bold;
    color: #3B3B3B;
}
/* ── AI Portfolio Agent Hub (Right Column) ── */

.agent-hub-col {
    border-left: 2px solid #c8d4e3;
    background: linear-gradient(180deg, #f7faff 0%, #e9f0f8 100%);
    padding: 12px 15px;
    border-radius: 0 4px 4px 0;
}

.agent-hub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #d0d8e4;
}

.agent-title {
    font-size: 14px;
    font-weight: bold;
    color: #1e324a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

    .agent-status-dot.active {
        background-color: #10b981;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    }

    .agent-status-dot.paused {
        background-color: #9ca3af;
    }

.agent-mandate-box {
    background-color: #ffffff;
    border: 1px solid #d5dfed;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: 12px;
}

.agent-mandate-row {
    margin-bottom: 4px;
    line-height: 1.35;
}

    .agent-mandate-row:last-child {
        margin-bottom: 0;
    }

.agent-mandate-label {
    color: #5a6f8c;
    font-weight: 600;
}

.agent-mandate-val {
    color: #1e324a;
    font-weight: bold;
}
/* ── Toggle Switch for AI Agent Monitoring ── */

.agent-switch-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0;
    font-size: 12px;
    font-weight: bold;
    color: #304A6B;
}
/* ── 3-Tab Agent Briefing Billboard ── */

.agent-billboard-card {
    background-color: #ffffff;
    border: 1px solid #c5d3e8;
    border-top: 3px solid #304A6B;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(48, 74, 107, 0.08);
}

.billboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f4f7fb;
    padding: 6px 12px;
    border-bottom: 1px solid #dce4f0;
    flex-wrap: wrap;
    gap: 8px;
}

.billboard-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

    .billboard-tabs li a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 12px;
        font-size: 12.5px;
        font-weight: bold;
        color: #475569;
        background-color: #e9eff6;
        border: 1px solid transparent;
        border-radius: 4px;
        text-decoration: none;
        transition: all 0.15s ease;
    }

    .billboard-tabs li.active a {
        background-color: #304A6B;
        color: #ffffff;
    }

    .billboard-tabs li a:hover:not(.active) {
        background-color: #dbe4f0;
        color: #1e293b;
    }

.tab-badge {
    display: inline-block;
    padding: 1px 6px;
    font-size: 11px;
    border-radius: 10px;
    background-color: rgba(0,0,0,0.12);
    color: inherit;
}

.billboard-tabs li.active .tab-badge {
    background-color: #ffffff;
    color: #304A6B;
}

.tab-badge.badge-alert {
    background-color: #fee2e2;
    color: #b91c1c;
}

.billboard-tabs li.active .tab-badge.badge-alert {
    background-color: #fecaca;
    color: #991b1b;
}

.billboard-body {
    padding: 10px 14px;
    max-height: 225px;
    overflow-y: auto;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 8px;
}

.insight-item-card {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0d9488;
    border-radius: 4px;
    padding: 7px 10px;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

    .insight-item-card.exit-alert-card {
        border-left-color: #e11d48;
        background-color: #fffbfa;
    }

.group-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 3px;
    background-color: #304A6B;
    color: #fff;
    margin-right: 5px;
}
/* ── Records header bar ── */

.records-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0 4px 0;
}

.stock-count-label {
    font-weight: bold;
    color: #304A6B;
}
/* =========================================================================3-STEP GUIDED AI AGENT WIZARD MODAL STYLES========================================================================= */

#managePortfolioModal .modal-dialog {
    margin-top: 120px !important;
}

#agentConfigModal .modal-dialog {
    margin-top: 40px !important;
}
/* ── Top Consent Banner inside Modal ── */

.agent-consent-banner {
    background-color: #f0f6ff;
    border: 1px solid #bfd6f6;
    border-radius: 5px;
    padding: 9px 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
/* ── Clickable 3-Step Progress Bar ── */

.agent-wizard-steps {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.wizard-step-tab {
    flex: 1;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .wizard-step-tab:hover {
        background-color: #e2e8f0;
    }

    .wizard-step-tab.active-step {
        background-color: #304A6B;
        border-color: #1e324a;
        color: #ffffff;
        box-shadow: 0 2px 5px rgba(48, 74, 107, 0.2);
    }

    .wizard-step-tab.completed-step {
        background-color: #eff6ff;
        border-color: #93c5fd;
        color: #1e3a8a;
    }

.step-num-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #cbd5e1;
    color: #1e293b;
    font-weight: bold;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wizard-step-tab.active-step .step-num-circle {
    background-color: #ffffff;
    color: #304A6B;
}

.wizard-step-tab.completed-step .step-num-circle {
    background-color: #2563eb;
    color: #ffffff;
}

.step-tab-title {
    font-size: 13px;
    font-weight: bold;
    line-height: 1.2;
}

.step-tab-sub {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}
/* ── Plain-English Educational Guide Banner per Step ── */

.wizard-guide-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0284c7;
    border-radius: 4px;
    padding: 9px 14px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #334155;
    line-height: 1.45;
}

.wizard-guide-title {
    font-weight: bold;
    color: #0f172a;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* ── 2-Column Spacious Card Grid inside Each Step (No Inner Scrollbars) ── */

.wizard-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 767px) {
    .wizard-card-grid {
        grid-template-columns: 1fr;
    }

    .agent-wizard-steps {
        flex-direction: column;
    }
}
/* ── Selectable Radio / Checkbox Cards */
.agent-choice-card {
border: 1px solid #cbd5e1;
border-radius: 6px;
padding: 11px 14px;
background-color: #ffffff;
cursor: pointer;
transition: all 0.15s ease;
position: relative;
}
.agent-choice-card:hover {
border-color: #64748b;
background-color: #f8fafc;
}
.agent-choice-card.selected-card {
border: 2px solid #2563eb;
background-color: #eff6ff;
padding: 10px 13px; /* compensate for 2px border so layout never shifts */
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.agent-choice-card label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    width: 100%;
}
/* ── Telemetry Badges & Breadth Bar inside Step 1 Segment Cards ── */

.qtr-return-pill {
    display: inline-block;
    font-size: 11.5px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.qtr-return-pos {
    background-color: #dcfce7;
    color: #15803d;
}

.qtr-return-neg {
    background-color: #fee2e2;
    color: #b91c1c;
}

.qtr-return-neutral {
    background-color: #e2e8f0;
    color: #475569;
}

.breadth-bar-track {
    width: 100%;
    height: 6px;
    background-color: #fecaca;
    border-radius: 3px;
    overflow: hidden;
    margin: 7px 0 6px 0;
    display: flex;
}

.breadth-bar-adv {
    height: 100%;
    background-color: #16a34a;
}

.breadth-bar-unch {
    height: 100%;
    background-color: #94a3b8;
}

.segment-metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #475569;
    flex-wrap: wrap;
    gap: 6px;
}
/* ... existing code ... */ .segment-metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #475569;
    flex-wrap: wrap;
    gap: 6px;
}
/* ── Sleek Single-Line Horizontal Segment Rows (Scales to 8-12 Segments) ── */

.segment-row-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.segment-row-header {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 10.5px;
    font-weight: bold;
    color: #64748b;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e2e8f0;
}

.segment-sleek-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.12s ease;
}

    .segment-sleek-row:hover {
        border-color: #64748b;
        background-color: #f8fafc;
    }

    .segment-sleek-row.selected-card {
        border: 2px solid #2563eb;
        background-color: #eff6ff;
        padding: 7px 11px;
        box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
    }

.seg-col-name {
    flex: 0 0 235px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .seg-col-name input[type="radio"] {
        margin: 0 !important;
        position: static !important;
        flex-shrink: 0;
        cursor: pointer;
    }

.seg-title-text {
    font-weight: bold;
    color: #1e324a;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seg-col-breadth {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 12px;
}

.breadth-bar-inline {
    width: 135px;
    height: 7px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-shrink: 0;
}

.breadth-stats-text {
    font-size: 12px;
    color: #334155;
    white-space: nowrap;
}

.seg-col-upside {
    flex: 0 0 120px;
    text-align: right;
}

.seg-col-slippage {
    flex: 0 0 110px;
    text-align: right;
}

.leader-upside-pill {
    display: inline-block;
    background-color: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 9px;
    border-radius: 4px;
}

.slippage-risk-pill {
    display: inline-block;
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 9px;
    border-radius: 4px;
}

.segment-footnote-box {
    margin-top: 9px;
    padding: 7px 12px;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    font-size: 11.5px;
    color: #475569;
    line-height: 1.45;
}

@media (max-width: 767px) {
    .segment-row-header {
        display: none;
    }

    .segment-sleek-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .seg-col-name {
        flex: 1 1 100%;
    }
}

 .segment-metrics-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: #475569;
    flex-wrap: wrap;
    gap: 6px;
}
/* ── Sleek Single-Line Horizontal Segment Box with Vertical Scroll */
.segment-table-box {
border: 1px solid #cbd5e1;
border-radius: 6px;
background-color: #f8fafc;
overflow: hidden;
}
.segment-row-header {
display: flex;
align-items: center;
padding: 6px 14px;
font-size: 10.5px;
font-weight: bold;
color: #475569;
background-color: #f1f5f9;
letter-spacing: 0.3px;
border-bottom: 1px solid #cbd5e1;
}
.segment-row-scroll {
max-height: 250px;
overflow-y: auto;
padding: 6px;
display: flex;
flex-direction: column;
gap: 5px;
}
.segment-sleek-row {
display: flex;
align-items: center;
padding: 7px 10px;
border: 1px solid #cbd5e1;
border-radius: 5px;
background-color: #ffffff;
cursor: pointer;
transition: all 0.12s ease;
}
.segment-sleek-row:hover {
border-color: #64748b;
background-color: #f8fafc;
}
.segment-sleek-row.selected-card {
border: 2px solid #2563eb;
background-color: #eff6ff;
padding: 6px 9px;
box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
}

/*Solving bill board overflowing issue*/

    /* ... existing code ... */ .segment-sleek-row.selected-card {
        border: 2px solid #2563eb;
        background-color: #eff6ff;
        padding: 6px 9px;
        box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
    }
/* ── Fix Billboard Vertical Overflow & Global .tab-content Height Overrides ── */

.agent-billboard-card {
    position: relative;
    overflow: hidden;
    clear: both;
    height: auto !important;
    margin-bottom: 14px;
}

    .agent-billboard-card .billboard-body, .agent-billboard-card .tab-content, .agent-billboard-card .tab-pane {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible;
    }

    .agent-billboard-card .billboard-body {
        max-height: 240px;
        overflow-y: auto !important;
        overflow-x: hidden;
        padding: 12px 14px;
    }

    .agent-billboard-card .insight-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }
/* =========================================================================
First-Time Sandbox Guided Tour & Hot Point Pulsing Highlights
========================================================================= */
@keyframes sandboxGlowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.85), 0 0 8px rgba(245, 158, 11, 0.6);
        outline-color: #f59e0b;
    }

    70% {
        box-shadow: 0 0 0 12px rgba(245, 158, 11, 0), 0 0 14px rgba(245, 158, 11, 0.9);
        outline-color: #fbbf24;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0), 0 0 8px rgba(245, 158, 11, 0.6);
        outline-color: #f59e0b;
    }
}

@keyframes sandboxBounceArrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }

    60% {
        transform: translateY(-3px);
    }
}

/* Important: Do NOT override background-color so white text on buttons stays 100% crisp */
.sandbox-tour-highlight {
    animation: sandboxGlowPulse 1.8s infinite ease-in-out !important;
    position: relative !important;
    z-index: 1055 !important;
    outline: 3px solid #f59e0b !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}

.sandbox-tour-badge-pointer {
    position: fixed;
    z-index: 1060;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-weight: bold;
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.45);
    pointer-events: none;
    white-space: nowrap;
    animation: sandboxBounceArrow 1.5s infinite;
}


.sandbox-tour-tooltip-card {
    position: fixed;
    width: 340px;
    max-width: calc(100vw - 20px);
    background: #ffffff;
    border-top: 4px solid #f59e0b;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    border-radius: 8px;
    z-index: 1060;
    padding: 16px;
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    transition: top 0.25s ease, left 0.25s ease;
}

@media (max-width: 767px) {
    .sandbox-tour-tooltip-card {
        padding: 12px 14px;
        font-size: 12.5px;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.32);
    }
}

@media (max-width: 767px) {
    /* Hide the 4-column desktop header on stacked mobile cards */
    .segment-row-header {
        display: none !important;
    }

    /* Make the stacked pills self-explanatory without the header */
    .leader-upside-pill::before {
        content: "Upside: ";
        font-weight: 600;
        opacity: 0.85;
    }

    .slippage-risk-pill::before {
        content: "RRS: ";
        font-weight: 600;
        color: #475569;
    }

    /* Tighten top padding on the scroll container now that the header is hidden */
    .segment-row-scroll {
        padding-top: 6px;
    }
}