/* app/static/css/analytics.css */
/* ========================= */
/* ANALYTICS PAGE */
/* ========================= */

.analytics-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px 60px;
    box-sizing: border-box;
    color: #ffffff;
}

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

.analytics-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;

    padding: 22px 26px;
    margin-bottom: 22px;

    border: 2px solid #037d9c;
    border-radius: 20px;

    background:
        radial-gradient(circle at 72% 50%, rgba(3, 125, 156, 0.34), transparent 38%),
        linear-gradient(90deg, rgba(2, 8, 13, 0.98), rgba(4, 22, 30, 0.92) 48%, rgba(2, 8, 13, 0.96));

    box-shadow:
        0 0 18px rgba(3, 125, 156, 0.55),
        0 12px 30px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.analytics-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.06) 42%, transparent),
        repeating-linear-gradient(90deg, rgba(158, 231, 255, 0.08) 0 1px, transparent 1px 58px),
        repeating-linear-gradient(0deg, rgba(158, 231, 255, 0.06) 0 1px, transparent 1px 58px);
    pointer-events: none;
}

.analytics-hero-text {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    max-width: 560px;
}

.analytics-hero h1 {
    margin: 0 0 10px;
    font-size: 31px;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.analytics-hero p {
    max-width: 520px;
    margin: 0;
    color: #e8fbff;
    line-height: 1.55;
    font-size: 15px;
}

.analytics-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0 0 14px;

    padding: 10px 18px;
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(232, 251, 255, 0.55);

    color: #e8fbff;
    white-space: nowrap;

    box-shadow:
        0 0 14px rgba(255, 255, 255, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.analytics-hero-badge i {
    font-size: 16px;
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
}

.analytics-hero-badge span {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.analytics-hero-visual {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.analytics-header-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.analytics-earth-image {
    position: absolute;
    left: 50%;
    top: 44%;
    z-index: 2;
    width: min(165%, 1950px);
    height: 69%;
    max-height: 69%;
    object-fit: fill;
    transform: translate(-50%, -50%);
    opacity: 1;
    filter: none;
    mix-blend-mode: screen;
}

.analytics-hero-chart {
    position: absolute;
    top: 43%;
    right: 34px;
    width: min(32%, 350px);
    height: 148px;
    transform: translateY(-50%);
    overflow: hidden;
    border: 1px solid rgba(232, 251, 255, 0.48);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 44%),
        rgba(4, 34, 45, 0.62);
    box-shadow:
        0 0 18px rgba(3, 125, 156, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -16px 30px rgba(0, 0, 0, 0.18);
}

.analytics-hero-chart::before {
    content: "";
    position: absolute;
    inset: 13px 14px 22px;
    border-left: 1px solid rgba(232, 251, 255, 0.24);
    border-bottom: 1px solid rgba(232, 251, 255, 0.28);
    background:
        repeating-linear-gradient(90deg, rgba(232, 251, 255, 0.08) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(0deg, rgba(232, 251, 255, 0.07) 0 1px, transparent 1px 30px);
    pointer-events: none;
}

.analytics-chart-bars {
    position: absolute;
    inset: 22px 22px 27px 26px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(8px, 1vw, 13px);
    overflow: hidden;
}

.analytics-chart-bars span {
    width: clamp(13px, 1.55vw, 20px);
    height: var(--bar-height);
    max-height: 100%;
    border-radius: 999px 999px 4px 4px;
    background:
        linear-gradient(180deg, #f6fdff 0%, #d8f8ff 44%, #8eefff 100%);
    box-shadow:
        0 0 12px rgba(238, 253, 255, 0.52),
        0 0 20px rgba(3, 125, 156, 0.34);
    transform-origin: bottom center;
    animation: analytics-chart-bar-rise 2.8s ease-in-out infinite;
    animation-delay: var(--bar-delay);
}

.analytics-chart-line {
    position: absolute;
    inset: 22px 20px 28px 24px;
    overflow: visible;
    pointer-events: none;
}

.analytics-chart-line polyline {
    fill: none;
    stroke: #ffb65a;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 12 14;
    filter:
        drop-shadow(0 0 4px rgba(255, 182, 90, 0.62))
        drop-shadow(0 0 9px rgba(255, 148, 55, 0.28));
    animation: analytics-chart-line-flow 3.8s linear infinite;
}

.analytics-hero-status {
    position: absolute;
    right: 26px;
    bottom: 22px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 176px;
    max-width: min(360px, calc(100% - 52px));
    min-height: 43px;
    padding: 10px 13px;
    border: 1px solid rgba(232, 251, 255, 0.34);
    border-radius: 11px;
    background: rgba(15, 18, 22, 0.86);
    color: #ffffff;
    box-sizing: border-box;
    box-shadow:
        0 0 14px rgba(3, 125, 156, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.analytics-hero-status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #4df2a7;
    box-shadow: 0 0 16px rgba(77, 242, 167, 0.8);
}

#analytics-hero-status-text {
    overflow: hidden;
    color: #ffffff;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-hero-status[data-status="loading"] .analytics-hero-status-dot {
    background: #06d9ff;
    box-shadow: 0 0 16px rgba(6, 217, 255, 0.78);
}

.analytics-hero-status[data-status="success"] .analytics-hero-status-dot {
    background: #5dff8b;
    box-shadow: 0 0 16px rgba(93, 255, 139, 0.76);
}

.analytics-hero-status[data-status="error"] .analytics-hero-status-dot {
    background: #ff6b6b;
    box-shadow: 0 0 16px rgba(255, 107, 107, 0.72);
}

@keyframes analytics-chart-bar-rise {
    0%,
    100% {
        transform: scaleY(0.72);
        opacity: 0.72;
    }
    34% {
        transform: scaleY(0.96);
        opacity: 0.94;
    }
    58% {
        transform: scaleY(0.82);
        opacity: 0.80;
    }
    76% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes analytics-chart-line-flow {
    to {
        stroke-dashoffset: -52;
    }
}

/* ========================= */
/* HERO WALLET STATUS */
/* ========================= */


/* not connected */


/* connected */


/* ========================= */
/* FILTERS */
/* ========================= */

.analytics-filters {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding: 18px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

.filter-group label {
    color: #bfbfbf;
    font-size: 13px;
}

.filter-group select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid rgba(6, 171, 212, 0.35);
    background: rgba(20, 20, 20, 0.96);
    color: #ffffff;
    outline: none;
}

.analytics-refresh-btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid rgba(6, 171, 212, 0.5);
    background: rgba(6, 171, 212, 0.14);
    color: #ffffff;
    cursor: pointer;
    transition: 0.2s ease;
}

.analytics-refresh-btn:hover {
    background: rgba(6, 171, 212, 0.28);
}

.analytics-refresh-btn.loading i {
    animation: analytics-refresh-spin 0.75s linear infinite;
}

@keyframes analytics-refresh-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================= */
/* NETWORK SELECT */
/* ========================= */

.analytics-network-select {
    position: relative;
    z-index: 50;
    width: 100%;
    user-select: none;
}

.analytics-network-select.open {
    z-index: 5000;
}

.analytics-network-trigger {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(6, 171, 212, 0.34);
    border-radius: 11px;
    background: rgba(15, 18, 22, 0.98);
    color: #ffffff;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.analytics-network-trigger:focus {
    outline: none;
    border-color: rgba(6, 217, 255, 0.78);
    box-shadow: 0 0 0 3px rgba(6, 217, 255, 0.12);
}

.analytics-network-trigger-content,
.analytics-network-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytics-network-trigger-content {
    min-width: 0;
    flex: 1 1 auto;
}

.analytics-network-text,
.analytics-network-option span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-network-logo,
.analytics-network-all-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
}

.analytics-network-trigger-icon {
    display: inline-flex;
    flex: 0 0 22px;
}

.analytics-network-logo {
    object-fit: contain;
}

.analytics-network-all-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 171, 212, 0.18);
    color: #06d9ff;
    font-size: 12px;
}

.analytics-network-arrow {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.25s ease;
}

.analytics-network-select.open .analytics-network-arrow {
    transform: rotate(180deg);
}

.analytics-network-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 9999;
    display: none;
    width: 100%;
    max-height: 285px;
    overflow-y: auto;
    border: 1px solid rgba(6, 171, 212, 0.45);
    border-radius: 11px;
    background: rgba(10, 14, 18, 0.98);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.analytics-network-select.open .analytics-network-dropdown {
    display: block;
}

.analytics-network-option {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.2s ease;
}

.analytics-network-option:hover {
    background: rgba(21, 135, 163, 0.35);
}

.analytics-network-option.selected {
    background: rgba(3, 125, 156, 0.45);
}

.light-theme .analytics-network-trigger {
    border-color: rgba(3, 125, 156, 0.30);
    background: #ffffff;
    color: #1e252b;
}

.light-theme .analytics-network-dropdown {
    border-color: rgba(3, 125, 156, 0.35);
    background: rgba(250, 250, 250, 0.98);
}

.light-theme .analytics-network-option {
    color: #20252a;
}

.light-theme .analytics-network-option:hover {
    background: rgba(21, 135, 163, 0.16);
}

.light-theme .analytics-network-option.selected {
    background: rgba(21, 135, 163, 0.22);
}

/* ========================= */
/* CARDS */
/* ========================= */

.analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.analytics-card {
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(6, 171, 212, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    padding: 18px;
    box-sizing: border-box;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.summary-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #06d9ff;
    background: rgba(6, 171, 212, 0.14);
}

.summary-label {
    display: block;
    color: #bfbfbf;
    font-size: 13px;
    margin-bottom: 4px;
}

.summary-card strong {
    font-size: 21px;
    color: #ffffff;
}

/* ========================= */
/* MAIN GRID */
/* ========================= */

.analytics-main-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 20px;
    margin-bottom: 20px;
}

.analytics-bottom-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 20px;
}

.card-header {
    margin-bottom: 16px;
}

.card-header h2 {
    margin: 0 0 5px;
    font-size: 20px;
    color: #ffffff;
}

.card-header span {
    color: #bfbfbf;
    font-size: 13px;
}

/* ========================= */
/* SIMPLE CHART */
/* ========================= */

.chart-box {
    width: 100%;
    height: 260px;
}

#balance-trend-chart {
    width: 100%;
    height: 100%;
}

/* ========================= */
/* ALLOCATION */
/* ========================= */

.allocation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.allocation-item {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.allocation-row {
    display: flex;
    justify-content: space-between;
    color: #e8e8e8;
    font-size: 14px;
}

.allocation-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.allocation-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #06d9ff, #00ffcc);
}

/* ========================= */
/* INSIGHTS */
/* ========================= */

.market-insights-list,
.analytics-transaction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.insight-item,
.analytics-transaction-item,
.empty-state {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #dcdcdc;
    font-size: 14px;
}

.insight-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.insight-item i {
    color: #06d9ff;
}

/* ========================= */
/* LIGHT THEME */
/* ========================= */

.light-theme .analytics-page {
    color: #222222;
}

.light-theme .analytics-hero,
.light-theme .analytics-card,
.light-theme .analytics-filters {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(3, 125, 156, 0.25);
}

.light-theme .analytics-hero h1,
.light-theme .card-header h2,
.light-theme .summary-card strong {
    color: #222222;
}

.light-theme .analytics-hero p,
.light-theme .summary-label,
.light-theme .card-header span,
.light-theme .filter-group label {
    color: #555555;
}

.light-theme .filter-group select {
    background: #ffffff;
    color: #222222;
}

.light-theme .insight-item,
.light-theme .analytics-transaction-item,
.light-theme .empty-state {
    background: rgba(0, 0, 0, 0.035);
    color: #333333;
}

.light-theme .analytics-hero {
    background:
        radial-gradient(circle at 72% 50%, rgba(3, 125, 156, 0.3), transparent 38%),
        linear-gradient(90deg, rgba(3, 23, 32, 0.98), rgba(6, 45, 58, 0.92) 48%, rgba(3, 23, 32, 0.96));
    border-color: #037d9c;
    box-shadow:
        0 0 16px rgba(3, 125, 156, 0.28),
        0 10px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.light-theme .analytics-hero h1 {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.light-theme .analytics-hero p {
    color: #e8fbff;
}

.light-theme .analytics-hero-badge {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.40);
}

.light-theme .analytics-hero-badge i,
.light-theme .analytics-hero-badge span {
    color: #ffffff;
}


/* ========================= */
/* RESPONSIVE */
/* ========================= */

@media (max-width: 900px) {
    .analytics-summary-grid,
    .analytics-main-grid,
    .analytics-bottom-grid {
        grid-template-columns: 1fr;
    }

    .analytics-hero,
    .analytics-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .analytics-hero-badge {
        justify-content: flex-start;
    }

    .analytics-hero-status {
        position: relative;
        right: auto;
        bottom: auto;
        align-self: flex-start;
        margin-top: 12px;
    }

    .analytics-hero-chart {
        right: 14px;
        top: 42%;
        width: min(54%, 300px);
        height: 118px;
        opacity: 0.58;
    }

    .analytics-earth-image {
        left: 50%;
        top: 44%;
        width: min(170%, 1480px);
        height: 71%;
        max-height: 71%;
        opacity: 0.82;
    }

    

    

    
}

/* ========================= */
/* SMART CONTRACTS ALIGNMENT */
/* ========================= */

.analytics-hero {
    min-height: 230px;
    box-sizing: border-box;
}

.analytics-hero-text {
    z-index: 3;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.analytics-eyebrow {
    display: inline-flex;
    align-items: center;

    margin-bottom: 10px;
    padding: 7px 14px;

    border: 1px solid rgba(232, 251, 255, 0.34);
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.62);
    color: #e8fbff;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;

    box-shadow:
        0 0 10px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);

    box-sizing: border-box;
    backdrop-filter: blur(6px);
}

.analytics-hero h1 {
    font-weight: 800;
}

.analytics-hero p {
    max-width: 340px;

    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.analytics-hero-badge {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 20;

    min-height: 44px;
    margin: 0;
    padding: 10px 18px;

    background: rgba(0, 0, 0, 0.38);

    backdrop-filter: blur(6px);
}

.analytics-hero-badge span {
    font-size: 14px;
    font-weight: 800;
}

.analytics-hero-status {
    right: 22px;
    bottom: 30px;

    gap: 9px;

    width: 148px;
    min-width: 0;
    max-width: none;
    min-height: 34px;
    padding: 7px 12px;

    border-radius: 9px;
}

#analytics-hero-status-text {
    color: #5dff8b;
    font-size: 12px;
}


.analytics-intro {
    position: relative;
    overflow: hidden;

    width: 100%;
    min-height: 92px;
    margin: 26px 0 17px;
    padding: 16px 24px;

    border: 2px solid #037d9c;
    border-radius: 15px;

    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.14) 48%, rgba(0, 0, 0, 0.04)),
        radial-gradient(circle at 78% 48%, rgba(3, 125, 156, 0.42), transparent 38%),
        linear-gradient(180deg, rgba(3, 125, 156, 0.38), rgba(4, 22, 32, 0.84)),
        #080a0d;

    box-shadow:
        0 0 16px rgba(3, 125, 156, 0.48),
        0 10px 24px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);

    box-sizing: border-box;
}

