/* css/trade.css | v1.6.79 trade_proposal_share_short_url_public_read_20260812 */

.trade-page {
    display: block;
    box-sizing: border-box;
    padding: 0 10px 18px 0;
}

.trade-proposal-editor {
    box-sizing: border-box;
    padding: 10px 4px 0 14px;
}

/* -------------------------------------------------------------------------
   Create Trade Proposal editor
   ------------------------------------------------------------------------- */

.trade-proposal-card {
    position: relative;
    box-sizing: border-box;
    padding: 14px 16px 16px;
}

.trade-proposal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.trade-proposal-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
}

.trade-proposal-loading {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    color: #fff;
    font-weight: 800;
    background: rgba(8, 20, 36, 0.66);
    border-radius: 12px;
}

.trade-proposal-loading[hidden],
#tradeMainTabs[hidden] {
    display: none !important;
}

.trade-proposal-intro {
    padding: 11px 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(36, 104, 168, 0.18);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(229, 242, 255, 0.9), rgba(247, 251, 255, 0.96));
}

.trade-proposal-intro h2 {
    margin: 0 0 4px;
    color: #173a5e;
    font-size: 1.08rem;
}

.trade-proposal-intro p {
    margin: 0;
    color: #49647e;
    font-size: 0.78rem;
    line-height: 1.5;
}

.trade-proposal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.trade-proposal-side {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(35, 83, 128, 0.22);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(28, 63, 98, 0.08);
}

.trade-proposal-team-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 60px;
    padding: 9px 11px;
    border-bottom: 1px solid rgba(35, 83, 128, 0.16);
    background: linear-gradient(135deg, #edf6ff, #f8fbff);
}

.trade-proposal-team-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.trade-proposal-side-label {
    margin-bottom: 2px;
    color: #6e8295;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.trade-proposal-team-name {
    color: #173a5e;
    font-size: 0.9rem;
    font-weight: 900;
    text-decoration: none;
}

.trade-proposal-team-name:hover {
    color: #1477bd;
    text-decoration: underline;
}

.trade-proposal-count {
    display: inline-flex;
    grid-column: 3;
    justify-self: end;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 52px;
    min-width: 52px;
    height: 28px;
    padding: 0;
    color: #17669a;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
    border: 1px solid rgba(23, 102, 154, 0.25);
    border-radius: 999px;
    background: #fff;
}

.trade-proposal-count.full {
    color: #fff;
    background: #17669a;
}

.trade-proposal-table-wrap {
    max-height: 560px;
    overflow-x: hidden;
    overflow-y: auto;
}

.trade-proposal-table {
    width: 100%;
    min-width: 0;
    margin: 0;
    table-layout: fixed;
}

