/* =========================================================
   GLOBAL RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: #f8fafc;
    color: #111827;
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}


/* =========================================================
   UNIVERSAL HEADER
========================================================= */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;

    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-inner {
    width: min(1240px, 94%);
    min-height: 68px;

    margin: auto;

    display: flex;
    align-items: center;

    gap: 28px;
}


/* Logo */

.site-logo {
    display: flex;
    align-items: center;

    gap: 9px;

    text-decoration: none;
    color: #111827;

    font-size: 18px;
    font-weight: 700;

    white-space: nowrap;
}

.site-logo-icon {
    width: 34px;
    height: 34px;

    border-radius: 9px;

    background: #0052ff;
    color: #ffffff;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 17px;
    font-weight: 800;
}


/* Navigation */

.site-nav {
    display: flex;
    align-items: center;

    gap: 22px;

    margin-right: auto;
}

.site-nav a {
    text-decoration: none;

    color: #4b5563;

    font-size: 14px;
    font-weight: 500;

    transition: color 0.15s ease;
}

.site-nav a:hover {
    color: #0052ff;
}


/* =========================================================
   HEADER SEARCH
========================================================= */

.header-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}

.header-search {
    width: 310px;
    height: 40px;

    display: flex;
    align-items: center;

    gap: 7px;

    background: #f8fafc;

    border: 1px solid #dbe1ea;
    border-radius: 8px;

    padding-left: 11px;
}

.search-icon {
    color: #9ca3af;

    font-size: 19px;
    line-height: 1;
}

.header-search input {
    min-width: 0;
    flex: 1;

    border: 0;
    outline: 0;

    background: transparent;
    color: #111827;

    font-size: 13px;
}

.header-search input::placeholder {
    color: #9ca3af;
}

.header-search button {
    height: 32px;

    margin-right: 4px;

    padding: 0 12px;

    border: 0;
    border-radius: 6px;

    background: #0052ff;
    color: #ffffff;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}

.header-search button:hover {
    background: #0047df;
}


/* =========================================================
   MOBILE MENU
========================================================= */

.mobile-menu-button {
    display: none;

    border: 0;

    background: transparent;

    font-size: 23px;

    cursor: pointer;
}

.mobile-navigation {
    display: none;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    background: #ffffff;

    border-top: 1px solid #e5e7eb;
}

.footer-inner {
    width: min(1240px, 94%);

    margin: auto;

    padding: 42px 0;

    display: grid;

    grid-template-columns: 2fr 1fr 1fr 1fr;

    gap: 30px;
}


/* Footer Logo */

.footer-logo {
    display: flex;
    align-items: center;

    gap: 9px;

    margin-bottom: 10px;
}

.footer-brand p {
    max-width: 250px;

    color: #9ca3af;

    font-size: 12px;
}


/* Footer Columns */

.footer-column {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

.footer-column h3 {
    margin-bottom: 5px;

    font-size: 12px;

    color: #374151;
}

.footer-column a {
    color: #6b7280;

    text-decoration: none;

    font-size: 12px;
}

.footer-column a:hover {
    color: #0052ff;
}


/* Footer Network */

.footer-network {
    color: #9ca3af;

    font-size: 11px;
}


/* Footer Bottom */

.footer-bottom {
    width: min(1240px, 94%);

    margin: auto;

    padding: 16px 0;

    border-top: 1px solid #f0f1f3;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #9ca3af;

    font-size: 11px;
}


/* =========================================================
   RESPONSIVE HEADER / FOOTER
========================================================= */

@media (max-width: 900px) {

    .site-nav {
        display: none;
    }

    .header-search {
        width: 250px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 650px) {

    .site-header-inner {
        min-height: 62px;

        gap: 10px;
    }

    .site-logo {
        font-size: 16px;
    }

    .site-logo-icon {
        width: 31px;
        height: 31px;
    }

    .header-search {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

    .mobile-navigation {
        padding: 10px 3% 15px;

        border-top: 1px solid #f0f1f3;

        background: #ffffff;
    }

    .mobile-navigation.show {
        display: grid;

        gap: 3px;
    }

    .mobile-navigation a {
        padding: 10px;

        color: #4b5563;

        text-decoration: none;

        font-size: 14px;

        border-radius: 7px;
    }

    .mobile-navigation a:hover {
        background: #f5f8ff;

        color: #0052ff;
    }


    /* Footer */

    .footer-inner {
        grid-template-columns: 1fr;

        gap: 25px;
    }

    .footer-bottom {
        flex-direction: column;

        align-items: flex-start;

        gap: 5px;
    }
}








/* =========================================================
   UNIVERSAL COPY BUTTON
   ========================================================= */

.copy-button {
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 15px;
    padding: 4px 6px;
    border-radius: 6px;
    line-height: 1;
}

.copy-button:hover {
    background: #f1f5f9;
    color: #0052ff;
}


/* =========================================================
   HEADER GAS BUTTON
   ========================================================= */

.gas-header-button {
    height: 38px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #334155;
    border-radius: 8px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
}

.gas-header-button:hover {
    border-color: #0052ff;
    color: #0052ff;
}


/* =========================================================
   GAS TRACKER PANEL
   ========================================================= */

.gas-tracker-panel {
    position: fixed;
    top: 72px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    z-index: 1000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);

    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        visibility 0.15s ease;
}

.gas-tracker-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.gas-tracker-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}


/* =========================================================
   GAS HEADER
   ========================================================= */

.gas-tracker-header {
    padding: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
}


.gas-tracker-header strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
}


.gas-tracker-header span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}


