:root {
    --netsbo-accent: #6b40b9;
    --netsbo-accent-strong: #7c52ca;
    --netsbo-accent-soft: rgba(107, 64, 185, 0.14);
    --netsbo-surface-light: #ffffff;
    --netsbo-surface-dark: #12111a;
    --netsbo-border-light: rgba(60, 56, 102, 0.12);
    --netsbo-border-dark: rgba(255, 255, 255, 0.08);
    --netsbo-text-muted-light: #6c6a7f;
    --netsbo-text-muted-dark: #aca8c8;
}

[data-bs-theme="light"] {
    --netsbo-body-bg: radial-gradient(circle at top, rgba(60, 56, 102, 0.08), transparent 32%), #f5f4fb;
    --netsbo-surface: var(--netsbo-surface-light);
    --netsbo-border: var(--netsbo-border-light);
    --netsbo-muted: var(--netsbo-text-muted-light);
    --netsbo-heading: #19172b;
}

[data-bs-theme="dark"] {
    --netsbo-body-bg: radial-gradient(circle at top, rgba(90, 85, 147, 0.25), transparent 28%), #08080d;
    --netsbo-surface: rgba(18, 17, 26, 0.9);
    --netsbo-border: var(--netsbo-border-dark);
    --netsbo-muted: var(--netsbo-text-muted-dark);
    --netsbo-heading: #f4f2ff;
}

body {
    background: var(--netsbo-body-bg);
    color: var(--netsbo-heading);
    min-height: 100vh;
}

.explorer-page-shell {
    transition: filter .22s ease, opacity .22s ease;
}

body.runtime-lookup-active .explorer-page-shell {
    filter: blur(4px);
    opacity: 0.72;
    pointer-events: none;
    user-select: none;
}

.explorer-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    flex-wrap: wrap;
}

.explorer-footer-logo {
    height: 1.4rem;
    width: auto;
    object-fit: contain;
}

.explorer-footer-logo-light {
    display: none;
}

[data-bs-theme="light"] .explorer-footer-logo-dark {
    display: none;
}

[data-bs-theme="light"] .explorer-footer-logo-light {
    display: inline-block;
}

.navbar-shell,
.explorer-card,
.explorer-table-shell {
    background: var(--netsbo-surface);
    border: 1px solid var(--netsbo-border);
    box-shadow: 0 24px 80px rgba(8, 8, 13, 0.12);
    backdrop-filter: blur(14px);
}

.navbar-shell {
    border-radius: 1.25rem;
    position: relative;
    z-index: 20;
}

.explorer-card,
.explorer-table-shell {
    border-radius: 1.5rem;
    overflow: hidden;
}

.explorer-card > *,
.explorer-card .row > *,
.explorer-table-shell > * {
    min-width: 0;
}

.text-muted-soft {
    color: var(--netsbo-muted) !important;
}

.btn-accent {
    background: var(--netsbo-accent);
    border-color: var(--netsbo-accent);
    color: #fff;
}

.btn-accent:hover,
.btn-accent:focus {
    background: var(--netsbo-accent-strong);
    border-color: var(--netsbo-accent-strong);
    color: #fff;
}