.trade-proposal-table th,
.trade-proposal-table td {
    overflow: hidden;
    padding-right: 3px;
    padding-left: 3px;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-proposal-table th:nth-child(1),
.trade-proposal-table td:nth-child(1) { width: 7%; }

.trade-proposal-table th:nth-child(2),
.trade-proposal-table td:nth-child(2) { width: 18%; }

.trade-proposal-table th:nth-child(3),
.trade-proposal-table td:nth-child(3) { width: 9%; }

.trade-proposal-table th:nth-child(4),
.trade-proposal-table td:nth-child(4) { width: 9%; }

.trade-proposal-table th:nth-child(5),
.trade-proposal-table td:nth-child(5) { width: 9%; }

.trade-proposal-table th:nth-child(6),
.trade-proposal-table td:nth-child(6) { width: 9%; }

.trade-proposal-table th:nth-child(7),
.trade-proposal-table td:nth-child(7) { width: 15%; }

.trade-proposal-table th:nth-child(8),
.trade-proposal-table td:nth-child(8) { width: 24%; }

.trade-proposal-table .market-name-cell {
    padding-left: 6px !important;
}

.trade-proposal-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.trade-proposal-table tbody tr.selected {
    background: #eaf7ff;
}

.trade-proposal-checkbox {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #1477bd;
}

.trade-proposal-player-name {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 3px;
    vertical-align: middle;
}

.trade-proposal-player-name .market-player-link {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade-proposal-player-markers {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 1px;
}

.trade-proposal-player-marker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.trade-proposal-player-marker.injury {
    color: #d71920;
}

.trade-proposal-player-marker.minor {
    color: #536b83;
    font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Arial Unicode MS", sans-serif;
    font-size: 0.92rem;
    font-weight: 400;
}

.trade-proposal-footer {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(35, 83, 128, 0.16);
}

.trade-proposal-selection-summary {
    color: #4c6478;
    font-weight: 800;
}

.trade-proposal-preview {
    padding: 14px 16px;
    border: 1px solid rgba(35, 83, 128, 0.2);
    border-radius: 10px;
    background: #f7fbff;
}

.trade-proposal-preview.ready {
    color: #1f6848;
    border-color: rgba(38, 139, 91, 0.34);
    background: #effaf4;
}

.trade-proposal-preview.blocked,
.trade-proposal-preview.error {
    color: #9c342e;
    border-color: rgba(185, 62, 52, 0.3);
    background: #fff3f1;
}

.trade-proposal-preview-title {
    margin-bottom: 6px;
    font-weight: 900;
}

.trade-proposal-preview-detail {
    color: inherit;
    line-height: 1.65;
}

.trade-proposal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.trade-proposal-actions .market-action-btn {
    min-width: 142px;
}

@media (max-width: 1100px) {
    .trade-proposal-grid {
        grid-template-columns: 1fr;
    }

    .trade-proposal-table-wrap {
        max-height: 460px;
    }

    .trade-proposal-table th,
    .trade-proposal-table td {
        font-size: 0.78rem;
    }
}

@media (max-width: 640px) {
    .trade-page {
        padding: 0 10px 14px 0;
    }

    .trade-proposal-editor {
        padding: 8px 0 0 9px;
    }

    .trade-proposal-card {
        padding: 11px 10px 13px;
    }

    .trade-proposal-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .trade-proposal-back {
        align-self: flex-start;
    }

    .trade-proposal-team-head {
        padding: 10px;
    }

    .trade-proposal-table {
        min-width: 540px;
    }

    .trade-proposal-table-wrap {
        overflow-x: auto;
    }

    .trade-proposal-actions {
        flex-direction: column;
    }

    .trade-proposal-actions .market-action-btn {
        width: 100%;
    }
}

.trade-title-divider {
    border: 0;
    height: 5px;
    background: rgb(5, 71, 0);
    margin: -10px 10px 10px 0;
    opacity: 1;
}

.trade-main-tabs {
    width: 100%;
    margin: 8px 0 18px 0;
}

.trade-main-tabs .bh-tabs {
    width: 100% !important;
    display: flex !important;
    overflow: visible !important;
}

.trade-main-tabs .bh-tab {
    flex: 1 1 33.3333% !important;
    width: 33.3333% !important;
    min-width: 0 !important;
    max-width: none !important;
}

.trade-panel[hidden],
.trade-window-badge[hidden],
.trade-mine-toolbar[hidden] {
    display: none !important;
}

.trade-window-badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border: 1px solid #cfe0ca;
    border-radius: 999px;
    background: #e8f3e5;
    color: #064b12;
    font-size: 12px;
    font-weight: 900;
}

.trade-window-badge.closed {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #6b7280;
}

.trade-status-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.trade-market-filter-card {
    padding-top: 12px;
}

.trade-scope-tabs {
    margin: 0 auto 12px auto;
}

.trade-filter-row {
    justify-content: center;
}

.trade-vip-select-grid {
    justify-content: center;
}

.trade-vip-range-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trade-name-filter {
    flex: 0 1 220px;
}

.trade-filter-input {
    width: 150px;
    height: 30px;
    min-width: 120px;
    padding: 4px 10px;
    border: 1px solid #d9e2d6;
    border-radius: 5px;
    background: #fff;
    color: #064b12;
    font-size: 12px;
    font-weight: 800;
    outline: none;
}

.trade-filter-input::placeholder {
    color: #9ca3af;
    font-weight: 700;
}

.trade-filter-input:focus {
    border-color: #065f46;
    box-shadow: 0 0 0 2px rgba(6, 95, 70, 0.14);
}

.trade-mine-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #d9e2d6;
    flex-wrap: wrap;
}

