/* ==========================================
   TRADING ASSISTANT
========================================== */

.trade-assistant-page .main-content{
    min-width:0;
}

.trade-assistant-scroll{
    padding:26px;
}

.trade-assistant-shell{
    width:100%;
    max-width:1550px;
    margin:0 auto;
}

.trade-assistant-hero{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
    padding:26px 28px;
    border:1px solid var(--border);
    border-radius:20px;
    background:
        linear-gradient(120deg,rgba(124,92,252,.14),transparent 48%),
        var(--panel);
}

.trade-assistant-hero h2{
    margin:5px 0 7px;
    color:var(--text);
    font-size:28px;
    line-height:1.25;
}

.trade-assistant-hero p{
    max-width:760px;
    margin:0;
    color:var(--text-light);
    font-size:13px;
    line-height:1.65;
}

.trade-assistant-hero-links{
    display:flex;
    gap:9px;
    flex-shrink:0;
}

.trade-assistant-hero-links a{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:40px;
    padding:9px 12px;
    border:1px solid var(--border);
    border-radius:11px;
    background:var(--panel-light);
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
    text-decoration:none;
}

.trade-assistant-hero-links a:hover{
    border-color:var(--primary);
    color:var(--text);
}

/* KPI summary */

.trade-assistant-kpis{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    margin-top:18px;
}

.trade-assistant-kpis article{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
    padding:18px;
    border:1px solid var(--border);
    border-radius:16px;
    background:var(--panel);
}

.trade-assistant-kpis article > i{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    flex-shrink:0;
    border-radius:12px;
    background:rgba(124,92,252,.12);
    color:var(--primary-hover);
    font-size:15px;
}

.trade-assistant-kpis article div{
    display:flex;
    flex-direction:column;
    min-width:0;
}