.analytics-intro::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 42%),
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12), transparent 32%);

    pointer-events: none;
}

.analytics-intro h2,
.analytics-intro p {
    position: relative;
    z-index: 2;
}

.analytics-intro h2 {
    margin: 0 0 6px;

    color: #ffffff;

    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.analytics-intro p {
    margin: 0;

    color: #e8fbff;

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

@media (max-width: 980px) {
    .analytics-hero-status {
        position: relative;
        right: auto;
        bottom: auto;

        align-self: flex-start;

        margin-top: 12px;
    }
}

@media (min-width: 761px) and (max-width: 900px) {
    

    
}

@media (max-width: 760px) {
    .analytics-page {
        padding: 20px 12px 50px;
    }

    .analytics-hero {
        min-height: auto;
        padding: 20px;
    }

    .analytics-earth-image {
        left: 50%;
        top: 45%;
        width: 182%;
        height: 69%;
        max-height: 69%;
        opacity: 0.64;
    }

    

    
}

/* ========================= */
/* ANALYTICS DASHBOARD V2 */
/* ========================= */

[hidden] {
    display: none !important;
}

.analytics-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.summary-detail {
    display: block;
    margin-top: 4px;
    color: #8f9ba3;
    font-size: 11px;
}

.positive { color: #4df2a7 !important; }
.negative { color: #ff7b88 !important; }
.neutral { color: #bfc8ce !important; }

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.chart-box {
    position: relative;
}

.balance-chart-tooltip {
    position: absolute;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 126px;
    padding: 9px 11px;
    border: 1px solid rgba(6, 217, 255, 0.42);
    border-radius: 10px;
    background: rgba(5, 12, 17, 0.95);
    color: #ffffff;
    pointer-events: none;
    transform: translate(-50%, -100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
}

.balance-chart-tooltip span {
    color: #9eabb3;
    font-size: 11px;
}

.allocation-row-secondary {
    color: #9ea9b0;
    font-size: 12px;
}

.insight-item.warning {
    border-color: rgba(255, 182, 90, 0.28);
    background: rgba(255, 182, 90, 0.08);
}

.insight-item.warning i {
    color: #ffb65a;
}

.analytics-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 9px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.analytics-secondary-btn {
    border: 1px solid rgba(6, 171, 212, 0.35);
    background: rgba(6, 171, 212, 0.1);
    color: #eafcff;
}

.analytics-secondary-btn:hover {
    filter: brightness(1.12);
}

.analytics-secondary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.analytics-card-actions,
.analytics-period-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-period-tabs {
    padding: 3px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
}

.analytics-period-tab {
    min-width: 42px;
    min-height: 30px;
    padding: 0 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #8f9ca4;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.analytics-period-tab.active {
    background: rgba(6, 217, 255, 0.17);
    color: #dffaff;
}

.analytics-transaction-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.analytics-transaction-logo,
.network-usage-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: contain;
}

.analytics-transaction-body {
    min-width: 0;
}

.analytics-transaction-title,
.analytics-transaction-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-transaction-title {
    margin-bottom: 6px;
}

.analytics-transaction-details {
    flex-wrap: wrap;
    color: #9ca8af;
    font-size: 11px;
}

.analytics-transaction-details span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #53616a;
}

.transaction-direction,
.transaction-status {
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    text-transform: capitalize;
}

.transaction-direction.incoming {
    background: rgba(77, 242, 167, 0.12);
    color: #4df2a7;
}

.transaction-direction.outgoing {
    background: rgba(255, 123, 136, 0.12);
    color: #ff8d98;
}

.transaction-direction.exchange {
    background: rgba(6, 217, 255, 0.12);
    color: #72eaff;
}

.analytics-transaction-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
}

.transaction-status {
    background: rgba(255, 255, 255, 0.07);
    color: #c8d0d5;
}

.status-success { color: #4df2a7; }
.status-failed { color: #ff7b88; }
.status-pending { color: #ffca70; }

.transaction-explorer-link {
    color: #74e9ff;
    font-size: 11px;
    text-decoration: none;
}

.analytics-network-activity-card {
    margin-top: 20px;
}

.analytics-network-activity {
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) 1.35fr;
    gap: 18px;
}

.network-activity-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    min-height: 92px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.network-activity-label {
    color: #9ba8b0;
    font-size: 12px;
}

.network-activity-summary strong {
    font-size: 19px;
}

.risk-high { color: #ffb65a; }
.risk-balanced { color: #4df2a7; }

.network-usage-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.network-usage-item {
    display: grid;
    grid-template-columns: 28px 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: #dbe1e5;
    font-size: 12px;
}

.network-usage-logo {
    width: 26px;
    height: 26px;
}

.network-usage-rank {
    color: #64737c;
    font-weight: 700;
}

.network-usage-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.light-theme .network-activity-summary,
.light-theme .network-usage-item {
    background-color: rgba(255, 255, 255, 0.88);
}

.light-theme .network-usage-item {
    color: #1f2b32;
}

.light-theme .analytics-secondary-btn {
    color: #17556a;
}

.light-theme .balance-chart-tooltip {
    background: rgba(255, 255, 255, 0.97);
    color: #17252d;
}

@media (max-width: 760px) {
    .card-header,
    .analytics-card-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .analytics-period-tabs {
        align-self: flex-start;
    }

    .analytics-card-actions .analytics-secondary-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .analytics-transaction-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .analytics-transaction-side {
        grid-column: 2;
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .analytics-network-activity {
        grid-template-columns: 1fr;
    }

    .network-usage-item {
        grid-template-columns: 24px 26px minmax(0, 1fr);
    }

    .network-usage-item strong {
        grid-column: 3;
        font-size: 11px;
    }
}