.trade-selection-summary {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.trade-mine-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trade-table-wrap {
    min-height: 128px;
}

.trade-market-table .trade-select-cell {
    width: 48px;
}

.trade-player-type,
.trade-roster-status {
    color: #334155;
    font-weight: 800;
}

.trade-listing-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.trade-listing-state.listed {
    background: #e8f3e5;
    color: #064b12;
}

.trade-listing-state.unlisted {
    background: #f3f4f6;
    color: #6b7280;
}

.trade-listing-state.blocked {
    background: #fee2e2;
    color: #991b1b;
}

.trade-row-disabled-action,
.trade-row-disabled-action:hover,
.trade-row-disabled-action:focus {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.trade-checkbox {
    width: 16px;
    height: 16px;
    accent-color: rgb(5, 71, 0);
    cursor: pointer;
    vertical-align: middle;
}

.trade-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.trade-coming-card {
    min-height: 190px;
}

.trade-coming-content {
    padding: 42px 20px;
    text-align: center;
    color: #6b7280;
}

.trade-coming-title {
    margin-bottom: 8px;
    color: #064b12;
    font-size: 18px;
    font-weight: 900;
}

.trade-coming-content p {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
}

/* -------------------------------------------------------------------------
   My trades
   ------------------------------------------------------------------------- */

.trade-my-card {
    position: relative;
    min-height: 250px;
}

.trade-my-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 14px;
}

.trade-my-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #d9e2d6;
    border-radius: 8px;
    background: #f8fbf7;
    color: #526457;
    font-size: 12px;
    font-weight: 800;
}

.trade-my-summary-item strong {
    color: #064b12;
    font-size: 18px;
    font-weight: 900;
}

.trade-my-summary-time strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-my-filter-card {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 18px;
    margin-right: 14px;
    margin-left: 14px;
    padding: 10px 14px;
}

.trade-my-direction-tabs {
    margin: 0;
}

.trade-my-status-filter {
    margin: 0;
}

.trade-my-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    margin: 12px 14px 0;
    color: #5d6c60;
    font-size: 13px;
    font-weight: 900;
}

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

.trade-my-list {
    display: grid;
    gap: 10px;
    margin: 12px 14px 0;
}

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

.trade-my-empty {
    padding: 46px 20px;
    border: 1px dashed #cbd8c8;
    border-radius: 9px;
    background: #fbfdfb;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.trade-case-card {
    overflow: hidden;
    border: 2px solid #0e630e;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 13px rgba(28, 74, 32, 0.06);
}

.trade-case-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid #0e630e;
    background: #0e630e;
    color: #fff;
}

.trade-case-head * {
    color: #fff;
}

.trade-case-head .trade-status-badge {
    color: #6a5310;
}

.trade-case-badges {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.trade-case-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 23px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.trade-case-direction.outgoing {
    color: #075985;
    background: #e0f2fe;
}

.trade-case-direction.incoming {
    color: #7c2d12;
    background: #ffedd5;
}

.trade-case-status.pending {
    color: #854d0e;
    background: #fef9c3;
}

.trade-case-status.completed {
    color: #166534;
    background: #dcfce7;
}

.trade-case-status.reversed,
.trade-case-status.closed {
    color: #475569;
    background: #e2e8f0;
}

.trade-case-created {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.trade-case-matchup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
    align-items: stretch;
    gap: 9px;
    padding: 11px 12px;
}

.trade-case-side {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #91b386;
    border-radius: 8px;
    background: #f8fdf8;
}

.trade-case-team {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
    margin-bottom: 7px;
}

.trade-case-team-logo {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.trade-case-team-link {
    overflow: hidden;
    color: #064b12;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-case-team-link:hover {
    text-decoration: underline;
}

.trade-case-exchange {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c8e7e;
    font-size: 18px;
    font-weight: 900;
}

.trade-case-player-list {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.trade-case-player {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    gap: 4px;
    padding: 4px 7px;
    border: 1px solid #dce5da;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.trade-case-player .market-player-link {
    overflow: hidden;
    max-width: 150px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-case-player-meta {
    color: #718096;
    white-space: nowrap;
}

.trade-case-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-top: 1px solid #edf1ec;
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
}

.trade-case-foot-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    flex: 1 1 auto;
    gap: 12px;
}

.trade-case-detail-btn {
    flex: 0 0 auto;
    min-width: 78px;
    text-decoration: none;
}

.trade-case-waiting {
    color: #4b6550;
}

.trade-my-pagination {
    margin: 14px 14px 0;
}

/* -------------------------------------------------------------------------
   Private proposal detail
   ------------------------------------------------------------------------- */

.trade-detail-page {
    box-sizing: border-box;
    padding: 10px 0 0;
}

.trade-detail-card {
    position: relative;
    box-sizing: border-box;
    padding: 16px 20px 20px;
}

.trade-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.trade-detail-topbar a {
    text-decoration: none;
}

.trade-detail-topbar .market-action-btn {
    min-height: 34px;
    font-size: 13px;
}

.trade-detail-card > .market-status-inline {
    font-size: 13px;
}

.trade-detail-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    color: #5d6c60;
    font-size: 14px;
    font-weight: 900;
}

.trade-detail-loading[hidden],
.trade-detail-content[hidden] {
    display: none !important;
}

.trade-detail-content {
    margin-top: 12px;
}

.trade-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid #d7e1d5;
    border-radius: 9px 9px 0 0;
    background: #f8fbf7;
}