.gas-close {
    border: 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 0 4px;
}


.gas-close:hover {
    color: #0f172a;
}


/* =========================================================
   GAS CONTENT
   ========================================================= */

.gas-tracker-content {
    padding: 18px;
}


.gas-loading {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    padding: 18px 0;
}


.gas-main {
    text-align: center;
    padding: 4px 0 18px;
}


.gas-label {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 8px;
}


.gas-main strong {
    color: #0052ff;
    font-size: 28px;
    font-weight: 700;
}


.gas-main small {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}


/* =========================================================
   GAS INFO GRID
   ========================================================= */

.gas-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}


.gas-info-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
}


.gas-info-item span {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-bottom: 4px;
}


.gas-info-item strong {
    display: block;
    color: #0f172a;
    font-size: 12px;
    word-break: break-word;
}


/* =========================================================
   GAS FOOTER
   ========================================================= */

.gas-tracker-footer {
    border-top: 1px solid #e5e7eb;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.gas-tracker-footer span {
    color: #64748b;
    font-size: 11px;
}


.gas-tracker-footer button {
    border: 0;
    background: transparent;
    color: #0052ff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}


.gas-tracker-footer button:hover {
    text-decoration: underline;
}


/* =========================================================
   GAS ERROR
   ========================================================= */

.gas-error {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}


.gas-error button {
    display: block;
    margin: 12px auto 0;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0052ff;
    border-radius: 7px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 12px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 800px) {

    .gas-header-button {
        display: none;
    }

    .gas-tracker-panel {
        top: 66px;
        left: 16px;
        right: 16px;
        width: auto;
        max-width: none;
    }

}


@media (max-width: 520px) {

    .gas-info-grid {
        grid-template-columns: 1fr;
    }

}











/* =========================================================
   BLOCK PAGE
========================================================= */

.container {
    width: min(1240px, 94%);
    margin: 0 auto 60px;
}

.breadcrumb {
    padding: 25px 0 16px;
    color: #6b7280;
    font-size: 13px;
}

.breadcrumb a {
    color: #0052ff;
    text-decoration: none;
}

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

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 18px;
    overflow: hidden;
}

.card-header {
    min-height: 56px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eef0f3;
    font-size: 15px;
    font-weight: 700;
}

.card-body {
    padding: 20px;
}