.trade-assistant-kpis span,
.trade-assistant-kpis small{
    overflow:hidden;
    color:var(--text-light);
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.trade-assistant-kpis strong{
    margin:2px 0;
    overflow:hidden;
    color:var(--text);
    font-size:22px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* Trade builder */

.trade-builder-panel,
.trade-review-panel{
    margin-top:18px;
    padding:22px;
    border:1px solid var(--border);
    border-radius:18px;
    background:var(--panel);
}

.trade-builder-header,
.trade-review-heading{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
}

.trade-builder-header h3,
.trade-review-heading h3{
    margin:4px 0 0;
    color:var(--text);
    font-size:19px;
}

.trade-builder-header p{
    margin:6px 0 0;
    color:var(--text-light);
    font-size:12px;
}

.trade-plan-save-state,
.trade-review-rule{
    display:inline-flex;
    align-items:center;
    gap:7px;
    flex-shrink:0;
    padding:7px 10px;
    border:1px solid var(--border);
    border-radius:999px;
    background:rgba(255,255,255,.025);
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
}

.trade-plan-save-state.saved{
    border-color:rgba(66,211,146,.28);
    background:rgba(66,211,146,.08);
    color:var(--success);
}

.trade-builder-grid{
    display:grid;
    grid-template-columns:minmax(300px,1fr) minmax(240px,.55fr) minmax(300px,1fr);
    gap:15px;
    margin-top:20px;
}

.trade-selection-panel,
.trade-balance-panel{
    min-width:0;
    border:1px solid var(--border);
    border-radius:16px;
    background:rgba(255,255,255,.018);
}

.trade-selection-panel{
    padding:15px;
}

.trade-selection-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding-bottom:13px;
    border-bottom:1px solid var(--border);
}

.trade-selection-heading div{
    display:flex;
    flex-direction:column;
}

.trade-selection-heading span{
    color:var(--text-light);
    font-size:12px;
}

.trade-selection-heading strong{
    color:var(--text);
    font-size:14px;
}

.trade-selection-heading a{
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
    text-decoration:none;
}

.trade-selection-heading a:hover{
    color:var(--primary-hover);
}

.trade-candidate-list{
    display:flex;
    flex-direction:column;
    gap:8px;
    max-height:555px;
    margin-top:13px;
    overflow-y:auto;
    padding-right:4px;
}

.trade-candidate{
    width:100%;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto auto;
    align-items:center;
    gap:10px;
    padding:10px;
    border:1px solid var(--border);
    border-radius:13px;
    background:rgba(255,255,255,.025);
    color:inherit;
    font-family:inherit;
    text-align:left;
    cursor:pointer;
    transition:border-color .18s ease,background .18s ease;
}

.trade-candidate:hover,
.trade-candidate.selected{
    border-color:rgba(124,92,252,.58);
    background:rgba(124,92,252,.08);
}

.trade-candidate:disabled{
    cursor:not-allowed;
    opacity:.5;
}

.trade-candidate-image{
    width:47px;
    height:65px;
    display:grid;
    place-items:center;
    flex-shrink:0;
    overflow:hidden;
    border-radius:8px;
    background:var(--panel-light);
    color:var(--text-light);
}

.trade-candidate-image img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.trade-candidate-copy,
.trade-candidate-value{
    display:flex;
    flex-direction:column;
    min-width:0;
}

.trade-candidate-copy small,
.trade-candidate-copy span,
.trade-candidate-value small{
    overflow:hidden;
    color:var(--text-light);
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.trade-candidate-copy strong{
    margin:2px 0;
    overflow:hidden;
    color:var(--text);
    font-size:13px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.trade-candidate-value{
    align-items:flex-end;
    max-width:145px;
}

.trade-candidate-value strong{
    color:var(--text);
    font-size:13px;
    white-space:nowrap;
}

.trade-candidate-value small{
    max-width:135px;
    text-align:right;
}

.trade-candidate-check{
    width:29px;
    height:29px;
    display:grid;
    place-items:center;
    border:1px solid var(--border);
    border-radius:9px;
    color:var(--text-light);
    font-size:12px;
}

.trade-candidate.selected .trade-candidate-check{
    border-color:var(--primary);
    background:var(--primary);
    color:#fff;
}

.trade-candidate-empty{
    min-height:260px;
    place-items:center;
    align-content:center;
    gap:7px;
    color:var(--text-light);
    text-align:center;
}

.trade-candidate-empty:not([hidden]){
    display:grid;
}

.trade-candidate-empty i{
    color:var(--primary-hover);
    font-size:26px;
}

.trade-candidate-empty strong{
    color:var(--text);
    font-size:14px;
}

.trade-candidate-empty span{
    font-size:12px;
}

/* Balance */

.trade-balance-panel{
    display:flex;
    align-items:center;
    flex-direction:column;
    align-self:start;
    padding:20px;
    text-align:center;
}

.trade-balance-icon{
    width:49px;
    height:49px;
    display:grid;
    place-items:center;
    border-radius:14px;
    background:rgba(124,92,252,.13);
    color:var(--primary-hover);
    font-size:18px;
}

.trade-balance-panel > span{
    margin-top:13px;
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.7px;
}

.trade-balance-panel > strong{
    margin-top:4px;
    color:var(--text);
    font-size:20px;
}

.trade-balance-panel[data-tone="fair"] > strong{
    color:var(--success);
}

.trade-balance-panel[data-tone="close"] > strong,
.trade-balance-panel[data-tone="warning"] > strong{
    color:var(--warning);
}

.trade-balance-panel[data-tone="uneven"] > strong{
    color:var(--danger);
}

.trade-balance-panel > p{
    margin:7px 0 0;
    color:var(--text-light);
    font-size:12px;
    line-height:1.6;
}

.trade-value-comparison{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:18px;
}

.trade-value-comparison div{
    padding:10px 8px;
    border:1px solid var(--border);
    border-radius:11px;
    background:rgba(255,255,255,.02);
}

.trade-value-comparison span,
.trade-value-comparison strong{
    display:block;
    color:var(--text-light);
    font-size:12px;
}

.trade-value-comparison strong{
    margin-top:3px;
    color:var(--text);
    font-size:15px;
}

.trade-balance-meter{
    position:relative;
    width:100%;
    height:8px;
    margin-top:18px;
    border-radius:999px;
    background:linear-gradient(90deg,var(--danger),var(--warning) 36%,var(--success) 50%,var(--warning) 64%,var(--danger));
}

.trade-balance-midpoint{
    position:absolute;
    top:-4px;
    bottom:-4px;
    left:50%;
    width:1px;
    background:var(--text);
    opacity:.6;
}

#tradeBalanceIndicator{
    position:absolute;
    top:50%;
    left:50%;
    width:17px;
    height:17px;
    border:3px solid var(--panel);
    border-radius:50%;
    background:var(--text);
    transform:translate(-50%,-50%);
    transition:left .25s ease;
}

.trade-difference-row{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-top:15px;
    color:var(--text-light);
    font-size:12px;
}

.trade-difference-row strong{
    color:var(--text);
}

.trade-plan-actions{
    width:100%;
    display:grid;
    grid-template-columns:.7fr 1.3fr;
    gap:8px;
    margin-top:18px;
}

.trade-plan-actions button{
    min-height:38px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--panel-light);
    color:var(--text-light);
    font-family:inherit;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
}

.trade-plan-actions button.primary{
    border-color:rgba(124,92,252,.55);
    background:rgba(124,92,252,.16);
    color:var(--text);
}

.trade-plan-actions button:hover{
    border-color:var(--primary);
    color:var(--text);
}

/* Atlas review */

.trade-review-rule{
    border-color:rgba(66,211,146,.24);
    background:rgba(66,211,146,.07);
    color:var(--success);
}

.trade-review-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
    margin-top:18px;
}