.trade-detail-kicker {
    margin-bottom: 2px;
    color: #718096;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.trade-detail-heading h2 {
    margin: 0;
    color: #064b12;
    font-size: 20px;
    font-weight: 900;
}

.trade-detail-heading .trade-case-badge {
    min-height: 26px;
    padding: 0 10px;
    font-size: 12px;
}

.trade-detail-time-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-right: 1px solid #d7e1d5;
    border-bottom: 1px solid #d7e1d5;
    border-left: 1px solid #d7e1d5;
    border-radius: 0 0 9px 9px;
    background: #fff;
}

.trade-detail-time-item {
    min-width: 0;
    padding: 11px 14px;
    border-right: 1px solid #e4ebe2;
}

.trade-detail-time-item:last-child {
    border-right: 0;
}

.trade-detail-time-item span,
.trade-detail-time-item strong {
    display: block;
}

.trade-detail-time-item span {
    margin-bottom: 3px;
    color: #718096;
    font-size: 12px;
    font-weight: 800;
}

.trade-detail-time-item strong {
    overflow: hidden;
    color: #334155;
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
    gap: 14px;
    margin-top: 14px;
}

.trade-detail-main {
    min-width: 0;
}

.trade-detail-matchup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
}

.trade-detail-side {
    min-width: 0;
    overflow: hidden;
    padding: 0 14px 14px;
    border: 2px solid #a9c5a7;
    border-radius: 10px;
    background: linear-gradient(180deg, #f1f7f0 0%, #f8fbf7 100%);
    box-shadow: 0 3px 10px rgba(6, 75, 18, 0.08);
}

.trade-detail-team-head {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
    margin: 0 -14px 12px;
    padding: 11px 14px 10px;
    border-bottom: 1px solid #bfd3bd;
    background: #e7f1e5;
}

.trade-detail-team-head img {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.trade-detail-team-head div {
    min-width: 0;
}

.trade-detail-team-head span,
.trade-detail-team-head strong {
    display: block;
}

.trade-detail-team-head span {
    margin-bottom: 2px;
    color: #718096;
    font-size: 12px;
    font-weight: 800;
}

.trade-detail-team-head a,
.trade-detail-team-head strong {
    overflow: hidden;
    color: #064b12;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-detail-team-head a:hover {
    text-decoration: underline;
}

.trade-detail-exchange {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b806f;
    font-size: 20px;
    font-weight: 900;
}

.trade-detail-player-list {
    display: grid;
    gap: 10px;
}

.trade-detail-player-card {
    padding: 11px 12px;
    border: 1px solid #dce5da;
    border-radius: 8px;
    background: #fff;
}

.trade-detail-player-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.trade-detail-player-name {
    overflow: hidden;
    color: #064b12;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.trade-detail-player-name:hover {
    text-decoration: underline;
}

.trade-detail-change-badge {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 900;
}

.trade-detail-player-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    margin: 0;
}

.trade-detail-player-data div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    min-width: 0;
    gap: 5px;
}

.trade-detail-player-data dt,
.trade-detail-player-data dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.trade-detail-player-data dt {
    color: #718096;
    font-weight: 800;
}

