/* Hero */
.hero-banner {
    padding: 22px 0 52px;
    min-height: 148px;
    background-color: #eaf3ff;
    background-image: url('/trade-insights/assets/img/bg001.png');
    background-position: right center;
    background-size: cover;
    background-repeat: no-repeat;
}

.breadcrumb {
    margin: 0 0 12px;
    color: #8aa0ba;
    font-size: 13px;
}

.breadcrumb a {
    color: #8aa0ba;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--blue);
}

.breadcrumb span {
    margin: 0 8px;
    color: #c2cede;
}

.hero-banner h1 {
    margin: 0;
    color: var(--blue);
    font-size: 30px;
    font-weight: 700;
}

.hero-banner h1 + p {
    margin: 8px 0 0;
    max-width: 560px;
    color: #5f7593;
    font-size: 14px;
}

.page-content {
    margin-top: -28px;
    padding-bottom: 48px;
}

/* Shared cards */
.search-card,
.summary-bar,
.trader-card,
.side-panel section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Search */
.search-card {
    width: 100%;
    overflow: hidden;
}

.tabs {
    display: flex;
    gap: 32px;
    padding: 0 24px;
    border-bottom: 1px solid var(--line);
}

.tabs a {
    position: relative;
    padding: 16px 2px 14px;
    color: #536579;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.tabs a.active {
    color: var(--blue);
}

.tabs a.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--blue);
}

.filter-grid {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 140px 108px;
    gap: 16px;
    align-items: end;
    width: 100%;
    padding: 20px 24px;
}

.filter-grid label,
.page-size {
    display: grid;
    gap: 6px;
    color: #61748c;
    font-size: 13px;
}

.filter-grid input,
.filter-grid select,
.page-size select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #d7e1ee;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: 14px inherit;
    outline: none;
}

.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(20, 121, 233, 0.12);
}

.filter-grid .button-primary {
    width: 100%;
}

.notice {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 6px;
    color: #b85020;
    background: #fff3eb;
}

/* Content: left results + right sidebar, same total width as search */
.page-content > .search-card,
.page-content > .content-grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 18px;
    align-items: start;
    margin-top: 18px;
    overflow: hidden;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 18px;
}

.summary-bar__text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #6a7c93;
    font-size: 14px;
}

.summary-bar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 4px;
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue);
}

.summary-bar__icon svg {
    width: 18px;
    height: 18px;
}

.summary-bar strong {
    margin: 0 2px;
    color: var(--blue);
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.page-size {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #61748c;
    font-size: 13px;
    white-space: nowrap;
}

.page-size select {
    width: 92px;
}

/* Trader cards */
.trader-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.trader-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.trader-card:hover {
    border-color: #c8dbf4;
    box-shadow: 0 10px 24px rgba(22, 48, 86, 0.08);
}

.trader-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.trader-card__title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--navy);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.trader-card__title:hover {
    color: var(--blue);
}

.country-flag {
    flex: none;
    width: 22px;
    height: auto;
    max-height: 16px;
    margin-top: 3px;
    border: 1px solid var(--line);
    border-radius: 3px;
    object-fit: cover;
}

.trader-card__badge {
    display: inline-block;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-hot {
    background: var(--green-soft);
    color: #178a59;
}

.badge-active {
    background: var(--blue-soft);
    color: var(--blue);
}

.badge-potential {
    background: #f1eef9;
    color: #6d5ea8;
}

.trader-card__metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.metric {
    padding: 10px 12px;
    border: 1px solid #edf2f8;
    border-radius: 8px;
    background: #f8fafd;
}

.metric dt {
    margin: 0;
    color: #8a98ab;
    font-size: 11px;
}

.metric dd {
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trader-card dl {
    margin: 0 0 12px;
    flex: 1;
}

.trader-card dl div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed #e8eef5;
}

.trader-card dl div:last-child {
    border-bottom: 0;
}

.trader-card dt {
    color: #93a0b2;
    font-size: 12px;
}

.trader-card dd {
    margin: 0;
    overflow: hidden;
    color: #4f6178;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-link {
    align-self: flex-end;
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.card-link:hover {
    color: var(--blue-hover);
}

/* Sidebar */
.side-panel {
    display: grid;
    gap: 14px;
    align-content: start;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* 覆盖官网 style.css 对 section 的宽度干扰，避免侧栏撑破下方布局 */
body.trade-insights-page .side-panel > section {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    padding: 18px;
}

.side-panel h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
}

.side-panel .section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 1;
}

.side-panel .section-icon--clock {
    font-size: 15px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    border: 0;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.tag:nth-child(6n + 1) { background: #e7f6ee; color: #2c8a5d; }
.tag:nth-child(6n + 2) { background: #efeaf9; color: #6a59ad; }
.tag:nth-child(6n + 3) { background: #fff0e8; color: #c45d2d; }
.tag:nth-child(6n + 4) { background: #e8f3fc; color: #2f78b3; }
.tag:nth-child(6n + 5) { background: #fce8f1; color: #b4476d; }
.tag:nth-child(6n)     { background: #f7f3e6; color: #8a7930; }

.tag:hover {
    filter: brightness(0.97);
}

.recent-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.recent-list li {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #eef2f7;
}

.recent-list li:last-child {
    border-bottom: 0;
}

.recent-list .dot {
    flex: none;
    width: 7px;
    height: 7px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--blue);
}

.recent-list li:nth-child(3n + 2) .dot { background: var(--green); }
.recent-list li:nth-child(3n) .dot { background: #f0a035; }

.recent-list__body {
    min-width: 0;
    flex: 1;
}

.recent-list a {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-list a:hover {
    color: var(--blue);
}

.recent-list time {
    display: block;
    margin-top: 2px;
    color: #9ba8b9;
    font-size: 12px;
}

.recent-loading {
    color: #9ba8b9;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 0 !important;
}

.trial-panel {
    background: linear-gradient(145deg, #f0f7ff, #fff) !important;
}

.trial-panel p {
    margin: 0 0 14px;
    color: #6d7f96;
    font-size: 13px;
    line-height: 1.65;
}

.trial-panel .button-primary {
    width: 100%;
}

.loading,
.empty-state {
    margin: 14px 0;
    padding: 36px 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: #8696a9;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 4px;
}

.pagination a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d7e1ee;
    border-radius: 6px;
    background: #fff;
    color: #54708f;
    font-size: 13px;
    text-decoration: none;
}

.pagination a.pagination-nav {
    min-width: 68px;
}

.pagination a:hover:not(.is-current):not(.is-disabled) {
    border-color: #b8d0ef;
    color: var(--blue);
}

.pagination a.is-current {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
    cursor: default;
    pointer-events: none;
}

.pagination a.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.page-info {
    margin-left: 4px;
    color: #6d7f96;
    font-size: 13px;
    white-space: nowrap;
}

.tag-list .tag {
    display: inline-flex;
    text-decoration: none;
}

@media (max-width: 960px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-grid .button-primary {
        grid-column: span 2;
    }

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

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

    .trial-panel {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .hero-banner h1 {
        font-size: 24px;
    }

    .filter-grid,
    .trader-grid,
    .side-panel,
    .trader-card__metrics {
        grid-template-columns: 1fr;
    }

    .filter-grid .button-primary,
    .trial-panel {
        grid-column: auto;
    }

    .summary-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .tabs {
        gap: 20px;
        padding: 0 16px;
    }
}