.trade-review-item{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:12px;
    padding:15px;
    border:1px solid var(--border);
    border-radius:14px;
    background:rgba(255,255,255,.022);
}

.trade-review-item > span{
    width:37px;
    height:37px;
    display:grid;
    place-items:center;
    border-radius:11px;
    background:rgba(124,92,252,.11);
    color:var(--primary-hover);
    font-size:13px;
}

.trade-review-item.positive > span,
.trade-review-item.fair > span{
    background:rgba(66,211,146,.11);
    color:var(--success);
}

.trade-review-item.warning > span,
.trade-review-item.close > span{
    background:rgba(244,183,64,.11);
    color:var(--warning);
}

.trade-review-item.uneven > span{
    background:rgba(255,92,122,.1);
    color:var(--danger);
}

.trade-review-item small{
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.6px;
}

.trade-review-item strong{
    display:block;
    margin-top:2px;
    color:var(--text);
    font-size:14px;
}

.trade-review-item p{
    margin:6px 0 0;
    color:var(--text-light);
    font-size:12px;
    line-height:1.6;
}

@media (max-width:1350px){
    .trade-assistant-kpis{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .trade-builder-grid{
        grid-template-columns:1fr 1fr;
    }

    .trade-balance-panel{
        grid-column:1 / -1;
        grid-row:2;
    }
}

@media (max-width:900px){
    .trade-assistant-scroll{
        padding:18px;
    }

    .trade-assistant-hero,
    .trade-builder-header,
    .trade-review-heading{
        align-items:flex-start;
        flex-direction:column;
    }

    .trade-builder-grid,
    .trade-review-grid{
        grid-template-columns:1fr;
    }

    .trade-balance-panel{
        grid-column:auto;
        grid-row:auto;
    }
}

@media (max-width:620px){
    .trade-assistant-kpis{
        grid-template-columns:1fr;
    }

    .trade-assistant-hero,
    .trade-builder-panel,
    .trade-review-panel{
        padding:18px;
    }

    .trade-assistant-hero h2{
        font-size:23px;
    }

    .trade-assistant-hero-links{
        width:100%;
        flex-direction:column;
    }

    .trade-candidate{
        grid-template-columns:auto minmax(0,1fr) auto;
    }

    .trade-candidate-value{
        grid-column:2;
        align-items:flex-start;
    }

    .trade-candidate-check{
        grid-column:3;
        grid-row:1 / span 2;
    }
}

/* ==========================================
   SMART TRADE MATCH NETWORK
========================================== */

.trade-network-notice{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    margin-bottom:14px;
    padding:13px 15px;
    border:1px solid rgba(244,183,64,.28);
    border-radius:14px;
    background:rgba(244,183,64,.07);
    color:var(--text-light);
}

.trade-network-notice[hidden]{ display:none; }

.trade-network-notice > i{
    color:var(--warning);
    font-size:16px;
}

.trade-network-notice div{
    display:flex;
    gap:9px;
    min-width:0;
    font-size:12px;
    line-height:1.55;
}

.trade-network-notice strong{ color:var(--text); white-space:nowrap; }

.trade-network-notice button{
    width:31px;
    height:31px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:9px;
    background:transparent;
    color:var(--text-light);
    cursor:pointer;
}

.trade-network-notice button:hover{ background:rgba(255,255,255,.06); color:var(--text); }

.trade-network-controls{
    display:grid;
    grid-template-columns:repeat(2,minmax(145px,1fr));
    gap:10px;
    width:min(100%,460px);
}

.trade-mode-control{
    display:flex;
    flex-direction:column;
    gap:5px;
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
}

.trade-mode-control select{
    min-height:42px;
    padding:0 12px;
    border:1px solid var(--border);
    border-radius:11px;
    background:var(--panel-light);
    color:var(--text);
    font:600 12px Poppins,sans-serif;
}

.convention-toggle{
    grid-column:1 / -1;
    position:relative;
    display:flex;
    align-items:center;
    min-height:40px;
    cursor:pointer;
}

.convention-toggle input{ position:absolute; opacity:0; pointer-events:none; }

.convention-toggle span{
    display:flex;
    align-items:center;
    gap:8px;
    width:100%;
    padding:10px 12px;
    border:1px solid var(--border);
    border-radius:11px;
    background:rgba(255,255,255,.025);
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
    transition:var(--transition);
}

.convention-toggle input:checked + span{
    border-color:rgba(66,211,146,.45);
    background:rgba(66,211,146,.09);
    color:var(--success);
}

.trade-alert-panel{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:15px;
    margin-top:18px;
    padding:17px 19px;
    border:1px solid rgba(124,92,252,.3);
    border-radius:17px;
    background:linear-gradient(115deg,rgba(124,92,252,.11),rgba(82,168,255,.04)),var(--panel);
}

.trade-alert-icon{
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    border-radius:13px;
    background:rgba(124,92,252,.15);
    color:var(--primary-hover);
    font-size:16px;
}

.trade-alert-panel > div:nth-child(2) > span{
    color:var(--primary-hover);
    font-size:12px;
    font-weight:700;
    letter-spacing:.7px;
}

.trade-alert-panel h3{ margin:3px 0 2px; color:var(--text); font-size:16px; }
.trade-alert-panel p{ margin:0; color:var(--text-light); font-size:12px; line-height:1.55; }

.trade-alert-panel button,
.trade-primary-action,
.trade-secondary-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:40px;
    padding:9px 14px;
    border:1px solid rgba(124,92,252,.44);
    border-radius:11px;
    background:rgba(124,92,252,.13);
    color:var(--text);
    font:600 12px Poppins,sans-serif;
    text-decoration:none;
    cursor:pointer;
}