.trade-detail-player-data dd {
    overflow: hidden;
    color: #334155;
    font-weight: 900;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-detail-player-data .trade-detail-player-health {
    grid-column: 1 / -1;
}

.trade-detail-related {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #dbe5d9;
    border-radius: 8px;
    background: #f8fbf7;
    flex-wrap: wrap;
}

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

.trade-detail-related > span {
    margin-right: auto;
    color: #526457;
    font-size: 13px;
    font-weight: 900;
}

.trade-detail-related a {
    text-decoration: none;
}

.trade-detail-timeline-card,
.trade-detail-action-panel {
    margin-top: 12px;
    padding: 13px 14px;
    border: 1px solid #d7e1d5;
    border-radius: 9px;
    background: #fff;
}

.trade-detail-timeline-card h3,
.trade-detail-action-panel h3 {
    margin: 0 0 9px;
    color: #064b12;
    font-size: 15px;
    font-weight: 900;
}

.trade-detail-timeline {
    display: grid;
    gap: 8px;
}

.trade-detail-timeline-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
}

.trade-detail-timeline-dot {
    width: 8px;
    height: 8px;
    margin-top: 4px;
    border-radius: 50%;
    background: #4d7c4f;
}

.trade-detail-timeline-row strong,
.trade-detail-timeline-row span {
    display: block;
}