.block-label {
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.block-number {
    margin-bottom: 9px;
    color: #111827;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.network-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    background: #ecfdf5;
    color: #15803d;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.details {
    display: grid;
    grid-template-columns: 200px 1fr;
}

.detail-label {
    padding: 14px 18px;
    background: #fafafa;
    border-bottom: 1px solid #f0f1f3;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

.detail-value {
    min-width: 0;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f1f3;
    color: #111827;
    font-size: 12px;
    word-break: break-word;
}

.hash {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    word-break: break-all;
}

.detail-value a,
td a {
    color: #0052ff;
    text-decoration: none;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}

.detail-value a:hover,
td a:hover {
    text-decoration: underline;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 18px;
    text-align: left;
    border-bottom: 1px solid #f0f1f3;
    font-size: 12px;
    white-space: nowrap;
}

th {
    background: #fafafa;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
}

tbody tr:hover {
    background: #f8faff;
}

.status {
    color: #15803d;
    font-weight: 600;
}

.status.failed {
    color: #dc2626;
}

.loading {
    padding: 45px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.error {
    padding: 18px;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
}

.empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.external-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    background: #0052ff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

.external-link:hover {
    background: #0047df;
}

@media (max-width: 650px) {

    .container {
        width: 94%;
    }

    .breadcrumb {
        padding-top: 18px;
    }

    .card-body {
        padding: 16px;
    }

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

    .detail-label {
        padding: 11px 14px 4px;
        border-bottom: none;
        background: #ffffff;
    }

    .detail-value {
        padding: 4px 14px 11px;
    }

    th,
    td {
        padding: 12px 14px;
        font-size: 11px;
    }

}












/* =========================================================
   ADDRESS PAGE
========================================================= */

.address-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin: 0;
}


/* =========================================================
   ADDRESS CARD
========================================================= */

.address-title {
    margin: 0 0 10px 0;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.address-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.address {
    flex: 1;
    min-width: 0;

    color: #111827;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 15px;
    line-height: 1.6;

    word-break: break-all;
    overflow-wrap: anywhere;
}

.copy-btn {
    flex-shrink: 0;

    border: 1px solid #d1d5db;

    background: #ffffff;
    color: #374151;

    padding: 7px 12px;

    border-radius: 7px;

    cursor: pointer;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.4;

    white-space: nowrap;
}

.copy-btn:hover {
    background: #f3f4f6;
}


/* =========================================================
   NETWORK BADGE
========================================================= */

.address-card .network-badge {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    margin-top: 14px;

    padding: 5px 9px;

    background: #ecfdf5;
    color: #15803d;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 600;

    line-height: 1.4;
}


/* =========================================================
   ADDRESS STATS
========================================================= */

.address-card + .stats {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

    margin-top: 18px;
}

.address-card + .stats .stat {
    min-width: 0;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    padding: 20px;
}

.address-card + .stats .stat-label {
    margin: 0 0 7px 0;

    color: #6b7280;

    font-size: 12px;
    line-height: 1.5;
}

.address-card + .stats .stat-value {
    min-width: 0;

    color: #111827;

    font-size: 20px;
    font-weight: 700;

    line-height: 1.4;

    word-break: break-word;
}


/* =========================================================
   ADDRESS SECTIONS
========================================================= */

.address-card ~ .section {
    width: 100%;

    margin-top: 18px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    overflow: hidden;
}

.address-card ~ .section .section-header {
    width: 100%;

    min-height: 55px;

    padding: 0 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    border-bottom: 1px solid #eef0f3;
}

.address-card ~ .section .section-header h2 {
    margin: 0;

    color: #111827;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.4;
}

.address-card ~ .section .section-subtitle {
    flex-shrink: 0;

    color: #9ca3af;

    font-size: 11px;
    line-height: 1.4;

    white-space: nowrap;
}


/* =========================================================
   ADDRESS TRANSACTION TABLE
========================================================= */

#addressTransactions {
    width: 100%;
    min-width: 0;
}

#addressTransactions .table-wrapper {
    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
}

#addressTransactions table {
    width: 100%;

    min-width: 900px;

    border-collapse: collapse;
}

#addressTransactions th,
#addressTransactions td {
    padding: 13px 18px;

    text-align: left;

    border-bottom: 1px solid #f0f1f3;

    font-size: 12px;

    line-height: 1.5;

    white-space: nowrap;
}

#addressTransactions th {
    background: #fafafa;

    color: #6b7280;

    font-size: 11px;
    font-weight: 600;

    line-height: 1.4;
}

#addressTransactions tbody tr:last-child td {
    border-bottom: 0;
}

#addressTransactions tbody tr:hover {
    background: #f8faff;
}

#addressTransactions td a {
    color: #0052ff;

    text-decoration: none;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;
}

#addressTransactions td a:hover {
    text-decoration: underline;
}


/* =========================================================
   TRANSACTION STATUS
========================================================= */

#addressTransactions .status {
    color: #16a34a;
    font-weight: 600;
}