.trade-alert-panel button:hover,
.trade-primary-action:hover,
.trade-secondary-link:hover{ border-color:var(--primary-hover); background:rgba(124,92,252,.2); }

.trade-view-tabs{
    display:flex;
    gap:8px;
    margin:18px 0 14px;
    overflow-x:auto;
    scrollbar-width:thin;
}

.trade-view-tabs button{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
    min-height:42px;
    padding:9px 13px;
    border:1px solid var(--border);
    border-radius:11px;
    background:var(--panel);
    color:var(--text-light);
    font:600 12px Poppins,sans-serif;
    cursor:pointer;
}

.trade-view-tabs button span{
    min-width:22px;
    padding:2px 6px;
    border-radius:999px;
    background:rgba(255,255,255,.06);
    text-align:center;
    font-size:12px;
}

.trade-view-tabs button.active{
    border-color:rgba(124,92,252,.5);
    background:rgba(124,92,252,.13);
    color:var(--text);
}

.trade-view{
    padding:22px;
    border:1px solid var(--border);
    border-radius:18px;
    background:var(--panel);
}

.trade-view[hidden]{ display:none !important; }

.trade-section-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin-bottom:18px;
}

.trade-section-heading h3{ margin:4px 0 3px; color:var(--text); font-size:20px; }
.trade-section-heading p{ max-width:760px; margin:0; color:var(--text-light); font-size:12px; line-height:1.6; }

.trade-section-heading label{
    display:flex;
    flex-direction:column;
    gap:5px;
    color:var(--text-light);
    font-size:12px;
    font-weight:600;
}

.trade-section-heading select{
    min-width:165px;
    min-height:40px;
    padding:0 11px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--panel-light);
    color:var(--text);
    font:600 12px Poppins,sans-serif;
}

.smart-match-grid{ display:grid; gap:14px; }

.smart-match-card{
    position:relative;
    display:grid;
    grid-template-columns:78px minmax(210px,.75fr) minmax(235px,.9fr) minmax(390px,1.45fr) auto;
    align-items:center;
    gap:15px;
    padding:16px;
    border:1px solid var(--border);
    border-radius:16px;
    background:rgba(255,255,255,.022);
    transition:var(--transition);
}

.smart-match-card:hover{ border-color:rgba(124,92,252,.45); background:rgba(124,92,252,.045); }

.smart-match-score{
    width:68px;
    height:68px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(66,211,146,.3);
    border-radius:50%;
    background:rgba(66,211,146,.08);
}

.smart-match-score strong{ color:var(--success); font-size:18px; line-height:1; }
.smart-match-score span{ margin-top:4px; color:var(--text-light); font-size:12px; }

