/*
 * Shared "exchange" layout used by marketplace/listing style pages
 * (RWA Token Exchange, Vault Exchange, ...).
 * Provides: a dark hero banner with stats, and a light card grid below.
 */

/* Light header override for pages with a light body background */
.header {
    --background-color: rgba(255, 255, 255, 0.95);
    --heading-color: #3c3c3c;
    --nav-color: #3c3c3c;
    --nav-hover-color: #3c3c3c;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.1);
}

.exchange-hero {
    background: radial-gradient(120% 180% at 50% -20%, #1c2530 0%, #060606 65%);
    padding: 170px 0 60px;
    color: #fff;
    text-align: center;
}

.exchange-hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.exchange-hero p {
    color: rgba(255, 255, 255, 0.65);
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.exchange-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.exchange-stats .stat {
    text-align: center;
}

.exchange-stats .stat strong {
    display: block;
    font-size: 1.6rem;
    color: #feb900;
}

.exchange-stats .stat span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.exchange-body {
    background: #f4f7f6;
    padding: 60px 0 100px;
}

.exchange-group {
    margin-bottom: 56px;
}

.exchange-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.exchange-group-title h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #3c3c3c;
    margin: 0;
}

.exchange-group-title .badge-network {
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: #eef1f0;
    color: #616161;
    font-weight: 600;
}

.exchange-empty {
    text-align: center;
    padding: 40px 0;
    color: #979da4;
}

/* Card grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.collection-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.collection-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.collection-card .cover {
    position: relative;
    height: 110px;
    background: linear-gradient(135deg, #1c2530, #364d59 55%, #feb900 160%);
}

.collection-card .avatar {
    position: absolute;
    left: 20px;
    bottom: -28px;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #060606;
    border: 4px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #feb900;
}

.collection-card .status-dot {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #979da4;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.collection-card .status-dot.active {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.collection-card .card-content {
    padding: 40px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.collection-card .name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #3c3c3c;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.collection-card .symbol {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #979da4;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}

.collection-card .meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #979da4;
    margin-bottom: 18px;
    gap: 12px;
}

.collection-card .meta-row a {
    color: #616161;
    text-decoration: none;
    font-family: monospace;
}

.collection-card .meta-row a:hover {
    color: #feb900;
}

.collection-card .meta-row .value {
    color: #3c3c3c;
    font-weight: 700;
}

.collection-card .input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.collection-card .input-row input {
    flex: 1;
    font-size: 0.85rem;
}

.btn-view {
    display: inline-block;
    text-align: center;
    padding: 10px 0;
    border-radius: 10px;
    background: #060606;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-view:hover {
    background: #feb900;
    color: #060606;
}

.collection-card .btn-view {
    margin-top: auto;
    display: block;
    width: 100%;
}

/* ---------- Art Index trading panel ---------- */
.art-index-section {
    padding-top: 44px;
}

.art-index-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    margin-bottom: 56px;
}

@media (max-width: 900px) {
    .art-index-panel {
        grid-template-columns: 1fr;
    }
}

.art-index-chart-card,
.art-index-side-card {
    background: #fcfcfb;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    padding: 18px 20px;
}

.art-index-toolbar {
    display: flex;
    margin-top: 4px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecebe4;
}

.art-index-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #e1e0d9;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2352514e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    color: #060606;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 11px 40px 11px 18px;
    border-radius: 22px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.art-index-select:hover {
    border-color: #feb900;
}

.art-index-select:focus {
    outline: none;
    border-color: #feb900;
}

.art-index-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.art-index-tab {
    border: 1px solid #e1e0d9;
    background: #fff;
    color: #52514e;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.art-index-tab:hover {
    border-color: #feb900;
}

.art-index-tab.active {
    background: #060606;
    border-color: #060606;
    color: #feb900;
}

.art-index-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.art-index-title {
    font-size: 1rem;
    font-weight: 700;
    color: #3c3c3c;
}

.art-index-title span {
    font-weight: 500;
    color: #979da4;
}

.art-index-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.art-index-price #artIndexPrice {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0b0b0b;
    font-variant-numeric: tabular-nums;
}

.art-index-change {
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.art-index-change.up {
    color: #0ca30c;
}

.art-index-change.down {
    color: #d03b3b;
}

.art-index-chart-wrap {
    position: relative;
    height: 320px;
    margin-bottom: 20px;
}

.art-index-chart-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.art-index-tooltip {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #1a1a19;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.78rem;
    line-height: 1.5;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.art-index-tooltip .row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.art-index-tooltip .row span:first-child {
    color: #c3c2b7;
}

/* Order book */
.orderbook-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3c3c3c;
    margin-bottom: 10px;
}

.orderbook-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #979da4;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0 2px 6px;
    border-bottom: 1px solid #e1e0d9;
}

.orderbook-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    padding: 3px 6px;
    font-variant-numeric: tabular-nums;
    border-radius: 4px;
    overflow: hidden;
}

.orderbook-row .depth {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 0;
}

.orderbook-row .price,
.orderbook-row .size {
    position: relative;
    z-index: 1;
}

.orderbook-asks .orderbook-row .price {
    color: #d03b3b;
}

.orderbook-asks .orderbook-row .depth {
    background: rgba(208, 59, 59, 0.12);
}

.orderbook-bids .orderbook-row .price {
    color: #0ca30c;
}

.orderbook-bids .orderbook-row .depth {
    background: rgba(12, 163, 12, 0.12);
}

.orderbook-spread {
    text-align: center;
    font-size: 0.75rem;
    color: #979da4;
    padding: 6px 0;
    border-top: 1px dashed #e1e0d9;
    border-bottom: 1px dashed #e1e0d9;
    margin: 2px 0;
}

.trade-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-buy,
.btn-sell {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 12px 0;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.btn-buy {
    background: #0ca30c;
}

.btn-sell {
    background: #d03b3b;
}

.btn-buy:hover,
.btn-sell:hover {
    filter: brightness(1.08);
}