.trade-detail-timeline-row strong {
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.trade-detail-timeline-row span,
.trade-detail-timeline-empty {
    margin-top: 2px;
    color: #718096;
    font-size: 12px;
    font-weight: 700;
}

.trade-detail-action-panel {
    position: sticky;
    top: 12px;
    margin-top: 0;
    background: #f8fbf7;
}

.trade-detail-action-panel p {
    margin: 0 0 10px;
    color: #5d6c60;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
}

.trade-detail-action-buttons {
    display: grid;
    gap: 8px;
}

.trade-detail-action-buttons .market-action-btn {
    width: 100%;
    min-height: 36px;
    font-size: 13px;
}

.trade-detail-danger-btn {
    border-color: #fecaca;
    background: #fff5f5;
    color: #b91c1c;
}

.trade-detail-danger-btn:hover,
.trade-detail-danger-btn:focus {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}

.trade-detail-no-player {
    padding: 20px 10px;
    color: #718096;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.trade-proposal-count-heading,
.trade-proposal-count-cell {
    text-align: center !important;
}

.trade-proposal-count-cell {
    color: #064b12;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 769px) {
    /* 全部上架：12 欄（提案 / 球員 / 球隊 / 類型 / 投打 / 位置 / OT / 年齡 / 等級 / 薪資 / 上架日 / 操作） */
    .trade-market-table th:nth-child(1),
    .trade-market-table td:nth-child(1) { width: 6%; }

    .trade-market-table th:nth-child(2),
    .trade-market-table td:nth-child(2) { width: 13%; }

    .trade-market-table th:nth-child(3),
    .trade-market-table td:nth-child(3) { width: 11%; }

    .trade-market-table th:nth-child(4),
    .trade-market-table td:nth-child(4) { width: 6%; }

    .trade-market-table th:nth-child(5),
    .trade-market-table td:nth-child(5) { width: 6%; }

    .trade-market-table th:nth-child(6),
    .trade-market-table td:nth-child(6) { width: 8%; }

    .trade-market-table th:nth-child(7),
    .trade-market-table td:nth-child(7) { width: 6%; }

    .trade-market-table th:nth-child(8),
    .trade-market-table td:nth-child(8) { width: 6%; }

    .trade-market-table th:nth-child(9),
    .trade-market-table td:nth-child(9) { width: 6%; }

    .trade-market-table th:nth-child(10),
    .trade-market-table td:nth-child(10) { width: 11%; }

    .trade-market-table th:nth-child(11),
    .trade-market-table td:nth-child(11) { width: 10%; }

    .trade-market-table th:nth-child(12),
    .trade-market-table td:nth-child(12) { width: 11%; }

    /* 我的上架：11 欄（勾選 / 球員 / 類型 / 投打 / 位置 / OT / 年齡 / 等級 / 薪資 / 狀態 / 操作） */
    .trade-market-table.trade-mine-table th:nth-child(1),
    .trade-market-table.trade-mine-table td:nth-child(1) { width: 5%; }

    .trade-market-table.trade-mine-table th:nth-child(2),
    .trade-market-table.trade-mine-table td:nth-child(2) { width: 15%; }

    .trade-market-table.trade-mine-table th:nth-child(3),
    .trade-market-table.trade-mine-table td:nth-child(3) { width: 8%; }

    .trade-market-table.trade-mine-table th:nth-child(4),
    .trade-market-table.trade-mine-table td:nth-child(4) { width: 7%; }

    .trade-market-table.trade-mine-table th:nth-child(5),
    .trade-market-table.trade-mine-table td:nth-child(5) { width: 10%; }

    .trade-market-table.trade-mine-table th:nth-child(6),
    .trade-market-table.trade-mine-table td:nth-child(6) { width: 7%; }

    .trade-market-table.trade-mine-table th:nth-child(7),
    .trade-market-table.trade-mine-table td:nth-child(7) { width: 7%; }

    .trade-market-table.trade-mine-table th:nth-child(8),
    .trade-market-table.trade-mine-table td:nth-child(8) { width: 7%; }

    .trade-market-table.trade-mine-table th:nth-child(9),
    .trade-market-table.trade-mine-table td:nth-child(9) { width: 12%; }

    .trade-market-table.trade-mine-table th:nth-child(10),
    .trade-market-table.trade-mine-table td:nth-child(10) { width: 12%; }

    .trade-market-table.trade-mine-table th:nth-child(11),
    .trade-market-table.trade-mine-table td:nth-child(11) { width: 10%; }
}

@media (max-width: 768px) {
    .trade-status-badges {
        width: 100%;
        justify-content: flex-start;
    }

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

    .trade-main-tabs .bh-tabs {
        overflow-x: auto !important;
    }

    .trade-main-tabs .bh-tab {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 112px !important;
    }

    .trade-filter-row {
        justify-content: flex-start;
    }

    .trade-name-filter {
        flex-basis: 100%;
    }

    .trade-filter-input {
        flex: 1 1 auto;
        width: auto;
    }

    .trade-mine-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .trade-mine-actions {
        justify-content: flex-end;
    }

    .trade-my-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trade-my-filter-card {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .trade-my-direction-tabs {
        margin: 0 auto;
    }

    .trade-case-head,
    .trade-case-foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .trade-case-foot-info {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

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

    .trade-case-exchange {
        transform: rotate(90deg);
    }

    .trade-detail-page {
        padding: 10px 0 0;
    }

    .trade-detail-card {
        padding: 12px;
    }

    .trade-detail-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .trade-detail-time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trade-detail-time-item:nth-child(2) {
        border-right: 0;
    }

    .trade-detail-time-item:nth-child(-n + 2) {
        border-bottom: 1px solid #e4ebe2;
    }

    .trade-detail-layout,
    .trade-detail-matchup {
        grid-template-columns: 1fr;
    }

    .trade-detail-exchange {
        min-height: 26px;
        transform: rotate(90deg);
    }

    .trade-detail-action-panel {
        position: static;
    }
}

@media (max-width: 480px) {
    .trade-my-overview {
        grid-template-columns: 1fr;
    }

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

    .trade-detail-time-item,
    .trade-detail-time-item:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid #e4ebe2;
    }

    .trade-detail-time-item:last-child {
        border-bottom: 0;
    }

    .trade-detail-player-data {
        grid-template-columns: 1fr;
    }

    .trade-detail-player-data .trade-detail-player-health {
        grid-column: auto;
    }
}

/* -------------------------------------------------------------------------
   Public Trade Records
   ------------------------------------------------------------------------- */

.trade-records-card {
    padding: 14px 16px 16px;
}

.trade-records-intro {
    padding: 11px 14px;
    margin: 12px 0 14px;
    border: 1px solid rgba(36, 104, 168, 0.18);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(229, 242, 255, 0.9), rgba(247, 251, 255, 0.96));
}

.trade-records-intro .trade-coming-title {
    margin-bottom: 4px;
    color: #173a5e;
    font-size: 1.02rem;
    font-weight: 900;
}

.trade-records-intro p {
    margin: 0;
    color: #49647e;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.5;
}

.trade-records-list {
    margin-top: 8px;
}

.trade-record-card {
    border-left: 5px solid #17669a;
}

.trade-case-direction.neutral {
    color: #174263;
    border-color: rgba(23, 102, 154, 0.24);
    background: #edf6ff;
}

.trade-record-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: -2px 0 10px;
    color: #66788a;
    font-size: 0.76rem;
    font-weight: 800;
}

.trade-record-side-label {
    margin-bottom: 5px;
    color: #6e8295;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.trade-record-side .trade-case-team {
    margin-bottom: 7px;
}

@media (max-width: 720px) {
    .trade-records-card {
        padding: 11px 10px 13px;
    }

    .trade-record-meta-row {
        flex-direction: column;
        gap: 4px;
    }
}

/* -------------------------------------------------------------------------
   v1.6.65 Public trade records cleanup
   ------------------------------------------------------------------------- */

/* 1) The records tab is self-explanatory after the status line; remove the
   extra intro card to reduce vertical noise. */
.trade-records-intro {
    display: none !important;
}

/* 2) Align the record list/card with the main card content width. */
.trade-records-card {
    padding: 14px 16px 16px;
}

.trade-records-list {
    display: grid;
    width: 100%;
    margin: 8px 0 0;
    padding: 0;
    gap: 12px;
}

.trade-record-card {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    border-left: 5px solid #17669a;
}

/* 3) Move the record id / season / created time into the green header. */
.trade-record-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.trade-record-head-left {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    flex-wrap: wrap;
}

.trade-record-meta-head {
    display: inline-flex;
    align-items: center;
    margin: 0;
    color: #e9fff0;
    font-size: 0.76rem;
    font-weight: 850;
    gap: 8px;
}

.trade-record-meta-head span + span::before {
    content: "・";
    margin-right: 8px;
    opacity: 0.8;
}

.trade-record-card > .trade-record-meta-row:not(.trade-record-meta-head) {
    display: none !important;
}

.trade-record-matchup {
    margin-top: 0;
    padding: 12px 14px;
}

/* The public record package boxes can be wider than the private case detail. */
.trade-record-card .trade-case-side {
    min-width: 0;
}

@media (max-width: 760px) {
    .trade-record-head {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .trade-record-head-left {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .trade-record-meta-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .trade-record-meta-head span + span::before {
        content: "";
        margin-right: 0;
    }

    .trade-record-head .trade-case-created {
        justify-self: start;
    }

    .trade-record-matchup {
        padding: 10px;
    }
}

/* -------------------------------------------------------------------------
   v1.6.66 Public trade records header/detail button
   ------------------------------------------------------------------------- */

/* Remove the blue accent line from public record cards. */
.trade-record-card {
    border-left: 1px solid #0a6b12 !important;
}

/* Header format:
   案件 EF49ABDA　建立：S4 Day28 08/09 21:36 */
.trade-record-meta-head {
    gap: 14px;
}

.trade-record-meta-head span + span::before {
    content: "";
    margin-right: 0;
}

.trade-record-head-actions {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 10px;
    white-space: nowrap;
}

.trade-record-detail-btn {
    min-width: 78px;
    height: 26px;
    padding: 0 10px;
    border-color: rgba(255, 255, 255, 0.55) !important;
    background: #ffffff !important;
    color: #065f12 !important;
    font-size: 12px;
    font-weight: 900;
}

.trade-record-detail-btn:hover {
    background: #eef8ee !important;
}

@media (max-width: 760px) {
    .trade-record-head-actions {
        justify-self: start;
        flex-wrap: wrap;
    }

    .trade-record-meta-head {
        gap: 4px;
    }
}

/* -------------------------------------------------------------------------
   v1.6.67 Public trade records Day fallback/detail button
   ------------------------------------------------------------------------- */

/* Kill the inherited blue left accent line completely on public record cards. */
.trade-record-card,
.trade-record-card.trade-case-card {
    border-left-width: 1px !important;
    border-left-style: solid !important;
    border-left-color: #0a6b12 !important;
    box-shadow: none;
}

/* Header right area: completion time + compact detail button. */
.trade-record-head-actions {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 10px;
    white-space: nowrap;
}

/* Standalone compact header button, not the large market button. */
.trade-record-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-width: 66px;
    padding: 0 10px;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.trade-record-detail-btn:hover {
    color: #064b12 !important;
    background: #ffffff;
}

/* Make the requested meta string read as one phrase:
   案件 EF49ABDA　建立：S4 Day28 08/09 21:36 */
.trade-record-meta-head {
    gap: 14px;
}

.trade-record-meta-head span + span::before {
    content: "";
    margin-right: 0;
}

@media (max-width: 760px) {
    .trade-record-head-actions {
        justify-self: start;
        flex-wrap: wrap;
    }

    .trade-record-detail-btn {
        height: 26px;
    }
}

/* -------------------------------------------------------------------------
   v1.6.68 Public trade records readable detail button
   ------------------------------------------------------------------------- */

.trade-record-detail-btn,
.trade-record-detail-btn:link,
.trade-record-detail-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-width: 66px;
    padding: 0 10px;
    color: #064b12 !important;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    background: #ffffff !important;
    box-shadow: none;
}

.trade-record-detail-btn:hover,
.trade-record-detail-btn:focus-visible {
    color: #04380d !important;
    background: #eef8ee !important;
    border-color: #ffffff;
    text-decoration: none !important;
}


.trade-handedness-cell {
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.02em;
}


/* -------------------------------------------------------------------------
   v1.6.75 Completed trade report UI
   ------------------------------------------------------------------------- */

.trade-detail-report-btn {
    color: #a12620 !important;
    border-color: #d9a19d !important;
    background: #fff7f6 !important;
}

.trade-detail-report-btn:hover:not(:disabled),
.trade-detail-report-btn:focus-visible:not(:disabled) {
    color: #7d1712 !important;
    border-color: #c77f79 !important;
    background: #ffefed !important;
}

.trade-detail-report-btn:disabled,
.trade-detail-report-btn.already-reported {
    cursor: default;
    color: #7a838b !important;
    border-color: #d6dadd !important;
    background: #f4f5f6 !important;
    opacity: 1;
}

body.trade-report-modal-open {
    overflow: hidden;
}

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

.trade-report-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 18px;
}

.trade-report-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 28, 0.58);
}