.smart-match-profile{ display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px; }
.smart-match-profile h4{ margin:0; color:var(--text); font-size:15px; }
.smart-match-profile h4 i{ color:#52a8ff; font-size:12px; }
.smart-match-profile p{ margin:3px 0 0; color:var(--text-light); font-size:12px; line-height:1.5; }
.collector-avatar-sm,
.collector-avatar-lg{
    display:grid;
    place-items:center;
    flex-shrink:0;
    border:1px solid rgba(124,92,252,.34);
    border-radius:12px;
    background:rgba(124,92,252,.14);
    color:var(--primary-hover);
    font-weight:700;
}
.collector-avatar-sm{ width:39px; height:39px; font-size:12px; }
.collector-avatar-lg{ width:58px; height:58px; border-radius:16px; font-size:16px; }
.profile-stars{ color:var(--warning); letter-spacing:1px; }
.match-distance{ grid-column:2; color:var(--text-light); font-size:12px; }

.smart-match-facts{ display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.smart-match-facts li{ display:flex; align-items:flex-start; gap:7px; color:var(--text-light); font-size:12px; line-height:1.45; }
.smart-match-facts i{ margin-top:3px; color:var(--success); font-size:12px; }

.match-exchange-preview{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    align-items:center;
    gap:10px;
}
.match-exchange-preview > div > span{ display:block; margin-bottom:5px; color:var(--text-light); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; }
.match-exchange-preview > i{ color:var(--primary-hover); font-size:13px; }
.match-exchange-preview > div > small{ display:block; margin-top:4px; color:var(--text-light); font-size:12px; }

.match-card-mini{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; min-width:0; margin-top:5px; }
.match-card-mini-image{ width:34px; height:46px; display:grid; place-items:center; overflow:hidden; border-radius:6px; background:var(--panel-light); color:var(--text-light); }
.match-card-mini-image img{ width:100%; height:100%; object-fit:contain; }
.match-card-mini div{ min-width:0; }
.match-card-mini small,
.match-card-mini strong,
.match-card-mini div > span{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.match-card-mini small{ color:var(--primary-hover); font-size:12px; }
.match-card-mini strong{ color:var(--text); font-size:12px; }
.match-card-mini div > span{ color:var(--text-light); font-size:12px; }

.smart-match-result{ display:grid; gap:7px; min-width:132px; }
.smart-match-result div{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; column-gap:8px; }
.smart-match-result span{ color:var(--text-light); font-size:12px; }
.smart-match-result strong{ color:var(--text); font-size:13px; }
.smart-match-result small{ grid-column:1 / -1; color:var(--text-light); font-size:12px; text-transform:capitalize; }

.smart-match-actions{ display:grid; gap:8px; }
.smart-match-actions button,
.network-opportunity-list button,
.set-plan-trades button{
    min-height:37px;
    padding:8px 11px;
    border:1px solid var(--border);
    border-radius:10px;
    background:var(--panel-light);
    color:var(--text-light);
    font:600 12px Poppins,sans-serif;
    white-space:nowrap;
    cursor:pointer;
}
.smart-match-actions button.primary{ border-color:rgba(124,92,252,.48); background:rgba(124,92,252,.15); color:var(--text); }
.smart-match-actions button:hover,
.network-opportunity-list button:hover,
.set-plan-trades button:hover{ border-color:var(--primary); color:var(--text); }

.trade-empty-state{
    display:grid;
    place-items:center;
    gap:8px;
    min-height:250px;
    padding:28px;
    border:1px dashed var(--border);
    border-radius:15px;
    color:var(--text-light);
    text-align:center;
}
.trade-empty-state[hidden]{ display:none; }
.trade-empty-state i{ color:var(--primary-hover); font-size:28px; }
.trade-empty-state strong{ color:var(--text); font-size:16px; }
.trade-empty-state span{ font-size:12px; }
.trade-empty-state div{ display:flex; gap:8px; }
.trade-empty-state a{ padding:8px 11px; border:1px solid var(--border); border-radius:9px; color:var(--text); font-size:12px; text-decoration:none; }
.trade-empty-state.inline{ min-height:150px; }

.complete-set-summary,
.trade-network-stats,
.trade-history-summary{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
}
.complete-set-summary article,
.trade-network-stats article,
.trade-history-summary article{
    padding:15px;
    border:1px solid var(--border);
    border-radius:13px;
    background:rgba(255,255,255,.022);
}
.complete-set-summary span,
.trade-network-stats span,
.trade-history-summary span{ display:block; color:var(--text-light); font-size:12px; }
.complete-set-summary strong,
.trade-network-stats strong,
.trade-history-summary strong{ display:block; margin-top:4px; color:var(--text); font-size:21px; }
.complete-set-summary small{ display:block; margin-top:3px; color:var(--text-light); font-size:12px; }

.complete-set-card-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-top:14px;
}
.complete-set-card-grid article{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; padding:11px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.02); }
.complete-set-card-grid article > span{ width:42px; height:56px; display:grid; place-items:center; overflow:hidden; border-radius:6px; background:var(--panel-light); color:var(--text-light); }
.complete-set-card-grid img{ width:100%; height:100%; object-fit:contain; }
.complete-set-card-grid small,
.complete-set-card-grid strong,
.complete-set-card-grid p{ display:block; overflow:hidden; margin:0; text-overflow:ellipsis; white-space:nowrap; }
.complete-set-card-grid small{ color:var(--primary-hover); font-size:12px; }
.complete-set-card-grid strong{ color:var(--text); font-size:13px; }
.complete-set-card-grid p{ margin-top:3px; color:var(--text-light); font-size:12px; }

.set-plan-heading{ display:flex; align-items:center; gap:12px; margin-top:15px; padding:14px; border:1px solid rgba(66,211,146,.25); border-radius:13px; background:rgba(66,211,146,.06); }
.set-plan-heading > i{ color:var(--success); font-size:18px; }
.set-plan-heading strong,
.set-plan-heading span{ display:block; }
.set-plan-heading strong{ color:var(--text); font-size:15px; }
.set-plan-heading span{ color:var(--text-light); font-size:12px; }
.set-plan-trades{ display:grid; gap:9px; margin-top:10px; }
.set-plan-trades article,
.network-opportunity-list article{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    padding:12px;
    border:1px solid var(--border);
    border-radius:12px;
    background:rgba(255,255,255,.02);
}
.set-plan-trades article > span,
.network-opportunity-list article > span{ width:31px; height:31px; display:grid; place-items:center; border-radius:9px; background:rgba(124,92,252,.12); color:var(--primary-hover); font-size:12px; font-weight:700; }
.set-plan-trades small,
.set-plan-trades strong,
.set-plan-trades p,
.network-opportunity-list small,
.network-opportunity-list strong,
.network-opportunity-list p{ display:block; margin:0; }
.set-plan-trades small,
.network-opportunity-list small{ color:var(--primary-hover); font-size:12px; }
.set-plan-trades strong,
.network-opportunity-list strong{ color:var(--text); font-size:13px; }
.set-plan-trades p,
.network-opportunity-list p{ margin-top:2px; color:var(--text-light); font-size:12px; }

.preview-network-chip{ display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid rgba(244,183,64,.27); border-radius:999px; background:rgba(244,183,64,.07); color:var(--warning); font-size:12px; font-weight:700; }

.three-way-panel{ margin-top:14px; padding:18px; border:1px solid var(--border); border-radius:15px; background:rgba(255,255,255,.02); }
.three-way-heading{ display:flex; align-items:center; justify-content:space-between; gap:15px; }
.three-way-heading h3{ margin:3px 0 0; color:var(--text); font-size:18px; }
.three-way-heading > strong{ color:var(--success); font-size:13px; }
.three-way-flow{ display:grid; grid-template-columns:1fr auto 1fr auto 1fr auto 1fr; align-items:center; gap:10px; margin-top:17px; }
.three-way-flow article{ display:flex; flex-direction:column; align-items:center; gap:5px; min-width:0; padding:14px 9px; border:1px solid var(--border); border-radius:13px; background:var(--panel-light); text-align:center; }
.three-way-flow article strong{ color:var(--text); font-size:13px; }
.three-way-flow article small{ max-width:100%; overflow:hidden; color:var(--text-light); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.three-way-flow > i{ color:var(--primary-hover); }
.three-way-return{ border-color:rgba(66,211,146,.3) !important; background:rgba(66,211,146,.06) !important; }
.three-way-panel > p{ margin:13px 0 0; color:var(--text-light); font-size:12px; line-height:1.6; text-align:center; }
.network-opportunity-list{ display:grid; gap:9px; margin-top:14px; }

.trade-history-list{ display:grid; gap:9px; margin-top:14px; }
.trade-history-list > article{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:11px; padding:12px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.02); }
.trade-history-list > article > span{ width:34px; height:34px; display:grid; place-items:center; border-radius:10px; background:rgba(124,92,252,.12); color:var(--primary-hover); }
.trade-history-list small,
.trade-history-list strong,
.trade-history-list p{ display:block; margin:0; }
.trade-history-list small{ color:var(--text-light); font-size:12px; }
.trade-history-list strong{ color:var(--text); font-size:13px; }
.trade-history-list p{ margin-top:2px; color:var(--text-light); font-size:12px; }
.trade-history-list em{ color:var(--success); font-size:12px; font-style:normal; font-weight:700; }

/* Manual builder */

.manual-trade-builder{ margin-top:16px; border:1px solid var(--border); border-radius:18px; background:var(--panel); overflow:hidden; }
.manual-trade-builder > summary{ display:flex; align-items:center; justify-content:space-between; gap:15px; padding:17px 20px; color:var(--text); cursor:pointer; list-style:none; }
.manual-trade-builder > summary::-webkit-details-marker{ display:none; }
.manual-trade-builder > summary > span{ display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:3px 10px; }
.manual-trade-builder > summary > span > i{ grid-row:1 / span 2; color:var(--primary-hover); font-size:17px; }
.manual-trade-builder > summary strong{ font-size:15px; }
.manual-trade-builder > summary small{ color:var(--text-light); font-size:12px; }
.manual-trade-builder > summary > i{ transition:transform .2s ease; }
.manual-trade-builder[open] > summary > i{ transform:rotate(180deg); }
.manual-trade-builder .trade-builder-panel{ margin-top:0; border-width:1px 0 0; border-radius:0; }
.manual-trade-builder .trade-review-panel{ margin-top:0; border-width:1px 0 0; border-radius:0; }
.trade-score-row{ display:flex; align-items:center; justify-content:space-between; width:100%; margin-top:8px; padding:9px 10px; border:1px solid var(--border); border-radius:10px; background:rgba(255,255,255,.025); }
.trade-score-row span{ color:var(--text-light); font-size:12px; }
.trade-score-row strong{ color:var(--text); font-size:15px; }
.trade-plan-actions{ grid-template-columns:repeat(3,minmax(0,1fr)); }

/* Match details */

body.trade-modal-open{ overflow:hidden; }
.trade-match-modal{ position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:22px; }
.trade-match-modal[hidden]{ display:none; }
.trade-match-modal-backdrop{ position:absolute; inset:0; background:rgba(7,9,15,.78); backdrop-filter:blur(5px); }
.trade-match-modal-card{ position:relative; z-index:1; width:min(980px,100%); max-height:min(880px,calc(100vh - 44px)); overflow:auto; padding:25px; border:1px solid var(--border); border-radius:20px; background:var(--panel); }
.trade-match-modal-close{ position:absolute; top:16px; right:16px; width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--border); border-radius:11px; background:var(--panel-light); color:var(--text-light); cursor:pointer; }
.trade-match-modal-close:hover{ color:var(--text); border-color:var(--primary); }
.trade-modal-profile{ display:flex; align-items:center; gap:13px; padding-right:48px; }
.trade-modal-profile h2{ margin:3px 0 2px; color:var(--text); font-size:24px; }
.trade-modal-profile h2 i{ color:#52a8ff; font-size:14px; }
.trade-modal-profile p{ margin:0; color:var(--text-light); font-size:12px; }
.trade-modal-summary{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:18px; }
.trade-modal-summary article{ padding:13px; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,.022); }
.trade-modal-summary span,
.trade-modal-summary strong,
.trade-modal-summary small{ display:block; }
.trade-modal-summary span{ color:var(--text-light); font-size:12px; }
.trade-modal-summary strong{ margin-top:3px; color:var(--text); font-size:17px; }
.trade-modal-summary small{ margin-top:2px; color:var(--text-light); font-size:12px; }
.trade-modal-exchange{ display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:14px; margin-top:16px; }
.trade-modal-exchange > i{ color:var(--primary-hover); }
.trade-modal-exchange section{ display:grid; gap:8px; padding:14px; border:1px solid var(--border); border-radius:14px; background:rgba(255,255,255,.02); }
.trade-modal-exchange h3{ margin:0 0 3px; color:var(--text); font-size:15px; }
.trade-modal-exchange article{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:9px; }
.trade-modal-exchange article > img{ width:42px; height:58px; object-fit:contain; border-radius:6px; }
.trade-modal-exchange article > i{ width:42px; height:58px; display:grid; place-items:center; background:var(--panel-light); color:var(--text-light); }
.trade-modal-exchange small,
.trade-modal-exchange strong,
.trade-modal-exchange span{ display:block; }
.trade-modal-exchange small{ color:var(--primary-hover); font-size:12px; }
.trade-modal-exchange strong{ color:var(--text); font-size:13px; }
.trade-modal-exchange span{ color:var(--text-light); font-size:12px; }
.binder-comparison,
.compatibility-breakdown{ margin-top:16px; padding:15px; border:1px solid var(--border); border-radius:14px; background:rgba(255,255,255,.02); }
.binder-comparison h3,
.compatibility-breakdown h3{ margin:3px 0 0; color:var(--text); font-size:16px; }
.binder-highlight-grid{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-top:12px; }
.binder-highlight-grid article{ display:grid; grid-template-columns:auto minmax(0,1fr); gap:3px 8px; padding:11px; border:1px solid var(--border); border-radius:11px; }
.binder-highlight-grid i{ grid-row:1 / span 2; margin-top:3px; }
.binder-highlight-grid span{ color:var(--text-light); font-size:12px; }
.binder-highlight-grid strong{ color:var(--text); font-size:12px; }
.binder-highlight-grid .green i{ color:var(--success); }
.binder-highlight-grid .blue i{ color:#52a8ff; }
.binder-highlight-grid .gold i{ color:var(--warning); }
.compatibility-breakdown > div{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-top:12px; }
.compatibility-breakdown span{ display:flex; flex-direction:column; gap:3px; padding:9px; border:1px solid var(--border); border-radius:10px; color:var(--text-light); font-size:12px; }
.compatibility-breakdown strong{ color:var(--text); font-size:13px; }
.trade-modal-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.trade-modal-actions button{ min-height:40px; padding:9px 13px; border:1px solid var(--border); border-radius:10px; background:var(--panel-light); color:var(--text-light); font:600 12px Poppins,sans-serif; cursor:pointer; }
.trade-modal-actions button.primary{ border-color:rgba(124,92,252,.5); background:rgba(124,92,252,.15); color:var(--text); }
.trade-modal-actions button:hover{ border-color:var(--primary); color:var(--text); }

.trade-toast{ position:fixed; right:24px; bottom:24px; z-index:1100; max-width:380px; padding:12px 15px; border:1px solid rgba(66,211,146,.35); border-radius:12px; background:var(--panel); color:var(--text); font-size:12px; opacity:0; transform:translateY(14px); pointer-events:none; transition:.2s ease; }
.trade-toast.show{ opacity:1; transform:translateY(0); }

@media (max-width:1450px){
    .smart-match-card{ grid-template-columns:70px minmax(190px,.8fr) minmax(220px,1fr) minmax(350px,1.5fr); }
    .smart-match-result{ grid-column:2 / 4; grid-template-columns:repeat(3,minmax(0,1fr)); }
    .smart-match-actions{ grid-column:4; grid-row:2; grid-template-columns:repeat(2,auto); justify-content:end; }
}

@media (max-width:1120px){
    .trade-assistant-hero{ align-items:flex-start; flex-direction:column; }
    .trade-network-controls{ width:100%; }
    .smart-match-card{ grid-template-columns:70px minmax(0,1fr); }
    .smart-match-facts,
    .match-exchange-preview,
    .smart-match-result,
    .smart-match-actions{ grid-column:1 / -1; }
    .smart-match-result{ grid-template-columns:repeat(3,minmax(0,1fr)); }
    .smart-match-actions{ grid-row:auto; grid-template-columns:repeat(2,minmax(0,1fr)); }
    .complete-set-card-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:820px){
    .trade-network-notice div{ flex-direction:column; gap:2px; }
    .trade-network-notice strong{ white-space:normal; }
    .trade-alert-panel{ grid-template-columns:auto minmax(0,1fr); }
    .trade-alert-panel button{ grid-column:1 / -1; }
    .trade-section-heading{ align-items:flex-start; flex-direction:column; }
    .complete-set-summary,
    .trade-network-stats,
    .trade-history-summary,
    .trade-modal-summary{ grid-template-columns:repeat(2,minmax(0,1fr)); }
    .three-way-flow{ grid-template-columns:1fr; }
    .three-way-flow > i{ transform:rotate(90deg); }
    .trade-modal-exchange{ grid-template-columns:1fr; }
    .trade-modal-exchange > i{ transform:rotate(90deg); justify-self:center; }
    .binder-highlight-grid,
    .compatibility-breakdown > div{ grid-template-columns:1fr; }
    .trade-modal-actions{ flex-direction:column; }
}

@media (max-width:600px){
    .trade-assistant-scroll{ padding:14px; }
    .trade-assistant-hero,
    .trade-view{ padding:17px; }
    .trade-network-controls,
    .trade-assistant-kpis,
    .complete-set-summary,
    .trade-network-stats,
    .trade-history-summary,
    .complete-set-card-grid,
    .trade-modal-summary{ grid-template-columns:1fr; }
    .trade-assistant-hero h2{ font-size:24px; }
    .match-exchange-preview{ grid-template-columns:1fr; }
    .match-exchange-preview > i{ transform:rotate(90deg); justify-self:center; }
    .smart-match-result{ grid-template-columns:1fr; }
    .smart-match-actions{ grid-template-columns:1fr; }
    .set-plan-trades article,
    .network-opportunity-list article{ grid-template-columns:auto minmax(0,1fr); }
    .set-plan-trades button,
    .network-opportunity-list button{ grid-column:1 / -1; }
    .trade-match-modal{ padding:8px; }
    .trade-match-modal-card{ max-height:calc(100vh - 16px); padding:19px; border-radius:16px; }
    .trade-modal-profile{ align-items:flex-start; }
    .trade-toast{ right:14px; bottom:14px; left:14px; max-width:none; }
}
