/* =====================================================
   ACTIVE ASSETS PAGE
===================================================== */

.active-assets-page {

    width: 100%;

    min-height: 100vh;

    padding: 45px 38px 70px;

    background: var(--background);

    color: var(--text);

}



.active-assets-container {

    width: 100%;

    max-width: 1400px;

    margin: 0 auto;

}



/* =====================================================
   HEADER
===================================================== */

.active-assets-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 30px;

    margin-bottom: 30px;

}

.active-assets-heading {

    min-width: 0;

}

.active-assets-eyebrow {

    display: block;

    margin-bottom: 8px;

    color: var(--primary);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 0.08em;

    text-transform: uppercase;

}

.active-assets-heading h1 {

    margin: 0;

    color: var(--text);

    font-size: 30px;

    font-weight: 800;

    letter-spacing: -0.8px;

}

.active-assets-heading p {

    max-width: 620px;

    margin: 10px 0 0;

    color: var(--text-secondary);

    font-size: 13px;

    font-weight: 500;

    line-height: 1.7;

}



/* =====================================================
   TOOLBAR
===================================================== */

.active-assets-toolbar {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;

}

.active-assets-filters {

    display: flex;

    align-items: center;

    gap: 7px;

}

.active-assets-filter {

    min-height: 38px;

    padding: 0 15px;

    border: 1px solid var(--border);

    border-radius: 10px;

    background: var(--surface);

    color: var(--text-secondary);

    font-family: inherit;

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;

    transition:

        background var(--transition-fast),

        border-color var(--transition-fast),

        color var(--transition-fast);

}

.active-assets-filter:hover {

    background: var(--surface-soft);

    border-color: var(--primary);

    color: var(--primary);

}

.active-assets-filter.active {

    background: var(--primary-light);

    border-color: var(--primary);

    color: var(--primary);

}



.active-assets-search {

    position: relative;

    width: 260px;

}

.active-assets-search i {

    position: absolute;

    left: 13px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--text-muted);

    font-size: 12px;

    pointer-events: none;

}

.active-assets-search input {

    width: 100%;

    height: 40px;

    padding: 0 14px 0 36px;

    border: 1px solid var(--border);

    border-radius: 10px;

    outline: none;

    background: var(--surface);

    color: var(--text);

    font-family: inherit;

    font-size: 11px;

    font-weight: 500;

    transition:

        border-color var(--transition-fast),

        box-shadow var(--transition-fast);

}

.active-assets-search input::placeholder {

    color: var(--text-muted);

}

.active-assets-search input:focus {

    border-color: var(--primary);

    box-shadow:

        0 0 0 3px rgba(124, 58, 237, 0.10);

}



/* =====================================================
   ASSET GRID
===================================================== */

.active-assets-grid {

    display: grid;

    grid-template-columns:

        repeat(3,

            minmax(0, 1fr));

    gap: 16px;

}



.active-asset-card {

    width: 100%;

    padding: 18px;

    border: 1px solid var(--border);

    border-radius: 18px;

    background: var(--surface);

    color: var(--text);

    font-family: inherit;

    text-align: left;

    cursor: pointer;

    box-shadow: var(--shadow-sm);

    transition:

        transform var(--transition-fast),

        border-color var(--transition-fast),

        box-shadow var(--transition-fast);

}

.active-asset-card:hover {

    transform: translateY(-2px);

    border-color: var(--primary);

    box-shadow: var(--shadow-md);

}



.active-asset-card-top {

    display: flex;

    align-items: center;

    gap: 12px;

}



.active-asset-icon {

    width: 42px;

    height: 42px;

    flex: 0 0 42px;

    display: grid;

    place-items: center;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 15px;

    font-weight: 800;

}



.active-asset-name {

    min-width: 0;

    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 3px;

}

.active-asset-name strong {

    color: var(--text);

    font-size: 13px;

    font-weight: 800;

}

.active-asset-name span {

    overflow: hidden;

    color: var(--text-muted);

    font-size: 10px;

    font-weight: 500;

    text-overflow: ellipsis;

    white-space: nowrap;

}

.active-asset-card-top>i {

    color: var(--text-muted);

    font-size: 11px;

}



/* =====================================================
   PRICE
===================================================== */

.active-asset-price-row {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 15px;

    margin-top: 25px;

}

.active-asset-price-row>div {

    min-width: 0;

}

.active-asset-price-row>div>span {

    display: block;

    margin-bottom: 5px;

    color: var(--text-muted);

    font-size: 9px;

    font-weight: 600;

}

.active-asset-price-row strong {

    display: block;

    color: var(--text);

    font-size: 18px;

    font-weight: 800;

    letter-spacing: -0.3px;

}

.active-asset-price-row strong.unavailable {

    color: var(--text-muted);

    font-size: 12px;

}



.active-asset-trend {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding: 6px 8px;

    border-radius: 8px;

    font-size: 9px;

    font-weight: 800;

    white-space: nowrap;

}