.trade-report-dialog {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(520px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 18px;
    border: 1px solid #d6dfd4;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.trade-report-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid #e4ebe2;
}

.trade-report-dialog-head h2 {
    margin: 0;
    color: #8c211c;
    font-size: 20px;
    font-weight: 900;
}

.trade-report-close-btn {
    display: inline-flex;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #58656f;
    font-size: 24px;
    line-height: 1;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.trade-report-close-btn:hover,
.trade-report-close-btn:focus-visible {
    color: #8c211c;
    background: #fff1ef;
}

.trade-report-dialog-copy {
    margin: 13px 0;
    color: #596873;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.65;
}

.trade-report-field {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.trade-report-field > span:first-child {
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.trade-report-field small {
    color: #7b8791;
    font-size: 11px;
    font-weight: 700;
}

.trade-report-select,
.trade-report-note {
    box-sizing: border-box;
    width: 100%;
    color: #243746;
    font: inherit;
    border: 1px solid #cfd9cd;
    border-radius: 8px;
    background: #ffffff;
}

.trade-report-select {
    height: 38px;
    padding: 0 10px;
}

.trade-report-note {
    min-height: 96px;
    padding: 9px 10px;
    line-height: 1.55;
    resize: vertical;
}

.trade-report-select:focus,
.trade-report-note:focus {
    outline: 2px solid rgba(20, 119, 189, 0.18);
    border-color: #1477bd;
}

.trade-report-note-count {
    justify-self: end;
    color: #7b8791;
    font-size: 11px;
    font-weight: 800;
}

.trade-report-note-count.over {
    color: #b42318;
}

.trade-report-modal-status {
    margin-top: 13px;
    padding: 9px 11px;
    color: #425466;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    border: 1px solid #dfe6dc;
    border-radius: 8px;
    background: #f8faf7;
}

.trade-report-modal-status.error {
    color: #9c342e;
    border-color: #efc1bd;
    background: #fff3f1;
}

.trade-report-modal-status.success {
    color: #1f6848;
    border-color: #b9dec9;
    background: #effaf4;
}

.trade-report-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e4ebe2;
}

.trade-report-dialog-actions .market-action-btn {
    min-width: 110px;
}

@media (max-width: 560px) {
    .trade-report-modal {
        align-items: end;
        padding: 10px;
    }

    .trade-report-dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 15px;
        border-radius: 12px;
    }

    .trade-report-dialog-actions {
        flex-direction: column-reverse;
    }

    .trade-report-dialog-actions .market-action-btn {
        width: 100%;
    }
}


/* -------------------------------------------------------------------------
   Trade proposal sharing v1.6.79
   ------------------------------------------------------------------------- */
.trade-detail-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.trade-detail-layout.shared-readonly {
    grid-template-columns: minmax(0, 1fr);
}

.trade-detail-action-panel[hidden] {
    display: none !important;
}