#addressTransactions .failed {
    color: #dc2626;
    font-weight: 600;
}


/* =========================================================
   LOADING / EMPTY
========================================================= */

#addressTransactions .empty {
    width: 100%;

    padding: 45px 20px;

    text-align: center;

    color: #9ca3af;

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   EXPLORER LINKS
========================================================= */

.explorer-links {
    width: 100%;

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    padding: 20px;
}

.explorer-link {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 36px;

    padding: 9px 13px;

    background: #0052ff;

    color: #ffffff;

    border-radius: 7px;

    text-decoration: none;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.4;

    white-space: nowrap;
}

.explorer-link:hover {
    background: #0047df;
}

.explorer-link.secondary {
    background: #ffffff;

    color: #0052ff;

    border: 1px solid #dbe1ea;
}

.explorer-link.secondary:hover {
    background: #f5f8ff;

    border-color: #0052ff;
}


/* =========================================================
   ADDRESS PAGE MOBILE
========================================================= */

@media (max-width: 768px) {

    .address-card {
        padding: 18px;
    }

    .address-row {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }

    .address {
        width: 100%;

        font-size: 13px;
    }

    .copy-btn {
        width: auto;
    }

    .address-card + .stats {
        grid-template-columns: 1fr;

        gap: 12px;

        margin-top: 16px;
    }

    .address-card + .stats .stat {
        padding: 18px;
    }

    .address-card + .stats .stat-value {
        font-size: 18px;
    }

    .address-card ~ .section {
        margin-top: 16px;
    }

    .address-card ~ .section .section-header {
        min-height: 54px;

        padding: 0 14px;
    }

    .address-card ~ .section .section-header h2 {
        font-size: 14px;
    }

    #addressTransactions th,
    #addressTransactions td {
        padding: 12px 14px;

        font-size: 11px;
    }

    .explorer-links {
        flex-direction: column;

        align-items: stretch;

        padding: 16px;
    }

    .explorer-link {
        width: 100%;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .address-card {
        padding: 16px;
    }

    .address {
        font-size: 12px;
    }

    .address-card .network-badge {
        margin-top: 12px;
    }

}










/* =========================================================
   TRANSACTION PAGE
========================================================= */

.transaction-hash-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.transaction-hash {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #111827;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.transaction-hash-row .copy-btn {
    flex-shrink: 0;
    padding: 7px 12px;
    border: 1px solid #dbe1ea;
    border-radius: 7px;
    background: #fff;
    color: #0052ff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.transaction-hash-row .copy-btn:hover {
    background: #f5f8ff;
}


#transactionContainer .details {
    margin-top: 0;
}


#transactionContainer .detail-value.hash {
    word-break: break-all;
    overflow-wrap: anywhere;
}


#transactionContainer .detail-value a {
    color: #0052ff;
    text-decoration: none;
}

#transactionContainer .detail-value a:hover {
    text-decoration: underline;
}


#transactionContainer .explorer-links {
    padding: 0;
}


@media (max-width: 768px) {

    .transaction-hash-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .transaction-hash {
        width: 100%;
        font-size: 12px;
    }

    .transaction-hash-row .copy-btn {
        width: auto;
    }

}














/* =========================================================
   TOKEN PAGE
========================================================= */

.token-name {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.token-symbol {
    margin-top: 5px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

#tokenContainer .detail-value a {
    color: #0052ff;
    text-decoration: none;
}

#tokenContainer .detail-value a:hover {
    text-decoration: underline;
}

#tokenContainer .detail-value.hash {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.token-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.token-info-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    background: #fafbfc;
}

.token-info-item span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
}

.token-info-item strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

#tokenContainer .explorer-links {
    padding: 0;
}

@media (max-width: 768px) {

    .token-name {
        font-size: 21px;
    }

    .token-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

}














/* =========================================================
   CONTRACT PAGE
========================================================= */

.contract-page {
    width: min(1240px, 94%);
    margin: 0 auto 60px;
}


/* =========================================================
   CONTRACT CARD
========================================================= */

#contractContainer {
    width: 100%;
}

#contractContainer .card {
    width: 100%;
    margin-bottom: 18px;
}


/* =========================================================
   CONTRACT HEADER
========================================================= */

.contract-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.contract-name {
    margin: 0 0 9px;

    color: #111827;

    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
}