.btn-filter {
    border-radius: 0.5rem;
    border: 1px solid var(--netsbo-border);
    background: rgba(148, 163, 184, 0.12);
    color: var(--netsbo-heading);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-filter:hover,
.btn-filter:focus {
    background: rgba(148, 163, 184, 0.22);
    border-color: rgba(148, 163, 184, 0.38);
    color: var(--netsbo-heading);
}

.btn-filter.active {
    background: var(--netsbo-accent-soft);
    border-color: rgba(60, 56, 102, 0.35);
    color: var(--netsbo-heading);
}

.btn-filter.disabled,
.btn-filter[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

.btn-filter.is-loading {
    pointer-events: none;
    opacity: 0.75;
}

.btn-filter-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.explorer-pagination-select {
    width: auto;
    min-width: 5.25rem;
    border-radius: 0.5rem;
    border-color: var(--netsbo-border);
    background-color: rgba(148, 163, 184, 0.12);
    color: var(--netsbo-heading);
    color-scheme: dark;
}

.explorer-pagination-select:focus {
    border-color: rgba(148, 163, 184, 0.38);
    box-shadow: none;
}

[data-bs-theme="dark"] .explorer-pagination-select option {
    background-color: #08080d;
    color: #f4f2ff;
}

.explorer-pagination-status {
    cursor: default;
    pointer-events: none;
}

.explorer-pagination .justify-content-lg-end {
    gap: 0.25rem !important;
}

.explorer-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

.explorer-locale-toggle::after {
    display: none;
}

.explorer-theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
}

.explorer-theme-icon svg {
    width: 1rem;
    height: 1rem;
}

.explorer-theme-icon i {
    font-size: 1rem;
    line-height: 1;
}

.explorer-contract-icon {
    vertical-align: middle;
    margin-right: .15rem;
    font-size: 1rem;
}

.explorer-readonly-textarea {
    resize: none;
    background: var(--netsbo-surface);
    color: var(--netsbo-heading);
    border-color: var(--netsbo-border);
}

.explorer-readonly-textarea:focus {
    background: var(--netsbo-surface);
    color: var(--netsbo-heading);
    border-color: var(--netsbo-border);
    box-shadow: none;
}

.token-action-avatar {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 50%;
    background: var(--netsbo-accent-soft);
    border: 1px solid var(--netsbo-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.token-action-avatar img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.token-detail-action-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: .5rem;
}

.token-detail-action-avatar {
    width: 5.625rem;
    height: 5.625rem;
}

.token-detail-action-avatar img {
    width: 72%;
    height: 72%;
}

.token-detail-action-body {
    min-width: 0;
    flex: 1;
    line-height: 1.2;
}

.token-detail-action-line {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
    font-size: 1rem;
    line-height: 1.5;
}

.token-detail-action-line .copyable-link-group {
    min-width: 0;
    max-width: 100%;
}

.tx-detail-stack {
    display: grid;
    gap: 1rem;
}

.tx-detail-stack > * {
    min-width: 0;
}

.tx-detail-row {
    display: grid;
    grid-template-columns: minmax(11rem, 13rem) minmax(0, 1fr);
    align-items: flex-start;
    gap: 2rem;
}

.tx-detail-label {
    min-width: 13rem;
    color: var(--netsbo-muted);
    font-size: .95rem;
}

.tx-detail-value {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.tx-detail-value-normal {
    font-weight: 400;
}

.block-height-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.block-height-nav-btn {
    min-width: 2rem;
    padding: 0.1rem 0.45rem;
    line-height: 1.1;
    border-radius: 0.3rem;
}

.tx-detail-separator {
    margin: .35rem 0;
    border-color: var(--netsbo-border);
    opacity: 1;
}

.address-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.address-detail-main,
.address-detail-token-card {
    min-width: 0;
}

.address-detail-main-card {
    position: relative;
}

.address-detail-main-card,
.address-detail-token-card {
    height: 100%;
}

.address-detail-token-card {
    display: flex;
    flex-direction: column;
}

.address-detail-token-card .accordion-button {
    align-items: center;
}

.address-token-balances-shell {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    gap: 1rem;
}

.address-token-balances-content {
    flex: 1;
}

.address-token-balances-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: auto;
}

.address-token-balances-pagination .btn {
    min-width: 2rem;
}

.tx-confirmation-pill {
    font-size: .72rem;
    padding: .2rem .55rem;
}

.tx-action-headline {
    font-size: 1rem;
    line-height: 1.5;
}

.explorer-accordion .accordion-button {
    color: var(--netsbo-heading);
}

.explorer-accordion .accordion-button:not(.collapsed) {
    color: var(--netsbo-heading);
    box-shadow: none;
}

.explorer-accordion .accordion-button::after {
    filter: var(--bs-accordion-btn-icon-filter, none);
}

.tx-more-details-toggle {
    margin-left: 2rem;
    color: var(--netsbo-accent);
    text-decoration: none;
}

@media (max-width: 767.98px) {
    .token-detail-action-card {
        align-items: flex-start;
        gap: .7rem;
    }

    .token-detail-action-avatar {
        width: 4.75rem;
        height: 4.75rem;
    }

    .tx-detail-row {
        grid-template-columns: minmax(0, 1fr);
        gap: .35rem;
    }

    .tx-detail-label {
        min-width: 0;
    }

    .tx-more-details-toggle {
        margin-left: .75rem;
    }
}

@media (min-width: 992px) {
    .address-detail-token-card .accordion-button {
        pointer-events: none;
        cursor: default;
    }

    .address-detail-token-card .accordion-button::after,
    .address-detail-token-card .tx-more-details-toggle {
        display: none;
    }

    .address-detail-token-card .accordion-collapse {
        display: block !important;
    }
}

.explorer-theme-icon-moon {
    display: none;
}

.explorer-theme-toggle[data-theme="dark"] .explorer-theme-icon-sun,
.explorer-theme-toggle[data-theme="light"] .explorer-theme-icon-moon {
    display: inline-flex;
}

.explorer-theme-toggle[data-theme="dark"] .explorer-theme-icon-moon,
.explorer-theme-toggle[data-theme="light"] .explorer-theme-icon-sun {
    display: none;
}

.nav-link {
    color: var(--netsbo-muted);
}

.nav-link.active,
.nav-link:hover {
    color: var(--netsbo-heading);
}

.explorer-nav-tools {
    width: 100%;
}

.explorer-nav-actions {
    flex-shrink: 0;
}

.explorer-nav-actions .dropdown {
    position: relative;
}

.explorer-nav-actions .dropdown-menu {
    z-index: 1080;
}

.explorer-runtime-modal {
    z-index: 1090;
}

.explorer-runtime-modal-content {
    background: var(--netsbo-surface);
    border: 1px solid var(--netsbo-border);
    box-shadow: 0 24px 80px rgba(8, 8, 13, 0.24);
    backdrop-filter: blur(14px);
}

.explorer-runtime-modal .spinner-border {
    color: var(--netsbo-accent);
}

.explorer-search-field {
    position: relative;
    width: 100%;
}

.explorer-search-icon {
    position: absolute;
    top: 50%;
    left: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    color: var(--netsbo-muted);
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

.explorer-search-icon svg {
    width: 1rem;
    height: 1rem;
}

a {
    color: inherit;
}

a:hover {
    color: var(--netsbo-accent-strong);
}

.explorer-card a:not(.btn):not(.badge):not(.nav-link):not(.navbar-brand),
.explorer-table-shell a:not(.btn):not(.badge):not(.nav-link):not(.navbar-brand) {
    color: var(--netsbo-accent);
    text-decoration: none;
}

.explorer-card a:not(.btn):not(.badge):not(.nav-link):not(.navbar-brand):hover,
.explorer-table-shell a:not(.btn):not(.badge):not(.nav-link):not(.navbar-brand):hover {
    color: var(--netsbo-accent-strong);
    text-decoration: none;
}

.metric-pill {
    border-radius: 999px;
    background: var(--netsbo-accent-soft);
    color: var(--netsbo-heading);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .75rem;
    font-size: .875rem;
}

.breadcrumb a {
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: none;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--netsbo-heading);
    --bs-table-border-color: var(--netsbo-border);
    margin-bottom: 0;
}

.table thead th {
    color: var(--netsbo-muted);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.table td,
.table th {
    vertical-align: middle;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.table-responsive .table td,
.table-responsive .table th {
    white-space: nowrap;
}

.chart-shell {
    height: 320px;
    position: relative;
}

.chart-placeholder,
.chart-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.chart-placeholder {
    color: var(--netsbo-muted);
}

.chart-error {
    padding: 1rem;
}

.chart-shell canvas[hidden] {
    display: none !important;
}

.card-refresh-flash {
    animation: card-refresh-flash 0.7s ease;
}

@keyframes card-refresh-flash {
    0% {
        opacity: 0.72;
        transform: translateY(1px);
    }

    55% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.legend-list li + li {
    margin-top: .65rem;
}

.token-legend {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: .25rem;
    -webkit-overflow-scrolling: touch;
}

.token-legend-item {
    flex: 0 0 auto;
    min-width: 0;
    cursor: pointer;
    transition: opacity .18s ease, transform .18s ease;
}

.legend-swatch {
    width: .8rem;
    height: .8rem;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
}

.token-legend-item:hover {
    transform: translateY(-1px);
}

.token-legend-item.is-hidden {
    opacity: .45;
}

.explorer-search-input {
    min-width: min(100%, 22rem);
    border-radius: 999px;
    border-color: var(--netsbo-border);
    background: var(--netsbo-surface);
    color: var(--netsbo-heading);
    padding-left: 2.5rem;
}

.explorer-search-input::placeholder {
    color: var(--netsbo-muted);
}

.hash-cell,
.address-cell {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: .88rem;
}

.explorer-card .hash-cell,
.explorer-card .address-cell,
.explorer-card .explorer-long-text {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-responsive .hash-cell,
.table-responsive .address-cell {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.copyable-link-group {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    max-width: 100%;
}

.copyable-link {
    min-width: 0;
    max-width: 100%;
}

.explorer-address-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    max-width: 100%;
}

.explorer-address-label-image,
.explorer-token-label-image {
    width: 1.1em;
    height: 1.1em;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.explorer-address-label-text,
.explorer-token-label-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-address-label-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.explorer-token-label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    max-width: 100%;
}

.copy-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--netsbo-muted);
    text-decoration: none;
    flex: 0 0 auto;
}

.copy-action-btn:hover,
.copy-action-btn:focus {
    color: var(--netsbo-heading);
    outline: none;
}

.copy-action-btn i {
    font-size: 1rem;
    line-height: 1;
}

.explorer-gas-usage {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.explorer-gas-usage-text {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.explorer-gas-meter {
    position: relative;
    display: inline-flex;
    width: 56px;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148, 163, 184, .22);
    flex: 0 0 auto;
}

.explorer-gas-meter-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.explorer-gas-meter--success .explorer-gas-meter-bar {
    background: #22c55e;
}

.explorer-gas-meter--warning .explorer-gas-meter-bar {
    background: #facc15;
}

.explorer-gas-meter--danger .explorer-gas-meter-bar {
    background: #ef4444;
}

.tx-transfer-table {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tx-transfer-table .table td,
.tx-transfer-table .table th {
    white-space: nowrap;
}

.tx-transfer-table .table {
    width: max-content;
    min-width: 100%;
}

.tx-transfer-table .hash-cell,
.tx-transfer-table .address-cell,
.tx-transfer-table .copyable-link,
.tx-transfer-table .copyable-link-group {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.tx-transfer-table .copyable-link-group {
    align-items: center;
}

@media (max-width: 991.98px) {
    .navbar-shell {
        position: sticky;
        top: .85rem;
        z-index: 1040;
    }

    .chart-shell {
        height: 280px;
    }

    .explorer-nav-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .breadcrumb {
        font-size: .78rem;
        gap: .15rem;
        flex-wrap: wrap;
        padding-left: .35rem;
    }

    .breadcrumb .breadcrumb-item {
        line-height: 1.2;
    }
}

@media (min-width: 992px) {
    .address-detail-layout {
        grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
        gap: 1.25rem;
    }

    .address-detail-main-card {
        position: sticky;
        top: 1.25rem;
    }

    .explorer-nav-links {
        margin-right: 2.5rem;
    }

    .explorer-nav-tools {
        width: auto;
        min-width: min(100%, 24rem);
    }
}