.active-asset-trend.positive {

    background: var(--success-bg);

    color: var(--success);

}

.active-asset-trend.negative {

    background: var(--danger-bg);

    color: var(--danger);

}

.active-asset-trend.neutral {

    background: var(--surface-soft);

    color: var(--text-muted);

}



/* =====================================================
   CARD FOOTER
===================================================== */

.active-asset-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin-top: 18px;

    padding-top: 13px;

    border-top: 1px solid var(--border);

}

.active-asset-footer span {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    color: var(--text-muted);

    font-size: 9px;

    font-weight: 600;

}

.active-asset-footer span i {

    color: var(--primary);

}

.active-asset-footer strong {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    color: var(--primary);

    font-size: 10px;

    font-weight: 800;

}



/* =====================================================
   EMPTY STATE
===================================================== */

.active-assets-empty {

    display: none;

    padding: 70px 20px;

    text-align: center;

}

.active-assets-empty.visible {

    display: block;

}

.active-assets-empty>div {

    width: 48px;

    height: 48px;

    display: grid;

    place-items: center;

    margin: 0 auto 15px;

    border-radius: 14px;

    background: var(--primary-light);

    color: var(--primary);

}

.active-assets-empty h3 {

    margin: 0;

    color: var(--text);

    font-size: 15px;

    font-weight: 800;

}

.active-assets-empty p {

    margin: 7px 0 0;

    color: var(--text-muted);

    font-size: 11px;

    font-weight: 500;

}



/* =====================================================
   PUBLIC BUY MODAL
===================================================== */

.public-buy-modal-overlay {

    position: fixed;

    inset: 0;

    z-index: 5000;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background: rgba(10, 8, 15, 0.60);

    opacity: 0;

    visibility: hidden;

    transition:

        opacity var(--transition-normal),

        visibility var(--transition-normal);

}

.public-buy-modal-overlay.active {

    opacity: 1;

    visibility: visible;

}



.public-buy-modal {

    width: 100%;

    max-width: 440px;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 22px;

    background: var(--surface);

    box-shadow: var(--shadow-heavy);

    transform: translateY(12px) scale(0.98);

    transition:

        transform var(--transition-normal);

}

.public-buy-modal-overlay.active .public-buy-modal {

    transform: translateY(0) scale(1);

}



.public-buy-modal-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 18px 20px;

    border-bottom: 1px solid var(--border);

}

.public-buy-modal-asset {

    display: flex;

    align-items: center;

    gap: 11px;

}

.public-buy-modal-icon {

    width: 40px;

    height: 40px;

    display: grid;

    place-items: center;

    border-radius: 11px;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 14px;

    font-weight: 800;

}

.public-buy-modal-asset strong {

    display: block;

    color: var(--text);

    font-size: 13px;

    font-weight: 800;

}

.public-buy-modal-asset span {

    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 10px;

    font-weight: 500;

}



.public-buy-modal-close {

    width: 34px;

    height: 34px;

    display: grid;

    place-items: center;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: transparent;

    color: var(--text-secondary);

    cursor: pointer;

    transition:

        background var(--transition-fast),

        color var(--transition-fast);

}

.public-buy-modal-close:hover {

    background: var(--surface-soft);

    color: var(--text);

}



/* =====================================================
   MODAL BODY
===================================================== */

.public-buy-modal-body {

    padding: 20px;

}

.public-buy-current-price {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;

}

.public-buy-current-price span {

    color: var(--text-muted);

    font-size: 10px;

    font-weight: 600;

}

.public-buy-current-price strong {

    color: var(--text);

    font-size: 17px;

    font-weight: 800;

}



.public-buy-input-group {

    margin-bottom: 16px;

}

.public-buy-input-group label {

    display: block;

    margin-bottom: 7px;

    color: var(--text-secondary);

    font-size: 10px;

    font-weight: 700;

}

.public-buy-input-group>div {

    display: flex;

    align-items: center;

    height: 44px;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: var(--surface);

}

.public-buy-input-group>div>span {

    min-width: 48px;

    padding: 0 12px;

    color: var(--text-secondary);

    font-size: 11px;

    font-weight: 800;

    text-align: center;

}

.public-buy-input-group input {

    width: 100%;

    height: 100%;

    padding: 0 12px;

    border: 0;

    outline: none;

    background: transparent;

    color: var(--text);

    font-family: inherit;

    font-size: 12px;

    font-weight: 600;

}

.public-buy-input-group>div:focus-within {

    border-color: var(--primary);

    box-shadow:

        0 0 0 3px rgba(124, 58, 237, 0.10);

}



/* =====================================================
   LOGIN NOTICE
===================================================== */

.public-buy-login-notice {

    display: flex;

    align-items: flex-start;

    gap: 10px;

    margin-top: 5px;

    padding: 12px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--surface-soft);

}

