/* Statistics section: own classes, styles 1:1 like Profile overview */
.panel-statistics-inner {
    padding: 40px 20px;
    padding-bottom: 0;
    padding-top: 0;
    max-width: 1400px;
    margin: 0 auto;
}
@media (max-width: 767px) {
    .panel-statistics-inner {
        padding-left: 0;
        padding-right: 0;
    }
}
.panel-statistics-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.panel-statistics-chart-header .panel-statistics-chart-title {
    margin: 0;
}
.panel-statistics-currency-selector {
    display: flex;
    gap: 6px;
}
.panel-statistics-currency-btn {
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.panel-statistics-currency-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}
.panel-statistics-currency-btn.is-active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-text-primary);
    border-color: rgba(255, 255, 255, 0.4);
}
.panel-statistics-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .panel-statistics-charts {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: stretch;
    }
}
@media (min-width: 1400px) {
    .panel-statistics-charts {
        gap: 24px;
    }
}
.panel-statistics-chart-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
}
.panel-statistics-chart-title {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    margin: 0 0 8px 0;
}
.panel-statistics-chart-container {
    width: 100%;
    height: 200px;
    margin-top: 16px;
    flex: 0 0 200px;
    min-height: 200px;
    max-height: 200px;
}
@media (min-width: 641px) {
    .panel-statistics-chart-container {
        height: 200px;
    }
}
.panel-statistics-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.panel-statistics-period-selector {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 0;
    justify-content: center;
}
.panel-statistics-period-btn {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.panel-statistics-period-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}
.panel-statistics-period-btn.is-active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-text-primary);
    border-color: rgba(255, 255, 255, 0.4);
}
.panel-statistics-chart-total {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-top: 16px;
}
.panel-statistics-chart-total-label {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 4px;
}
.panel-statistics-chart-total-value {
    font-family: pp-neue-machina-plain-regular, neue-haas-grot-text-roman, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.98);
}

/* Earn split doughnut (aggregate buckets; panel-only palette) — above the 2×2 chart grid */
.panel-earn-split-chart-box .panel-statistics-chart-title {
    text-align: center;
    font-weight: 700;
}
.panel-earn-split-chart-box {
    box-sizing: border-box;
    max-width: 850px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}
@media (min-width: 1400px) {
    .panel-earn-split-chart-box {
        margin-bottom: 24px;
    }
}
.panel-earn-split-chart-container {
    margin-top: 16px;
    height: min(220px, 42vw);
    min-height: 160px;
    max-height: 220px;
    flex: 0 0 auto;
}
@media (min-width: 641px) {
    .panel-earn-split-chart-container {
        height: 210px;
        min-height: 200px;
        max-height: 220px;
    }
}
.panel-earn-split-placeholder {
    margin-top: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    min-height: 70px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.panel-earn-split-legend {
    list-style: none;
    margin: 16px 0 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    justify-content: center;
}
.panel-earn-split-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}
.panel-earn-split-swatch {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.35);
}
.panel-earn-split-swatch--long {
    background-color: #22c55e;
}
.panel-earn-split-swatch--short {
    background-color: #bef264;
}
.panel-earn-split-swatch--ref {
    background-color: #38bdf8;
}
.panel-earn-split-swatch--mining {
    background-color: #a855f7;
}

/* Legacy/fallback chart styles (if used outside Statistics) */
.panel-profile-charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}
@media (min-width: 768px) {
    .panel-profile-charts {
        grid-template-columns: 1fr 1fr;
    }
}
.panel-profile-chart-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px 12px;
}
@media (max-width: 767px) {
    .panel-profile-chart-box {
        border-left: none;
        border-right: none;
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
    }
}
.panel-profile-chart-title {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 20px;
    text-align: center;
}
@media (max-width: 767px) {
    .panel-profile-chart-title {
        padding-left: 20px;
        padding-right: 20px;
    }
}
.panel-profile-chart-container {
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
}
@media (max-width: 767px) {
    .panel-profile-chart-container {
        height: 200px;
    }
}
.panel-profile-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.panel-profile-chart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 767px) {
    .panel-profile-chart-total {
        margin-left: 20px;
        margin-right: 20px;
    }
}
.panel-profile-chart-total-label {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}
.panel-profile-chart-total-value {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.panel-profile-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.panel-profile-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.panel-profile-info-label {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.panel-profile-info-value {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.panel-profile-info-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.panel-profile-info-box .panel-profile-info-item {
    background: transparent;
    border: none;
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-profile-info-box .panel-profile-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.panel-profile-info-box .panel-profile-info-item:first-child {
    padding-top: 0;
}

.panel-profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.panel-profile-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    outline: none;
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 14px;
}

.panel-profile-input:read-only {
    cursor: default;
    opacity: 0.8;
}

.panel-profile-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.panel-profile-password-display {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.35);
}

.panel-profile-password-masked {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 18px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.8);
}

.panel-profile-telegram-info {
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.35);
}

.panel-profile-telegram-username {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 14px;
    color: var(--color-text-primary);
    font-weight: 600;
}

.panel-profile-telegram-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.panel-profile-telegram-link:hover,
.panel-profile-telegram-link:focus-visible {
    color: #9555e9;
    text-shadow: 0 0 6px rgba(149, 85, 233, 0.55), 0 0 12px rgba(149, 85, 233, 0.35);
    outline: none;
}

.panel-profile-telegram-not-set {
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.panel-profile-action-btn {
    height: 46px;
    padding: 0 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: #fff;
    color: var(--panel-text-inverse);
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.panel-profile-action-btn .panel-profile-action-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.panel-profile-action-btn .panel-profile-action-btn-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.panel-profile-action-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.2);
}

.panel-profile-action-btn:active {
    background: rgba(240, 240, 240, 1);
}

.panel-profile-action-btn--icon-only {
    min-width: 46px;
    width: 46px;
    padding: 0;
    justify-content: center;
}

.panel-profile-copy-btn {
    height: 46px;
    padding: 0;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-text-primary);
}

.panel-profile-copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.panel-profile-copy-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.panel-profile-logout-item {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.panel-profile-logout-btn {
    width: 240px;
    height: 46px;
    padding: 0 20px;
    margin: auto;
    border-radius: 8px;
    border: 1px solid var(--panel-text-inverse);
    background: #ffffff;
    color: var(--panel-text-inverse);
    font-family: neue-haas-grot-text-roman, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-profile-logout-btn:hover {
    transform: translateY(-3px);
}

.panel-profile-logout-btn:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .panel-profile-info-box .panel-profile-info-item { 
        gap: 12px;
    }
 

    .panel-profile-action-btn--icon-only {
        width: 46px;
        min-width: 46px;
    }

    .panel-profile-logout-item {
        justify-content: center;
        align-items: center;
    }
}