.contract-address-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.contract-address {
    color: #64748b;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 13px;
    line-height: 1.6;

    word-break: break-all;
    overflow-wrap: anywhere;
}


/* =========================================================
   CONTRACT STATUS
========================================================= */

.contract-status {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;

    padding: 6px 10px;

    border-radius: 8px;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;

    white-space: nowrap;
}

.contract-verified {
    background: #dcfce7;
    color: #15803d;
}

.contract-unverified {
    background: #fef3c7;
    color: #b45309;
}


/* =========================================================
   CONTRACT SUMMARY GRID
========================================================= */

.contract-info-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-top: 20px;
}

.contract-info-item {
    min-width: 0;

    padding: 16px;

    background: #f8fafc;

    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.contract-info-item span {
    display: block;

    margin-bottom: 6px;

    color: #6b7280;

    font-size: 11px;
    line-height: 1.5;
    font-weight: 600;
}

.contract-info-item strong {
    display: block;

    color: #111827;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;

    word-break: break-word;
}


/* =========================================================
   CONTRACT INFORMATION
========================================================= */

.contract-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    min-height: 48px;

    padding: 13px 0;

    border-bottom: 1px solid #f0f1f3;
}

.contract-detail-row:last-child {
    border-bottom: 0;
}

.contract-detail-row > span:first-child {
    flex-shrink: 0;

    color: #6b7280;

    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
}

.contract-detail-value {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 7px;

    color: #111827;

    text-align: right;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 12px;
    line-height: 1.5;

    word-break: break-all;
    overflow-wrap: anywhere;
}

.verified-text {
    color: #15803d;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    font-weight: 600;
}

.unverified-text {
    color: #b45309;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    font-weight: 600;
}

.contract-link {
    color: #0052ff;

    text-decoration: none;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 12px;
}

.contract-link:hover {
    text-decoration: underline;
}


/* =========================================================
   CONTRACT EXTERNAL LINKS
========================================================= */

.contract-links {
    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 10px;
}

.contract-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 36px;

    padding: 9px 13px;

    background: #0052ff;
    color: #ffffff;

    border: 1px solid #0052ff;
    border-radius: 7px;

    text-decoration: none;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;

    white-space: nowrap;
}

.contract-links a:hover {
    background: #0047df;
    border-color: #0047df;
}


/* =========================================================
   CONTRACT PAGE MOBILE
========================================================= */

@media (max-width: 900px) {

    .contract-info-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .contract-page {
        width: 94%;
        margin-bottom: 40px;
    }

    .contract-title-row {
        flex-direction: column;
        gap: 12px;
    }

    .contract-name {
        font-size: 21px;
    }

    .contract-address {
        font-size: 12px;
    }

    .contract-status {
        align-self: flex-start;
    }

    .contract-info-grid {
        grid-template-columns: 1fr;

        gap: 12px;

        margin-top: 18px;
    }

    .contract-info-item {
        padding: 16px;
    }

    .contract-detail-row {
        align-items: flex-start;
        flex-direction: column;

        gap: 6px;

        padding: 12px 0;
    }

    .contract-detail-value {
        width: 100%;

        justify-content: flex-start;

        text-align: left;
    }

    .contract-links {
        flex-direction: column;
        align-items: stretch;
    }

    .contract-links a {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .contract-page {
        width: 94%;
    }

    .contract-name {
        font-size: 20px;
    }

    .contract-info-item {
        padding: 14px;
    }

    .contract-detail-row {
        padding: 11px 0;
    }

}











/* =========================================================
   CONTRACTS DIRECTORY
========================================================= */

.contracts-page {
    min-height: 70vh;
}

.contracts-page .container {
    width: min(1240px, 94%);
    margin: 0 auto 60px;
    padding-top: 24px;
    padding-bottom: 50px;
}


/* =========================================
   HERO
========================================= */

.contracts-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.contracts-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    color: #64748b;
    margin-bottom: 8px;
}

.contracts-hero h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    color: #111827;
}

.contracts-hero p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
}

.contracts-network {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.contracts-network .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
}


/* =========================================
   SEARCH CARD
========================================= */

.contracts-search-card {
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 18px;
}

.contracts-search-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.contracts-search {
    display: flex;
    gap: 10px;
}