.public-buy-login-notice>i {

    margin-top: 2px;

    color: var(--primary);

    font-size: 13px;

}

.public-buy-login-notice strong {

    display: block;

    color: var(--text);

    font-size: 10px;

    font-weight: 800;

}

.public-buy-login-notice span {

    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;

    font-weight: 500;

    line-height: 1.5;

}



/* =====================================================
   MODAL ERROR
===================================================== */

.public-buy-error {

    display: none;

    margin-top: 12px;

    padding: 10px 12px;

    border: 1px solid var(--danger);

    border-radius: 10px;

    background: var(--danger-bg);

    color: var(--danger);

    font-size: 10px;

    font-weight: 600;

}

.public-buy-error.visible {

    display: block;

}



/* =====================================================
   MODAL ACTIONS
===================================================== */

.public-buy-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 8px;

    margin-top: 20px;

}

.public-buy-actions button {

    min-height: 40px;

    padding: 0 15px;

    border-radius: 10px;

    font-family: inherit;

    font-size: 10px;

    font-weight: 800;

    cursor: pointer;

}

.public-buy-actions button:first-child {

    border: 1px solid var(--border);

    background: var(--surface);

    color: var(--text-secondary);

}

.public-buy-actions button:last-child {

    border: 1px solid var(--primary);

    background: var(--primary);

    color: #ffffff;

}



/* =====================================================
   DARK THEME
===================================================== */

html[data-theme="dark"] .active-assets-page {

    background: var(--background);

    color: var(--text);

}


html[data-theme="dark"] .active-assets-filter {

    background: var(--surface);

    border-color: var(--border);

    color: var(--text-secondary);

}

html[data-theme="dark"] .active-assets-filter:hover {

    background: var(--surface-soft);

    border-color: var(--primary);

    color: var(--primary);

}

html[data-theme="dark"] .active-assets-filter.active {

    background: var(--primary-light);

    border-color: var(--primary);

    color: var(--primary);

}


html[data-theme="dark"] .active-assets-search input {

    background: var(--surface);

    border-color: var(--border);

    color: var(--text);

}

html[data-theme="dark"] .active-assets-search input:focus {

    border-color: var(--primary);

}


html[data-theme="dark"] .active-asset-card {

    background: var(--surface);

    border-color: var(--border);

    color: var(--text);

}

html[data-theme="dark"] .active-asset-card:hover {

    border-color: var(--primary);

    box-shadow:

        0 12px 30px rgba(0, 0, 0, 0.30);

}


html[data-theme="dark"] .active-asset-icon {

    background: var(--primary-light);

    border-color: var(--border);

    color: var(--primary);

}


html[data-theme="dark"] .active-asset-trend.neutral {

    background: var(--surface-soft);

    color: var(--text-muted);

}


html[data-theme="dark"] .public-buy-modal-overlay {

    background: rgba(0, 0, 0, 0.72);

}


html[data-theme="dark"] .public-buy-modal {

    background: var(--surface);

    border-color: var(--border);

}


html[data-theme="dark"] .public-buy-modal-close {

    background: transparent;

    border-color: var(--border);

    color: var(--text-secondary);

}

html[data-theme="dark"] .public-buy-modal-close:hover {

    background: var(--surface-soft);

    color: var(--text);

}


html[data-theme="dark"] .public-buy-input-group>div {

    background: var(--surface);

    border-color: var(--border);

}


html[data-theme="dark"] .public-buy-input-group>div:focus-within {

    border-color: var(--primary);

}


html[data-theme="dark"] .public-buy-login-notice {

    background: var(--surface-soft);

    border-color: var(--border);

}


html[data-theme="dark"] .public-buy-actions button:first-child {

    background: var(--surface);

    border-color: var(--border);

    color: var(--text-secondary);

}

html[data-theme="dark"] .public-buy-actions button:first-child:hover {

    background: var(--surface-soft);

    color: var(--text);

}



/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1000px) {

    .active-assets-grid {

        grid-template-columns:

            repeat(2,

                minmax(0, 1fr));

    }

}



@media (max-width: 700px) {

    .active-assets-page {

        padding: 30px 20px 90px;

    }

    .active-assets-toolbar {

        flex-direction: column;

        align-items: stretch;

    }

    .active-assets-filters {

        overflow-x: auto;

    }

    .active-assets-search {

        width: 100%;

    }

}



@media (max-width: 560px) {

    .active-assets-grid {

        grid-template-columns:

            minmax(0, 1fr);

    }

    .active-assets-heading h1 {

        font-size: 25px;

    }

    .active-asset-card {

        padding: 16px;

    }

}



@media (max-width: 400px) {

    .active-assets-page {

        padding-left: 14px;

        padding-right: 14px;

    }

    .active-assets-filter {

        padding-left: 12px;

        padding-right: 12px;

    }

    .public-buy-modal-overlay {

        padding: 12px;

    }

}