.contracts-search input {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    outline: none;
    background: #f8fafc;
    color: #111827;
    font-family: monospace;
    font-size: 13px;
}

.contracts-search input:focus {
    border-color: #2563eb;
    background: #fff;
}

.contracts-search button {
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.contracts-search button:hover {
    background: #1d4ed8;
}

.contracts-search-message {
    min-height: 18px;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.contracts-search-message.error {
    color: #dc2626;
}


/* =========================================
   STATS
========================================= */

.contracts-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.contracts-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.contracts-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
}

.contracts-stat span {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 3px;
}

.contracts-stat strong {
    display: block;
    font-size: 14px;
    color: #111827;
}


/* =========================================
   LIST CARD
========================================= */

.contracts-list-card {
    overflow: hidden;
}

.contracts-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.contracts-list-header h2 {
    margin: 0;
    font-size: 17px;
}

.contracts-list-header span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.contracts-refresh {
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #334155;
    border-radius: 7px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
}

.contracts-refresh:hover {
    background: #f8fafc;
}


/* =========================================
   TABLE
========================================= */

.contracts-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.contracts-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.contracts-table th {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.contracts-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    color: #334155;
    font-size: 13px;
    white-space: nowrap;
}

.contracts-table tbody tr:hover {
    background: #f8fafc;
}

.contracts-table tbody tr:last-child td {
    border-bottom: none;
}

.contract-address-link {
    color: #2563eb;
    text-decoration: none;
    font-family: monospace;
    font-weight: 600;
}

.contract-address-link:hover {
    text-decoration: underline;
}

.contract-list-name {
    color: #111827;
    font-weight: 600;
}

.contract-type {
    color: #64748b;
}

.contract-list-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    background: #fef3c7;
    color: #a16207;
    font-size: 11px;
    font-weight: 600;
}

.contract-list-status.verified {
    background: #dcfce7;
    color: #15803d;
}


/* =========================================
   LOADING
========================================= */

.contracts-loading {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.contracts-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #dbe3ef;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: contractsSpin .8s linear infinite;
}

@keyframes contractsSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   EMPTY
========================================= */

.contracts-empty {
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 30px;
}

.contracts-empty-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 22px;
}

.contracts-empty h3 {
    margin: 0;
    font-size: 16px;
    color: #111827;
}

.contracts-empty p {
    max-width: 420px;
    margin: 7px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================
   INFO
========================================= */

.contracts-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.contracts-info-card {
    display: flex;
    gap: 13px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    background: #fff;
}

.contracts-info-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f1f5f9;
    color: #2563eb;
    font-weight: 700;
}

.contracts-info-card h3 {
    margin: 0 0 5px;
    color: #111827;
    font-size: 14px;
}

.contracts-info-card p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .contracts-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .contracts-hero h1 {
        font-size: 27px;
    }

    .contracts-network {
        font-size: 12px;
    }

    .contracts-stats {
        grid-template-columns: 1fr;
    }

    .contracts-info-grid {
        grid-template-columns: 1fr;
    }

    .contracts-list-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .contracts-refresh {
        width: 100%;
    }

    .contracts-search {
        flex-direction: column;
    }

    .contracts-search button {
        width: 100%;
    }

}


/* =========================================================
   DOZNI SHARED SHELL INTEGRATION
   ========================================================= */
body[data-dozni-shell="shared"] {
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    background: var(--color-bg, #fff);
    color: var(--color-text, #111827);
}
body[data-dozni-shell="shared"] #app {
    min-height: 55vh;
}
body[data-dozni-shell="shared"] .dozni-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}
body[data-dozni-shell="shared"] .dozni-footer {
    margin-top: 56px;
}
body[data-dozni-shell="shared"] .hero {
    background: linear-gradient(180deg, var(--color-primary-soft, #eef4ff) 0%, var(--color-bg, #fff) 100%);
    border-bottom: 1px solid var(--color-border, #e7edf5);
}
body[data-dozni-shell="shared"] .view-all,
body[data-dozni-shell="shared"] .item-title {
    color: var(--color-primary, #2563eb);
}
body[data-dozni-shell="shared"] .stat-card,
body[data-dozni-shell="shared"] .card {
    border-color: var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 10px);
    box-shadow: var(--shadow-sm, 0 4px 18px rgba(15,23,42,.04));
}
